From 37e61ab1c21715b6e770daf3f55aded01bb9db81 Mon Sep 17 00:00:00 2001 From: James Crook Date: Thu, 4 Apr 2019 07:44:59 +0100 Subject: [PATCH] Change 'cleaned' -> 'Macro-output' in path name. This is more than a wording change, since it is changing the output directory. --- src/BatchCommands.cpp | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/src/BatchCommands.cpp b/src/BatchCommands.cpp index 407c12fc2..fba5f6488 100644 --- a/src/BatchCommands.cpp +++ b/src/BatchCommands.cpp @@ -513,7 +513,8 @@ wxString MacroCommands::BuildCleanFileName(const FilePath &fileName, const wxFileName newFileName{ fileName }; wxString justName = newFileName.GetName(); wxString pathName = newFileName.GetPath(wxPATH_GET_VOLUME | wxPATH_GET_SEPARATOR); - const auto cleanedString = _("cleaned"); + /* i18n-hint: this is part of a directory name (where results will be put)*/ + const auto cleanedString = _("Macro-output"); if (justName.empty()) { wxDateTime now = wxDateTime::Now(); @@ -543,7 +544,9 @@ wxString MacroCommands::BuildCleanFileName(const FilePath &fileName, cleanedName += cleanedString; bool flag = ::wxFileName::FileExists(cleanedName); if (flag == true) { - ::AudacityMessageBox(_("Cannot create directory 'cleaned'. \nFile already exists that is not a directory")); + ::AudacityMessageBox(_("Cannot create directory '%s'. \nFile already exists that is not a directory"), + cleanedName + ); return wxString{}; } ::wxFileName::Mkdir(cleanedName, 0777, wxPATH_MKDIR_FULL); // make sure it exists @@ -640,6 +643,8 @@ bool MacroCommands::ApplySpecialCommand( filename = BuildCleanFileName(mFileName, extension); } + /* i18n-hint: this is part of a directory name (where results will be put)*/ + const auto cleanedString = _("Macro-output"); // We have a command index, but we don't use it! // TODO: Make this special-batch-command code use the menu item code.... // FIXME: TRAP_ERR No error reporting on write file failure in batch mode. @@ -650,16 +655,16 @@ bool MacroCommands::ApplySpecialCommand( return true; } else if (command == wxT("ExportMP3_56k_before")) { #if defined(__WXMSW__) - filename.Replace(wxT("cleaned\\"), wxT("cleaned\\MasterBefore_"), false); + filename.Replace(cleanedString + wxT("\\"), cleanedString + wxT("\\MasterBefore_"), false); #else - filename.Replace(wxT("cleaned/"), wxT("cleaned/MasterBefore_"), false); + filename.Replace(cleanedString + wxT("/"), cleanedString + wxT("/MasterBefore_"), false); #endif return WriteMp3File(filename, 56); } else if (command == wxT("ExportMP3_56k_after")) { #if defined(__WXMSW__) - filename.Replace(wxT("cleaned\\"), wxT("cleaned\\MasterAfter_"), false); + filename.Replace(cleanedString + wxT("\\"), cleanedString + wxT("\\MasterAfter_"), false); #else - filename.Replace(wxT("cleaned/"), wxT("cleaned/MasterAfter_"), false); + filename.Replace(cleanedString + wxT("/"), cleanedString + wxT("/MasterAfter_"), false); #endif return WriteMp3File(filename, 56); } else if (command == wxT("ExportMP3")) {