mirror of
https://github.com/cookiengineer/audacity
synced 2025-08-10 17:11:17 +02:00
TranslatableString for more scale and algorithm names
This commit is contained in:
parent
65b6d5aad5
commit
0ddeec9c3b
@ -159,25 +159,17 @@ const TranslatableStrings &SpectrogramSettings::GetScaleNames()
|
|||||||
}
|
}
|
||||||
|
|
||||||
//static
|
//static
|
||||||
const wxArrayStringEx &SpectrogramSettings::GetAlgorithmNames()
|
const TranslatableStrings &SpectrogramSettings::GetAlgorithmNames()
|
||||||
{
|
{
|
||||||
class AlgorithmNamesArray final : public TranslatableStringArray
|
static const TranslatableStrings results{
|
||||||
{
|
// Keep in correspondence with enum SpectrogramSettings::Algorithm:
|
||||||
void Populate() override
|
XO("Frequencies") ,
|
||||||
{
|
/* i18n-hint: the Reassignment algorithm for spectrograms */
|
||||||
mContents.insert( mContents.end(), {
|
XO("Reassignment") ,
|
||||||
// Keep in correspondence with enum SpectrogramSettings::Algorithm:
|
/* i18n-hint: EAC abbreviates "Enhanced Autocorrelation" */
|
||||||
_("Frequencies") ,
|
XO("Pitch (EAC)") ,
|
||||||
/* i18n-hint: the Reassignment algorithm for spectrograms */
|
|
||||||
_("Reassignment") ,
|
|
||||||
/* i18n-hint: EAC abbreviates "Enhanced Autocorrelation" */
|
|
||||||
_("Pitch (EAC)") ,
|
|
||||||
} );
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
return results;
|
||||||
static AlgorithmNamesArray theArray;
|
|
||||||
return theArray.Get();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool SpectrogramSettings::Validate(bool quiet)
|
bool SpectrogramSettings::Validate(bool quiet)
|
||||||
|
@ -67,7 +67,7 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
static const TranslatableStrings &GetScaleNames();
|
static const TranslatableStrings &GetScaleNames();
|
||||||
static const wxArrayStringEx &GetAlgorithmNames();
|
static const TranslatableStrings &GetAlgorithmNames();
|
||||||
|
|
||||||
static SpectrogramSettings &defaults();
|
static SpectrogramSettings &defaults();
|
||||||
SpectrogramSettings();
|
SpectrogramSettings();
|
||||||
|
@ -242,7 +242,9 @@ void SpectrumPrefs::PopulateOrExchange(ShuttleGui & S)
|
|||||||
mAlgorithmChoice =
|
mAlgorithmChoice =
|
||||||
S.Id(ID_ALGORITHM).TieChoice(_("A&lgorithm:"),
|
S.Id(ID_ALGORITHM).TieChoice(_("A&lgorithm:"),
|
||||||
mTempSettings.algorithm,
|
mTempSettings.algorithm,
|
||||||
SpectrogramSettings::GetAlgorithmNames());
|
transform_container<wxArrayStringEx>(
|
||||||
|
SpectrogramSettings::GetAlgorithmNames(),
|
||||||
|
std::mem_fn( &TranslatableString::Translation ) ) );
|
||||||
|
|
||||||
S.Id(ID_WINDOW_SIZE).TieChoice(_("Window &size:"),
|
S.Id(ID_WINDOW_SIZE).TieChoice(_("Window &size:"),
|
||||||
mTempSettings.windowSize,
|
mTempSettings.windowSize,
|
||||||
|
@ -110,7 +110,9 @@ void WaveformPrefs::PopulateOrExchange(ShuttleGui & S)
|
|||||||
mScaleChoice =
|
mScaleChoice =
|
||||||
S.Id(ID_SCALE).TieChoice(_("S&cale:"),
|
S.Id(ID_SCALE).TieChoice(_("S&cale:"),
|
||||||
mTempSettings.scaleType,
|
mTempSettings.scaleType,
|
||||||
WaveformSettings::GetScaleNames());
|
transform_container<wxArrayStringEx>(
|
||||||
|
WaveformSettings::GetScaleNames(),
|
||||||
|
std::mem_fn( &TranslatableString::Translation ) ) );
|
||||||
|
|
||||||
mRangeChoice =
|
mRangeChoice =
|
||||||
S.Id(ID_RANGE).TieChoice(_("Waveform dB &range:"),
|
S.Id(ID_RANGE).TieChoice(_("Waveform dB &range:"),
|
||||||
|
@ -147,20 +147,14 @@ void WaveformSettings::NextHigherDBRange()
|
|||||||
}
|
}
|
||||||
|
|
||||||
//static
|
//static
|
||||||
const wxArrayStringEx &WaveformSettings::GetScaleNames()
|
const TranslatableStrings &WaveformSettings::GetScaleNames()
|
||||||
{
|
{
|
||||||
class ScaleNamesArray final : public TranslatableStringArray
|
static const TranslatableStrings result{
|
||||||
{
|
// Keep in correspondence with enum WaveTrack::WaveTrackDisplay:
|
||||||
void Populate() override
|
XO("Linear"),
|
||||||
{
|
XO("Logarithmic"),
|
||||||
// Keep in correspondence with enum WaveTrack::WaveTrackDisplay:
|
|
||||||
mContents.push_back(_("Linear"));
|
|
||||||
mContents.push_back(_("Logarithmic"));
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
return result;
|
||||||
static ScaleNamesArray theArray;
|
|
||||||
return theArray.Get();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
WaveformSettings::~WaveformSettings()
|
WaveformSettings::~WaveformSettings()
|
||||||
|
@ -11,7 +11,7 @@ Paul Licameli
|
|||||||
#ifndef __AUDACITY_WAVEFORM_SETTINGS__
|
#ifndef __AUDACITY_WAVEFORM_SETTINGS__
|
||||||
#define __AUDACITY_WAVEFORM_SETTINGS__
|
#define __AUDACITY_WAVEFORM_SETTINGS__
|
||||||
|
|
||||||
class wxArrayStringEx;
|
#include "../Internat.h" // for TranslatableStrings
|
||||||
|
|
||||||
class WaveformSettings
|
class WaveformSettings
|
||||||
{
|
{
|
||||||
@ -58,7 +58,7 @@ public:
|
|||||||
stNumScaleTypes,
|
stNumScaleTypes,
|
||||||
};
|
};
|
||||||
|
|
||||||
static const wxArrayStringEx &GetScaleNames();
|
static const TranslatableStrings &GetScaleNames();
|
||||||
|
|
||||||
ScaleType scaleType;
|
ScaleType scaleType;
|
||||||
int dBRange;
|
int dBRange;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user