diff --git a/settings.html b/settings.html index 87278f15..d43477be 100644 --- a/settings.html +++ b/settings.html @@ -1248,22 +1248,26 @@ if (!webLangPick) return; let osLoc = "en-US"; try { osLoc = (C.systemLocale && await C.systemLocale()) || "en-US"; } catch {} - // Supported-by-the-translator languages come enabled; the rest are - // shown but disabled with a "— coming later" suffix, so the picker is - // a roadmap, not a lie — the user sees which languages the chip will - // actually translate pages into today. "Other…" is still here for a - // user who needs to pin an unlisted BCP-47 tag for Accept-Language - // alone, but it's marked so they know translation won't follow. + // Partitioned into two s so the dropdown reads as a map, + // not a lottery: the languages the translator actually handles come + // first in their own group, every other entry sits under the second + // group with a greyed "— translator coming later" tail. "Other…" + // stays below for a user who needs to pin a tag that is not on the + // list for Accept-Language purposes only. const SUPPORTED = new Set(["en", "es", "fr", "de", "el", "ru"]); const baseOf = (t) => String(t || "").split("-")[0].toLowerCase(); - const opts = [``, - ...WEB_LANG_QUICK.map((L) => { - const supported = SUPPORTED.has(baseOf(L.tag)); - return supported - ? `` - : ``; - }), - ``]; + const supportedLangs = WEB_LANG_QUICK.filter((L) => SUPPORTED.has(baseOf(L.tag))); + const otherLangs = WEB_LANG_QUICK.filter((L) => !SUPPORTED.has(baseOf(L.tag))); + const opts = [ + ``, + ``, + ...supportedLangs.map((L) => ``), + ``, + ``, + ...otherLangs.map((L) => ``), + ``, + ``, + ]; webLangPick.innerHTML = opts.join(""); const paint = (cur) => { const mode = cur.languageMode || "show";