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

IdentInterface::GetDescription() returns a translated string...

... See commit 3b90538b84411f6b08e10682406984e5f499fd74 which removed the
only use of the untranslated strings.

Also follows better i18n guidelines for composing the VSTEffect description.
This commit is contained in:
Paul Licameli 2018-01-07 19:45:20 -05:00
parent 0c88c8de88
commit 8a074770e8
43 changed files with 50 additions and 58 deletions

View File

@ -58,11 +58,12 @@ public:
virtual wxString GetName() = 0; virtual wxString GetName() = 0;
virtual wxString GetVendor() = 0; virtual wxString GetVendor() = 0;
virtual wxString GetVersion() = 0; virtual wxString GetVersion() = 0;
// This returns a translated string
virtual wxString GetDescription() = 0; virtual wxString GetDescription() = 0;
// non-virtual convenience functions // non-virtual convenience function
const wxString& GetTranslatedName(); const wxString& GetTranslatedName();
const wxString& GetTranslatedDescription();
}; };
#endif // __AUDACITY_IDENTINTERFACE_H__ #endif // __AUDACITY_IDENTINTERFACE_H__

View File

@ -3126,8 +3126,3 @@ const wxString& IdentInterface::GetTranslatedName()
{ {
return wxGetTranslation( GetName() ); return wxGetTranslation( GetName() );
} }
const wxString& IdentInterface::GetTranslatedDescription()
{
return wxGetTranslation( GetDescription() );
}

View File

@ -87,7 +87,7 @@ wxString EffectAmplify::GetSymbol()
wxString EffectAmplify::GetDescription() wxString EffectAmplify::GetDescription()
{ {
// Note: This is useful only after ratio has been set. // Note: This is useful only after ratio has been set.
return XO("Increases or decreases the volume of the audio you have selected"); return _("Increases or decreases the volume of the audio you have selected");
} }
wxString EffectAmplify::ManualPage() wxString EffectAmplify::ManualPage()

View File

@ -115,7 +115,7 @@ wxString EffectAutoDuck::GetSymbol()
wxString EffectAutoDuck::GetDescription() wxString EffectAutoDuck::GetDescription()
{ {
return XO("Reduces (ducks) the volume of one or more tracks whenever the volume of a specified \"control\" track reaches a particular level"); return _("Reduces (ducks) the volume of one or more tracks whenever the volume of a specified \"control\" track reaches a particular level");
} }
wxString EffectAutoDuck::ManualPage() wxString EffectAutoDuck::ManualPage()

View File

@ -89,7 +89,7 @@ wxString EffectBassTreble::GetSymbol()
wxString EffectBassTreble::GetDescription() wxString EffectBassTreble::GetDescription()
{ {
return XO("Simple tone control effect"); return _("Simple tone control effect");
} }
wxString EffectBassTreble::ManualPage() wxString EffectBassTreble::ManualPage()

View File

@ -122,7 +122,7 @@ wxString EffectChangePitch::GetSymbol()
wxString EffectChangePitch::GetDescription() wxString EffectChangePitch::GetDescription()
{ {
return XO("Change the pitch of a track without changing its tempo"); return _("Change the pitch of a track without changing its tempo");
} }
wxString EffectChangePitch::ManualPage() wxString EffectChangePitch::ManualPage()

View File

@ -112,7 +112,7 @@ wxString EffectChangeSpeed::GetSymbol()
wxString EffectChangeSpeed::GetDescription() wxString EffectChangeSpeed::GetDescription()
{ {
return XO("Change the speed of a track, also changing its pitch"); return _("Change the speed of a track, also changing its pitch");
} }
wxString EffectChangeSpeed::ManualPage() wxString EffectChangeSpeed::ManualPage()

View File

@ -99,7 +99,7 @@ wxString EffectChangeTempo::GetSymbol()
wxString EffectChangeTempo::GetDescription() wxString EffectChangeTempo::GetDescription()
{ {
return XO("Change the tempo of a selection without changing its pitch"); return _("Change the tempo of a selection without changing its pitch");
} }
wxString EffectChangeTempo::ManualPage() wxString EffectChangeTempo::ManualPage()

