1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-09-24 16:01:16 +02:00

Fix some omissions from translations, thanks scootergrisen & mkpoli...

... This does not address all the ones they recently noted, but only such
changes as I thought not too sweeping for this late stage.

More may be addressed in the next release.
This commit is contained in:
Paul Licameli 2017-09-10 19:25:20 -04:00
commit e41acf9128
13 changed files with 116 additions and 87 deletions

View File

@ -8,7 +8,7 @@ subdir = po
top_builddir = .. top_builddir = ..
# These options get passed to xgettext. # These options get passed to xgettext.
XGETTEXT_OPTIONS = --keyword=_ --keyword=N_ --keyword=XO --add-comments=" i18n" XGETTEXT_OPTIONS = --keyword=_ --keyword=N_ --keyword=XO --keyword=wxPLURAL:1,2 --add-comments=" i18n"
# This is the copyright holder that gets inserted into the header of the # This is the copyright holder that gets inserted into the header of the
# $(DOMAIN).pot file. Set this to the copyright holder of the surrounding # $(DOMAIN).pot file. Set this to the copyright holder of the surrounding

View File

@ -422,7 +422,7 @@ visit our [[http://forum.audacityteam.org/|forum]].");
wxT("<p><b>") + _("Special thanks:") + wxT("</b><br>") + wxT("<p><b>") + _("Special thanks:") + wxT("</b><br>") +
GetCreditsByRole(roleThanks) + GetCreditsByRole(roleThanks) +
wxT("<p><br>Audacity website: [[http://www.audacityteam.org/|http://www.audacityteam.org/]]") + wxT("<p><br>") + _("Audacity website: ") + wxT("[[http://www.audacityteam.org/|http://www.audacityteam.org/]]") +
// DA: Link for DA url too // DA: Link for DA url too
#ifdef EXPERIMENTAL_DA #ifdef EXPERIMENTAL_DA

View File

@ -215,6 +215,7 @@ extern const wxString& GetCustomSubstitution(const wxString& str1 );
#undef wxPLURAL #undef wxPLURAL
#endif #endif
// Note: The strings will go to the .pot file (do not use _(...)).
#define wxPLURAL(sing, plur, n) wxGetTranslation((sing), (plur), n) #define wxPLURAL(sing, plur, n) wxGetTranslation((sing), (plur), n)

View File

@ -366,13 +366,13 @@ double BatchCommands::GetEndTime()
AudacityProject *project = GetActiveProject(); AudacityProject *project = GetActiveProject();
if( project == NULL ) if( project == NULL )
{ {
//wxMessageBox( wxT("No project to process!") ); //wxMessageBox( _("No project to process!") );
return -1.0; return -1.0;
} }
TrackList * tracks = project->GetTracks(); TrackList * tracks = project->GetTracks();
if( tracks == NULL ) if( tracks == NULL )
{ {
//wxMessageBox( wxT("No tracks to process!") ); //wxMessageBox( _("No tracks to process!") );
return -1.0; return -1.0;
} }
@ -385,14 +385,14 @@ bool BatchCommands::IsMono()
AudacityProject *project = GetActiveProject(); AudacityProject *project = GetActiveProject();
if( project == NULL ) if( project == NULL )
{ {
//wxMessageBox( wxT("No project and no Audio to process!") ); //wxMessageBox( _("No project and no Audio to process!") );
return false; return false;
} }
TrackList * tracks = project->GetTracks(); TrackList * tracks = project->GetTracks();
if( tracks == NULL ) if( tracks == NULL )
{ {
//wxMessageBox( wxT("No tracks to process!") ); //wxMessageBox( _("No tracks to process!") );
return false; return false;
} }

View File

@ -82,11 +82,9 @@ private:
void RunBenchmark(wxWindow *parent) void RunBenchmark(wxWindow *parent)
{ {
/* /*
int action = wxMessageBox(wxT("This will close all project windows " int action = wxMessageBox(
"(without saving)\n" _("This will close all project windows (without saving)\nand open the Audacity Benchmark dialog.\n\nAre you sure you want to do this?"),
"and open the Audacity Benchmark dialog.\n\n" _("Benchmark"),
"Are you sure you want to do this?"),
wxT("Benchmark"),
wxYES_NO | wxICON_EXCLAMATION, wxYES_NO | wxICON_EXCLAMATION,
NULL); NULL);
@ -126,7 +124,8 @@ BEGIN_EVENT_TABLE(BenchmarkDialog, wxDialogWrapper)
END_EVENT_TABLE() END_EVENT_TABLE()
BenchmarkDialog::BenchmarkDialog(wxWindow *parent): BenchmarkDialog::BenchmarkDialog(wxWindow *parent):
wxDialogWrapper( parent, 0, wxT("Benchmark"), /* i18n-hint: Benchmark means a software speed test */
wxDialogWrapper( parent, 0, _("Benchmark"),
wxDefaultPosition, wxDefaultSize, wxDefaultPosition, wxDefaultSize,
wxDEFAULT_DIALOG_STYLE | wxDEFAULT_DIALOG_STYLE |
wxRESIZE_BORDER) wxRESIZE_BORDER)
@ -167,28 +166,30 @@ void BenchmarkDialog::MakeBenchmarkDialog()
S.StartMultiColumn(4); S.StartMultiColumn(4);
{ {
// //
item = S.Id(BlockSizeID).AddTextBox(wxT("Disk Block Size (KB):"), item = S.Id(BlockSizeID).AddTextBox(_("Disk Block Size (KB):"),
wxT(""), wxT(""),
12); 12);
item->SetValidator(wxTextValidator(wxFILTER_NUMERIC, item->SetValidator(wxTextValidator(wxFILTER_NUMERIC,
&mBlockSizeStr)); &mBlockSizeStr));
// //
item = S.Id(NumEditsID).AddTextBox(wxT("Number of Edits:"), item = S.Id(NumEditsID).AddTextBox(_("Number of Edits:"),
wxT(""), wxT(""),
12); 12);
item->SetValidator(wxTextValidator(wxFILTER_NUMERIC, item->SetValidator(wxTextValidator(wxFILTER_NUMERIC,
&mNumEditsStr)); &mNumEditsStr));
// //
item = S.Id(DataSizeID).AddTextBox(wxT("Test Data Size (MB):"), item = S.Id(DataSizeID).AddTextBox(_("Test Data Size (MB):"),
wxT(""), wxT(""),
12); 12);
item->SetValidator(wxTextValidator(wxFILTER_NUMERIC, item->SetValidator(wxTextValidator(wxFILTER_NUMERIC,
&mDataSizeStr)); &mDataSizeStr));
/// ///
item = S.Id(RandSeedID).AddTextBox(wxT("Random Seed:"), /* i18n-hint: A "seed" is a number that initializes a
pseudorandom number generating algorithm */
item = S.Id(RandSeedID).AddTextBox(_("Random Seed:"),
wxT(""), wxT(""),
12); 12);
item->SetValidator(wxTextValidator(wxFILTER_NUMERIC, item->SetValidator(wxTextValidator(wxFILTER_NUMERIC,
@ -198,18 +199,19 @@ void BenchmarkDialog::MakeBenchmarkDialog()
S.EndMultiColumn(); S.EndMultiColumn();
// //
item = S.AddCheckBox(wxT("Show detailed info about each block file"), item = S.AddCheckBox(_("Show detailed info about each block file"),
wxT("false")); wxT("false"));
item->SetValidator(wxGenericValidator(&mBlockDetail)); item->SetValidator(wxGenericValidator(&mBlockDetail));
// //
item = S.AddCheckBox(wxT("Show detailed info about each editing operation"), item = S.AddCheckBox(_("Show detailed info about each editing operation"),
wxT("false")); wxT("false"));
item->SetValidator(wxGenericValidator(&mEditDetail)); item->SetValidator(wxGenericValidator(&mEditDetail));
// //
mText = S.Id(StaticTextID).AddTextWindow(wxT("")); mText = S.Id(StaticTextID).AddTextWindow(wxT(""));
mText->SetName(wxT("Output")); /* i18n-hint noun */
mText->SetName(_("Output"));
mText->SetSizeHints(wxSize(500,200)); mText->SetSizeHints(wxSize(500,200));
// //
@ -218,9 +220,10 @@ void BenchmarkDialog::MakeBenchmarkDialog()
{ {
S.StartHorizontalLay(wxALIGN_LEFT, false); S.StartHorizontalLay(wxALIGN_LEFT, false);
{ {
S.Id(RunID).AddButton(wxT("Run"))->SetDefault(); S.Id(RunID).AddButton(_("Run"))->SetDefault();
S.Id(BSaveID).AddButton(wxT("Save")); S.Id(BSaveID).AddButton(_("Save"));
S.Id(ClearID).AddButton(wxT("Clear")); /* i18n-hint verb; to empty or erase */
S.Id(ClearID).AddButton(_("Clear"));
} }
S.EndHorizontalLay(); S.EndHorizontalLay();
@ -232,7 +235,8 @@ void BenchmarkDialog::MakeBenchmarkDialog()
S.StartHorizontalLay(wxALIGN_NOT | wxALIGN_LEFT, false); S.StartHorizontalLay(wxALIGN_NOT | wxALIGN_LEFT, false);
{ {
S.Id(wxID_CANCEL).AddButton(wxT("Close")); /* i18n-hint verb */
S.Id(wxID_CANCEL).AddButton(_("Close"));
} }
S.EndHorizontalLay(); S.EndHorizontalLay();
} }
@ -246,10 +250,12 @@ void BenchmarkDialog::MakeBenchmarkDialog()
void BenchmarkDialog::OnSave( wxCommandEvent & WXUNUSED(event)) void BenchmarkDialog::OnSave( wxCommandEvent & WXUNUSED(event))
{ {
wxString fName = wxT("benchmark.txt"); /* i18n-hint: Benchmark means a software speed test;
leave untranslated file extension .txt */
wxString fName = _("benchmark.txt");
fName = FileNames::SelectFile(FileNames::Operation::Export, fName = FileNames::SelectFile(FileNames::Operation::Export,
wxT("Export Benchmark Data As:"), _("Export Benchmark Data as:"),
wxEmptyString, wxEmptyString,
fName, fName,
wxT("txt"), wxT("txt"),
@ -317,17 +323,17 @@ void BenchmarkDialog::OnRun( wxCommandEvent & WXUNUSED(event))
mRandSeedStr.ToLong(&randSeed); mRandSeedStr.ToLong(&randSeed);
if (blockSize < 1 || blockSize > 1024) { if (blockSize < 1 || blockSize > 1024) {
wxMessageBox(wxT("Block size should be in the range 1 - 1024 KB.")); wxMessageBox(_("Block size should be in the range 1 - 1024 KB."));
return; return;
} }
if (numEdits < 1 || numEdits > 10000) { if (numEdits < 1 || numEdits > 10000) {
wxMessageBox(wxT("Number of edits should be in the range 1 - 10000.")); wxMessageBox(_("Number of edits should be in the range 1 - 10000."));
return; return;
} }
if (dataSize < 1 || dataSize > 2000) { if (dataSize < 1 || dataSize > 2000) {
wxMessageBox(wxT("Test data size should be in the range 1 - 2000 MB.")); wxMessageBox(_("Test data size should be in the range 1 - 2000 MB."));
return; return;
} }
@ -371,8 +377,7 @@ void BenchmarkDialog::OnRun( wxCommandEvent & WXUNUSED(event))
// They are (and are supposed to be) a different size to // They are (and are supposed to be) a different size to
// the blocks that make the blockfiles. That way we get to // the blocks that make the blockfiles. That way we get to
// do some testing of when edit chunks cross blockfile boundaries. // do some testing of when edit chunks cross blockfile boundaries.
Printf(wxT("Using %d chunks of %d samples each, for a total of ") Printf(_("Using %d chunks of %d samples each, for a total of %.1f MB.\n"),
wxT("%.1f MB.\n"),
nChunks, chunkSize, nChunks*chunkSize*sizeof(short)/1048576.0); nChunks, chunkSize, nChunks*chunkSize*sizeof(short)/1048576.0);
int trials = numEdits; int trials = numEdits;
@ -381,7 +386,7 @@ void BenchmarkDialog::OnRun( wxCommandEvent & WXUNUSED(event))
Shorts small1{ nChunks }; Shorts small1{ nChunks };
Shorts block{ chunkSize }; Shorts block{ chunkSize };
Printf(wxT("Preparing...\n")); Printf(_("Preparing...\n"));
wxTheApp->Yield(); wxTheApp->Yield();
FlushPrint(); FlushPrint();
@ -409,12 +414,12 @@ void BenchmarkDialog::OnRun( wxCommandEvent & WXUNUSED(event))
t->GetEndTime(); t->GetEndTime();
if (t->GetClipByIndex(0)->GetSequence()->GetNumSamples() != nChunks * chunkSize) { if (t->GetClipByIndex(0)->GetSequence()->GetNumSamples() != nChunks * chunkSize) {
Printf(wxT("Expected len %d, track len %lld.\n"), nChunks * chunkSize, Printf(_("Expected len %d, track len %lld.\n"), nChunks * chunkSize,
t->GetClipByIndex(0)->GetSequence()->GetNumSamples().as_long_long()); t->GetClipByIndex(0)->GetSequence()->GetNumSamples().as_long_long());
goto fail; goto fail;
} }
Printf(wxT("Performing %d edits...\n"), trials); Printf(_("Performing %d edits...\n"), trials);
wxTheApp->Yield(); wxTheApp->Yield();
FlushPrint(); FlushPrint();
@ -428,17 +433,17 @@ void BenchmarkDialog::OnRun( wxCommandEvent & WXUNUSED(event))
// 1 <= xlen <= nChunks - x0 // 1 <= xlen <= nChunks - x0
const size_t xlen = 1 + (rand() % (nChunks - x0)); const size_t xlen = 1 + (rand() % (nChunks - x0));
if (mEditDetail) if (mEditDetail)
Printf(wxT("Cut: %d - %d \n"), x0 * chunkSize, (x0 + xlen) * chunkSize); Printf(_("Cut: %d - %d \n"), x0 * chunkSize, (x0 + xlen) * chunkSize);
Track::Holder tmp; Track::Holder tmp;
try { try {
tmp = t->Cut(double (x0 * chunkSize), double ((x0 + xlen) * chunkSize)); tmp = t->Cut(double (x0 * chunkSize), double ((x0 + xlen) * chunkSize));
} }
catch (const AudacityException&) { catch (const AudacityException&) {
Printf(wxT("Trial %d\n"), z); Printf(_("Trial %d\n"), z);
Printf(wxT("Cut (%d, %d) failed.\n"), (x0 * chunkSize), Printf(_("Cut (%d, %d) failed.\n"), (x0 * chunkSize),
(x0 + xlen) * chunkSize); (x0 + xlen) * chunkSize);
Printf(wxT("Expected len %d, track len %lld.\n"), nChunks * chunkSize, Printf(_("Expected len %d, track len %lld.\n"), nChunks * chunkSize,
t->GetClipByIndex(0)->GetSequence()->GetNumSamples().as_long_long()); t->GetClipByIndex(0)->GetSequence()->GetNumSamples().as_long_long());
goto fail; goto fail;
} }
@ -448,19 +453,19 @@ void BenchmarkDialog::OnRun( wxCommandEvent & WXUNUSED(event))
const size_t y0 = rand() % (nChunks - xlen + 1); const size_t y0 = rand() % (nChunks - xlen + 1);
if (mEditDetail) if (mEditDetail)
Printf(wxT("Paste: %d\n"), y0 * chunkSize); Printf(_("Paste: %d\n"), y0 * chunkSize);
try { try {
t->Paste((double)(y0 * chunkSize), tmp.get()); t->Paste((double)(y0 * chunkSize), tmp.get());
} }
catch (const AudacityException&) { catch (const AudacityException&) {
Printf(wxT("Trial %d\nFailed on Paste.\n"), z); Printf(_("Trial %d\nFailed on Paste.\n"), z);
goto fail; goto fail;
} }
if (t->GetClipByIndex(0)->GetSequence()->GetNumSamples() != nChunks * chunkSize) { if (t->GetClipByIndex(0)->GetSequence()->GetNumSamples() != nChunks * chunkSize) {
Printf(wxT("Trial %d\n"), z); Printf(_("Trial %d\n"), z);
Printf(wxT("Expected len %d, track len %lld.\n"), nChunks * chunkSize, Printf(_("Expected len %d, track len %lld.\n"), nChunks * chunkSize,
t->GetClipByIndex(0)->GetSequence()->GetNumSamples().as_long_long()); t->GetClipByIndex(0)->GetSequence()->GetNumSamples().as_long_long());
goto fail; goto fail;
} }
@ -479,19 +484,19 @@ void BenchmarkDialog::OnRun( wxCommandEvent & WXUNUSED(event))
seq->DebugPrintf(seq->GetBlockArray(), seq->GetNumSamples(), &tempStr); seq->DebugPrintf(seq->GetBlockArray(), seq->GetNumSamples(), &tempStr);
mToPrint += tempStr; mToPrint += tempStr;
} }
Printf(wxT("Time to perform %d edits: %ld ms\n"), trials, elapsed); Printf(_("Time to perform %d edits: %ld ms\n"), trials, elapsed);
FlushPrint(); FlushPrint();
wxTheApp->Yield(); wxTheApp->Yield();
#if 0 #if 0
Printf(wxT("Checking file pointer leaks:\n")); Printf(_("Checking file pointer leaks:\n"));
Printf(wxT("Track # blocks: %d\n"), t->GetBlockArray()->Count()); Printf(_("Track # blocks: %d\n"), t->GetBlockArray()->Count());
Printf(wxT("Disk # blocks: \n")); Printf(_("Disk # blocks: \n"));
system("ls .audacity_temp/* | wc --lines"); system("ls .audacity_temp/* | wc --lines");
#endif #endif
Printf(wxT("Doing correctness check...\n")); Printf(_("Doing correctness check...\n"));
FlushPrint(); FlushPrint();
wxTheApp->Yield(); wxTheApp->Yield();
@ -504,19 +509,19 @@ void BenchmarkDialog::OnRun( wxCommandEvent & WXUNUSED(event))
if (block[b] != v) { if (block[b] != v) {
bad++; bad++;
if (bad < 10) if (bad < 10)
Printf(wxT("Bad: chunk %d sample %d\n"), i, b); Printf(_("Bad: chunk %d sample %d\n"), i, b);
b = chunkSize; b = chunkSize;
} }
} }
if (bad == 0) if (bad == 0)
Printf(wxT("Passed correctness check!\n")); Printf(_("Passed correctness check!\n"));
else else
Printf(wxT("Errors in %d/%d chunks\n"), bad, nChunks); Printf(_("Errors in %d/%d chunks\n"), bad, nChunks);
elapsed = timer.Time(); elapsed = timer.Time();
Printf(wxT("Time to check all data: %ld ms\n"), elapsed); Printf(_("Time to check all data: %ld ms\n"), elapsed);
Printf(wxT("Reading data again...\n")); Printf(_("Reading data again...\n"));
wxTheApp->Yield(); wxTheApp->Yield();
FlushPrint(); FlushPrint();
@ -533,21 +538,20 @@ void BenchmarkDialog::OnRun( wxCommandEvent & WXUNUSED(event))
elapsed = timer.Time(); elapsed = timer.Time();
Printf(wxT("Time to check all data (2): %ld ms\n"), elapsed); Printf(_("Time to check all data (2): %ld ms\n"), elapsed);
Printf(wxT("At 44100 Hz, 16-bits per sample, the estimated number of\n") Printf(_("At 44100 Hz, 16-bits per sample, the estimated number of\n simultaneous tracks that could be played at once: %.1f\n"),
wxT("simultaneous tracks that could be played at once: %.1f\n"),
(nChunks*chunkSize/44100.0)/(elapsed/1000.0)); (nChunks*chunkSize/44100.0)/(elapsed/1000.0));
goto success; goto success;
fail: fail:
Printf(wxT("TEST FAILED!!!\n")); Printf(_("TEST FAILED!!!\n"));
success: success:
dd.reset(); dd.reset();
Printf(wxT("Benchmark completed successfully.\n")); Printf(_("Benchmark completed successfully.\n"));
HoldPrint(false); HoldPrint(false);
} }

View File

@ -353,7 +353,7 @@ FreqWindow::FreqWindow(wxWindow * parent, wxWindowID id,
hRuler->ruler.SetLog(true); hRuler->ruler.SetLog(true);
hRuler->ruler.SetRange(10, 20000); hRuler->ruler.SetRange(10, 20000);
hRuler->ruler.SetFormat(Ruler::RealFormat); hRuler->ruler.SetFormat(Ruler::RealFormat);
hRuler->ruler.SetUnits(wxT("Hz")); hRuler->ruler.SetUnits(_("Hz"));
hRuler->ruler.SetFlip(true); hRuler->ruler.SetFlip(true);
hRuler->ruler.SetLabelEdges(true); hRuler->ruler.SetLabelEdges(true);
int h; int h;
@ -390,12 +390,12 @@ FreqWindow::FreqWindow(wxWindow * parent, wxWindowID id,
S.SetStretchyCol(1); S.SetStretchyCol(1);
S.SetStretchyCol(3); S.SetStretchyCol(3);
{ {
S.AddPrompt(wxT("Cursor:")); S.AddPrompt(_("Cursor:"));
S.SetStyle(wxTE_READONLY); S.SetStyle(wxTE_READONLY);
mCursorText = S.AddTextBox(wxT(""), wxT(""), 10); mCursorText = S.AddTextBox(wxT(""), wxT(""), 10);
S.AddPrompt(wxT("Peak:")); S.AddPrompt(_("Peak:"));
S.SetStyle(wxTE_READONLY); S.SetStyle(wxTE_READONLY);
mPeakText = S.AddTextBox(wxT(""), wxT(""), 10); mPeakText = S.AddTextBox(wxT(""), wxT(""), 10);

View File

@ -24,6 +24,7 @@
#include "Resample.h" #include "Resample.h"
#include "Prefs.h" #include "Prefs.h"
#include "TranslatableStringArray.h"
#include <soxr.h> #include <soxr.h>
@ -52,11 +53,28 @@ int Resample::GetNumMethods() { return 4; }
wxString Resample::GetMethodName(int index) wxString Resample::GetMethodName(int index)
{ {
static char const * const soxr_method_names[] = { static const wxString soxr_method_names[] = {
"Low Quality (Fastest)", "Medium Quality", "High Quality", "Best Quality (Slowest)" XO("Low Quality (Fastest)"),
XO("Medium Quality"),
XO("High Quality"),
XO("Best Quality (Slowest)")
}; };
return wxString(wxString::FromAscii(soxr_method_names[index])); wxASSERT( GetNumMethods() ==
sizeof(soxr_method_names) / sizeof(*soxr_method_names) );
class MethodNamesArray final : public TranslatableStringArray
{
void Populate() override
{
for (auto &name : soxr_method_names)
mContents.push_back( wxGetTranslation( name ) );
}
};
static MethodNamesArray theArray;
return theArray.Get()[ index ];
} }
const wxString Resample::GetFastMethodKey() const wxString Resample::GetFastMethodKey()

View File

@ -752,8 +752,9 @@ void ThemeBase::CreateImageCache( bool bBinarySave )
{ {
wxMessageBox( wxMessageBox(
wxString::Format( wxString::Format(
wxT("Theme cache file:\n %s\nalready exists.\nAre you sure you want to replace it?"), // _("Theme cache file:\n %s\nalready exists.\nAre you sure you want to replace it?"),
FileName.c_str() )); FileName.c_str() )
);
return; return;
} }
#endif #endif
@ -775,7 +776,11 @@ void ThemeBase::CreateImageCache( bool bBinarySave )
} }
wxMessageBox( wxMessageBox(
wxString::Format( wxString::Format(
wxT("Theme written to:\n %s."), /* i18n-hint: A theme is a consistent visual style across an application's
graphical user interface, including choices of colors, and similarity of images
such as those on button controls. Audacity can load and save alternative
themes. */
_("Theme written to:\n %s."),
FileName.c_str() )); FileName.c_str() ));
} }
// ELSE saving to a C code textual version. // ELSE saving to a C code textual version.
@ -801,7 +806,8 @@ void ThemeBase::CreateImageCache( bool bBinarySave )
} }
wxMessageBox( wxMessageBox(
wxString::Format( wxString::Format(
wxT("Theme as Cee code written to:\n %s."), /* i18n-hint "Cee" means the C computer programming language */
_("Theme as Cee code written to:\n %s."),
FileName.c_str() )); FileName.c_str() ));
} }
} }
@ -1181,7 +1187,7 @@ void ThemeBase::SaveComponents()
} }
wxMessageBox( wxMessageBox(
wxString::Format( wxString::Format(
wxT("Theme written to:\n %s."), _("Theme written to:\n %s."),
FileNames::ThemeComponentsDir().c_str() )); FileNames::ThemeComponentsDir().c_str() ));
} }

