1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-08-11 17:41:15 +02:00

Fixing some i18n issues with the plugin settings file

This commit is contained in:
Leland Lucius 2015-06-05 18:56:24 -05:00
parent 42249e74a2
commit 60f4ae1941
6 changed files with 20 additions and 20 deletions

View File

@ -479,8 +479,8 @@ PluginRegistrationDialog::PluginRegistrationDialog(wxWindow *parent, EffectType
{ {
mType = type; mType = type;
mEffects = NULL; mEffects = NULL;
SetLabel(_("Register Effects")); // Provide visual label SetLabel(_("Plugin Manager: Effects")); // Provide visual label
SetName(_("Register Effects")); // Provide audible label SetName(_("Plugin Manager: Effects")); // Provide audible label
mStates.SetCount(STATE_COUNT); mStates.SetCount(STATE_COUNT);
mStates[STATE_Enabled] = _("Enabled"); mStates[STATE_Enabled] = _("Enabled");
@ -1178,9 +1178,9 @@ void PluginDescriptor::SetValid(bool valid)
// Effects // Effects
const wxString & PluginDescriptor::GetEffectFamily() const wxString PluginDescriptor::GetEffectFamily(bool translate) const
{ {
return mEffectFamily; return translate ? wxString(wxGetTranslation(mEffectFamily)) : mEffectFamily;
} }
EffectType PluginDescriptor::GetEffectType() const EffectType PluginDescriptor::GetEffectType() const
@ -2055,7 +2055,7 @@ void PluginManager::SaveGroup(PluginType type)
stype = KEY_EFFECTTYPE_PROCESS; stype = KEY_EFFECTTYPE_PROCESS;
} }
mRegistry->Write(KEY_EFFECTTYPE, stype); mRegistry->Write(KEY_EFFECTTYPE, stype);
mRegistry->Write(KEY_EFFECTFAMILY, plug.GetEffectFamily()); mRegistry->Write(KEY_EFFECTFAMILY, plug.GetEffectFamily(false));
mRegistry->Write(KEY_EFFECTDEFAULT, plug.IsEffectDefault()); mRegistry->Write(KEY_EFFECTDEFAULT, plug.IsEffectDefault());
mRegistry->Write(KEY_EFFECTINTERACTIVE, plug.IsEffectInteractive()); mRegistry->Write(KEY_EFFECTINTERACTIVE, plug.IsEffectInteractive());
mRegistry->Write(KEY_EFFECTREALTIME, plug.IsEffectRealtime()); mRegistry->Write(KEY_EFFECTREALTIME, plug.IsEffectRealtime());
@ -2285,7 +2285,7 @@ const PluginDescriptor *PluginManager::GetFirstPluginForEffectType(EffectType ty
PluginDescriptor & plug = mPluginsIter->second; PluginDescriptor & plug = mPluginsIter->second;
bool familyEnabled; bool familyEnabled;
gPrefs->Read(plug.GetEffectFamily() + wxT("/Enable"), &familyEnabled, true); gPrefs->Read(plug.GetEffectFamily(false) + wxT("/Enable"), &familyEnabled, true);
if (plug.IsValid() && plug.IsEnabled() && plug.GetEffectType() == type && familyEnabled) if (plug.IsValid() && plug.IsEnabled() && plug.GetEffectType() == type && familyEnabled)
{ {
if (plug.IsInstantiated() && em.IsHidden(plug.GetID())) if (plug.IsInstantiated() && em.IsHidden(plug.GetID()))
@ -2732,11 +2732,11 @@ wxString PluginManager::SettingsPath(const PluginID & ID, bool shared)
wxString id = GetPluginTypeString(plug.GetPluginType()) + wxString id = GetPluginTypeString(plug.GetPluginType()) +
wxT("_") + wxT("_") +
plug.GetEffectFamily() + // is empty for non-Effects plug.GetEffectFamily(false) + // is empty for non-Effects
wxT("_") + wxT("_") +
plug.GetVendor() + plug.GetVendor(false) +
wxT("_") + wxT("_") +
(shared ? wxT("") : plug.GetName()); (shared ? wxT("") : plug.GetSymbol());
return SETROOT + return SETROOT +
ConvertID(id) + ConvertID(id) +

View File

@ -88,7 +88,7 @@ public:
// Effect plugins only // Effect plugins only
// Will return an untranslated string // Will return an untranslated string
const wxString & GetEffectFamily() const; wxString GetEffectFamily(bool translate = true) const;
EffectType GetEffectType() const; EffectType GetEffectType() const;
bool IsEffectDefault() const; bool IsEffectDefault() const;
bool IsEffectInteractive() const; bool IsEffectInteractive() const;

View File

@ -195,7 +195,7 @@ wxString Effect::GetVendor()
return mClient->GetVendor(); return mClient->GetVendor();
} }
return _("Audacity"); return XO("Audacity");
} }
wxString Effect::GetVersion() wxString Effect::GetVersion()
@ -225,7 +225,7 @@ wxString Effect::GetFamily()
return mClient->GetFamily(); return mClient->GetFamily();
} }
return _("Audacity"); return XO("Audacity");
} }
bool Effect::IsInteractive() bool Effect::IsInteractive()

View File

@ -1635,9 +1635,9 @@ wxString VSTEffect::GetDescription()
// VST does have a product string opcode and sum effects return a short // VST does have a product string opcode and sum effects return a short
// description, but most do not or they just return the name again. So, // description, but most do not or they just return the name again. So,
// try to provide some sort of useful information. // try to provide some sort of useful information.
mDescription = _("Audio In: ") + mDescription = XO("Audio In: ") +
wxString::Format(wxT("%d"), mAudioIns) + wxString::Format(wxT("%d"), mAudioIns) +
_(", Audio Out: ") + XO(", Audio Out: ") +
wxString::Format(wxT("%d"), mAudioOuts); wxString::Format(wxT("%d"), mAudioOuts);
return mDescription; return mDescription;

View File

@ -380,7 +380,7 @@ wxString LV2Effect::GetVendor()
if (vendor.IsEmpty()) if (vendor.IsEmpty())
{ {
vendor = _("N/A"); vendor = XO("N/A");
} }
return vendor; return vendor;
@ -393,7 +393,7 @@ wxString LV2Effect::GetVersion()
wxString LV2Effect::GetDescription() wxString LV2Effect::GetDescription()
{ {
return _("N/A"); return XO("N/A");
} }
// ============================================================================ // ============================================================================

View File

@ -98,17 +98,17 @@ wxString LV2EffectsModule::GetPath()
wxString LV2EffectsModule::GetSymbol() wxString LV2EffectsModule::GetSymbol()
{ {
return wxT("LV2 Effects Module"); return XO("LV2 Effects Module");
} }
wxString LV2EffectsModule::GetName() wxString LV2EffectsModule::GetName()
{ {
return _("LV2 Effects Module"); return GetSymbol();
} }
wxString LV2EffectsModule::GetVendor() wxString LV2EffectsModule::GetVendor()
{ {
return _("The Audacity Team"); return XO("The Audacity Team");
} }
wxString LV2EffectsModule::GetVersion() wxString LV2EffectsModule::GetVersion()
@ -119,7 +119,7 @@ wxString LV2EffectsModule::GetVersion()
wxString LV2EffectsModule::GetDescription() wxString LV2EffectsModule::GetDescription()
{ {
return _("Provides LV2 Effects support to Audacity"); return XO("Provides LV2 Effects support to Audacity");
} }
// ============================================================================ // ============================================================================