mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Remove cases
This commit is contained in:
@ -107,12 +107,12 @@ export function applyLocale(root = document) {
|
||||
const attributeMatch = key.match(/\[(\S+)\](.+)/); // [attribute]key
|
||||
if (attributeMatch) { // attribute-tagged key
|
||||
const localizedValue = localeData?.[attributeMatch[2]];
|
||||
if (localizedValue) {
|
||||
if (localizedValue || localizedValue == '') {
|
||||
$(this).attr(attributeMatch[1], localizedValue);
|
||||
}
|
||||
} else { // No attribute tag, treat as 'text'
|
||||
const localizedValue = localeData?.[key];
|
||||
if (localizedValue) {
|
||||
if (localizedValue || localizedValue == '') {
|
||||
$(this).text(localizedValue);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user