1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-11-06 17:13:49 +01:00

Remove unnecesary Format, Printf, casts to wxString

This commit is contained in:
Paul Licameli
2017-09-30 12:19:44 -04:00
parent 7fd78183d2
commit e0970ad1e8
12 changed files with 71 additions and 51 deletions

View File

@@ -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,

View File

@@ -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);

View File

@@ -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"));
}
}