From 850bb495d09503f28d0694eb645ebd2da349516f Mon Sep 17 00:00:00 2001 From: zombieFox Date: Fri, 14 Jun 2024 09:51:21 +0100 Subject: [PATCH] set fallback language for local dev --- src/component/message/index.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/component/message/index.js b/src/component/message/index.js index aa81b4e4..bcb6476c 100644 --- a/src/component/message/index.js +++ b/src/component/message/index.js @@ -4,7 +4,7 @@ import { browserDetect } from '../browserDetect'; // import { default as bn } from '../../locale/bn/messages.json'; // import { default as de } from '../../locale/de/messages.json'; -// import { default as en_GB } from '../../locale/en_GB/messages.json'; +import { default as en_GB } from '../../locale/en_GB/messages.json'; // import { default as en_US } from '../../locale/en_US/messages.json'; // import { default as es } from '../../locale/es/messages.json'; // import { default as fil } from '../../locale/fil/messages.json'; @@ -24,6 +24,7 @@ const message = {}; message.language = { // pack: { bn, de, en_GB, en_US, es, fil, fr, gu, hi, id, it, ja, ms, pt, ru, uk, vi } + pack: { en_GB } }; // message.language.list = () => { @@ -82,6 +83,10 @@ message.get = (stringId) => { string = chrome.i18n.getMessage(stringId); + } else { + + string = message.language.pack.en_GB[stringId].message; + } } else if (browserDetect().firefox && typeof browser != 'undefined') { @@ -92,6 +97,10 @@ message.get = (stringId) => { string = browser.i18n.getMessage(stringId); + } else { + + string = message.language.pack.en_GB[stringId].message; + } } else {