i18n: a catalog for the interface below the menu bar
The menu bar has had a catalog since #229 (keyed by `(command, English label)`); everything below it - panel labels, buttons, field names, tooltips, the sentences a panel draws itself - was written straight into the code and stayed English in every language (#333). This adds `crates/ui-egui/src/i18n/ui.rs`: - Rows are keyed by the English source string, so a panel wraps a literal it already has instead of inventing an id, and a row that is missing falls back to English rather than to an empty label. - `tr("Rename")` translates a plain string; `tr_args("Proxy Use: {}", &[&quality])` fills the values of a row that carries them. `tr_args` writes into its own buffer, so it cannot panic on a mismatch, and a test keeps every row's placeholder count equal to its English source. - The language in force is set once per frame from the resolved interface language - the same value the CJK fonts are installed for - and kept in a thread-local, so the panels do not have to thread it through every function. The render threads never draw interface text. - Simplified and Traditional Chinese are complete (384 strings); the Japanese rows are still open, and the catalog takes them without any other change. Tests: the two Chinese catalogs must list the same source strings, no empty or duplicated rows, every row must be asked for by a converted panel, and a converted panel that gains a hard-coded string in a common call shape fails the build.
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
# Roadmap
|
||||
|
||||
- 2026-10-09: Settings ▸ General ▸ Language now translates the interface below the menu bar as well: panels, dialogs, buttons and tooltips read their text through `crates/ui-egui/src/i18n/ui.rs`, keyed by the English source string. Simplified and Traditional Chinese are complete (384 strings); Japanese rows can follow in the same file. A test fails when a converted panel gains a hard-coded string, and another keeps the catalog free of unused rows.
|
||||
- 2026-10-08: `effectcraft-cli render --out` resolves a relative path against the working directory, like `--project` (it used the project's folder, which doubled a path that already named it). Render Queue outputs set in a project are unchanged.
|
||||
- 2026-10-08: Long-press a grouped toolbar button to choose its tools, including Horizontal/Vertical Type; releasing the hold keeps the menu open. Existing point/paragraph text creation is unchanged.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user