mirror of
https://github.com/Corfirean/coa-server-manager.git
synced 2026-11-20 03:25:56 +00:00
Translations: settings schema overlays (ru/de/fr/es), diagnostics, update steps, companion sizes, friends notes; dev mock for settings pages; docs/TRANSLATIONS.md
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
a4b9ae81c7
commit
38b5b86be1
22 files changed
+2552
-33
No files matched your search
@@ -484,9 +484,11 @@ The reference install classifies as **Healthy (customised)**: repack shape, bina
|
||||
translations are reviewed by native speakers before release, with an English fallback for missing keys and a CI check
|
||||
that every locale has every key. Do this before the first public release so strings are not retro-fitted.
|
||||
|
||||
**Status (2026-09-30):** catalogue + picker + all screens translated (en/ru/de/fr/es drafts, `tools/check-i18n.mjs` checks
|
||||
keys/placeholders). Still English: settings-schema titles/descriptions/presets, companion size names, diagnostics check
|
||||
texts and update step names coming from the backend (need `schemas/i18n/<locale>.json` overlays and code-keyed backend strings).
|
||||
**Status (2026-09-30, updated):** catalogue + picker + every screen translated (en/ru/de/fr/es drafts); settings-schema titles,
|
||||
descriptions, categories, presets, options and units are translated through overlays in `src/i18n/schema/`; diagnostics
|
||||
checks, update steps, companion sizes and friends notes are recognised and translated in the UI. `tools/check-i18n.mjs`
|
||||
verifies keys, placeholders and overlay coverage. Still English: free-form backend technical messages. Native-speaker
|
||||
review is still needed (see `docs/TRANSLATIONS.md`).
|
||||
|
||||
* **Language choice on the very first screen** (requested 2026-09-30): the welcome screen must offer the language picker
|
||||
right away (before any other text is read), preselected from the OS language; the choice is persisted and shared with
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
# Translations
|
||||
|
||||
The Manager interface exists in English (source), Russian, German, French and Spanish. Everything except English is a
|
||||
**draft written by an AI assistant and needs review by a native speaker** before it is treated as final.
|
||||
|
||||
## Where the texts are
|
||||
|
||||
| What | File | Notes |
|
||||
|---|---|---|
|
||||
| Interface texts | `src/i18n/locales/<lang>.ts` | flat `"key": "text"` lists; `en.ts` is the source of truth, other languages fall back to it |
|
||||
| Setting titles, descriptions, categories, presets, units, option labels | `src/i18n/schema/<lang>.json` | generated once from `schemas/*.json`; edit the JSON directly |
|
||||
| Backend error messages | keys `err.<code>.title` / `err.<code>.message` in the locale files | codes come from `crates/coa-core/src/error.rs` |
|
||||
|
||||
`{name}` placeholders must stay exactly as they are. Plural forms use the suffixes `_one`, `_few`, `_many`, `_other`
|
||||
(the browser picks the right one for the language).
|
||||
|
||||
## Checking your work
|
||||
|
||||
```
|
||||
node tools/check-i18n.mjs # unknown keys, changed placeholders, coverage, schema overlays complete
|
||||
npx tsc --noEmit # types
|
||||
npx vite # UI with mock data in a browser; pick the language on the welcome screen
|
||||
```
|
||||
|
||||
## Adding a language
|
||||
|
||||
1. Copy `src/i18n/locales/en.ts` to `<lang>.ts` (keep the keys), translate, and register it in `src/i18n/index.tsx`
|
||||
(`Locale`, `LOCALES`, `DICTS`).
|
||||
2. Copy `src/i18n/schema/ru.json` to `<lang>.json`, translate the values, and register it in `SCHEMA`.
|
||||
3. Run the check above.
|
||||
|
||||
## Known gaps
|
||||
|
||||
* Free-form technical messages produced deep inside the backend (`Error::Invalid("...")`) stay in English; they are
|
||||
shown as "technical details".
|
||||
* Texts inside the game itself (client, server data) are not part of the Manager.
|
||||
Reference in new issue
Block a user