From eb92fc07bf5653b642f7742fd20726b23f690179 Mon Sep 17 00:00:00 2001 From: Paul Licameli Date: Tue, 21 Apr 2020 14:21:05 -0400 Subject: [PATCH] Bug1119 residuals... (#496) ... Fix assertion violations when language isn't English --- src/menus/WindowMenus.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/menus/WindowMenus.cpp b/src/menus/WindowMenus.cpp index c576842a4..2ee23c1db 100644 --- a/src/menus/WindowMenus.cpp +++ b/src/menus/WindowMenus.cpp @@ -55,6 +55,8 @@ void DoMacMinimize(AudacityProject *project) } } +const auto menuTitle = XO("&Window"); + } /// Namespace for functions for window management (mac only?) @@ -84,7 +86,7 @@ void Refresh() } // Should always find the Window menu - int pos = bar->FindMenu(wxT("Window")); + int pos = bar->FindMenu( menuTitle.Translation() ); wxASSERT(pos != wxNOT_FOUND); if (pos == wxNOT_FOUND) { @@ -192,7 +194,7 @@ BaseItemSharedPtr WindowMenu() ////////////////////////////////////////////////////////////////////////// static BaseItemSharedPtr menu{ ( FinderScope{ findCommandHandler }, - Menu( wxT("Window"), XO("&Window"), + Menu( wxT("Window"), menuTitle, Section( "", /* i18n-hint: Standard Macintosh Window menu item: Make (the current * window) shrink to an icon on the dock */