View File

@ -82,7 +82,7 @@ wxString EffectClickRemoval::GetSymbol()
wxString EffectClickRemoval::GetDescription() wxString EffectClickRemoval::GetDescription()
{ {
return XO("Click Removal is designed to remove clicks on audio tracks"); return _("Click Removal is designed to remove clicks on audio tracks");
} }
wxString EffectClickRemoval::ManualPage() wxString EffectClickRemoval::ManualPage()

View File

@ -103,7 +103,7 @@ wxString EffectCompressor::GetSymbol()
wxString EffectCompressor::GetDescription() wxString EffectCompressor::GetDescription()
{ {
return XO("Compresses the dynamic range of audio"); return _("Compresses the dynamic range of audio");
} }
wxString EffectCompressor::ManualPage() wxString EffectCompressor::ManualPage()

View File

@ -200,7 +200,7 @@ wxString EffectDistortion::GetSymbol()
wxString EffectDistortion::GetDescription() wxString EffectDistortion::GetDescription()
{ {
return XO("Waveshaping distortion effect"); return _("Waveshaping distortion effect");
} }
wxString EffectDistortion::ManualPage() wxString EffectDistortion::ManualPage()

View File

@ -98,7 +98,7 @@ wxString EffectDtmf::GetSymbol()
wxString EffectDtmf::GetDescription() wxString EffectDtmf::GetDescription()
{ {
return XO("Generates dual-tone multi-frequency (DTMF) tones like those produced by the keypad on telephones"); return _("Generates dual-tone multi-frequency (DTMF) tones like those produced by the keypad on telephones");
} }
wxString EffectDtmf::ManualPage() wxString EffectDtmf::ManualPage()

View File

@ -58,7 +58,7 @@ wxString EffectEcho::GetSymbol()
wxString EffectEcho::GetDescription() wxString EffectEcho::GetDescription()
{ {
return XO("Repeats the selected audio again and again"); return _("Repeats the selected audio again and again");
} }
wxString EffectEcho::ManualPage() wxString EffectEcho::ManualPage()

View File

@ -3348,7 +3348,7 @@ void EffectUIHost::OnMenu(wxCommandEvent & WXUNUSED(evt))
sub->Append(kDummyID, wxString::Format(_("Name: %s"), mEffect->GetTranslatedName())); sub->Append(kDummyID, wxString::Format(_("Name: %s"), mEffect->GetTranslatedName()));
sub->Append(kDummyID, wxString::Format(_("Version: %s"), mEffect->GetVersion())); sub->Append(kDummyID, wxString::Format(_("Version: %s"), mEffect->GetVersion()));
sub->Append(kDummyID, wxString::Format(_("Vendor: %s"), mEffect->GetVendor())); sub->Append(kDummyID, wxString::Format(_("Vendor: %s"), mEffect->GetVendor()));
sub->Append(kDummyID, wxString::Format(_("Description: %s"), mEffect->GetTranslatedDescription())); sub->Append(kDummyID, wxString::Format(_("Description: %s"), mEffect->GetDescription()));
menu.Append(0, _("About"), sub.release()); menu.Append(0, _("About"), sub.release());
} }

View File

@ -296,7 +296,7 @@ wxString EffectEqualization::GetSymbol()
wxString EffectEqualization::GetDescription() wxString EffectEqualization::GetDescription()
{ {
return XO("Adjusts the volume levels of particular frequencies"); return _("Adjusts the volume levels of particular frequencies");
} }
wxString EffectEqualization::ManualPage() wxString EffectEqualization::ManualPage()

View File

