1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-11-05 16:43:52 +01:00

Replace various calls to _ with XO

This commit is contained in:
Paul Licameli
2020-05-22 14:46:50 -04:00
parent 9c196860db
commit 37c0c15f12
4 changed files with 12 additions and 10 deletions

View File

@@ -153,11 +153,13 @@ void SelectionBar::Create(wxWindow * parent)
} }
auStaticText * SelectionBar::AddTitle( const wxString & Title, wxSizer * pSizer ){ auStaticText * SelectionBar::AddTitle(
auStaticText * pTitle = safenew auStaticText(this, Title ); const TranslatableString & Title, wxSizer * pSizer ){
const auto translated = Title.Translation();
auStaticText * pTitle = safenew auStaticText(this, translated );
pTitle->SetBackgroundColour( theTheme.Colour( clrMedium )); pTitle->SetBackgroundColour( theTheme.Colour( clrMedium ));
pTitle->SetForegroundColour( theTheme.Colour( clrTrackPanelText ) ); pTitle->SetForegroundColour( theTheme.Colour( clrTrackPanelText ) );
pSizer->Add( pTitle,0, wxALIGN_CENTER_VERTICAL | wxRIGHT, (Title.length() == 1 ) ? 0:5); pSizer->Add( pTitle,0, wxALIGN_CENTER_VERTICAL | wxRIGHT, (translated.length() == 1 ) ? 0:5);
return pTitle; return pTitle;
} }
@@ -212,12 +214,12 @@ void SelectionBar::Populate()
// Top row (mostly labels) // Top row (mostly labels)
wxColour clrText = theTheme.Colour( clrTrackPanelText ); wxColour clrText = theTheme.Colour( clrTrackPanelText );
wxColour clrText2 = *wxBLUE; wxColour clrText2 = *wxBLUE;
AddTitle( _("Project Rate (Hz)"), mainSizer ); AddTitle( XO("Project Rate (Hz)"), mainSizer );
AddVLine( mainSizer ); AddVLine( mainSizer );
AddTitle( _("Snap-To"), mainSizer ); AddTitle( XO("Snap-To"), mainSizer );
AddVLine( mainSizer ); AddVLine( mainSizer );
#ifdef TIME_IN_SELECT_TOOLBAR #ifdef TIME_IN_SELECT_TOOLBAR
AddTitle( _("Audio Position"), mainSizer ); AddTitle( XO("Audio Position"), mainSizer );
AddVLine( mainSizer ); AddVLine( mainSizer );
#endif #endif

View File

@@ -66,7 +66,7 @@ class SelectionBar final : public ToolBar {
void RegenerateTooltips() override; void RegenerateTooltips() override;
private: private:
auStaticText * AddTitle( const wxString & Title, auStaticText * AddTitle( const TranslatableString & Title,
wxSizer * pSizer ); wxSizer * pSizer );
NumericTextCtrl * AddTime( const TranslatableString &Name, int id, wxSizer * pSizer ); NumericTextCtrl * AddTime( const TranslatableString &Name, int id, wxSizer * pSizer );
void AddVLine( wxSizer * pSizer ); void AddVLine( wxSizer * pSizer );

View File

@@ -357,7 +357,7 @@ namespace
shiftDown; shiftDown;
tip = tip =
_("Click and drag to move center selection frequency."); XO("Click and drag to move center selection frequency.");
#endif #endif

View File

@@ -28,10 +28,10 @@ Paul Licameli split from TrackPanel.cpp
#if defined(__WXMAC__) #if defined(__WXMAC__)
/* i18n-hint: Command names a modifier key on Macintosh keyboards */ /* i18n-hint: Command names a modifier key on Macintosh keyboards */
#define CTRL_CLICK _("Command+Click") #define CTRL_CLICK XO("Command+Click")
#else #else
/* i18n-hint: Ctrl names a modifier key on Windows or Linux keyboards */ /* i18n-hint: Ctrl names a modifier key on Windows or Linux keyboards */
#define CTRL_CLICK _("Ctrl+Click") #define CTRL_CLICK XO("Ctrl+Click")
#endif #endif
namespace { namespace {