aboutsummaryrefslogtreecommitdiffstats
path: root/src/features
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2026-10-10 08:56:15 -0700
committerAdam Soltys <[email protected]>2026-10-10 08:56:15 -0700
commitb530a7015ef6a1126350a9a30cb49dba7cb3f114 (patch)
tree3c767b52a59a7446f1d1c6e8e1a5206fdbf6874a /src/features
parent3032399aeac4d055b97eeff122284def7733a650 (diff)
downloadcoinosv3-b530a7015ef6a1126350a9a30cb49dba7cb3f114.tar.gz
coinosv3-b530a7015ef6a1126350a9a30cb49dba7cb3f114.zip
Italiano: the locale itself and the language list (the previous commit carried only the test's rename — see 3032399 for the description).
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Vps2H27rhbG9ZqseGfMrc3
Diffstat (limited to 'src/features')
-rw-r--r--src/features/messages.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/features/messages.js b/src/features/messages.js
index ff02304..35f4712 100644
--- a/src/features/messages.js
+++ b/src/features/messages.js
@@ -42,7 +42,7 @@ import { decodeBolt11 } from '../ark/lightning.js';
import { hexToBytes, bytesToHex } from '@noble/hashes/utils';
import { sha256 } from '@noble/hashes/sha256';
import { base64urlnopad } from '@scure/base';
-import { t, getLang } from '../i18n.js';
+import { t, getLang, LANGS } from '../i18n.js';
import { verifyEvent } from 'nostr-tools/pure';
import { createGifPicker, gifMedia } from '../gif-picker.js';
import { inLanguage, isMachinePost, guessLang } from '../lang-guess.js';
@@ -4175,7 +4175,7 @@ export function messagesFeature(ctx) {
// else the app's.
const TRANSLATE_TO_KEY = 'coinos-translate-to';
const TRANSLATE_TARGETS = ['ar', 'bn', 'cs', 'da', 'de', 'el', 'en', 'es', 'fa', 'fi', 'fr', 'he', 'hi', 'hu', 'id', 'it', 'ja', 'ko', 'nl', 'pl', 'pt', 'ro', 'ru', 'sk', 'sv', 'th', 'tr', 'uk', 'ur', 'vi', 'zh'];
- const APP_LANGS = new Set(['en', 'zh', 'hi', 'es', 'fr', 'ar', 'bn', 'pt', 'ru', 'ur', 'id', 'de', 'ja', 'sw', 'mr', 'te', 'tr', 'ta', 'vi', 'ko']);
+ const APP_LANGS = new Set(LANGS.map(([c]) => c));
function transLang() {
try { const v = localStorage.getItem(TRANSLATE_TO_KEY); if (v) return v; } catch {}
const phone = (typeof navigator !== 'undefined' && (navigator.languages || [navigator.language])[0] || '').toLowerCase().split(/[-_]/)[0];