aboutsummaryrefslogtreecommitdiffstats
path: root/src/features
diff options
context:
space:
mode:
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];