From 9de20bdd280420761442324a48add05a0e54698b Mon Sep 17 00:00:00 2001 From: sienori Date: Sat, 5 Mar 2022 14:40:45 +0900 Subject: [PATCH] Fix manifest not loading in Chrome --- src/_locales/en/messages.json | 12 ++++++------ src/common/generateLangOptions.js | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/_locales/en/messages.json b/src/_locales/en/messages.json index 48de494..6a27b57 100644 --- a/src/_locales/en/messages.json +++ b/src/_locales/en/messages.json @@ -482,10 +482,10 @@ "lang_ny": { "message": "Chewa" }, - "lang_zh-CN": { + "lang_zh_CN": { "message": "Chinese (Simplified)" }, - "lang_zh-TW": { + "lang_zh_TW": { "message": "Chinese (Traditional)" }, "lang_co": { @@ -767,16 +767,16 @@ "lang_zu": { "message": "Zulu" }, - "lang_en-US": { + "lang_en_US": { "message": "English (American)" }, - "lang_en-GB": { + "lang_en_GB": { "message": "English (British)" }, - "lang_pt-PT": { + "lang_pt_PT": { "message": "Portuguese" }, - "lang_pt-BR": { + "lang_pt_BR": { "message": "Portuguese (Brazilian)" }, "lang_zh": { diff --git a/src/common/generateLangOptions.js b/src/common/generateLangOptions.js index ddfdc22..d2c00e1 100644 --- a/src/common/generateLangOptions.js +++ b/src/common/generateLangOptions.js @@ -8,7 +8,7 @@ export default (translationApi) => { const langList = translationApi === "google" ? langListGoogle : langListDeepl; const langOptions = langList.map(lang => ({ value: lang, - name: browser.i18n.getMessage("lang_" + lang) + name: browser.i18n.getMessage("lang_" + lang.replace("-", "_")) })); langOptions.sort(alphabeticallySort); return langOptions;