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

Uses of TranslatableString as value of XO macro...

... It is not implicitly convertible from wxString, compelling many uses of
the new type to fix compilation.
This commit is contained in:
Paul Licameli
2018-03-29 16:26:31 -04:00
parent 911f5eabcc
commit e4a7c9ba5b
21 changed files with 58 additions and 61 deletions

View File

@@ -92,7 +92,7 @@ BEGIN_EVENT_TABLE(ControlToolBar, ToolBar)
EVT_IDLE(ControlToolBar::OnIdle)
END_EVENT_TABLE()
static const wxString
static const TranslatableString
sStatePlay = XO("Playing")
, sStateStop = XO("Stopped")
, sStateRecord = XO("Recording")
@@ -712,9 +712,9 @@ wxString ControlToolBar::StateForStatusBar()
auto pProject = &mProject;
auto scrubState = pProject
? Scrubber::Get( *pProject ).GetUntranslatedStateString()
: wxString();
: TranslatableString{};
if (!scrubState.empty())
state = wxGetTranslation(scrubState);
state = scrubState.Translation();
else if (mPlay->IsDown())
state = wxGetTranslation(sStatePlay);
else if (projectAudioManager.Recording())

View File

@@ -226,7 +226,7 @@ void EditToolBar::EnableDisableButtons()
static const struct Entry {
int tool;
CommandID commandName;
wxString untranslatedLabel;
TranslatableString untranslatedLabel;
} EditToolbarButtonList[] = {
{ ETBCutID, wxT("Cut"), XO("Cut") },
{ ETBCopyID, wxT("Copy"), XO("Copy") },

View File

@@ -142,7 +142,7 @@ void ToolsToolBar::RegenerateTooltips()
static const struct Entry {
int tool;
CommandID commandName;
wxString untranslatedLabel;
TranslatableString untranslatedLabel;
} table[] = {
{ selectTool, wxT("SelectTool"), XO("Selection Tool") },
{ envelopeTool, wxT("EnvelopeTool"), XO("Envelope Tool") },

View File

@@ -336,9 +336,9 @@ void TranscriptionToolBar::RegenerateTooltips()
static const struct Entry {
int tool;
CommandID commandName;
wxString untranslatedLabel;
TranslatableString untranslatedLabel;
CommandID commandName2;
wxString untranslatedLabel2;
TranslatableString untranslatedLabel2;
} table[] = {
{ TTB_PlaySpeed, wxT("PlayAtSpeed"), XO("Play-at-Speed"),
wxT("PlayAtSpeedLooped"), XO("Looped-Play-at-Speed")