1
1
mirror of https://github.com/kokonect-link/cherrypick synced 2024-11-23 22:56:53 +09:00

良い感じに

This commit is contained in:
syuilo 2018-08-23 01:37:05 +09:00
parent 4153b0db38
commit 8dc9ec06f8
13 changed files with 16 additions and 13419 deletions

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -11,13 +11,13 @@ const loadLang = lang => yaml.safeLoad(
const native = loadLang('ja-JP');
const langs = {
'de': loadLang('de'),
'en': loadLang('en'),
'fr': loadLang('fr'),
'ja': native,
'de-DE': loadLang('de-DE'),
'en-US': loadLang('en-US'),
'fr-FR': loadLang('fr-FR'),
'ja-JP': native,
'ja-KS': loadLang('ja-KS'),
'pl': loadLang('pl'),
'es': loadLang('es')
'pl-PL': loadLang('pl-PL'),
'es-ES': loadLang('es-ES')
};
Object.values(langs).forEach(locale => {

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -38,12 +38,18 @@
//#endregion
//#region Detect the user language
let lang = navigator.language;
let lang = null;
if (!LANGS.includes(lang)) lang = lang.split('-')[0];
if (LANGS.includes(navigator.language)) {
lang = navigator.language;
} else {
lang = LANGS.find(x => x.split('-')[0] == lang);
// The default language is English
if (!LANGS.includes(lang)) lang = 'en';
if (lang == null) {
// Fallback
lang = 'en-US';
}
}
if (settings) {
if (settings.device.lang) lang = settings.device.lang;