Merge pull request #987 from Losminek/cs-ui

i18n: add Czech (cs) interface language

# Conflicts:
#	crates/engine/src/prefs.rs
#	crates/ui-egui/src/i18n.rs
#	crates/ui-egui/src/i18n/ui.rs
#	docs/localization-parity.md
This commit is contained in:
Brandon Thomas
2026-10-12 05:22:10 -04:00
8 changed files with 1349 additions and 11 deletions
+23
View File
@@ -196,6 +196,8 @@ pub fn build(app: &EffectcraftApp) -> NativeMenu {
"Servicios"
} else if crate::i18n::brazilian_portuguese(app) {
"Serviços"
} else if crate::i18n::czech(app) {
"Služby"
} else {
"Services"
}
@@ -457,6 +459,27 @@ mod tests {
assert_eq!(translated, ["Служби", "Приховати EffectCraft", "Приховати решту", "Показати все"]);
}
#[test]
fn czech_translates_macos_predefined_items() {
if !cfg!(target_os = "macos") {
return;
}
let mut app = EffectcraftApp::new(effectcraft_engine::Session::default());
app.session.execute("prefs.set", json!({"key": "general.language", "value": "cs"})).unwrap();
fn labels(nodes: &[NativeNode], out: &mut Vec<String>) {
for node in nodes {
match node {
NativeNode::Predefined { label, .. } => out.push(label.clone()),
NativeNode::Submenu { children, .. } => labels(children, out),
_ => {}
}
}
}
let mut translated = vec![];
labels(&build(&app).menus, &mut translated);
assert_eq!(translated, ["Služby", "Skrýt EffectCraft", "Skrýt ostatní", "Zobrazit vše"]);
}
#[test]
fn hide_items_are_predefined_on_macos() {
let spec = build(&app());