From 6a5997655d9f2fa583bf707a5611bbb0c0f109fc Mon Sep 17 00:00:00 2001 From: Christophe Besson Date: Tue, 8 Sep 2026 03:11:22 +0200 Subject: fix(hub): drop the flag emoji from the language menu MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Claude-Session: https://claude.ai/code/session_01V8EDjk6pkYZrCbo63m2x87 --- packages/meshbay-hub/src/meshbay_hub/static/app.js | 2 +- .../meshbay-hub/src/meshbay_hub/static/i18n.js | 27 ++++++++++++++-------- 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` 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); -- cgit v1.2.3