View File

@ -412,7 +412,7 @@ void TimerRecordDialog::OnOK(wxCommandEvent& WXUNUSED(event))
// Create the message string // Create the message string
wxString sMessage = ""; wxString sMessage = "";
sMessage.Printf("You may not have enough free disk space to complete this Timer Recording, based on your current settings.\n\nDo you wish to continue?\n\nPlanned recording duration: %s\nRecording time remaining on disk: %s", sMessage.Printf(_("You may not have enough free disk space to complete this Timer Recording, based on your current settings.\n\nDo you wish to continue?\n\nPlanned recording duration: %s\nRecording time remaining on disk: %s"),
sPlannedTime, sPlannedTime,
sRemainingTime); sRemainingTime);
@ -492,7 +492,7 @@ bool TimerRecordDialog::RemoveAllAutoSaveFiles()
{ {
// I don't think this error message is actually useful. // I don't think this error message is actually useful.
// -dmazzoni // -dmazzoni
//wxMessageBox(wxT("Could not remove auto save file: " + files[i]), //wxMessageBox(_("Could not remove auto save file: " + files[i]),
// _("Error"), wxICON_STOP); // _("Error"), wxICON_STOP);
return false; return false;
} }
@ -622,18 +622,18 @@ int TimerRecordDialog::ExecutePostRecordActions(bool bWasStopped) {
if (m_bAutoSaveEnabled) { if (m_bAutoSaveEnabled) {
if (bSaveOK) { if (bSaveOK) {
sMessage.Printf("%s\n\nRecording saved: %s", sMessage.Printf(_("%s\n\nRecording saved: %s"),
sMessage, m_fnAutoSaveFile.GetFullPath()); sMessage, m_fnAutoSaveFile.GetFullPath());
} else { } else {
sMessage.Printf("%s\n\nError saving recording.", sMessage); sMessage.Printf(_("%s\n\nError saving recording."), sMessage);
} }
} }
if (m_bAutoExportEnabled) { if (m_bAutoExportEnabled) {
if (bExportOK) { if (bExportOK) {
sMessage.Printf("%s\n\nRecording exported: %s", sMessage.Printf(_("%s\n\nRecording exported: %s"),
sMessage, m_fnAutoExportFile.GetFullPath()); sMessage, m_fnAutoExportFile.GetFullPath());
} else { } else {
sMessage.Printf("%s\n\nError exporting recording.", sMessage); sMessage.Printf(_("%s\n\nError exporting recording."), sMessage);
} }
} }
@ -642,7 +642,7 @@ int TimerRecordDialog::ExecutePostRecordActions(bool bWasStopped) {
if ((iOverriddenAction != iPostRecordAction) && if ((iOverriddenAction != iPostRecordAction) &&
(iOverriddenAction != POST_TIMER_RECORD_NOTHING)) { (iOverriddenAction != POST_TIMER_RECORD_NOTHING)) {
// Inform the user that we have overridden the selected action // Inform the user that we have overridden the selected action
sMessage.Printf("%s\n\n'%s' has been canceled due to the error(s) noted above.", sMessage.Printf(_("%s\n\n'%s' has been canceled due to the error(s) noted above."),
sMessage, sMessage,
m_pTimerAfterCompleteChoiceCtrl->GetString(iOverriddenAction)); m_pTimerAfterCompleteChoiceCtrl->GetString(iOverriddenAction));
} }
@ -652,7 +652,7 @@ int TimerRecordDialog::ExecutePostRecordActions(bool bWasStopped) {
} else { } else {
if (bWasStopped && (iOverriddenAction != POST_TIMER_RECORD_NOTHING)) { if (bWasStopped && (iOverriddenAction != POST_TIMER_RECORD_NOTHING)) {
sMessage.Printf("%s\n\n'%s' has been canceled as the recording was stopped.", sMessage.Printf(_("%s\n\n'%s' has been canceled as the recording was stopped."),
sMessage, sMessage,
m_pTimerAfterCompleteChoiceCtrl->GetString(iOverriddenAction)); m_pTimerAfterCompleteChoiceCtrl->GetString(iOverriddenAction));
} }

View File

@ -818,7 +818,7 @@ void VoiceKey::CalibrateNoise(const WaveTrack & t, sampleCount start, sampleCoun
text+= wxString::Format(_("Sign Changes -- mean: %1.4f sd: (%1.4f)\n"),mSignChangesMean,mSignChangesSD); text+= wxString::Format(_("Sign Changes -- mean: %1.4f sd: (%1.4f)\n"),mSignChangesMean,mSignChangesSD);
text += wxString::Format(_("Direction Changes -- mean: %1.4f sd: (%1.4f)\n"), mDirectionChangesMean, mDirectionChangesSD); text += wxString::Format(_("Direction Changes -- mean: %1.4f sd: (%1.4f)\n"), mDirectionChangesMean, mDirectionChangesSD);
wxMessageDialog{ NULL, text, wxMessageDialog{ NULL, text,
wxT("Calibration Complete"), _("Calibration Complete"),
wxOK | wxICON_INFORMATION, wxOK | wxICON_INFORMATION,
wxPoint(-1, -1) } wxPoint(-1, -1) }
.ShowModal(); .ShowModal();

View File

@ -1034,7 +1034,7 @@ bool LV2Effect::PopulateUI(wxWindow *parent)
mMaster = InitInstance(mSampleRate); mMaster = InitInstance(mSampleRate);
if (mMaster == NULL) if (mMaster == NULL)
{ {
wxMessageBox(wxT("Couldn't instantiate effect")); wxMessageBox(_("Couldn't instantiate effect"));
return false; return false;
} }

View File

@ -326,7 +326,7 @@ bool ExportFFmpeg::Init(const char *shortname, AudacityProject *project, const T
{ {
if ((err = ufile_fopen(&mEncFormatCtx->pb, mName, AVIO_FLAG_WRITE)) < 0) if ((err = ufile_fopen(&mEncFormatCtx->pb, mName, AVIO_FLAG_WRITE)) < 0)
{ {
wxMessageBox(wxString::Format(wxT("FFmpeg : ERROR - Can't open output file \"%s\" to write. Error code is %d."), mName.c_str(), err), wxMessageBox(wxString::Format(_("FFmpeg : ERROR - Can't open output file \"%s\" to write. Error code is %d."), mName.c_str(), err),
_("FFmpeg Error"), wxOK|wxCENTER|wxICON_EXCLAMATION); _("FFmpeg Error"), wxOK|wxCENTER|wxICON_EXCLAMATION);
return false; return false;
} }

View File

@ -955,8 +955,8 @@ GStreamerImportFileHandle::Init()
// Add the decoder to the pipeline // Add the decoder to the pipeline
if (!gst_bin_add(GST_BIN(mPipeline.get()), mDec)) if (!gst_bin_add(GST_BIN(mPipeline.get()), mDec))
{ {
wxMessageBox(wxT("Unable to add decoder to pipeline"), wxMessageBox(_("Unable to add decoder to pipeline"),
wxT("GStreamer Importer")); _("GStreamer Importer"));
// Cleanup expected to occur in destructor // Cleanup expected to occur in destructor
return false; return false;
@ -966,8 +966,8 @@ GStreamerImportFileHandle::Init()
GstStateChangeReturn state = gst_element_set_state(mPipeline.get(), GST_STATE_PAUSED); GstStateChangeReturn state = gst_element_set_state(mPipeline.get(), GST_STATE_PAUSED);
if (state == GST_STATE_CHANGE_FAILURE) if (state == GST_STATE_CHANGE_FAILURE)
{ {
wxMessageBox(wxT("Unable to set stream state to paused."), wxMessageBox(_("Unable to set stream state to paused."),
wxT("GStreamer Importer")); _("GStreamer Importer"));
return false; return false;
} }
@ -1095,8 +1095,8 @@ GStreamerImportFileHandle::Import(TrackFactory *trackFactory,
// Can't do much if we don't have any streams to process // Can't do much if we don't have any streams to process
if (!haveStreams) if (!haveStreams)
{ {
wxMessageBox(wxT("File doesn't contain any audio streams."), wxMessageBox(_("File doesn't contain any audio streams."),
wxT("GStreamer Importer")); _("GStreamer Importer"));
return ProgressResult::Failed; return ProgressResult::Failed;
} }
@ -1104,8 +1104,8 @@ GStreamerImportFileHandle::Import(TrackFactory *trackFactory,
GstStateChangeReturn state = gst_element_set_state(mPipeline.get(), GST_STATE_PLAYING); GstStateChangeReturn state = gst_element_set_state(mPipeline.get(), GST_STATE_PLAYING);
if (state == GST_STATE_CHANGE_FAILURE) if (state == GST_STATE_CHANGE_FAILURE)
{ {
wxMessageBox(wxT("Unable to import file, state change failed."), wxMessageBox(_("Unable to import file, state change failed."),
wxT("GStreamer Importer")); _("GStreamer Importer"));
return ProgressResult::Failed; return ProgressResult::Failed;
} }
@ -1235,7 +1235,7 @@ GStreamerImportFileHandle::ProcessBusMessage(bool & success)
debug ? wxT("\n") : wxT(""), debug ? wxT("\n") : wxT(""),
debug ? wxString::FromUTF8(debug.get()).c_str() : wxT("")); debug ? wxString::FromUTF8(debug.get()).c_str() : wxT(""));
#if defined(_DEBUG) #if defined(_DEBUG)
wxMessageBox(m, wxT("GStreamer Error:")); wxMessageBox(wxString::Format(_("GStreamer Error: %s"), m));
#else #else
wxLogMessage(wxT("GStreamer Error: %s"), m.c_str()); wxLogMessage(wxT("GStreamer Error: %s"), m.c_str());
#endif #endif