1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-07-03 22:19:07 +02:00

TranslatableString for checkbox captions

This commit is contained in:
Paul Licameli 2019-12-04 13:52:39 -05:00
parent c23451af9d
commit 747c35645a
50 changed files with 146 additions and 147 deletions

View File

@ -204,12 +204,12 @@ void BenchmarkDialog::MakeBenchmarkDialog()
// //
S.Validator<wxGenericValidator>(&mBlockDetail) S.Validator<wxGenericValidator>(&mBlockDetail)
.AddCheckBox(_("Show detailed info about each block file"), .AddCheckBox(XO("Show detailed info about each block file"),
false); false);
// //
S.Validator<wxGenericValidator>(&mEditDetail) S.Validator<wxGenericValidator>(&mEditDetail)
.AddCheckBox(_("Show detailed info about each editing operation"), .AddCheckBox(XO("Show detailed info about each editing operation"),
false); false);
// //

View File

@ -587,7 +587,7 @@ to download or locate the FFmpeg libraries."
)); ));
mDontShow = S mDontShow = S
.AddCheckBox(_("Do not show this warning again"), .AddCheckBox(XO("Do not show this warning again"),
gPrefs->ReadBool(wxT("/FFmpeg/NotFoundDontShow"), false) ); gPrefs->ReadBool(wxT("/FFmpeg/NotFoundDontShow"), false) );
S.AddStandardButtons(eOkButton); S.AddStandardButtons(eOkButton);

View File

@ -430,7 +430,7 @@ FrequencyPlotDialog::FrequencyPlotDialog(wxWindow * parent, wxWindowID id,
.AddTextBox( {}, wxT(""), 10); .AddTextBox( {}, wxT(""), 10);
S.AddSpace(5); S.AddSpace(5);
mGridOnOff = S.Id(GridOnOffID).AddCheckBox(_("&Grids"), mDrawGrid); mGridOnOff = S.Id(GridOnOffID).AddCheckBox(XO("&Grids"), mDrawGrid);
} }
S.EndMultiColumn(); S.EndMultiColumn();
} }

View File

@ -377,7 +377,7 @@ void ScreenshotBigDialog::PopulateOrExchange(ShuttleGui & S)
S.StartHorizontalLay(); S.StartHorizontalLay();
{ {
mDelayCheckBox = S.Id(IdDelayCheckBox).AddCheckBox mDelayCheckBox = S.Id(IdDelayCheckBox).AddCheckBox
(_("Wait 5 seconds and capture frontmost window/dialog"), (XO("Wait 5 seconds and capture frontmost window/dialog"),
false); false);
} }
S.EndHorizontalLay(); S.EndHorizontalLay();

View File