@ -40,8 +40,8 @@ wxString EffectFade::GetSymbol()
wxString EffectFade::GetDescription() wxString EffectFade::GetDescription()
{ {
return mFadeIn return mFadeIn
? XO("Applies a linear fade-in to the selected audio") ? _("Applies a linear fade-in to the selected audio")
: XO("Applies a linear fade-out to the selected audio"); : _("Applies a linear fade-out to the selected audio");
} }
// EffectIdentInterface implementation // EffectIdentInterface implementation

View File

@ -59,7 +59,7 @@ wxString EffectFindClipping::GetSymbol()
wxString EffectFindClipping::GetDescription() wxString EffectFindClipping::GetDescription()
{ {
return XO("Creates labels where clipping is detected"); return _("Creates labels where clipping is detected");
} }
wxString EffectFindClipping::ManualPage() wxString EffectFindClipping::ManualPage()

View File

@ -37,7 +37,7 @@ wxString EffectInvert::GetSymbol()
wxString EffectInvert::GetDescription() wxString EffectInvert::GetDescription()
{ {
return XO("Flips the audio samples upside-down, reversing their polarity"); return _("Flips the audio samples upside-down, reversing their polarity");
} }
// EffectIdentInterface implementation // EffectIdentInterface implementation

View File

@ -259,7 +259,7 @@ wxString BuiltinEffectsModule::GetVersion()
wxString BuiltinEffectsModule::GetDescription() wxString BuiltinEffectsModule::GetDescription()
{ {
return XO("Provides builtin effects to Audacity"); return _("Provides builtin effects to Audacity");
} }
// ============================================================================ // ============================================================================

View File

@ -75,7 +75,7 @@ wxString EffectNoise::GetSymbol()
wxString EffectNoise::GetDescription() wxString EffectNoise::GetDescription()
{ {
return XO("Generates one of three different types of noise"); return _("Generates one of three different types of noise");
} }
wxString EffectNoise::ManualPage() wxString EffectNoise::ManualPage()

View File

@ -433,7 +433,7 @@ wxString EffectNoiseReduction::GetSymbol()
wxString EffectNoiseReduction::GetDescription() wxString EffectNoiseReduction::GetDescription()
{ {
return XO("Removes background noise such as fans, tape noise, or hums"); return _("Removes background noise such as fans, tape noise, or hums");
} }
// EffectIdentInterface implementation // EffectIdentInterface implementation

View File

@ -117,7 +117,7 @@ wxString EffectNoiseRemoval::GetSymbol()
wxString EffectNoiseRemoval::GetDescription() wxString EffectNoiseRemoval::GetDescription()
{ {
return XO("Removes constant background noise such as fans, tape noise, or hums"); return _("Removes constant background noise such as fans, tape noise, or hums");
} }
// EffectIdentInterface implementation // EffectIdentInterface implementation

View File

@ -65,7 +65,7 @@ wxString EffectNormalize::GetSymbol()
wxString EffectNormalize::GetDescription() wxString EffectNormalize::GetDescription()
{ {
return XO("Sets the peak amplitude of one or more tracks"); return _("Sets the peak amplitude of one or more tracks");
} }
wxString EffectNormalize::ManualPage() wxString EffectNormalize::ManualPage()

View File

@ -105,7 +105,7 @@ wxString EffectPaulstretch::GetSymbol()
wxString EffectPaulstretch::GetDescription() wxString EffectPaulstretch::GetDescription()
{ {
return XO("Use Paulstretch only for an extreme time-stretch or \"stasis\" effect"); return _("Use Paulstretch only for an extreme time-stretch or \"stasis\" effect");
} }
wxString EffectPaulstretch::ManualPage() wxString EffectPaulstretch::ManualPage()

View File

@ -109,7 +109,7 @@ wxString EffectPhaser::GetSymbol()
wxString EffectPhaser::GetDescription() wxString EffectPhaser::GetDescription()
{ {
return XO("Combines phase-shifted signals with the original signal"); return _("Combines phase-shifted signals with the original signal");
} }
wxString EffectPhaser::ManualPage() wxString EffectPhaser::ManualPage()

View File

