mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2026-08-27 12:41:43 +00:00
Docvks
This commit is contained in:
@@ -2,6 +2,39 @@
|
||||
|
||||
Iris localizes command, Studio, runtime, HUD, and UI strings through typed Java message catalogs and optional locale overlays. Server locale is selected by `general.language` in `settings.json`. Client keybind labels use Minecraft lang assets under `assets/irisworldgen/lang/`. See also `03 - Configuration.md`, `04 - Commands & Permissions.md`, and `29 - Client HUD & Protocol.md`.
|
||||
|
||||
## Tutorial: select a locale and verify an override
|
||||
|
||||
Prerequisites: write access to the Iris data folder, a backup of `settings.json`, and an operator account that can run `/iris reload`.
|
||||
|
||||
1. Set `general.language` in `settings.json` to an exact bundled id, for example `de_DE`.
|
||||
2. Create `<Iris data folder>/languages/overrides/de_DE.json` with one unmistakable local override:
|
||||
|
||||
```json
|
||||
{
|
||||
"locale": "de_DE",
|
||||
"messages": {
|
||||
"iris.command.unknown": "Lokaler Test: unbekannter Iris-Befehl"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
3. Run `/iris reload` and confirm the response reports `de_DE` as the active locale.
|
||||
4. Run `/iris help`, then run `/iris locale-override-test` to exercise the overridden unknown-command key.
|
||||
5. Confirm the local override appears, other messages come from the bundled German overlay, and any omitted key falls back to canonical English instead of printing a raw identifier.
|
||||
6. Edit the override text, save it, and confirm the hotload path picks up the change. Remove the test override when verification is complete.
|
||||
|
||||
The workflow passes when the selected locale remains active across a clean restart and the partial override wins only for its named key. When authoring a new locale, validate a small command group before translating the full catalog. Server locale files do not change client keybind labels; client assets are a separate surface.
|
||||
|
||||
### Recovery
|
||||
|
||||
| Symptom | Meaning | Recovery |
|
||||
|---|---|---|
|
||||
| Requested locale is rejected | Id is invalid, file id differs, JSON is malformed, or overlay validation failed | Keep the previous locale active, fix the logged validation errors, and reload again |
|
||||
| Raw message key appears | The key is not in the typed catalog or the calling surface bypassed localization | Verify the catalog key first; adding an arbitrary override key cannot create a new message definition |
|
||||
| Override is ignored | Wrong data folder, wrong locale filename/id, or unchanged watched file | Confirm `<data>/languages/overrides/<locale>.json`, update its contents, then run `/iris reload` explicitly |
|
||||
| Formatting or placeholders break | Override changed `{name}` tokens or the value type | Match the English key's placeholders and text/lines/plural shape exactly |
|
||||
| Server text changes but keybind labels do not | Client assets are independent | Update/install the matching `assets/irisworldgen/lang/<mc_code>.json` client resource |
|
||||
|
||||
## English and catalogs
|
||||
|
||||
Canonical English is code-owned in `core/.../localization` (`IrisMessages` and the surface catalogs it assembles). Iris does not ship an English server translation file. English locale id is `en_US` (`VolmitLocales.ENGLISH`).
|
||||
|
||||
Reference in New Issue
Block a user