From 09b8baac5a3bdf0707c9f4c08692b95f93d2dc2b Mon Sep 17 00:00:00 2001 From: Jeremy Rimpo Date: Wed, 4 Oct 2023 13:56:51 -0500 Subject: Tutorial translation updates --- src/mainwindow.cpp | 8 +++++++- src/tutorials/TutorialCanceller.qml | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index eb52350f..eb78eb96 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -1075,6 +1075,12 @@ void MainWindow::createEndorseMenu() void MainWindow::createHelpMenu() { + //: Translation strings for tutorial names + static std::map translate = { + {"First Steps", QT_TR_NOOP("First Steps")}, + {"Conflict Resolution", QT_TR_NOOP("Conflict Resolution")}, + {"Overview", QT_TR_NOOP("Overview")}}; + auto* menu = ui->actionHelp->menu(); if (!menu) { // this happens on startup because languageChanged() (which calls this) is @@ -1131,7 +1137,7 @@ void MainWindow::createHelpMenu() fileName); continue; } - QAction* tutAction = new QAction(params.at(0), tutorialMenu); + QAction* tutAction = new QAction(tr(translate[params.at(0)]), tutorialMenu); tutAction->setData(fileName); tutorials.push_back(std::make_pair(params.at(1).toInt(), tutAction)); } diff --git a/src/tutorials/TutorialCanceller.qml b/src/tutorials/TutorialCanceller.qml index b2e88fae..d5874ae3 100644 --- a/src/tutorials/TutorialCanceller.qml +++ b/src/tutorials/TutorialCanceller.qml @@ -38,7 +38,7 @@ Rectangle { Text { id: textBox - text: "Exit Tutorial" + text: qsTr("Exit Tutorial") font.pointSize: 12 font.bold: false width: innerWidth -- cgit v1.3.1