@ -50,7 +50,7 @@ wxString EffectRepair::GetSymbol()
wxString EffectRepair::GetDescription() wxString EffectRepair::GetDescription()
{ {
return XO("Sets the peak amplitude of a one or more tracks"); return _("Sets the peak amplitude of a one or more tracks");
} }
// EffectIdentInterface implementation // EffectIdentInterface implementation

View File

@ -64,7 +64,7 @@ wxString EffectRepeat::GetSymbol()
wxString EffectRepeat::GetDescription() wxString EffectRepeat::GetDescription()
{ {
return XO("Repeats the selection the specified number of times"); return _("Repeats the selection the specified number of times");
} }
wxString EffectRepeat::ManualPage() wxString EffectRepeat::ManualPage()

View File

@ -137,7 +137,7 @@ wxString EffectReverb::GetSymbol()
wxString EffectReverb::GetDescription() wxString EffectReverb::GetDescription()
{ {
return XO("Adds ambience or a \"hall effect\""); return _("Adds ambience or a \"hall effect\"");
} }
wxString EffectReverb::ManualPage() wxString EffectReverb::ManualPage()

View File

@ -45,7 +45,7 @@ wxString EffectReverse::GetSymbol()
wxString EffectReverse::GetDescription() wxString EffectReverse::GetDescription()
{ {
return XO("Reverses the selected audio"); return _("Reverses the selected audio");
} }
// EffectIdentInterface implementation // EffectIdentInterface implementation

View File

@ -186,7 +186,7 @@ wxString EffectScienFilter::GetSymbol()
wxString EffectScienFilter::GetDescription() wxString EffectScienFilter::GetDescription()
{ {
return XO("Performs IIR filtering that emulates analog filters"); return _("Performs IIR filtering that emulates analog filters");
} }
wxString EffectScienFilter::ManualPage() wxString EffectScienFilter::ManualPage()

View File

@ -39,7 +39,7 @@ wxString EffectSilence::GetSymbol()
wxString EffectSilence::GetDescription() wxString EffectSilence::GetDescription()
{ {
return XO("Creates audio of zero amplitude"); return _("Creates audio of zero amplitude");
} }
wxString EffectSilence::ManualPage() wxString EffectSilence::ManualPage()

View File

@ -38,7 +38,7 @@ wxString EffectStereoToMono::GetSymbol()
wxString EffectStereoToMono::GetDescription() wxString EffectStereoToMono::GetDescription()
{ {
return XO("Converts stereo tracks to mono"); return _("Converts stereo tracks to mono");
} }
// EffectIdentInterface implementation // EffectIdentInterface implementation

View File

@ -96,7 +96,7 @@ wxString EffectTimeScale::GetName()
wxString EffectTimeScale::GetDescription() wxString EffectTimeScale::GetDescription()
{ {
return XO("Allows continuous changes to the tempo and/or pitch"); return _("Allows continuous changes to the tempo and/or pitch");
} }
wxString EffectTimeScale::ManualPage() wxString EffectTimeScale::ManualPage()

View File

@ -129,8 +129,8 @@ wxString EffectToneGen::GetSymbol()
wxString EffectToneGen::GetDescription() wxString EffectToneGen::GetDescription()
{ {
return mChirp return mChirp
? XO("Generates an ascending or descending tone of one of four types") ? _("Generates an ascending or descending tone of one of four types")
: XO("Generates a constant frequency tone of one of four types"); : _("Generates a constant frequency tone of one of four types");
} }
wxString EffectToneGen::ManualPage() wxString EffectToneGen::ManualPage()

View File

@ -117,7 +117,7 @@ wxString EffectTruncSilence::GetSymbol()
wxString EffectTruncSilence::GetDescription() wxString EffectTruncSilence::GetDescription()
{ {
return XO("Automatically reduces the length of passages where the volume is below a specified level"); return _("Automatically reduces the length of passages where the volume is below a specified level");
} }
wxString EffectTruncSilence::ManualPage() wxString EffectTruncSilence::ManualPage()

View File

