diff --git a/src/BatchCommands.cpp b/src/BatchCommands.cpp index ed16d34d4..25325e933 100644 --- a/src/BatchCommands.cpp +++ b/src/BatchCommands.cpp @@ -415,8 +415,9 @@ wxString BatchCommands::BuildCleanFileName(const wxString &fileName, const wxStr const wxFileName newFileName{ fileName }; wxString justName = newFileName.GetName(); wxString pathName = newFileName.GetPath(wxPATH_GET_VOLUME | wxPATH_GET_SEPARATOR); + const auto cleanedString = _("cleaned"); - if (justName == wxT("")) { + if (justName.empty()) { wxDateTime now = wxDateTime::Now(); int year = now.GetYear(); wxDateTime::Month month = now.GetMonth(); @@ -434,22 +435,22 @@ wxString BatchCommands::BuildCleanFileName(const wxString &fileName, const wxStr // double startTime = 0.0; //OnSelectAll(); pathName = gPrefs->Read(wxT("/DefaultOpenPath"), ::wxGetCwd()); - ::wxMessageBox(wxString::Format(wxT("Export recording to %s\n/cleaned/%s%s"), - pathName.c_str(), justName.c_str(), extension.c_str()), - wxT("Export recording"), - wxOK | wxCENTRE); - pathName += wxT("/"); + ::wxMessageBox(wxString::Format(_("Export recording to %s\n/%s/%s%s"), + pathName.c_str(), cleanedString.c_str(), justName.c_str(), extension.c_str()), + _("Export recording"), + wxOK | wxCENTRE); + pathName += wxFileName::GetPathSeparator(); } wxString cleanedName = pathName; - cleanedName += wxT("cleaned"); + cleanedName += cleanedString; bool flag = ::wxFileName::FileExists(cleanedName); if (flag == true) { - ::wxMessageBox(wxT("Cannot create directory 'cleaned'. \nFile already exists that is not a directory")); - return wxT(""); + ::wxMessageBox(_("Cannot create directory 'cleaned'. \nFile already exists that is not a directory")); + return wxString{}; } ::wxFileName::Mkdir(cleanedName, 0777, wxPATH_MKDIR_FULL); // make sure it exists - cleanedName += wxT("/"); + cleanedName += wxFileName::GetPathSeparator(); cleanedName += justName; cleanedName += extension; wxGetApp().AddFileToHistory(cleanedName); diff --git a/src/TimerRecordDialog.cpp b/src/TimerRecordDialog.cpp index debcf5547..275fe9269 100644 --- a/src/TimerRecordDialog.cpp +++ b/src/TimerRecordDialog.cpp @@ -291,7 +291,7 @@ void TimerRecordDialog::OnTimeText_Duration(wxCommandEvent& WXUNUSED(event)) // New events for timer recording automation 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.GetFullName(), wxT("aup"),