From 97f74d1e7b37cf15d4763999e1287a665eeedcec Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Sat, 9 Dec 2017 18:19:15 +0100 Subject: many: use otr_tr for non-qobject translation I haven't even compile-tested Linux and OSX-specific bits. --- logic/runtime-libraries.cpp | 8 ++++---- logic/work.cpp | 12 ++++++------ 2 files changed, 10 insertions(+), 10 deletions(-) (limited to 'logic') diff --git a/logic/runtime-libraries.cpp b/logic/runtime-libraries.cpp index 8feeaaba..bfa7f2a4 100644 --- a/logic/runtime-libraries.cpp +++ b/logic/runtime-libraries.cpp @@ -6,7 +6,7 @@ runtime_libraries::runtime_libraries(QFrame* frame, dylibptr t, dylibptr p, dylibptr f) { module_status status = - module_status_mixin::error(QCoreApplication::translate("module", "Library load failure")); + module_status_mixin::error(otr_tr("Library load failure")); using namespace options; @@ -19,7 +19,7 @@ runtime_libraries::runtime_libraries(QFrame* frame, dylibptr t, dylibptr p, dyli if(status = pProtocol->check_status(), !status.is_ok()) { - status = QCoreApplication::translate("module", "Error occured while loading protocol %1\n\n%2\n") + status = otr_tr("Error occured while loading protocol %1\n\n%2\n") .arg(p->name).arg(status.error); goto end; } @@ -36,14 +36,14 @@ runtime_libraries::runtime_libraries(QFrame* frame, dylibptr t, dylibptr p, dyli if (pFilter) if(status = pFilter->check_status(), !status.is_ok()) { - status = QCoreApplication::translate("module", "Error occured while loading filter %1\n\n%2\n") + status = otr_tr("Error occured while loading filter %1\n\n%2\n") .arg(f->name).arg(status.error); goto end; } if (status = pTracker->start_tracker(frame), !status.is_ok()) { - status = QCoreApplication::translate("module", "Error occured while loading tracker %1\n\n%2\n") + status = otr_tr("Error occured while loading tracker %1\n\n%2\n") .arg(t->name).arg(status.error); goto end; } diff --git a/logic/work.cpp b/logic/work.cpp index 53407f7c..07691535 100644 --- a/logic/work.cpp +++ b/logic/work.cpp @@ -16,9 +16,9 @@ QString Work::browse_datalogging_file(main_settings &s) Since the freeze is apparently random, I'm not sure it helped. */ QString newfilename = QFileDialog::getSaveFileName(nullptr, - QCoreApplication::translate("Work", "Select filename"), + otr_tr("Select filename"), filename, - QCoreApplication::translate("Work", "CSV File (*.csv)"), + otr_tr("CSV File (*.csv)"), nullptr); if (!newfilename.isEmpty()) { @@ -44,10 +44,10 @@ std::shared_ptr Work::make_logger(main_settings &s) if (!logger->is_open()) { logger = nullptr; - QMessageBox::warning(nullptr, QCoreApplication::translate("Work", "Logging error"), - QCoreApplication::translate("Work", "Unable to open file '%1'. Proceeding without logging.").arg(s.tracklogging_filename), - QMessageBox::Ok, - QMessageBox::NoButton); + QMessageBox::warning(nullptr, + otr_tr("Logging error"), + otr_tr("Unable to open file '%1'. Proceeding without logging.").arg(s.tracklogging_filename), + QMessageBox::Ok, QMessageBox::NoButton); } else { -- cgit v1.2.3