@ -211,7 +211,7 @@ void ShuttleGuiBase::SetStretchyRow( int i )
//---- Add Functions. //---- Add Functions.
void ShuttleGuiBase::HandleOptionality(const wxString &Prompt) void ShuttleGuiBase::HandleOptionality(const TranslatableString &Prompt)
{ {
// If creating, will be handled by an AddPrompt. // If creating, will be handled by an AddPrompt.
if( mShuttleMode == eIsCreating ) if( mShuttleMode == eIsCreating )
@ -233,7 +233,7 @@ void ShuttleGuiBase::AddPrompt(const wxString &Prompt, int wrapWidth)
if( mpbOptionalFlag ){ if( mpbOptionalFlag ){
bool * pVar = mpbOptionalFlag; bool * pVar = mpbOptionalFlag;
mpbOptionalFlag = nullptr; mpbOptionalFlag = nullptr;
TieCheckBox( "", *pVar); TieCheckBox( {}, *pVar);
//return; //return;
} }
if( Prompt.empty() ) if( Prompt.empty() )
@ -294,10 +294,10 @@ wxWindow * ShuttleGuiBase::AddWindow(wxWindow * pWindow)
return pWindow; return pWindow;
} }
wxCheckBox * ShuttleGuiBase::AddCheckBox( const wxString &Prompt, bool Selected) wxCheckBox * ShuttleGuiBase::AddCheckBox( const TranslatableString &Prompt, bool Selected)
{ {
HandleOptionality( Prompt ); HandleOptionality( Prompt );
wxString realPrompt = Prompt; auto realPrompt = Prompt.Translation();
if( mpbOptionalFlag ) if( mpbOptionalFlag )
{ {
AddPrompt( ""); AddPrompt( "");
@ -328,10 +328,10 @@ wxCheckBox * ShuttleGuiBase::AddCheckBox( const wxString &Prompt, bool Selected)
/// For a consistant two-column layout we want labels on the left and /// For a consistant two-column layout we want labels on the left and
/// controls on the right. CheckBoxes break that rule, so we fake it by /// controls on the right. CheckBoxes break that rule, so we fake it by
/// placing a static text label and then a tick box with an empty label. /// placing a static text label and then a tick box with an empty label.
wxCheckBox * ShuttleGuiBase::AddCheckBoxOnRight( const wxString &Prompt, bool Selected) wxCheckBox * ShuttleGuiBase::AddCheckBoxOnRight( const TranslatableString &Prompt, bool Selected)
{ {
HandleOptionality( Prompt ); HandleOptionality( Prompt );
AddPrompt( Prompt ); AddPrompt( Prompt.Translation() );
UseUpId(); UseUpId();
if( mShuttleMode != eIsCreating ) if( mShuttleMode != eIsCreating )
return wxDynamicCast(wxWindow::FindWindowById( miId, mpDlg), wxCheckBox); return wxDynamicCast(wxWindow::FindWindowById( miId, mpDlg), wxCheckBox);
@ -340,7 +340,7 @@ wxCheckBox * ShuttleGuiBase::AddCheckBoxOnRight( const wxString &Prompt, bool Se
mpWind = pCheckBox = safenew wxCheckBox(GetParent(), miId, wxT(""), wxDefaultPosition, wxDefaultSize, mpWind = pCheckBox = safenew wxCheckBox(GetParent(), miId, wxT(""), wxDefaultPosition, wxDefaultSize,
GetStyle( 0 )); GetStyle( 0 ));
pCheckBox->SetValue(Selected); pCheckBox->SetValue(Selected);
pCheckBox->SetName(wxStripMenuCodes(Prompt)); pCheckBox->SetName(Prompt.Stripped().Translation());
UpdateSizers(); UpdateSizers();
return pCheckBox; return pCheckBox;
} }
@ -383,12 +383,11 @@ wxBitmapButton * ShuttleGuiBase::AddBitmapButton(
return pBtn; return pBtn;
} }
wxChoice * ShuttleGuiBase::AddChoice( const TranslatableString &inPrompt, wxChoice * ShuttleGuiBase::AddChoice( const TranslatableString &Prompt,
const TranslatableStrings &choices, int Selected ) const TranslatableStrings &choices, int Selected )
{ {
const auto Prompt = inPrompt.Translation();
HandleOptionality( Prompt ); HandleOptionality( Prompt );
AddPrompt( Prompt ); AddPrompt( Prompt.Translation() );
UseUpId(); UseUpId();
if( mShuttleMode != eIsCreating ) if( mShuttleMode != eIsCreating )
return wxDynamicCast(wxWindow::FindWindowById( miId, mpDlg), wxChoice); return wxDynamicCast(wxWindow::FindWindowById( miId, mpDlg), wxChoice);
@ -411,7 +410,7 @@ wxChoice * ShuttleGuiBase::AddChoice( const TranslatableString &inPrompt,
mpWind->SetAccessible(safenew WindowAccessible(mpWind)); mpWind->SetAccessible(safenew WindowAccessible(mpWind));
#endif #endif
#endif #endif
pChoice->SetName(wxStripMenuCodes(Prompt)); pChoice->SetName(Prompt.Stripped().Translation());
if ( Selected >= 0 && Selected < (int)choices.size() ) if ( Selected >= 0 && Selected < (int)choices.size() )
pChoice->SetSelection( Selected ); pChoice->SetSelection( Selected );
@ -487,7 +486,7 @@ wxComboBox * ShuttleGuiBase::AddCombo(
const wxString &Selected, const wxArrayStringEx & choices ) const wxString &Selected, const wxArrayStringEx & choices )
{ {
const auto translated = Prompt.Translation(); const auto translated = Prompt.Translation();
HandleOptionality( translated ); HandleOptionality( Prompt );
AddPrompt( translated ); AddPrompt( translated );
UseUpId(); UseUpId();
if( mShuttleMode != eIsCreating ) if( mShuttleMode != eIsCreating )
@ -557,7 +556,7 @@ void wxSliderWrapper::SetFocus()
wxSlider * ShuttleGuiBase::AddSlider( wxSlider * ShuttleGuiBase::AddSlider(
const TranslatableString &Prompt, int pos, int Max, int Min) const TranslatableString &Prompt, int pos, int Max, int Min)
{ {
HandleOptionality( Prompt.Translation() ); HandleOptionality( Prompt );
AddPrompt( Prompt.Translation() ); AddPrompt( Prompt.Translation() );
UseUpId(); UseUpId();
if( mShuttleMode != eIsCreating ) if( mShuttleMode != eIsCreating )
@ -582,7 +581,7 @@ wxSpinCtrl * ShuttleGuiBase::AddSpinCtrl(
const TranslatableString &Prompt, int Value, int Max, int Min) const TranslatableString &Prompt, int Value, int Max, int Min)
{ {
const auto translated = Prompt.Translation(); const auto translated = Prompt.Translation();
HandleOptionality( translated ); HandleOptionality( Prompt );
AddPrompt( translated ); AddPrompt( translated );
UseUpId(); UseUpId();
if( mShuttleMode != eIsCreating ) if( mShuttleMode != eIsCreating )
@ -604,7 +603,7 @@ wxTextCtrl * ShuttleGuiBase::AddTextBox(
const TranslatableString &Caption, const wxString &Value, const int nChars) const TranslatableString &Caption, const wxString &Value, const int nChars)
{ {
const auto translated = Caption.Translation(); const auto translated = Caption.Translation();
HandleOptionality( translated ); HandleOptionality( Caption );
AddPrompt( translated ); AddPrompt( translated );
UseUpId(); UseUpId();
if( mShuttleMode != eIsCreating ) if( mShuttleMode != eIsCreating )
@ -638,7 +637,7 @@ wxTextCtrl * ShuttleGuiBase::AddNumericTextBox(
const TranslatableString &Caption, const wxString &Value, const int nChars) const TranslatableString &Caption, const wxString &Value, const int nChars)
{ {
const auto translated = Caption.Translation(); const auto translated = Caption.Translation();
HandleOptionality( translated ); HandleOptionality( Caption );
AddPrompt( translated ); AddPrompt( translated );
UseUpId(); UseUpId();
if( mShuttleMode != eIsCreating ) if( mShuttleMode != eIsCreating )
@ -697,7 +696,7 @@ void ShuttleGuiBase::AddConstTextBox(
const TranslatableString &Prompt, const TranslatableString &Value) const TranslatableString &Prompt, const TranslatableString &Value)
{ {
const auto translated = Prompt.Translation(); const auto translated = Prompt.Translation();
HandleOptionality( translated ); HandleOptionality( Prompt );
AddPrompt( translated ); AddPrompt( translated );
UseUpId(); UseUpId();
if( mShuttleMode != eIsCreating ) if( mShuttleMode != eIsCreating )
@ -1238,7 +1237,7 @@ void ShuttleGuiBase::DoDataShuttle( const wxString &Name, WrappedType & WrappedR
// they bind to (i.e. WrappedType). // they bind to (i.e. WrappedType).
// The type specific versions are much shorter and are later // The type specific versions are much shorter and are later
// in this file. // in this file.
wxCheckBox * ShuttleGuiBase::DoTieCheckBox(const wxString &Prompt, WrappedType & WrappedRef) wxCheckBox * ShuttleGuiBase::DoTieCheckBox(const TranslatableString &Prompt, WrappedType & WrappedRef)
{ {
HandleOptionality( Prompt ); HandleOptionality( Prompt );
// The Add function does a UseUpId(), so don't do it here in that case. // The Add function does a UseUpId(), so don't do it here in that case.
@ -1274,7 +1273,7 @@ wxCheckBox * ShuttleGuiBase::DoTieCheckBox(const wxString &Prompt, WrappedType &
return pCheckBox; return pCheckBox;
} }
wxCheckBox * ShuttleGuiBase::DoTieCheckBoxOnRight(const wxString &Prompt, WrappedType & WrappedRef) wxCheckBox * ShuttleGuiBase::DoTieCheckBoxOnRight(const TranslatableString &Prompt, WrappedType & WrappedRef)
{ {
HandleOptionality( Prompt ); HandleOptionality( Prompt );
// The Add function does a UseUpId(), so don't do it here in that case. // The Add function does a UseUpId(), so don't do it here in that case.
@ -1314,7 +1313,7 @@ wxSpinCtrl * ShuttleGuiBase::DoTieSpinCtrl(
const TranslatableString &Prompt, const TranslatableString &Prompt,
WrappedType & WrappedRef, const int max, const int min ) WrappedType & WrappedRef, const int max, const int min )
{ {
HandleOptionality( Prompt.Translation() ); HandleOptionality( Prompt );
// The Add function does a UseUpId(), so don't do it here in that case. // The Add function does a UseUpId(), so don't do it here in that case.
if( mShuttleMode == eIsCreating ) if( mShuttleMode == eIsCreating )
return AddSpinCtrl( Prompt, WrappedRef.ReadAsInt(), max, min ); return AddSpinCtrl( Prompt, WrappedRef.ReadAsInt(), max, min );
@ -1352,7 +1351,7 @@ wxSpinCtrl * ShuttleGuiBase::DoTieSpinCtrl(
wxTextCtrl * ShuttleGuiBase::DoTieTextBox( wxTextCtrl * ShuttleGuiBase::DoTieTextBox(
const TranslatableString &Prompt, WrappedType & WrappedRef, const int nChars) const TranslatableString &Prompt, WrappedType & WrappedRef, const int nChars)
{ {
HandleOptionality( Prompt.Translation() ); HandleOptionality( Prompt );
// The Add function does a UseUpId(), so don't do it here in that case. // The Add function does a UseUpId(), so don't do it here in that case.
if( mShuttleMode == eIsCreating ) if( mShuttleMode == eIsCreating )
return AddTextBox( Prompt, WrappedRef.ReadAsString(), nChars ); return AddTextBox( Prompt, WrappedRef.ReadAsString(), nChars );
@ -1390,7 +1389,7 @@ wxTextCtrl * ShuttleGuiBase::DoTieTextBox(
wxTextCtrl * ShuttleGuiBase::DoTieNumericTextBox( wxTextCtrl * ShuttleGuiBase::DoTieNumericTextBox(
const TranslatableString &Prompt, WrappedType & WrappedRef, const int nChars) const TranslatableString &Prompt, WrappedType & WrappedRef, const int nChars)
{ {
HandleOptionality( Prompt.Translation() ); HandleOptionality( Prompt );
// The Add function does a UseUpId(), so don't do it here in that case. // The Add function does a UseUpId(), so don't do it here in that case.
if( mShuttleMode == eIsCreating ) if( mShuttleMode == eIsCreating )
return AddNumericTextBox( Prompt, WrappedRef.ReadAsString(), nChars ); return AddNumericTextBox( Prompt, WrappedRef.ReadAsString(), nChars );
@ -1429,7 +1428,7 @@ wxSlider * ShuttleGuiBase::DoTieSlider(
const TranslatableString &Prompt, const TranslatableString &Prompt,
WrappedType & WrappedRef, const int max, int min ) WrappedType & WrappedRef, const int max, int min )
{ {
HandleOptionality( Prompt.Translation() ); HandleOptionality( Prompt );
// The Add function does a UseUpId(), so don't do it here in that case. // The Add function does a UseUpId(), so don't do it here in that case.
if( mShuttleMode != eIsCreating ) if( mShuttleMode != eIsCreating )
UseUpId(); UseUpId();
@ -1473,7 +1472,7 @@ wxChoice * ShuttleGuiBase::DoTieChoice(
WrappedType &WrappedRef, WrappedType &WrappedRef,
const TranslatableStrings &choices ) const TranslatableStrings &choices )
{ {
HandleOptionality( Prompt.Translation() ); HandleOptionality( Prompt );
// The Add function does a UseUpId(), so don't do it here in that case. // The Add function does a UseUpId(), so don't do it here in that case.
if( mShuttleMode != eIsCreating ) if( mShuttleMode != eIsCreating )
@ -1624,14 +1623,14 @@ void ShuttleGuiBase::EndRadioButtonGroup()
//-- Now we are into type specific Tie() functions. //-- Now we are into type specific Tie() functions.
//-- These are all 'one-step' tie functions. //-- These are all 'one-step' tie functions.
wxCheckBox * ShuttleGuiBase::TieCheckBox(const wxString &Prompt, bool &Var) wxCheckBox * ShuttleGuiBase::TieCheckBox(const TranslatableString &Prompt, bool &Var)
{ {
WrappedType WrappedRef( Var ); WrappedType WrappedRef( Var );
return DoTieCheckBox( Prompt, WrappedRef ); return DoTieCheckBox( Prompt, WrappedRef );
} }
// See comment in AddCheckBoxOnRight() for why we have this variant. // See comment in AddCheckBoxOnRight() for why we have this variant.
wxCheckBox * ShuttleGuiBase::TieCheckBoxOnRight(const wxString &Prompt, bool &Var) wxCheckBox * ShuttleGuiBase::TieCheckBoxOnRight(const TranslatableString &Prompt, bool &Var)
{ {
// Only does anything different if it's creating. // Only does anything different if it's creating.
WrappedType WrappedRef( Var ); WrappedType WrappedRef( Var );
@ -1842,7 +1841,7 @@ bool ShuttleGuiBase::DoStep( int iStep )
/// Variant of the standard TieCheckBox which does the two step exchange /// Variant of the standard TieCheckBox which does the two step exchange
/// between gui and stack variable and stack variable and shuttle. /// between gui and stack variable and stack variable and shuttle.
wxCheckBox * ShuttleGuiBase::TieCheckBox( wxCheckBox * ShuttleGuiBase::TieCheckBox(
const wxString &Prompt, const TranslatableString &Prompt,
const SettingSpec< bool > &Setting) const SettingSpec< bool > &Setting)
{ {
wxCheckBox * pCheck=NULL; wxCheckBox * pCheck=NULL;
@ -1859,7 +1858,7 @@ wxCheckBox * ShuttleGuiBase::TieCheckBox(
/// Variant of the standard TieCheckBox which does the two step exchange /// Variant of the standard TieCheckBox which does the two step exchange
/// between gui and stack variable and stack variable and shuttle. /// between gui and stack variable and stack variable and shuttle.
wxCheckBox * ShuttleGuiBase::TieCheckBoxOnRight( wxCheckBox * ShuttleGuiBase::TieCheckBoxOnRight(
const wxString &Prompt, const TranslatableString &Prompt,
const SettingSpec< bool > &Setting) const SettingSpec< bool > &Setting)
{ {
wxCheckBox * pCheck=NULL; wxCheckBox * pCheck=NULL;

View File

@ -265,7 +265,7 @@ public:
void ResetId(); void ResetId();
//-- Add functions. These only add a widget or 2. //-- Add functions. These only add a widget or 2.
void HandleOptionality(const wxString &Prompt); void HandleOptionality(const TranslatableString &Prompt);
void AddPrompt(const wxString &Prompt, int wrapWidth = 0); void AddPrompt(const wxString &Prompt, int wrapWidth = 0);
void AddUnits(const wxString &Prompt, int wrapWidth = 0); void AddUnits(const wxString &Prompt, int wrapWidth = 0);
void AddTitle(const TranslatableString &Prompt, int wrapWidth = 0); void AddTitle(const TranslatableString &Prompt, int wrapWidth = 0);
@ -332,8 +332,8 @@ public:
); );
wxGrid * AddGrid(); wxGrid * AddGrid();
wxCheckBox * AddCheckBox( const wxString &Prompt, bool Selected); wxCheckBox * AddCheckBox( const TranslatableString &Prompt, bool Selected);
wxCheckBox * AddCheckBoxOnRight( const wxString &Prompt, bool Selected); wxCheckBox * AddCheckBoxOnRight( const TranslatableString &Prompt, bool Selected);
wxComboBox * AddCombo( const TranslatableString &Prompt, wxComboBox * AddCombo( const TranslatableString &Prompt,
const wxString &Selected, const wxArrayStringEx & choices ); const wxString &Selected, const wxArrayStringEx & choices );
wxChoice * AddChoice( const TranslatableString &Prompt, wxChoice * AddChoice( const TranslatableString &Prompt,
@ -408,8 +408,8 @@ public:
wxTextCtrl * TieNumericTextBox( const TranslatableString &Prompt, int &Value, const int nChars=0); wxTextCtrl * TieNumericTextBox( const TranslatableString &Prompt, int &Value, const int nChars=0);
wxTextCtrl * TieNumericTextBox( const TranslatableString &Prompt, double &Value, const int nChars=0); wxTextCtrl * TieNumericTextBox( const TranslatableString &Prompt, double &Value, const int nChars=0);
wxCheckBox * TieCheckBox( const wxString &Prompt, bool & Var ); wxCheckBox * TieCheckBox( const TranslatableString &Prompt, bool & Var );
wxCheckBox * TieCheckBoxOnRight( const wxString & Prompt, bool & Var ); wxCheckBox * TieCheckBoxOnRight( const TranslatableString & Prompt, bool & Var );
wxChoice * TieChoice( wxChoice * TieChoice(
const TranslatableString &Prompt, wxString &Selected, const TranslatableStrings &choices ); const TranslatableString &Prompt, wxString &Selected, const TranslatableStrings &choices );
@ -442,10 +442,10 @@ public:
// That's because the data is being exchanged between the dialog and mpShuttle // That's because the data is being exchanged between the dialog and mpShuttle
// so it doesn't need an argument that is writeable. // so it doesn't need an argument that is writeable.
virtual wxCheckBox * TieCheckBox( virtual wxCheckBox * TieCheckBox(
const wxString &Prompt, const TranslatableString &Prompt,
const SettingSpec< bool > &Setting); const SettingSpec< bool > &Setting);
virtual wxCheckBox * TieCheckBoxOnRight( virtual wxCheckBox * TieCheckBoxOnRight(
const wxString &Prompt, const TranslatableString &Prompt,
const SettingSpec< bool > &Setting); const SettingSpec< bool > &Setting);
virtual wxChoice *TieChoice( virtual wxChoice *TieChoice(
@ -556,13 +556,13 @@ protected:
private: private:
void DoDataShuttle( const wxString &Name, WrappedType & WrappedRef ); void DoDataShuttle( const wxString &Name, WrappedType & WrappedRef );
wxCheckBox * DoTieCheckBoxOnRight( const wxString & Prompt, WrappedType & WrappedRef ); wxCheckBox * DoTieCheckBoxOnRight( const TranslatableString & Prompt, WrappedType & WrappedRef );
wxTextCtrl * DoTieTextBox( wxTextCtrl * DoTieTextBox(
const TranslatableString &Prompt, const TranslatableString &Prompt,
WrappedType & WrappedRef, const int nChars); WrappedType & WrappedRef, const int nChars);
wxTextCtrl * DoTieNumericTextBox( wxTextCtrl * DoTieNumericTextBox(
const TranslatableString &Prompt, WrappedType & WrappedRef, const int nChars); const TranslatableString &Prompt, WrappedType & WrappedRef, const int nChars);
wxCheckBox * DoTieCheckBox( const wxString &Prompt, WrappedType & WrappedRef ); wxCheckBox * DoTieCheckBox( const TranslatableString &Prompt, WrappedType & WrappedRef );
wxChoice * DoTieChoice( wxChoice * DoTieChoice(
const TranslatableString &Prompt, WrappedType & WrappedRef, const TranslatableString &Prompt, WrappedType & WrappedRef,
const TranslatableStrings & choices ); const TranslatableStrings & choices );

View File

@ -142,7 +142,7 @@ void SplashDialog::Populate( ShuttleGui & S )
S.SetStretchyCol( 1 );// Column 1 is stretchy... S.SetStretchyCol( 1 );// Column 1 is stretchy...
{ {
S.SetBorder( 5 ); S.SetBorder( 5 );
S.Id( DontShowID).AddCheckBox( _("Don't show this again at start up"), !bShow ); S.Id( DontShowID).AddCheckBox( XO("Don't show this again at start up"), !bShow );
S.SetBorder( 5 ); S.SetBorder( 5 );
S.Id(wxID_OK) S.Id(wxID_OK)

View File

@ -949,7 +949,7 @@ void TagsEditorDialog::PopulateOrExchange(ShuttleGui & S)
S.EndHorizontalLay(); S.EndHorizontalLay();
S.StartHorizontalLay(wxALIGN_LEFT, 0); S.StartHorizontalLay(wxALIGN_LEFT, 0);
{ {
S.Id( DontShowID ).AddCheckBox( _("Don't show this when exporting audio"), !bShow ); S.Id( DontShowID ).AddCheckBox( XO("Don't show this when exporting audio"), !bShow );
} }
S.EndHorizontalLay(); S.EndHorizontalLay();
} }

View File

@ -926,7 +926,7 @@ void TimerRecordDialog::PopulateOrExchange(ShuttleGui& S)
S.StartStatic(XO("Automatic Save"), true); S.StartStatic(XO("Automatic Save"), true);
{ {
// If checked, the project will be saved when the recording is completed // If checked, the project will be saved when the recording is completed
m_pTimerAutoSaveCheckBoxCtrl = S.Id(ID_AUTOSAVE_CHECKBOX).AddCheckBox(_("Enable &Automatic Save?"), m_pTimerAutoSaveCheckBoxCtrl = S.Id(ID_AUTOSAVE_CHECKBOX).AddCheckBox(XO("Enable &Automatic Save?"),
bAutoSave); bAutoSave);
S.StartMultiColumn(3, wxEXPAND); S.StartMultiColumn(3, wxEXPAND);
{ {
@ -950,7 +950,7 @@ void TimerRecordDialog::PopulateOrExchange(ShuttleGui& S)
S.StartStatic(XO("Automatic Export"), true); S.StartStatic(XO("Automatic Export"), true);
{ {
m_pTimerAutoExportCheckBoxCtrl = S.Id(ID_AUTOEXPORT_CHECKBOX).AddCheckBox(_("Enable Automatic &Export?"), bAutoExport); m_pTimerAutoExportCheckBoxCtrl = S.Id(ID_AUTOEXPORT_CHECKBOX).AddCheckBox(XO("Enable Automatic &Export?"), bAutoExport);
S.StartMultiColumn(3, wxEXPAND); S.StartMultiColumn(3, wxEXPAND);
{ {
S.AddPrompt(_("Export Project As:")); S.AddPrompt(_("Export Project As:"));

View File

@ -199,10 +199,10 @@ public:
virtual ~ShuttleGuiGetDefinition(); virtual ~ShuttleGuiGetDefinition();
wxCheckBox * TieCheckBox( wxCheckBox * TieCheckBox(
const wxString &Prompt, const TranslatableString &Prompt,
const SettingSpec< bool > &Setting) override; const SettingSpec< bool > &Setting) override;
wxCheckBox * TieCheckBoxOnRight( wxCheckBox * TieCheckBoxOnRight(
const wxString &Prompt, const TranslatableString &Prompt,
const SettingSpec< bool > &Setting) override; const SettingSpec< bool > &Setting) override;
wxChoice * TieNumberAsChoice( wxChoice * TieNumberAsChoice(
@ -247,24 +247,24 @@ ShuttleGuiGetDefinition::~ShuttleGuiGetDefinition(void)
} }
wxCheckBox * ShuttleGuiGetDefinition::TieCheckBox( wxCheckBox * ShuttleGuiGetDefinition::TieCheckBox(
const wxString &Prompt, const TranslatableString &Prompt,
const SettingSpec< bool > &Setting) const SettingSpec< bool > &Setting)
{ {
StartStruct(); StartStruct();
AddItem( Setting.GetPath(), "id" ); AddItem( Setting.GetPath(), "id" );
AddItem( Prompt, "prompt" ); AddItem( Prompt.Translation(), "prompt" );
AddItem( "bool", "type" ); AddItem( "bool", "type" );
AddBool( Setting.GetDefault(), "default" ); AddBool( Setting.GetDefault(), "default" );
EndStruct(); EndStruct();
return ShuttleGui::TieCheckBox( Prompt, Setting ); return ShuttleGui::TieCheckBox( Prompt, Setting );
} }
wxCheckBox * ShuttleGuiGetDefinition::TieCheckBoxOnRight( wxCheckBox * ShuttleGuiGetDefinition::TieCheckBoxOnRight(
const wxString &Prompt, const TranslatableString &Prompt,
const SettingSpec< bool > &Setting) const SettingSpec< bool > &Setting)
{ {
StartStruct(); StartStruct();
AddItem( Setting.GetPath(), "id" ); AddItem( Setting.GetPath(), "id" );
AddItem( Prompt, "prompt" ); AddItem( Prompt.Translation(), "prompt" );
AddItem( "bool", "type" ); AddItem( "bool", "type" );
AddBool( Setting.GetDefault(), "default" ); AddBool( Setting.GetDefault(), "default" );
EndStruct(); EndStruct();

View File

@ -39,7 +39,7 @@ void OpenProjectCommand::PopulateOrExchange(ShuttleGui & S)
S.StartMultiColumn(2, wxALIGN_CENTER); S.StartMultiColumn(2, wxALIGN_CENTER);
{ {
S.TieTextBox(XO("File Name:"),mFileName); S.TieTextBox(XO("File Name:"),mFileName);
S.TieCheckBox(_("Add to History"), mbAddToHistory ); S.TieCheckBox(XO("Add to History"), mbAddToHistory );
} }
S.EndMultiColumn(); S.EndMultiColumn();
} }
@ -79,8 +79,8 @@ void SaveProjectCommand::PopulateOrExchange(ShuttleGui & S)
S.StartMultiColumn(2, wxALIGN_CENTER); S.StartMultiColumn(2, wxALIGN_CENTER);
{ {
S.TieTextBox(XO("File Name:"),mFileName); S.TieTextBox(XO("File Name:"),mFileName);
S.TieCheckBox(_("Add to History:"), mbAddToHistory ); S.TieCheckBox(XO("Add to History:"), mbAddToHistory );
S.TieCheckBox(_("Compress:"), mbCompress ); S.TieCheckBox(XO("Compress:"), mbCompress );
} }
S.EndMultiColumn(); S.EndMultiColumn();
} }

View File

@ -66,7 +66,7 @@ void SetPreferenceCommand::PopulateOrExchange(ShuttleGui & S)
{ {
S.TieTextBox(XO("Name:"),mName); S.TieTextBox(XO("Name:"),mName);
S.TieTextBox(XO("Value:"),mValue); S.TieTextBox(XO("Value:"),mValue);
S.TieCheckBox(_("Reload:"),mbReload); S.TieCheckBox(XO("Reload:"),mbReload);
} }
S.EndMultiColumn(); S.EndMultiColumn();
} }

View File

@ -124,7 +124,7 @@ void ScreenshotCommand::PopulateOrExchange(ShuttleGui & S)
mWhat, Msgids(kCaptureWhatStrings, nCaptureWhats)); mWhat, Msgids(kCaptureWhatStrings, nCaptureWhats));
S.TieChoice( XO("Background:"), S.TieChoice( XO("Background:"),
mBack, Msgids(kBackgroundStrings, nBackgrounds)); mBack, Msgids(kBackgroundStrings, nBackgrounds));
S.TieCheckBox( _("Bring To Top:"), mbBringToTop); S.TieCheckBox( XO("Bring To Top:"), mbBringToTop);
} }
S.EndMultiColumn(); S.EndMultiColumn();
} }

View File

@ -45,7 +45,7 @@ void SetEnvelopeCommand::PopulateOrExchange(ShuttleGui & S)
{ {
S.Optional( bHasT ).TieNumericTextBox( XO("Time:"), mT ); S.Optional( bHasT ).TieNumericTextBox( XO("Time:"), mT );
S.Optional( bHasV ).TieNumericTextBox( XO("Value:"), mV ); S.Optional( bHasV ).TieNumericTextBox( XO("Value:"), mV );
S.Optional( bHasDelete ).TieCheckBox( _("Delete:"), mbDelete ); S.Optional( bHasDelete ).TieCheckBox( XO("Delete:"), mbDelete );
} }
S.EndMultiColumn(); S.EndMultiColumn();
} }

View File

@ -55,7 +55,7 @@ void SetLabelCommand::PopulateOrExchange(ShuttleGui & S)
S.Optional( bHasText ).TieTextBox( XO("Text:"), mText ); S.Optional( bHasText ).TieTextBox( XO("Text:"), mText );
S.Optional( bHasT0 ).TieNumericTextBox( XO("Start:"), mT0 ); S.Optional( bHasT0 ).TieNumericTextBox( XO("Start:"), mT0 );
S.Optional( bHasT1 ).TieNumericTextBox( XO("End:"), mT1 ); S.Optional( bHasT1 ).TieNumericTextBox( XO("End:"), mT1 );
S.Optional( bHasSelected ).TieCheckBox( _("Selected:"), mbSelected ); S.Optional( bHasSelected ).TieCheckBox( XO("Selected:"), mbSelected );
} }
S.EndMultiColumn(); S.EndMultiColumn();
} }

View File

@ -51,7 +51,7 @@ void SetProjectCommand::PopulateOrExchange(ShuttleGui & S)
{ {
S.Optional( bHasName ).TieTextBox( XO("Name:"), mName ); S.Optional( bHasName ).TieTextBox( XO("Name:"), mName );
S.Optional( bHasRate ).TieTextBox( XO("Rate:"), mRate ); S.Optional( bHasRate ).TieTextBox( XO("Rate:"), mRate );
S.TieCheckBox( _("Resize:"), bHasSizing ); S.TieCheckBox( XO("Resize:"), bHasSizing );
S.AddSpace(0,0); S.AddSpace(0,0);
} }
S.EndMultiColumn(); S.EndMultiColumn();

View File

@ -142,8 +142,8 @@ void SetTrackStatusCommand::PopulateOrExchange(ShuttleGui & S)
S.StartMultiColumn(2, wxEXPAND); S.StartMultiColumn(2, wxEXPAND);
{ {
S.SetStretchyCol( 1 ); S.SetStretchyCol( 1 );
S.Optional( bHasSelected ).TieCheckBox( _("Selected"), bSelected ); S.Optional( bHasSelected ).TieCheckBox( XO("Selected"), bSelected );
S.Optional( bHasFocused ).TieCheckBox( _("Focused"), bFocused); S.Optional( bHasFocused ).TieCheckBox( XO("Focused"), bFocused);
} }
S.EndMultiColumn(); S.EndMultiColumn();
} }
@ -194,8 +194,8 @@ void SetTrackAudioCommand::PopulateOrExchange(ShuttleGui & S)
S.StartMultiColumn(2, wxEXPAND); S.StartMultiColumn(2, wxEXPAND);
{ {
S.SetStretchyCol( 1 ); S.SetStretchyCol( 1 );
S.Optional( bHasMute ).TieCheckBox( _("Mute"), bMute); S.Optional( bHasMute ).TieCheckBox( XO("Mute"), bMute);
S.Optional( bHasSolo ).TieCheckBox( _("Solo"), bSolo); S.Optional( bHasSolo ).TieCheckBox( XO("Solo"), bSolo);
} }
S.EndMultiColumn(); S.EndMultiColumn();
S.StartMultiColumn(3, wxEXPAND); S.StartMultiColumn(3, wxEXPAND);
@ -331,9 +331,9 @@ void SetTrackVisualsCommand::PopulateOrExchange(ShuttleGui & S)
S.StartMultiColumn(2, wxEXPAND); S.StartMultiColumn(2, wxEXPAND);
{ {
S.SetStretchyCol( 1 ); S.SetStretchyCol( 1 );
S.Optional( bHasUseSpecPrefs ).TieCheckBox( _("Use Spectral Prefs"), bUseSpecPrefs ); S.Optional( bHasUseSpecPrefs ).TieCheckBox( XO("Use Spectral Prefs"), bUseSpecPrefs );
S.Optional( bHasSpectralSelect ).TieCheckBox( _("Spectral Select"), bSpectralSelect); S.Optional( bHasSpectralSelect ).TieCheckBox( XO("Spectral Select"), bSpectralSelect);
S.Optional( bHasGrayScale ).TieCheckBox( _("Gray Scale"), bGrayScale ); S.Optional( bHasGrayScale ).TieCheckBox( XO("Gray Scale"), bGrayScale );
} }
S.EndMultiColumn(); S.EndMultiColumn();
} }

View File

@ -272,7 +272,7 @@ void EffectAmplify::PopulateOrExchange(ShuttleGui & S)
S.StartHorizontalLay(wxCENTER); S.StartHorizontalLay(wxCENTER);
{ {
mClip = S.Id(ID_Clip).Disable( mCanClip = IsBatchProcessing() ) mClip = S.Id(ID_Clip).Disable( mCanClip = IsBatchProcessing() )
.AddCheckBox(_("Allow clipping"), false); .AddCheckBox(XO("Allow clipping"), false);
} }
S.EndHorizontalLay(); S.EndHorizontalLay();
} }

View File

@ -275,7 +275,7 @@ void EffectBassTreble::PopulateOrExchange(ShuttleGui & S)
S.StartMultiColumn(2, wxCENTER); S.StartMultiColumn(2, wxCENTER);
{ {
// Link checkbox // Link checkbox
mLinkCheckBox = S.Id(ID_Link).AddCheckBox(_("&Link Volume control to Tone controls"), mLinkCheckBox = S.Id(ID_Link).AddCheckBox(XO("&Link Volume control to Tone controls"),
DEF_Link); DEF_Link);
} }
S.EndMultiColumn(); S.EndMultiColumn();

View File

@ -366,7 +366,7 @@ void EffectChangePitch::PopulateOrExchange(ShuttleGui & S)
S.StartMultiColumn(2); S.StartMultiColumn(2);
{ {
mUseSBSMSCheckBox = S.Validator<wxGenericValidator>(&mUseSBSMS) mUseSBSMSCheckBox = S.Validator<wxGenericValidator>(&mUseSBSMS)
.AddCheckBox(_("Use high quality stretching (slow)"), .AddCheckBox(XO("Use high quality stretching (slow)"),
mUseSBSMS); mUseSBSMS);
} }
S.EndMultiColumn(); S.EndMultiColumn();

View File

@ -312,7 +312,7 @@ void EffectChangeTempo::PopulateOrExchange(ShuttleGui & S)
S.StartMultiColumn(2); S.StartMultiColumn(2);
{ {
mUseSBSMSCheckBox = S.Validator<wxGenericValidator>(&mUseSBSMS) mUseSBSMSCheckBox = S.Validator<wxGenericValidator>(&mUseSBSMS)
.AddCheckBox(_("Use high quality stretching (slow)"), .AddCheckBox(XO("Use high quality stretching (slow)"),
mUseSBSMS); mUseSBSMS);
} }
S.EndMultiColumn(); S.EndMultiColumn();

View File

@ -334,9 +334,9 @@ void EffectCompressor::PopulateOrExchange(ShuttleGui & S)
S.StartHorizontalLay(wxCENTER, false); S.StartHorizontalLay(wxCENTER, false);
{ {
/* i18n-hint: Make-up, i.e. correct for any reduction, rather than fabricate it.*/ /* i18n-hint: Make-up, i.e. correct for any reduction, rather than fabricate it.*/
mGainCheckBox = S.AddCheckBox(_("Make-up gain for 0 dB after compressing"), mGainCheckBox = S.AddCheckBox(XO("Make-up gain for 0 dB after compressing"),
DEF_Normalize); DEF_Normalize);
mPeakCheckBox = S.AddCheckBox(_("Compress based on Peaks"), mPeakCheckBox = S.AddCheckBox(XO("Compress based on Peaks"),
DEF_UsePeak); DEF_UsePeak);
} }
S.EndHorizontalLay(); S.EndHorizontalLay();

View File

@ -372,7 +372,7 @@ void EffectDistortion::PopulateOrExchange(ShuttleGui & S)
.AddChoice(XO("Distortion type:"), .AddChoice(XO("Distortion type:"),
Msgids(kTableTypeStrings, nTableTypes)); Msgids(kTableTypeStrings, nTableTypes));
mDCBlockCheckBox = S.Id(ID_DCBlock).AddCheckBox(_("DC blocking filter"), mDCBlockCheckBox = S.Id(ID_DCBlock).AddCheckBox(XO("DC blocking filter"),
DEF_DCBlock); DEF_DCBlock);
} }
S.EndMultiColumn(); S.EndMultiColumn();

View File

@ -960,7 +960,7 @@ void EffectEqualization::PopulateOrExchange(ShuttleGui & S)
mLinFreq = S.Id(ID_Linear) mLinFreq = S.Id(ID_Linear)
.Name(XO("Linear Frequency Scale")) .Name(XO("Linear Frequency Scale"))
.AddCheckBox(_("Li&near Frequency Scale"), false); .AddCheckBox(XO("Li&near Frequency Scale"), false);
} }
S.EndHorizontalLay(); S.EndHorizontalLay();
} }
@ -1043,7 +1043,7 @@ void EffectEqualization::PopulateOrExchange(ShuttleGui & S)
mGridOnOff = S.Id(ID_Grid) mGridOnOff = S.Id(ID_Grid)
.Name(XO("Show grid lines")) .Name(XO("Show grid lines"))
.AddCheckBox(_("Show g&rid lines"), false); .AddCheckBox(XO("Show g&rid lines"), false);
} }
S.EndHorizontalLay(); S.EndHorizontalLay();

View File

@ -314,12 +314,12 @@ void EffectLoudness::PopulateOrExchange(ShuttleGui & S)
mStereoIndCheckBox = S mStereoIndCheckBox = S
.Validator<wxGenericValidator>( &mStereoInd ) .Validator<wxGenericValidator>( &mStereoInd )
.AddCheckBox(_("Normalize stereo channels independently"), .AddCheckBox(XO("Normalize stereo channels independently"),
mStereoInd ? wxT("true") : wxT("false")); mStereoInd ? wxT("true") : wxT("false"));
mDualMonoCheckBox = S mDualMonoCheckBox = S
.Validator<wxGenericValidator>( &mDualMono ) .Validator<wxGenericValidator>( &mDualMono )
.AddCheckBox(_("Treat mono as dual-mono (recommended)"), .AddCheckBox(XO("Treat mono as dual-mono (recommended)"),
mDualMono ? wxT("true") : wxT("false")); mDualMono ? wxT("true") : wxT("false"));
} }
S.EndVerticalLay(); S.EndVerticalLay();

View File

@ -292,7 +292,7 @@ void EffectNormalize::PopulateOrExchange(ShuttleGui & S)
S.StartVerticalLay(false); S.StartVerticalLay(false);
{ {
mDCCheckBox = S.Validator<wxGenericValidator>(&mDC) mDCCheckBox = S.Validator<wxGenericValidator>(&mDC)
.AddCheckBox(_("Remove DC offset (center on 0.0 vertically)"), .AddCheckBox(XO("Remove DC offset (center on 0.0 vertically)"),
mDC); mDC);
S.StartHorizontalLay(wxALIGN_LEFT, false); S.StartHorizontalLay(wxALIGN_LEFT, false);
@ -300,7 +300,7 @@ void EffectNormalize::PopulateOrExchange(ShuttleGui & S)
mGainCheckBox = S mGainCheckBox = S
.MinSize() .MinSize()
.Validator<wxGenericValidator>(&mGain) .Validator<wxGenericValidator>(&mGain)
.AddCheckBox(_("Normalize peak amplitude to "), .AddCheckBox(XO("Normalize peak amplitude to "),
mGain); mGain);
mLevelTextCtrl = S mLevelTextCtrl = S
@ -322,7 +322,7 @@ void EffectNormalize::PopulateOrExchange(ShuttleGui & S)
mStereoIndCheckBox = S mStereoIndCheckBox = S
.Validator<wxGenericValidator>(&mStereoInd) .Validator<wxGenericValidator>(&mStereoInd)
.AddCheckBox(_("Normalize stereo channels independently"), .AddCheckBox(XO("Normalize stereo channels independently"),
mStereoInd); mStereoInd);
} }
S.EndVerticalLay(); S.EndVerticalLay();

View File

@ -462,7 +462,7 @@ void EffectReverb::PopulateOrExchange(ShuttleGui & S)
S.StartHorizontalLay(wxCENTER, false); S.StartHorizontalLay(wxCENTER, false);
{ {
mWetOnlyC = S.Id(ID_WetOnly). mWetOnlyC = S.Id(ID_WetOnly).
AddCheckBox(_("Wet O&nly"), DEF_WetOnly); AddCheckBox(XO("Wet O&nly"), DEF_WetOnly);
} }
S.EndHorizontalLay(); S.EndHorizontalLay();

View File

@ -812,7 +812,7 @@ void EffectTruncSilence::PopulateOrExchange(ShuttleGui & S)
S.StartMultiColumn(2, wxALIGN_CENTER_HORIZONTAL); S.StartMultiColumn(2, wxALIGN_CENTER_HORIZONTAL);
{ {
mIndependent = S.AddCheckBox(_("Truncate tracks independently"), mIndependent = S.AddCheckBox(XO("Truncate tracks independently"),
mbIndependent); mbIndependent);
} }
S.EndMultiColumn(); S.EndMultiColumn();

View File

@ -845,7 +845,7 @@ void VSTEffectOptionsDialog::PopulateOrExchange(ShuttleGui & S)
S.StartHorizontalLay(wxALIGN_LEFT); S.StartHorizontalLay(wxALIGN_LEFT);
{ {
S.TieCheckBox(_("Enable &compensation"), S.TieCheckBox(XO("Enable &compensation"),
mUseLatency); mUseLatency);
} }
S.EndHorizontalLay(); S.EndHorizontalLay();
@ -859,7 +859,7 @@ void VSTEffectOptionsDialog::PopulateOrExchange(ShuttleGui & S)
" A basic text-only method is also available. " " A basic text-only method is also available. "
" Reopen the effect for this to take effect."), " Reopen the effect for this to take effect."),
false, 0, 650); false, 0, 650);
S.TieCheckBox(_("Enable &graphical interface"), S.TieCheckBox(XO("Enable &graphical interface"),
mUseGUI); mUseGUI);
} }
S.EndStatic(); S.EndStatic();

View File

@ -391,7 +391,7 @@ void AudioUnitEffectOptionsDialog::PopulateOrExchange(ShuttleGui & S)
S.StartHorizontalLay(wxALIGN_LEFT); S.StartHorizontalLay(wxALIGN_LEFT);
{ {
S.TieCheckBox(_("Enable &compensation"), S.TieCheckBox(XO("Enable &compensation"),
mUseLatency); mUseLatency);
} }
S.EndHorizontalLay(); S.EndHorizontalLay();

View File

@ -461,7 +461,7 @@ void LadspaEffectOptionsDialog::PopulateOrExchange(ShuttleGui & S)
S.StartHorizontalLay(wxALIGN_LEFT); S.StartHorizontalLay(wxALIGN_LEFT);
{ {
S.TieCheckBox(_("Enable &compensation"), S.TieCheckBox(XO("Enable &compensation"),
mUseLatency); mUseLatency);
} }
S.EndHorizontalLay(); S.EndHorizontalLay();

View File

@ -283,7 +283,7 @@ void LV2EffectSettingsDialog::PopulateOrExchange(ShuttleGui &S)
S.StartHorizontalLay(wxALIGN_LEFT); S.StartHorizontalLay(wxALIGN_LEFT);
{ {
S.TieCheckBox(_("Enable &compensation"), S.TieCheckBox(XO("Enable &compensation"),
mUseLatency); mUseLatency);
} }
S.EndHorizontalLay(); S.EndHorizontalLay();
@ -297,7 +297,7 @@ void LV2EffectSettingsDialog::PopulateOrExchange(ShuttleGui &S)
" A basic text-only method is also available. " " A basic text-only method is also available. "
" Reopen the effect for this to take effect."), " Reopen the effect for this to take effect."),
false, 0, 650); false, 0, 650);
S.TieCheckBox(_("Enable &graphical interface"), S.TieCheckBox(XO("Enable &graphical interface"),
mUseGUI); mUseGUI);
} }
S.EndStatic(); S.EndStatic();

