1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-10-10 16:43:33 +02:00

TranslatableString for macro command category

This commit is contained in:
Paul Licameli
2019-12-18 00:54:08 -05:00
parent 89a3771730
commit a325247525
3 changed files with 8 additions and 6 deletions

View File

@@ -207,7 +207,8 @@ void MacroCommandDialog::OnItemSelected(wxListEvent &event)
// Later we can put help information there, perhaps.
// Macro command details are one place that we do expose Identifier
// to (more sophisticated) users
mDetails->SetValue( mInternalCommandName.GET() + "\r\n" + command.category );
mDetails->SetValue(
mInternalCommandName.GET() + "\r\n" + command.category.Translation() );
mParameters->SetValue(params);
}
@@ -249,7 +250,8 @@ void MacroCommandDialog::SetCommandAndParams(const CommandID &Command, const wxS
// using GET to expose a CommandID to the user!
// Macro command details are one place that we do expose Identifier
// to (more sophisticated) users
mDetails->SetValue( iter->name.Internal() + "\r\n" + iter->category );
mDetails->SetValue(
iter->name.Internal() + "\r\n" + iter->category.Translation() );
mChoices->SetItemState(iter - mCatalog.begin(),
wxLIST_STATE_SELECTED, wxLIST_STATE_SELECTED);

View File

@@ -295,7 +295,7 @@ MacroCommandsCatalog::MacroCommandsCatalog( const AudacityProject *project )
for( const auto &command : SpecialCommands )
commands.push_back( {
{ command.second, command.first },
_("Special Command")
XO("Special Command")
} );
// end CLEANSPEECH remnant
@@ -311,7 +311,7 @@ MacroCommandsCatalog::MacroCommandsCatalog( const AudacityProject *project )
commands.push_back( {
{ command, plug->GetSymbol().Msgid() },
plug->GetPluginType() == PluginTypeEffect ?
_("Effect") : _("Menu Command (With Parameters)")
XO("Effect") : XO("Menu Command (With Parameters)")
} );
plug = pm.GetNextPlugin(PluginTypeEffect|PluginTypeAudacityCommand);
}
@@ -367,7 +367,7 @@ MacroCommandsCatalog::MacroCommandsCatalog( const AudacityProject *project )
mNames[i], // Internal name.
label // User readable name
},
_("Menu Command (No Parameters)")
XO("Menu Command (No Parameters)")
}
);
}

View File

@@ -30,7 +30,7 @@ public:
// A triple of user-visible name, internal string identifier and type/help string.
struct Entry {
ComponentInterfaceSymbol name;
wxString category;
TranslatableString category;
};
using Entries = std::vector<Entry>;