forked from FoundKeyGang/FoundKey
client: fix inline translations
This commit is contained in:
parent
9470e12424
commit
87f1b0cabc
|
@ -195,7 +195,7 @@ export function getNoteMenu(props: {
|
||||||
|
|
||||||
let targetLang = localStorage.getItem('lang') || navigator.language;
|
let targetLang = localStorage.getItem('lang') || navigator.language;
|
||||||
targetLang = targetLang.toUpperCase();
|
targetLang = targetLang.toUpperCase();
|
||||||
if (!['EN-GB', 'EN-US', 'PT-BR', 'PT-PT'].íncludes(targetLang)) {
|
if (!['EN-GB', 'EN-US', 'PT-BR', 'PT-PT'].includes(targetLang)) {
|
||||||
// only the language code without country code is allowed
|
// only the language code without country code is allowed
|
||||||
targetLang = targetLang.split('-', 1)[0];
|
targetLang = targetLang.split('-', 1)[0];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue