From 70003269e53059e1d7970b27e30a221bccc50368 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Acid=20Chicken=20=28=E7=A1=AB=E9=85=B8=E9=B6=8F=29?= Date: Wed, 22 Aug 2018 01:48:08 +0900 Subject: [PATCH 1/4] Update boot.js --- src/client/app/boot.js | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/client/app/boot.js b/src/client/app/boot.js index 218d57d8e..b15046c22 100644 --- a/src/client/app/boot.js +++ b/src/client/app/boot.js @@ -32,13 +32,15 @@ //#region Detect app name let app = null; - if (url.pathname == '/docs' || url.pathname.startsWith('/docs/')) app = 'docs'; - if (url.pathname == '/dev' || url.pathname.startsWith('/dev/')) app = 'dev'; - if (url.pathname == '/auth' || url.pathname.startsWith('/auth/')) app = 'auth'; + if (`${url.pathname}/`.startsWith('/docs/')) app = 'docs'; + if (`${url.pathname}/`.startsWith('/dev/')) app = 'dev'; + if (`${url.pathname}/`.startsWith('/auth/')) app = 'auth'; //#endregion //#region Detect the user language - let lang = navigator.language.split('-')[0]; + let lang = navigator.language; + + if (!LANGS.includes(lang)) lang = lang.split('-')[0]; // The default language is English if (!LANGS.includes(lang)) lang = 'en'; @@ -104,7 +106,7 @@ // グローバルにタイマーIDを代入しておく window.mkBootTimer = window.setTimeout(async () => { // Fetch meta - const res = await fetch('/api/meta', { + const res = await fetch(API + '/meta', { method: 'POST', cache: 'no-cache' }); From f33701233c03362fa9baecdf32da1a34df0634a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Acid=20Chicken=20=28=E7=A1=AB=E9=85=B8=E9=B6=8F=29?= Date: Wed, 22 Aug 2018 01:50:13 +0900 Subject: [PATCH 2/4] Update boot.js --- src/client/app/boot.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/client/app/boot.js b/src/client/app/boot.js index b15046c22..952881f6c 100644 --- a/src/client/app/boot.js +++ b/src/client/app/boot.js @@ -106,7 +106,7 @@ // グローバルにタイマーIDを代入しておく window.mkBootTimer = window.setTimeout(async () => { // Fetch meta - const res = await fetch(API + '/meta', { + const res = await fetch('/api/meta', { method: 'POST', cache: 'no-cache' }); From d702f6e090d1ddbb1dc82e386381458f20e5b4c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Acid=20Chicken=20=28=E7=A1=AB=E9=85=B8=E9=B6=8F=29?= Date: Wed, 22 Aug 2018 01:51:42 +0900 Subject: [PATCH 3/4] Rename ja-ks.yml to ja-KS.yml --- locales/{ja-ks.yml => ja-KS.yml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename locales/{ja-ks.yml => ja-KS.yml} (100%) diff --git a/locales/ja-ks.yml b/locales/ja-KS.yml similarity index 100% rename from locales/ja-ks.yml rename to locales/ja-KS.yml From 137741d307840fe0a609dfa74d1833e0a8c896df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Acid=20Chicken=20=28=E7=A1=AB=E9=85=B8=E9=B6=8F=29?= Date: Wed, 22 Aug 2018 01:52:13 +0900 Subject: [PATCH 4/4] Update index.js --- locales/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/locales/index.js b/locales/index.js index 0910749bb..ea0c10195 100644 --- a/locales/index.js +++ b/locales/index.js @@ -15,7 +15,7 @@ const langs = { 'en': loadLang('en'), 'fr': loadLang('fr'), 'ja': native, - 'ja-ks': loadLang('ja-ks'), + 'ja-KS': loadLang('ja-KS'), 'pl': loadLang('pl'), 'es': loadLang('es') };