aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristophe Besson <cbesson@gmail.com>2026-09-08 03:11:22 +0200
committerChristophe Besson <cbesson@gmail.com>2026-09-08 03:11:22 +0200
commit6a5997655d9f2fa583bf707a5611bbb0c0f109fc (patch)
tree6e3e34e1d2b402850f870e54d60c9fd1110ab206
parent436aa6d01ea3a9d2a6cd5d04b284c48db6d6f90c (diff)
downloadmeshbay-6a5997655d9f2fa583bf707a5611bbb0c0f109fc.tar.gz
fix(hub): drop the flag emoji from the language menu
The flags were regional-indicator pairs, which Windows has never shipped a glyph for: Segoe UI Emoji renders the pair as its two letters, so the menu read "GB", "FR", "NL" down the left-hand side instead of a flag. It only ever looked right on a system with an emoji font that draws them, such as GNOME's. Names only, rather than vendoring ten flag images. A flag is a country and not a language anyway — none of them is the right answer for "Português (Brasil)" — and each name is already written in its own language, which is the self-identifying signal the flag was standing in for. The `flag` field is removed from LOCALES rather than left unread; app.js's menu was its only consumer. The submenu keeps its indent from .user-menu-sub's padding, not from the icon box that is now gone. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01V8EDjk6pkYZrCbo63m2x87
-rw-r--r--packages/meshbay-hub/src/meshbay_hub/static/app.js2
-rw-r--r--packages/meshbay-hub/src/meshbay_hub/static/i18n.js27
2 files changed, 18 insertions, 11 deletions
diff --git a/packages/meshbay-hub/src/meshbay_hub/static/app.js b/packages/meshbay-hub/src/meshbay_hub/static/app.js
index aa0034c..9f925c3 100644
--- a/packages/meshbay-hub/src/meshbay_hub/static/app.js
+++ b/packages/meshbay-hub/src/meshbay_hub/static/app.js
@@ -109,7 +109,7 @@ function UserMenu({ user, theme, onThemeChange, onLogout }) {
${langOpen && LOCALES.map(l => html`
<button key=${l.code} class="user-menu-item user-menu-sub"
onClick=${() => { setLocale(l.code); window.location.reload(); }}>
- <span class="umi-icon">${l.flag}</span> ${l.name}
+ ${l.name}
${getLocale() === l.code
&& html`<${Icon} name="check" cls="umi-check" />`}
</button>
diff --git a/packages/meshbay-hub/src/meshbay_hub/static/i18n.js b/packages/meshbay-hub/src/meshbay_hub/static/i18n.js
index 48408d9..56d35f7 100644
--- a/packages/meshbay-hub/src/meshbay_hub/static/i18n.js
+++ b/packages/meshbay-hub/src/meshbay_hub/static/i18n.js
@@ -21,17 +21,24 @@
const LANG_KEY = 'mb_lang';
const FALLBACK = 'en';
+// No flag emoji. They were regional-indicator pairs, which Windows has never
+// shipped a glyph for — Segoe UI Emoji renders the pair as its two letters, so
+// the menu read "GB", "FR", "NL" down the left-hand side instead of a flag.
+// The alternative was to vendor ten flag images; not worth it, because a flag
+// is a country and not a language anyway (which of them would mean Português
+// (Brasil)?). The name alone carries it: each is written in its own language,
+// which is the self-identifying signal the flag was standing in for.
export const LOCALES = [
- { code: 'en', name: 'English', flag: '\u{1F1EC}\u{1F1E7}' },
- { code: 'fr', name: 'Français', flag: '\u{1F1EB}\u{1F1F7}' },
- { code: 'es', name: 'Español', flag: '\u{1F1EA}\u{1F1F8}' },
- { code: 'pt-BR', name: 'Português (Brasil)', flag: '\u{1F1E7}\u{1F1F7}' },
- { code: 'zh-CN', name: '简体中文', flag: '\u{1F1E8}\u{1F1F3}' },
- { code: 'ja', name: '日本語', flag: '\u{1F1EF}\u{1F1F5}' },
- { code: 'de', name: 'Deutsch', flag: '\u{1F1E9}\u{1F1EA}' },
- { code: 'it', name: 'Italiano', flag: '\u{1F1EE}\u{1F1F9}' },
- { code: 'nl', name: 'Nederlands', flag: '\u{1F1F3}\u{1F1F1}' },
- { code: 'pl', name: 'Polski', flag: '\u{1F1F5}\u{1F1F1}' },
+ { code: 'en', name: 'English' },
+ { code: 'fr', name: 'Français' },
+ { code: 'es', name: 'Español' },
+ { code: 'pt-BR', name: 'Português (Brasil)' },
+ { code: 'zh-CN', name: '简体中文' },
+ { code: 'ja', name: '日本語' },
+ { code: 'de', name: 'Deutsch' },
+ { code: 'it', name: 'Italiano' },
+ { code: 'nl', name: 'Nederlands' },
+ { code: 'pl', name: 'Polski' },
];
const _codes = LOCALES.map(l => l.code);