Repository navigation
i18n: Czech interface language - #213
Conversation
VectorCraft ▸ Language gains Čeština (`app.language {lang: "cs"}`,
persisted as "cs"). `Language::tr` now picks a table per language.
The Czech table (crates/ui-egui/src/i18n/czech.rs) translates every
menu title, submenu, item and header in the menu tree, plus the labels
toggling items switch to (Show/Hide Guides, Lock/Unlock Grid, Outline/
Preview, Edit Contents/Edit Envelope…). It was written clean-room from the
meaning of the English labels: commands in the infinitive, menus as nouns.
Left as-is on purpose: the product name, language names, OpenType, the
built-in workspace names and the perspective grid preset names.
Tests:
- every Czech (and Japanese) entry is a menu label, toggled labels included;
- Czech covers every menu label except fonts, sizes, plug-in names and
an explicit KEEP_AS_IS list;
- ellipses match their source label, entries are unique;
- the Language menu lists every language; `cs` validates and persists;
- each UI font family's own first font has the Czech letters and
punctuation (no system fonts needed).
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…orytold#209): one ROADMAP line for Japanese, Czech and vertical type Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Děkujeme, @petrleocompel, merged! A complete Czech interface (539 of 561 menu labels, plus the labels that only show after a toggle is flipped) is great, and the tests are excellent: coverage of every menu label with an explicit Heads-up: #205 proposes a TSV-catalog i18n framework. If it lands, Czech would move into it (we've asked that PR to carry your table over). If you're not already there, come say hi in our Discord, we'd love to have you: https://discord.gg/artcraft |
…atalog Strings in code stay English and are the lookup keys; `crates/ui-egui/src/i18n` maps them to display text at render time from one `*.tsv` catalog per language (`LANGUAGES` registry, `tl!`/`t`/`tr`/`tr_ctx`/`tr_id`/`tn`/`fmt`). Command ids, menu paths, `ui.menu.list`, the control channel, the CLI, MCP, status messages and undo labels never see translated text, so agents, scripts and the existing tests are unaffected (under `cargo test` the UI is always English). Wired: in-window menus and the macOS native menu (rebuilt on a language change), dynamic labels (Undo X, Reset X, Last Effect: X as templates), the command palette (matches English and translated text), dock tabs, panel tooltips, the toolbar (category names now cut by characters, not bytes), the dialog frame, the shared widgets, the Preferences dialog, the shortcut editor, the hint and status bars, the Home screen, and the literals of every panel and dialog. Preference `interfaceLanguage` (User Interface › Language): `auto` or a code. `auto` follows `VECTORCRAFT_LOCALE`, `LC_ALL`/`LC_MESSAGES`/`LANG`/`LANGUAGE`, the macOS preferred languages and, on Windows (which sets no `LANG`), the user locale from `HKCU\Control Panel\International`. `zh-TW`/`zh-HK`/`zh-MO`/ `zh-Hant-*` resolve to `zh-hant`; Simplified locales stay English until a `zh-hans` catalog exists. `zh-hant.tsv` (~2,850 rows) is clean-room, in the vocabulary used in Taiwan; terms shared with PhotoCraft reuse its wording, vector terms use everyday vector-drawing vocabulary. Tests: catalog well-formedness (placeholders, ellipses, command ids, no Simplified characters), locale resolution, and two coverage tests that fail when a menu string, panel/tool/preference label, dialog button, hint-bar fragment or `tl!` literal has no row in a language marked `complete_menus`. `VECTORCRAFT_I18N_DUMP=file cargo test -p vectorcraft-ui-egui dump_source_strings` lists the strings for translators. Also: two clippy findings under rustc 1.97 fixed in passing. Integrated with main (squashed onto it, 42 commits on): the Czech interface (storytold#213) moves from its Rust table to `i18n/cs.tsv` on the registry (all 556 rows, Czech plural rule, its menu-coverage and glyph tests kept); Find Font's resolution notes and the canvas context menu's labels are translated and covered by the catalog tests (`menus::CONTEXT_LABELS`); the glyph test checks CJK text only when the craft-fonts build input is embedded (storytold#220 moved the Japanese fonts out of this repository); a language saved by an older version carries over to `interfaceLanguage`; Windows' locale lookup runs reg.exe by its full path. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Adds Czech (Čeština,
cs) as a third interface language next to English and Japanese, building on the currenti18n.rsdesign.What's included
Language::Cs(serialised as"cs") is listed under VectorCraft ▸ Language as "Čeština" and is accepted byapp.language {lang: en|ja|cs}. It is saved and restored like the other languages.tr()now picks the table per language with amatchand cannot panic.crates/ui-egui/src/i18n/czech.rs: 556 entries in menu order.KEEP_AS_ISlist: the product name, language names, OpenType, the built-in workspace names and the perspective-grid preset names.KEEP_AS_IS. Toggle labels are collected by flipping each toggle on a real document.…exactly when the English does.csis accepted, saved and restored, and the Language menu lists every language.czech_glyphs_are_available_without_system_fontschecks that the primary UI fonts (Source Sans 3, JetBrains Mono and egui's built-in fallbacks) contain áčďéěíňóřšťúůýž, their capitals and „“‚‘…–.dialogs/plugin.rs: the "No filter plug-ins installed" header is now apub const. A test running in parallel can install plug-ins and remove that header, so the label test refers to the constant to stay reliable.ROADMAP.md: the interface-language line mentions Czech.Translation notes
tr().Testing
cargo test -p vectorcraft-ui-egui: 516 passed (7 of them i18n tests).cargo fmt --all --checkpasses.cargo clippy -p vectorcraft-ui-egui -p vectorcraft --all-targets -- -D warningspasses.cargo check -p vectorcraftpasses.cargo xtask layerspasses.🤖 Generated with Claude Code