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

Do not save translated strings to the plugin registry

This was causing problems in the menus when switching
languanges.
This commit is contained in:
Leland Lucius 2015-05-16 02:10:54 -05:00
parent c2d8aa9421
commit a5fb181c58
2 changed files with 18 additions and 18 deletions

View File

@ -1031,24 +1031,24 @@ const wxString & PluginDescriptor::GetSymbol() const
return mSymbol;
}
wxString PluginDescriptor::GetName() const
wxString PluginDescriptor::GetName(bool translate) const
{
return wxGetTranslation(mName);
return translate ? wxString(wxGetTranslation(mName)) : mName;
}
wxString PluginDescriptor::GetVersion() const
wxString PluginDescriptor::GetVersion(bool translate) const
{
return wxGetTranslation(mVersion);
return translate ? wxString(wxGetTranslation(mVersion)) : mVersion;
}
wxString PluginDescriptor::GetVendor() const
wxString PluginDescriptor::GetVendor(bool translate) const
{
return wxGetTranslation(mVendor);
return translate ? wxString(wxGetTranslation(mVendor)) : mVendor;
}
wxString PluginDescriptor::GetDescription() const
wxString PluginDescriptor::GetDescription(bool translate) const
{
return wxGetTranslation(mDescription);
return translate ? wxString(wxGetTranslation(mDescription)) : mDescription;
}
bool PluginDescriptor::IsEnabled() const
@ -1948,10 +1948,10 @@ void PluginManager::SaveGroup(PluginType type)
mRegistry->Write(KEY_PATH, plug.GetPath());
mRegistry->Write(KEY_SYMBOL, plug.GetSymbol());
mRegistry->Write(KEY_NAME, plug.GetName());
mRegistry->Write(KEY_VERSION, plug.GetVersion());
mRegistry->Write(KEY_VENDOR, plug.GetVendor());
mRegistry->Write(KEY_DESCRIPTION, plug.GetDescription());
mRegistry->Write(KEY_NAME, plug.GetName(false));
mRegistry->Write(KEY_VERSION, plug.GetVersion(false));
mRegistry->Write(KEY_VENDOR, plug.GetVendor(false));
mRegistry->Write(KEY_DESCRIPTION, plug.GetDescription(false));
mRegistry->Write(KEY_PROVIDERID, plug.GetProviderID());
mRegistry->Write(KEY_ENABLED, plug.IsEnabled());
mRegistry->Write(KEY_VALID, plug.IsValid());

View File

@ -55,16 +55,16 @@ public:
// All plugins
// These return untranslated strings
const wxString & GetID() const;
const wxString & GetProviderID() const;
const wxString & GetPath() const;
const wxString & GetSymbol() const;
// These return translated strings (if available)
const wxString & GetID() const;
wxString GetName() const;
wxString GetVersion() const;
wxString GetVendor() const;
wxString GetDescription() const;
// These return translated strings (if available and if requested)
wxString GetName(bool translate = true) const;
wxString GetVersion(bool translate = true) const;
wxString GetVendor(bool translate = true) const;
wxString GetDescription(bool translate = true) const;
bool IsEnabled() const;
bool IsValid() const;