1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-10-26 23:33:49 +01:00

AudacityMessageBox takes TranslatableString message and caption

This commit is contained in:
Paul Licameli
2019-12-07 14:30:07 -05:00
parent d8c2610d88
commit dc39f22442
77 changed files with 1005 additions and 748 deletions

View File

@@ -653,16 +653,18 @@ void ProjectManager::OnCloseWindow(wxCloseEvent & event)
if ( UndoManager::Get( project ).UnsavedChanges() ) {
TitleRestorer Restorer( window, project );// RAII
/* i18n-hint: The first %s numbers the project, the second %s is the project name.*/
wxString Title = wxString::Format(_("%sSave changes to %s?"), Restorer.sProjNumber, Restorer.sProjName);
wxString Message = _("Save project before closing?");
auto Title = XO("%sSave changes to %s?")
.Format( Restorer.sProjNumber, Restorer.sProjName );
auto Message = XO("Save project before closing?");
if( !bHasTracks )
{
Message += _("\nIf saved, the project will have no tracks.\n\nTo save any previously open tracks:\nCancel, Edit > Undo until all tracks\nare open, then File > Save Project.");
Message += XO("\nIf saved, the project will have no tracks.\n\nTo save any previously open tracks:\nCancel, Edit > Undo until all tracks\nare open, then File > Save Project.");
}
int result = AudacityMessageBox( Message,
Title,
wxYES_NO | wxCANCEL | wxICON_QUESTION,
&window);
int result = AudacityMessageBox(
Message,
Title,
wxYES_NO | wxCANCEL | wxICON_QUESTION,
&window);
if (result == wxCANCEL || (result == wxYES &&
!GuardedCall<bool>( [&]{ return projectFileManager.Save(); } )