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:
Gerhard Schlager
2019-05-23 21:23:31 +02:00
parent 0e24cb0f78
commit c1e9a70d59
8 changed files with 135 additions and 66 deletions

View File

@ -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");