View File

@ -2611,7 +2611,7 @@ void NyquistEffect::BuildPromptWindow(ShuttleGui & S)
S.AddSpace(1, 1); S.AddSpace(1, 1);
mVersionCheckBox = S.AddCheckBox(_("&Use legacy (version 3) syntax."), mVersionCheckBox = S.AddCheckBox(XO("&Use legacy (version 3) syntax."),
(mVersion == 3)); (mVersion == 3));
} }
S.EndMultiColumn(); S.EndMultiColumn();

View File

@ -126,7 +126,7 @@ void ExportCLOptions::PopulateOrExchange(ShuttleGui & S)
S.Id(ID_BROWSE).AddButton(XO("Browse..."), S.Id(ID_BROWSE).AddButton(XO("Browse..."),
wxALIGN_CENTER_VERTICAL); wxALIGN_CENTER_VERTICAL);
S.AddFixedText( {} ); S.AddFixedText( {} );
S.TieCheckBox(_("Show output"), S.TieCheckBox(XO("Show output"),
{wxT("/FileFormats/ExternalProgramShowOutput"), {wxT("/FileFormats/ExternalProgramShowOutput"),
false}); false});
} }

View File

@ -411,7 +411,7 @@ void ExportMP3Options::PopulateOrExchange(ShuttleGui & S)
} }
S.EndRadioButtonGroup(); S.EndRadioButtonGroup();
mMono = S.Id(ID_MONO).AddCheckBox(_("Force export to mono"), mono); mMono = S.Id(ID_MONO).AddCheckBox(XO("Force export to mono"), mono);
} }
S.EndTwoColumn(); S.EndTwoColumn();
} }

