mirror of
https://github.com/Jonnyan404/memos-bber.git
synced 2026-04-25 03:58:37 +09:00
Add German, French, and Spanish localization
Add DE/FR/ES support across Chrome, Edge and Firefox builds: new _locales message files for de, fr, es. Include dayjs locale bundles (de.js, fr.js, es.js) and load them in popup.html. Update i18n.js to register new languages and labels, update oper.js to apply the corresponding dayjs locale (including auto-detection), add language buttons to the popup UI, bump manifest version, and record the change in change.log.
This commit is contained in:
+7
-1
@@ -1,6 +1,6 @@
|
||||
const UI_LANGUAGE_STORAGE_KEY = 'uiLanguage'
|
||||
|
||||
const SUPPORTED_UI_LANGUAGES = new Set(['auto', 'en', 'zh_CN', 'ja', 'ko'])
|
||||
const SUPPORTED_UI_LANGUAGES = new Set(['auto', 'en', 'de', 'fr', 'es', 'zh_CN', 'ja', 'ko'])
|
||||
|
||||
function normalizeUiLanguage(value) {
|
||||
const lang = String(value || 'auto')
|
||||
@@ -49,6 +49,9 @@ let overrideMessages = null
|
||||
|
||||
function getLanguageToggleLabel(lang) {
|
||||
if (lang === 'en') return 'EN'
|
||||
if (lang === 'de') return 'DE'
|
||||
if (lang === 'fr') return 'FR'
|
||||
if (lang === 'es') return 'ES'
|
||||
if (lang === 'zh_CN') return '中'
|
||||
if (lang === 'ja') return '日'
|
||||
if (lang === 'ko') return '한'
|
||||
@@ -132,6 +135,9 @@ function applyStaticI18n() {
|
||||
// Language switcher
|
||||
setText('langOptionAuto', 'langAuto')
|
||||
setText('langOptionEn', 'langEnglish')
|
||||
setText('langOptionDe', 'langGerman')
|
||||
setText('langOptionFr', 'langFrench')
|
||||
setText('langOptionEs', 'langSpanish')
|
||||
setText('langOptionZhCN', 'langChineseSimplified')
|
||||
setText('langOptionJa', 'langJapanese')
|
||||
setText('langOptionKo', 'langKorean')
|
||||
|
||||
Reference in New Issue
Block a user