1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-10-26 15:23:48 +01:00

Conversion of TranslatableString to wxString is private

This commit is contained in:
Paul Licameli
2019-11-30 13:32:18 -05:00
parent 0b6618e491
commit 72df562c4a
30 changed files with 119 additions and 99 deletions

View File

@@ -59,7 +59,7 @@ int PitchOctave(const double dMIDInote)
wxString PitchName(const double dMIDInote, const PitchNameChoice choice)
{
static const wxString sharpnames[12] = {
static const TranslatableString sharpnames[12] = {
/* i18n-hint: Name of a musical note in the 12-tone chromatic scale */
XO("C"),
/* i18n-hint: Name of a musical note in the 12-tone chromatic scale */
@@ -86,7 +86,7 @@ wxString PitchName(const double dMIDInote, const PitchNameChoice choice)
XO("B"),
};
static const wxString flatnames[12] = {
static const TranslatableString flatnames[12] = {
/* i18n-hint: Name of a musical note in the 12-tone chromatic scale */
XO("C"),
/* i18n-hint: Name of a musical note in the 12-tone chromatic scale */
@@ -113,7 +113,7 @@ wxString PitchName(const double dMIDInote, const PitchNameChoice choice)
XO("B"),
};
static const wxString bothnames[12] = {
static const TranslatableString bothnames[12] = {
/* i18n-hint: Name of a musical note in the 12-tone chromatic scale */
XO("C"),
/* i18n-hint: Two, alternate names of a musical note in the 12-tone chromatic scale */
@@ -140,7 +140,7 @@ wxString PitchName(const double dMIDInote, const PitchNameChoice choice)
XO("B"),
};
const wxString *table = nullptr;
const TranslatableString *table = nullptr;
switch ( choice ) {
case PitchNameChoice::Sharps: table = sharpnames; break;
case PitchNameChoice::Flats: table = flatnames; break;
@@ -148,7 +148,7 @@ wxString PitchName(const double dMIDInote, const PitchNameChoice choice)
default: wxASSERT(false); break;
}
return GetCustomTranslation( table[PitchIndex(dMIDInote)] );
return table[PitchIndex(dMIDInote)].Translation();
}
wxString PitchName_Absolute(const double dMIDInote, const PitchNameChoice choice)