diff --git a/src/libresrc/osx/default_menu.json b/src/libresrc/osx/default_menu.json index 5e2a8a77c9..f07077d8c8 100644 --- a/src/libresrc/osx/default_menu.json +++ b/src/libresrc/osx/default_menu.json @@ -8,7 +8,7 @@ { "submenu" : "main/video", "tlcontext": "Menu bar", "text" : "&Video" }, { "submenu" : "main/audio", "tlcontext": "Menu bar", "text" : "&Audio" }, { "special" : "automation", "tlcontext": "Menu bar", "text" : "A&utomation" }, - { "submenu" : "main/window", "tlcontext": "Menu bar", "text" : "Window" }, + { "submenu" : "main/window", "tlcontext": "Menu bar", "text" : "Window", "special" : "window" }, { "submenu" : "main/help", "tlcontext": "Menu bar", "text" : "&Help", "special" : "help" } ], "main/file" : [ diff --git a/src/menu.cpp b/src/menu.cpp index 1052c3caf9..50dd6fa4d7 100644 --- a/src/menu.cpp +++ b/src/menu.cpp @@ -533,7 +533,17 @@ namespace menu { read_entry(item, "text", &disp); read_entry(item, "tlcontext", &context); if (!submenu.empty()) { - menu->Append(build_menu(submenu, c, &menu->cm), wxGetTranslation(to_wx(disp), {}, to_wx(context))); + wxString tl_disp = wxGetTranslation(to_wx(disp), {}, to_wx(context)); + menu->Append(build_menu(submenu, c, &menu->cm), tl_disp); +#ifdef __WXMAC__ + std::string special; + read_entry(item, "special", &special); + // wx finds the macOS Window menu by comparing menu titles, so it has to be + // given the translated one. Without this it fails to match a translated + // title and appends a second, untranslated "Window" menu of its own. + if (special == "window") + wxApp::s_macWindowMenuTitleName = tl_disp; +#endif } else { read_entry(item, "special", &submenu);