Swedish interface: labels and short texts across every page

About 1,600 more headings, buttons, table columns, status words, placeholders and short messages are translated. Tables of words built when the app loads are now read when they are drawn, so they follow the language, and a test fails if text is translated at load time.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
bobbanandClaude Sonnet 5.5 committed 2026-11-16 20:16:39 +01:00
1 parent 25183c0320
commit 6e39430a1f
173 files changed
+3922 -2245

No files matched your search

+1 -1
View File
@@ -35,7 +35,7 @@ tn(n, "{n} server", "{n} servers") // the one form for 1, the many form o
- The Swedish is an entry in `web/src/i18n/sv.ts`: `"Save": "Spara"`. A text with no entry is shown as written, so nothing breaks while it is waiting for a translation.
- **Keep the `{placeholders}` the same** in the Swedish as in the English. A test (`server/test/language.test.ts`) checks that, that no entry is empty, and that every page of the menu has a Swedish name.
- Brand and product names (Proxmox, Synology, Docker …) are the same in both languages and have no entry.
- Do not call `t()` where a module is loaded (in a constant outside any component or function): it would be fixed to the language at that moment. Keep the English in the constant and call `t(label)` where it is drawn, as the menu (`layout/nav.tsx`) does.
- Do not call `t()` where a module is loaded (in a constant outside any component or function): it would be fixed to the language at that moment. Keep the English in the constant and call `t(label)` where it is drawn, as the menu (`layout/nav.tsx`) does. Where a constant holds a table of words, a getter does the same without touching where it is drawn: `{ get label() { return t("Running"); } }`. A test (`server/test/language.test.ts`) fails on any `t()` called outside a function.
- Do not translate half a sentence that runs on into a link or more English: put the whole sentence in one `t()` with placeholders, or leave it all English.
- A local variable called `t` hides the function; call such a variable something else (`todo`, `item`).
- Changing the language re-draws the whole app (the tree is keyed on it), so no component needs to subscribe to anything.