mirror of
https://github.com/cookiengineer/audacity
synced 2025-11-22 00:47:13 +01:00
TranslatableString in popup menu tables
This commit is contained in:
@@ -140,30 +140,22 @@ SpectrogramSettings& SpectrogramSettings::defaults()
|
||||
}
|
||||
|
||||
//static
|
||||
const wxArrayStringEx &SpectrogramSettings::GetScaleNames()
|
||||
const TranslatableStrings &SpectrogramSettings::GetScaleNames()
|
||||
{
|
||||
class ScaleNamesArray final : public TranslatableStringArray
|
||||
{
|
||||
void Populate() override
|
||||
{
|
||||
mContents.insert( mContents.end(), {
|
||||
// Keep in correspondence with enum SpectrogramSettings::ScaleType:
|
||||
_("Linear") ,
|
||||
_("Logarithmic") ,
|
||||
/* i18n-hint: The name of a frequency scale in psychoacoustics */
|
||||
_("Mel") ,
|
||||
/* i18n-hint: The name of a frequency scale in psychoacoustics, named for Heinrich Barkhausen */
|
||||
_("Bark") ,
|
||||
/* i18n-hint: The name of a frequency scale in psychoacoustics, abbreviates Equivalent Rectangular Bandwidth */
|
||||
_("ERB") ,
|
||||
/* i18n-hint: Time units, that is Period = 1 / Frequency */
|
||||
_("Period") ,
|
||||
} );
|
||||
}
|
||||
static const TranslatableStrings result{
|
||||
// Keep in correspondence with enum SpectrogramSettings::ScaleType:
|
||||
XO("Linear") ,
|
||||
XO("Logarithmic") ,
|
||||
/* i18n-hint: The name of a frequency scale in psychoacoustics */
|
||||
XO("Mel") ,
|
||||
/* i18n-hint: The name of a frequency scale in psychoacoustics, named for Heinrich Barkhausen */
|
||||
XO("Bark") ,
|
||||
/* i18n-hint: The name of a frequency scale in psychoacoustics, abbreviates Equivalent Rectangular Bandwidth */
|
||||
XO("ERB") ,
|
||||
/* i18n-hint: Time units, that is Period = 1 / Frequency */
|
||||
XO("Period") ,
|
||||
};
|
||||
|
||||
static ScaleNamesArray theArray;
|
||||
return theArray.Get();
|
||||
return result;
|
||||
}
|
||||
|
||||
//static
|
||||
|
||||
@@ -66,7 +66,7 @@ public:
|
||||
stNumScaleTypes,
|
||||
};
|
||||
|
||||
static const wxArrayStringEx &GetScaleNames();
|
||||
static const TranslatableStrings &GetScaleNames();
|
||||
static const wxArrayStringEx &GetAlgorithmNames();
|
||||
|
||||
static SpectrogramSettings &defaults();
|
||||
|
||||
@@ -190,7 +190,9 @@ void SpectrumPrefs::PopulateOrExchange(ShuttleGui & S)
|
||||
S.SetStretchyCol( 1 );
|
||||
S.Id(ID_SCALE).TieChoice(_("S&cale:"),
|
||||
mTempSettings.scaleType,
|
||||
SpectrogramSettings::GetScaleNames());
|
||||
transform_container<wxArrayStringEx>(
|
||||
SpectrogramSettings::GetScaleNames(),
|
||||
std::mem_fn( &TranslatableString::Translation ) ) );
|
||||
mMinFreq =
|
||||
S.Id(ID_MINIMUM).TieNumericTextBox(_("Mi&n Frequency (Hz):"),
|
||||
mTempSettings.minFreq,
|
||||
|
||||
Reference in New Issue
Block a user