mirror of
https://github.com/cookiengineer/audacity
synced 2025-07-12 14:47:43 +02:00
Change 'cleaned' -> 'Macro-output' in path name.
This is more than a wording change, since it is changing the output directory.
This commit is contained in:
parent
b07595781a
commit
37e61ab1c2
@ -513,7 +513,8 @@ wxString MacroCommands::BuildCleanFileName(const FilePath &fileName,
|
|||||||
const wxFileName newFileName{ fileName };
|
const wxFileName newFileName{ fileName };
|
||||||
wxString justName = newFileName.GetName();
|
wxString justName = newFileName.GetName();
|
||||||
wxString pathName = newFileName.GetPath(wxPATH_GET_VOLUME | wxPATH_GET_SEPARATOR);
|
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()) {
|
if (justName.empty()) {
|
||||||
wxDateTime now = wxDateTime::Now();
|
wxDateTime now = wxDateTime::Now();
|
||||||
@ -543,7 +544,9 @@ wxString MacroCommands::BuildCleanFileName(const FilePath &fileName,
|
|||||||
cleanedName += cleanedString;
|
cleanedName += cleanedString;
|
||||||
bool flag = ::wxFileName::FileExists(cleanedName);
|
bool flag = ::wxFileName::FileExists(cleanedName);
|
||||||
if (flag == true) {
|
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{};
|
return wxString{};
|
||||||
}
|
}
|
||||||
::wxFileName::Mkdir(cleanedName, 0777, wxPATH_MKDIR_FULL); // make sure it exists
|
::wxFileName::Mkdir(cleanedName, 0777, wxPATH_MKDIR_FULL); // make sure it exists
|
||||||
@ -640,6 +643,8 @@ bool MacroCommands::ApplySpecialCommand(
|
|||||||
filename = BuildCleanFileName(mFileName, extension);
|
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!
|
// We have a command index, but we don't use it!
|
||||||
// TODO: Make this special-batch-command code use the menu item code....
|
// 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.
|
// FIXME: TRAP_ERR No error reporting on write file failure in batch mode.
|
||||||
@ -650,16 +655,16 @@ bool MacroCommands::ApplySpecialCommand(
|
|||||||
return true;
|
return true;
|
||||||
} else if (command == wxT("ExportMP3_56k_before")) {
|
} else if (command == wxT("ExportMP3_56k_before")) {
|
||||||
#if defined(__WXMSW__)
|
#if defined(__WXMSW__)
|
||||||
filename.Replace(wxT("cleaned\\"), wxT("cleaned\\MasterBefore_"), false);
|
filename.Replace(cleanedString + wxT("\\"), cleanedString + wxT("\\MasterBefore_"), false);
|
||||||
#else
|
#else
|
||||||
filename.Replace(wxT("cleaned/"), wxT("cleaned/MasterBefore_"), false);
|
filename.Replace(cleanedString + wxT("/"), cleanedString + wxT("/MasterBefore_"), false);
|
||||||
#endif
|
#endif
|
||||||
return WriteMp3File(filename, 56);
|
return WriteMp3File(filename, 56);
|
||||||
} else if (command == wxT("ExportMP3_56k_after")) {
|
} else if (command == wxT("ExportMP3_56k_after")) {
|
||||||
#if defined(__WXMSW__)
|
#if defined(__WXMSW__)
|
||||||
filename.Replace(wxT("cleaned\\"), wxT("cleaned\\MasterAfter_"), false);
|
filename.Replace(cleanedString + wxT("\\"), cleanedString + wxT("\\MasterAfter_"), false);
|
||||||
#else
|
#else
|
||||||
filename.Replace(wxT("cleaned/"), wxT("cleaned/MasterAfter_"), false);
|
filename.Replace(cleanedString + wxT("/"), cleanedString + wxT("/MasterAfter_"), false);
|
||||||
#endif
|
#endif
|
||||||
return WriteMp3File(filename, 56);
|
return WriteMp3File(filename, 56);
|
||||||
} else if (command == wxT("ExportMP3")) {
|
} else if (command == wxT("ExportMP3")) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user