mirror of
https://github.com/storytold/effectcraft.git
synced 2026-10-31 13:37:37 -06:00
i18n: add Czech (cs) interface language
Czech for all 618 fixed menu entries and the 496 panel, tooltip and dialog strings of the most complete catalog; settings accept and persist `cs`, Match System recognises cs, cs-CZ and cs_CZ.UTF-8; native menu, Undo/Redo and file-manager labels. Czech may lag the Chinese catalogs like Japanese and Ukrainian (a missing row falls back to English); menu rows use "..." like the other catalogs. AI-assisted, independently reviewed, not yet proofread by a native speaker. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
67434e9038
commit
2a8ecfb822
@@ -32,6 +32,7 @@ pub const LANGUAGES: &[(&str, &str)] = &[
|
||||
("Українська", "uk"),
|
||||
("Español", "es"),
|
||||
("Português (Brasil)", "pt-br"),
|
||||
("Čeština", "cs"),
|
||||
];
|
||||
|
||||
/// Settings ▸ Appearance ▸ UI Scale: (label, `appearance.uiScale` percent).
|
||||
|
||||
@@ -615,6 +615,14 @@ fn interface_language_is_validated_persisted_and_backward_compatible() {
|
||||
let mut es = Session { config: Some(store.clone()), ..Default::default() };
|
||||
es.load_settings();
|
||||
assert_eq!(es.prefs.general.language, "es");
|
||||
// Czech uses the same validation, persistence and JSON round-trip as every catalog.
|
||||
assert!(crate::prefs::LANGUAGES.contains(&("Čeština", "cs")));
|
||||
s.execute("prefs.set", json!({"key": "general.language", "value": "cs"})).unwrap();
|
||||
assert_eq!(s.execute("prefs.get", json!({"key": "general.language"})).unwrap(), json!("cs"));
|
||||
let mut cs = Session { config: Some(store.clone()), ..Default::default() };
|
||||
cs.load_settings();
|
||||
assert_eq!(cs.prefs.general.language, "cs");
|
||||
assert_eq!(Prefs::from_json(r#"{"general":{"language":"cs"}}"#).general.language, "cs");
|
||||
s.execute("prefs.set", json!({"key": "general.language", "value": "ja"})).unwrap();
|
||||
let mut reloaded = Session { config: Some(store), ..Default::default() };
|
||||
reloaded.load_settings();
|
||||
|
||||
Reference in New Issue
Block a user