mirror of
https://github.com/cookiengineer/audacity
synced 2025-06-17 16:40:07 +02:00
EffectManager returns TranslatableString for family and vendor
This commit is contained in:
parent
70ec69fa3d
commit
aac50ae36e
@ -300,19 +300,19 @@ wxString EffectManager::GetCommandName(const PluginID & ID)
|
|||||||
return GetCommandSymbol(ID).Translation();
|
return GetCommandSymbol(ID).Translation();
|
||||||
}
|
}
|
||||||
|
|
||||||
wxString EffectManager::GetEffectFamilyName(const PluginID & ID)
|
TranslatableString EffectManager::GetEffectFamilyName(const PluginID & ID)
|
||||||
{
|
{
|
||||||
auto effect = GetEffect(ID);
|
auto effect = GetEffect(ID);
|
||||||
if (effect)
|
if (effect)
|
||||||
return effect->GetFamily().Translation();
|
return effect->GetFamily().Msgid();
|
||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
|
|
||||||
wxString EffectManager::GetVendorName(const PluginID & ID)
|
TranslatableString EffectManager::GetVendorName(const PluginID & ID)
|
||||||
{
|
{
|
||||||
auto effect = GetEffect(ID);
|
auto effect = GetEffect(ID);
|
||||||
if (effect)
|
if (effect)
|
||||||
return effect->GetVendor().Translation();
|
return effect->GetVendor().Msgid();
|
||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -93,8 +93,8 @@ public:
|
|||||||
NotifyingSelectedRegion &selectedRegion,
|
NotifyingSelectedRegion &selectedRegion,
|
||||||
bool shouldPrompt = true);
|
bool shouldPrompt = true);
|
||||||
|
|
||||||
wxString GetEffectFamilyName(const PluginID & ID);
|
TranslatableString GetEffectFamilyName(const PluginID & ID);
|
||||||
wxString GetVendorName(const PluginID & ID);
|
TranslatableString GetVendorName(const PluginID & ID);
|
||||||
|
|
||||||
/** Run a command given the plugin ID */
|
/** Run a command given the plugin ID */
|
||||||
// Returns true on success.
|
// Returns true on success.
|
||||||
|
@ -74,8 +74,8 @@ bool CompareEffectsByPublisher(
|
|||||||
const PluginDescriptor *a, const PluginDescriptor *b)
|
const PluginDescriptor *a, const PluginDescriptor *b)
|
||||||
{
|
{
|
||||||
auto &em = EffectManager::Get();
|
auto &em = EffectManager::Get();
|
||||||
auto akey = em.GetVendorName(a->GetID());
|
auto akey = em.GetVendorName(a->GetID()).Translation();
|
||||||
auto bkey = em.GetVendorName(b->GetID());
|
auto bkey = em.GetVendorName(b->GetID()).Translation();
|
||||||
|
|
||||||
if (akey.empty())
|
if (akey.empty())
|
||||||
{
|
{
|
||||||
@ -99,8 +99,8 @@ bool CompareEffectsByPublisherAndName(
|
|||||||
const PluginDescriptor *a, const PluginDescriptor *b)
|
const PluginDescriptor *a, const PluginDescriptor *b)
|
||||||
{
|
{
|
||||||
auto &em = EffectManager::Get();
|
auto &em = EffectManager::Get();
|
||||||
auto akey = em.GetVendorName(a->GetID());
|
auto akey = em.GetVendorName(a->GetID()).Translation();
|
||||||
auto bkey = em.GetVendorName(b->GetID());
|
auto bkey = em.GetVendorName(b->GetID()).Translation();
|
||||||
|
|
||||||
if (a->IsEffectDefault())
|
if (a->IsEffectDefault())
|
||||||
{
|
{
|
||||||
@ -124,8 +124,8 @@ bool CompareEffectsByTypeAndName(
|
|||||||
const PluginDescriptor *a, const PluginDescriptor *b)
|
const PluginDescriptor *a, const PluginDescriptor *b)
|
||||||
{
|
{
|
||||||
auto &em = EffectManager::Get();
|
auto &em = EffectManager::Get();
|
||||||
auto akey = em.GetEffectFamilyName(a->GetID());
|
auto akey = em.GetEffectFamilyName(a->GetID()).Translation();
|
||||||
auto bkey = em.GetEffectFamilyName(b->GetID());
|
auto bkey = em.GetEffectFamilyName(b->GetID()).Translation();
|
||||||
|
|
||||||
if (akey.empty())
|
if (akey.empty())
|
||||||
{
|
{
|
||||||
@ -157,8 +157,8 @@ bool CompareEffectsByTypeAndName(
|
|||||||
bool CompareEffectsByType(const PluginDescriptor *a, const PluginDescriptor *b)
|
bool CompareEffectsByType(const PluginDescriptor *a, const PluginDescriptor *b)
|
||||||
{
|
{
|
||||||
auto &em = EffectManager::Get();
|
auto &em = EffectManager::Get();
|
||||||
auto akey = em.GetEffectFamilyName(a->GetID());
|
auto akey = em.GetEffectFamilyName(a->GetID()).Translation();
|
||||||
auto bkey = em.GetEffectFamilyName(b->GetID());
|
auto bkey = em.GetEffectFamilyName(b->GetID()).Translation();
|
||||||
|
|
||||||
if (akey.empty())
|
if (akey.empty())
|
||||||
{
|
{
|
||||||
@ -231,7 +231,7 @@ void AddEffectMenuItems(
|
|||||||
|
|
||||||
if (groupBy == wxT("groupby:publisher"))
|
if (groupBy == wxT("groupby:publisher"))
|
||||||
{
|
{
|
||||||
current = EffectManager::Get().GetVendorName(plug->GetID());
|
current = EffectManager::Get().GetVendorName(plug->GetID()).Translation();
|
||||||
if (current.empty())
|
if (current.empty())
|
||||||
{
|
{
|
||||||
current = _("Unknown");
|
current = _("Unknown");
|
||||||
@ -239,7 +239,7 @@ void AddEffectMenuItems(
|
|||||||
}
|
}
|
||||||
else if (groupBy == wxT("groupby:type"))
|
else if (groupBy == wxT("groupby:type"))
|
||||||
{
|
{
|
||||||
current = EffectManager::Get().GetEffectFamilyName(plug->GetID());
|
current = EffectManager::Get().GetEffectFamilyName(plug->GetID()).Translation();
|
||||||
if (current.empty())
|
if (current.empty())
|
||||||
{
|
{
|
||||||
current = _("Unknown");
|
current = _("Unknown");
|
||||||
@ -300,11 +300,11 @@ void AddEffectMenuItems(
|
|||||||
wxString group;
|
wxString group;
|
||||||
if (groupBy == wxT("sortby:publisher:name"))
|
if (groupBy == wxT("sortby:publisher:name"))
|
||||||
{
|
{
|
||||||
group = EffectManager::Get().GetVendorName(plug->GetID());
|
group = EffectManager::Get().GetVendorName(plug->GetID()).Translation();
|
||||||
}
|
}
|
||||||
else if (groupBy == wxT("sortby:type:name"))
|
else if (groupBy == wxT("sortby:type:name"))
|
||||||
{
|
{
|
||||||
group = EffectManager::Get().GetEffectFamilyName(plug->GetID());
|
group = EffectManager::Get().GetEffectFamilyName(plug->GetID()).Translation();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (plug->IsEffectDefault())
|
if (plug->IsEffectDefault())
|
||||||
|
Loading…
x
Reference in New Issue
Block a user