1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-10-25 15:53:52 +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

@@ -29,13 +29,13 @@
#include <wx/event.h>
#include <wx/filefn.h>
#include <wx/filename.h>
#include <wx/msgdlg.h>
#include <wx/utils.h>
#include "../Prefs.h"
#include "../AudacityApp.h"
#include "../Internat.h"
#include "../ShuttleGui.h"
#include "../widgets/ErrorDialog.h"
#include "DirectoriesPrefs.h"
enum {
@@ -205,7 +205,7 @@ bool DirectoriesPrefs::Validate()
wxString path{tempDir.GetPath()};
if( !AudacityApp::IsTempDirectoryNameOK( path ) ) {
wxMessageBox(
AudacityMessageBox(
wxString::Format(_("Directory %s is not suitable (at risk of being cleaned out)"),
path.c_str()),
_("Error"),
@@ -213,7 +213,7 @@ bool DirectoriesPrefs::Validate()
return false;
}
if (!tempDir.DirExists()) {
int ans = wxMessageBox(
int ans = AudacityMessageBox(
wxString::Format(_("Directory %s does not exist. Create it?"),
path.c_str()),
_("New Temporary Directory"),
@@ -234,7 +234,7 @@ bool DirectoriesPrefs::Validate()
tempDir.AppendDir(wxT("canicreate"));
path = tempDir.GetPath();
if (!tempDir.Mkdir(0755)) {
wxMessageBox(
AudacityMessageBox(
wxString::Format(_("Directory %s is not writable"),
path.c_str()),
_("Error"),
@@ -248,7 +248,7 @@ bool DirectoriesPrefs::Validate()
wxFileName oldDir;
oldDir.SetPath(gPrefs->Read(wxT("/Directories/TempDir")));
if (tempDir != oldDir) {
wxMessageBox(
AudacityMessageBox(
_("Changes to temporary directory will not take effect until Audacity is restarted"),
_("Temp Directory Update"),
wxOK | wxCENTRE | wxICON_INFORMATION);

View File

@@ -19,12 +19,12 @@
#include <wx/defs.h>
#include <wx/listctrl.h>
#include <wx/msgdlg.h>
#include <wx/dnd.h>
#include "../Audacity.h"
#include "../Prefs.h"
#include "../ShuttleGui.h"
#include "../widgets/ErrorDialog.h"
#define EXTIMPORT_MIME_SUPPORT 0
@@ -506,7 +506,7 @@ void ExtImportPrefs::OnRuleTableEdit (wxGridEvent& event)
{
if (!askedAboutSpaces)
{
fixSpaces = wxMessageBox(_(
fixSpaces = AudacityMessageBox(_(
"There are space characters (spaces, newlines, tabs or linefeeds) in one of \
the items. They are likely to break the pattern matching. Unless you know \
what you are doing, it is recommended to trim spaces. Do you want \
@@ -597,7 +597,7 @@ void ExtImportPrefs::OnDelRule(wxCommandEvent& WXUNUSED(event))
return;
auto &items = Importer::Get().GetImportItems();
int msgres = wxMessageBox (_("Do you really want to delete selected rule?"),
int msgres = AudacityMessageBox (_("Do you really want to delete selected rule?"),
_("Rule deletion confirmation"), wxYES_NO, RuleTable);
if (msgres == wxNO || msgres != wxYES)
return;

View File

@@ -28,7 +28,6 @@ KeyConfigPrefs and MousePrefs use.
#include <wx/intl.h>
#include <wx/filedlg.h>
#include <wx/button.h>
#include <wx/msgdlg.h>
#include "../Prefs.h"
#include "../Project.h"
@@ -42,6 +41,7 @@ KeyConfigPrefs and MousePrefs use.
#include "../FileNames.h"
#include "../widgets/KeyView.h"
#include "../widgets/ErrorDialog.h"
//
// KeyConfigPrefs
@@ -348,7 +348,7 @@ void KeyConfigPrefs::OnImport(wxCommandEvent & WXUNUSED(event))
XMLFileReader reader;
if (!reader.Parse(mManager, file)) {
wxMessageBox(reader.GetErrorStr(),
AudacityMessageBox(reader.GetErrorStr(),
_("Error Importing Keyboard Shortcuts"),
wxOK | wxCENTRE, this);
}
@@ -585,7 +585,7 @@ void KeyConfigPrefs::SetKeyForSelected(const wxString & key)
if (!mView->CanSetKey(mCommandSelected))
{
wxMessageBox(_("You may not assign a key to this entry"),
AudacityMessageBox(_("You may not assign a key to this entry"),
_("Error"), wxICON_ERROR | wxCENTRE, this);
return;
}
@@ -599,7 +599,7 @@ void KeyConfigPrefs::SetKeyForSelected(const wxString & key)
void KeyConfigPrefs::OnSet(wxCommandEvent & WXUNUSED(event))
{
if (mCommandSelected == wxNOT_FOUND) {
wxMessageBox(_("You must select a binding before assigning a shortcut"),
AudacityMessageBox(_("You must select a binding before assigning a shortcut"),
_("Error"), wxICON_WARNING | wxCENTRE, this);
return;
}
@@ -619,7 +619,7 @@ void KeyConfigPrefs::OnSet(wxCommandEvent & WXUNUSED(event))
mManager->GetPrefixedLabelFromName(oldname);
wxString newlabel = mManager->GetCategoryFromName(newname) + wxT(" - ") +
mManager->GetPrefixedLabelFromName(newname);
if (wxMessageBox(
if (AudacityMessageBox(
wxString::Format(
_("The keyboard shortcut '%s' is already assigned to:\n\n\t'%s'\n\nClick OK to assign the shortcut to\n\n\t'%s'\n\ninstead. Otherwise, click Cancel."),
key.c_str(),

View File

@@ -26,6 +26,7 @@ MP3 and FFmpeg encoding libraries.
#include "../export/ExportMP3.h"
#include "../widgets/LinkingHtmlWindow.h"
#include "../widgets/HelpSystem.h"
#include "../widgets/ErrorDialog.h"
#include "LibraryPrefs.h"
@@ -207,7 +208,7 @@ void LibraryPrefs::OnFFmpegFindButton(wxCommandEvent & WXUNUSED(event))
// Libs are fine, don't show "locate" dialog unless user really wants it
if (!locate) {
int response = wxMessageBox(_("Audacity has automatically detected valid FFmpeg libraries.\nDo you still want to locate them manually?"),
int response = AudacityMessageBox(_("Audacity has automatically detected valid FFmpeg libraries.\nDo you still want to locate them manually?"),
wxT("Success"),
wxCENTRE | wxYES_NO | wxNO_DEFAULT |wxICON_QUESTION);
if (response == wxYES) {

View File

@@ -39,6 +39,7 @@ other settings.
#include "../Prefs.h"
#include "../Project.h"
#include "../ShuttleGui.h"
#include "../widgets/ErrorDialog.h"
#include "MidiIOPrefs.h"
@@ -281,7 +282,7 @@ bool MidiIOPrefs::Validate()
{
long latency;
if (!mLatency->GetValue().ToLong(&latency)) {
wxMessageBox(_("The MIDI Synthesizer Latency must be an integer"));
AudacityMessageBox(_("The MIDI Synthesizer Latency must be an integer"));
return false;
}
return true;

View File

@@ -25,7 +25,6 @@
#include <wx/gdicmn.h>
#include <wx/intl.h>
#include <wx/listbox.h>
#include <wx/msgdlg.h>
#include <wx/sizer.h>
#include <wx/listbook.h>

View File

@@ -19,7 +19,6 @@ Paul Licameli
#include "../TranslatableStringArray.h"
#include <algorithm>
#include <wx/msgdlg.h>
#include "../FFT.h"
#include "../Prefs.h"
@@ -28,6 +27,7 @@ Paul Licameli
#include <cmath>
#include "../Experimental.h"
#include "../widgets/ErrorDialog.h"
SpectrogramSettings::Globals::Globals()
{
@@ -186,7 +186,7 @@ bool SpectrogramSettings::Validate(bool quiet)
{
if (!quiet &&
maxFreq < 100) {
wxMessageBox(_("Maximum frequency must be 100 Hz or above"));
AudacityMessageBox(_("Maximum frequency must be 100 Hz or above"));
return false;
}
else
@@ -194,7 +194,7 @@ bool SpectrogramSettings::Validate(bool quiet)
if (!quiet &&
minFreq < 0) {
wxMessageBox(_("Minimum frequency must be at least 0 Hz"));
AudacityMessageBox(_("Minimum frequency must be at least 0 Hz"));
return false;
}
else
@@ -202,7 +202,7 @@ bool SpectrogramSettings::Validate(bool quiet)
if (!quiet &&
maxFreq <= minFreq) {
wxMessageBox(_("Minimum frequency must be less than maximum frequency"));
AudacityMessageBox(_("Minimum frequency must be less than maximum frequency"));
return false;
}
else
@@ -210,7 +210,7 @@ bool SpectrogramSettings::Validate(bool quiet)
if (!quiet &&
range <= 0) {
wxMessageBox(_("The range must be at least 1 dB"));
AudacityMessageBox(_("The range must be at least 1 dB"));
return false;
}
else
@@ -218,12 +218,12 @@ bool SpectrogramSettings::Validate(bool quiet)
if (!quiet &&
frequencyGain < 0) {
wxMessageBox(_("The frequency gain cannot be negative"));
AudacityMessageBox(_("The frequency gain cannot be negative"));
return false;
}
else if (!quiet &&
frequencyGain > 60) {
wxMessageBox(_("The frequency gain must be no more than 60 dB/dec"));
AudacityMessageBox(_("The frequency gain must be no more than 60 dB/dec"));
return false;
}
else

View File

@@ -19,7 +19,6 @@
#include <wx/defs.h>
#include <wx/intl.h>
#include <wx/msgdlg.h>
#include <wx/checkbox.h>
#include "../FFT.h"
@@ -32,6 +31,7 @@
#include <algorithm>
#include "../Experimental.h"
#include "../widgets/ErrorDialog.h"
SpectrumPrefs::SpectrumPrefs(wxWindow * parent, WaveTrack *wt)
: PrefsPanel(parent, wt ? _("Spectrogram Settings") : _("Spectrograms"))
@@ -314,48 +314,48 @@ bool SpectrumPrefs::Validate()
long maxFreq;
if (!mMaxFreq->GetValue().ToLong(&maxFreq)) {
wxMessageBox(_("The maximum frequency must be an integer"));
AudacityMessageBox(_("The maximum frequency must be an integer"));
return false;
}
long minFreq;
if (!mMinFreq->GetValue().ToLong(&minFreq)) {
wxMessageBox(_("The minimum frequency must be an integer"));
AudacityMessageBox(_("The minimum frequency must be an integer"));
return false;
}
long gain;
if (!mGain->GetValue().ToLong(&gain)) {
wxMessageBox(_("The gain must be an integer"));
AudacityMessageBox(_("The gain must be an integer"));
return false;
}
long range;
if (!mRange->GetValue().ToLong(&range)) {
wxMessageBox(_("The range must be a positive integer"));
AudacityMessageBox(_("The range must be a positive integer"));
return false;
}
long frequencygain;
if (!mFrequencyGain->GetValue().ToLong(&frequencygain)) {
wxMessageBox(_("The frequency gain must be an integer"));
AudacityMessageBox(_("The frequency gain must be an integer"));
return false;
}
#ifdef EXPERIMENTAL_FIND_NOTES
long findNotesMinA;
if (!mFindNotesMinA->GetValue().ToLong(&findNotesMinA)) {
wxMessageBox(_("The minimum amplitude (dB) must be an integer"));
AudacityMessageBox(_("The minimum amplitude (dB) must be an integer"));
return false;
}
long findNotesN;
if (!mFindNotesN->GetValue().ToLong(&findNotesN)) {
wxMessageBox(_("The maximum number of notes must be an integer"));
AudacityMessageBox(_("The maximum number of notes must be an integer"));
return false;
}
if (findNotesN < 1 || findNotesN > 128) {
wxMessageBox(_("The maximum number of notes must be in the range 1..128"));
AudacityMessageBox(_("The maximum number of notes must be in the range 1..128"));
return false;
}
#endif //EXPERIMENTAL_FIND_NOTES