1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-08-02 00:49:33 +02:00

Fix some missed internationalizations

This commit is contained in:
Paul Licameli 2017-08-02 17:43:35 -04:00
parent 3e39771c53
commit d7ac0d30db
2 changed files with 12 additions and 11 deletions

View File

@ -415,8 +415,9 @@ wxString BatchCommands::BuildCleanFileName(const wxString &fileName, const wxStr
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");
if (justName == wxT("")) { if (justName.empty()) {
wxDateTime now = wxDateTime::Now(); wxDateTime now = wxDateTime::Now();
int year = now.GetYear(); int year = now.GetYear();
wxDateTime::Month month = now.GetMonth(); wxDateTime::Month month = now.GetMonth();
@ -434,22 +435,22 @@ wxString BatchCommands::BuildCleanFileName(const wxString &fileName, const wxStr
// double startTime = 0.0; // double startTime = 0.0;
//OnSelectAll(); //OnSelectAll();
pathName = gPrefs->Read(wxT("/DefaultOpenPath"), ::wxGetCwd()); pathName = gPrefs->Read(wxT("/DefaultOpenPath"), ::wxGetCwd());
::wxMessageBox(wxString::Format(wxT("Export recording to %s\n/cleaned/%s%s"), ::wxMessageBox(wxString::Format(_("Export recording to %s\n/%s/%s%s"),
pathName.c_str(), justName.c_str(), extension.c_str()), pathName.c_str(), cleanedString.c_str(), justName.c_str(), extension.c_str()),
wxT("Export recording"), _("Export recording"),
wxOK | wxCENTRE); wxOK | wxCENTRE);
pathName += wxT("/"); pathName += wxFileName::GetPathSeparator();
} }
wxString cleanedName = pathName; wxString cleanedName = pathName;
cleanedName += wxT("cleaned"); cleanedName += cleanedString;
bool flag = ::wxFileName::FileExists(cleanedName); bool flag = ::wxFileName::FileExists(cleanedName);
if (flag == true) { if (flag == true) {
::wxMessageBox(wxT("Cannot create directory 'cleaned'. \nFile already exists that is not a directory")); ::wxMessageBox(_("Cannot create directory 'cleaned'. \nFile already exists that is not a directory"));
return wxT(""); return wxString{};
} }
::wxFileName::Mkdir(cleanedName, 0777, wxPATH_MKDIR_FULL); // make sure it exists ::wxFileName::Mkdir(cleanedName, 0777, wxPATH_MKDIR_FULL); // make sure it exists
cleanedName += wxT("/"); cleanedName += wxFileName::GetPathSeparator();
cleanedName += justName; cleanedName += justName;
cleanedName += extension; cleanedName += extension;
wxGetApp().AddFileToHistory(cleanedName); wxGetApp().AddFileToHistory(cleanedName);

View File

@ -291,7 +291,7 @@ void TimerRecordDialog::OnTimeText_Duration(wxCommandEvent& WXUNUSED(event))
// New events for timer recording automation // New events for timer recording automation
void TimerRecordDialog::OnAutoSavePathButton_Click(wxCommandEvent& WXUNUSED(event)) void TimerRecordDialog::OnAutoSavePathButton_Click(wxCommandEvent& WXUNUSED(event))
{ {
wxString fName = FileSelector(_T("Save Timer Recording As"), wxString fName = FileSelector(_("Save Timer Recording As"),
m_fnAutoSaveFile.GetPath(), m_fnAutoSaveFile.GetPath(),
m_fnAutoSaveFile.GetFullName(), m_fnAutoSaveFile.GetFullName(),
wxT("aup"), wxT("aup"),