fix: left project/circle page and intl default localisation

This commit is contained in:
Jean-Baptiste Pasquier
2021-03-17 11:19:32 +01:00
parent 6e46f26615
commit 1f1286973f
3 changed files with 21 additions and 15 deletions

View File

@ -179,7 +179,9 @@ class JsI18n {
t(key) {
var translations = this.locales[this.locale];
if (translations == undefined) {
translations = this.locales[this.defaultLocale];
if(this.locales.length > 1) {
translations = this.locales[this.defaultLocale];
}
}
if(translations != undefined) {
let translation = key.toString().split('.').reduce((o, i) => (o ? o[i] : undefined), translations);