1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-10-21 22:12:58 +02:00

Translate "Message" as default title of message box...

... This required a sweeping change of all calls to wxMessageBox!  But it seems
safe to me, despite the great number of touched files.
This commit is contained in:
Paul Licameli
2017-09-06 17:39:33 -04:00
parent 378c96fda1
commit ccb4bbac33
94 changed files with 369 additions and 344 deletions

View File

@@ -66,7 +66,6 @@ can't be.
#include <wx/file.h>
#include <wx/ffile.h>
#include <wx/mstream.h>
#include <wx/msgdlg.h>
#include <wx/settings.h>
#include "Project.h"
@@ -81,6 +80,7 @@ can't be.
#include "Prefs.h"
#include "AColor.h"
#include "ImageManipulation.h"
#include "widgets/ErrorDialog.h"
#include <wx/arrimpl.cpp>
@@ -756,7 +756,7 @@ void ThemeBase::CreateImageCache( bool bBinarySave )
#if 0
if( wxFileExist( FileName ))
{
wxMessageBox(
AudacityMessageBox(
wxString::Format(
// _("Theme cache file:\n %s\nalready exists.\nAre you sure you want to replace it?"),
FileName.c_str() )
@@ -774,13 +774,13 @@ void ThemeBase::CreateImageCache( bool bBinarySave )
#endif
if( !ImageCache.SaveFile( FileName, wxBITMAP_TYPE_PNG ))
{
wxMessageBox(
AudacityMessageBox(
wxString::Format(
_("Audacity could not write file:\n %s."),
FileName.c_str() ));
return;
}
wxMessageBox(
AudacityMessageBox(
wxString::Format(
/* i18n-hint: A theme is a consistent visual style across an application's
graphical user interface, including choices of colors, and similarity of images
@@ -796,7 +796,7 @@ void ThemeBase::CreateImageCache( bool bBinarySave )
const wxString &FileName = FileNames::ThemeCacheAsCee( );
if( !OutStream.OpenFile( FileName ))
{
wxMessageBox(
AudacityMessageBox(
wxString::Format(
_("Audacity could not open file:\n %s\nfor writing."),
FileName.c_str() ));
@@ -804,13 +804,13 @@ void ThemeBase::CreateImageCache( bool bBinarySave )
}
if( !ImageCache.SaveFile(OutStream, wxBITMAP_TYPE_PNG ) )
{
wxMessageBox(
AudacityMessageBox(
wxString::Format(
_("Audacity could not write images to file:\n %s."),
FileName.c_str() ));
return;
}
wxMessageBox(
AudacityMessageBox(
wxString::Format(
/* i18n-hint "Cee" means the C computer programming language */
_("Theme as Cee code written to:\n %s."),
@@ -965,7 +965,7 @@ bool ThemeBase::ReadImageCache( teThemeType type, bool bOkIfNotFound)
{
if( bOkIfNotFound )
return false; // did not load the images, so return false.
wxMessageBox(
AudacityMessageBox(
wxString::Format(
_("Audacity could not find file:\n %s.\nTheme not loaded."),
FileName.c_str() ));
@@ -974,7 +974,7 @@ bool ThemeBase::ReadImageCache( teThemeType type, bool bOkIfNotFound)
if( !ImageCache.LoadFile( FileName, wxBITMAP_TYPE_PNG ))
{
/* i18n-hint: Do not translate png. It is the name of a file format.*/
wxMessageBox(
AudacityMessageBox(
wxString::Format(
_("Audacity could not load file:\n %s.\nBad png format perhaps?"),
FileName.c_str() ));
@@ -1014,7 +1014,7 @@ bool ThemeBase::ReadImageCache( teThemeType type, bool bOkIfNotFound)
// was not a valid png image.
// Most likely someone edited it by mistake,
// Or some experiment is being tried with NEW formats for it.
wxMessageBox(_("Audacity could not read its default theme.\nPlease report the problem."));
AudacityMessageBox(_("Audacity could not read its default theme.\nPlease report the problem."));
return false;
}
//wxLogDebug("Read %i by %i", ImageCache.GetWidth(), ImageCache.GetHeight() );
@@ -1092,7 +1092,7 @@ void ThemeBase::LoadComponents( bool bOkIfNotFound )
if( !mImages[i].LoadFile( FileName, wxBITMAP_TYPE_PNG ))
{
/* i18n-hint: Do not translate png. It is the name of a file format.*/
wxMessageBox(
AudacityMessageBox(
wxString::Format(
_("Audacity could not load file:\n %s.\nBad png format perhaps?"),
FileName.c_str() ));
@@ -1116,7 +1116,7 @@ void ThemeBase::LoadComponents( bool bOkIfNotFound )
{
if( bOkIfNotFound )
return;
wxMessageBox(wxString::Format(_("None of the expected theme component files\n were found in:\n %s."),
AudacityMessageBox(wxString::Format(_("None of the expected theme component files\n were found in:\n %s."),
FileNames::ThemeComponentsDir().c_str()));
}
}
@@ -1138,7 +1138,7 @@ void ThemeBase::SaveComponents()
#endif
if( !wxDirExists( FileNames::ThemeComponentsDir() ))
{
wxMessageBox(
AudacityMessageBox(
wxString::Format(
_("Could not create directory:\n %s"),
FileNames::ThemeComponentsDir().c_str() ));
@@ -1166,11 +1166,11 @@ void ThemeBase::SaveComponents()
if (n > 0)
{
auto result =
wxMessageBox(
AudacityMessageBox(
wxString::Format(
_("Some required files in:\n %s\nwere already present. Overwrite?"),
FileNames::ThemeComponentsDir().c_str()),
wxMessageBoxCaptionStr,
AudacityMessageBoxCaptionStr(),
wxYES_NO | wxNO_DEFAULT);
if(result == wxNO)
return;
@@ -1183,7 +1183,7 @@ void ThemeBase::SaveComponents()
FileName = FileNames::ThemeComponent( mBitmapNames[i] );
if( !mImages[i].SaveFile( FileName, wxBITMAP_TYPE_PNG ))
{
wxMessageBox(
AudacityMessageBox(
wxString::Format(
_("Audacity could not save file:\n %s"),
FileName.c_str() ));
@@ -1191,7 +1191,7 @@ void ThemeBase::SaveComponents()
}
}
}
wxMessageBox(
AudacityMessageBox(
wxString::Format(
_("Theme written to:\n %s."),
FileNames::ThemeComponentsDir().c_str() ));