Update i18n.js
This commit is contained in:
parent
bba16f5263
commit
14a845836b
|
@ -112,11 +112,17 @@ export function applyLocale(root = document) {
|
||||||
if (localizedValue || localizedValue == '') {
|
if (localizedValue || localizedValue == '') {
|
||||||
$(this).attr(attributeMatch[1], localizedValue);
|
$(this).attr(attributeMatch[1], localizedValue);
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
console.warn(`Missing translation for '${attributeMatch[2]}'`);
|
||||||
|
}
|
||||||
} else { // No attribute tag, treat as 'text'
|
} else { // No attribute tag, treat as 'text'
|
||||||
const localizedValue = localeData?.[key];
|
const localizedValue = localeData?.[key];
|
||||||
if (localizedValue || localizedValue == '') {
|
if (localizedValue || localizedValue == '') {
|
||||||
$(this).text(localizedValue);
|
$(this).text(localizedValue);
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
console.warn(`Missing translation for '${key}'`);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue