From e9f63d43d1c53270f2b70f7a69d622ff4faa5fec Mon Sep 17 00:00:00 2001 From: Paul Licameli Date: Thu, 28 May 2020 16:23:40 -0400 Subject: [PATCH] Contexts & i18n-hints suggested by Joachim Huffer (thanks!) --- src/effects/ChangePitch.cpp | 14 ++++++++------ src/effects/ChangeSpeed.cpp | 23 ++++++++++++++--------- src/effects/ChangeTempo.cpp | 20 ++++++++++---------- src/prefs/DevicePrefs.cpp | 3 ++- src/prefs/GUIPrefs.cpp | 2 +- src/prefs/MidiIOPrefs.cpp | 3 ++- 6 files changed, 37 insertions(+), 28 deletions(-) diff --git a/src/effects/ChangePitch.cpp b/src/effects/ChangePitch.cpp index fa5ff9b0e..9fa23c19f 100644 --- a/src/effects/ChangePitch.cpp +++ b/src/effects/ChangePitch.cpp @@ -282,10 +282,11 @@ void EffectChangePitch::PopulateOrExchange(ShuttleGui & S) S.StartMultiColumn(6, wxALIGN_CENTER); // 6 controls, because each AddChoice adds a wxStaticText and a wxChoice. { m_pChoice_FromPitch = S.Id(ID_FromPitch) - /* i18n-hint: changing a quantity "from" one value "to" another */ - .Name(XO("from")) + /* i18n-hint: changing musical pitch "from" one value "to" another */ + .Name(XC("from", "change pitch")) .MinSize( { 80, -1 } ) - .AddChoice(XXO("&from"), pitch); + /* i18n-hint: changing musical pitch "from" one value "to" another */ + .AddChoice(XXC("&from", "change pitch"), pitch); m_pSpin_FromOctave = S.Id(ID_FromOctave) .Name(XO("from Octave")) @@ -293,10 +294,11 @@ void EffectChangePitch::PopulateOrExchange(ShuttleGui & S) .AddSpinCtrl( {}, m_nFromOctave, INT_MAX, INT_MIN); m_pChoice_ToPitch = S.Id(ID_ToPitch) - /* i18n-hint: changing a quantity "from" one value "to" another */ - .Name(XO("to")) + /* i18n-hint: changing musical pitch "from" one value "to" another */ + .Name(XC("to", "change pitch")) .MinSize( { 80, -1 } ) - .AddChoice(XXO("&to"), pitch); + /* i18n-hint: changing musical pitch "from" one value "to" another */ + .AddChoice(XXC("&to", "change pitch"), pitch); m_pSpin_ToOctave = S.Id(ID_ToOctave) .Name(XO("to Octave")) diff --git a/src/effects/ChangeSpeed.cpp b/src/effects/ChangeSpeed.cpp index e6aaf7f9e..c5e48e7a9 100644 --- a/src/effects/ChangeSpeed.cpp +++ b/src/effects/ChangeSpeed.cpp @@ -347,17 +347,22 @@ void EffectChangeSpeed::PopulateOrExchange(ShuttleGui & S) S.AddUnits(XO("Standard Vinyl rpm:")); mpChoice_FromVinyl = S.Id(ID_FromVinyl) + /* i18n-hint: changing speed of audio "from" one value "to" another + "rpm" means "revolutions per minute" as on a vinyl record turntable + */ .Name(XO("From rpm")) .MinSize( { 100, -1 } ) - /* i18n-hint: changing a quantity "from" one value "to" another */ - .AddChoice(XXO("&from"), kVinylStrings); + /* i18n-hint: changing speed of audio "from" one value "to" another */ + .AddChoice(XXC("&from", "change speed"), kVinylStrings); mpChoice_ToVinyl = S.Id(ID_ToVinyl) - /* i18n-hint: changing a quantity "from" one value "to" another */ + /* i18n-hint: changing speed of audio "from" one value "to" another + "rpm" means "revolutions per minute" as on a vinyl record turntable + */ .Name(XO("To rpm")) .MinSize( { 100, -1 } ) - /* i18n-hint: changing a quantity "from" one value "to" another */ - .AddChoice(XXO("&to"), kVinylStrings); + /* i18n-hint: changing speed of audio "from" one value "to" another */ + .AddChoice(XXC("&to", "change speed"), kVinylStrings); } S.EndMultiColumn(); @@ -379,8 +384,8 @@ void EffectChangeSpeed::PopulateOrExchange(ShuttleGui & S) .MenuEnabled(false)); S.ToolTip(XO("Current length of selection.")) - /* i18n-hint: changing a quantity "from" one value "to" another */ - .Name(XO("from")) + /* i18n-hint: changing speed of audio "from" one value "to" another */ + .Name(XC("from", "change speed")) .Position(wxALIGN_LEFT) .AddWindow(mpFromLengthCtrl); @@ -393,8 +398,8 @@ void EffectChangeSpeed::PopulateOrExchange(ShuttleGui & S) mToLength, mProjectRate); - /* i18n-hint: changing a quantity "from" one value "to" another */ - S.Name(XO("to")) + /* i18n-hint: changing speed of audio "from" one value "to" another */ + S.Name(XC("to", "change speed")) .Position(wxALIGN_LEFT) .AddWindow(mpToLengthCtrl); } diff --git a/src/effects/ChangeTempo.cpp b/src/effects/ChangeTempo.cpp index dc418bf88..141a32168 100644 --- a/src/effects/ChangeTempo.cpp +++ b/src/effects/ChangeTempo.cpp @@ -263,24 +263,24 @@ void EffectChangeTempo::PopulateOrExchange(ShuttleGui & S) S.StartHorizontalLay(wxALIGN_CENTER); { m_pTextCtrl_FromBPM = S.Id(ID_FromBPM) - /* i18n-hint: changing a quantity "from" one value "to" another */ + /* i18n-hint: changing tempo "from" one value "to" another */ .Name(XO("Beats per minute, from")) .Validator>( 3, &m_FromBPM, NumValidatorStyle::THREE_TRAILING_ZEROES | NumValidatorStyle::ZERO_AS_BLANK) - /* i18n-hint: changing a quantity "from" one value "to" another */ - .AddTextBox(XXO("&from"), wxT(""), 12); + /* i18n-hint: changing tempo "from" one value "to" another */ + .AddTextBox(XXC("&from", "change tempo"), wxT(""), 12); m_pTextCtrl_ToBPM = S.Id(ID_ToBPM) - /* i18n-hint: changing a quantity "from" one value "to" another */ + /* i18n-hint: changing tempo "from" one value "to" another */ .Name(XO("Beats per minute, to")) .Validator>( 3, &m_ToBPM, NumValidatorStyle::THREE_TRAILING_ZEROES | NumValidatorStyle::ZERO_AS_BLANK) - /* i18n-hint: changing a quantity "from" one value "to" another */ - .AddTextBox(XXO("&to"), wxT(""), 12); + /* i18n-hint: changing tempo "from" one value "to" another */ + .AddTextBox(XXC("&to", "change tempo"), wxT(""), 12); } S.EndHorizontalLay(); } @@ -297,8 +297,8 @@ void EffectChangeTempo::PopulateOrExchange(ShuttleGui & S) .Validator>( precision, &m_FromLength, NumValidatorStyle::TWO_TRAILING_ZEROES) - /* i18n-hint: changing a quantity "from" one value "to" another */ - .AddTextBox(XXO("from"), wxT(""), 12); + /* i18n-hint: changing tempo "from" one value "to" another */ + .AddTextBox(XXC("from", "change tempo"), wxT(""), 12); m_pTextCtrl_ToLength = S.Id(ID_ToLength) .Validator>( 2, &m_ToLength, NumValidatorStyle::TWO_TRAILING_ZEROES, @@ -308,8 +308,8 @@ void EffectChangeTempo::PopulateOrExchange(ShuttleGui & S) RoundValue( precision, (m_FromLength * 100.0) / (100.0 + MIN_Percentage) ) ) - /* i18n-hint: changing a quantity "from" one value "to" another */ - .AddTextBox(XXO("t&o"), wxT(""), 12); + /* i18n-hint: changing tempo "from" one value "to" another */ + .AddTextBox(XXC("t&o", "change tempo"), wxT(""), 12); } S.EndHorizontalLay(); } diff --git a/src/prefs/DevicePrefs.cpp b/src/prefs/DevicePrefs.cpp index e0f008b9c..7cdd8945f 100644 --- a/src/prefs/DevicePrefs.cpp +++ b/src/prefs/DevicePrefs.cpp @@ -129,7 +129,8 @@ void DevicePrefs::PopulateOrExchange(ShuttleGui & S) S.SetBorder(2); S.StartScroller(); - S.StartStatic(XO("Interface")); + /* i18n-hint Software interface to audio devices */ + S.StartStatic(XC("Interface", "device")); { S.StartMultiColumn(2); { diff --git a/src/prefs/GUIPrefs.cpp b/src/prefs/GUIPrefs.cpp index ca4d09ecf..e14dc60c9 100644 --- a/src/prefs/GUIPrefs.cpp +++ b/src/prefs/GUIPrefs.cpp @@ -39,7 +39,7 @@ GUIPrefs::GUIPrefs(wxWindow * parent, wxWindowID winid) /* i18n-hint: refers to Audacity's user interface settings */ -: PrefsPanel(parent, winid, XO("Interface")) +: PrefsPanel(parent, winid, XC("Interface", "GUI")) { Populate(); } diff --git a/src/prefs/MidiIOPrefs.cpp b/src/prefs/MidiIOPrefs.cpp index 33e8728f5..def0e29aa 100644 --- a/src/prefs/MidiIOPrefs.cpp +++ b/src/prefs/MidiIOPrefs.cpp @@ -133,7 +133,8 @@ void MidiIOPrefs::PopulateOrExchange( ShuttleGui & S ) { S.SetBorder(2); S.StartScroller(); - S.StartStatic(XO("Interface")); + /* i18n-hint Software interface to MIDI */ + S.StartStatic(XC("Interface", "MIDI")); { S.StartMultiColumn(2); {