View File

@ -348,7 +348,7 @@ void ExportMultipleDialog::PopulateOrExchange(ShuttleGui& S)
// Row 3 (indented) // Row 3 (indented)
S.AddVariableText(Verbatim(" "), false); S.AddVariableText(Verbatim(" "), false);
mFirst = S.Id(FirstID) mFirst = S.Id(FirstID)
.AddCheckBox(_("Include audio before first label"), false); .AddCheckBox(XO("Include audio before first label"), false);
// Row 4 // Row 4
S.AddVariableText( {}, false); S.AddVariableText( {}, false);
@ -415,7 +415,7 @@ void ExportMultipleDialog::PopulateOrExchange(ShuttleGui& S)
S.SetBorder(5); S.SetBorder(5);
S.StartHorizontalLay(wxEXPAND, false); S.StartHorizontalLay(wxEXPAND, false);
{ {
mOverwrite = S.Id(OverwriteID).TieCheckBox(_("Overwrite existing files"), mOverwrite = S.Id(OverwriteID).TieCheckBox(XO("Overwrite existing files"),
{wxT("/Export/OverwriteExisting"), {wxT("/Export/OverwriteExisting"),
false}); false});
} }

View File

@ -72,7 +72,7 @@ void BatchPrefs::PopulateOrExchange( ShuttleGui & S )
S.StartStatic( XO("Behaviors"),1 ); S.StartStatic( XO("Behaviors"),1 );
{ {
#ifdef __WXDEBUG__ #ifdef __WXDEBUG__
S.TieCheckBox( _("&Don't apply effects in batch mode"), S.TieCheckBox( XO("&Don't apply effects in batch mode"),
{wxT("/Batch/Debug"), false}); {wxT("/Batch/Debug"), false});
#endif #endif
} }

