diff options
| -rw-r--r-- | packages/meshbay-hub/src/meshbay_hub/static/app.js | 2 | ||||
| -rw-r--r-- | packages/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` <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); |