mirror of
https://github.com/storytold/lightcraft.git
synced 2026-10-14 19:27:01 -04:00
Merge PR #564
# Conflicts: # README.md # crates/ui-egui/src/i18n.rs # docs/localization.md # docs/parity.md
This commit is contained in:
commit
53c056daf3
8 files changed
+2296
-41
No files matched your search
@@ -29,14 +29,17 @@ are in [`localization-zh-hans.md`](localization-zh-hans.md), [`localization-zh-h
|
||||
PtBr, "pt-br", "Português (Brasil)", "Latn", include_str!("../locales/pt-br.json");
|
||||
De, "de", "Deutsch", "Latn", include_str!("../locales/de.json");
|
||||
Ru, "ru", "Русский", "Cyrl", include_str!("../locales/ru.json");
|
||||
Uk, "uk", "Українська", "Cyrl", include_str!("../locales/uk.json");
|
||||
}
|
||||
```
|
||||
|
||||
The fields are the BCP-47 code (also the settings-file value), the **endonym** shown in the
|
||||
Language menu, the ISO 15924 script (`Latn`, `Jpan`, `Hans`, `Hant`, `Kore`…), and the embedded
|
||||
catalog. `build.rs` picks up `<code>-formats.json` by name, so the macro and the format lookup
|
||||
follow automatically — nothing else in the UI needs to change. The menus, the settings row, the
|
||||
keyboard-shortcut sheet and the control channel all read the table.
|
||||
follow automatically. Add the corresponding `app.language.<name>` entry to
|
||||
`LANGUAGE_COMMANDS` and `language_from_command` in `src/menus.rs`, and to the
|
||||
`language_commands_cover_every_language` test. Settings read the locale table; menus and
|
||||
the control channel share the language-command mapping.
|
||||
3. **Make sure the glyphs exist.** The script drives which craft-fonts faces the UI installs: a
|
||||
language whose script has no face in the build shows boxes (the test says so instead of failing).
|
||||
Fonts live in [storytold/craft-fonts](https://github.com/storytold/craft-fonts), never here; a
|
||||
|
||||
Reference in new issue
Block a user