Skip to content

EffectCraft: An open-source motion graphics and compositing tool written by scratch in pure Rust

i18n: rustfmt the language table (#309 follow-up)

Brandon Thomas742833bfa42f
diff --git a/crates/engine/src/prefs.rs b/crates/engine/src/prefs.rs
index 12b4e0e62..881724c06 100644
--- a/crates/engine/src/prefs.rs
+++ b/crates/engine/src/prefs.rs
@@ -23,13 +23,7 @@ pub const PREFS_VERSION: u32 = 2;
pub const PREFS_FILE: &str = "prefs.json";
/// Settings ▸ General ▸ Language: (label, `general.language` value).
-pub const LANGUAGES: &[(&str, &str)] = &[
- ("Match System", "system"),
- ("English", "en"),
- ("日本語", "ja"),
- ("简体中文", "zh-hans"),
- ("繁體中文", "zh-hant"),
-];
+pub const LANGUAGES: &[(&str, &str)] = &[("Match System", "system"), ("English", "en"), ("日本語", "ja"), ("简体中文", "zh-hans"), ("繁體中文", "zh-hant")];
/// Settings ▸ Startup & Repair ▸ Window Graphics: (label, `startup.windowGraphics` value).
pub const WINDOW_GRAPHICS: &[(&str, &str)] = &[("Automatic", "auto"), ("OpenGL (compatibility)", "gl")];
diff --git a/crates/ui-egui/src/i18n.rs b/crates/ui-egui/src/i18n.rs
index d173c19b9..3735df987 100644
--- a/crates/ui-egui/src/i18n.rs
+++ b/crates/ui-egui/src/i18n.rs
@@ -2052,11 +2052,7 @@ mod tests {
let mut japanese_keys = BTreeSet::new();
let mut chinese_keys = BTreeSet::new();
let mut traditional_keys = BTreeSet::new();
- for (catalog, unique) in [
- (JAPANESE, &mut japanese_keys),
- (SIMPLIFIED_CHINESE, &mut chinese_keys),
- (TRADITIONAL_CHINESE, &mut traditional_keys),
- ] {
+ for (catalog, unique) in [(JAPANESE, &mut japanese_keys), (SIMPLIFIED_CHINESE, &mut chinese_keys), (TRADITIONAL_CHINESE, &mut traditional_keys)] {
for (command, en, translated) in catalog {
let key = (command.to_string(), en.to_string());
assert!(actual.contains(&key), "stale translation: {key:?}");
@@ -2191,10 +2187,7 @@ mod tests {
"图层: File"
);
// The submenu titles that name the current workspace / view.
- assert_eq!(
- submenu(&app, "Assign Shortcut to Workspace", "Assign Shortcut to “Default” Workspace".into()),
- "为工作区“Default”指定快捷键"
- );
+ assert_eq!(submenu(&app, "Assign Shortcut to Workspace", "Assign Shortcut to “Default” Workspace".into()), "为工作区“Default”指定快捷键");
assert_eq!(submenu(&app, "Assign Shortcut to 3D View", "Assign Shortcut to “Top”".into()), "为 3D 视图“Top”指定快捷键");
// The menu tree carries the same commands and shortcuts with the Chinese labels.
let zh = crate::native_menu::build(&app);
@@ -2234,10 +2227,7 @@ mod tests {
"圖層: File"
);
// The submenu titles that name the current workspace / view.
- assert_eq!(
- submenu(&app, "Assign Shortcut to Workspace", "Assign Shortcut to “Default” Workspace".into()),
- "為工作區“Default”指定快速鍵"
- );
+ assert_eq!(submenu(&app, "Assign Shortcut to Workspace", "Assign Shortcut to “Default” Workspace".into()), "為工作區“Default”指定快速鍵");
assert_eq!(submenu(&app, "Assign Shortcut to 3D View", "Assign Shortcut to “Top”".into()), "為 3D 檢視“Top”指定快速鍵");
// The menu tree carries the same commands and shortcuts with the Traditional labels.
let zh = crate::native_menu::build(&app);