mirror of
https://github.com/cheeaun/phanpy.git
synced 2025-02-13 03:26:21 +01:00
Try delay run localeTargetLanguages
This commit is contained in:
parent
162d344be1
commit
07e72be5bb
1 changed files with 7 additions and 6 deletions
|
@ -8,7 +8,8 @@ const locales = [
|
||||||
...navigator.languages,
|
...navigator.languages,
|
||||||
];
|
];
|
||||||
|
|
||||||
const localeTargetLanguages = localeMatch(
|
const localeTargetLanguages = () =>
|
||||||
|
localeMatch(
|
||||||
locales,
|
locales,
|
||||||
translationTargetLanguages.map((l) => l.code.replace('_', '-')), // The underscore will fail Intl.Locale inside `match`
|
translationTargetLanguages.map((l) => l.code.replace('_', '-')), // The underscore will fail Intl.Locale inside `match`
|
||||||
'en',
|
'en',
|
||||||
|
@ -21,7 +22,7 @@ function getTranslateTargetLanguage(fromSettings = false) {
|
||||||
return contentTranslationTargetLanguage;
|
return contentTranslationTargetLanguage;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return localeTargetLanguages;
|
return localeTargetLanguages();
|
||||||
}
|
}
|
||||||
|
|
||||||
export default getTranslateTargetLanguage;
|
export default getTranslateTargetLanguage;
|
||||||
|
|
Loading…
Reference in a new issue