mirror of
https://github.com/discourse/discourse.git
synced 2025-05-23 07:49:05 +08:00
FIX: Fallback locale was not available for extra translations
Translations from fallback locales were not sent to the client for admin_js and wizard_js.
This commit is contained in:
@ -258,6 +258,8 @@ widgetTest("handlebars d-icon", {
|
||||
});
|
||||
|
||||
widgetTest("handlebars i18n", {
|
||||
_translations: I18n.translations,
|
||||
|
||||
template: `{{mount-widget widget="hbs-i18n-test" args=args}}`,
|
||||
|
||||
beforeEach() {
|
||||
@ -268,15 +270,21 @@ widgetTest("handlebars i18n", {
|
||||
<a href title={{i18n "hbs_test0"}}>test</a>
|
||||
`
|
||||
});
|
||||
I18n.extras = [
|
||||
{
|
||||
hbs_test0: "evil",
|
||||
hbs_test1: "trout"
|
||||
I18n.translations = {
|
||||
en: {
|
||||
js: {
|
||||
hbs_test0: "evil",
|
||||
hbs_test1: "trout"
|
||||
}
|
||||
}
|
||||
];
|
||||
};
|
||||
this.set("args", { key: "hbs_test1" });
|
||||
},
|
||||
|
||||
afterEach() {
|
||||
I18n.translations = this._translations;
|
||||
},
|
||||
|
||||
test(assert) {
|
||||
// comin up
|
||||
assert.equal(find("span.string").text(), "evil");
|
||||
|
Reference in New Issue
Block a user