1
0
Fork 0
mirror of https://github.com/documize/community.git synced 2025-07-25 08:09:43 +02:00

Select user language before server language

This commit is contained in:
Harvey Kandola 2022-03-21 13:14:55 -04:00
parent e81cbad385
commit 7e26c003d6
3 changed files with 13 additions and 3 deletions

View file

@ -24,14 +24,15 @@ export default Service.extend({
let str = "";
switch(this.session.locale) {
case "fr-FR":
str = "";
case "en-US":
str = this.langs.enUS[key];
break;
default:
str = this.langs.enUS[key];
}
if (_.isUndefined(str)) {
// eslint-disable-next-line no-console
console.log(">>>>>>>>>>>> i18n missed key", key);
return `!${key}!`;
}
@ -42,6 +43,8 @@ export default Service.extend({
}
}
console.log(this.session.locale);
return str;
},
});