Fix missing localization for unknown locale
This commit is contained in:
parent
4bb719359c
commit
2e278e7323
|
@ -1,5 +1,5 @@
|
||||||
import { registerDebugFunction } from './power-user.js';
|
import { registerDebugFunction } from './power-user.js';
|
||||||
import { updateSecretDisplay } from './secrets.js'
|
import { updateSecretDisplay } from './secrets.js';
|
||||||
|
|
||||||
const storageKey = 'language';
|
const storageKey = 'language';
|
||||||
const overrideLanguage = localStorage.getItem(storageKey);
|
const overrideLanguage = localStorage.getItem(storageKey);
|
||||||
|
@ -42,7 +42,8 @@ async function getMissingTranslations() {
|
||||||
const missingData = [];
|
const missingData = [];
|
||||||
|
|
||||||
// Determine locales to search for untranslated strings
|
// Determine locales to search for untranslated strings
|
||||||
const langsToProcess = localeFile == 'en' ? langs : [findLang(localeFile)];
|
const isNotSupported = !findLang(localeFile);
|
||||||
|
const langsToProcess = (isNotSupported || localeFile == 'en') ? langs : [findLang(localeFile)];
|
||||||
|
|
||||||
for (const language of langsToProcess) {
|
for (const language of langsToProcess) {
|
||||||
const localeData = await getLocaleData(language.lang);
|
const localeData = await getLocaleData(language.lang);
|
||||||
|
|
Loading…
Reference in New Issue