View File

@ -124,7 +124,7 @@ void DirectoriesPrefs::PopulateOrExchange(ShuttleGui & S)
// See http://bugzilla.audacityteam.org/show_bug.cgi?id=545. // See http://bugzilla.audacityteam.org/show_bug.cgi?id=545.
S.StartStatic(XO("Audio cache")); S.StartStatic(XO("Audio cache"));
{ {
S.TieCheckBox(_("Play and/or record using &RAM (useful for slow drives)"), S.TieCheckBox(XO("Play and/or record using &RAM (useful for slow drives)"),
wxT("/Directories/CacheBlockFiles"), wxT("/Directories/CacheBlockFiles"),
false); false);

View File

@ -187,7 +187,7 @@ void EffectsPrefs::PopulateOrExchange(ShuttleGui & S)
for ( const auto &entry : GetModuleData() ) for ( const auto &entry : GetModuleData() )
{ {
S.TieCheckBox( S.TieCheckBox(
entry.prompt.Translation(), entry.prompt,
{entry.setting, {entry.setting,
true} true}
); );

View File

@ -103,7 +103,7 @@ void ExtImportPrefs::PopulateOrExchange(ShuttleGui & S)
S.SetBorder(2); S.SetBorder(2);
S.StartScroller(); S.StartScroller();
S.TieCheckBox(_("A&ttempt to use filter in OpenFile dialog first"), S.TieCheckBox(XO("A&ttempt to use filter in OpenFile dialog first"),
{wxT("/ExtendedImport/OverrideExtendedImportByOpenFileDialogChoice"), {wxT("/ExtendedImport/OverrideExtendedImportByOpenFileDialogChoice"),
true}); true});
S.StartStatic(XO("Rules to choose import filters"), 1); S.StartStatic(XO("Rules to choose import filters"), 1);

View File

@ -221,10 +221,10 @@ void GUIPrefs::PopulateOrExchange(ShuttleGui & S)
S.StartStatic(XO("Options")); S.StartStatic(XO("Options"));
{ {
// Start wording of options with a verb, if possible. // Start wording of options with a verb, if possible.
S.TieCheckBox(_("Show 'How to Get &Help' at launch"), S.TieCheckBox(XO("Show 'How to Get &Help' at launch"),
{wxT("/GUI/ShowSplashScreen"), {wxT("/GUI/ShowSplashScreen"),
true}); true});
S.TieCheckBox(_("Show e&xtra menus"), S.TieCheckBox(XO("Show e&xtra menus"),
{wxT("/GUI/ShowExtraMenus"), {wxT("/GUI/ShowExtraMenus"),
false}); false});
#ifdef EXPERIMENTAL_THEME_PREFS #ifdef EXPERIMENTAL_THEME_PREFS
@ -234,18 +234,18 @@ void GUIPrefs::PopulateOrExchange(ShuttleGui & S)
{wxT("/GUI/ShowMac"), {wxT("/GUI/ShowMac"),
false}); false});
#endif #endif
S.TieCheckBox(_("&Beep on completion of longer activities"), S.TieCheckBox(XO("&Beep on completion of longer activities"),
{wxT("/GUI/BeepOnCompletion"), {wxT("/GUI/BeepOnCompletion"),
false}); false});
S.TieCheckBox(_("Re&tain labels if selection snaps to a label"), S.TieCheckBox(XO("Re&tain labels if selection snaps to a label"),
{wxT("/GUI/RetainLabels"), {wxT("/GUI/RetainLabels"),
false}); false});
S.TieCheckBox(_("B&lend system and Audacity theme"), S.TieCheckBox(XO("B&lend system and Audacity theme"),
{wxT("/GUI/BlendThemes"), {wxT("/GUI/BlendThemes"),
true}); true});
#ifndef __WXMAC__ #ifndef __WXMAC__
/* i18n-hint: RTL stands for 'Right to Left' */ /* i18n-hint: RTL stands for 'Right to Left' */
S.TieCheckBox(_("Use mostly Left-to-Right layouts in RTL languages"), S.TieCheckBox(XO("Use mostly Left-to-Right layouts in RTL languages"),
{"/GUI/RtlWorkaround", {"/GUI/RtlWorkaround",
true}); true});
#endif #endif

View File

@ -117,11 +117,11 @@ void ImportExportPrefs::PopulateOrExchange(ShuttleGui & S)
} }
S.EndRadioButtonGroup(); S.EndRadioButtonGroup();
S.TieCheckBox(_("S&how Metadata Tags editor before export"), S.TieCheckBox(XO("S&how Metadata Tags editor before export"),
{wxT("/AudioFiles/ShowId3Dialog"), {wxT("/AudioFiles/ShowId3Dialog"),
true}); true});
/* i18n-hint 'blank space' is space on the tracks with no audio in it*/ /* i18n-hint 'blank space' is space on the tracks with no audio in it*/
S.TieCheckBox(_("&Ignore blank space at the beginning"), S.TieCheckBox(XO("&Ignore blank space at the beginning"),
{wxT("/AudioFiles/SkipSilenceAtBeginning"), {wxT("/AudioFiles/SkipSilenceAtBeginning"),
false}); false});
} }

