From b530a7015ef6a1126350a9a30cb49dba7cb3f114 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Sat, 10 Oct 2026 08:56:15 -0700 Subject: Italiano: the locale itself and the language list (the previous commit carried only the test's rename — see 3032399 for the description). MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01Vps2H27rhbG9ZqseGfMrc3 --- src/features/messages.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/features/messages.js') 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]; -- cgit v1.2.3