Bug1119 residuals... (#496)

... Fix assertion violations when language isn't English
This commit is contained in:
Paul Licameli 2020-04-21 14:21:05 -04:00 committed by GitHub
parent 018a8681ef
commit eb92fc07bf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 2 deletions

View File

@ -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 */