diff --git a/.gitignore b/.gitignore index 8637dc0..8706e44 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,5 @@ -.idea node_modules Chrome-Charset.zip -Gruntfile.js +pack.js package.json +yarn.lock diff --git a/README.md b/README.md index 0993d0b..555ce3d 100644 --- a/README.md +++ b/README.md @@ -20,6 +20,16 @@ A Google Chrome extension used to modify the page default encoding for Google Ch [Google Chrome Web Store](https://chrome.google.com/webstore/detail/oenllhgkiiljibhfagbfogdbchhdchml) ## History +### v0.5.0(2019/3/15) +1. 【重构】将编码探测脚本改为按需执行 +2. 【重构】网络请求事件改为按需注册,并在扩展程序不需要工作时卸载 +3. 【i18n】新增多个国家语言的翻译,并针对部分 RTL 语种优化页面布局 +4. 【i18n】编码列表针对各个国家语言进行优化,以当前语言选择置顶的编码,编码列表排序以当前语言为准 +5. 【新增】记录并置顶最近使用的三个编码 +6. 【新增】支持设置默认编码,对所有页面生效(GitHub Issue:[#8](https://github.com/jinliming2/Chrome-Charset/issues/8)) +7. 【新增】配置选项页面 +8. 【样式】重新设计 popup 弹窗页面样式 + ### v0.4.3(2019/1/5) 1. 【修复】由于 Chrome 72(也许更早)开始支持 Network Service,导致编码修改失败的问题 diff --git a/_locales/ar/messages.json b/_locales/ar/messages.json new file mode 100644 index 0000000..e5543f9 --- /dev/null +++ b/_locales/ar/messages.json @@ -0,0 +1,68 @@ +{ + "staticEncodingList": { + "message": "Windows-1256,ISO-8859-6" + }, + "tipCurrent": { + "message": "الصفحه الحاليه" + }, + "default": { + "message": "الافتراضي" + }, + "encodingUnicode": { + "message": "يونيكود" + }, + "encodingWestern": { + "message": "غربيّ" + }, + "encodingChineseSimplified": { + "message": "الصينيّة المبسّطة" + }, + "encodingChineseTraditional": { + "message": "الصينيّة التقليديّة" + }, + "encodingKorean": { + "message": "الكورية" + }, + "encodingJapanese": { + "message": "اليابانية" + }, + "encodingThai": { + "message": "التايلاندية" + }, + "encodingCentralEuropean": { + "message": "وسط أوروبا" + }, + "encodingCyrillic": { + "message": "السيريليّة" + }, + "encodingGreek": { + "message": "اليونانية" + }, + "encodingBaltic": { + "message": "البلطيقيّة" + }, + "encodingSouthEuropean": { + "message": "جنوب أوروبا" + }, + "encodingNordic": { + "message": "الإسكندنافيّة" + }, + "encodingCeltic": { + "message": "السلتيّة" + }, + "encodingRomanian": { + "message": "الرومانية" + }, + "encodingTurkish": { + "message": "التركية" + }, + "encodingArabic": { + "message": "العربية" + }, + "encodingHebrew": { + "message": "العبرية" + }, + "encodingVietnamese": { + "message": "الفيتنامية" + } +} diff --git a/_locales/bg/messages.json b/_locales/bg/messages.json new file mode 100644 index 0000000..5648cb5 --- /dev/null +++ b/_locales/bg/messages.json @@ -0,0 +1,68 @@ +{ + "staticEncodingList": { + "message": "Windows-1251,KOI8-R,ISO-8859-5" + }, + "tipCurrent": { + "message": "Текуща страница" + }, + "default": { + "message": "По подразбиране" + }, + "encodingUnicode": { + "message": "Unicode" + }, + "encodingWestern": { + "message": "Западна Европа" + }, + "encodingChineseSimplified": { + "message": "Опростен китайски" + }, + "encodingChineseTraditional": { + "message": "Традиционен китайски" + }, + "encodingKorean": { + "message": "корейски" + }, + "encodingJapanese": { + "message": "японски" + }, + "encodingThai": { + "message": "тайландски" + }, + "encodingCentralEuropean": { + "message": "Централна Европа" + }, + "encodingCyrillic": { + "message": "Кирилица" + }, + "encodingGreek": { + "message": "гръцки" + }, + "encodingBaltic": { + "message": "Балтийски" + }, + "encodingSouthEuropean": { + "message": "Южна Европа" + }, + "encodingNordic": { + "message": "Скандинавски" + }, + "encodingCeltic": { + "message": "Келтски" + }, + "encodingRomanian": { + "message": "румънски" + }, + "encodingTurkish": { + "message": "турски" + }, + "encodingArabic": { + "message": "арабски" + }, + "encodingHebrew": { + "message": "иврит" + }, + "encodingVietnamese": { + "message": "виетнамски" + } +} diff --git a/_locales/bn/messages.json b/_locales/bn/messages.json new file mode 100644 index 0000000..d0e7372 --- /dev/null +++ b/_locales/bn/messages.json @@ -0,0 +1,68 @@ +{ + "staticEncodingList": { + "message": "Windows-1252" + }, + "tipCurrent": { + "message": "এই পৃষ্ঠা" + }, + "default": { + "message": "ডিফল্ট" + }, + "encodingUnicode": { + "message": "ইউনিকোড" + }, + "encodingWestern": { + "message": "পশ্চিমী" + }, + "encodingChineseSimplified": { + "message": "চিনা সরলীকৃত" + }, + "encodingChineseTraditional": { + "message": "চিনা ঐতিহ্যশালী" + }, + "encodingKorean": { + "message": "কোরীয়" + }, + "encodingJapanese": { + "message": "জাপানী" + }, + "encodingThai": { + "message": "থাই" + }, + "encodingCentralEuropean": { + "message": "মধ্য ইউরোপীয়" + }, + "encodingCyrillic": { + "message": "সিরিলিক" + }, + "encodingGreek": { + "message": "গ্রীক" + }, + "encodingBaltic": { + "message": "বাল্টিক" + }, + "encodingSouthEuropean": { + "message": "দক্ষিণ ইউরোপীয়" + }, + "encodingNordic": { + "message": "নরডিক" + }, + "encodingCeltic": { + "message": "কেলটিক" + }, + "encodingRomanian": { + "message": "রোমানিয়" + }, + "encodingTurkish": { + "message": "তুর্কি" + }, + "encodingArabic": { + "message": "আরবি" + }, + "encodingHebrew": { + "message": "হিব্রু" + }, + "encodingVietnamese": { + "message": "ভিয়েতনামি" + } +} diff --git a/_locales/ca/messages.json b/_locales/ca/messages.json new file mode 100644 index 0000000..d0d1b7a --- /dev/null +++ b/_locales/ca/messages.json @@ -0,0 +1,68 @@ +{ + "staticEncodingList": { + "message": "Windows-1252" + }, + "tipCurrent": { + "message": "Pàgina actual" + }, + "default": { + "message": "Predeterminat" + }, + "encodingUnicode": { + "message": "Unicode" + }, + "encodingWestern": { + "message": "Occidental" + }, + "encodingChineseSimplified": { + "message": "Xinès simplificat" + }, + "encodingChineseTraditional": { + "message": "Xinès tradicional" + }, + "encodingKorean": { + "message": "Coreà" + }, + "encodingJapanese": { + "message": "Japonès" + }, + "encodingThai": { + "message": "Tailandès" + }, + "encodingCentralEuropean": { + "message": "Europa central" + }, + "encodingCyrillic": { + "message": "Ciríl·lic" + }, + "encodingGreek": { + "message": "Grec" + }, + "encodingBaltic": { + "message": "Bàltic" + }, + "encodingSouthEuropean": { + "message": "Europa meridional" + }, + "encodingNordic": { + "message": "Nòrdic" + }, + "encodingCeltic": { + "message": "Cèltic" + }, + "encodingRomanian": { + "message": "Romanès" + }, + "encodingTurkish": { + "message": "Turc" + }, + "encodingArabic": { + "message": "Àrab" + }, + "encodingHebrew": { + "message": "Hebreu" + }, + "encodingVietnamese": { + "message": "Vietnamita" + } +} diff --git a/_locales/cs/messages.json b/_locales/cs/messages.json new file mode 100644 index 0000000..086d92a --- /dev/null +++ b/_locales/cs/messages.json @@ -0,0 +1,68 @@ +{ + "staticEncodingList": { + "message": "ISO-8859-2,Windows-1250" + }, + "tipCurrent": { + "message": "Aktuální stránka" + }, + "default": { + "message": "Výchozí" + }, + "encodingUnicode": { + "message": "Unicode" + }, + "encodingWestern": { + "message": "Západní jazyky" + }, + "encodingChineseSimplified": { + "message": "Zjednodušená čínština" + }, + "encodingChineseTraditional": { + "message": "Tradiční čínština" + }, + "encodingKorean": { + "message": "korejština" + }, + "encodingJapanese": { + "message": "japonština" + }, + "encodingThai": { + "message": "thajština" + }, + "encodingCentralEuropean": { + "message": "Středoevropské jazyky" + }, + "encodingCyrillic": { + "message": "Cyrilice" + }, + "encodingGreek": { + "message": "řečtina" + }, + "encodingBaltic": { + "message": "Baltské jazyky" + }, + "encodingSouthEuropean": { + "message": "Jihoevropské jazyky" + }, + "encodingNordic": { + "message": "Severské jazyky" + }, + "encodingCeltic": { + "message": "Keltské jazyky" + }, + "encodingRomanian": { + "message": "rumunština" + }, + "encodingTurkish": { + "message": "turečtina" + }, + "encodingArabic": { + "message": "arabština" + }, + "encodingHebrew": { + "message": "hebrejština" + }, + "encodingVietnamese": { + "message": "vietnamština" + } +} diff --git a/_locales/da/messages.json b/_locales/da/messages.json new file mode 100644 index 0000000..1d99ea9 --- /dev/null +++ b/_locales/da/messages.json @@ -0,0 +1,68 @@ +{ + "staticEncodingList": { + "message": "Windows-1252" + }, + "tipCurrent": { + "message": "Nuværende side" + }, + "default": { + "message": "Standard" + }, + "encodingUnicode": { + "message": "Unicode" + }, + "encodingWestern": { + "message": "Vestlig" + }, + "encodingChineseSimplified": { + "message": "Kinesisk, forenklet" + }, + "encodingChineseTraditional": { + "message": "Kinesisk, traditionelt" + }, + "encodingKorean": { + "message": "Koreansk" + }, + "encodingJapanese": { + "message": "Japansk" + }, + "encodingThai": { + "message": "Thailandsk" + }, + "encodingCentralEuropean": { + "message": "Centraleuropæisk" + }, + "encodingCyrillic": { + "message": "Kyrillisk" + }, + "encodingGreek": { + "message": "Græsk" + }, + "encodingBaltic": { + "message": "Baltisk" + }, + "encodingSouthEuropean": { + "message": "Sydeuropæisk" + }, + "encodingNordic": { + "message": "Nordisk" + }, + "encodingCeltic": { + "message": "Keltisk" + }, + "encodingRomanian": { + "message": "Rumænsk" + }, + "encodingTurkish": { + "message": "Tyrkisk" + }, + "encodingArabic": { + "message": "Arabisk" + }, + "encodingHebrew": { + "message": "Hebræisk" + }, + "encodingVietnamese": { + "message": "Vietnamesisk" + } +} diff --git a/_locales/de/messages.json b/_locales/de/messages.json new file mode 100644 index 0000000..4fc6c9b --- /dev/null +++ b/_locales/de/messages.json @@ -0,0 +1,68 @@ +{ + "staticEncodingList": { + "message": "Windows-1252" + }, + "tipCurrent": { + "message": "Aktuelle Seite" + }, + "default": { + "message": "Standardeinstellung" + }, + "encodingUnicode": { + "message": "Unicode" + }, + "encodingWestern": { + "message": "Westeuropäisch" + }, + "encodingChineseSimplified": { + "message": "Chinesisch (vereinfacht)" + }, + "encodingChineseTraditional": { + "message": "Chinesisch (traditionell)" + }, + "encodingKorean": { + "message": "Koreanisch" + }, + "encodingJapanese": { + "message": "Japanisch" + }, + "encodingThai": { + "message": "Thailändisch" + }, + "encodingCentralEuropean": { + "message": "Mitteleuropäisch" + }, + "encodingCyrillic": { + "message": "Kyrillisch" + }, + "encodingGreek": { + "message": "Griechisch" + }, + "encodingBaltic": { + "message": "Baltisch" + }, + "encodingSouthEuropean": { + "message": "Südeuropäisch" + }, + "encodingNordic": { + "message": "Nordisch" + }, + "encodingCeltic": { + "message": "Keltisch" + }, + "encodingRomanian": { + "message": "Rumänisch" + }, + "encodingTurkish": { + "message": "Türkisch" + }, + "encodingArabic": { + "message": "Arabisch" + }, + "encodingHebrew": { + "message": "Hebräisch" + }, + "encodingVietnamese": { + "message": "Vietnamesisch" + } +} diff --git a/_locales/el/messages.json b/_locales/el/messages.json new file mode 100644 index 0000000..fbc8485 --- /dev/null +++ b/_locales/el/messages.json @@ -0,0 +1,68 @@ +{ + "staticEncodingList": { + "message": "ISO-8859-7,Windows-1253" + }, + "tipCurrent": { + "message": "Τρέχουσα σελίδα" + }, + "default": { + "message": "Προεπιλογή" + }, + "encodingUnicode": { + "message": "Unicode" + }, + "encodingWestern": { + "message": "Δυτική" + }, + "encodingChineseSimplified": { + "message": "Απλοποιημένα Κινεζικά" + }, + "encodingChineseTraditional": { + "message": "Παραδοσιακά Κινεζικά" + }, + "encodingKorean": { + "message": "Κορεατικά" + }, + "encodingJapanese": { + "message": "Ιαπωνικά" + }, + "encodingThai": { + "message": "Ταϊλανδικά" + }, + "encodingCentralEuropean": { + "message": "Κεντρική Ευρώπη" + }, + "encodingCyrillic": { + "message": "Κυριλλικά" + }, + "encodingGreek": { + "message": "Ελληνικά" + }, + "encodingBaltic": { + "message": "Βαλτική" + }, + "encodingSouthEuropean": { + "message": "Νότια Ευρώπη" + }, + "encodingNordic": { + "message": "Σκανδιναβική" + }, + "encodingCeltic": { + "message": "Κελτικά" + }, + "encodingRomanian": { + "message": "Ρουμανικά" + }, + "encodingTurkish": { + "message": "Τουρκικά" + }, + "encodingArabic": { + "message": "Αραβικά" + }, + "encodingHebrew": { + "message": "Εβραϊκά" + }, + "encodingVietnamese": { + "message": "Βιετναμέζικα" + } +} diff --git a/_locales/en/messages.json b/_locales/en/messages.json index b1b552e..7883887 100644 --- a/_locales/en/messages.json +++ b/_locales/en/messages.json @@ -1,83 +1,108 @@ { - "appName": { - "message": "Charset", - "description": "Extension: Name" - }, - "appShortName": { - "message": "Charset", - "description": "Extension: Short Name" - }, - "appDescription": { - "message": "Modify the default encoding for the website", - "description": "Extension: Short Name" - }, - "cannotLoadLocalFile": { - "message": "Charset extension cannot load file:// protocol files!\nPlease check the \"Allow access to file URLs\" option in Chrome menu > More tools > Extensions." - }, - "btnReset": { - "message": "Reset", - "description": "Reset default charset" - }, - "tipCurrent": { - "message": "Current: ", - "description": "The encoding used for the current page" - }, - "settingMenu": { - "message": "ContextMenu: ", - "description": "Show Menu or Not" - }, - "default": { - "message": "Default" - }, - "Chinese": { - "message": "Chinese" - }, - "Arabic": { - "message": "Arabic" - }, - "Baltic": { - "message": "Baltic" - }, - "Celtic": { - "message": "Celtic" - }, - "CentralEuropean": { - "message": "Central European" - }, - "Cyrillic": { - "message": "Cyrillic" - }, - "Greek": { - "message": "Greek" - }, - "Hebrew": { - "message": "Hebrew" - }, - "Japanese": { - "message": "Japanese" - }, - "Korean": { - "message": "Korean" - }, - "Nordic": { - "message": "Nordic" - }, - "Romanian": { - "message": "Romanian" - }, - "SouthEuropean": { - "message": "South European" - }, - "Thai": { - "message": "Thai" - }, - "Turkish": { - "message": "Turkish" - }, - "Vietnamese": { - "message": "Vietnamese" - }, - "Western": { - "message": "Western" - } + "appName": { + "message": "Charset", + "description": "Extension: Name" + }, + "appShortName": { + "message": "Charset", + "description": "Extension: Short Name" + }, + "appDescription": { + "message": "Modify the default encoding for the website", + "description": "Extension: Description" + }, + "staticEncodingList": { + "message": "Windows-1252", + "description": "Locale dependent static encoding list" + }, + "cannotLoadLocalFile": { + "message": "Charset extension cannot load file:// protocol files!\nPlease check the \"Allow access to file URLs\" option in Chrome menu > More tools > Extensions > Charset." + }, + "unknown": { + "message": "Unknown" + }, + "btnReset": { + "message": "Reset" + }, + "tipCurrent": { + "message": "Current Page" + }, + "defaultEncodingEnabled": { + "message": "Default Encoding: $1" + }, + "tipDisableDefaultEncoding": { + "message": "You can disable this on the Options page" + }, + "optionMenu": { + "message": "Context Menu" + }, + "optionDefaultEncoding": { + "message": "Default Encoding" + }, + "optionRecommendEncoding": { + "message": "Recommend" + }, + "optionOtherEncoding": { + "message": "Others" + }, + "default": { + "message": "Default" + }, + "encodingUnicode": { + "message": "Unicode" + }, + "encodingWestern": { + "message": "Western" + }, + "encodingChineseSimplified": { + "message": "Chinese Simplified" + }, + "encodingChineseTraditional": { + "message": "Chinese Traditional" + }, + "encodingKorean": { + "message": "Korean" + }, + "encodingJapanese": { + "message": "Japanese" + }, + "encodingThai": { + "message": "Thai" + }, + "encodingCentralEuropean": { + "message": "Central European" + }, + "encodingCyrillic": { + "message": "Cyrillic" + }, + "encodingGreek": { + "message": "Greek" + }, + "encodingBaltic": { + "message": "Baltic" + }, + "encodingSouthEuropean": { + "message": "South European" + }, + "encodingNordic": { + "message": "Nordic" + }, + "encodingCeltic": { + "message": "Celtic" + }, + "encodingRomanian": { + "message": "Romanian" + }, + "encodingTurkish": { + "message": "Turkish" + }, + "encodingArabic": { + "message": "Arabic" + }, + "encodingHebrew": { + "message": "Hebrew" + }, + "encodingVietnamese": { + "message": "Vietnamese" + } } diff --git a/_locales/es/messages.json b/_locales/es/messages.json new file mode 100644 index 0000000..45b36a6 --- /dev/null +++ b/_locales/es/messages.json @@ -0,0 +1,68 @@ +{ + "staticEncodingList": { + "message": "Windows-1252" + }, + "tipCurrent": { + "message": "Página actual" + }, + "default": { + "message": "Predeterminado" + }, + "encodingUnicode": { + "message": "Unicode" + }, + "encodingWestern": { + "message": "Europa Occidental" + }, + "encodingChineseSimplified": { + "message": "Chino simplificado" + }, + "encodingChineseTraditional": { + "message": "Chino tradicional" + }, + "encodingKorean": { + "message": "Coreano" + }, + "encodingJapanese": { + "message": "Japonés" + }, + "encodingThai": { + "message": "Tailandés" + }, + "encodingCentralEuropean": { + "message": "Europa Central" + }, + "encodingCyrillic": { + "message": "Cirílico" + }, + "encodingGreek": { + "message": "Griego" + }, + "encodingBaltic": { + "message": "Báltico" + }, + "encodingSouthEuropean": { + "message": "Sur de Europa" + }, + "encodingNordic": { + "message": "Nórdico" + }, + "encodingCeltic": { + "message": "Celta" + }, + "encodingRomanian": { + "message": "Rumano" + }, + "encodingTurkish": { + "message": "Turco" + }, + "encodingArabic": { + "message": "Árabe" + }, + "encodingHebrew": { + "message": "Hebreo" + }, + "encodingVietnamese": { + "message": "Vietnamita" + } +} diff --git a/_locales/es_419/messages.json b/_locales/es_419/messages.json new file mode 100644 index 0000000..45b36a6 --- /dev/null +++ b/_locales/es_419/messages.json @@ -0,0 +1,68 @@ +{ + "staticEncodingList": { + "message": "Windows-1252" + }, + "tipCurrent": { + "message": "Página actual" + }, + "default": { + "message": "Predeterminado" + }, + "encodingUnicode": { + "message": "Unicode" + }, + "encodingWestern": { + "message": "Europa Occidental" + }, + "encodingChineseSimplified": { + "message": "Chino simplificado" + }, + "encodingChineseTraditional": { + "message": "Chino tradicional" + }, + "encodingKorean": { + "message": "Coreano" + }, + "encodingJapanese": { + "message": "Japonés" + }, + "encodingThai": { + "message": "Tailandés" + }, + "encodingCentralEuropean": { + "message": "Europa Central" + }, + "encodingCyrillic": { + "message": "Cirílico" + }, + "encodingGreek": { + "message": "Griego" + }, + "encodingBaltic": { + "message": "Báltico" + }, + "encodingSouthEuropean": { + "message": "Sur de Europa" + }, + "encodingNordic": { + "message": "Nórdico" + }, + "encodingCeltic": { + "message": "Celta" + }, + "encodingRomanian": { + "message": "Rumano" + }, + "encodingTurkish": { + "message": "Turco" + }, + "encodingArabic": { + "message": "Árabe" + }, + "encodingHebrew": { + "message": "Hebreo" + }, + "encodingVietnamese": { + "message": "Vietnamita" + } +} diff --git a/_locales/et/messages.json b/_locales/et/messages.json new file mode 100644 index 0000000..80be923 --- /dev/null +++ b/_locales/et/messages.json @@ -0,0 +1,68 @@ +{ + "staticEncodingList": { + "message": "Windows-1257,ISO-8859-4,ISO-8859-13" + }, + "tipCurrent": { + "message": "Käesolev lehekülg" + }, + "default": { + "message": "Vaikimisi" + }, + "encodingUnicode": { + "message": "Unicode" + }, + "encodingWestern": { + "message": "Lääne" + }, + "encodingChineseSimplified": { + "message": "Hiina (lihtsustatud)" + }, + "encodingChineseTraditional": { + "message": "Hiina (traditsiooniline)" + }, + "encodingKorean": { + "message": "korea keel" + }, + "encodingJapanese": { + "message": "jaapani keel" + }, + "encodingThai": { + "message": "Tai" + }, + "encodingCentralEuropean": { + "message": "Kesk-Euroopa" + }, + "encodingCyrillic": { + "message": "Kirillits" + }, + "encodingGreek": { + "message": "kreeka keel" + }, + "encodingBaltic": { + "message": "Balti" + }, + "encodingSouthEuropean": { + "message": "Lõuna-Euroopa" + }, + "encodingNordic": { + "message": "Põhjamaade" + }, + "encodingCeltic": { + "message": "Keldi" + }, + "encodingRomanian": { + "message": "rumeenia keel" + }, + "encodingTurkish": { + "message": "türgi keel" + }, + "encodingArabic": { + "message": "araabia keel" + }, + "encodingHebrew": { + "message": "heebrea keel" + }, + "encodingVietnamese": { + "message": "vietnami keel" + } +} diff --git a/_locales/fi/messages.json b/_locales/fi/messages.json new file mode 100644 index 0000000..c5805da --- /dev/null +++ b/_locales/fi/messages.json @@ -0,0 +1,68 @@ +{ + "staticEncodingList": { + "message": "Windows-1252,ISO-8859-15" + }, + "tipCurrent": { + "message": "Nykyinen sivu" + }, + "default": { + "message": "Oletus" + }, + "encodingUnicode": { + "message": "unicode" + }, + "encodingWestern": { + "message": "länsimainen" + }, + "encodingChineseSimplified": { + "message": "yksinkertaistettu kiina" + }, + "encodingChineseTraditional": { + "message": "perinteinen kiina" + }, + "encodingKorean": { + "message": "korea" + }, + "encodingJapanese": { + "message": "japani" + }, + "encodingThai": { + "message": "thai" + }, + "encodingCentralEuropean": { + "message": "keskieurooppalainen" + }, + "encodingCyrillic": { + "message": "kyrillinen" + }, + "encodingGreek": { + "message": "kreikka" + }, + "encodingBaltic": { + "message": "baltialainen" + }, + "encodingSouthEuropean": { + "message": "eteläeurooppalainen" + }, + "encodingNordic": { + "message": "pohjoismainen" + }, + "encodingCeltic": { + "message": "kelttiläinen" + }, + "encodingRomanian": { + "message": "romania" + }, + "encodingTurkish": { + "message": "turkki" + }, + "encodingArabic": { + "message": "arabia" + }, + "encodingHebrew": { + "message": "heprea" + }, + "encodingVietnamese": { + "message": "vietnam" + } +} diff --git a/_locales/fil/messages.json b/_locales/fil/messages.json new file mode 100644 index 0000000..cdd4cac --- /dev/null +++ b/_locales/fil/messages.json @@ -0,0 +1,68 @@ +{ + "staticEncodingList": { + "message": "Windows-1252" + }, + "tipCurrent": { + "message": "Kasalukuyang pahina" + }, + "default": { + "message": "Default" + }, + "encodingUnicode": { + "message": "Unicode" + }, + "encodingWestern": { + "message": "Western" + }, + "encodingChineseSimplified": { + "message": "Tsino Pinapayak" + }, + "encodingChineseTraditional": { + "message": "Tsino Tradisyunal" + }, + "encodingKorean": { + "message": "Korean" + }, + "encodingJapanese": { + "message": "Japanese" + }, + "encodingThai": { + "message": "Thai" + }, + "encodingCentralEuropean": { + "message": "Central European" + }, + "encodingCyrillic": { + "message": "Cyrillic" + }, + "encodingGreek": { + "message": "Greko" + }, + "encodingBaltic": { + "message": "Baltic" + }, + "encodingSouthEuropean": { + "message": "South European" + }, + "encodingNordic": { + "message": "Nordic" + }, + "encodingCeltic": { + "message": "Celtic" + }, + "encodingRomanian": { + "message": "Romanian" + }, + "encodingTurkish": { + "message": "Turkish" + }, + "encodingArabic": { + "message": "Arabic" + }, + "encodingHebrew": { + "message": "Hebrew" + }, + "encodingVietnamese": { + "message": "Vietnamese" + } +} diff --git a/_locales/fr/messages.json b/_locales/fr/messages.json new file mode 100644 index 0000000..b96247e --- /dev/null +++ b/_locales/fr/messages.json @@ -0,0 +1,68 @@ +{ + "staticEncodingList": { + "message": "Windows-1252,ISO-8859-15" + }, + "tipCurrent": { + "message": "Page actuelle" + }, + "default": { + "message": "Par défaut" + }, + "encodingUnicode": { + "message": "Unicode" + }, + "encodingWestern": { + "message": "Occident" + }, + "encodingChineseSimplified": { + "message": "Chinois simplifié" + }, + "encodingChineseTraditional": { + "message": "Chinois traditionnel" + }, + "encodingKorean": { + "message": "Coréen" + }, + "encodingJapanese": { + "message": "Japonais" + }, + "encodingThai": { + "message": "Thaï" + }, + "encodingCentralEuropean": { + "message": "Europe centrale" + }, + "encodingCyrillic": { + "message": "Cyrillique" + }, + "encodingGreek": { + "message": "Grec" + }, + "encodingBaltic": { + "message": "Langues baltes" + }, + "encodingSouthEuropean": { + "message": "Europe du Sud" + }, + "encodingNordic": { + "message": "Nordique" + }, + "encodingCeltic": { + "message": "Celtique" + }, + "encodingRomanian": { + "message": "Roumain" + }, + "encodingTurkish": { + "message": "Turc" + }, + "encodingArabic": { + "message": "Arabe" + }, + "encodingHebrew": { + "message": "Hébreu" + }, + "encodingVietnamese": { + "message": "Vietnamien" + } +} diff --git a/_locales/gu/messages.json b/_locales/gu/messages.json new file mode 100644 index 0000000..ba46a27 --- /dev/null +++ b/_locales/gu/messages.json @@ -0,0 +1,68 @@ +{ + "staticEncodingList": { + "message": "Windows-1252" + }, + "tipCurrent": { + "message": "વર્તમાન પાનું" + }, + "default": { + "message": "ડિફૉલ્ટ" + }, + "encodingUnicode": { + "message": "યુનિકોડ" + }, + "encodingWestern": { + "message": "પશ્ચિમી" + }, + "encodingChineseSimplified": { + "message": "સરળ બનાવેલ ચાઇનીઝ" + }, + "encodingChineseTraditional": { + "message": "પરંપરાગત ચાઇનીઝ" + }, + "encodingKorean": { + "message": "કોરિયન" + }, + "encodingJapanese": { + "message": "જાપાનીઝ" + }, + "encodingThai": { + "message": "થાઈ" + }, + "encodingCentralEuropean": { + "message": "મધ્ય યુરોપિયન" + }, + "encodingCyrillic": { + "message": "સિરિલિક" + }, + "encodingGreek": { + "message": "ગ્રીક" + }, + "encodingBaltic": { + "message": "બાલ્ટિક" + }, + "encodingSouthEuropean": { + "message": "દક્ષિણ યુરોપિયન" + }, + "encodingNordic": { + "message": "નોર્ડિક" + }, + "encodingCeltic": { + "message": "સેલ્ટિક" + }, + "encodingRomanian": { + "message": "રોમાનિયન" + }, + "encodingTurkish": { + "message": "ટર્કીશ" + }, + "encodingArabic": { + "message": "અરબી" + }, + "encodingHebrew": { + "message": "હીબ્રુ" + }, + "encodingVietnamese": { + "message": "વિયેતનામીસ" + } +} diff --git a/_locales/he/messages.json b/_locales/he/messages.json new file mode 100644 index 0000000..dedbf5e --- /dev/null +++ b/_locales/he/messages.json @@ -0,0 +1,68 @@ +{ + "staticEncodingList": { + "message": "Windows-1255,ISO-8859-8-I,ISO-8859-8" + }, + "tipCurrent": { + "message": "העמוד הנוכחי" + }, + "default": { + "message": "ברירת מחדל" + }, + "encodingUnicode": { + "message": "Unicode" + }, + "encodingWestern": { + "message": "מערב אירופאית" + }, + "encodingChineseSimplified": { + "message": "סינית פשוטה" + }, + "encodingChineseTraditional": { + "message": "סינית מסורתית" + }, + "encodingKorean": { + "message": "קוריאנית" + }, + "encodingJapanese": { + "message": "יפנית" + }, + "encodingThai": { + "message": "תאי" + }, + "encodingCentralEuropean": { + "message": "מרכז אירופאית" + }, + "encodingCyrillic": { + "message": "קירילית" + }, + "encodingGreek": { + "message": "יוונית" + }, + "encodingBaltic": { + "message": "בלטית" + }, + "encodingSouthEuropean": { + "message": "דרום אירופאית" + }, + "encodingNordic": { + "message": "נורדית" + }, + "encodingCeltic": { + "message": "קלטית" + }, + "encodingRomanian": { + "message": "רומנית" + }, + "encodingTurkish": { + "message": "טורקית" + }, + "encodingArabic": { + "message": "ערבית" + }, + "encodingHebrew": { + "message": "עברית" + }, + "encodingVietnamese": { + "message": "וייטנמית" + } +} diff --git a/_locales/hi/messages.json b/_locales/hi/messages.json new file mode 100644 index 0000000..f83c8a6 --- /dev/null +++ b/_locales/hi/messages.json @@ -0,0 +1,68 @@ +{ + "staticEncodingList": { + "message": "Windows-1252" + }, + "tipCurrent": { + "message": "वर्तमान पृष्ठ" + }, + "default": { + "message": "सामान्य" + }, + "encodingUnicode": { + "message": "यूनिकोड" + }, + "encodingWestern": { + "message": "Western" + }, + "encodingChineseSimplified": { + "message": "चीनी सरलीकृत" + }, + "encodingChineseTraditional": { + "message": "परम्परागत चीनी" + }, + "encodingKorean": { + "message": "कोरियाई" + }, + "encodingJapanese": { + "message": "जापानी" + }, + "encodingThai": { + "message": "थाई" + }, + "encodingCentralEuropean": { + "message": "मध्य यूरोपीय" + }, + "encodingCyrillic": { + "message": "सिरिलिक" + }, + "encodingGreek": { + "message": "ग्रीक" + }, + "encodingBaltic": { + "message": "Baltic" + }, + "encodingSouthEuropean": { + "message": "दक्षिण यूरोपीय" + }, + "encodingNordic": { + "message": "नोर्डिक" + }, + "encodingCeltic": { + "message": "सेल्टिक" + }, + "encodingRomanian": { + "message": "रोमानियाई" + }, + "encodingTurkish": { + "message": "तुर्की" + }, + "encodingArabic": { + "message": "अरबी" + }, + "encodingHebrew": { + "message": "हिब्रू" + }, + "encodingVietnamese": { + "message": "वियतनामी" + } +} diff --git a/_locales/hr/messages.json b/_locales/hr/messages.json new file mode 100644 index 0000000..160d865 --- /dev/null +++ b/_locales/hr/messages.json @@ -0,0 +1,68 @@ +{ + "staticEncodingList": { + "message": "ISO-8859-2,Windows-1250" + }, + "tipCurrent": { + "message": "Trenutna stranica" + }, + "default": { + "message": "Zadano" + }, + "encodingUnicode": { + "message": "Unicode" + }, + "encodingWestern": { + "message": "zapadni" + }, + "encodingChineseSimplified": { + "message": "kineski pojednostavljeni" + }, + "encodingChineseTraditional": { + "message": "kineski tradicionalni" + }, + "encodingKorean": { + "message": "Korejski" + }, + "encodingJapanese": { + "message": "Japanski" + }, + "encodingThai": { + "message": "Tajski" + }, + "encodingCentralEuropean": { + "message": "srednjeeuropski" + }, + "encodingCyrillic": { + "message": "ćirilica" + }, + "encodingGreek": { + "message": "Grčki" + }, + "encodingBaltic": { + "message": "baltički" + }, + "encodingSouthEuropean": { + "message": "južnoeuropski" + }, + "encodingNordic": { + "message": "nordijski" + }, + "encodingCeltic": { + "message": "keltski" + }, + "encodingRomanian": { + "message": "Rumunjski" + }, + "encodingTurkish": { + "message": "Turski" + }, + "encodingArabic": { + "message": "Arapski" + }, + "encodingHebrew": { + "message": "Hebrejski" + }, + "encodingVietnamese": { + "message": "Vijetnamski" + } +} diff --git a/_locales/hu/messages.json b/_locales/hu/messages.json new file mode 100644 index 0000000..1d9141b --- /dev/null +++ b/_locales/hu/messages.json @@ -0,0 +1,68 @@ +{ + "staticEncodingList": { + "message": "ISO-8859-2,Windows-1250" + }, + "tipCurrent": { + "message": "Aktuális oldal" + }, + "default": { + "message": "Alapértelmezett" + }, + "encodingUnicode": { + "message": "Unicode" + }, + "encodingWestern": { + "message": "Nyugat-európai" + }, + "encodingChineseSimplified": { + "message": "Kínai egyszerűsített" + }, + "encodingChineseTraditional": { + "message": "Kínai (hagyományos)" + }, + "encodingKorean": { + "message": "koreai" + }, + "encodingJapanese": { + "message": "japán" + }, + "encodingThai": { + "message": "thai" + }, + "encodingCentralEuropean": { + "message": "Közép-európai" + }, + "encodingCyrillic": { + "message": "Cirill" + }, + "encodingGreek": { + "message": "görög" + }, + "encodingBaltic": { + "message": "Balti" + }, + "encodingSouthEuropean": { + "message": "Dél-európai" + }, + "encodingNordic": { + "message": "Skandináv" + }, + "encodingCeltic": { + "message": "Kelta" + }, + "encodingRomanian": { + "message": "román" + }, + "encodingTurkish": { + "message": "török" + }, + "encodingArabic": { + "message": "arab" + }, + "encodingHebrew": { + "message": "héber" + }, + "encodingVietnamese": { + "message": "vietnámi" + } +} diff --git a/_locales/id/messages.json b/_locales/id/messages.json new file mode 100644 index 0000000..0a867dc --- /dev/null +++ b/_locales/id/messages.json @@ -0,0 +1,68 @@ +{ + "staticEncodingList": { + "message": "Windows-1252" + }, + "tipCurrent": { + "message": "Halaman saat ini" + }, + "default": { + "message": "Default" + }, + "encodingUnicode": { + "message": "Unicode" + }, + "encodingWestern": { + "message": "Barat" + }, + "encodingChineseSimplified": { + "message": "Cina Modern" + }, + "encodingChineseTraditional": { + "message": "Cina Tradisional" + }, + "encodingKorean": { + "message": "Korea" + }, + "encodingJapanese": { + "message": "Jepang" + }, + "encodingThai": { + "message": "Thai" + }, + "encodingCentralEuropean": { + "message": "Eropa Tengah" + }, + "encodingCyrillic": { + "message": "Cyrillic" + }, + "encodingGreek": { + "message": "Yunani" + }, + "encodingBaltic": { + "message": "Baltik" + }, + "encodingSouthEuropean": { + "message": "Eropa Selatan" + }, + "encodingNordic": { + "message": "Nordik" + }, + "encodingCeltic": { + "message": "Celtik" + }, + "encodingRomanian": { + "message": "Rumania" + }, + "encodingTurkish": { + "message": "Turki" + }, + "encodingArabic": { + "message": "Arab" + }, + "encodingHebrew": { + "message": "Ibrani" + }, + "encodingVietnamese": { + "message": "Vietnam" + } +} diff --git a/_locales/it/messages.json b/_locales/it/messages.json new file mode 100644 index 0000000..cfee21d --- /dev/null +++ b/_locales/it/messages.json @@ -0,0 +1,68 @@ +{ + "staticEncodingList": { + "message": "Windows-1252" + }, + "tipCurrent": { + "message": "Pagina corrente" + }, + "default": { + "message": "Predefinito" + }, + "encodingUnicode": { + "message": "Unicode" + }, + "encodingWestern": { + "message": "Europa occidentale" + }, + "encodingChineseSimplified": { + "message": "Cinese semplificato" + }, + "encodingChineseTraditional": { + "message": "Cinese tradizionale" + }, + "encodingKorean": { + "message": "Coreano" + }, + "encodingJapanese": { + "message": "Giapponese" + }, + "encodingThai": { + "message": "Tailandese" + }, + "encodingCentralEuropean": { + "message": "Europa centrale" + }, + "encodingCyrillic": { + "message": "Cirillico" + }, + "encodingGreek": { + "message": "Greco" + }, + "encodingBaltic": { + "message": "Baltico" + }, + "encodingSouthEuropean": { + "message": "Europa meridionale" + }, + "encodingNordic": { + "message": "Nordico" + }, + "encodingCeltic": { + "message": "Celtico" + }, + "encodingRomanian": { + "message": "Rumeno" + }, + "encodingTurkish": { + "message": "Turco" + }, + "encodingArabic": { + "message": "Arabo" + }, + "encodingHebrew": { + "message": "Ebraico" + }, + "encodingVietnamese": { + "message": "Vietnamita" + } +} diff --git a/_locales/ja/messages.json b/_locales/ja/messages.json new file mode 100644 index 0000000..8db1c33 --- /dev/null +++ b/_locales/ja/messages.json @@ -0,0 +1,68 @@ +{ + "staticEncodingList": { + "message": "Shift_JIS,EUC-JP,ISO-2022-JP" + }, + "tipCurrent": { + "message": "現在のページ" + }, + "default": { + "message": "既定" + }, + "encodingUnicode": { + "message": "Unicode" + }, + "encodingWestern": { + "message": "西欧" + }, + "encodingChineseSimplified": { + "message": "簡体中国語" + }, + "encodingChineseTraditional": { + "message": "繁体中国語" + }, + "encodingKorean": { + "message": "韓国語" + }, + "encodingJapanese": { + "message": "日本語" + }, + "encodingThai": { + "message": "タイ語" + }, + "encodingCentralEuropean": { + "message": "中欧" + }, + "encodingCyrillic": { + "message": "キリル文字" + }, + "encodingGreek": { + "message": "ギリシャ語" + }, + "encodingBaltic": { + "message": "バルト語" + }, + "encodingSouthEuropean": { + "message": "南欧" + }, + "encodingNordic": { + "message": "北欧" + }, + "encodingCeltic": { + "message": "ケルト語" + }, + "encodingRomanian": { + "message": "ルーマニア語" + }, + "encodingTurkish": { + "message": "トルコ語" + }, + "encodingArabic": { + "message": "アラビア語" + }, + "encodingHebrew": { + "message": "ヘブライ語" + }, + "encodingVietnamese": { + "message": "ベトナム語" + } +} diff --git a/_locales/kn/messages.json b/_locales/kn/messages.json new file mode 100644 index 0000000..52e93c3 --- /dev/null +++ b/_locales/kn/messages.json @@ -0,0 +1,68 @@ +{ + "staticEncodingList": { + "message": "Windows-1252" + }, + "tipCurrent": { + "message": "ಪ್ರಸ್ತುತ ಪುಟ" + }, + "default": { + "message": "ಡಿಫಾಲ್ಟ್" + }, + "encodingUnicode": { + "message": "ಯುನಿಕೋಡ್" + }, + "encodingWestern": { + "message": "ವೆಸ್ಟರ್ನ್" + }, + "encodingChineseSimplified": { + "message": "ಸರಳೀಕೃತ ಚೈನೀಸ್" + }, + "encodingChineseTraditional": { + "message": "ಸಾಂಪ್ರದಾಯಿಕ ಚೈನೀಸ್" + }, + "encodingKorean": { + "message": "ಕೊರಿಯನ್" + }, + "encodingJapanese": { + "message": "ಜಪಾನೀಸ್" + }, + "encodingThai": { + "message": "ಥಾಯ್" + }, + "encodingCentralEuropean": { + "message": "ಮಧ್ಯ ಯುರೋಪಿಯನ್" + }, + "encodingCyrillic": { + "message": "ಸಿರಿಲಿಕ್" + }, + "encodingGreek": { + "message": "ಗ್ರೀಕ್" + }, + "encodingBaltic": { + "message": "ಬಾಲ್ಟಿಕ್" + }, + "encodingSouthEuropean": { + "message": "ದಕ್ಷಿಣ ಯುರೋಪಿಯನ್" + }, + "encodingNordic": { + "message": "ನೋರ್ಡಿಕ್" + }, + "encodingCeltic": { + "message": "ಸೆಲ್ಟಿಕ್" + }, + "encodingRomanian": { + "message": "ರೊಮೇನಿಯನ್" + }, + "encodingTurkish": { + "message": "ಟರ್ಕಿಶ್" + }, + "encodingArabic": { + "message": "Arabic" + }, + "encodingHebrew": { + "message": "Hebrew" + }, + "encodingVietnamese": { + "message": "ವಿಯೇಟ್ನಾಮಿಸ್" + } +} diff --git a/_locales/ko/messages.json b/_locales/ko/messages.json new file mode 100644 index 0000000..59c8b32 --- /dev/null +++ b/_locales/ko/messages.json @@ -0,0 +1,68 @@ +{ + "staticEncodingList": { + "message": "" + }, + "tipCurrent": { + "message": "현재 페이지" + }, + "default": { + "message": "기본값" + }, + "encodingUnicode": { + "message": "유니코드" + }, + "encodingWestern": { + "message": "서유럽어" + }, + "encodingChineseSimplified": { + "message": "중국어 간체" + }, + "encodingChineseTraditional": { + "message": "중국어 번체" + }, + "encodingKorean": { + "message": "한국어" + }, + "encodingJapanese": { + "message": "일본어" + }, + "encodingThai": { + "message": "태국어" + }, + "encodingCentralEuropean": { + "message": "중부 유럽어" + }, + "encodingCyrillic": { + "message": "키릴 문자" + }, + "encodingGreek": { + "message": "그리스어" + }, + "encodingBaltic": { + "message": "발트어" + }, + "encodingSouthEuropean": { + "message": "남유럽어" + }, + "encodingNordic": { + "message": "북유럽어" + }, + "encodingCeltic": { + "message": "켈트어" + }, + "encodingRomanian": { + "message": "루마니아어" + }, + "encodingTurkish": { + "message": "터키어" + }, + "encodingArabic": { + "message": "아라비아어" + }, + "encodingHebrew": { + "message": "히브리어" + }, + "encodingVietnamese": { + "message": "베트남어" + } +} diff --git a/_locales/lt/messages.json b/_locales/lt/messages.json new file mode 100644 index 0000000..fbe8300 --- /dev/null +++ b/_locales/lt/messages.json @@ -0,0 +1,68 @@ +{ + "staticEncodingList": { + "message": "Windows-1257,ISO-8859-4,ISO-8859-13" + }, + "tipCurrent": { + "message": "Dabartinis puslapis" + }, + "default": { + "message": "Numatytasis" + }, + "encodingUnicode": { + "message": "Unikodas" + }, + "encodingWestern": { + "message": "Vakarų" + }, + "encodingChineseSimplified": { + "message": "Kinų supaprastintoji" + }, + "encodingChineseTraditional": { + "message": "Kinų tradicinė" + }, + "encodingKorean": { + "message": "Korėjiečių" + }, + "encodingJapanese": { + "message": "Japonų" + }, + "encodingThai": { + "message": "Tajų" + }, + "encodingCentralEuropean": { + "message": "Centrinės Europos" + }, + "encodingCyrillic": { + "message": "Kirilica" + }, + "encodingGreek": { + "message": "Graikų" + }, + "encodingBaltic": { + "message": "Baltijos šalių" + }, + "encodingSouthEuropean": { + "message": "Pietų Europos" + }, + "encodingNordic": { + "message": "Šiaurės šalių" + }, + "encodingCeltic": { + "message": "Keltų" + }, + "encodingRomanian": { + "message": "Rumunų" + }, + "encodingTurkish": { + "message": "Turkų" + }, + "encodingArabic": { + "message": "Arabų" + }, + "encodingHebrew": { + "message": "Hebrajų" + }, + "encodingVietnamese": { + "message": "Vietnamiečių" + } +} diff --git a/_locales/lv/messages.json b/_locales/lv/messages.json new file mode 100644 index 0000000..1030e1c --- /dev/null +++ b/_locales/lv/messages.json @@ -0,0 +1,68 @@ +{ + "staticEncodingList": { + "message": "Windows-1257,ISO-8859-4,ISO-8859-13" + }, + "tipCurrent": { + "message": "Pašreizējā lapa" + }, + "default": { + "message": "Noklusējums" + }, + "encodingUnicode": { + "message": "Unikoda" + }, + "encodingWestern": { + "message": "Rietumu" + }, + "encodingChineseSimplified": { + "message": "Vienkāršotā ķīniešu" + }, + "encodingChineseTraditional": { + "message": "Tradicionālā ķīniešu" + }, + "encodingKorean": { + "message": "Korejiešu valoda" + }, + "encodingJapanese": { + "message": "Japāņu valoda" + }, + "encodingThai": { + "message": "Taizemiešu valoda" + }, + "encodingCentralEuropean": { + "message": "Centrāleiropiešu" + }, + "encodingCyrillic": { + "message": "Kiriliska" + }, + "encodingGreek": { + "message": "Grieķu valoda" + }, + "encodingBaltic": { + "message": "Baltu" + }, + "encodingSouthEuropean": { + "message": "Dienvideiropiešu" + }, + "encodingNordic": { + "message": "Skandināvu" + }, + "encodingCeltic": { + "message": "Ķeltu" + }, + "encodingRomanian": { + "message": "Rumāņu valoda" + }, + "encodingTurkish": { + "message": "Turku valoda" + }, + "encodingArabic": { + "message": "Arābu valoda" + }, + "encodingHebrew": { + "message": "Ebreju valoda" + }, + "encodingVietnamese": { + "message": "Vjetnamiešu" + } +} diff --git a/_locales/ml/messages.json b/_locales/ml/messages.json new file mode 100644 index 0000000..8fabfdb --- /dev/null +++ b/_locales/ml/messages.json @@ -0,0 +1,68 @@ +{ + "staticEncodingList": { + "message": "Windows-1252" + }, + "tipCurrent": { + "message": "നിലവിലെ പേജ്" + }, + "default": { + "message": "സ്ഥിരസ്ഥിതി" + }, + "encodingUnicode": { + "message": "യൂണിക്കോഡ്" + }, + "encodingWestern": { + "message": "പാശ്ചാത്യം" + }, + "encodingChineseSimplified": { + "message": "ചൈനീസ് ലളിതം" + }, + "encodingChineseTraditional": { + "message": "ചൈനീസ് പരമ്പരാഗതം" + }, + "encodingKorean": { + "message": "കൊറിയന്‍" + }, + "encodingJapanese": { + "message": "ജാപ്പനീസ്" + }, + "encodingThai": { + "message": "തായ്" + }, + "encodingCentralEuropean": { + "message": "മദ്ധ്യ യുറോപ്യന്‍" + }, + "encodingCyrillic": { + "message": "സിറിലിക്" + }, + "encodingGreek": { + "message": "ഗ്രീക്ക്" + }, + "encodingBaltic": { + "message": "ബാള്‍ട്ടിക്" + }, + "encodingSouthEuropean": { + "message": "സൌത്ത് യൂറോപ്യന്‍" + }, + "encodingNordic": { + "message": "നോര്‍ഡിക്" + }, + "encodingCeltic": { + "message": "കെല്‍റ്റിക്" + }, + "encodingRomanian": { + "message": "റുമാനിയന്‍" + }, + "encodingTurkish": { + "message": "ടര്‍ക്കിഷ്" + }, + "encodingArabic": { + "message": "അറബിക്ക്" + }, + "encodingHebrew": { + "message": "ഹീബ്രു" + }, + "encodingVietnamese": { + "message": "വിയറ്റ്നാമീസ്" + } +} diff --git a/_locales/mr/messages.json b/_locales/mr/messages.json new file mode 100644 index 0000000..4647b09 --- /dev/null +++ b/_locales/mr/messages.json @@ -0,0 +1,68 @@ +{ + "staticEncodingList": { + "message": "Windows-1252" + }, + "tipCurrent": { + "message": "चालू पान" + }, + "default": { + "message": "डीफॉल्ट" + }, + "encodingUnicode": { + "message": "युनिकोड" + }, + "encodingWestern": { + "message": "पाश्चात्य" + }, + "encodingChineseSimplified": { + "message": "चीनी सरलीकृत" + }, + "encodingChineseTraditional": { + "message": "चीनी पारंपारिक" + }, + "encodingKorean": { + "message": "कोरियन" + }, + "encodingJapanese": { + "message": "जपानी" + }, + "encodingThai": { + "message": "थाई" + }, + "encodingCentralEuropean": { + "message": "मध्य युरोपीय" + }, + "encodingCyrillic": { + "message": "सीरिलिक" + }, + "encodingGreek": { + "message": "ग्रीक" + }, + "encodingBaltic": { + "message": "बाल्टिक" + }, + "encodingSouthEuropean": { + "message": "दक्षिण युरोपीय" + }, + "encodingNordic": { + "message": "नॉर्डिक" + }, + "encodingCeltic": { + "message": "सेल्टिक" + }, + "encodingRomanian": { + "message": "रोमानियन" + }, + "encodingTurkish": { + "message": "तुर्की" + }, + "encodingArabic": { + "message": "अरबी" + }, + "encodingHebrew": { + "message": "हिब्रू" + }, + "encodingVietnamese": { + "message": "व्हिएतनामी" + } +} diff --git a/_locales/ms/messages.json b/_locales/ms/messages.json new file mode 100644 index 0000000..4b1b7d4 --- /dev/null +++ b/_locales/ms/messages.json @@ -0,0 +1,68 @@ +{ + "staticEncodingList": { + "message": "" + }, + "tipCurrent": { + "message": "Muka surat ini" + }, + "default": { + "message": "Lalai" + }, + "encodingUnicode": { + "message": "Unikod" + }, + "encodingWestern": { + "message": "Barat" + }, + "encodingChineseSimplified": { + "message": "Bahasa Cina Mudah" + }, + "encodingChineseTraditional": { + "message": "Bahasa Cina Tradisional" + }, + "encodingKorean": { + "message": "Bahasa Korea" + }, + "encodingJapanese": { + "message": "Bahasa Jepun" + }, + "encodingThai": { + "message": "Bahasa Thai" + }, + "encodingCentralEuropean": { + "message": "Eropah Tengah" + }, + "encodingCyrillic": { + "message": "Cyril" + }, + "encodingGreek": { + "message": "Bahasa Greek" + }, + "encodingBaltic": { + "message": "Baltik" + }, + "encodingSouthEuropean": { + "message": "Eropah Selatan" + }, + "encodingNordic": { + "message": "Nordic" + }, + "encodingCeltic": { + "message": "Celtic" + }, + "encodingRomanian": { + "message": "Bahasa Romania" + }, + "encodingTurkish": { + "message": "Bahasa Turki" + }, + "encodingArabic": { + "message": "Bahasa Arab" + }, + "encodingHebrew": { + "message": "Bahasa Ibrani" + }, + "encodingVietnamese": { + "message": "Bahasa Vietnam" + } +} diff --git a/_locales/nl/messages.json b/_locales/nl/messages.json new file mode 100644 index 0000000..a2ec86a --- /dev/null +++ b/_locales/nl/messages.json @@ -0,0 +1,68 @@ +{ + "staticEncodingList": { + "message": "Windows-1252" + }, + "tipCurrent": { + "message": "Huidige pagina" + }, + "default": { + "message": "Standaard" + }, + "encodingUnicode": { + "message": "Unicode" + }, + "encodingWestern": { + "message": "Westers" + }, + "encodingChineseSimplified": { + "message": "Chinees (vereenvoudigd)" + }, + "encodingChineseTraditional": { + "message": "Chinees (traditioneel)" + }, + "encodingKorean": { + "message": "Koreaans" + }, + "encodingJapanese": { + "message": "Japans" + }, + "encodingThai": { + "message": "Thai" + }, + "encodingCentralEuropean": { + "message": "Centraal-Europees" + }, + "encodingCyrillic": { + "message": "Cyrillisch" + }, + "encodingGreek": { + "message": "Grieks" + }, + "encodingBaltic": { + "message": "Baltisch" + }, + "encodingSouthEuropean": { + "message": "Zuid-Europees" + }, + "encodingNordic": { + "message": "Noord-Europees" + }, + "encodingCeltic": { + "message": "Keltisch" + }, + "encodingRomanian": { + "message": "Roemeens" + }, + "encodingTurkish": { + "message": "Turks" + }, + "encodingArabic": { + "message": "Arabisch" + }, + "encodingHebrew": { + "message": "Hebreeuws" + }, + "encodingVietnamese": { + "message": "Vietnamees" + } +} diff --git a/_locales/pl/messages.json b/_locales/pl/messages.json new file mode 100644 index 0000000..7b4468b --- /dev/null +++ b/_locales/pl/messages.json @@ -0,0 +1,68 @@ +{ + "staticEncodingList": { + "message": "ISO-8859-2,Windows-1250" + }, + "tipCurrent": { + "message": "Bieżąca strona" + }, + "default": { + "message": "Domyślny" + }, + "encodingUnicode": { + "message": "Unicode" + }, + "encodingWestern": { + "message": "Zachodni" + }, + "encodingChineseSimplified": { + "message": "Chiński uproszczony" + }, + "encodingChineseTraditional": { + "message": "Chiński tradycyjny" + }, + "encodingKorean": { + "message": "Koreański" + }, + "encodingJapanese": { + "message": "Japoński" + }, + "encodingThai": { + "message": "Tajski" + }, + "encodingCentralEuropean": { + "message": "Środkowoeuropejski" + }, + "encodingCyrillic": { + "message": "Cyrylica" + }, + "encodingGreek": { + "message": "Grecki" + }, + "encodingBaltic": { + "message": "Bałtycki" + }, + "encodingSouthEuropean": { + "message": "Południowoeuropejski" + }, + "encodingNordic": { + "message": "Nordycki" + }, + "encodingCeltic": { + "message": "Celtycki" + }, + "encodingRomanian": { + "message": "Rumuński" + }, + "encodingTurkish": { + "message": "Turecki" + }, + "encodingArabic": { + "message": "Arabski" + }, + "encodingHebrew": { + "message": "Hebrajski" + }, + "encodingVietnamese": { + "message": "Wietnamski" + } +} diff --git a/_locales/pt_BR/messages.json b/_locales/pt_BR/messages.json new file mode 100644 index 0000000..e261afa --- /dev/null +++ b/_locales/pt_BR/messages.json @@ -0,0 +1,68 @@ +{ + "staticEncodingList": { + "message": "Windows-1252" + }, + "tipCurrent": { + "message": "Pagina atual" + }, + "default": { + "message": "Padrão" + }, + "encodingUnicode": { + "message": "Unicode" + }, + "encodingWestern": { + "message": "Ocidental" + }, + "encodingChineseSimplified": { + "message": "Chinês Simplificado" + }, + "encodingChineseTraditional": { + "message": "Chinês Tradicional" + }, + "encodingKorean": { + "message": "Coreano" + }, + "encodingJapanese": { + "message": "Japonês" + }, + "encodingThai": { + "message": "Tailandês" + }, + "encodingCentralEuropean": { + "message": "Europa Central" + }, + "encodingCyrillic": { + "message": "Cirílico" + }, + "encodingGreek": { + "message": "Grego" + }, + "encodingBaltic": { + "message": "Báltico" + }, + "encodingSouthEuropean": { + "message": "Sul da Europa" + }, + "encodingNordic": { + "message": "Nórdico" + }, + "encodingCeltic": { + "message": "Celta" + }, + "encodingRomanian": { + "message": "Romeno" + }, + "encodingTurkish": { + "message": "Turco" + }, + "encodingArabic": { + "message": "Árabe" + }, + "encodingHebrew": { + "message": "Hebraico" + }, + "encodingVietnamese": { + "message": "Vietnamita" + } +} diff --git a/_locales/pt_PT/messages.json b/_locales/pt_PT/messages.json new file mode 100644 index 0000000..816410b --- /dev/null +++ b/_locales/pt_PT/messages.json @@ -0,0 +1,68 @@ +{ + "staticEncodingList": { + "message": "Windows-1252" + }, + "tipCurrent": { + "message": "Pagina atual" + }, + "default": { + "message": "Predefinição" + }, + "encodingUnicode": { + "message": "Unicode" + }, + "encodingWestern": { + "message": "Ocidental" + }, + "encodingChineseSimplified": { + "message": "Chinês Simplificado" + }, + "encodingChineseTraditional": { + "message": "Chinês Tradicional" + }, + "encodingKorean": { + "message": "Coreano" + }, + "encodingJapanese": { + "message": "Japonês" + }, + "encodingThai": { + "message": "Tailandês" + }, + "encodingCentralEuropean": { + "message": "Europa Central" + }, + "encodingCyrillic": { + "message": "Cirílico" + }, + "encodingGreek": { + "message": "Grego" + }, + "encodingBaltic": { + "message": "Báltico" + }, + "encodingSouthEuropean": { + "message": "Sul da Europa" + }, + "encodingNordic": { + "message": "Nórdico" + }, + "encodingCeltic": { + "message": "Celta" + }, + "encodingRomanian": { + "message": "Romeno" + }, + "encodingTurkish": { + "message": "Turco" + }, + "encodingArabic": { + "message": "Árabe" + }, + "encodingHebrew": { + "message": "Hebraico" + }, + "encodingVietnamese": { + "message": "Vietnamita" + } +} diff --git a/_locales/ro/messages.json b/_locales/ro/messages.json new file mode 100644 index 0000000..eecf3c9 --- /dev/null +++ b/_locales/ro/messages.json @@ -0,0 +1,68 @@ +{ + "staticEncodingList": { + "message": "ISO-8859-2,Windows-1250" + }, + "tipCurrent": { + "message": "Pagina curenta" + }, + "default": { + "message": "Prestabilit" + }, + "encodingUnicode": { + "message": "Unicode" + }, + "encodingWestern": { + "message": "Vestic" + }, + "encodingChineseSimplified": { + "message": "Chineză simplificată" + }, + "encodingChineseTraditional": { + "message": "Chineză tradițională" + }, + "encodingKorean": { + "message": "Coreeană" + }, + "encodingJapanese": { + "message": "Japoneză" + }, + "encodingThai": { + "message": "Thailandeză" + }, + "encodingCentralEuropean": { + "message": "Europa Centrală" + }, + "encodingCyrillic": { + "message": "Chirilic" + }, + "encodingGreek": { + "message": "Greacă" + }, + "encodingBaltic": { + "message": "Baltic" + }, + "encodingSouthEuropean": { + "message": "Europa de Sud" + }, + "encodingNordic": { + "message": "Nordică" + }, + "encodingCeltic": { + "message": "Celtă" + }, + "encodingRomanian": { + "message": "Română" + }, + "encodingTurkish": { + "message": "Turcă" + }, + "encodingArabic": { + "message": "Arabă" + }, + "encodingHebrew": { + "message": "Ebraică" + }, + "encodingVietnamese": { + "message": "Vietnameză" + } +} diff --git a/_locales/ru/messages.json b/_locales/ru/messages.json new file mode 100644 index 0000000..c897ee3 --- /dev/null +++ b/_locales/ru/messages.json @@ -0,0 +1,68 @@ +{ + "staticEncodingList": { + "message": "Windows-1251,KOI8-R,KOI8-U,ISO-8859-5" + }, + "tipCurrent": { + "message": "Текущая страница" + }, + "default": { + "message": "По умолчанию" + }, + "encodingUnicode": { + "message": "Юникод" + }, + "encodingWestern": { + "message": "Западная" + }, + "encodingChineseSimplified": { + "message": "Китайская упрощенная" + }, + "encodingChineseTraditional": { + "message": "Китайская традиционная" + }, + "encodingKorean": { + "message": "Корейский" + }, + "encodingJapanese": { + "message": "Японский" + }, + "encodingThai": { + "message": "Тайский" + }, + "encodingCentralEuropean": { + "message": "Центральноевропейская" + }, + "encodingCyrillic": { + "message": "Кириллица" + }, + "encodingGreek": { + "message": "Греческий" + }, + "encodingBaltic": { + "message": "Балтийская" + }, + "encodingSouthEuropean": { + "message": "Южноевропейская" + }, + "encodingNordic": { + "message": "Нордическая" + }, + "encodingCeltic": { + "message": "Кельтская" + }, + "encodingRomanian": { + "message": "Румынский" + }, + "encodingTurkish": { + "message": "Турецкий" + }, + "encodingArabic": { + "message": "Арабский" + }, + "encodingHebrew": { + "message": "Иврит" + }, + "encodingVietnamese": { + "message": "Вьетнамский" + } +} diff --git a/_locales/sk/messages.json b/_locales/sk/messages.json new file mode 100644 index 0000000..04f9823 --- /dev/null +++ b/_locales/sk/messages.json @@ -0,0 +1,68 @@ +{ + "staticEncodingList": { + "message": "Windows-1250,ISO-8859-2" + }, + "tipCurrent": { + "message": "Aktuálna stránka" + }, + "default": { + "message": "Predvolené" + }, + "encodingUnicode": { + "message": "Unicode" + }, + "encodingWestern": { + "message": "Západné" + }, + "encodingChineseSimplified": { + "message": "Zjednodušená čínština" + }, + "encodingChineseTraditional": { + "message": "Tradičná čínština" + }, + "encodingKorean": { + "message": "Kórejčina" + }, + "encodingJapanese": { + "message": "Japončina" + }, + "encodingThai": { + "message": "Thajčina" + }, + "encodingCentralEuropean": { + "message": "Stredoeurópske" + }, + "encodingCyrillic": { + "message": "Cyrilika" + }, + "encodingGreek": { + "message": "Gréčtina" + }, + "encodingBaltic": { + "message": "Baltické" + }, + "encodingSouthEuropean": { + "message": "Juhoeurópske" + }, + "encodingNordic": { + "message": "Severské" + }, + "encodingCeltic": { + "message": "Keltské" + }, + "encodingRomanian": { + "message": "Rumunčina" + }, + "encodingTurkish": { + "message": "Turečtina" + }, + "encodingArabic": { + "message": "Arabčina" + }, + "encodingHebrew": { + "message": "Hebrejčina" + }, + "encodingVietnamese": { + "message": "Vietnamčina" + } +} diff --git a/_locales/sl/messages.json b/_locales/sl/messages.json new file mode 100644 index 0000000..5f94384 --- /dev/null +++ b/_locales/sl/messages.json @@ -0,0 +1,68 @@ +{ + "staticEncodingList": { + "message": "ISO-8859-2,Windows-1250" + }, + "tipCurrent": { + "message": "Trenutna stran" + }, + "default": { + "message": "Privzeto" + }, + "encodingUnicode": { + "message": "Unicode" + }, + "encodingWestern": { + "message": "Zahodno" + }, + "encodingChineseSimplified": { + "message": "Poenostavljena kitajščina" + }, + "encodingChineseTraditional": { + "message": "Tradicionalna kitajščina" + }, + "encodingKorean": { + "message": "korejščina" + }, + "encodingJapanese": { + "message": "japonščina" + }, + "encodingThai": { + "message": "tajščina" + }, + "encodingCentralEuropean": { + "message": "Srednjeevropsko" + }, + "encodingCyrillic": { + "message": "Cirilica" + }, + "encodingGreek": { + "message": "grščina" + }, + "encodingBaltic": { + "message": "Baltsko" + }, + "encodingSouthEuropean": { + "message": "Južnoevropsko" + }, + "encodingNordic": { + "message": "Nordijsko" + }, + "encodingCeltic": { + "message": "Keltščina" + }, + "encodingRomanian": { + "message": "romunščina" + }, + "encodingTurkish": { + "message": "turščina" + }, + "encodingArabic": { + "message": "arabščina" + }, + "encodingHebrew": { + "message": "hebrejščina" + }, + "encodingVietnamese": { + "message": "vietnamščina" + } +} diff --git a/_locales/sr/messages.json b/_locales/sr/messages.json new file mode 100644 index 0000000..8a6dc1c --- /dev/null +++ b/_locales/sr/messages.json @@ -0,0 +1,68 @@ +{ + "staticEncodingList": { + "message": "Windows-1251,KOI8-R,ISO-8859-5" + }, + "tipCurrent": { + "message": "Тренутна страна" + }, + "default": { + "message": "Подразумевано" + }, + "encodingUnicode": { + "message": "Уникод" + }, + "encodingWestern": { + "message": "западни" + }, + "encodingChineseSimplified": { + "message": "поједностављени кинески" + }, + "encodingChineseTraditional": { + "message": "традиционални кинески" + }, + "encodingKorean": { + "message": "корејски" + }, + "encodingJapanese": { + "message": "јапански" + }, + "encodingThai": { + "message": "тајски" + }, + "encodingCentralEuropean": { + "message": "средњоевропски" + }, + "encodingCyrillic": { + "message": "ћирилица" + }, + "encodingGreek": { + "message": "грчки" + }, + "encodingBaltic": { + "message": "балтички" + }, + "encodingSouthEuropean": { + "message": "јужноевропски" + }, + "encodingNordic": { + "message": "нордијски" + }, + "encodingCeltic": { + "message": "келтски" + }, + "encodingRomanian": { + "message": "румунски" + }, + "encodingTurkish": { + "message": "турски" + }, + "encodingArabic": { + "message": "арапски" + }, + "encodingHebrew": { + "message": "хебрејски" + }, + "encodingVietnamese": { + "message": "вијетнамски" + } +} diff --git a/_locales/sv/messages.json b/_locales/sv/messages.json new file mode 100644 index 0000000..1b2c21c --- /dev/null +++ b/_locales/sv/messages.json @@ -0,0 +1,68 @@ +{ + "staticEncodingList": { + "message": "Windows-1252" + }, + "tipCurrent": { + "message": "Nuvarande sida" + }, + "default": { + "message": "Standard" + }, + "encodingUnicode": { + "message": "Unicode" + }, + "encodingWestern": { + "message": "Västeuropeiskt" + }, + "encodingChineseSimplified": { + "message": "Kinesiskt, förenklat" + }, + "encodingChineseTraditional": { + "message": "Kinesiskt (traditionellt)" + }, + "encodingKorean": { + "message": "koreanska" + }, + "encodingJapanese": { + "message": "japanska" + }, + "encodingThai": { + "message": "thai" + }, + "encodingCentralEuropean": { + "message": "Centraleuropeiskt" + }, + "encodingCyrillic": { + "message": "Kyrilliskt" + }, + "encodingGreek": { + "message": "grekiska" + }, + "encodingBaltic": { + "message": "Baltiskt" + }, + "encodingSouthEuropean": { + "message": "Sydeuropeiskt" + }, + "encodingNordic": { + "message": "Nordiskt" + }, + "encodingCeltic": { + "message": "Keltiskt" + }, + "encodingRomanian": { + "message": "rumänska" + }, + "encodingTurkish": { + "message": "turkiska" + }, + "encodingArabic": { + "message": "arabiska" + }, + "encodingHebrew": { + "message": "hebreiska" + }, + "encodingVietnamese": { + "message": "vietnamesiska" + } +} diff --git a/_locales/ta/messages.json b/_locales/ta/messages.json new file mode 100644 index 0000000..7ed7d49 --- /dev/null +++ b/_locales/ta/messages.json @@ -0,0 +1,68 @@ +{ + "staticEncodingList": { + "message": "Windows-1252" + }, + "tipCurrent": { + "message": "தற்போதைய பக்கம்" + }, + "default": { + "message": "இயல்புநிலை" + }, + "encodingUnicode": { + "message": "யுனிகோட்" + }, + "encodingWestern": { + "message": "வெஸ்டர்ன்" + }, + "encodingChineseSimplified": { + "message": "எளிதாக்கப்பட்ட சீனம்" + }, + "encodingChineseTraditional": { + "message": "சீனம் மரபுவழி" + }, + "encodingKorean": { + "message": "கொரியன்" + }, + "encodingJapanese": { + "message": "ஜாப்பனீஸ்" + }, + "encodingThai": { + "message": "தாய்" + }, + "encodingCentralEuropean": { + "message": "சென்ட்ரல் யூரோப்பியன்" + }, + "encodingCyrillic": { + "message": "சிரில்லிக்" + }, + "encodingGreek": { + "message": "கிரேக்கம்" + }, + "encodingBaltic": { + "message": "பால்டிக்" + }, + "encodingSouthEuropean": { + "message": "தெற்கு யூரோப்பியன்" + }, + "encodingNordic": { + "message": "நார்டிக்" + }, + "encodingCeltic": { + "message": "செல்டிக்" + }, + "encodingRomanian": { + "message": "ரோமானியன்" + }, + "encodingTurkish": { + "message": "டர்கிஷ்" + }, + "encodingArabic": { + "message": "அரபிக்" + }, + "encodingHebrew": { + "message": "ஹீப்ரு" + }, + "encodingVietnamese": { + "message": "வியட்னாமீஸ்" + } +} diff --git a/_locales/te/messages.json b/_locales/te/messages.json new file mode 100644 index 0000000..303bf78 --- /dev/null +++ b/_locales/te/messages.json @@ -0,0 +1,68 @@ +{ + "staticEncodingList": { + "message": "Windows-1252" + }, + "tipCurrent": { + "message": "ప్రస్తుత పేజీ" + }, + "default": { + "message": "డిఫాల్ట్" + }, + "encodingUnicode": { + "message": "యునీకోడ్" + }, + "encodingWestern": { + "message": "పాశ్చాత్య" + }, + "encodingChineseSimplified": { + "message": "సరళీకృత చైనీస్" + }, + "encodingChineseTraditional": { + "message": "సంప్రదాయ చైనీస్" + }, + "encodingKorean": { + "message": "కొరియన్" + }, + "encodingJapanese": { + "message": "జపనీస్" + }, + "encodingThai": { + "message": "థాయ్" + }, + "encodingCentralEuropean": { + "message": "మధ్య యూరోపియన్" + }, + "encodingCyrillic": { + "message": "సిరిలిక్" + }, + "encodingGreek": { + "message": "గ్రీక్" + }, + "encodingBaltic": { + "message": "బాల్టిక్" + }, + "encodingSouthEuropean": { + "message": "దక్షిణ యూరోపియన్" + }, + "encodingNordic": { + "message": "నోర్డిక్" + }, + "encodingCeltic": { + "message": "సెల్టిక్" + }, + "encodingRomanian": { + "message": "రొమేనియన్" + }, + "encodingTurkish": { + "message": "టర్కిష్" + }, + "encodingArabic": { + "message": "అరబిక్" + }, + "encodingHebrew": { + "message": "హిబ్రూ" + }, + "encodingVietnamese": { + "message": "వియత్నామీస్" + } +} diff --git a/_locales/th/messages.json b/_locales/th/messages.json new file mode 100644 index 0000000..0de4c8d --- /dev/null +++ b/_locales/th/messages.json @@ -0,0 +1,68 @@ +{ + "staticEncodingList": { + "message": "Windows-874" + }, + "tipCurrent": { + "message": "หน้าปัจจุบัน" + }, + "default": { + "message": "ค่าเริ่มต้น" + }, + "encodingUnicode": { + "message": "Unicode" + }, + "encodingWestern": { + "message": "ยุโรป" + }, + "encodingChineseSimplified": { + "message": "จีน (ตัวย่อ)" + }, + "encodingChineseTraditional": { + "message": "จีน (ตัวเต็ม)" + }, + "encodingKorean": { + "message": "เกาหลี" + }, + "encodingJapanese": { + "message": "ญี่ปุ่น" + }, + "encodingThai": { + "message": "ไทย" + }, + "encodingCentralEuropean": { + "message": "ยุโรปตอนกลาง" + }, + "encodingCyrillic": { + "message": "ซีริลลิก" + }, + "encodingGreek": { + "message": "กรีก" + }, + "encodingBaltic": { + "message": "บอลติก" + }, + "encodingSouthEuropean": { + "message": "ยุโรปตอนใต้" + }, + "encodingNordic": { + "message": "นอร์ดิก" + }, + "encodingCeltic": { + "message": "เซลติก" + }, + "encodingRomanian": { + "message": "โรมาเนีย" + }, + "encodingTurkish": { + "message": "ตุรกี" + }, + "encodingArabic": { + "message": "อาหรับ" + }, + "encodingHebrew": { + "message": "ฮิบรู" + }, + "encodingVietnamese": { + "message": "เวียดนาม" + } +} diff --git a/_locales/tr/messages.json b/_locales/tr/messages.json new file mode 100644 index 0000000..8e8e059 --- /dev/null +++ b/_locales/tr/messages.json @@ -0,0 +1,68 @@ +{ + "staticEncodingList": { + "message": "Windows-1254" + }, + "tipCurrent": { + "message": "Geçerli sayfa" + }, + "default": { + "message": "Varsayılan" + }, + "encodingUnicode": { + "message": "Unicode" + }, + "encodingWestern": { + "message": "Batı" + }, + "encodingChineseSimplified": { + "message": "Basitleştirilmiş Çince" + }, + "encodingChineseTraditional": { + "message": "Çince Geleneksel" + }, + "encodingKorean": { + "message": "Korece" + }, + "encodingJapanese": { + "message": "Japonca" + }, + "encodingThai": { + "message": "Tay dili" + }, + "encodingCentralEuropean": { + "message": "Orta Avrupa" + }, + "encodingCyrillic": { + "message": "Kiril" + }, + "encodingGreek": { + "message": "Yunanca" + }, + "encodingBaltic": { + "message": "Baltık" + }, + "encodingSouthEuropean": { + "message": "Güney Avrupa" + }, + "encodingNordic": { + "message": "İskandinav" + }, + "encodingCeltic": { + "message": "Keltik" + }, + "encodingRomanian": { + "message": "Rumence" + }, + "encodingTurkish": { + "message": "Türkçe" + }, + "encodingArabic": { + "message": "Arapça" + }, + "encodingHebrew": { + "message": "İbranice" + }, + "encodingVietnamese": { + "message": "Vietnam dili" + } +} diff --git a/_locales/uk/messages.json b/_locales/uk/messages.json new file mode 100644 index 0000000..ee6a84e --- /dev/null +++ b/_locales/uk/messages.json @@ -0,0 +1,68 @@ +{ + "staticEncodingList": { + "message": "Windows-1251,KOI8-U,KOI8-R,ISO-8859-5" + }, + "tipCurrent": { + "message": "Поточна сторінка" + }, + "default": { + "message": "За умовчанням" + }, + "encodingUnicode": { + "message": "Юнікод" + }, + "encodingWestern": { + "message": "Західна" + }, + "encodingChineseSimplified": { + "message": "Китайська (спрощене письмо)" + }, + "encodingChineseTraditional": { + "message": "Китайська (традиційне письмо)" + }, + "encodingKorean": { + "message": "Корейська" + }, + "encodingJapanese": { + "message": "Японська" + }, + "encodingThai": { + "message": "Тайська" + }, + "encodingCentralEuropean": { + "message": "Центрально-європейська" + }, + "encodingCyrillic": { + "message": "Кирилиця" + }, + "encodingGreek": { + "message": "Грецька" + }, + "encodingBaltic": { + "message": "Балтійська" + }, + "encodingSouthEuropean": { + "message": "Південно-європейська" + }, + "encodingNordic": { + "message": "Скандинавська" + }, + "encodingCeltic": { + "message": "Кельтська" + }, + "encodingRomanian": { + "message": "Румунська" + }, + "encodingTurkish": { + "message": "Турецька" + }, + "encodingArabic": { + "message": "Арабська" + }, + "encodingHebrew": { + "message": "Іврит" + }, + "encodingVietnamese": { + "message": "В’єтнамська" + } +} diff --git a/_locales/vi/messages.json b/_locales/vi/messages.json new file mode 100644 index 0000000..2174f6b --- /dev/null +++ b/_locales/vi/messages.json @@ -0,0 +1,68 @@ +{ + "staticEncodingList": { + "message": "Windows-1258" + }, + "tipCurrent": { + "message": "Trang hiện tại" + }, + "default": { + "message": "Mặc định" + }, + "encodingUnicode": { + "message": "Unicode" + }, + "encodingWestern": { + "message": "Western" + }, + "encodingChineseSimplified": { + "message": "Chinese Simplified" + }, + "encodingChineseTraditional": { + "message": "Chinese Traditional" + }, + "encodingKorean": { + "message": "Tiếng Hàn" + }, + "encodingJapanese": { + "message": "Tiếng Nhật" + }, + "encodingThai": { + "message": "Tiếng Thái" + }, + "encodingCentralEuropean": { + "message": "Central European" + }, + "encodingCyrillic": { + "message": "Cyrillic" + }, + "encodingGreek": { + "message": "Tiếng Hy Lạp" + }, + "encodingBaltic": { + "message": "Baltic" + }, + "encodingSouthEuropean": { + "message": "South European" + }, + "encodingNordic": { + "message": "Nordic" + }, + "encodingCeltic": { + "message": "Celtic" + }, + "encodingRomanian": { + "message": "Tiếng Rumani" + }, + "encodingTurkish": { + "message": "Tiếng Thổ Nhĩ Kỳ" + }, + "encodingArabic": { + "message": "Tiếng Ả Rập" + }, + "encodingHebrew": { + "message": "Tiếng Do Thái" + }, + "encodingVietnamese": { + "message": "Tiếng Việt" + } +} diff --git a/_locales/zh_CN/messages.json b/_locales/zh_CN/messages.json index 6d9f85e..d962e71 100644 --- a/_locales/zh_CN/messages.json +++ b/_locales/zh_CN/messages.json @@ -1,83 +1,98 @@ { - "appName": { - "message": "Charset", - "description": "Extension: Name" - }, - "appShortName": { - "message": "Charset", - "description": "Extension: Short Name" - }, - "appDescription": { - "message": "修改网站的默认编码", - "description": "Extension: Short Name" - }, - "cannotLoadLocalFile": { - "message": "Charset扩展程序无法读取file://协议文件!\n请在扩展设置页面勾选“允许访问文件网址”选项!" - }, - "btnReset": { - "message": "复位", - "description": "Reset default charset" - }, - "tipCurrent": { - "message": "当前:", - "description": "The encoding used for the current page" - }, - "settingMenu": { - "message": "显示右键菜单:", - "description": "Show Menu or Not" - }, - "default": { - "message": "默认" - }, - "Chinese": { - "message": "中文" - }, - "Arabic": { - "message": "阿拉伯语" - }, - "Baltic": { - "message": "波罗的海周边语言" - }, - "Celtic": { - "message": "凯尔特语" - }, - "CentralEuropean": { - "message": "中欧语言" - }, - "Cyrillic": { - "message": "西里尔语" - }, - "Greek": { - "message": "希腊语" - }, - "Hebrew": { - "message": "希伯来语" - }, - "Japanese": { - "message": "日语" - }, - "Korean": { - "message": "韩语" - }, - "Nordic": { - "message": "北欧语言" - }, - "Romanian": { - "message": "罗马尼亚语" - }, - "SouthEuropean": { - "message": "南欧语言" - }, - "Thai": { - "message": "泰语" - }, - "Turkish": { - "message": "土耳其语" - }, - "Vietnamese": { - "message": "越南语" - }, - "Western": { - "message": "西欧语言" - } + "appDescription": { + "message": "修改网站的默认编码" + }, + "staticEncodingList": { + "message": "GBK,GB18030" + }, + "cannotLoadLocalFile": { + "message": "Charset 扩展程序无法读取file://协议文件!\n请在扩展设置页面勾选“允许访问文件网址”选项!" + }, + "unknown": { + "message": "未知" + }, + "btnReset": { + "message": "重置" + }, + "tipCurrent": { + "message": "当前页面" + }, + "defaultEncodingEnabled": { + "message": "默认编码: $1" + }, + "tipDisableDefaultEncoding": { + "message": "您可以在选项页面选择默认编码" + }, + "optionMenu": { + "message": "显示菜单" + }, + "optionDefaultEncoding": { + "message": "默认编码" + }, + "optionRecommendEncoding": { + "message": "推荐" + }, + "optionOtherEncoding": { + "message": "其他" + }, + "default": { + "message": "默认" + }, + "encodingUnicode": { + "message": "Unicode" + }, + "encodingWestern": { + "message": "西欧语言" + }, + "encodingChineseSimplified": { + "message": "中文(简体)" + }, + "encodingChineseTraditional": { + "message": "中文(繁体)" + }, + "encodingKorean": { + "message": "韩语" + }, + "encodingJapanese": { + "message": "日语" + }, + "encodingThai": { + "message": "泰语" + }, + "encodingCentralEuropean": { + "message": "中欧语言" + }, + "encodingCyrillic": { + "message": "西里尔语" + }, + "encodingGreek": { + "message": "希腊语" + }, + "encodingBaltic": { + "message": "波罗的海周边语言" + }, + "encodingSouthEuropean": { + "message": "南欧语言" + }, + "encodingNordic": { + "message": "北欧语言" + }, + "encodingCeltic": { + "message": "凯尔特语" + }, + "encodingRomanian": { + "message": "罗马尼亚语" + }, + "encodingTurkish": { + "message": "土耳其语" + }, + "encodingArabic": { + "message": "阿拉伯语" + }, + "encodingHebrew": { + "message": "希伯来语" + }, + "encodingVietnamese": { + "message": "越南语" + } } diff --git a/_locales/zh_TW/messages.json b/_locales/zh_TW/messages.json new file mode 100644 index 0000000..3531c3a --- /dev/null +++ b/_locales/zh_TW/messages.json @@ -0,0 +1,98 @@ +{ + "appDescription": { + "message": "修改網站的默認編碼" + }, + "staticEncodingList": { + "message": "Big5" + }, + "cannotLoadLocalFile": { + "message": "Charset 擴展程序無法讀取file://協議文件! \n請在擴展設置頁面勾選“允許訪問文件網址”選項!" + }, + "unknown": { + "message": "未知" + }, + "btnReset": { + "message": "重置" + }, + "tipCurrent": { + "message": "當前頁面" + }, + "defaultEncodingEnabled": { + "message": "默認編碼: $1" + }, + "tipDisableDefaultEncoding": { + "message": "您可以在選項頁面選擇默認編碼" + }, + "optionMenu": { + "message": "顯示菜單" + }, + "optionDefaultEncoding": { + "message": "默認編碼" + }, + "optionRecommendEncoding": { + "message": "推薦" + }, + "optionOtherEncoding": { + "message": "其他" + }, + "default": { + "message": "預設" + }, + "encodingUnicode": { + "message": "萬國碼 (Unicode)" + }, + "encodingWestern": { + "message": "西歐語系" + }, + "encodingChineseSimplified": { + "message": "簡體中文" + }, + "encodingChineseTraditional": { + "message": "繁體中文" + }, + "encodingKorean": { + "message": "韓文" + }, + "encodingJapanese": { + "message": "日文" + }, + "encodingThai": { + "message": "泰文" + }, + "encodingCentralEuropean": { + "message": "中歐語系" + }, + "encodingCyrillic": { + "message": "斯拉夫語" + }, + "encodingGreek": { + "message": "希臘文" + }, + "encodingBaltic": { + "message": "波羅的海語系" + }, + "encodingSouthEuropean": { + "message": "南歐語系" + }, + "encodingNordic": { + "message": "北歐語系" + }, + "encodingCeltic": { + "message": "塞爾特語" + }, + "encodingRomanian": { + "message": "羅馬尼亞文" + }, + "encodingTurkish": { + "message": "土耳其文" + }, + "encodingArabic": { + "message": "阿拉伯文" + }, + "encodingHebrew": { + "message": "希伯來文" + }, + "encodingVietnamese": { + "message": "越南文" + } +} diff --git a/c/option.css b/c/option.css new file mode 100644 index 0000000..17d552a --- /dev/null +++ b/c/option.css @@ -0,0 +1,153 @@ +:root { + --font-colour: #202124; + --google-blue-600: #1a73e8; +} +html { + min-width: 600px; + direction: __MSG_@@bidi_dir__; +} +body { + margin: 0; + color: var(--font-colour); + font-family: Roboto,'Segoe UI',Arial,'Microsoft Yahei',sans-serif; + font-size: 81.25%; +} +select { + align-items: center; + display: inline-flex; + -webkit-appearance: none; + background: url('data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224px%22%20height%3D%2212px%22%20viewBox%3D%220%200%2024%2012%22%20fill%3D%22%235F6368%22%3E%3Cg%3E%3Cpath%20d%3D%22M%200%200%20L%2024%200%20L%2012%2012%20z%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E') calc(100% - 8px) center no-repeat; + background-color: #f1f3f4; + background-size: 10px; + border: none; + border-radius: 4px; + color: var(--font-colour); + cursor: pointer; + max-width: 100%; + outline: none; + padding: 6px 0; + -webkit-padding-end: 21px; + -webkit-padding-start: 8px; + padding-inline-end: 21px; + padding-inline-start: 8px; + width: var(--md-select-width, 200px); +} +select:active { + box-shadow: none; +} +select:focus { + box-shadow: 0 0 0 2px rgba(26, 115, 232, .4); +} +input[type=checkbox] { + display: none; +} +.checkbox { + cursor: pointer; + width: 34px; + position: relative; +} +.checkbox-bar { + background-color: #bdc1c6; + border-radius: 8px; + height: 12px; + left: 3px; + position: absolute; + top: 2px; + transition: background-color linear 80ms; + width: 28px; + z-index: 0; +} +input[type=checkbox]:checked + .checkbox .checkbox-bar { + background-color: var(--google-blue-600); + opacity: .5; +} +.checkbox-knob { + background-color: #fff; + border-radius: 50%; + box-shadow: 0 1px 3px 0 rgba(0, 0, 0, .4); + display: block; + height: 16px; + position: relative; + -webkit-margin-start: 0; + margin-inline-start: 0; + transition: -webkit-margin-start linear 80ms, margin-inline-start linear 80ms, background-color linear 80ms; + width: 16px; + z-index: 1; +} +input[type=checkbox]:checked + .checkbox .checkbox-knob { + background-color: var(--google-blue-600); + -webkit-margin-start: 18px; + margin-inline-start: 18px; +} +.checkbox-knob .ink { + color: #80868b; + position: absolute; + top: -12px; + left: -12px; + width: 40px; + height: 40px; + border-radius: 50%; + pointer-events: none; + overflow: hidden; + transition: color linear 80ms; + transform: translate(0); +} +input[type=checkbox]:checked + .checkbox .checkbox-knob .ink { + color: var(--google-blue-600); +} +@keyframes zoom-on { + 0% { transform: scale(0) } + 38% { opacity: .15 } + 99% { transform: scale(1) } + to { opacity: 0 } +} +@keyframes zoom-off { + 0% { transform: scale(0) } + 38% { opacity: .2 } + 99% { transform: scale(1) } + to { opacity: 0 } +} +.checkbox-knob .ink .ripple { + width: 56px; + height: 56px; + border-radius: 50%; + background-color: currentcolor; + position: absolute; + left: -8px; + top: -8px; + pointer-events: none; + will-change: height, opacity, transform, width; + animation: zoom-on 800ms cubic-bezier(.2, .9, .1, .9) forwards; +} +input[type=checkbox]:checked + .checkbox .checkbox-knob .ink .ripple { + animation-name: zoom-off; +} +.line { + border-top: 1px solid rgba(0, 0, 0, .06); + display: flex; + align-items: center; + min-height: 48px; + padding: 0 20px; + line-height: 154%; +} +.toggle label { + cursor: pointer; + align-items: center; + display: flex; + width: 100%; +} +.select label { + align-items: center; +} +.toggle label > div:first-child, +.select label { + padding: 12px 0; + -webkit-margin-end: 20px; + margin-inline-end: 20px; + flex: 1; + flex-basis: 0.000000001px; +} +.toggle label > div:first-child > :not(:first-child), +.select label > :not(:first-child) { + color: rgb(95, 99, 104); +} diff --git a/c/popup.css b/c/popup.css index 5d9df21..fcf88b7 100644 --- a/c/popup.css +++ b/c/popup.css @@ -1,94 +1,93 @@ -html, body { - padding: 0; - margin: 0; - width: 250px; - font-family: 'Microsoft YaHei', sans-serif; +:root { + --font-colour: #202124; + --border: 1px solid #d2e3fc; + --google-blue-600: #1a73e8; } - -#tip_current { - font-size: 18px; +html { + min-width: fit-content; + direction: __MSG_@@bidi_dir__; +} +body { + margin: 0; + color: var(--font-colour); + font-family: Roboto,'Segoe UI',Arial,'Microsoft Yahei',sans-serif; + font-size: 81.25%; } - button { - display: block; - color: white; - padding: 6px; - width: 98%; - margin: 2px; - background-color: #f57c00; - border: #c24900; - border-radius: 5px; - opacity: .8; -} - + border: none; + border-top: var(--border); + background: transparent; + cursor: pointer; + color: var(--google-blue-600); + font-weight: 500; + padding: 8px 16px; + width: 100%; + min-width: fit-content; + white-space: nowrap; + height: 32px; + outline: none; + display: inline-flex; + align-items: center; + justify-content: center; + position: relative; + box-sizing: border-box; +} button:hover { - opacity: .9; + background-color: rgba(66, 133, 244, .04); } - button:active { - opacity: 1; -} - -.setting { - display: flex; - justify-content: space-between; - align-items: center; -} - -input[type=checkbox] { - visibility: hidden; -} - -.switch { - flex-shrink: 0; - display: inline-block; - width: 120px; - height: 30px; - background: #f57c00; - -webkit-border-radius: 15px; - border-radius: 15px; - position: relative; - -webkit-box-sizing: border-box; - box-sizing: border-box; -} - -.switch:before { - content: 'On'; - position: absolute; - top: 4px; - left: 13px; - height: 2px; - color: #fff; - font-size: 16px; -} - -.switch:after { - content: 'Off'; - position: absolute; - top: 4px; - left: 84px; - height: 2px; - color: #888; - font-size: 16px; -} - -.switch label { - display: block; - width: 52px; - height: 18px; - cursor: pointer; - position: absolute; - top: 6px; - z-index: 1; - left: 12px; - background: #888; - -webkit-border-radius: 11px; - border-radius: 11px; - -webkit-transition: all 0.5s ease; - transition: all 0.5s ease; -} - -.switch input[type=checkbox]:checked + label { - left: 60px; - background: #fff; + background: #fff; +} +button .ink { + overflow: hidden; + position: absolute; + top: 0; + right: 0; + bottom: 0; + left: 0; + pointer-events: none; +} +button .ink .ripple { + border-radius: 50%; + background-color: var(--google-blue-600); + position: absolute; + opacity: .1; + pointer-events: none; + will-change: height, transform, width; +} +hr { + margin: 0; + border: var(--border); +} +.line { + border-top: 1px solid rgba(0, 0, 0, .06); + display: flex; + align-items: center; + min-height: 48px; + padding: 0 20px; + line-height: 154%; + justify-content: space-between; + white-space: nowrap; +} +.line:first-child { + border-top: none; +} +.line.tip { + min-height: 0; + background-color: #f1f3f4; + cursor: help; +} +.line > :not(:first-child) { + -webkit-margin-start: 1em; + margin-inline-start: 1em; +} +::-webkit-scrollbar { + width: 8px; + height: 8px; +} +::-webkit-scrollbar-thumb { + background-color: #8db9f4; +} +::-webkit-scrollbar-track-piece { + background-color: #d2e3fc; } diff --git a/j/background.js b/j/background.js index f6ffe8c..77e1f09 100644 --- a/j/background.js +++ b/j/background.js @@ -1,75 +1,177 @@ /** * Created by Liming on 2017/2/14. */ -"use strict"; -const config = localStorage.getItem('config_menu'); -localStorage.clear(); -localStorage.setItem('config_menu', config); - const charsetPattern = /; ?charset=([^;]+)/; -const html_special_chars = (html) => html.replace(/&/g, '>') - .replace(//g, '>') - .replace(/ /g, ' ') - .replace(/'/g, ''') - .replace(/"/g, '"') - .replace(/\r\n?|\n/g, '
'); +const html_special_chars = html => html + .replace(/&/g, '>') + .replace(//g, '>') + .replace(/ /g, ' ') + .replace(/'/g, ''') + .replace(/"/g, '"') + .replace(/\r\n?|\n/g, '
'); +const recordRecentlySelectedEncoding = encoding => { + const recent = (localStorage.getItem('recent') || '') + .split(',') + .filter(e => e && e !== encoding) + .slice(0, 2); + localStorage.setItem('recent', [encoding, ...recent].join(',')); +}; -const options = ['responseHeaders', 'blocking']; +const options = [ + chrome.webRequest.OnHeadersReceivedOptions.BLOCKING, + chrome.webRequest.OnHeadersReceivedOptions.RESPONSE_HEADERS, +]; if(chrome.webRequest.OnBeforeSendHeadersOptions.hasOwnProperty('EXTRA_HEADERS')) { - options.push('extraHeaders'); + options.push(chrome.webRequest.OnHeadersReceivedOptions.EXTRA_HEADERS); } -chrome.webRequest.onHeadersReceived.addListener((details) => { - if(localStorage.getItem('tab' + details.tabId)) { - let i; - for(i = 0; i < details.responseHeaders.length; ++i) { - if(details.responseHeaders[i].name.toLowerCase() === 'content-type') { - let value = details.responseHeaders[i].value.toLowerCase(); - if( - value.startsWith('text') || - value.startsWith('application/javascript') || - value.startsWith('application/x-javascript') || - value.startsWith('application/json') - ) { - if(charsetPattern.test(value)) { - value = value.replace(charsetPattern.exec(value)[1], localStorage.getItem('tab' + details.tabId)); - } else { - value += value.substr(-1) === ';' ? ' ' : '; '; - value += 'charset=' + localStorage.getItem('tab' + details.tabId); - } - details.responseHeaders[i].value = value; - } - break; - } - } - if(i >= details.responseHeaders.length) { - details.responseHeaders.push({ - name: 'Content-Type', - value: 'text/plain; charset=' + localStorage.getItem('tab' + details.tabId) - }); - } + +const encodingList = new Map(); +const listeners = new Map(); +let defaultEncoding; +let defaultListener; + +const getHeaderModifier = () => details => { + const encoding = encodingList.get(details.tabId) || defaultEncoding; + if (!encoding) { + return; + } + let found = false; + for (const responseHeader of details.responseHeaders) { + if (responseHeader.name.toLowerCase() !== 'content-type') { + continue; } - return {responseHeaders: details.responseHeaders}; -}, {urls: [""]}, options); + found = true; + let value = responseHeader.value.toLowerCase(); + if( + value.startsWith('text') || + value.startsWith('application/javascript') || + value.startsWith('application/x-javascript') || + value.startsWith('application/json') + ) { + if(charsetPattern.test(value)) { + value = value.replace(charsetPattern.exec(value)[1], encoding); + } else { + value += value.substr(-1) === ';' ? ' ' : '; '; + value += `charset=${encoding}`; + } + responseHeader.value = value; + } + break; + } + if (!found) { + details.responseHeaders.push({ + name: 'Content-Type', + value: `text/plain; charset=${encoding}`, + }); + } + return { responseHeaders: details.responseHeaders }; +}; + +const bodyModifier = (tabId, changeInfo, tab) => { + if (!tab.url.toLowerCase().startsWith('file://')) { + return; + } + if (changeInfo.status.toLowerCase() !== 'complete') { + return; + } + const encoding = encodingList.get(tabId) || defaultEncoding; + if (!encoding) { + return; + } + let xmlHttp = new XMLHttpRequest(); + xmlHttp.overrideMimeType(`text/plain; charset=${encoding}`); + xmlHttp.onload = () => { + const is_html = /\.html?$/.test(tab.url); + const data = is_html ? encodeURIComponent(xmlHttp.responseText) : encodeURIComponent(html_special_chars(xmlHttp.responseText)); + chrome.tabs.executeScript(tabId, { + code: `const _t = document.open('text/${is_html ? 'html' : 'plain'}', 'replace'); + _t.write(${is_html ? `decodeURIComponent('${data}')` : `'
' + decodeURIComponent('${data}') + '
'`}); + _t.close();`, + runAt: 'document_start', + }); + }; + xmlHttp.onerror = () => alert(chrome.i18n.getMessage('cannotLoadLocalFile')); + xmlHttp.open('GET', tab.url, true); + xmlHttp.send(); +}; + +const setEncoding = (tabId, encoding) => { + encodingList.set(tabId, encoding); + recordRecentlySelectedEncoding(encoding); + if (defaultEncoding) { + return; + } + if (listeners.size === 0) { + chrome.tabs.onUpdated.addListener(bodyModifier); + } + if (!listeners.has(tabId)) { + const headerModifier = getHeaderModifier(); + listeners.set(tabId, headerModifier); + chrome.webRequest.onHeadersReceived.addListener(headerModifier, { urls: [''], tabId }, options); + } +}; -chrome.tabs.onUpdated.addListener((tabId, changeInfo, tab) => { - if(tab.url.startsWith('file://') && changeInfo.status === 'complete' && localStorage.getItem('tab' + tabId)) { - let xmlHttp = new XMLHttpRequest(); - xmlHttp.overrideMimeType('text/plain; charset=' + localStorage.getItem('tab' + tabId)); - xmlHttp.onload = () => { - const is_html = /\.html?$/.test(tab.url); - const data = is_html ? encodeURI(xmlHttp.responseText) : encodeURI(html_special_chars(xmlHttp.responseText)); - chrome.tabs.executeScript(tabId, { - code: `const _t = document.open('text/${is_html ? 'html' : 'plain'}', 'replace'); - _t.write(${is_html ? `decodeURI('${data}')` : `'
' + decodeURI('${data}') + '
'`}); - _t.close();`, - runAt: 'document_start' - }); - }; - xmlHttp.onerror = () => { - alert(chrome.i18n.getMessage('cannotLoadLocalFile')); - }; - xmlHttp.open('GET', tab.url, true); - xmlHttp.send(); +const resetEncoding = tabId => { + const callback = listeners.get(tabId); + if (callback) { + chrome.webRequest.onHeadersReceived.removeListener(callback); + listeners.delete(tabId); + } + encodingList.delete(tabId); + if (defaultEncoding) { + return; + } + if (listeners.size === 0) { + chrome.tabs.onUpdated.removeListener(bodyModifier); + } +}; + +const getEncoding = tabId => encodingList.get(tabId) || defaultEncoding; + +const setupDefaultEncoding = () => { + defaultEncoding = localStorage.getItem('config_enable_default'); + if (!defaultEncoding) { + return; + } + if (listeners.size === 0) { + chrome.tabs.onUpdated.addListener(bodyModifier); + } + listeners.forEach((callback, tabId) => { + chrome.webRequest.onHeadersReceived.removeListener(callback); + listeners.delete(tabId); + }); + if (!defaultListener) { + defaultListener = getHeaderModifier(); + } + chrome.webRequest.onHeadersReceived.addListener(defaultListener, { urls: [''] }, options); +}; + +const unsetDefaultEncoding = () => { + defaultEncoding = undefined; + chrome.webRequest.onHeadersReceived.removeListener(defaultListener); + encodingList.forEach((encoding, tabId) => { + if (!listeners.has(tabId)) { + const headerModifier = getHeaderModifier(); + listeners.set(tabId, headerModifier); + chrome.webRequest.onHeadersReceived.addListener(headerModifier, { urls: [''], tabId }, options); } + }); + if (listeners.size === 0) { + chrome.tabs.onUpdated.removeListener(bodyModifier); + } +}; + +chrome.runtime.onMessage.addListener((message, sender, sendResponse) => { + switch(message.type) { + case 'setEncoding': sendResponse(setEncoding(message.tabId, message.encoding)); break; + case 'resetEncoding': sendResponse(resetEncoding(message.tabId)); break; + case 'getEncoding': sendResponse(getEncoding(message.tabId)); break; + case 'createMenu': removeMenu(); sendResponse(createMenu()); break; + case 'removeMenu': sendResponse(removeMenu()); break; + case 'setupDefaultEncoding': unsetDefaultEncoding(); sendResponse(setupDefaultEncoding()); break; + case 'unsetDefaultEncoding': sendResponse(unsetDefaultEncoding()); break; + } }); + +setupDefaultEncoding(); diff --git a/j/content.js b/j/content.js deleted file mode 100644 index c1594a9..0000000 --- a/j/content.js +++ /dev/null @@ -1,11 +0,0 @@ -/** - * Created by Liming on 2017/2/14. - */ -"use strict"; -chrome.runtime.onMessage.addListener((message, sender, sendResponse) => { - switch(message.action) { - case 'GetCharset': - sendResponse(document.charset || 'Unknown'); - break; - } -}); diff --git a/j/encoding.js b/j/encoding.js index 807d7af..f0baac9 100644 --- a/j/encoding.js +++ b/j/encoding.js @@ -1,58 +1,73 @@ /** * Created by Liming on 2017/3/22. */ -"use strict"; +const recentlySelectedEncodingList = (localStorage.getItem('recent') || '').split(','); +const LocaleDependentStaticEncodingList = (chrome.i18n.getMessage('staticEncodingList') || '').split(','); //Encoding List const ENCODINGS = [ - ['UTF-8', 'Unicode'], - ['GBK', chrome.i18n.getMessage('Chinese')], - ['GB18030', chrome.i18n.getMessage('Chinese')], - ['Big5', chrome.i18n.getMessage('Chinese')], - ['
'], - ['UTF-16LE', 'Unicode'], - ['Windows-1256', chrome.i18n.getMessage('Arabic')], - ['ISO-8859-6', chrome.i18n.getMessage('Arabic')], - ['ISO-8859-10', chrome.i18n.getMessage('Nordic')], - ['ISO-8859-4', chrome.i18n.getMessage('Baltic')], - ['ISO-8859-13', chrome.i18n.getMessage('Baltic')], - ['Windows-1257', chrome.i18n.getMessage('Baltic')], - ['EUC-KR', chrome.i18n.getMessage('Korean')], - ['ISO-8859-14', chrome.i18n.getMessage('Celtic')], - ['ISO-8859-16', chrome.i18n.getMessage('Romanian')], - ['ISO-8859-3', chrome.i18n.getMessage('SouthEuropean')], - ['Shift_JIS', chrome.i18n.getMessage('Japanese')], - ['EUC-JP', chrome.i18n.getMessage('Japanese')], - ['ISO-2022-JP', chrome.i18n.getMessage('Japanese')], - ['Windows-874', chrome.i18n.getMessage('Thai')], - ['Windows-1254', chrome.i18n.getMessage('Turkish')], - ['Windows-1255', chrome.i18n.getMessage('Hebrew')], - ['ISO-8859-8-I', chrome.i18n.getMessage('Hebrew')], - ['ISO-8859-8', chrome.i18n.getMessage('Hebrew')], - ['ISO-8859-7', chrome.i18n.getMessage('Greek')], - ['Windows-1253', chrome.i18n.getMessage('Greek')], - ['ISO-8859-5', chrome.i18n.getMessage('Cyrillic')], - ['Windows-1251', chrome.i18n.getMessage('Cyrillic')], - ['KOI8-R', chrome.i18n.getMessage('Cyrillic')], - ['KOI8-U', chrome.i18n.getMessage('Cyrillic')], - ['IBM866', chrome.i18n.getMessage('Cyrillic')], - ['Windows-1252', chrome.i18n.getMessage('Western')], - ['ISO-8859-15', chrome.i18n.getMessage('Western')], - ['Macintosh', chrome.i18n.getMessage('Western')], - ['Windows-1258', chrome.i18n.getMessage('Vietnamese')], - ['ISO-8859-2', chrome.i18n.getMessage('CentralEuropean')], - ['Windows-1250', chrome.i18n.getMessage('CentralEuropean')] -]; - -let setEncoding = (tabId, charset, callback) => { - localStorage.setItem('tab' + tabId, charset); - chrome.tabs.reload(tabId, {bypassCache: true}, callback); -}; - -let resetEncoding = (tabId, callback) => { - localStorage.removeItem('tab' + tabId); - chrome.tabs.reload(tabId, {bypassCache: true}, callback); -}; - -let getEncoding = (tabId) => { - return localStorage.getItem('tab' + tabId); -}; + ['
'], + ['Big5', chrome.i18n.getMessage('encodingChineseTraditional')], + ['GBK', chrome.i18n.getMessage('encodingChineseSimplified')], + ['GB18030', chrome.i18n.getMessage('encodingChineseSimplified')], + ['EUC-JP', chrome.i18n.getMessage('encodingJapanese')], + ['EUC-KR', chrome.i18n.getMessage('encodingKorean')], + ['IBM866', chrome.i18n.getMessage('encodingCyrillic')], + ['ISO-2022-JP', chrome.i18n.getMessage('encodingJapanese')], + ['ISO-8859-2', chrome.i18n.getMessage('encodingCentralEuropean')], + ['ISO-8859-3', chrome.i18n.getMessage('encodingSouthEuropean')], + ['ISO-8859-4', chrome.i18n.getMessage('encodingBaltic')], + ['ISO-8859-5', chrome.i18n.getMessage('encodingCyrillic')], + ['ISO-8859-6', chrome.i18n.getMessage('encodingArabic')], + ['ISO-8859-7', chrome.i18n.getMessage('encodingGreek')], + ['ISO-8859-8', chrome.i18n.getMessage('encodingHebrew')], + ['ISO-8859-8-I', chrome.i18n.getMessage('encodingHebrew')], + ['ISO-8859-10', chrome.i18n.getMessage('encodingNordic')], + ['ISO-8859-13', chrome.i18n.getMessage('encodingBaltic')], + ['ISO-8859-14', chrome.i18n.getMessage('encodingCeltic')], + ['ISO-8859-15', chrome.i18n.getMessage('encodingWestern')], + ['ISO-8859-16', chrome.i18n.getMessage('encodingRomanian')], + ['KOI8-R', chrome.i18n.getMessage('encodingCyrillic')], + ['KOI8-U', chrome.i18n.getMessage('encodingCyrillic')], + ['Macintosh', chrome.i18n.getMessage('encodingWestern')], + ['Shift_JIS', chrome.i18n.getMessage('encodingJapanese')], + ['UTF-8', chrome.i18n.getMessage('encodingUnicode')], + ['UTF-16LE', chrome.i18n.getMessage('encodingUnicode')], + ['Windows-874', chrome.i18n.getMessage('encodingThai')], + ['Windows-1250', chrome.i18n.getMessage('encodingCentralEuropean')], + ['Windows-1251', chrome.i18n.getMessage('encodingCyrillic')], + ['Windows-1252', chrome.i18n.getMessage('encodingWestern')], + ['Windows-1253', chrome.i18n.getMessage('encodingGreek')], + ['Windows-1254', chrome.i18n.getMessage('encodingTurkish')], + ['Windows-1255', chrome.i18n.getMessage('encodingHebrew')], + ['Windows-1256', chrome.i18n.getMessage('encodingArabic')], + ['Windows-1257', chrome.i18n.getMessage('encodingBaltic')], + ['Windows-1258', chrome.i18n.getMessage('encodingVietnamese')], +].sort(([a, nameA], [b, nameB]) => { + // we always put UTF-8 as top position + if (a === 'UTF-8') return -1; + if (b === 'UTF-8') return 1; + // then put local dependent encoding items + { + const hasA = LocaleDependentStaticEncodingList.indexOf(a); + const hasB = LocaleDependentStaticEncodingList.indexOf(b); + if (hasA >= 0 && hasB >= 0) return hasA > hasB ? 1 : -1; + if (hasA >= 0) return -1; + if (hasB >= 0) return 1; + } + // then put user recently selected encodings + { + const hasA = recentlySelectedEncodingList.indexOf(a); + const hasB = recentlySelectedEncodingList.indexOf(b); + if (hasA >= 0 && hasB >= 0) return hasA > hasB ? 1 : -1; + if (hasA >= 0) return -1; + if (hasB >= 0) return 1; + } + // then put a delimiter + if (a === '
') return -1; + if (b === '
') return 1; + // then put UTF-16LE + if (a === 'UTF-16LE') return -1; + if (b === 'UTF-16LE') return 1; + // sort all left encodings by their name + return nameA.localeCompare(nameB, chrome.i18n.getUILanguage()); +}); diff --git a/j/menu.js b/j/menu.js index 951f388..aba8bc8 100644 --- a/j/menu.js +++ b/j/menu.js @@ -1,90 +1,77 @@ /** * Created by Liming on 2017/3/22. */ -"use strict"; -(() => { - let _menu = false; - const menuList = {}; - //CreateMenu - const createMenu = () => { - menuList['default'] = chrome.contextMenus.create({ - type: "radio", - title: chrome.i18n.getMessage('default'), - checked: true, - onclick: (info, tab) => { - if(!info.wasChecked) { - resetEncoding(tab.id); - } - } - }); - for(let encoding of ENCODINGS) { - if(encoding.length === 1) { - continue; - } - menuList[encoding[0].toUpperCase()] = chrome.contextMenus.create({ - type: "radio", - title: `${encoding[1]}(${encoding[0]})`, - checked: false, - onclick: (info, tab) => { - if(!info.wasChecked) { - setEncoding(tab.id, encoding[0]); - } - } - }); - } - _menu = true; - }; - //UpdateMenu - const updateMenu = tabId => { - let charset = getEncoding(tabId); - charset = charset ? menuList[charset.toUpperCase()] : menuList['default']; - for(let menu in menuList) { - chrome.contextMenus.update(menuList[menu], { - checked: false - }); - } - chrome.contextMenus.update(charset, { - checked: true - }); - }; - chrome.tabs.onActivated.addListener((activeInfo) => { - if (!_menu) { - return; - } - updateMenu(activeInfo.tabId); - }); - chrome.tabs.onUpdated.addListener((tabId) => { - if (!_menu) { - return; - } - updateMenu(tabId); - }); - chrome.windows.onFocusChanged.addListener(() => { - if (!_menu) { - return; - } - chrome.tabs.query({active: true, currentWindow: true}, (tabs) => { - if(tabs.length === 0) { - return; - } - updateMenu(tabs[0].id); - }); - }); +const rtl = chrome.i18n.getMessage('@@bidi_dir') === 'rtl' ? '\u{200f}' : ''; +const printEncodingInfo = info => `${info[1]} ${rtl}(${info[0]})`; - chrome.runtime.onMessage.addListener((message, sender, sendResponse) => { - switch(message.action) { - case 'ShowMenu': - createMenu(); - break; - case 'HideMenu': - _menu = false; - chrome.contextMenus.removeAll(); - break; - } - }); - const config = localStorage.getItem('config_menu'); - if(config === 'false') { - return; +let selectedMenu; + +const menuClicked = (info, tab) => { + if (info.wasChecked) { + return; + } + if (info.menuItemId === 'default') { + resetEncoding(tab.id); + } else { + setEncoding(tab.id, info.menuItemId); + } + chrome.tabs.reload(tab.id, { bypassCache: true }); +}; + +const updateMenu = tabId => { + const encoding = getEncoding(tabId) || 'default'; + if (selectedMenu === encoding) { + return; + } + chrome.contextMenus.update(selectedMenu, { checked: false }); + chrome.contextMenus.update(encoding, { checked: true }); + selectedMenu = encoding; +}; + +const tabUpdatedEvent = tabId => updateMenu(tabId); +const tabActivatedEvent = activeInfo => updateMenu(activeInfo.tabId); +const windowsFocusedEvent = () => { + chrome.tabs.query({ active: true, currentWindow: true }, tabs => { + if (tabs.length === 0) { + return; + } + updateMenu(tabs[0].id); + }); +}; + +const createMenu = () => { + chrome.contextMenus.create({ + type: 'radio', + id: 'default', + title: chrome.i18n.getMessage('default'), + checked: true, + onclick: menuClicked, + }); + selectedMenu = 'default'; + for (const encoding of ENCODINGS) { + if (encoding.length === 1) { + continue; } - createMenu(); -})(); + chrome.contextMenus.create({ + type: 'radio', + id: encoding[0], + title: printEncodingInfo(encoding), + checked: false, + onclick: menuClicked, + }); + } + chrome.tabs.onUpdated.addListener(tabUpdatedEvent); + chrome.tabs.onActivated.addListener(tabActivatedEvent); + chrome.windows.onFocusChanged.addListener(windowsFocusedEvent); +}; + +const removeMenu = () => { + chrome.contextMenus.removeAll(); + chrome.tabs.onUpdated.removeListener(tabUpdatedEvent); + chrome.tabs.onActivated.removeListener(tabActivatedEvent); + chrome.windows.onFocusChanged.removeListener(windowsFocusedEvent); +}; + +if (localStorage.getItem('config_menu') === 'true') { + createMenu(); +} diff --git a/j/option.js b/j/option.js new file mode 100644 index 0000000..1ddfce6 --- /dev/null +++ b/j/option.js @@ -0,0 +1,72 @@ +/** + * Created by Liming on 2019/3/2. + */ +const rtl = chrome.i18n.getMessage('@@bidi_dir') === 'rtl' ? '‏' : ''; +const printEncodingInfo = info => `${info[1]} ${rtl}(${info[0]})`; + +// I18n +document.getElementById('menu').innerHTML = chrome.i18n.getMessage('optionMenu'); +document.getElementById('default-encoding').innerHTML = chrome.i18n.getMessage('optionDefaultEncoding'); +// Initialize encoding list +const list = document.getElementById('default-encoding-list'); +let option = document.createElement('option'); +option.value = ''; +option.innerHTML = chrome.i18n.getMessage('default'); +list.appendChild(option); +const optgroup = [ + document.createElement('optgroup'), + document.createElement('optgroup'), +]; +optgroup[0].label = chrome.i18n.getMessage('optionRecommendEncoding'); +optgroup[1].label = chrome.i18n.getMessage('optionOtherEncoding'); +let index = 0; +for (const encodingInfo of ENCODINGS) { + if (encodingInfo.length === 1) { + ++index; + continue; + } + option = document.createElement('option'); + option.value = encodingInfo[0]; + option.innerHTML = printEncodingInfo(encodingInfo); + optgroup[index].appendChild(option); +} +optgroup.forEach(o => list.appendChild(o)); +// Current Setting +const contextMenuButton = document.getElementById('context-menu'); +if (contextMenuButton instanceof HTMLInputElement) { + contextMenuButton.checked = (localStorage.getItem('config_menu') === 'true'); +} +if (list instanceof HTMLSelectElement) { + list.value = localStorage.getItem('config_enable_default') || ''; +} +// Fix RTL mode display +if (rtl) { + list.style.backgroundPosition = '8px'; +} +// Change Events +document.body.addEventListener('change', e => { + if (e.target instanceof HTMLInputElement) { + if (e.target.id === 'context-menu') { + if (e.target.checked) { + localStorage.setItem('config_menu', 'true'); + chrome.runtime.sendMessage({ type: 'createMenu' }); + } else { + localStorage.removeItem('config_menu'); + chrome.runtime.sendMessage({ type: 'removeMenu' }); + } + return; + } + } + if (e.target instanceof HTMLSelectElement) { + if (e.target.id === 'default-encoding-list') { + if (e.target.value) { + localStorage.setItem('config_enable_default', e.target.value); + chrome.runtime.sendMessage({ type: 'setupDefaultEncoding' }); + } else { + localStorage.removeItem('config_enable_default'); + chrome.runtime.sendMessage({ type: 'unsetDefaultEncoding' }); + } + return; + } + } +}); diff --git a/j/popup.js b/j/popup.js index 6cf986b..fe00643 100644 --- a/j/popup.js +++ b/j/popup.js @@ -1,72 +1,121 @@ /** * Created by Liming on 2017/2/14. */ -"use strict"; -(() => { - chrome.tabs.query({active: true, currentWindow: true}, (tabs) => { - if(tabs.length === 0) { - return; - } - //Current Charset - if(tabs[0].url.startsWith('file://') && localStorage.getItem('tab' + tabs[0].id)) { - let charset = localStorage.getItem('tab' + tabs[0].id); - for(let encoding of ENCODINGS) { - if(encoding[0].toUpperCase() === charset.toUpperCase()) { - charset += `(${encoding[1]})`; - break; - } - } - document.getElementById('current').innerHTML = charset; - } else { - chrome.tabs.sendMessage(tabs[0].id, {action: 'GetCharset'}, (response) => { - response = response || 'Unknown'; - if(response !== 'Unknown') { - for(let encoding of ENCODINGS) { - if(encoding[0].toUpperCase() === response.toUpperCase()) { - response += `(${encoding[1]})`; - break; - } - } - } - document.getElementById('current').innerHTML = response; - }); - } - //I18N - document.getElementById('reset').innerHTML = chrome.i18n.getMessage('btnReset'); - document.getElementById('tip_current').innerHTML = chrome.i18n.getMessage('tipCurrent'); - document.getElementById('context_menu').innerHTML = chrome.i18n.getMessage('settingMenu'); - //Reset - document.getElementById('reset').addEventListener('click', () => { - resetEncoding(tabs[0].id, () => { - window.close(); - }); - }); - //Make List - let list = document.getElementById('list'); - for(let encoding of ENCODINGS) { - if(encoding.length === 1) { - list.appendChild(document.createElement('hr')); - continue; - } - let button = document.createElement('button'); - button.type = 'button'; - button.dataset.charset = encoding[0]; - button.innerHTML = `${encoding[1]}(${encoding[0]})`; - button.addEventListener('click', (e) => { - setEncoding(tabs[0].id, e.target.dataset.charset, () => { - window.close(); - }); - }); - list.appendChild(button); - } - //Settings - const setting_Menu = document.getElementById('menu'); - setting_Menu.checked = localStorage.getItem('config_menu') !== 'false'; - setting_Menu.addEventListener('change', _ => { - localStorage.setItem('config_menu', setting_Menu.checked); - chrome.runtime.sendMessage({ - action: setting_Menu.checked ? 'ShowMenu' : 'HideMenu' - }); - }); +const rtl = chrome.i18n.getMessage('@@bidi_dir') === 'rtl' ? '‏' : ''; +const printEncodingInfo = info => `${info[1]} ${rtl}(${info[0]})`; + +const distance = (x1, y1, x2, y2) => { + var xDelta = x1 - x2; + var yDelta = y1 - y2; + return Math.sqrt(xDelta * xDelta + yDelta * yDelta); +}; + +chrome.tabs.query({ active: true, currentWindow: true }, async tabs => { + if (tabs.length === 0) { + return; + } + // Detect current encoding + const currentDOM = document.getElementById('current'); + currentDOM.innerHTML = '......'; + const fileEncoding = tabs[0].url.startsWith('file://') && + await new Promise(resolve => chrome.runtime.sendMessage({ type: 'getEncoding', tabId: tabs[0].id }, resolve)); + if (fileEncoding) { + const encodingInfo = ENCODINGS.find(e => e[0].toUpperCase() === fileEncoding.toUpperCase()); + currentDOM.innerHTML = encodingInfo ? printEncodingInfo(encodingInfo) : chrome.i18n.getMessage('unknown'); + } else { + chrome.tabs.executeScript(tabs[0].id, { code: 'document.charset' }, results => { + if (!results || !results[0]) { + currentDOM.innerHTML = chrome.i18n.getMessage('unknown'); + return chrome.runtime.lastError; + } + const encodingInfo = ENCODINGS.find(e => e[0].toUpperCase() === String(results[0]).toUpperCase()); + currentDOM.innerHTML = printEncodingInfo(encodingInfo || [results[0], chrome.i18n.getMessage('unknown')]); }); -})(); + } + // I18n + document.getElementById('reset').innerHTML = chrome.i18n.getMessage('btnReset'); + document.getElementById('tip-current').innerHTML = chrome.i18n.getMessage('tipCurrent'); + // Setted default encoding + const defaultEncoding = localStorage.getItem('config_enable_default'); + if (defaultEncoding) { + const encodingInfo = ENCODINGS.find(e => e[0].toUpperCase() === defaultEncoding.toUpperCase()); + const defaultTip = document.getElementById('default-tip'); + defaultTip.innerHTML = chrome.i18n.getMessage('defaultEncodingEnabled', [printEncodingInfo(encodingInfo)]); + defaultTip.title = chrome.i18n.getMessage('tipDisableDefaultEncoding'); + defaultTip.addEventListener('click', () => chrome.runtime.openOptionsPage()); + } + // Reset button + document.getElementById('reset').addEventListener('click', () => { + chrome.runtime.sendMessage({ type: 'resetEncoding', tabId: tabs[0].id }, () => { + chrome.tabs.reload(tabs[0].id, { bypassCache: true }, () => window.close()); + }); + }); + // Initialize encoding list + const list = document.getElementById('list'); + list.addEventListener('click', e => { + if(!(e.target instanceof HTMLButtonElement && e.target.dataset.encoding)) { + return; + } + chrome.runtime.sendMessage({ type: 'setEncoding', tabId: tabs[0].id, encoding: e.target.dataset.encoding }, () => { + chrome.tabs.reload(tabs[0].id, { bypassCache: true }, () => window.close()); + }); + }); + for (const encodingInfo of ENCODINGS) { + if (encodingInfo.length === 1) { + list.appendChild(document.createElement('hr')); + continue; + } + const button = document.createElement('button'); + button.type = 'button'; + button.dataset.encoding = encodingInfo[0]; + button.innerHTML = printEncodingInfo(encodingInfo); + list.appendChild(button); + } + // Ripple animate event + let inks = []; + const removeInks = () => { + for (const ink of inks) { + if (ink.parentElement) { + ink.parentElement.removeChild(ink); + } + } + inks = []; + }; + document.body.addEventListener('mousedown', e => { + removeInks(); + if (!(e && e.target instanceof HTMLButtonElement)) { + return; + } + const rect = e.target.getBoundingClientRect(); + const x = Math.round(e.clientX - rect.left); + const y = Math.round(e.clientY - rect.top); + const cornerDistances = [ + { x: 0, y: 0 }, + { x: rect.width, y: 0 }, + { x: 0, y: rect.height }, + { x: rect.width, y: rect.height }, + ].map(corner => Math.round(distance(x, y, corner.x, corner.y))); + const radius = Math.max(...cornerDistances); + const startTranslate = `${x - radius}px, ${y - radius}px`; + const ripple = document.createElement('div'); + ripple.classList.add('ripple'); + ripple.style.height = ripple.style.width = `${2 * radius}px`; + const ink = document.createElement('div'); + ink.classList.add('ink'); + ink.appendChild(ripple); + e.target.appendChild(ink); + const duration = Math.max(800, Math.log(radius) * radius); + ripple.animate({ + transform: [ + `translate(${startTranslate}) scale(0)`, + `translate(${startTranslate}) scale(1)`, + ], + }, { + duration, + easing: 'cubic-bezier(.2, .9, .1, .9)', + fill: 'forwards', + }); + inks.push(ink); + }); + document.body.addEventListener('mouseup', removeInks); +}); diff --git a/manifest.json b/manifest.json index 9fe46b6..f646da5 100644 --- a/manifest.json +++ b/manifest.json @@ -1,49 +1,49 @@ { - "manifest_version": 2, - "name": "__MSG_appName__", - "version": "0.4.3", - "default_locale": "en", - "description": "__MSG_appDescription__", - "icons": { - "128": "i/128.png", - "64": "i/64.png", - "38": "i/38.png", - "32": "i/32.png", - "19": "i/19.png", - "16": "i/16.png" + "manifest_version": 2, + "name": "__MSG_appName__", + "version": "0.5.0", + "default_locale": "en", + "description": "__MSG_appDescription__", + "icons": { + "128": "i/128.png", + "64": "i/64.png", + "38": "i/38.png", + "32": "i/32.png", + "19": "i/19.png", + "16": "i/16.png" + }, + "browser_action": { + "default_icon": { + "38": "i/38.png", + "19": "i/19.png" }, - "browser_action": { - "default_icon": { - "38": "i/38.png", - "19": "i/19.png" - }, - "default_title": "__MSG_appName__", - "default_popup": "popup.html" - }, - "author": "Liming Jin, jinliming2@gmail.com", - "background": { - "scripts": [ - "j/background.js", - "j/encoding.js", - "j/menu.js" - ] - }, - "content_scripts": [ - { - "matches": [""], - "js": ["j/content.js"], - "run_at": "document_start" - } - ], - "homepage_url": "https://github.com/jinliming2/Chrome-Charset", - "incognito": "split", - "minimum_chrome_version": "55", - "permissions": [ - "", - "webRequest", - "webRequestBlocking", - "contextMenus", - "tabs" + "default_title": "__MSG_appName__", + "default_popup": "popup.html" + }, + "author": "Liming Jin, jinliming2@gmail.com", + "background": { + "scripts": [ + "j/encoding.js", + "j/background.js", + "j/menu.js" ], - "short_name": "__MSG_appShortName__" + "persistent": true + }, + "homepage_url": "https://github.com/jinliming2/Chrome-Charset", + "incognito": "split", + "minimum_chrome_version": "55.0.2872.0", + "offline_enabled": true, + "options_ui": { + "chrome_style": false, + "page": "option.html", + "open_in_tab": false + }, + "permissions": [ + "", + "webRequest", + "webRequestBlocking", + "contextMenus", + "tabs" + ], + "short_name": "__MSG_appShortName__" } diff --git a/option.html b/option.html new file mode 100644 index 0000000..3924413 --- /dev/null +++ b/option.html @@ -0,0 +1,37 @@ + + + + + + + + + + + +
+ +
+
+ + +
+ + diff --git a/popup.html b/popup.html index 44947c4..139e18b 100644 --- a/popup.html +++ b/popup.html @@ -1,27 +1,21 @@ - + - - - - + + + + + + -
- -
- -
-
-
-
- -
- - -
-
- - +
+ + +
+
+ +
+