Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/libresrc/osx/default_menu.json
Original file line number Diff line number Diff line change
Expand Up @@ -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" : [
Expand Down
12 changes: 11 additions & 1 deletion src/menu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down