TranslatableString for explicit prompts and units in ShuttleGui

This commit is contained in:
Paul Licameli 2019-12-22 15:40:29 -05:00
parent 747c35645a
commit d1637c22c0
34 changed files with 93 additions and 92 deletions

View File

@ -104,7 +104,7 @@ void MacroCommandDialog::PopulateOrExchange(ShuttleGui &S)
mParameters = S.AddTextBox(XO("&Parameters"), wxT(""), 0);
mParameters->SetEditable(false);
auto prompt = XO("&Details");
S.Prop(0).AddPrompt(prompt.Translation());
S.Prop(0).AddPrompt(prompt);
mDetails = S
.Name( prompt )
.AddTextWindow( wxT(""));

View File

@ -145,7 +145,7 @@ void ApplyMacroDialog::PopulateOrExchange(ShuttleGui &S)
S.StartHorizontalLay(wxEXPAND, 0);
{
S.AddPrompt( _("Apply Macro to:") );
S.AddPrompt( XO("Apply Macro to:") );
wxButton* btn = S.Id(ApplyToProjectID)
.Name(XO("Apply macro to project"))
.AddButton(XO("&Project"));

View File

@ -419,12 +419,12 @@ FrequencyPlotDialog::FrequencyPlotDialog(wxWindow * parent, wxWindowID id,
S.SetStretchyCol(1);
S.SetStretchyCol(3);
{
S.AddPrompt(_("Cursor:"));
S.AddPrompt(XO("Cursor:"));
mCursorText = S.Style(wxTE_READONLY)
.AddTextBox( {}, wxT(""), 10);
S.AddPrompt(_("Peak:"));
S.AddPrompt(XO("Peak:"));
mPeakText = S.Style(wxTE_READONLY)
.AddTextBox( {}, wxT(""), 10);

View File

@ -107,7 +107,7 @@ HistoryDialog::HistoryDialog(AudacityProject *parent, UndoManager *manager):
.AddTextBox(XO("&Undo levels available"), wxT("0"), 10);
S.AddVariableText( {} )->Hide();
S.AddPrompt(_("&Levels to discard"));
S.AddPrompt(XO("&Levels to discard"));
mLevels = safenew wxSpinCtrl(S.GetParent(),
ID_LEVELS,
wxT("1"),

View File

@ -516,7 +516,7 @@ void PluginRegistrationDialog::PopulateOrExchange(ShuttleGui &S)
{
S.StartHorizontalLay(wxALIGN_LEFT, 0);
{
S.AddPrompt(_("Select effects, click the Enable or Disable button, then click OK."));
S.AddPrompt(XO("Select effects, click the Enable or Disable button, then click OK."));
}
S.EndHorizontalLay();
@ -531,7 +531,7 @@ void PluginRegistrationDialog::PopulateOrExchange(ShuttleGui &S)
wxRadioButton *rb;
/* i18n-hint: This is before radio buttons selecting which effects to show */
S.AddPrompt(_("Show:"));
S.AddPrompt(XO("Show:"));
rb = S.Id(ID_ShowAll)
/* i18n-hint: Radio button to show all effects */
.Name(XO("Show all"))

View File

@ -225,7 +225,7 @@ void ShuttleGuiBase::HandleOptionality(const TranslatableString &Prompt)
}
/// Right aligned text string.
void ShuttleGuiBase::AddPrompt(const wxString &Prompt, int wrapWidth)
void ShuttleGuiBase::AddPrompt(const TranslatableString &Prompt, int wrapWidth)
{
if( mShuttleMode != eIsCreating )
return;
@ -239,29 +239,31 @@ void ShuttleGuiBase::AddPrompt(const wxString &Prompt, int wrapWidth)
if( Prompt.empty() )
return;
miProp=1;
auto text = safenew wxStaticText(GetParent(), -1, Prompt, wxDefaultPosition, wxDefaultSize,
const auto translated = Prompt.Translation();
auto text = safenew wxStaticText(GetParent(), -1, translated, wxDefaultPosition, wxDefaultSize,
GetStyle( wxALIGN_RIGHT ));
mpWind = text;
if (wrapWidth > 0)
text->Wrap(wrapWidth);
mpWind->SetName(wxStripMenuCodes(Prompt)); // fix for bug 577 (NVDA/Narrator screen readers do not read static text in dialogs)
mpWind->SetName(wxStripMenuCodes(translated)); // fix for bug 577 (NVDA/Narrator screen readers do not read static text in dialogs)
UpdateSizersCore( false, wxALL | wxALIGN_CENTRE_VERTICAL, true );
}
/// Left aligned text string.
void ShuttleGuiBase::AddUnits(const wxString &Prompt, int wrapWidth)
void ShuttleGuiBase::AddUnits(const TranslatableString &Prompt, int wrapWidth)
{
if( Prompt.empty() )
return;
if( mShuttleMode != eIsCreating )
return;
miProp = 1;
auto text = safenew wxStaticText(GetParent(), -1, Prompt, wxDefaultPosition, wxDefaultSize,
const auto translated = Prompt.Translation();
auto text = safenew wxStaticText(GetParent(), -1, translated, wxDefaultPosition, wxDefaultSize,
GetStyle( wxALIGN_LEFT ));
mpWind = text;
if (wrapWidth > 0)
text->Wrap(wrapWidth);
mpWind->SetName(Prompt); // fix for bug 577 (NVDA/Narrator screen readers do not read static text in dialogs)
mpWind->SetName(translated); // fix for bug 577 (NVDA/Narrator screen readers do not read static text in dialogs)
UpdateSizersCore( false, wxALL | wxALIGN_CENTRE_VERTICAL );
}
@ -300,7 +302,7 @@ wxCheckBox * ShuttleGuiBase::AddCheckBox( const TranslatableString &Prompt, bool
auto realPrompt = Prompt.Translation();
if( mpbOptionalFlag )
{
AddPrompt( "");
AddPrompt( {} );
//realPrompt = wxT("");
}
@ -331,7 +333,7 @@ wxCheckBox * ShuttleGuiBase::AddCheckBox( const TranslatableString &Prompt, bool
wxCheckBox * ShuttleGuiBase::AddCheckBoxOnRight( const TranslatableString &Prompt, bool Selected)
{
HandleOptionality( Prompt );
AddPrompt( Prompt.Translation() );
AddPrompt( Prompt );
UseUpId();
if( mShuttleMode != eIsCreating )
return wxDynamicCast(wxWindow::FindWindowById( miId, mpDlg), wxCheckBox);
@ -387,7 +389,7 @@ wxChoice * ShuttleGuiBase::AddChoice( const TranslatableString &Prompt,
const TranslatableStrings &choices, int Selected )
{
HandleOptionality( Prompt );
AddPrompt( Prompt.Translation() );
AddPrompt( Prompt );
UseUpId();
if( mShuttleMode != eIsCreating )
return wxDynamicCast(wxWindow::FindWindowById( miId, mpDlg), wxChoice);
@ -487,7 +489,7 @@ wxComboBox * ShuttleGuiBase::AddCombo(
{
const auto translated = Prompt.Translation();
HandleOptionality( Prompt );
AddPrompt( translated );
AddPrompt( Prompt );
UseUpId();
if( mShuttleMode != eIsCreating )
return wxDynamicCast(wxWindow::FindWindowById( miId, mpDlg), wxComboBox);
@ -557,7 +559,7 @@ wxSlider * ShuttleGuiBase::AddSlider(
const TranslatableString &Prompt, int pos, int Max, int Min)
{
HandleOptionality( Prompt );
AddPrompt( Prompt.Translation() );
AddPrompt( Prompt );
UseUpId();
if( mShuttleMode != eIsCreating )
return wxDynamicCast(wxWindow::FindWindowById( miId, mpDlg), wxSlider);
@ -582,7 +584,7 @@ wxSpinCtrl * ShuttleGuiBase::AddSpinCtrl(
{
const auto translated = Prompt.Translation();
HandleOptionality( Prompt );
AddPrompt( translated );
AddPrompt( Prompt );
UseUpId();
if( mShuttleMode != eIsCreating )
return wxDynamicCast(wxWindow::FindWindowById( miId, mpDlg), wxSpinCtrl);
@ -604,7 +606,7 @@ wxTextCtrl * ShuttleGuiBase::AddTextBox(
{
const auto translated = Caption.Translation();
HandleOptionality( Caption );
AddPrompt( translated );
AddPrompt( Caption );
UseUpId();
if( mShuttleMode != eIsCreating )
return wxDynamicCast(wxWindow::FindWindowById( miId, mpDlg), wxTextCtrl);
@ -638,7 +640,7 @@ wxTextCtrl * ShuttleGuiBase::AddNumericTextBox(
{
const auto translated = Caption.Translation();
HandleOptionality( Caption );
AddPrompt( translated );
AddPrompt( Caption );
UseUpId();
if( mShuttleMode != eIsCreating )
return wxDynamicCast(wxWindow::FindWindowById( miId, mpDlg), wxTextCtrl);
@ -695,9 +697,8 @@ wxTextCtrl * ShuttleGuiBase::AddTextWindow(const wxString &Value)
void ShuttleGuiBase::AddConstTextBox(
const TranslatableString &Prompt, const TranslatableString &Value)
{
const auto translated = Prompt.Translation();
HandleOptionality( Prompt );
AddPrompt( translated );
AddPrompt( Prompt );
UseUpId();
if( mShuttleMode != eIsCreating )
return;

View File

@ -266,8 +266,8 @@ public:
//-- Add functions. These only add a widget or 2.
void HandleOptionality(const TranslatableString &Prompt);
void AddPrompt(const wxString &Prompt, int wrapWidth = 0);
void AddUnits(const wxString &Prompt, int wrapWidth = 0);
void AddPrompt(const TranslatableString &Prompt, int wrapWidth = 0);
void AddUnits(const TranslatableString &Prompt, int wrapWidth = 0);
void AddTitle(const TranslatableString &Prompt, int wrapWidth = 0);
wxWindow * AddWindow(wxWindow * pWindow);
wxSlider * AddSlider(

View File

@ -876,7 +876,7 @@ void TagsEditorDialog::PopulateOrExchange(ShuttleGui & S)
{
S.StartHorizontalLay(wxALIGN_LEFT, 0);
{
S.AddUnits(_("Use arrow keys (or ENTER key after editing) to navigate fields."));
S.AddUnits(XO("Use arrow keys (or ENTER key after editing) to navigate fields."));
}
S.EndHorizontalLay();

View File

@ -937,7 +937,7 @@ void TimerRecordDialog::PopulateOrExchange(ShuttleGui& S)
m_fnAutoSaveFile.Assign(sSaveValue);
sInitialValue = _("Current Project");
}
S.AddPrompt(_("Save Project As:"));
S.AddPrompt(XO("Save Project As:"));
m_pTimerSavePathTextCtrl = NewPathControl(
S.GetParent(), ID_AUTOSAVEPATH_TEXT, _("Save Project As:"), sInitialValue);
m_pTimerSavePathTextCtrl->SetEditable(false);
@ -953,7 +953,7 @@ void TimerRecordDialog::PopulateOrExchange(ShuttleGui& S)
m_pTimerAutoExportCheckBoxCtrl = S.Id(ID_AUTOEXPORT_CHECKBOX).AddCheckBox(XO("Enable Automatic &Export?"), bAutoExport);
S.StartMultiColumn(3, wxEXPAND);
{
S.AddPrompt(_("Export Project As:"));
S.AddPrompt(XO("Export Project As:"));
m_pTimerExportPathTextCtrl = NewPathControl(
S.GetParent(), ID_AUTOEXPORTPATH_TEXT, _("Export Project As:"), wxT(""));
m_pTimerExportPathTextCtrl->SetEditable(false);

View File

@ -436,42 +436,42 @@ void EffectAutoDuck::PopulateOrExchange(ShuttleGui & S)
MIN_DuckAmountDb, MAX_DuckAmountDb
)
.AddTextBox(XO("Duck amount:"), wxT(""), 10);
S.AddUnits(_("dB"));
S.AddUnits(XO("dB"));
mMaximumPauseBox = S.Validator<FloatingPointValidator<double>>(
2, &mMaximumPause, NumValidatorStyle::NO_TRAILING_ZEROES,
MIN_MaximumPause, MAX_MaximumPause
)
.AddTextBox(XO("Maximum pause:"), wxT(""), 10);
S.AddUnits(_("seconds"));
S.AddUnits(XO("seconds"));
mOuterFadeDownLenBox = S.Validator<FloatingPointValidator<double>>(
2, &mOuterFadeDownLen, NumValidatorStyle::NO_TRAILING_ZEROES,
MIN_OuterFadeDownLen, MAX_OuterFadeDownLen
)
.AddTextBox(XO("Outer fade down length:"), wxT(""), 10);
S.AddUnits(_("seconds"));
S.AddUnits(XO("seconds"));
mOuterFadeUpLenBox = S.Validator<FloatingPointValidator<double>>(
2, &mOuterFadeUpLen, NumValidatorStyle::NO_TRAILING_ZEROES,
MIN_OuterFadeUpLen, MAX_OuterFadeUpLen
)
.AddTextBox(XO("Outer fade up length:"), wxT(""), 10);
S.AddUnits(_("seconds"));
S.AddUnits(XO("seconds"));
mInnerFadeDownLenBox = S.Validator<FloatingPointValidator<double>>(
2, &mInnerFadeDownLen, NumValidatorStyle::NO_TRAILING_ZEROES,
MIN_InnerFadeDownLen, MAX_InnerFadeDownLen
)
.AddTextBox(XO("Inner fade down length:"), wxT(""), 10);
S.AddUnits(_("seconds"));
S.AddUnits(XO("seconds"));
mInnerFadeUpLenBox = S.Validator<FloatingPointValidator<double>>(
2, &mInnerFadeUpLen, NumValidatorStyle::NO_TRAILING_ZEROES,
MIN_InnerFadeUpLen, MAX_InnerFadeUpLen
)
.AddTextBox(XO("Inner fade up length:"), wxT(""), 10);
S.AddUnits(_("seconds"));
S.AddUnits(XO("seconds"));
}
S.EndMultiColumn();
@ -482,7 +482,7 @@ void EffectAutoDuck::PopulateOrExchange(ShuttleGui & S)
MIN_ThresholdDb, MAX_ThresholdDb
)
.AddTextBox(XO("Threshold:"), wxT(""), 10);
S.AddUnits(_("dB"));
S.AddUnits(XO("dB"));
}
S.EndMultiColumn();

View File

@ -335,7 +335,7 @@ void EffectChangePitch::PopulateOrExchange(ShuttleGui & S)
)
.AddTextBox(XO("to"), wxT(""), 12);
S.AddUnits(_("Hz"));
S.AddUnits(XO("Hz"));
}
S.EndMultiColumn();

View File

@ -337,7 +337,7 @@ void EffectChangeSpeed::PopulateOrExchange(ShuttleGui & S)
S.StartMultiColumn(5, wxCENTER);
{
/* i18n-hint: "rpm" is an English abbreviation meaning "revolutions per minute". */
S.AddUnits(_("Standard Vinyl rpm:"));
S.AddUnits(XO("Standard Vinyl rpm:"));
mpChoice_FromVinyl = S.Id(ID_FromVinyl)
.Name(XO("From rpm"))
@ -358,7 +358,7 @@ void EffectChangeSpeed::PopulateOrExchange(ShuttleGui & S)
{
S.StartMultiColumn(2, wxALIGN_LEFT);
{
S.AddPrompt(_("Current Length:"));
S.AddPrompt(XO("Current Length:"));
mpFromLengthCtrl = safenew
NumericTextCtrl(S.GetParent(), wxID_ANY,
@ -376,7 +376,7 @@ void EffectChangeSpeed::PopulateOrExchange(ShuttleGui & S)
.Position(wxALIGN_LEFT)
.AddWindow(mpFromLengthCtrl);
S.AddPrompt(_("New Length:"));
S.AddPrompt(XO("New Length:"));
mpToLengthCtrl = safenew
NumericTextCtrl(S.GetParent(), ID_ToLength,

View File

@ -340,7 +340,7 @@ void EffectDtmf::PopulateOrExchange(ShuttleGui & S)
MIN_Amplitude, MAX_Amplitude)
.AddTextBox(XO("Amplitude (0-1):"), wxT(""), 10);
S.AddPrompt(_("Duration:"));
S.AddPrompt(XO("Duration:"));
mDtmfDurationT = safenew
NumericTextCtrl(S.GetParent(), ID_Duration,
NumericConverter::TIME,

View File

@ -3746,10 +3746,10 @@ EffectPresetsDialog::EffectPresetsDialog(wxWindow *parent, Effect *effect)
S.StartTwoColumn();
S.SetStretchyCol(1);
{
S.AddPrompt(_("Type:"));
S.AddPrompt(XO("Type:"));
mType = S.Id(ID_Type).AddChoice( {}, {}, 0 );
S.AddPrompt(_("&Preset:"));
S.AddPrompt(XO("&Preset:"));
mPresets = S
.Style( wxLB_SINGLE | wxLB_NEEDED_SB )
.AddListBox( {} );

View File

@ -914,7 +914,7 @@ void EffectEqualization::PopulateOrExchange(ShuttleGui & S)
{
S.StartHorizontalLay(wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
{
S.AddPrompt(_("&EQ Type:"));
S.AddPrompt(XO("&EQ Type:"));
}
S.EndHorizontalLay();
@ -975,7 +975,7 @@ void EffectEqualization::PopulateOrExchange(ShuttleGui & S)
{
S.StartHorizontalLay(wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL, 0);
{
S.AddPrompt(_("Length of &Filter:"));
S.AddPrompt(XO("Length of &Filter:"));
}
S.EndHorizontalLay();
@ -1010,7 +1010,7 @@ void EffectEqualization::PopulateOrExchange(ShuttleGui & S)
S.AddSpace(5, 5);
S.StartHorizontalLay(wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
{
S.AddPrompt(_("&Select Curve:"));
S.AddPrompt(XO("&Select Curve:"));
}
S.EndHorizontalLay();
@ -1065,7 +1065,7 @@ void EffectEqualization::PopulateOrExchange(ShuttleGui & S)
S.StartHorizontalLay();
{
S.AddUnits(_("&Processing: "));
S.AddUnits(XO("&Processing: "));
// update the control state
int mathPath = EffectEqualization48x::GetMathPath();

View File

@ -233,7 +233,7 @@ void EffectNoise::PopulateOrExchange(ShuttleGui & S)
)
.AddTextBox(XO("Amplitude (0-1):"), wxT(""), 12);
S.AddPrompt(_("Duration:"));
S.AddPrompt(XO("Duration:"));
mNoiseDurationT = safenew
NumericTextCtrl(S.GetParent(), wxID_ANY,
NumericConverter::TIME,

View File

@ -1740,7 +1740,7 @@ void EffectNoiseReduction::Dialog::PopulateOrExchange(ShuttleGui & S)
,
wxALIGN_CENTER_HORIZONTAL);
{
S.AddPrompt(_("Noise:"));
S.AddPrompt(XO("Noise:"));
mKeepSignal = S.Id(ID_RADIOBUTTON_KEEPSIGNAL)
.AddRadioButton(XO("Re&duce")); /* i18n-hint: Translate differently from "Residue" ! */
#ifdef ISOLATE_CHOICE

View File

@ -756,7 +756,7 @@ void NoiseRemovalDialog::PopulateOrExchange(ShuttleGui & S)
.MinSize( { 150, -1 } )
.AddSlider( {}, 0, TIME_MAX, TIME_MIN);
S.AddPrompt(_("Noise:"));
S.AddPrompt(XO("Noise:"));
mKeepSignal = S.Id(ID_RADIOBUTTON_KEEPSIGNAL)
.AddRadioButton(XO("Re&move"));
mKeepNoise = S.Id(ID_RADIOBUTTON_KEEPNOISE)

View File

@ -507,7 +507,7 @@ void EffectScienFilter::PopulateOrExchange(ShuttleGui & S)
1, &mCutoff, NumValidatorStyle::DEFAULT,
MIN_Cutoff, mNyquist - 1)
.AddTextBox(XO("C&utoff:"), wxT(""), 10);
S.AddUnits(_("Hz"));
S.AddUnits(XO("Hz"));
mStopbandRippleCtlP =
S.AddVariableText(XO("Minimum S&topband Attenuation:"),

View File

@ -64,7 +64,7 @@ void EffectSilence::PopulateOrExchange(ShuttleGui & S)
{
S.StartHorizontalLay();
{
S.AddPrompt(_("Duration:"));
S.AddPrompt(XO("Duration:"));
mDurationT = safenew
NumericTextCtrl(S.GetParent(), wxID_ANY,
NumericConverter::TIME,

View File

@ -363,7 +363,7 @@ void EffectToneGen::PopulateOrExchange(ShuttleGui & S)
}
S.EndHorizontalLay();
S.AddPrompt(_("Frequency (Hz):"));
S.AddPrompt(XO("Frequency (Hz):"));
S.StartHorizontalLay(wxEXPAND);
{
S.StartHorizontalLay(wxLEFT, 50);
@ -394,7 +394,7 @@ void EffectToneGen::PopulateOrExchange(ShuttleGui & S)
}
S.EndHorizontalLay();
S.AddPrompt(_("Amplitude (0-1):"));
S.AddPrompt(XO("Amplitude (0-1):"));
S.StartHorizontalLay(wxEXPAND);
{
S.StartHorizontalLay(wxLEFT, 50);
@ -441,7 +441,7 @@ void EffectToneGen::PopulateOrExchange(ShuttleGui & S)
.AddTextBox(XO("Amplitude (0-1):"), wxT(""), 12);
}
S.AddPrompt(_("Duration:"));
S.AddPrompt(XO("Duration:"));
mToneDurationT = safenew
NumericTextCtrl(S.GetParent(), wxID_ANY,
NumericConverter::TIME,

View File

@ -762,7 +762,7 @@ void EffectTruncSilence::PopulateOrExchange(ShuttleGui & S)
MIN_Threshold, MAX_Threshold
)
.AddTextBox(XO("Threshold:"), wxT(""), 0);
S.AddUnits(_("dB"));
S.AddUnits(XO("dB"));
// Ignored silence
mInitialAllowedSilenceT = S.Validator<FloatingPointValidator<double>>(
@ -770,7 +770,7 @@ void EffectTruncSilence::PopulateOrExchange(ShuttleGui & S)
NumValidatorStyle::NO_TRAILING_ZEROES,
MIN_Minimum, MAX_Minimum)
.AddTextBox(XO("Duration:"), wxT(""), 12);
S.AddUnits(_("seconds"));
S.AddUnits(XO("seconds"));
}
S.EndMultiColumn();
}
@ -798,7 +798,7 @@ void EffectTruncSilence::PopulateOrExchange(ShuttleGui & S)
MIN_Truncate, MAX_Truncate
)
.AddTextBox(XO("Truncate to:"), wxT(""), 12);
S.AddUnits(_("seconds"));
S.AddUnits(XO("seconds"));
mSilenceCompressPercentT = S.Validator<FloatingPointValidator<double>>(
3, &mSilenceCompressPercent,
@ -806,7 +806,7 @@ void EffectTruncSilence::PopulateOrExchange(ShuttleGui & S)
MIN_Compress, MAX_Compress
)
.AddTextBox(XO("Compress to:"), wxT(""), 12);
S.AddUnits(_("%"));
S.AddUnits(XO("%"));
}
S.EndMultiColumn();

View File

@ -2659,7 +2659,7 @@ void NyquistEffect::BuildEffectWindow(ShuttleGui & S)
else
{
auto prompt = XO("%s:").Format( ctrl.name );
S.AddPrompt( prompt.Translation() );
S.AddPrompt( prompt );
if (ctrl.type == NYQ_CTRL_STRING)
{
@ -2782,7 +2782,7 @@ void NyquistEffect::BuildEffectWindow(ShuttleGui & S)
}
else
{
S.AddUnits(ctrl.label);
S.AddUnits( Verbatim( ctrl.label ) );
}
}
}

View File

@ -562,7 +562,7 @@ void VampEffect::PopulateOrExchange(ShuttleGui & S)
if (!programs.empty())
{
S.AddPrompt(_("Program"));
S.AddPrompt(XO("Program"));
S.Id(ID_Program);
mProgram = S.Name(XO("Program"))
@ -604,7 +604,7 @@ void VampEffect::PopulateOrExchange(ShuttleGui & S)
}
/* i18n-hint: An item name introducing a value, which is not part of the string but
appears in a following text box window; translate with appropriate punctuation */
S.AddPrompt(wxString::Format(_("%s:"), labelText));
S.AddPrompt(XO("%s:").Format( labelText ));
if (mParameters[p].isQuantized &&
mParameters[p].quantizeStep == 1.0 &&
@ -672,7 +672,7 @@ void VampEffect::PopulateOrExchange(ShuttleGui & S)
.AddTextBox( {}, wxT(""), 12);
wxString str = Internat::ToDisplayString(mParameters[p].minValue);
S.AddPrompt(str);
S.AddPrompt( Verbatim( str ) );
S.Id(ID_Sliders + p);
mSliders[p] = S.ToolTip( Verbatim( tip ) )
@ -682,7 +682,7 @@ void VampEffect::PopulateOrExchange(ShuttleGui & S)
.AddSlider( {}, 0, 1000, 0);
str = Internat::ToDisplayString(mParameters[p].maxValue);
S.AddUnits(str);
S.AddUnits( Verbatim( str ) );
}
}
}

View File

@ -372,7 +372,7 @@ void ExportMP3Options::PopulateOrExchange(ShuttleGui & S)
S.SetStretchyCol(1);
S.StartTwoColumn();
{
S.AddPrompt(_("Bit Rate Mode:"));
S.AddPrompt(XO("Bit Rate Mode:"));
S.StartHorizontalLay();
{
S.StartRadioButtonGroup(MP3RateModeSetting);
@ -399,7 +399,7 @@ void ExportMP3Options::PopulateOrExchange(ShuttleGui & S)
{ wxT("/FileFormats/MP3VarMode"), ROUTINE_FAST },
varModeNames );
S.AddPrompt(_("Channel Mode:"));
S.AddPrompt(XO("Channel Mode:"));
S.StartMultiColumn(3, wxEXPAND);
{
S.StartRadioButtonGroup(MP3ChannelModeSetting);

View File

@ -297,7 +297,7 @@ void ExportMultipleDialog::PopulateOrExchange(ShuttleGui& S)
S.AddVariableText( {}, false);
S.AddVariableText( {}, false);
S.AddPrompt(_("Options:"));
S.AddPrompt(XO("Options:"));
mBook = S.Id(OptionsID)
.Style(wxBORDER_STATIC)

View File

@ -321,17 +321,17 @@ static wxString AskCopyOrEdit()
wxDialogWrapper dialog( nullptr, -1, XO("Warning") );
dialog.SetName();
wxString clause1 = _(
auto clause1 = XO(
"When importing uncompressed audio files you can either copy them into the project,"
" or read them directly from their current location (without copying).\n\n"
);
wxString clause2 = oldCopyPref == wxT("copy")
? _("Your current preference is set to copy in.\n\n")
: _("Your current preference is set to read directly.\n\n")
auto clause2 = (oldCopyPref == wxT("copy"))
? XO("Your current preference is set to copy in.\n\n")
: XO("Your current preference is set to read directly.\n\n")
;
wxString clause3 = _(
wxString clause3 = XO(
"Reading the files directly allows you to play or edit them almost immediately. "
"This is less safe than copying in, because you must retain the files with their "
"original names in their original locations.\n"

View File

@ -411,13 +411,13 @@ ImportRawDialog::ImportRawDialog(wxWindow * parent,
mOffsetText = S.AddTextBox(XO("Start offset:"),
wxString::Format(wxT("%d"), mOffset),
12);
S.AddUnits(_("bytes"));
S.AddUnits(XO("bytes"));
// Percent text
mPercentText = S.AddTextBox(XO("Amount to import:"),
wxT("100"),
12);
S.AddUnits(_("%"));
S.AddUnits(XO("%"));
// Rate text
/* i18n-hint: (noun)*/
@ -426,7 +426,7 @@ ImportRawDialog::ImportRawDialog(wxWindow * parent,
12);
/* i18n-hint: This is the abbreviation for "Hertz", or
cycles per second. */
S.AddUnits(_("Hz"));
S.AddUnits(XO("Hz"));
}
S.EndMultiColumn();

View File

@ -141,7 +141,7 @@ void DevicePrefs::PopulateOrExchange(ShuttleGui & S)
}
);
S.AddPrompt(_("Using:"));
S.AddPrompt(XO("Using:"));
S.AddFixedText( Verbatim(wxSafeConvertMB2WX(Pa_GetVersionText() ) ) );
}
S.EndMultiColumn();
@ -192,7 +192,7 @@ void DevicePrefs::PopulateOrExchange(ShuttleGui & S)
{wxT("/AudioIO/LatencyDuration"),
DEFAULT_LATENCY_DURATION},
9);
S.AddUnits(_("milliseconds"));
S.AddUnits(XO("milliseconds"));
w = S
.NameSuffix(XO("milliseconds"))
@ -200,7 +200,7 @@ void DevicePrefs::PopulateOrExchange(ShuttleGui & S)
{wxT("/AudioIO/LatencyCorrection"),
DEFAULT_LATENCY_CORRECTION},
9);
S.AddUnits(_("milliseconds"));
S.AddUnits(XO("milliseconds"));
}
S.EndThreeColumn();
}

View File

@ -146,7 +146,7 @@ void MidiIOPrefs::PopulateOrExchange( ShuttleGui & S ) {
}
);
S.AddPrompt(_("Using: PortMidi"));
S.AddPrompt(XO("Using: PortMidi"));
}
S.EndMultiColumn();
}

View File

@ -91,7 +91,7 @@ void PlaybackPrefs::PopulateOrExchange(ShuttleGui & S)
{wxT("/AudioIO/EffectsPreviewLen"),
6.0},
9);
S.AddUnits(_("seconds"));
S.AddUnits(XO("seconds"));
}
S.EndThreeColumn();
}
@ -107,14 +107,14 @@ void PlaybackPrefs::PopulateOrExchange(ShuttleGui & S)
{wxT("/AudioIO/CutPreviewBeforeLen"),
2.0},
9);
S.AddUnits(_("seconds"));
S.AddUnits(XO("seconds"));
S.NameSuffix(suffix)
.TieNumericTextBox(XO("&After cut region:"),
{wxT("/AudioIO/CutPreviewAfterLen"),
1.0},
9);
S.AddUnits(_("seconds"));
S.AddUnits(XO("seconds"));
}
S.EndThreeColumn();
}
@ -129,14 +129,14 @@ void PlaybackPrefs::PopulateOrExchange(ShuttleGui & S)
{wxT("/AudioIO/SeekShortPeriod"),
1.0},
9);
S.AddUnits(_("seconds"));
S.AddUnits(XO("seconds"));
S.NameSuffix(suffix)
.TieNumericTextBox(XO("Lo&ng period:"),
{wxT("/AudioIO/SeekLongPeriod"),
15.0},
9);
S.AddUnits(_("seconds"));
S.AddUnits(XO("seconds"));
}
S.EndThreeColumn();
}

View File

@ -142,7 +142,7 @@ void QualityPrefs::PopulateOrExchange(ShuttleGui & S)
{
S.StartMultiColumn(2);
{
S.AddPrompt(_("Default Sample &Rate:"));
S.AddPrompt(XO("Default Sample &Rate:"));
S.StartMultiColumn(2);
{

View File

@ -107,7 +107,7 @@ void RecordingPrefs::PopulateOrExchange(ShuttleGui & S)
{wxT("/AudioIO/SWPlaythrough"),
false});
#if !defined(__WXMAC__)
//S.AddUnits(wxString(wxT(" ")) + _("(uncheck when recording computer playback)"));
//S.AddUnits(XO(" (uncheck when recording computer playback)"));
#endif
S.TieCheckBox(XO("Record on a new track"),
@ -223,13 +223,13 @@ void RecordingPrefs::PopulateOrExchange(ShuttleGui & S)
{wxT("/AudioIO/AnalysisTime"),
AILA_DEF_ANALYSIS_TIME},
9);
S.AddUnits(_("milliseconds (time of one analysis)"));
S.AddUnits(XO("milliseconds (time of one analysis)"));
S.TieIntegerTextBox(XO("Number of consecutive analysis:"),
{wxT("/AudioIO/NumberAnalysis"),
AILA_DEF_NUMBER_ANALYSIS},
2);
S.AddUnits(_("0 means endless"));
S.AddUnits(XO("0 means endless"));
}
S.EndThreeColumn();
}
@ -247,7 +247,7 @@ void RecordingPrefs::PopulateOrExchange(ShuttleGui & S)
{AUDIO_PRE_ROLL_KEY,
DEFAULT_PRE_ROLL_SECONDS},
9);
S.AddUnits(_("seconds"));
S.AddUnits(XO("seconds"));
}
{
auto w = S
@ -256,7 +256,7 @@ void RecordingPrefs::PopulateOrExchange(ShuttleGui & S)
{AUDIO_ROLL_CROSSFADE_KEY,
DEFAULT_ROLL_CROSSFADE_MS},
9);
S.AddUnits(_("milliseconds"));
S.AddUnits(XO("milliseconds"));
}
S.EndThreeColumn();
}

View File

@ -124,7 +124,7 @@ void LabelTrackMenuTable::OnSetFont(wxCommandEvent &)
S.SetStretchyCol(1);
/* i18n-hint: (noun) The name of the typeface*/
S.AddPrompt(_("Face name"));
S.AddPrompt(XO("Face name"));
lb = safenew wxListBox(S.GetParent(), wxID_ANY,
wxDefaultPosition,
wxDefaultSize,
@ -138,7 +138,7 @@ void LabelTrackMenuTable::OnSetFont(wxCommandEvent &)
.AddWindow(lb);
/* i18n-hint: (noun) The size of the typeface*/
S.AddPrompt(_("Face size"));
S.AddPrompt(XO("Face size"));
sc = safenew wxSpinCtrl(S.GetParent(), wxID_ANY,
wxString::Format(wxT("%ld"), fontsize),
wxDefaultPosition,