From 4bfd8abc2b3616bf7e985595ce722bc8abc945c6 Mon Sep 17 00:00:00 2001 From: Paul Licameli Date: Thu, 8 Mar 2018 13:31:42 -0500 Subject: [PATCH] Fix more missed translations --- src/commands/CompareAudioCommand.h | 2 +- src/effects/Effect.cpp | 2 +- src/effects/EffectManager.cpp | 6 +++--- src/effects/EffectManager.h | 2 +- src/effects/vamp/VampEffect.cpp | 5 +++-- 5 files changed, 9 insertions(+), 8 deletions(-) diff --git a/src/commands/CompareAudioCommand.h b/src/commands/CompareAudioCommand.h index 039811f55..f724ff471 100644 --- a/src/commands/CompareAudioCommand.h +++ b/src/commands/CompareAudioCommand.h @@ -29,7 +29,7 @@ class CompareAudioCommand final : public AudacityCommand { public: // CommandDefinitionInterface overrides - wxString GetSymbol() override {return "Compare Audio";}; + wxString GetSymbol() override {return XO("Compare Audio");} wxString GetDescription() override {return _("Compares a range on two tracks.");}; bool DefineParams( ShuttleParams & S ) override; void PopulateOrExchange(ShuttleGui & S) override; diff --git a/src/effects/Effect.cpp b/src/effects/Effect.cpp index befe82e50..c8ec85b31 100644 --- a/src/effects/Effect.cpp +++ b/src/effects/Effect.cpp @@ -2905,7 +2905,7 @@ EffectUIHost::EffectUIHost(wxWindow *parent, EffectUIHost::EffectUIHost(wxWindow *parent, AudacityCommand *command, EffectUIClientInterface *client) -: wxDialogWrapper(parent, wxID_ANY, "Some Command"/*command->GetTranslatedName()*/, +: wxDialogWrapper(parent, wxID_ANY, _("Some Command") /*command->GetTranslatedName()*/, wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER | wxMINIMIZE_BOX | wxMAXIMIZE_BOX) { diff --git a/src/effects/EffectManager.cpp b/src/effects/EffectManager.cpp index 34246c757..dc1797e55 100644 --- a/src/effects/EffectManager.cpp +++ b/src/effects/EffectManager.cpp @@ -144,7 +144,7 @@ bool EffectManager::DoAudacityCommand(const PluginID & ID, wxString EffectManager::GetCommandName(const PluginID & ID) { - return PluginManager::Get().GetName(ID); + return GetCustomTranslation( PluginManager::Get().GetName(ID) ); } wxString EffectManager::GetEffectFamilyName(const PluginID & ID) @@ -865,7 +865,7 @@ Effect *EffectManager::GetEffect(const PluginID & ID) auto command = dynamic_cast(PluginManager::Get().GetInstance(ID)); if( !command ) AudacityMessageBox(wxString::Format(_("Attempting to initialize the following effect failed:\n\n%s\n\nMore information may be available in Help->Show Log"), - PluginManager::Get().GetName(ID)), + GetCommandName(ID)), _("Effect failed to initialize")); return NULL; @@ -921,7 +921,7 @@ AudacityCommand *EffectManager::GetAudacityCommand(const PluginID & ID) } */ AudacityMessageBox(wxString::Format(_("Attempting to initialize the following command failed:\n\n%s\n\nMore information may be available in Help->Show Log"), - PluginManager::Get().GetName(ID)), + GetCommandName(ID)), _("Command failed to initialize")); return NULL; diff --git a/src/effects/EffectManager.h b/src/effects/EffectManager.h index ac1a584f4..2b964c83f 100644 --- a/src/effects/EffectManager.h +++ b/src/effects/EffectManager.h @@ -90,7 +90,7 @@ public: bool shouldPrompt = true ); // Renamed from 'Effect' to 'Command' prior to moving out of this class. - wxString GetCommandName(const PluginID & ID); + wxString GetCommandName(const PluginID & ID); // translated wxString GetCommandIdentifier(const PluginID & ID); wxString GetCommandDescription(const PluginID & ID); wxString GetCommandUrl(const PluginID & ID); diff --git a/src/effects/vamp/VampEffect.cpp b/src/effects/vamp/VampEffect.cpp index 7c3dba096..6239cb7af 100644 --- a/src/effects/vamp/VampEffect.cpp +++ b/src/effects/vamp/VampEffect.cpp @@ -447,10 +447,11 @@ bool VampEffect::Process() } } + const auto effectName = GetCustomTranslation( GetName() ); addedTracks.push_back(AddAnalysisTrack( multiple - ? wxString::Format(_("%s: %s"), left->GetName(), GetName()) - : GetName() + ? wxString::Format( _("%s: %s"), left->GetName(), effectName ) + : effectName )); LabelTrack *ltrack = addedTracks.back()->get();