summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Rimpo <jrim@rimpo.org>2023-10-04 13:56:51 -0500
committerJeremy Rimpo <jrim@rimpo.org>2023-10-04 13:57:44 -0500
commit09b8baac5a3bdf0707c9f4c08692b95f93d2dc2b (patch)
tree287138c11f967ef3fd37aa9935fefcebf492163b
parente9a5e5b274bed8c407ecbf0b10155ac8fae8f60b (diff)
Tutorial translation updates
-rw-r--r--src/mainwindow.cpp8
-rw-r--r--src/tutorials/TutorialCanceller.qml2
2 files changed, 8 insertions, 2 deletions
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<QString, const char*> 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