diff --git a/main.js b/main.js index a7ddce83..20836a77 100644 --- a/main.js +++ b/main.js @@ -4058,32 +4058,39 @@ ipcMain.handle("tab-context-menu-popup", (e, tabId, rect) => { // (languageMode="show", follow OS) or a specific BCP-47 tag // (languageMode="manual", languageValue=). One truth source, two entry // points. Applied via applyAcceptLanguage() + applyFingerprintAll() below. -// Labels are the language's own name in its own script — no BCP-47 tag in -// the label. The tag only surfaces as the 2-letter code on the URL-bar chip -// once picked. English is the UK original (en-GB); the US variant is 90%+ -// the same text and shared the "EN" chip code, so it isn't a separate row. +// Labels are the language's own name in its own script — no BCP-47 tag in the +// label. The tag only surfaces as the 2-letter chip in the URL bar once picked. +// Only the original of each language: English is UK (en-GB), Spanish is Spain +// (es-ES), Portuguese is Portugal (pt-PT). Regional variants are the same 2- +// letter chip and ~same text, so they aren't separate rows. Ordered by global +// speakers, European languages first. const WEBSITE_LANGUAGE_QUICK = [ + // European (ranked by global speakers) { tag: "en-GB", label: "English" }, { tag: "es-ES", label: "Español" }, - { tag: "pt-BR", label: "Português (Brasil)" }, { tag: "fr-FR", label: "Français" }, + { tag: "pt-PT", label: "Português" }, + { tag: "ru-RU", label: "Русский" }, { tag: "de-DE", label: "Deutsch" }, { tag: "it-IT", label: "Italiano" }, - { tag: "nl-NL", label: "Nederlands" }, - { tag: "ru-RU", label: "Русский" }, - { tag: "pl-PL", label: "Polski" }, { tag: "tr-TR", label: "Türkçe" }, - { tag: "ar", label: "العربية" }, - { tag: "he-IL", label: "עברית" }, + { tag: "pl-PL", label: "Polski" }, + { tag: "nl-NL", label: "Nederlands" }, { tag: "el-GR", label: "Ελληνικά" }, + { tag: "cs-CZ", label: "Čeština" }, + { tag: "sv-SE", label: "Svenska" }, + { tag: "fi-FI", label: "Suomi" }, + // Non-European (ranked by global speakers) { tag: "zh-CN", label: "中文(简体)" }, - { tag: "zh-TW", label: "中文(繁體)" }, - { tag: "ja-JP", label: "日本語" }, - { tag: "ko-KR", label: "한국어" }, { tag: "hi-IN", label: "हिन्दी" }, - { tag: "vi-VN", label: "Tiếng Việt" }, - { tag: "th-TH", label: "ไทย" }, + { tag: "ar", label: "العربية" }, { tag: "id-ID", label: "Bahasa Indonesia" }, + { tag: "ja-JP", label: "日本語" }, + { tag: "vi-VN", label: "Tiếng Việt" }, + { tag: "ko-KR", label: "한국어" }, + { tag: "th-TH", label: "ไทย" }, + { tag: "he-IL", label: "עברית" }, + { tag: "zh-TW", label: "中文(繁體)" }, ]; function setWebsiteLanguage(mode, value) { if (mode === "show") { diff --git a/settings.html b/settings.html index e3cac5db..a243df31 100644 --- a/settings.html +++ b/settings.html @@ -979,25 +979,36 @@ // row edits. "Auto" = languageMode="show" (follow OS); anything else // switches to languageMode="manual" and pins languageValue. // Same list the toolbar globe menu uses (kept in sync with - // WEBSITE_LANGUAGE_QUICK in main.js). Language name in its own script; - // the BCP-47 tag only surfaces as the 2-letter chip in the URL bar once - // picked, never in the picker. English is the UK original (en-GB) — - // the US variant is 90%+ the same text and shared "EN" anyway. + // WEBSITE_LANGUAGE_QUICK in main.js). Only the original of each language + // — English UK, Spanish Spain, Portuguese Portugal. Ordered by global + // speakers, European languages first. const WEB_LANG_QUICK = [ + // European (ranked by global speakers) { tag: "en-GB", label: "English" }, - { tag: "es-ES", label: "Español (España)" }, { tag: "es-MX", label: "Español (México)" }, - { tag: "pt-BR", label: "Português (Brasil)" }, { tag: "pt-PT", label: "Português (Portugal)" }, - { tag: "fr-FR", label: "Français" }, { tag: "de-DE", label: "Deutsch" }, - { tag: "it-IT", label: "Italiano" }, { tag: "nl-NL", label: "Nederlands" }, + { tag: "es-ES", label: "Español" }, + { tag: "fr-FR", label: "Français" }, + { tag: "pt-PT", label: "Português" }, { tag: "ru-RU", label: "Русский" }, - { tag: "pl-PL", label: "Polski" }, { tag: "cs-CZ", label: "Čeština" }, - { tag: "sv-SE", label: "Svenska" }, { tag: "fi-FI", label: "Suomi" }, - { tag: "tr-TR", label: "Türkçe" }, { tag: "el-GR", label: "Ελληνικά" }, - { tag: "he-IL", label: "עברית" }, { tag: "ar", label: "العربية" }, - { tag: "hi-IN", label: "हिन्दी" }, { tag: "zh-CN", label: "中文(简体)" }, - { tag: "zh-TW", label: "中文(繁體)" }, { tag: "ja-JP", label: "日本語" }, - { tag: "ko-KR", label: "한국어" }, { tag: "vi-VN", label: "Tiếng Việt" }, - { tag: "th-TH", label: "ไทย" }, { tag: "id-ID", label: "Bahasa Indonesia" }, + { tag: "de-DE", label: "Deutsch" }, + { tag: "it-IT", label: "Italiano" }, + { tag: "tr-TR", label: "Türkçe" }, + { tag: "pl-PL", label: "Polski" }, + { tag: "nl-NL", label: "Nederlands" }, + { tag: "el-GR", label: "Ελληνικά" }, + { tag: "cs-CZ", label: "Čeština" }, + { tag: "sv-SE", label: "Svenska" }, + { tag: "fi-FI", label: "Suomi" }, + // Non-European (ranked by global speakers) + { tag: "zh-CN", label: "中文(简体)" }, + { tag: "hi-IN", label: "हिन्दी" }, + { tag: "ar", label: "العربية" }, + { tag: "id-ID", label: "Bahasa Indonesia" }, + { tag: "ja-JP", label: "日本語" }, + { tag: "vi-VN", label: "Tiếng Việt" }, + { tag: "ko-KR", label: "한국어" }, + { tag: "th-TH", label: "ไทย" }, + { tag: "he-IL", label: "עברית" }, + { tag: "zh-TW", label: "中文(繁體)" }, ]; // "English" for a locale tag ("en-US" → "English", "de-DE" → "German") via // browser Intl. Used for the "Automatic (…)" label so it reads as a