Add Spanish, Italian and Russian; dropdown order and language file tests

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Richard ZinkandClaude Opus 5.5 committed 2026-11-05 16:05:56 +01:00
1 parent 6629472811
commit a13abf63f3
6 files changed
+3112 -7

No files matched your search

+5 -3
View File
@@ -130,9 +130,11 @@ number by one (a new month starts again at `00001`) and prints the old and the n
## Adding a language
1. Copy `lang/en.lang` to `lang/<code>.lang` and translate the texts (placeholders `{0}`, `{1}` stay as they are).
2. Add the file to `SOURCES` in `src/i18n.rs`.
3. The Dinowyde font covers Latin (all European accents), Greek and Cyrillic; the test
`every_text_of_the_game_has_its_glyphs` in `src/gfx.rs` lists characters it cannot draw (add the new file there).
2. Add the file to `SOURCES` in `src/i18n.rs` and its code to `ORDER` (its place in the language dropdown).
3. Give it a 12x9 pixel flag in `src/menu/flags.rs` (18 European languages have one already).
4. `cargo test` checks that the file has every key and placeholder of `en.lang`
(`every_language_has_all_keys_and_placeholders`) and that the fonts can draw every character in it
(`every_text_of_the_game_has_its_glyphs`; Dinowyde covers Latin with all European accents, Greek and Cyrillic).
## Refreshing the generated files