Add UI language switcher and ja/ko locales

Introduce a runtime UI language switcher and add Japanese/Korean locale support. Added _locales/ja and _locales/ko messages, updated en and zh_CN message files with new language-related keys and sendImage label. Implemented dynamic i18n handling: new i18n.js supports override messages, persistent uiLanguage in storage, and emits i18n:changed; background.js now loads override locales, updates context menu titles and listens for storage changes. Integrated dayjs locales (js/ja.js, js/ko.js) and made oper.js use a unified msg() helper and react to language changes. Added language selector UI in popup.html and styling in css/main.css.
This commit is contained in:
jonny
2026-03-05 21:03:07 +08:00
parent c8bdb918f3
commit e57a963170
11 changed files with 752 additions and 113 deletions
+17
View File
@@ -231,6 +231,23 @@ input.inputer{border-bottom: 1px solid #ccc;width:75%;}
right: 1rem;
top: 0.5rem;
}
.lang-switcher{
position: absolute;
right: 3.5rem;
top: .55rem;
}
.lang-select{
border: 1px solid rgb(229,231,235);
border-radius: .25rem;
background-color: rgb(255,255,255);
color: #666;
font-size: .75rem;
line-height: 1.25rem;
padding: .15rem .35rem;
cursor: pointer;
}
#blog_info{
}