diff --git a/src/AboutDialog.cpp b/src/AboutDialog.cpp index 993b13b63..97db46fad 100644 --- a/src/AboutDialog.cpp +++ b/src/AboutDialog.cpp @@ -346,10 +346,10 @@ visit our [[http://forum.audacityteam.org/|forum]]."); #endif /* i18n-hint: The Latin phrase, "In memory of" a deceased person, often untranslated in European languages */ - wxT("

") + wxString::Format(_("In Memoriam")) + wxT("
") + + wxT("

") + _("In Memoriam") + wxT("
") + GetCreditsByRole(roleDeceased) + - wxT("

") + wxString::Format(_("Audacity Team Members")) + wxT("
") + + wxT("

") + _("Audacity Team Members") + wxT("
") + GetCreditsByRole(roleTeamMember) + wxT("

") + _("Emeritus:") + wxT("
") + diff --git a/src/Menus.cpp b/src/Menus.cpp index 2d7f76d09..86b31a8ca 100644 --- a/src/Menus.cpp +++ b/src/Menus.cpp @@ -1123,7 +1123,7 @@ void AudacityProject::CreateMenusAndCommands() EffectManager::Get().GetEffectName(mLastEffect)); } else - buildMenuLabel.Printf(_("Repeat Last Effect")); + buildMenuLabel = _("Repeat Last Effect"); #ifdef EXPERIMENTAL_EFFECT_MANAGEMENT c->AddItem(wxT("ManageEffects"), _("Add / Remove Plug-ins..."), FN(OnManageEffects)); @@ -1937,7 +1937,7 @@ void AudacityProject::ModifyUndoMenuItems() } else { mCommandManager.Modify(wxT("Undo"), - wxString::Format(_("&Undo"))); + _("&Undo")); } if (GetUndoManager()->RedoAvailable()) { @@ -1949,7 +1949,7 @@ void AudacityProject::ModifyUndoMenuItems() } else { mCommandManager.Modify(wxT("Redo"), - wxString::Format(_("&Redo"))); + _("&Redo")); mCommandManager.Enable(wxT("Redo"), false); } } @@ -4602,13 +4602,13 @@ void AudacityProject::OnExportMIDI(){ } if(numNoteTracksSelected > 1) { - AudacityMessageBox(wxString::Format(_( - "Please select only one Note Track at a time."))); + AudacityMessageBox(_( + "Please select only one Note Track at a time.")); return; } else if(numNoteTracksSelected < 1) { - AudacityMessageBox(wxString::Format(_( - "Please select a Note Track."))); + AudacityMessageBox(_( + "Please select a Note Track.")); return; } diff --git a/src/Project.cpp b/src/Project.cpp index 0d9cc6906..f791c502d 100644 --- a/src/Project.cpp +++ b/src/Project.cpp @@ -4920,7 +4920,7 @@ void AudacityProject::OnTimer(wxTimerEvent& WXUNUSED(event)) ODManager::Instance()->SignalTaskQueueLoop(); - msg.Printf(_("On-demand import and waveform calculation complete.")); + msg = _("On-demand import and waveform calculation complete."); mStatusBar->SetStatusText(msg, mainStatusBarField); } diff --git a/src/TimerRecordDialog.cpp b/src/TimerRecordDialog.cpp index cecb06f9c..7fa4a8a9e 100644 --- a/src/TimerRecordDialog.cpp +++ b/src/TimerRecordDialog.cpp @@ -524,12 +524,12 @@ int TimerRecordDialog::RunWaitDialog() // Two column layout. Line spacing must match for both columns. // First column - wxString strMsg = wxString::Format(_("Recording start:\n") + + wxString strMsg = _("Recording start:\n") + _("Duration:\n") + _("Recording end:\n\n") + _("Automatic Save enabled:\n") + _("Automatic Export enabled:\n") + - _("Action after Timer Recording:")); + _("Action after Timer Recording:"); strMsg += ProgressDialog::ColoumnSplitMarker; @@ -1009,12 +1009,12 @@ ProgressResult TimerRecordDialog::WaitForStart() // Two column layout. Line spacing must match for both columns. // First column - wxString strMsg = wxString::Format(_("Waiting to start recording at:\n") + + wxString strMsg = _("Waiting to start recording at:\n") + _("Recording duration:\n") + _("Scheduled to stop at:\n\n") + _("Automatic Save enabled:\n") + _("Automatic Export enabled:\n") + - _("Action after Timer Recording:")); + _("Action after Timer Recording:"); strMsg += ProgressDialog::ColoumnSplitMarker; @@ -1054,10 +1054,10 @@ ProgressResult TimerRecordDialog::PreActionDelay(int iActionIndex, TimerRecordCo // Two column layout. Line spacing must match for both columns. // First column - wxString strMsg = wxString::Format(_("Timer Recording completed.\n\n") + + wxString strMsg = _("Timer Recording completed.\n\n") + _("Recording Saved:\n") + _("Recording Exported:\n") + - _("Action after Timer Recording:")); + _("Action after Timer Recording:"); strMsg += ProgressDialog::ColoumnSplitMarker; diff --git a/src/VoiceKey.cpp b/src/VoiceKey.cpp index 1a77b1b14..d93021537 100644 --- a/src/VoiceKey.cpp +++ b/src/VoiceKey.cpp @@ -811,7 +811,7 @@ void VoiceKey::CalibrateNoise(const WaveTrack & t, sampleCount start, sampleCoun mDirectionChangesMean = sumdc / samples; mDirectionChangesSD =sqrt(sumdc2 / samples - mDirectionChangesMean * mDirectionChangesMean) ; - wxString text = wxString::Format(_("Calibration Results\n")); + wxString text = _("Calibration Results\n"); /* i18n-hint: %1.4f is replaced by a number. sd stands for 'Standard Deviations'*/ text += wxString::Format(_("Energy -- mean: %1.4f sd: (%1.4f)\n"),mEnergyMean,mEnergySD); text+= wxString::Format(_("Sign Changes -- mean: %1.4f sd: (%1.4f)\n"),mSignChangesMean,mSignChangesSD); diff --git a/src/effects/AutoDuck.cpp b/src/effects/AutoDuck.cpp index 3ed77cf0e..0ed865d58 100644 --- a/src/effects/AutoDuck.cpp +++ b/src/effects/AutoDuck.cpp @@ -685,7 +685,7 @@ void EffectAutoDuckPanel::OnPaint(wxPaintEvent & WXUNUSED(evt)) duckAmountDb < MIN_DuckAmountDb || duckAmountDb > MAX_DuckAmountDb) { // values are out of range, no preview available - wxString message = wxString::Format(_("Preview not available")); + wxString message = _("Preview not available"); int textWidth = 0, textHeight = 0; dc.GetTextExtent(message, &textWidth, &textHeight); dc.DrawText(message, (clientWidth - textWidth) / 2, diff --git a/src/effects/ClickRemoval.cpp b/src/effects/ClickRemoval.cpp index aaec1782d..a7f55dcd5 100644 --- a/src/effects/ClickRemoval.cpp +++ b/src/effects/ClickRemoval.cpp @@ -193,7 +193,7 @@ bool EffectClickRemoval::Process() } if (bGoodResult && !mbDidSomething) // Processing successful, but ineffective. Effect::MessageBox( - wxString::Format(_("Algorithm not effective on this audio. Nothing changed.")), + _("Algorithm not effective on this audio. Nothing changed."), wxOK | wxICON_ERROR); this->ReplaceProcessedTracks(bGoodResult && mbDidSomething); diff --git a/src/effects/Contrast.cpp b/src/effects/Contrast.cpp index 383bd0d91..da6a5c2f0 100644 --- a/src/effects/Contrast.cpp +++ b/src/effects/Contrast.cpp @@ -408,7 +408,7 @@ namespace { return wxString::Format(_("%.2f dB RMS"), diffdB); else /* i18n-hint: dB abbreviates decibels */ - return wxString::Format(_("Infinite dB difference")); + return _("Infinite dB difference"); } } @@ -463,27 +463,27 @@ void ContrastDialog::results() if (mForegroundIsDefined) { mForegroundRMSText->SetName(_("Measured foreground level")); // Read by screen-readers if(std::isinf(- foregrounddB)) - mForegroundRMSText->ChangeValue(wxString::Format(_("zero"))); + mForegroundRMSText->ChangeValue(_("zero")); else mForegroundRMSText->ChangeValue(wxString::Format(_("%.2f dB"), foregrounddB)); // i18n-hint: short form of 'decibels' } else { mForegroundRMSText->SetName(_("No foreground measured")); // Read by screen-readers mForegroundRMSText->ChangeValue(wxT("")); - mPassFailText->ChangeValue(wxString::Format(_("Foreground not yet measured"))); + mPassFailText->ChangeValue(_("Foreground not yet measured")); } if (mBackgroundIsDefined) { mBackgroundRMSText->SetName(_("Measured background level")); if(std::isinf(- backgrounddB)) - mBackgroundRMSText->ChangeValue(wxString::Format(_("zero"))); + mBackgroundRMSText->ChangeValue(_("zero")); else mBackgroundRMSText->ChangeValue(wxString::Format(_("%.2f dB"), backgrounddB)); } else { mBackgroundRMSText->SetName(_("No background measured")); mBackgroundRMSText->ChangeValue(wxT("")); - mPassFailText->ChangeValue(wxString::Format(_("Background not yet measured"))); + mPassFailText->ChangeValue(_("Background not yet measured")); } } diff --git a/src/export/ExportFFmpeg.cpp b/src/export/ExportFFmpeg.cpp index c2b7f9c92..7b182be09 100644 --- a/src/export/ExportFFmpeg.cpp +++ b/src/export/ExportFFmpeg.cpp @@ -288,7 +288,7 @@ bool ExportFFmpeg::Init(const char *shortname, AudacityProject *project, const T mEncFormatCtx.reset(avformat_alloc_context()); if (!mEncFormatCtx) { - AudacityMessageBox(wxString::Format(_("FFmpeg : ERROR - Can't allocate output format context.")), + AudacityMessageBox(_("FFmpeg : ERROR - Can't allocate output format context."), _("FFmpeg Error"), wxOK|wxCENTER|wxICON_EXCLAMATION); return false; } @@ -546,8 +546,10 @@ bool ExportFFmpeg::InitCodecs(AudacityProject *project) mEncAudioFifoOutBuf.reset(static_cast(av_malloc(mEncAudioFifoOutBufSiz))); if (!mEncAudioFifoOutBuf) { - AudacityMessageBox(wxString::Format(_("FFmpeg : ERROR - Can't allocate buffer to read into from audio FIFO.")), - _("FFmpeg Error"), wxOK|wxCENTER|wxICON_EXCLAMATION); + AudacityMessageBox( + _("FFmpeg : ERROR - Can't allocate buffer to read into from audio FIFO."), + _("FFmpeg Error"), wxOK|wxCENTER|wxICON_EXCLAMATION + ); return false; } @@ -576,22 +578,28 @@ static int encode_audio(AVCodecContext *avctx, AVPacket *pkt, int16_t *audio_sam buffer_size = av_samples_get_buffer_size(NULL, avctx->channels, frame->nb_samples, avctx->sample_fmt, 0); if (buffer_size < 0) { - AudacityMessageBox(wxString::Format(_("FFmpeg : ERROR - Could not get sample buffer size")), - _("FFmpeg Error"), wxOK|wxCENTER|wxICON_EXCLAMATION); + AudacityMessageBox( + _("FFmpeg : ERROR - Could not get sample buffer size"), + _("FFmpeg Error"), wxOK|wxCENTER|wxICON_EXCLAMATION + ); return buffer_size; } samples.reset(static_cast(av_malloc(buffer_size))); if (!samples) { - AudacityMessageBox(wxString::Format(_("FFmpeg : ERROR - Could not allocate bytes for samples buffer")), - _("FFmpeg Error"), wxOK|wxCENTER|wxICON_EXCLAMATION); + AudacityMessageBox( + _("FFmpeg : ERROR - Could not allocate bytes for samples buffer"), + _("FFmpeg Error"), wxOK|wxCENTER|wxICON_EXCLAMATION + ); return AVERROR(ENOMEM); } /* setup the data pointers in the AVFrame */ ret = avcodec_fill_audio_frame(frame.get(), avctx->channels, avctx->sample_fmt, samples.get(), buffer_size, 0); if (ret < 0) { - AudacityMessageBox(wxString::Format(_("FFmpeg : ERROR - Could not setup audio frame")), - _("FFmpeg Error"), wxOK|wxCENTER|wxICON_EXCLAMATION); + AudacityMessageBox( + _("FFmpeg : ERROR - Could not setup audio frame"), + _("FFmpeg Error"), wxOK|wxCENTER|wxICON_EXCLAMATION + ); return ret; } @@ -638,8 +646,10 @@ static int encode_audio(AVCodecContext *avctx, AVPacket *pkt, int16_t *audio_sam ret = avcodec_encode_audio2(avctx, pkt, frame.get(), &got_output); if (ret < 0) { - AudacityMessageBox(wxString::Format(_("FFmpeg : ERROR - encoding frame failed")), - _("FFmpeg Error"), wxOK|wxCENTER|wxICON_EXCLAMATION); + AudacityMessageBox( + _("FFmpeg : ERROR - encoding frame failed"), + _("FFmpeg Error"), wxOK|wxCENTER|wxICON_EXCLAMATION + ); return ret; } @@ -664,8 +674,10 @@ bool ExportFFmpeg::Finalize() int nAudioFrameSizeOut = default_frame_size * mEncAudioCodecCtx->channels * sizeof(int16_t); if (nAudioFrameSizeOut > mEncAudioFifoOutBufSiz || nFifoBytes > mEncAudioFifoOutBufSiz) { - AudacityMessageBox(wxString::Format(_("FFmpeg : ERROR - Too much remaining data.")), - _("FFmpeg Error"), wxOK | wxCENTER | wxICON_EXCLAMATION); + AudacityMessageBox( + _("FFmpeg : ERROR - Too much remaining data."), + _("FFmpeg Error"), wxOK | wxCENTER | wxICON_EXCLAMATION + ); return false; } @@ -727,8 +739,10 @@ bool ExportFFmpeg::Finalize() if (av_interleaved_write_frame(mEncFormatCtx.get(), &pkt) != 0) { - AudacityMessageBox(wxString::Format(_("FFmpeg : ERROR - Couldn't write last audio frame to output file.")), - _("FFmpeg Error"), wxOK | wxCENTER | wxICON_EXCLAMATION); + AudacityMessageBox( + _("FFmpeg : ERROR - Couldn't write last audio frame to output file."), + _("FFmpeg Error"), wxOK | wxCENTER | wxICON_EXCLAMATION + ); break; } } @@ -777,8 +791,10 @@ bool ExportFFmpeg::EncodeAudioFrame(int16_t *pFrame, size_t frameSize) return false; if (nAudioFrameSizeOut > mEncAudioFifoOutBufSiz) { - AudacityMessageBox(wxString::Format(_("FFmpeg : ERROR - nAudioFrameSizeOut too large.")), - _("FFmpeg Error"), wxOK|wxCENTER|wxICON_EXCLAMATION); + AudacityMessageBox( + _("FFmpeg : ERROR - nAudioFrameSizeOut too large."), + _("FFmpeg Error"), wxOK|wxCENTER|wxICON_EXCLAMATION + ); return false; } @@ -795,8 +811,10 @@ bool ExportFFmpeg::EncodeAudioFrame(int16_t *pFrame, size_t frameSize) default_frame_size); if (ret < 0) { - AudacityMessageBox(wxString::Format(_("FFmpeg : ERROR - Can't encode audio frame.")), - _("FFmpeg Error"), wxOK|wxCENTER|wxICON_EXCLAMATION); + AudacityMessageBox( + _("FFmpeg : ERROR - Can't encode audio frame."), + _("FFmpeg Error"), wxOK|wxCENTER|wxICON_EXCLAMATION + ); return false; } if (ret == 0) @@ -814,8 +832,10 @@ bool ExportFFmpeg::EncodeAudioFrame(int16_t *pFrame, size_t frameSize) // Write the encoded audio frame to the output file. if ((ret = av_interleaved_write_frame(mEncFormatCtx.get(), &pkt)) < 0) { - AudacityMessageBox(wxString::Format(_("FFmpeg : ERROR - Failed to write audio frame to file.")), - _("FFmpeg Error"), wxOK|wxCENTER|wxICON_EXCLAMATION); + AudacityMessageBox( + _("FFmpeg : ERROR - Failed to write audio frame to file."), + _("FFmpeg Error"), wxOK|wxCENTER|wxICON_EXCLAMATION + ); return false; } } diff --git a/src/export/ExportMultiple.cpp b/src/export/ExportMultiple.cpp index 631251b15..73b154b62 100644 --- a/src/export/ExportMultiple.cpp +++ b/src/export/ExportMultiple.cpp @@ -307,12 +307,12 @@ void ExportMultiple::PopulateOrExchange(ShuttleGui& S) // Row 1 S.SetBorder(1); mTrack = S.Id(TrackID) - .AddRadioButton(wxString(_("Tracks"))); + .AddRadioButton(_("Tracks")); mTrack->SetName(_("Tracks")); // Row 2 S.SetBorder(1); - mLabel = S.Id(LabelID).AddRadioButtonToGroup(wxString(_("Labels"))); + mLabel = S.Id(LabelID).AddRadioButtonToGroup(_("Labels")); mLabel->SetName(_("Labels")); S.SetBorder(3); diff --git a/src/tracks/ui/TimeShiftHandle.cpp b/src/tracks/ui/TimeShiftHandle.cpp index 5c2f5c457..93e3d37fb 100644 --- a/src/tracks/ui/TimeShiftHandle.cpp +++ b/src/tracks/ui/TimeShiftHandle.cpp @@ -875,7 +875,7 @@ UIHandle::Result TimeShiftHandle::Release wxString msg; bool consolidate; if (mDidSlideVertically) { - msg.Printf(_("Moved clips to another track")); + msg = _("Moved clips to another track"); consolidate = false; } else { diff --git a/src/widgets/Meter.cpp b/src/widgets/Meter.cpp index 3061aa80f..c09e7f398 100644 --- a/src/widgets/Meter.cpp +++ b/src/widgets/Meter.cpp @@ -2235,11 +2235,11 @@ wxAccStatus MeterAx::GetName(int WXUNUSED(childId), wxString* name) // always retain the leading space. Therefore a space has // been added to ensure at least one space, and stop // words from being merged - *name += wxT(" ") + wxString::Format(_(" Monitoring ")); + *name += wxT(" ") + _(" Monitoring "); } else if (m->mActive) { - *name += wxT(" ") + wxString::Format(_(" Active ")); + *name += wxT(" ") + _(" Active "); } float peak = 0.; @@ -2262,7 +2262,7 @@ wxAccStatus MeterAx::GetName(int WXUNUSED(childId), wxString* name) if (clipped) { - *name += wxT(" ") + wxString::Format(_(" Clipped ")); + *name += wxT(" ") + _(" Clipped "); } }