1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-06-23 15:50:05 +02:00

Translate the two built-in macro names...

... If you only ever use one Audacity locale, then the two persistent macro
files will be created with appropriately translated names.

If you ever do use more than one locale and open Macros... , then
you will get duplicate files differing only by translation of the name.
Nothing causes an automatic purge of the macros in the non-current language.
This commit is contained in:
Paul Licameli 2018-03-14 19:23:25 -04:00
parent 59d41db63a
commit c3adc0141c

View File

@ -105,15 +105,15 @@ MacroCommands::MacroCommands()
}
}
static const wxString MP3Conversion = wxT("MP3 Conversion");
static const wxString FadeEnds = wxT("Fade Ends");
static const wxString MP3Conversion = XO("MP3 Conversion");
static const wxString FadeEnds = XO("Fade Ends");
wxArrayString MacroCommands::GetNamesOfDefaultMacros()
{
wxArrayString defaults;
defaults.Add( MP3Conversion );
defaults.Add( FadeEnds );
defaults.Add( GetCustomTranslation( MP3Conversion ) );
defaults.Add( GetCustomTranslation( FadeEnds ) );
return defaults;
}
@ -122,10 +122,10 @@ void MacroCommands::RestoreMacro(const wxString & name)
// TIDY-ME: Effects change their name with localisation.
// Commands (at least currently) don't. Messy.
ResetMacro();
if (name == MP3Conversion){
if (name == GetCustomTranslation( MP3Conversion ) ){
AddToMacro( wxT("Normalize") );
AddToMacro( wxT("ExportMP3") );
} else if (name == FadeEnds ){
} else if (name == GetCustomTranslation( FadeEnds ) ){
AddToMacro( wxT("Select"), wxT("Start=\"0\" End=\"1\"") );
AddToMacro( wxT("FadeIn") );
AddToMacro( wxT("Select"), wxT("Start=\"0\" End=\"1\" FromEnd=\"1\"") );