@ -332,7 +332,7 @@ wxString VSTEffectsModule::GetVersion()
wxString VSTEffectsModule::GetDescription() wxString VSTEffectsModule::GetDescription()
{ {
return XO("Adds the ability to use VST effects in Audacity."); return _("Adds the ability to use VST effects in Audacity.");
} }
// ============================================================================ // ============================================================================
@ -1214,15 +1214,11 @@ wxString VSTEffect::GetVersion()
wxString VSTEffect::GetDescription() wxString VSTEffect::GetDescription()
{ {
// VST does have a product string opcode and sum effects return a short // VST does have a product string opcode and some 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 = XO("Audio In: ") + return wxString::Format( _("Audio In: %d, Audio Out: %d"),
wxString::Format(wxT("%d"), mAudioIns) + mAudioIns, mAudioOuts);
XO(", Audio Out: ") +
wxString::Format(wxT("%d"), mAudioOuts);
return mDescription;
} }
// ============================================================================ // ============================================================================

View File

@ -100,7 +100,7 @@ wxString EffectWahwah::GetSymbol()
wxString EffectWahwah::GetDescription() wxString EffectWahwah::GetDescription()
{ {
return XO("Rapid tone quality variations, like that guitar sound so popular in the 1970's"); return _("Rapid tone quality variations, like that guitar sound so popular in the 1970's");
} }
wxString EffectWahwah::ManualPage() wxString EffectWahwah::ManualPage()

View File

@ -134,7 +134,7 @@ wxString AudioUnitEffectsModule::GetVersion()
wxString AudioUnitEffectsModule::GetDescription() wxString AudioUnitEffectsModule::GetDescription()
{ {
return XO("Provides Audio Unit Effects support to Audacity"); return _("Provides Audio Unit Effects support to Audacity");
} }
// ============================================================================ // ============================================================================
@ -914,7 +914,7 @@ wxString AudioUnitEffect::GetVersion()
wxString AudioUnitEffect::GetDescription() wxString AudioUnitEffect::GetDescription()
{ {
/* i18n-hint: Can mean "not available," "not applicable," "no answer" */ /* i18n-hint: Can mean "not available," "not applicable," "no answer" */
return XO("n/a"); return _("n/a");
} }
// ============================================================================ // ============================================================================

View File

@ -135,7 +135,7 @@ wxString LadspaEffectsModule::GetVersion()
wxString LadspaEffectsModule::GetDescription() wxString LadspaEffectsModule::GetDescription()
{ {
return XO("Provides LADSPA Effects"); return _("Provides LADSPA Effects");
} }
// ============================================================================ // ============================================================================

View File

@ -364,7 +364,7 @@ wxString LV2Effect::GetVersion()
wxString LV2Effect::GetDescription() wxString LV2Effect::GetDescription()
{ {
return XO("n/a"); return _("n/a");
} }
// ============================================================================ // ============================================================================

View File

@ -119,7 +119,7 @@ wxString LV2EffectsModule::GetVersion()
wxString LV2EffectsModule::GetDescription() wxString LV2EffectsModule::GetDescription()
{ {
return XO("Provides LV2 Effects support to Audacity"); return _("Provides LV2 Effects support to Audacity");
} }
// ============================================================================ // ============================================================================

View File

@ -124,7 +124,7 @@ wxString NyquistEffectsModule::GetVersion()
wxString NyquistEffectsModule::GetDescription() wxString NyquistEffectsModule::GetDescription()
{ {
return XO("Provides Nyquist Effects support to Audacity"); return _("Provides Nyquist Effects support to Audacity");
} }
// ============================================================================ // ============================================================================

View File

@ -98,7 +98,7 @@ wxString VampEffectsModule::GetVersion()
wxString VampEffectsModule::GetDescription() wxString VampEffectsModule::GetDescription()
{ {
return XO("Provides Vamp Effects support to Audacity"); return _("Provides Vamp Effects support to Audacity");
} }
// ============================================================================ // ============================================================================