feat: filter localizations

This commit is contained in:
TrèsAbhi committed 2024-03-06 16:11:08 -06:00
1 parent 49d0dbe86d
commit 96a9e5b938
6 files changed
+65 -22

No files matched your search

+3 -1
View File
@@ -27,7 +27,7 @@ export function translator(localeRaw: Locale) {
console.warn(
`Undefined translation at "${pathItem}" in "${path}" for locale "${locale}"; falling back to en-US`,
);
return translator(Locale.EnglishUS).translate(path);
return translator(Locale.EnglishUS).translate(path, literals);
}
}
}
@@ -51,6 +51,8 @@ export function translator(localeRaw: Locale) {
if (index !== 0) embeddedString += literals[index - 1];
embeddedString += chunk;
});
return embeddedString;
}
return resolvedString;