From 4d2f331908b953918bb19da0e174c69016445680 Mon Sep 17 00:00:00 2001 From: Thales <> Date: Sat, 22 Aug 2026 07:50:35 +0100 Subject: [PATCH 1/3] Add German, Portuguese, and Indonesian translations; fix i18n coverage gaps Extends the existing English/Polish/Japanese/Simplified Chinese i18n system to seven languages total. Also fixes several pre-existing i18n coverage gaps found while auditing: the recent-tracks list, search placeholder, and trash empty-state were hardcoding English text instead of using the translation system; a presence-panel legend lacked data-i18n attributes; upload/job/ playlist error toasts were untranslated; and library list content did not refresh on a live language switch. Widened the settings dropdown to fit the longest new language name and the device-select to stop truncating longer translated values. Bumps the Unraid template pin to 0.13.0. --- static/css/daw.css | 9 +- static/css/variables.css | 11 +- static/index.html | 313 ++-- static/js/catalog.js | 450 +++-- static/js/constants.js | 27 +- static/js/i18n.js | 3519 ++++++++++++++++++++++++++++++++++++ static/js/job.js | 44 +- static/js/main.js | 47 +- static/js/mixer.js | 9 +- static/js/notifications.js | 45 +- static/js/phrases.js | 238 ++- static/js/player.js | 39 +- static/js/playlist.js | 34 +- static/js/queue.js | 4 +- static/js/sections.js | 10 +- static/js/transport.js | 48 +- templates/stemdeck.xml | 2 +- 17 files changed, 4316 insertions(+), 533 deletions(-) create mode 100644 static/js/i18n.js diff --git a/static/css/daw.css b/static/css/daw.css index f802aea9..95734294 100644 --- a/static/css/daw.css +++ b/static/css/daw.css @@ -474,7 +474,11 @@ input, textarea { font-family: inherit; } .rail-btn:hover { background: var(--panel); color: var(--fg-2); } .rail-btn.active { color: var(--accent); background: var(--panel); } .rail-btn svg { flex-shrink: 0; } -.rail-btn span { white-space: nowrap; } +/* max-width + ellipsis: a translated label (e.g. Polish "Ustawienia") can run + longer than English at this 9px size inside the fixed 40px button. The + full text is still reachable via the button's title/aria-label; this just + guarantees the label itself can never visually overflow the rail column. */ +.rail-btn > span { white-space: nowrap; max-width: 56px; overflow: hidden; text-overflow: ellipsis; } /* Queue rail button. Only present while something is importing, so the rail stays as it is today for anyone not using the queue. */ @@ -949,6 +953,9 @@ input, textarea { font-family: inherit; } .settings-num-input, .settings-select { flex-shrink: 0; width: 84px; background: rgba(10,17,24,0.6); border: 1px solid var(--border-strong); border-radius: 7px; color: var(--fg); font-family: var(--font-mono); font-size: 12px; padding: 6px 9px; } .settings-num-input { text-align: right; } .settings-select { cursor: pointer; } +/* Wider variant for options whose text doesn't fit the shared 84px column -- + currently just the language picker (flag + native name, up to "Bahasa Indonesia"). */ +.settings-select-wide { width: 190px; } .settings-num-input:focus, .settings-select:focus { outline: none; border-color: rgba(244,183,64,0.5); } /* Settings → network access section */ diff --git a/static/css/variables.css b/static/css/variables.css index c36a4f22..cf68fad0 100644 --- a/static/css/variables.css +++ b/static/css/variables.css @@ -44,8 +44,15 @@ --focus-ring: rgba(236,236,236,0.55); /* Typography */ - --font-sans: 'Inter', -apple-system, system-ui, sans-serif; - --font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace; + /* Explicit CJK fallbacks for Japanese/Simplified Chinese (i18n, EN/PL/JA/ZH): + neither Inter nor JetBrains Mono carries CJK glyphs, so without these the + browser still substitutes automatically, just to whichever CJK font it + picks on its own -- naming one keeps weight/x-height consistent with the + Latin text sitting next to it across platforms, rather than leaving it to + chance. Never affects EN/PL text: browsers only reach past the first name + a glyph is missing from. */ + --font-sans: 'Inter', -apple-system, system-ui, 'Hiragino Sans', 'Noto Sans JP', 'PingFang SC', 'Microsoft YaHei', 'Noto Sans SC', sans-serif; + --font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, Consolas, 'Hiragino Sans', 'Noto Sans JP', 'PingFang SC', 'Microsoft YaHei', 'Noto Sans SC', monospace; /* Layout */ --header-w: 300px; diff --git a/static/index.html b/static/index.html index 0aec3fdc..a405252d 100644 --- a/static/index.html +++ b/static/index.html @@ -1,5 +1,5 @@ - +
@@ -40,6 +40,7 @@ id="url" type="url" placeholder="Paste a YouTube or SoundCloud link, or drop an audio file…" + data-i18n-placeholder="topbar.urlPlaceholder" spellcheck="false" autocomplete="off" /> @@ -50,9 +51,9 @@ - + -