i18n: complete Simplified Chinese catalog, Chinese font fallback and a coverage xtask (#930)
Adds a complete Simplified Chinese (zh) catalog covering every English message, a font fallback for Chinese text, and `cargo xtask i18n --check`, which checks that the complete catalogs (ja, zh) carry every English message and that every command label is translatable. Co-authored-by: Noly1990 <20500931+Noly1990@users.noreply.github.com>
This commit is contained in:
1 parent
587cf865b8
commit
45f92277cb
17 files changed
+2485
-52
No files matched your search
@@ -40,6 +40,8 @@ mod hole_placement_ui_tests;
|
||||
pub mod home;
|
||||
pub mod i18n;
|
||||
#[cfg(test)]
|
||||
mod i18n_menu_tests;
|
||||
#[cfg(test)]
|
||||
mod i18n_ui_tests;
|
||||
pub mod icons;
|
||||
pub mod inference;
|
||||
@@ -494,7 +496,13 @@ impl SolveApp {
|
||||
}
|
||||
match &r {
|
||||
Ok(_) => {
|
||||
self.session.echo(format!("{} done", command_label(id)));
|
||||
// Programmatic callers (the control channel, scripts) run outside a render
|
||||
// language scope, so resolve the echo from the saved preference instead of the
|
||||
// thread-local scope. The command's own label is translated too, so the echo
|
||||
// reads the same way the toolbar button it came from does.
|
||||
let language = i18n::Locale::for_language(&self.preferences.language);
|
||||
let label = language.label(command_label(id));
|
||||
self.session.echo(language.format("ui.command_done", &[("command", label)]));
|
||||
if matches!(id, "file.new" | "doc.open" | "doc.recover") {
|
||||
self.sketch_choices = sketch_families::Choices::default();
|
||||
dim_view::cancel();
|
||||
|
||||
Reference in new issue
Block a user