Integration: Interface Language lives in Preferences on next's Russian and macOS menu bar

prefs-language removes the Edit › Interface Language submenu; next added Russian and rebuilds
the macOS menu bar when the language changes (#397).
- de.rs and ru.rs drop their "Edit/Interface Language" path entries, as ja.rs does.
- The Russian language test checks the Preferences list instead of the removed submenu.
- app.language's params doc lists ru and says the macOS menu bar follows at once.
- native_menu.rs: the rebuild comment names Preferences and Cancel, which change
  `app.ui.language` and so reach the same rebuild in `NativeMenu::poll`.
This commit is contained in:
aiongg committed 2026-10-11 14:13:23 +00:00
1 parent 6c716ca84b
commit 10d32f0b01
4 files changed
+5 -11

No files matched your search

+3 -3
View File
@@ -87,9 +87,9 @@ impl NativeMenu {
menus::activate_native(app, ctx, &cmd.clone(), &params.clone());
}
}
// Edit › Interface Language and Show CJK Features: the system menu bar follows at once,
// like the panels (the new menu replaces the old one as the application's menu before
// that one is dropped).
// Interface Language and Show CJK Features (set in Preferences or by `app.language`, or put
// back by Cancel): the system menu bar follows at once, like the panels (the new menu
// replaces the old one as the application's menu before that one is dropped).
if app.ui.language != self.shown_for.0 || designcraft_ui_egui::cjk_features(app) != self.shown_for.1 {
*self = Self::install(app);
}
-1
View File
@@ -1585,7 +1585,6 @@ pub(super) const TABLE: &[(&str, &str)] = &[
("Step and Repeat", "Duplizieren und versetzt einfügen"),
("Table of Contents", "Inhaltsverzeichnis"),
("Type on a Path Options", "Optionen für Text auf Pfad"),
("Edit/Interface Language", "Bearbeiten/Sprache der Oberfläche"),
("Edit/Spelling", "Bearbeiten/Rechtschreibung"),
("Edit/Transparency Blend Space", "Bearbeiten/Transparenzfüllraum"),
("Edit/Transparency Flattener Presets", "Bearbeiten/Transparenzreduzierungsvorgaben"),
-1
View File
@@ -1567,7 +1567,6 @@ pub(super) const TABLE: &[(&str, &str)] = &[
("Step and Repeat", "Шаг и повтор"),
("Table of Contents", "Оглавление"),
("Type on a Path Options", "Параметры текста по контуру"),
("Edit/Interface Language", "Редактирование/Язык интерфейса"),
("Edit/Spelling", "Редактирование/Орфография"),
("Edit/Transparency Blend Space", "Редактирование/Пространство наложения прозрачности"),
("Edit/Transparency Flattener Presets", "Редактирование/Стили сведения прозрачности"),
+2 -6
View File
@@ -48,7 +48,7 @@ pub const UI_COMMANDS: &[(&str, &str, Option<&str>, &str)] = &[
"app.language",
"Interface Language",
None,
"{lang?: \"\"|de|fr|es|ja|zh|ar|pt-br|it|uk} — menus and panel names (the macOS menu bar follows on the next launch); without lang, opens Preferences, where it is the first setting",
"{lang?: \"\"|de|fr|es|ja|zh|ar|pt-br|it|uk|ru} — menus and panel names (the macOS menu bar follows at once); without lang, opens Preferences, where it is the first setting",
),
(
"app.flattener",
@@ -3146,11 +3146,7 @@ mod tests {
assert_eq!(restored.language, "ru");
assert_eq!(crate::i18n::tr(&restored.language, "File"), "Файл");
assert_eq!(crate::i18n::tr(&restored.language, "A custom name"), "A custom name");
assert!(menu_tree().iter().flat_map(|(_, entries)| entries.iter()).any(|entry| {
matches!(entry, Item::Sub(label, children) if label == "Interface Language" && children.iter().any(|child| {
matches!(child, Item::Cmd { label, id, params, .. } if label == "Русский" && id == "app.language" && params["lang"] == "ru")
}))
}));
assert!(crate::i18n::LANGUAGES.contains(&("ru", "Русский")), "Preferences lists Russian by its own name");
}
#[test]