mirror of
https://github.com/cookiengineer/audacity
synced 2025-07-31 16:09:28 +02:00
Construct MenuItem with untranslated label, so it can be static...
... and other storage of TranslatableString instead of naked wxString, for management of menu items, in CommandManager
This commit is contained in:
parent
aac50ae36e
commit
a8de4d9e50
@ -116,7 +116,7 @@ void GroupItem::AppendOne( BaseItemPtr&& ptr )
|
||||
}
|
||||
GroupItem::~GroupItem() {}
|
||||
|
||||
MenuItem::MenuItem( const wxString &title_, BaseItemPtrs &&items_ )
|
||||
MenuItem::MenuItem( const TranslatableString &title_, BaseItemPtrs &&items_ )
|
||||
: GroupItem{ std::move( items_ ) }, title{ title_ }
|
||||
{
|
||||
wxASSERT( !title.empty() );
|
||||
|
@ -112,7 +112,7 @@ CommandManager. It holds the callback for one command.
|
||||
#define MAX_SUBMENU_LEN 1000
|
||||
#endif
|
||||
|
||||
#define COMMAND _("Command")
|
||||
#define COMMAND XO("Command")
|
||||
|
||||
|
||||
NonKeystrokeInterceptingWindow::~NonKeystrokeInterceptingWindow()
|
||||
@ -133,17 +133,11 @@ MenuBarListEntry::~MenuBarListEntry()
|
||||
}
|
||||
|
||||
SubMenuListEntry::SubMenuListEntry(
|
||||
const wxString &name_, std::unique_ptr<wxMenu> &&menu_ )
|
||||
const TranslatableString &name_, std::unique_ptr<wxMenu> menu_ )
|
||||
: name(name_), menu( std::move(menu_) )
|
||||
{
|
||||
}
|
||||
|
||||
SubMenuListEntry::SubMenuListEntry(SubMenuListEntry &&that)
|
||||
: name(std::move(that.name))
|
||||
, menu(std::move(that.menu))
|
||||
{
|
||||
}
|
||||
|
||||
SubMenuListEntry::~SubMenuListEntry()
|
||||
{
|
||||
}
|
||||
@ -371,7 +365,7 @@ void CommandManager::PopMenuBar()
|
||||
///
|
||||
/// This starts a NEW menu
|
||||
///
|
||||
wxMenu *CommandManager::BeginMenu(const wxString & tName)
|
||||
wxMenu *CommandManager::BeginMenu(const TranslatableString & tName)
|
||||
{
|
||||
if ( mCurrentMenu )
|
||||
return BeginSubMenu( tName );
|
||||
@ -396,7 +390,7 @@ void CommandManager::EndMenu()
|
||||
///
|
||||
/// This starts a NEW menu
|
||||
///
|
||||
wxMenu *CommandManager::BeginMainMenu(const wxString & tName)
|
||||
wxMenu *CommandManager::BeginMainMenu(const TranslatableString & tName)
|
||||
{
|
||||
uCurrentMenu = std::make_unique<wxMenu>();
|
||||
mCurrentMenu = uCurrentMenu.get();
|
||||
@ -414,7 +408,8 @@ void CommandManager::EndMainMenu()
|
||||
// added to the menu to allow OSX to rearrange special menu
|
||||
// items like Preferences, About, and Quit.
|
||||
wxASSERT(uCurrentMenu);
|
||||
CurrentMenuBar()->Append(uCurrentMenu.release(), mCurrentMenuName);
|
||||
CurrentMenuBar()->Append(
|
||||
uCurrentMenu.release(), mCurrentMenuName.Translation());
|
||||
mCurrentMenu = nullptr;
|
||||
mCurrentMenuName = COMMAND;
|
||||
}
|
||||
@ -423,7 +418,7 @@ void CommandManager::EndMainMenu()
|
||||
///
|
||||
/// This starts a NEW submenu, and names it according to
|
||||
/// the function's argument.
|
||||
wxMenu* CommandManager::BeginSubMenu(const wxString & tName)
|
||||
wxMenu* CommandManager::BeginSubMenu(const TranslatableString & tName)
|
||||
{
|
||||
mSubMenuList.push_back
|
||||
(std::make_unique< SubMenuListEntry > ( tName, std::make_unique<wxMenu>() ));
|
||||
@ -445,8 +440,9 @@ void CommandManager::EndSubMenu()
|
||||
mSubMenuList.pop_back();
|
||||
|
||||
//Add the submenu to the current menu
|
||||
CurrentMenu()->Append
|
||||
(0, tmpSubMenu.name, tmpSubMenu.menu.release(), tmpSubMenu.name);
|
||||
auto name = tmpSubMenu.name.Translation();
|
||||
CurrentMenu()->Append(0, name, tmpSubMenu.menu.release(),
|
||||
name /* help string */ );
|
||||
mbSeparatorAllowed = true;
|
||||
}
|
||||
|
||||
@ -656,7 +652,7 @@ CommandListEntry *CommandManager::NewIdentifier(const CommandID & nameIn,
|
||||
{
|
||||
auto entry = std::make_unique<CommandListEntry>();
|
||||
|
||||
wxString labelPrefix;
|
||||
TranslatableString labelPrefix;
|
||||
if (!mSubMenuList.empty()) {
|
||||
labelPrefix = mSubMenuList.back()->name;
|
||||
}
|
||||
@ -699,7 +695,7 @@ CommandListEntry *CommandManager::NewIdentifier(const CommandID & nameIn,
|
||||
entry->key = NormalizedKeyString{ accel.BeforeFirst(wxT('\t')) };
|
||||
entry->defaultKey = entry->key;
|
||||
entry->labelPrefix = labelPrefix;
|
||||
entry->labelTop = wxMenuItem::GetLabelText(mCurrentMenuName);
|
||||
entry->labelTop = wxMenuItem::GetLabelText(mCurrentMenuName.Translation());
|
||||
entry->menu = menu;
|
||||
entry->finder = finder;
|
||||
entry->callback = callback;
|
||||
@ -1203,7 +1199,7 @@ CommandManager::HandleTextualCommand(const CommandID & Str,
|
||||
// PRL: uh oh, mixing internal string (Str) with user-visible
|
||||
// (labelPrefix, which was initialized from a user-visible
|
||||
// sub-menu name)
|
||||
Str == entry->labelPrefix )
|
||||
Str == entry->labelPrefix.Translation() )
|
||||
{
|
||||
return HandleCommandEntry( entry.get(), flags, alwaysEnabled)
|
||||
? CommandSuccess : CommandFailure;
|
||||
@ -1292,7 +1288,7 @@ void CommandManager::GetAllCommandData(
|
||||
wxArrayString &labels,
|
||||
wxArrayString &categories,
|
||||
#if defined(EXPERIMENTAL_KEY_VIEW)
|
||||
wxArrayString &prefixes,
|
||||
TranslatableStrings &prefixes,
|
||||
#endif
|
||||
bool includeMultis)
|
||||
{
|
||||
@ -1352,11 +1348,11 @@ wxString CommandManager::GetPrefixedLabelFromName(const CommandID &name)
|
||||
#if defined(EXPERIMENTAL_KEY_VIEW)
|
||||
wxString prefix;
|
||||
if (!entry->labelPrefix.empty()) {
|
||||
prefix = entry->labelPrefix + wxT(" - ");
|
||||
prefix = entry->labelPrefix.Translation() + wxT(" - ");
|
||||
}
|
||||
return wxMenuItem::GetLabelText(prefix + entry->label);
|
||||
#else
|
||||
return wxString(entry->labelPrefix + wxT(" ") + entry->label).Trim(false).Trim(true);
|
||||
return wxString(entry->labelPrefix.Translation() + wxT(" ") + entry->label).Trim(false).Trim(true);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -48,11 +48,11 @@ struct MenuBarListEntry
|
||||
|
||||
struct SubMenuListEntry
|
||||
{
|
||||
SubMenuListEntry(const wxString &name_, std::unique_ptr<wxMenu> &&menu_);
|
||||
SubMenuListEntry(SubMenuListEntry &&that);
|
||||
SubMenuListEntry(const TranslatableString &name_, std::unique_ptr<wxMenu> menu_);
|
||||
SubMenuListEntry( SubMenuListEntry&& ) = default;
|
||||
~SubMenuListEntry();
|
||||
|
||||
wxString name;
|
||||
TranslatableString name;
|
||||
std::unique_ptr<wxMenu> menu;
|
||||
};
|
||||
|
||||
@ -64,7 +64,7 @@ struct CommandListEntry
|
||||
NormalizedKeyString key;
|
||||
NormalizedKeyString defaultKey;
|
||||
wxString label;
|
||||
wxString labelPrefix;
|
||||
TranslatableString labelPrefix;
|
||||
wxString labelTop;
|
||||
wxMenu *menu;
|
||||
CommandHandlerFinder finder;
|
||||
@ -136,7 +136,7 @@ class AUDACITY_DLL_API CommandManager final
|
||||
|
||||
// You may either called SetCurrentMenu later followed by ClearCurrentMenu,
|
||||
// or else BeginMenu followed by EndMenu. Don't mix them.
|
||||
wxMenu *BeginMenu(const wxString & tName);
|
||||
wxMenu *BeginMenu(const TranslatableString & tName);
|
||||
void EndMenu();
|
||||
|
||||
// For specifying unusual arguments in AddItem
|
||||
@ -259,7 +259,7 @@ class AUDACITY_DLL_API CommandManager final
|
||||
std::vector<NormalizedKeyString> &default_keys,
|
||||
wxArrayString &labels, wxArrayString &categories,
|
||||
#if defined(EXPERIMENTAL_KEY_VIEW)
|
||||
wxArrayString &prefixes,
|
||||
TranslatableStrings &prefixes,
|
||||
#endif
|
||||
bool includeMultis);
|
||||
|
||||
@ -332,9 +332,9 @@ private:
|
||||
//
|
||||
|
||||
void Enable(CommandListEntry *entry, bool enabled);
|
||||
wxMenu *BeginMainMenu(const wxString & tName);
|
||||
wxMenu *BeginMainMenu(const TranslatableString & tName);
|
||||
void EndMainMenu();
|
||||
wxMenu* BeginSubMenu(const wxString & tName);
|
||||
wxMenu* BeginSubMenu(const TranslatableString & tName);
|
||||
void EndSubMenu();
|
||||
|
||||
//
|
||||
@ -374,7 +374,7 @@ private:
|
||||
|
||||
bool mbSeparatorAllowed; // false at the start of a menu and immediately after a separator.
|
||||
|
||||
wxString mCurrentMenuName;
|
||||
TranslatableString mCurrentMenuName;
|
||||
std::unique_ptr<wxMenu> uCurrentMenu;
|
||||
wxMenu *mCurrentMenu {};
|
||||
|
||||
@ -456,16 +456,17 @@ namespace MenuTable {
|
||||
|
||||
struct MenuItem final : GroupItem {
|
||||
// Construction from a previously built-up vector of pointers
|
||||
MenuItem( const wxString &title_, BaseItemPtrs &&items_ );
|
||||
MenuItem( const TranslatableString &title_, BaseItemPtrs &&items_ );
|
||||
// In-line, variadic constructor that doesn't require building a vector
|
||||
template< typename... Args >
|
||||
MenuItem( const wxString &title_, Args&&... args )
|
||||
MenuItem(
|
||||
const TranslatableString &title_, Args&&... args )
|
||||
: GroupItem{ std::forward<Args>(args)... }
|
||||
, title{ title_ }
|
||||
{}
|
||||
~MenuItem() override;
|
||||
|
||||
wxString title; // translated
|
||||
TranslatableString title;
|
||||
};
|
||||
|
||||
struct ConditionalGroupItem final : GroupItem {
|
||||
@ -552,11 +553,11 @@ namespace MenuTable {
|
||||
// Items will appear in a main toolbar menu or in a sub-menu
|
||||
template< typename... Args >
|
||||
inline BaseItemPtr Menu(
|
||||
const wxString &title, Args&&... args )
|
||||
const TranslatableString &title, Args&&... args )
|
||||
{ return std::make_unique<MenuItem>(
|
||||
title, std::forward<Args>(args)... ); }
|
||||
inline BaseItemPtr Menu(
|
||||
const wxString &title, BaseItemPtrs &&items )
|
||||
const TranslatableString &title, BaseItemPtrs &&items )
|
||||
{ return std::make_unique<MenuItem>( title, std::move( items ) ); }
|
||||
|
||||
// Conditional group items can be constructed two ways, as for group items
|
||||
@ -575,12 +576,12 @@ namespace MenuTable {
|
||||
// of the title
|
||||
template< typename... Args >
|
||||
inline BaseItemPtr MenuOrItems(
|
||||
const wxString &title, Args&&... args )
|
||||
const TranslatableString &title, Args&&... args )
|
||||
{ if ( title.empty() ) return Items( std::forward<Args>(args)... );
|
||||
else return std::make_unique<MenuItem>(
|
||||
title, std::forward<Args>(args)... ); }
|
||||
inline BaseItemPtr MenuOrItems(
|
||||
const wxString &title, BaseItemPtrs &&items )
|
||||
const TranslatableString &title, BaseItemPtrs &&items )
|
||||
{ if ( title.empty() ) return Items( std::move( items ) );
|
||||
else return std::make_unique<MenuItem>( title, std::move( items ) ); }
|
||||
|
||||
|
@ -828,7 +828,7 @@ MenuTable::BaseItemPtr ClipSelectMenu( AudacityProject& )
|
||||
using namespace MenuTable;
|
||||
using Options = CommandManager::Options;
|
||||
|
||||
return Menu( _("Clip B&oundaries"),
|
||||
return Menu( XO("Clip B&oundaries"),
|
||||
Command( wxT("SelPrevClipBoundaryToCursor"),
|
||||
XXO("Pre&vious Clip Boundary to Cursor"),
|
||||
FN(OnSelectPrevClipBoundaryToCursor),
|
||||
|
@ -1057,7 +1057,7 @@ MenuTable::BaseItemPtr EditMenu( AudacityProject & )
|
||||
#endif
|
||||
;
|
||||
|
||||
return Menu( _("&Edit"),
|
||||
return Menu( XO("&Edit"),
|
||||
Command( wxT("Undo"), XXO("&Undo"), FN(OnUndo),
|
||||
AudioIONotBusyFlag | UndoAvailableFlag, wxT("Ctrl+Z") ),
|
||||
|
||||
@ -1091,7 +1091,7 @@ MenuTable::BaseItemPtr EditMenu( AudacityProject & )
|
||||
|
||||
Separator(),
|
||||
|
||||
Menu( _("R&emove Special"),
|
||||
Menu( XO("R&emove Special"),
|
||||
/* i18n-hint: (verb) Do a special kind of cut*/
|
||||
Command( wxT("SplitCut"), XXO("Spl&it Cut"), FN(OnSplitCut),
|
||||
NotBusyTimeAndTracksFlags,
|
||||
@ -1117,7 +1117,7 @@ MenuTable::BaseItemPtr EditMenu( AudacityProject & )
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
Menu( _("Clip B&oundaries"),
|
||||
Menu( XO("Clip B&oundaries"),
|
||||
/* i18n-hint: (verb) It's an item on a menu. */
|
||||
Command( wxT("Split"), XXO("Sp&lit"), FN(OnSplit),
|
||||
AudioIONotBusyFlag | WaveTracksSelectedFlag,
|
||||
@ -1159,7 +1159,7 @@ MenuTable::BaseItemPtr ExtraEditMenu( AudacityProject & )
|
||||
using Options = CommandManager::Options;
|
||||
static const auto flags =
|
||||
AudioIONotBusyFlag | TracksSelectedFlag | TimeSelectedFlag;
|
||||
return Menu( _("&Edit"),
|
||||
return Menu( XO("&Edit"),
|
||||
Command( wxT("DeleteKey"), XXO("&Delete Key"), FN(OnDelete),
|
||||
(flags | NoAutoSelect),
|
||||
wxT("Backspace") ),
|
||||
|
@ -187,13 +187,13 @@ MenuTable::BaseItemPtr ExtraMenu( AudacityProject & )
|
||||
[]{ return gPrefs->ReadBool(wxT("/GUI/ShowExtraMenus"), false); };
|
||||
static const auto factory =
|
||||
[](AudacityProject &){ return extraItems; };
|
||||
return ConditionalItems( pred, Menu( _("Ext&ra"), factory ) );
|
||||
return ConditionalItems( pred, Menu( XO("Ext&ra"), factory ) );
|
||||
}
|
||||
|
||||
MenuTable::BaseItemPtr ExtraMixerMenu( AudacityProject & )
|
||||
{
|
||||
using namespace MenuTable;
|
||||
return Menu( _("Mi&xer"),
|
||||
return Menu( XO("Mi&xer"),
|
||||
Command( wxT("OutputGain"), XXO("Ad&just Playback Volume..."),
|
||||
FN(OnOutputGain), AlwaysEnabledFlag ),
|
||||
Command( wxT("OutputGainInc"), XXO("&Increase Playback Volume"),
|
||||
@ -212,7 +212,7 @@ MenuTable::BaseItemPtr ExtraMixerMenu( AudacityProject & )
|
||||
MenuTable::BaseItemPtr ExtraDeviceMenu( AudacityProject & )
|
||||
{
|
||||
using namespace MenuTable;
|
||||
return Menu( _("De&vice"),
|
||||
return Menu( XO("De&vice"),
|
||||
Command( wxT("InputDevice"), XXO("Change &Recording Device..."),
|
||||
FN(OnInputDevice),
|
||||
AudioIONotBusyFlag, wxT("Shift+I") ),
|
||||
|
@ -551,7 +551,7 @@ MenuTable::BaseItemPtr FileMenu( AudacityProject& )
|
||||
using namespace MenuTable;
|
||||
using Options = CommandManager::Options;
|
||||
|
||||
return Menu( _("&File"),
|
||||
return Menu( XO("&File"),
|
||||
/*i18n-hint: "New" is an action (verb) to create a NEW project*/
|
||||
Command( wxT("New"), XXO("&New"), FN(OnNew),
|
||||
AudioIONotBusyFlag, wxT("Ctrl+N") ),
|
||||
@ -574,10 +574,10 @@ MenuTable::BaseItemPtr FileMenu( AudacityProject& )
|
||||
Menu(
|
||||
#ifdef __WXMAC__
|
||||
/* i18n-hint: This is the name of the menu item on Mac OS X only */
|
||||
_("Open Recent")
|
||||
XO("Open Recent")
|
||||
#else
|
||||
/* i18n-hint: This is the name of the menu item on Windows and Linux */
|
||||
_("Recent &Files")
|
||||
XO("Recent &Files")
|
||||
#endif
|
||||
,
|
||||
Special( [](AudacityProject &, wxMenu &theMenu){
|
||||
@ -609,7 +609,7 @@ MenuTable::BaseItemPtr FileMenu( AudacityProject& )
|
||||
|
||||
Separator(),
|
||||
|
||||
Menu( _("&Save Project"),
|
||||
Menu( XO("&Save Project"),
|
||||
Command( wxT("Save"), XXO("&Save Project"), FN(OnSave),
|
||||
AudioIONotBusyFlag | UnsavedChangesFlag, wxT("Ctrl+S") ),
|
||||
Command( wxT("SaveAs"), XXO("Save Project &As..."), FN(OnSaveAs),
|
||||
@ -627,7 +627,7 @@ MenuTable::BaseItemPtr FileMenu( AudacityProject& )
|
||||
|
||||
Separator(),
|
||||
|
||||
Menu( _("&Export"),
|
||||
Menu( XO("&Export"),
|
||||
// Enable Export audio commands only when there are audio tracks.
|
||||
Command( wxT("ExportMp3"), XXO("Export as MP&3"), FN(OnExportMp3),
|
||||
AudioIONotBusyFlag | WaveTracksExistFlag ),
|
||||
@ -661,7 +661,7 @@ MenuTable::BaseItemPtr FileMenu( AudacityProject& )
|
||||
#endif
|
||||
),
|
||||
|
||||
Menu( _("&Import"),
|
||||
Menu( XO("&Import"),
|
||||
Command( wxT("ImportAudio"), XXO("&Audio..."), FN(OnImport),
|
||||
AudioIONotBusyFlag, wxT("Ctrl+Shift+I") ),
|
||||
Command( wxT("ImportLabels"), XXO("&Labels..."), FN(OnImportLabels),
|
||||
|
@ -420,7 +420,7 @@ MenuTable::BaseItemPtr HelpMenu( AudacityProject & )
|
||||
|
||||
using namespace MenuTable;
|
||||
|
||||
return Menu( _("&Help"),
|
||||
return Menu( XO("&Help"),
|
||||
// QuickFix menu item not in Audacity 2.3.1 whilst we discuss further.
|
||||
#ifdef EXPERIMENTAL_DA
|
||||
// DA: Has QuickFix menu item.
|
||||
@ -439,7 +439,7 @@ MenuTable::BaseItemPtr HelpMenu( AudacityProject & )
|
||||
|
||||
Separator(),
|
||||
|
||||
Menu( _("&Diagnostics"),
|
||||
Menu( XO("&Diagnostics"),
|
||||
Command( wxT("DeviceInfo"), XXO("Au&dio Device Info..."),
|
||||
FN(OnAudioDeviceInfo),
|
||||
AudioIONotBusyFlag ),
|
||||
|
@ -576,7 +576,7 @@ MenuTable::BaseItemPtr LabelEditMenus( AudacityProject & )
|
||||
|
||||
return Items(
|
||||
|
||||
Menu( _("&Labels"),
|
||||
Menu( XO("&Labels"),
|
||||
Command( wxT("EditLabels"), XXO("&Edit Labels..."), FN(OnEditLabels),
|
||||
AudioIONotBusyFlag ),
|
||||
|
||||
@ -606,7 +606,7 @@ MenuTable::BaseItemPtr LabelEditMenus( AudacityProject & )
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
Menu( _("La&beled Audio"),
|
||||
Menu( XO("La&beled Audio"),
|
||||
/* i18n-hint: (verb)*/
|
||||
Command( wxT("CutLabels"), XXO("&Cut"), FN(OnCutLabels),
|
||||
AudioIONotBusyFlag | LabelsSelectedFlag | WaveTracksExistFlag |
|
||||
|
@ -576,7 +576,7 @@ MenuTable::BaseItemPtr ExtraFocusMenu( AudacityProject & )
|
||||
using namespace MenuTable;
|
||||
static const auto FocusedTracksFlags = TracksExistFlag | TrackPanelHasFocus;
|
||||
|
||||
return Menu( _("F&ocus"),
|
||||
return Menu( XO("F&ocus"),
|
||||
Command( wxT("PrevFrame"),
|
||||
XXO("Move &Backward from Toolbars to Tracks"), FN(OnPrevFrame),
|
||||
AlwaysEnabledFlag, wxT("Ctrl+Shift+F6") ),
|
||||
|
@ -181,7 +181,7 @@ bool CompareEffectsByType(const PluginDescriptor *a, const PluginDescriptor *b)
|
||||
// Forward-declared function has its definition below with OnEffect in view
|
||||
void AddEffectMenuItemGroup(
|
||||
MenuTable::BaseItemPtrs &table,
|
||||
const wxArrayString & names,
|
||||
const TranslatableStrings & names,
|
||||
const PluginIDs & plugs,
|
||||
const std::vector<CommandFlag> & flags,
|
||||
bool isDefault);
|
||||
@ -212,37 +212,37 @@ void AddEffectMenuItems(
|
||||
return batchflags;
|
||||
};
|
||||
|
||||
wxArrayString groupNames;
|
||||
TranslatableStrings groupNames;
|
||||
PluginIDs groupPlugs;
|
||||
std::vector<CommandFlag> groupFlags;
|
||||
if (grouped)
|
||||
{
|
||||
wxString last;
|
||||
wxString current;
|
||||
TranslatableString last;
|
||||
TranslatableString current;
|
||||
|
||||
for (size_t i = 0; i < pluginCnt; i++)
|
||||
{
|
||||
const PluginDescriptor *plug = plugs[i];
|
||||
|
||||
auto name = plug->GetSymbol().Translation();
|
||||
auto name = plug->GetSymbol().Msgid();
|
||||
|
||||
if (plug->IsEffectInteractive())
|
||||
name += _("...");
|
||||
name += XO("...");
|
||||
|
||||
if (groupBy == wxT("groupby:publisher"))
|
||||
{
|
||||
current = EffectManager::Get().GetVendorName(plug->GetID()).Translation();
|
||||
current = EffectManager::Get().GetVendorName(plug->GetID());
|
||||
if (current.empty())
|
||||
{
|
||||
current = _("Unknown");
|
||||
current = XO("Unknown");
|
||||
}
|
||||
}
|
||||
else if (groupBy == wxT("groupby:type"))
|
||||
{
|
||||
current = EffectManager::Get().GetEffectFamilyName(plug->GetID()).Translation();
|
||||
current = EffectManager::Get().GetEffectFamilyName(plug->GetID());
|
||||
if (current.empty())
|
||||
{
|
||||
current = _("Unknown");
|
||||
current = XO("Unknown");
|
||||
}
|
||||
}
|
||||
|
||||
@ -257,7 +257,7 @@ void AddEffectMenuItems(
|
||||
groupPlugs, groupFlags, isDefault);
|
||||
|
||||
table.push_back( MenuOrItems(
|
||||
( bInSubmenu ? last : wxString{} ), std::move( temp )
|
||||
( bInSubmenu ? last : TranslatableString{} ), std::move( temp )
|
||||
) );
|
||||
|
||||
groupNames.clear();
|
||||
@ -266,7 +266,7 @@ void AddEffectMenuItems(
|
||||
last = current;
|
||||
}
|
||||
|
||||
groupNames.push_back(name);
|
||||
groupNames.push_back( name );
|
||||
groupPlugs.push_back(plug->GetID());
|
||||
groupFlags.push_back(
|
||||
plug->IsEffectRealtime() ? realflags : getBatchFlags( plug ) );
|
||||
@ -282,7 +282,7 @@ void AddEffectMenuItems(
|
||||
groupNames, groupPlugs, groupFlags, isDefault);
|
||||
|
||||
table.push_back( MenuOrItems(
|
||||
( bInSubmenu ? current : wxString{} ), std::move( temp )
|
||||
( bInSubmenu ? current : TranslatableString{} ), std::move( temp )
|
||||
) );
|
||||
}
|
||||
}
|
||||
@ -292,31 +292,32 @@ void AddEffectMenuItems(
|
||||
{
|
||||
const PluginDescriptor *plug = plugs[i];
|
||||
|
||||
auto name = plug->GetSymbol().Translation();
|
||||
auto name = plug->GetSymbol().Msgid();
|
||||
|
||||
if (plug->IsEffectInteractive())
|
||||
name += _("...");
|
||||
name += XO("...");
|
||||
|
||||
wxString group;
|
||||
TranslatableString group;
|
||||
if (groupBy == wxT("sortby:publisher:name"))
|
||||
{
|
||||
group = EffectManager::Get().GetVendorName(plug->GetID()).Translation();
|
||||
group = EffectManager::Get().GetVendorName(plug->GetID());
|
||||
}
|
||||
else if (groupBy == wxT("sortby:type:name"))
|
||||
{
|
||||
group = EffectManager::Get().GetEffectFamilyName(plug->GetID()).Translation();
|
||||
group = EffectManager::Get().GetEffectFamilyName(plug->GetID());
|
||||
}
|
||||
|
||||
if (plug->IsEffectDefault())
|
||||
{
|
||||
group = wxEmptyString;
|
||||
group = {};
|
||||
}
|
||||
|
||||
groupNames.push_back(
|
||||
group.empty()
|
||||
? name
|
||||
: wxString::Format(_("%s: %s"), group, name)
|
||||
: XO("%s: %s").Format( group, name )
|
||||
);
|
||||
|
||||
groupPlugs.push_back(plug->GetID());
|
||||
groupFlags.push_back(
|
||||
plug->IsEffectRealtime() ? realflags : getBatchFlags( plug ) );
|
||||
@ -589,7 +590,7 @@ namespace {
|
||||
|
||||
void AddEffectMenuItemGroup(
|
||||
MenuTable::BaseItemPtrs &table,
|
||||
const wxArrayString & names,
|
||||
const TranslatableStrings & names,
|
||||
const PluginIDs & plugs,
|
||||
const std::vector<CommandFlag> & flags,
|
||||
bool isDefault)
|
||||
@ -671,8 +672,8 @@ void AddEffectMenuItemGroup(
|
||||
const PluginDescriptor *plug =
|
||||
PluginManager::Get().GetPlugin(plugs[i]);
|
||||
if( plug->GetPluginType() == PluginTypeEffect )
|
||||
pTable->push_back( Command( names[i],
|
||||
TranslatableString{ names[i] },
|
||||
pTable->push_back( Command( names[i].MSGID(),
|
||||
names[i],
|
||||
FN(OnEffect),
|
||||
flags[i],
|
||||
CommandManager::Options{}
|
||||
@ -693,7 +694,7 @@ void AddEffectMenuItemGroup(
|
||||
}
|
||||
// Done collecting
|
||||
table.push_back( Menu(
|
||||
wxString::Format(_("Plug-in %d to %d"), groupNdx + 1, end),
|
||||
XO("Plug-in %d to %d").Format( groupNdx + 1, end ),
|
||||
std::move( temp1 )
|
||||
) );
|
||||
items = max;
|
||||
@ -735,7 +736,7 @@ MenuTable::BaseItemPtr GenerateMenu( AudacityProject & )
|
||||
// All of this is a bit hacky until we can get more things connected into
|
||||
// the plugin manager...sorry! :-(
|
||||
|
||||
return Menu( _("&Generate"),
|
||||
return Menu( XO("&Generate"),
|
||||
#ifdef EXPERIMENTAL_EFFECT_MANAGEMENT
|
||||
Command( wxT("ManageGenerators"), XXO("Add / Remove Plug-ins..."),
|
||||
FN(OnManageGenerators), AudioIONotBusyFlag ),
|
||||
@ -772,7 +773,7 @@ MenuTable::BaseItemPtr EffectMenu( AudacityProject &project )
|
||||
else
|
||||
buildMenuLabel = XO("Repeat Last Effect");
|
||||
|
||||
return Menu( _("Effe&ct"),
|
||||
return Menu( XO("Effe&ct"),
|
||||
#ifdef EXPERIMENTAL_EFFECT_MANAGEMENT
|
||||
Command( wxT("ManageEffects"), XXO("Add / Remove Plug-ins..."),
|
||||
FN(OnManageEffects), AudioIONotBusyFlag ),
|
||||
@ -801,7 +802,7 @@ MenuTable::BaseItemPtr AnalyzeMenu( AudacityProject & )
|
||||
// All of this is a bit hacky until we can get more things connected into
|
||||
// the plugin manager...sorry! :-(
|
||||
|
||||
return Menu( _("&Analyze"),
|
||||
return Menu( XO("&Analyze"),
|
||||
#ifdef EXPERIMENTAL_EFFECT_MANAGEMENT
|
||||
Command( wxT("ManageAnalyzers"), XXO("Add / Remove Plug-ins..."),
|
||||
FN(OnManageAnalyzers), AudioIONotBusyFlag ),
|
||||
@ -829,7 +830,7 @@ MenuTable::BaseItemPtr ToolsMenu( AudacityProject & )
|
||||
using Options = CommandManager::Options;
|
||||
auto gAudioIO = AudioIO::Get();
|
||||
|
||||
return Menu( _("T&ools"),
|
||||
return Menu( XO("T&ools"),
|
||||
|
||||
#ifdef EXPERIMENTAL_EFFECT_MANAGEMENT
|
||||
Command( wxT("ManageTools"), XXO("Add / Remove Plug-ins..."),
|
||||
@ -842,7 +843,7 @@ MenuTable::BaseItemPtr ToolsMenu( AudacityProject & )
|
||||
Command( wxT("ManageMacros"), XXO("&Macros..."),
|
||||
FN(OnManageMacros), AudioIONotBusyFlag ),
|
||||
|
||||
Menu( _("&Apply Macro"),
|
||||
Menu( XO("&Apply Macro"),
|
||||
// Palette has no access key to ensure first letter navigation of
|
||||
// sub menu
|
||||
Command( wxT("ApplyMacrosPalette"), XXO("Palette..."),
|
||||
@ -899,7 +900,7 @@ MenuTable::BaseItemPtr ExtraScriptablesIMenu( AudacityProject & )
|
||||
|
||||
// These are the more useful to VI user Scriptables.
|
||||
// i18n-hint: Scriptables are commands normally used from Python, Perl etc.
|
||||
return Menu( _("Script&ables I"),
|
||||
return Menu( XO("Script&ables I"),
|
||||
// Note that the PLUGIN_SYMBOL must have a space between words,
|
||||
// whereas the short-form used here must not.
|
||||
// (So if you did write "CompareAudio" for the PLUGIN_SYMBOL name, then
|
||||
@ -944,7 +945,7 @@ MenuTable::BaseItemPtr ExtraScriptablesIIMenu( AudacityProject & )
|
||||
using namespace MenuTable;
|
||||
|
||||
// Less useful to VI users.
|
||||
return Menu( _("Scripta&bles II"),
|
||||
return Menu( XO("Scripta&bles II"),
|
||||
Command( wxT("Select"), XXO("Select..."), FN(OnAudacityCommand),
|
||||
AudioIONotBusyFlag ),
|
||||
Command( wxT("SetTrack"), XXO("Set Track..."), FN(OnAudacityCommand),
|
||||
|
@ -1034,7 +1034,7 @@ MenuTable::BaseItemPtr SelectMenu( AudacityProject& )
|
||||
using Options = CommandManager::Options;
|
||||
|
||||
/* i18n-hint: (verb) It's an item on a menu. */
|
||||
return Menu( _("&Select"),
|
||||
return Menu( XO("&Select"),
|
||||
Command( wxT("SelectAll"), XXO("&All"), FN(OnSelectAll),
|
||||
TracksExistFlag,
|
||||
Options{ wxT("Ctrl+A"), XO("Select All") } ),
|
||||
@ -1044,7 +1044,7 @@ MenuTable::BaseItemPtr SelectMenu( AudacityProject& )
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
Menu( _("&Tracks"),
|
||||
Menu( XO("&Tracks"),
|
||||
Command( wxT("SelAllTracks"), XXO("In All &Tracks"),
|
||||
FN(OnSelectAllTracks),
|
||||
TracksExistFlag,
|
||||
@ -1061,7 +1061,7 @@ MenuTable::BaseItemPtr SelectMenu( AudacityProject& )
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
Menu( _("R&egion"),
|
||||
Menu( XO("R&egion"),
|
||||
Command( wxT("SetLeftSelection"), XXO("&Left at Playback Position"),
|
||||
FN(OnSetLeftSelection), TracksExistFlag,
|
||||
Options{ wxT("["), XO("Set Selection Left at Play Position") } ),
|
||||
@ -1095,7 +1095,7 @@ MenuTable::BaseItemPtr SelectMenu( AudacityProject& )
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifdef EXPERIMENTAL_SPECTRAL_EDITING
|
||||
Menu( _("S&pectral"),
|
||||
Menu( XO("S&pectral"),
|
||||
Command( wxT("ToggleSpectralSelection"),
|
||||
XXO("To&ggle Spectral Selection"), FN(OnToggleSpectralSelection),
|
||||
TracksExistFlag, wxT("Q") ),
|
||||
@ -1138,7 +1138,7 @@ MenuTable::BaseItemPtr SelectMenu( AudacityProject& )
|
||||
MenuTable::BaseItemPtr ExtraSelectionMenu( AudacityProject & )
|
||||
{
|
||||
using namespace MenuTable;
|
||||
return Menu( _("&Selection"),
|
||||
return Menu( XO("&Selection"),
|
||||
Command( wxT("SnapToOff"), XXO("Snap-To &Off"), FN(OnSnapToOff),
|
||||
AlwaysEnabledFlag ),
|
||||
Command( wxT("SnapToNearest"), XXO("Snap-To &Nearest"),
|
||||
@ -1187,7 +1187,7 @@ MenuTable::BaseItemPtr CursorMenu( AudacityProject & )
|
||||
// GA: 'Skip to' moves the viewpoint to center of the track and preserves the
|
||||
// selection. 'Cursor to' does neither. 'Center at' might describe it better
|
||||
// than 'Skip'.
|
||||
return Menu( _("&Cursor to"),
|
||||
return Menu( XO("&Cursor to"),
|
||||
Command( wxT("CursSelStart"), XXO("Selection Star&t"),
|
||||
FN(OnCursorSelStart),
|
||||
TimeSelectedFlag,
|
||||
@ -1224,7 +1224,7 @@ MenuTable::BaseItemPtr ExtraCursorMenu( AudacityProject & )
|
||||
{
|
||||
using namespace MenuTable;
|
||||
|
||||
return Menu( _("&Cursor"),
|
||||
return Menu( XO("&Cursor"),
|
||||
Command( wxT("CursorLeft"), XXO("Cursor &Left"), FN(OnCursorLeft),
|
||||
TracksExistFlag | TrackPanelHasFocus,
|
||||
wxT("Left\twantKeyup\tallowDup") ),
|
||||
@ -1251,7 +1251,7 @@ MenuTable::BaseItemPtr ExtraCursorMenu( AudacityProject & )
|
||||
MenuTable::BaseItemPtr ExtraSeekMenu( AudacityProject & )
|
||||
{
|
||||
using namespace MenuTable;
|
||||
return Menu( _("See&k"),
|
||||
return Menu( XO("See&k"),
|
||||
Command( wxT("SeekLeftShort"), XXO("Short Seek &Left During Playback"),
|
||||
FN(OnSeekLeftShort), AudioIOBusyFlag, wxT("Left\tallowDup") ),
|
||||
Command( wxT("SeekRightShort"),
|
||||
|
@ -252,7 +252,7 @@ MenuTable::BaseItemPtr ToolbarsMenu( AudacityProject& )
|
||||
|
||||
static const auto checkOff = Options{}.CheckState( false );
|
||||
|
||||
return Menu( _("&Toolbars"),
|
||||
return Menu( XO("&Toolbars"),
|
||||
/* i18n-hint: (verb)*/
|
||||
Command( wxT("ResetToolbars"), XXO("Reset Toolb&ars"),
|
||||
FN(OnResetToolBars), AlwaysEnabledFlag ),
|
||||
@ -320,7 +320,7 @@ MenuTable::BaseItemPtr ToolbarsMenu( AudacityProject& )
|
||||
MenuTable::BaseItemPtr ExtraToolsMenu( AudacityProject & )
|
||||
{
|
||||
using namespace MenuTable;
|
||||
return Menu( _("T&ools"),
|
||||
return Menu( XO("T&ools"),
|
||||
Command( wxT("SelectTool"), XXO("&Selection Tool"), FN(OnSelectTool),
|
||||
AlwaysEnabledFlag, wxT("F1") ),
|
||||
Command( wxT("EnvelopeTool"), XXO("&Envelope Tool"),
|
||||
|
@ -1253,9 +1253,9 @@ MenuTable::BaseItemPtr TracksMenu( AudacityProject & )
|
||||
// Tracks Menu (formerly Project Menu)
|
||||
using namespace MenuTable;
|
||||
using Options = CommandManager::Options;
|
||||
|
||||
return Menu( _("&Tracks"),
|
||||
Menu( _("Add &New"),
|
||||
|
||||
return Menu( XO("&Tracks"),
|
||||
Menu( XO("Add &New"),
|
||||
Command( wxT("NewMonoTrack"), XXO("&Mono Track"), FN(OnNewWaveTrack),
|
||||
AudioIONotBusyFlag, wxT("Ctrl+Shift+N") ),
|
||||
Command( wxT("NewStereoTrack"), XXO("&Stereo Track"),
|
||||
@ -1270,7 +1270,7 @@ MenuTable::BaseItemPtr TracksMenu( AudacityProject & )
|
||||
|
||||
Separator(),
|
||||
|
||||
Menu( _("Mi&x"),
|
||||
Menu( XO("Mi&x"),
|
||||
// Stereo to Mono is an oddball command that is also subject to control
|
||||
// by the plug-in manager, as if an effect. Decide whether to show or
|
||||
// hide it.
|
||||
@ -1305,14 +1305,14 @@ MenuTable::BaseItemPtr TracksMenu( AudacityProject & )
|
||||
|
||||
Separator(),
|
||||
|
||||
Menu( _("M&ute/Unmute"),
|
||||
Menu( XO("M&ute/Unmute"),
|
||||
Command( wxT("MuteAllTracks"), XXO("&Mute All Tracks"),
|
||||
FN(OnMuteAllTracks), AudioIONotBusyFlag, wxT("Ctrl+U") ),
|
||||
Command( wxT("UnmuteAllTracks"), XXO("&Unmute All Tracks"),
|
||||
FN(OnUnmuteAllTracks), AudioIONotBusyFlag, wxT("Ctrl+Shift+U") )
|
||||
),
|
||||
|
||||
Menu( _("&Pan"),
|
||||
Menu( XO("&Pan"),
|
||||
// As Pan changes are not saved on Undo stack,
|
||||
// pan settings for all tracks
|
||||
// in the project could very easily be lost unless we
|
||||
@ -1332,7 +1332,7 @@ MenuTable::BaseItemPtr TracksMenu( AudacityProject & )
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
Menu( _("&Align Tracks"), //_("Just Move Tracks"),
|
||||
Menu( XO("&Align Tracks"), // XO("Just Move Tracks"),
|
||||
// Mutual alignment of tracks independent of selection or zero
|
||||
CommandGroup(wxT("Align"),
|
||||
{
|
||||
@ -1361,7 +1361,7 @@ MenuTable::BaseItemPtr TracksMenu( AudacityProject & )
|
||||
#if 0
|
||||
// TODO: Can these labels be made clearer?
|
||||
// Do we need this sub-menu at all?
|
||||
Menu( _("Move Sele&ction and Tracks"), {
|
||||
Menu( XO("Move Sele&ction and Tracks"), {
|
||||
CommandGroup(wxT("AlignMove"), alignLabels,
|
||||
FN(OnAlignMoveSel), AudioIONotBusyFlag | TracksSelectedFlag),
|
||||
} ),
|
||||
@ -1377,7 +1377,7 @@ MenuTable::BaseItemPtr TracksMenu( AudacityProject & )
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
Menu( _("S&ort Tracks"),
|
||||
Menu( XO("S&ort Tracks"),
|
||||
Command( wxT("SortByTime"), XXO("By &Start Time"), FN(OnSortTime),
|
||||
TracksExistFlag,
|
||||
Options{}.LongName( XO("Sort by Time") ) ),
|
||||
@ -1405,7 +1405,7 @@ MenuTable::BaseItemPtr ExtraTrackMenu( AudacityProject & )
|
||||
{
|
||||
using namespace MenuTable;
|
||||
|
||||
return Menu( _("&Track"),
|
||||
return Menu( XO("&Track"),
|
||||
Command( wxT("TrackPan"), XXO("Change P&an on Focused Track..."),
|
||||
FN(OnTrackPan),
|
||||
TrackPanelHasFocus | TracksExistFlag, wxT("Shift+P") ),
|
||||
|
@ -904,8 +904,8 @@ MenuTable::BaseItemPtr TransportMenu( AudacityProject &project )
|
||||
|
||||
/* i18n-hint: 'Transport' is the name given to the set of controls that
|
||||
play, record, pause etc. */
|
||||
return Menu( _("Tra&nsport"),
|
||||
Menu( _("Pl&aying"),
|
||||
return Menu( XO("Tra&nsport"),
|
||||
Menu( XO("Pl&aying"),
|
||||
/* i18n-hint: (verb) Start or Stop audio playback*/
|
||||
Command( wxT("PlayStop"), XXO("Pl&ay/Stop"), FN(OnPlayStop),
|
||||
CanStopAudioStreamFlag, wxT("Space") ),
|
||||
@ -917,7 +917,7 @@ MenuTable::BaseItemPtr TransportMenu( AudacityProject &project )
|
||||
CanStopAudioStreamFlag, wxT("P") )
|
||||
),
|
||||
|
||||
Menu( _("&Recording"),
|
||||
Menu( XO("&Recording"),
|
||||
/* i18n-hint: (verb)*/
|
||||
Command( wxT("Record1stChoice"), XXO("&Record"), FN(OnRecord),
|
||||
CanStopFlags, wxT("R") ),
|
||||
@ -961,7 +961,7 @@ MenuTable::BaseItemPtr TransportMenu( AudacityProject &project )
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
Menu( _("Pla&y Region"),
|
||||
Menu( XO("Pla&y Region"),
|
||||
Command( wxT("LockPlayRegion"), XXO("&Lock"), FN(OnLockPlayRegion),
|
||||
PlayRegionNotLockedFlag ),
|
||||
Command( wxT("UnlockPlayRegion"), XXO("&Unlock"),
|
||||
@ -973,7 +973,7 @@ MenuTable::BaseItemPtr TransportMenu( AudacityProject &project )
|
||||
Command( wxT("RescanDevices"), XXO("R&escan Audio Devices"),
|
||||
FN(OnRescanDevices), AudioIONotBusyFlag | CanStopAudioStreamFlag ),
|
||||
|
||||
Menu( _("Transport &Options"),
|
||||
Menu( XO("Transport &Options"),
|
||||
// Sound Activated recording options
|
||||
Command( wxT("SoundActivationLevel"),
|
||||
XXO("Sound Activation Le&vel..."), FN(OnSoundActivated),
|
||||
@ -1012,7 +1012,7 @@ MenuTable::BaseItemPtr TransportMenu( AudacityProject &project )
|
||||
MenuTable::BaseItemPtr ExtraTransportMenu( AudacityProject & )
|
||||
{
|
||||
using namespace MenuTable;
|
||||
return Menu( _("T&ransport"),
|
||||
return Menu( XO("T&ransport"),
|
||||
// PlayStop is already in the menus.
|
||||
/* i18n-hint: (verb) Start playing audio*/
|
||||
Command( wxT("Play"), XXO("Pl&ay"), FN(OnPlayStop),
|
||||
@ -1054,7 +1054,7 @@ MenuTable::BaseItemPtr ExtraTransportMenu( AudacityProject & )
|
||||
MenuTable::BaseItemPtr ExtraPlayAtSpeedMenu( AudacityProject & )
|
||||
{
|
||||
using namespace MenuTable;
|
||||
return Menu( _("&Play-at-Speed"),
|
||||
return Menu( XO("&Play-at-Speed"),
|
||||
/* i18n-hint: 'Normal Play-at-Speed' doesn't loop or cut preview. */
|
||||
Command( wxT("PlayAtSpeed"), XXO("Normal Pl&ay-at-Speed"),
|
||||
FN(OnPlayAtSpeed), CaptureNotBusyFlag ),
|
||||
|
@ -441,8 +441,8 @@ MenuTable::BaseItemPtr ViewMenu( AudacityProject& )
|
||||
|
||||
static const auto checkOff = Options{}.CheckState( false );
|
||||
|
||||
return Menu( _("&View"),
|
||||
Menu( _("&Zoom"),
|
||||
return Menu( XO("&View"),
|
||||
Menu( XO("&Zoom"),
|
||||
Command( wxT("ZoomIn"), XXO("Zoom &In"), FN(OnZoomIn),
|
||||
ZoomInAvailableFlag, wxT("Ctrl+1") ),
|
||||
Command( wxT("ZoomNormal"), XXO("Zoom &Normal"), FN(OnZoomNormal),
|
||||
@ -459,7 +459,7 @@ MenuTable::BaseItemPtr ViewMenu( AudacityProject& )
|
||||
Options{}.CheckState( gPrefs->Read(wxT("/GUI/VerticalZooming"), 0L) ) )
|
||||
),
|
||||
|
||||
Menu( _("T&rack Size"),
|
||||
Menu( XO("T&rack Size"),
|
||||
Command( wxT("FitInWindow"), XXO("&Fit to Width"), FN(OnZoomFit),
|
||||
TracksExistFlag, wxT("Ctrl+F") ),
|
||||
Command( wxT("FitV"), XXO("Fit to &Height"), FN(OnZoomFitV),
|
||||
@ -470,7 +470,7 @@ MenuTable::BaseItemPtr ViewMenu( AudacityProject& )
|
||||
FN(OnExpandAllTracks), TracksExistFlag, wxT("Ctrl+Shift+X") )
|
||||
),
|
||||
|
||||
Menu( _("Sk&ip to"),
|
||||
Menu( XO("Sk&ip to"),
|
||||
Command( wxT("SkipSelStart"), XXO("Selection Sta&rt"),
|
||||
FN(OnGoSelStart), TimeSelectedFlag,
|
||||
Options{ wxT("Ctrl+["), XO("Skip to Selection Start") } ),
|
||||
|
@ -125,7 +125,7 @@ MenuTable::BaseItemPtr WindowMenu( AudacityProject & )
|
||||
// poor imitation of the Mac Windows Menu
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
using namespace MenuTable;
|
||||
return Menu( _("&Window"),
|
||||
return Menu( XO("&Window"),
|
||||
/* i18n-hint: Standard Macintosh Window menu item: Make (the current
|
||||
* window) shrink to an icon on the dock */
|
||||
Command( wxT("MacMinimize"), XXO("&Minimize"), FN(OnMacMinimize),
|
||||
|
@ -309,7 +309,7 @@ void KeyConfigPrefs::RefreshBindings(bool bSort)
|
||||
{
|
||||
wxArrayString Labels;
|
||||
wxArrayString Categories;
|
||||
wxArrayString Prefixes;
|
||||
TranslatableStrings Prefixes;
|
||||
|
||||
mNames.clear();
|
||||
mKeys.clear();
|
||||
|
@ -1043,7 +1043,7 @@ MenuTable::BaseItemPtr Scrubber::Menu()
|
||||
) );
|
||||
}
|
||||
|
||||
return MenuTable::Menu( _("Scru&bbing"), std::move( ptrs ) );
|
||||
return MenuTable::Menu( XO("Scru&bbing"), std::move( ptrs ) );
|
||||
}
|
||||
|
||||
void Scrubber::PopulatePopupMenu(wxMenu &menu)
|
||||
|
@ -635,7 +635,7 @@ KeyView::UpdateHScroll()
|
||||
void
|
||||
KeyView::RefreshBindings(const CommandIDs & names,
|
||||
const wxArrayString & categories,
|
||||
const wxArrayString & prefixes,
|
||||
const TranslatableStrings & prefixes,
|
||||
const wxArrayString & labels,
|
||||
const std::vector<NormalizedKeyString> & keys,
|
||||
bool bSort
|
||||
@ -665,7 +665,7 @@ KeyView::RefreshBindings(const CommandIDs & names,
|
||||
|
||||
// Remove any menu code from the category and prefix
|
||||
wxString cat = wxMenuItem::GetLabelText(categories[i]);
|
||||
wxString pfx = wxMenuItem::GetLabelText(prefixes[i]);
|
||||
wxString pfx = wxMenuItem::GetLabelText(prefixes[i].Translation());
|
||||
|
||||
// Append "Menu" this node is for a menu title
|
||||
if (cat != wxT("Command"))
|
||||
|
@ -83,7 +83,7 @@ public:
|
||||
|
||||
void RefreshBindings(const CommandIDs & names,
|
||||
const wxArrayString & categories,
|
||||
const wxArrayString & prefixes,
|
||||
const TranslatableStrings & prefixes,
|
||||
const wxArrayString & labels,
|
||||
const std::vector<NormalizedKeyString> & keys,
|
||||
bool bSort);
|
||||
|
Loading…
x
Reference in New Issue
Block a user