View File

@ -146,9 +146,9 @@ void PlaybackPrefs::PopulateOrExchange(ShuttleGui & S)
{ {
S.StartVerticalLay(); S.StartVerticalLay();
{ {
S.TieCheckBox(_("&Vari-Speed Play"), {"/AudioIO/VariSpeedPlay", true}); S.TieCheckBox(XO("&Vari-Speed Play"), {"/AudioIO/VariSpeedPlay", true});
S.TieCheckBox(_("&Micro-fades"), {"/AudioIO/Microfades", false}); S.TieCheckBox(XO("&Micro-fades"), {"/AudioIO/Microfades", false});
S.TieCheckBox(_("Always scrub un&pinned"), S.TieCheckBox(XO("Always scrub un&pinned"),
{UnpinnedScrubbingPreferenceKey(), {UnpinnedScrubbingPreferenceKey(),
UnpinnedScrubbingPreferenceDefault()}); UnpinnedScrubbingPreferenceDefault()});
} }

View File

@ -87,7 +87,7 @@ void RecordingPrefs::PopulateOrExchange(ShuttleGui & S)
S.StartStatic(XO("Options")); S.StartStatic(XO("Options"));
{ {
// Start wording of options with a verb, if possible. // Start wording of options with a verb, if possible.
S.TieCheckBox(_("Play &other tracks while recording (overdub)"), S.TieCheckBox(XO("Play &other tracks while recording (overdub)"),
{wxT("/AudioIO/Duplex"), {wxT("/AudioIO/Duplex"),
#ifdef EXPERIMENTAL_DA #ifdef EXPERIMENTAL_DA
false false
@ -103,19 +103,19 @@ void RecordingPrefs::PopulateOrExchange(ShuttleGui & S)
{wxT("/AudioIO/Playthrough"), {wxT("/AudioIO/Playthrough"),
false}); false});
#endif #endif
S.TieCheckBox(_("&Software playthrough of input"), S.TieCheckBox(XO("&Software playthrough of input"),
{wxT("/AudioIO/SWPlaythrough"), {wxT("/AudioIO/SWPlaythrough"),
false}); false});
#if !defined(__WXMAC__) #if !defined(__WXMAC__)
//S.AddUnits(wxString(wxT(" ")) + _("(uncheck when recording computer playback)")); //S.AddUnits(wxString(wxT(" ")) + _("(uncheck when recording computer playback)"));
#endif #endif
S.TieCheckBox(_("Record on a new track"), S.TieCheckBox(XO("Record on a new track"),
{wxT("/GUI/PreferNewTrackRecord"), {wxT("/GUI/PreferNewTrackRecord"),
false}); false});
/* i18n-hint: Dropout is a loss of a short sequence audio sample data from the recording */ /* i18n-hint: Dropout is a loss of a short sequence audio sample data from the recording */
S.TieCheckBox(_("Detect dropouts"), S.TieCheckBox(XO("Detect dropouts"),
{WarningDialogKey(wxT("DropoutDetected")), {WarningDialogKey(wxT("DropoutDetected")),
true}); true});
@ -125,7 +125,7 @@ void RecordingPrefs::PopulateOrExchange(ShuttleGui & S)
S.StartStatic(XO("Sound Activated Recording")); S.StartStatic(XO("Sound Activated Recording"));
{ {
S.TieCheckBox(_("&Enable"), S.TieCheckBox(XO("&Enable"),
{wxT("/AudioIO/SoundActivatedRecord"), {wxT("/AudioIO/SoundActivatedRecord"),
false}); false});
@ -155,7 +155,7 @@ void RecordingPrefs::PopulateOrExchange(ShuttleGui & S)
S.AddFixedText(XO("With:")) ; S.AddFixedText(XO("With:")) ;
S.StartMultiColumn(3); S.StartMultiColumn(3);
{ {
S.Id(UseCustomTrackNameID).TieCheckBox(_("Custom Track &Name"), S.Id(UseCustomTrackNameID).TieCheckBox(XO("Custom Track &Name"),
{wxT("/GUI/TrackNames/RecordingNameCustom"), {wxT("/GUI/TrackNames/RecordingNameCustom"),
mUseCustomTrackName}); mUseCustomTrackName});
@ -167,21 +167,21 @@ void RecordingPrefs::PopulateOrExchange(ShuttleGui & S)
_("Recorded_Audio")}, _("Recorded_Audio")},
30); 30);
} }
S.EndMultiColumn(); S.EndMultiColumn();
S.AddFixedText( {} ); S.AddFixedText( {} );
S.StartMultiColumn(3); S.StartMultiColumn(3);
{ {
S.TieCheckBox(_("&Track Number"), S.TieCheckBox(XO("&Track Number"),
{wxT("/GUI/TrackNames/TrackNumber"), {wxT("/GUI/TrackNames/TrackNumber"),
false}); false});
S.TieCheckBox(_("System &Date"), S.TieCheckBox(XO("System &Date"),
{wxT("/GUI/TrackNames/DateStamp"), {wxT("/GUI/TrackNames/DateStamp"),
false}); false});
S.TieCheckBox(_("System T&ime"), S.TieCheckBox(XO("System T&ime"),
{wxT("/GUI/TrackNames/TimeStamp"), {wxT("/GUI/TrackNames/TimeStamp"),
false}); false});
} }
@ -194,7 +194,7 @@ void RecordingPrefs::PopulateOrExchange(ShuttleGui & S)
#ifdef EXPERIMENTAL_AUTOMATED_INPUT_LEVEL_ADJUSTMENT #ifdef EXPERIMENTAL_AUTOMATED_INPUT_LEVEL_ADJUSTMENT
S.StartStatic(XO("Automated Recording Level Adjustment")); S.StartStatic(XO("Automated Recording Level Adjustment"));
{ {
S.TieCheckBox(_("Enable Automated Recording Level Adjustment."), S.TieCheckBox(XO("Enable Automated Recording Level Adjustment."),
{wxT("/AudioIO/AutomatedInputLevelAdjustment"), {wxT("/AudioIO/AutomatedInputLevelAdjustment"),
false}); false});

View File

@ -175,7 +175,7 @@ void SpectrumPrefs::PopulateOrExchange(ShuttleGui & S)
mDefaultsCheckbox = 0; mDefaultsCheckbox = 0;
if (mWt) { if (mWt) {
/* i18n-hint: use is a verb */ /* i18n-hint: use is a verb */
mDefaultsCheckbox = S.Id(ID_DEFAULTS).TieCheckBox(_("&Use Preferences"), mDefaulted); mDefaultsCheckbox = S.Id(ID_DEFAULTS).TieCheckBox(XO("&Use Preferences"), mDefaulted);
} }
S.StartMultiColumn(2,wxEXPAND); S.StartMultiColumn(2,wxEXPAND);
@ -226,7 +226,7 @@ void SpectrumPrefs::PopulateOrExchange(ShuttleGui & S)
} }
S.EndMultiColumn(); S.EndMultiColumn();
S.Id(ID_GRAYSCALE).TieCheckBox(_("Gra&yscale"), S.Id(ID_GRAYSCALE).TieCheckBox(XO("Gra&yscale"),
mTempSettings.isGrayscale); mTempSettings.isGrayscale);
} }
S.EndStatic(); S.EndStatic();
@ -277,7 +277,7 @@ void SpectrumPrefs::PopulateOrExchange(ShuttleGui & S)
S.EndStatic(); S.EndStatic();
#ifndef SPECTRAL_SELECTION_GLOBAL_SWITCH #ifndef SPECTRAL_SELECTION_GLOBAL_SWITCH
S.Id(ID_SPECTRAL_SELECTION).TieCheckBox(_("Ena&ble Spectral Selection"), S.Id(ID_SPECTRAL_SELECTION).TieCheckBox(XO("Ena&ble Spectral Selection"),
mTempSettings.spectralSelection); mTempSettings.spectralSelection);
#endif #endif
@ -304,10 +304,10 @@ void SpectrumPrefs::PopulateOrExchange(ShuttleGui & S)
} }
S.EndTwoColumn(); S.EndTwoColumn();
S.TieCheckBox(_("&Find Notes"), S.TieCheckBox(XO("&Find Notes"),
mTempSettings.fftFindNotes); mTempSettings.fftFindNotes);
S.TieCheckBox(_("&Quantize Notes"), S.TieCheckBox(XO("&Quantize Notes"),
mTempSettings.findNotesQuantize); mTempSettings.findNotesQuantize);
} }
S.EndStatic(); S.EndStatic();
@ -317,7 +317,7 @@ void SpectrumPrefs::PopulateOrExchange(ShuttleGui & S)
#ifdef SPECTRAL_SELECTION_GLOBAL_SWITCH #ifdef SPECTRAL_SELECTION_GLOBAL_SWITCH
S.StartStatic(XO("Global settings")); S.StartStatic(XO("Global settings"));
{ {
S.TieCheckBox(_("Ena&ble spectral selection"), S.TieCheckBox(XO("Ena&ble spectral selection"),
SpectrogramSettings::Globals::Get().spectralSelection); SpectrogramSettings::Globals::Get().spectralSelection);
} }
S.EndStatic(); S.EndStatic();

