mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2024-12-11 08:57:11 +01:00
Update i18n.js
This commit is contained in:
parent
bba16f5263
commit
14a845836b
@ -112,11 +112,17 @@ export function applyLocale(root = document) {
|
||||
if (localizedValue || localizedValue == '') {
|
||||
$(this).attr(attributeMatch[1], localizedValue);
|
||||
}
|
||||
else {
|
||||
console.warn(`Missing translation for '${attributeMatch[2]}'`);
|
||||
}
|
||||
} else { // No attribute tag, treat as 'text'
|
||||
const localizedValue = localeData?.[key];
|
||||
if (localizedValue || localizedValue == '') {
|
||||
$(this).text(localizedValue);
|
||||
}
|
||||
else {
|
||||
console.warn(`Missing translation for '${key}'`);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user