G9: persist Japanese menu language without bundled fonts
This commit is contained in:
@@ -168,7 +168,7 @@ pub fn build(app: &EffectcraftApp) -> NativeMenu {
|
||||
let mut kids = vec![];
|
||||
rec(app, children, &id, &mut kids);
|
||||
let shown = effectcraft_engine::menus::submenu_label(&app.session, label, &crate::menus::dyn_ctx(&app.ui.workspace));
|
||||
out.push(NativeNode::Submenu { label: shown, children: kids });
|
||||
out.push(NativeNode::Submenu { label: crate::i18n::submenu(app, label, shown), children: kids });
|
||||
}
|
||||
MenuNode::Item(e) => {
|
||||
let role = match e.command.as_str() {
|
||||
@@ -180,11 +180,15 @@ pub fn build(app: &EffectcraftApp) -> NativeMenu {
|
||||
if let Some(role) = role {
|
||||
// Services sits just above Hide, as in every Mac app.
|
||||
if role == Role::Hide && !services_added {
|
||||
out.push(NativeNode::Predefined { role: Role::Services, label: "Services".into(), command: String::new() });
|
||||
out.push(NativeNode::Predefined {
|
||||
role: Role::Services,
|
||||
label: if crate::i18n::japanese(app) { "サービス" } else { "Services" }.into(),
|
||||
command: String::new(),
|
||||
});
|
||||
out.push(NativeNode::Separator);
|
||||
services_added = true;
|
||||
}
|
||||
out.push(NativeNode::Predefined { role, label: e.label.clone(), command: e.command.clone() });
|
||||
out.push(NativeNode::Predefined { role, label: crate::i18n::label(app, &e.command, &e.label).into(), command: e.command.clone() });
|
||||
continue;
|
||||
}
|
||||
let shortcut = crate::menus::entry_shortcut(app, e);
|
||||
|
||||
Reference in New Issue
Block a user