View File

@ -80,34 +80,34 @@ void TracksBehaviorsPrefs::PopulateOrExchange(ShuttleGui & S)
S.StartStatic(XO("Behaviors")); S.StartStatic(XO("Behaviors"));
{ {
S.TieCheckBox(_("&Select all audio, if selection required"), S.TieCheckBox(XO("&Select all audio, if selection required"),
{wxT("/GUI/SelectAllOnNone"), {wxT("/GUI/SelectAllOnNone"),
false}); false});
/* i18n-hint: Cut-lines are lines that can expand to show the cut audio.*/ /* i18n-hint: Cut-lines are lines that can expand to show the cut audio.*/
S.TieCheckBox(_("Enable cut &lines"), S.TieCheckBox(XO("Enable cut &lines"),
{wxT("/GUI/EnableCutLines"), {wxT("/GUI/EnableCutLines"),
false}); false});
S.TieCheckBox(_("Enable &dragging selection edges"), S.TieCheckBox(XO("Enable &dragging selection edges"),
{wxT("/GUI/AdjustSelectionEdges"), {wxT("/GUI/AdjustSelectionEdges"),
true}); true});
S.TieCheckBox(_("Editing a clip can &move other clips"), S.TieCheckBox(XO("Editing a clip can &move other clips"),
{wxT("/GUI/EditClipCanMove"), {wxT("/GUI/EditClipCanMove"),
true}); true});
S.TieCheckBox(_("\"Move track focus\" c&ycles repeatedly through tracks"), S.TieCheckBox(XO("\"Move track focus\" c&ycles repeatedly through tracks"),
{wxT("/GUI/CircularTrackNavigation"), {wxT("/GUI/CircularTrackNavigation"),
false}); false});
S.TieCheckBox(_("&Type to create a label"), S.TieCheckBox(XO("&Type to create a label"),
{wxT("/GUI/TypeToCreateLabel"), {wxT("/GUI/TypeToCreateLabel"),
false}); false});
S.TieCheckBox(_("Use dialog for the &name of a new label"), S.TieCheckBox(XO("Use dialog for the &name of a new label"),
{wxT("/GUI/DialogForNameNewLabel"), {wxT("/GUI/DialogForNameNewLabel"),
false}); false});
#ifdef EXPERIMENTAL_SCROLLING_LIMITS #ifdef EXPERIMENTAL_SCROLLING_LIMITS
S.TieCheckBox(_("Enable scrolling left of &zero"), S.TieCheckBox(XO("Enable scrolling left of &zero"),
{ScrollingPreferenceKey(), {ScrollingPreferenceKey(),
ScrollingPreferenceDefault()}); ScrollingPreferenceDefault()});
#endif #endif
S.TieCheckBox(_("Advanced &vertical zooming"), S.TieCheckBox(XO("Advanced &vertical zooming"),
{wxT("/GUI/VerticalZooming"), {wxT("/GUI/VerticalZooming"),
false}); false});

View File

@ -267,14 +267,14 @@ void TracksPrefs::PopulateOrExchange(ShuttleGui & S)
S.StartStatic(XO("Display")); S.StartStatic(XO("Display"));
{ {
S.TieCheckBox(_("Auto-&fit track height"), S.TieCheckBox(XO("Auto-&fit track height"),
{wxT("/GUI/TracksFitVerticallyZoomed"), {wxT("/GUI/TracksFitVerticallyZoomed"),
false}); false});
S.TieCheckBox(_("Sho&w audio track name as overlay"), S.TieCheckBox(XO("Sho&w audio track name as overlay"),
{wxT("/GUI/ShowTrackNameInWaveform"), {wxT("/GUI/ShowTrackNameInWaveform"),
false}); false});
#ifdef EXPERIMENTAL_HALF_WAVE #ifdef EXPERIMENTAL_HALF_WAVE
S.TieCheckBox(_("Use &half-wave display when collapsed"), S.TieCheckBox(XO("Use &half-wave display when collapsed"),
{wxT("/GUI/CollapseToHalfWave"), {wxT("/GUI/CollapseToHalfWave"),
false}); false});
#endif #endif
@ -283,7 +283,7 @@ void TracksPrefs::PopulateOrExchange(ShuttleGui & S)
{PinnedHeadPreferenceKey(), {PinnedHeadPreferenceKey(),
PinnedHeadPreferenceDefault()}); PinnedHeadPreferenceDefault()});
#endif #endif
S.TieCheckBox(_("A&uto-scroll if head unpinned"), S.TieCheckBox(XO("A&uto-scroll if head unpinned"),
{wxT("/GUI/AutoScroll"), {wxT("/GUI/AutoScroll"),
true}); true});

View File

@ -69,22 +69,22 @@ void WarningsPrefs::PopulateOrExchange(ShuttleGui & S)
S.StartStatic(XO("Show Warnings/Prompts for")); S.StartStatic(XO("Show Warnings/Prompts for"));
{ {
S.TieCheckBox(_("Saving &projects"), S.TieCheckBox(XO("Saving &projects"),
{wxT("/Warnings/FirstProjectSave"), {wxT("/Warnings/FirstProjectSave"),
true}); true});
S.TieCheckBox(_("Saving &empty project"), S.TieCheckBox(XO("Saving &empty project"),
{wxT("/GUI/EmptyCanBeDirty"), {wxT("/GUI/EmptyCanBeDirty"),
true}); true});
S.TieCheckBox(_("&Low disk space at launch or new project"), S.TieCheckBox(XO("&Low disk space at launch or new project"),
{wxT("/Warnings/DiskSpaceWarning"), {wxT("/Warnings/DiskSpaceWarning"),
true}); true});
S.TieCheckBox(_("Mixing down to &mono during export"), S.TieCheckBox(XO("Mixing down to &mono during export"),
{wxT("/Warnings/MixMono"), {wxT("/Warnings/MixMono"),
true}); true});
S.TieCheckBox(_("Mixing down to &stereo during export"), S.TieCheckBox(XO("Mixing down to &stereo during export"),
{wxT("/Warnings/MixStereo"), {wxT("/Warnings/MixStereo"),
true}); true});
S.TieCheckBox(_("Mixing down on export (&Custom FFmpeg or external program)"), S.TieCheckBox(XO("Mixing down on export (&Custom FFmpeg or external program)"),
{wxT("/Warnings/MixUnknownChannels"), {wxT("/Warnings/MixUnknownChannels"),
true}); true});
#ifdef EXPERIMENTAL_OD_DATA #ifdef EXPERIMENTAL_OD_DATA

View File

@ -100,7 +100,7 @@ void WaveformPrefs::PopulateOrExchange(ShuttleGui & S)
mDefaultsCheckbox = 0; mDefaultsCheckbox = 0;
if (mWt) { if (mWt) {
/* i18n-hint: use is a verb */ /* i18n-hint: use is a verb */
mDefaultsCheckbox = S.Id(ID_DEFAULTS).TieCheckBox(_("&Use Preferences"), mDefaulted); mDefaultsCheckbox = S.Id(ID_DEFAULTS).TieCheckBox(XO("&Use Preferences"), mDefaulted);
} }
S.StartStatic(XO("Display")); S.StartStatic(XO("Display"));

View File

@ -73,7 +73,7 @@ WarningDialog::WarningDialog(wxWindow *parent, const TranslatableString &message
S.StartVerticalLay(false); S.StartVerticalLay(false);
{ {
S.AddFixedText(message); S.AddFixedText(message);
mCheckBox = S.AddCheckBox(footer.Translation(), false); mCheckBox = S.AddCheckBox(footer, false);
} }
S.EndVerticalLay(); S.EndVerticalLay();