summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2016-11-05 13:39:38 +0100
committerStanislaw Halik <sthalik@misaki.pl>2016-11-05 13:40:56 +0100
commit229547553af68dc8aab29ec01d6a9131e5a5b03c (patch)
treeea7c5bc9b92a38777f0ccba32bd83f2995d2133c
parentea0be714fd83080831e835e13b3c694bc5241c6d (diff)
gui: make program name translatable
-rw-r--r--gui/main-window.cpp13
1 files changed, 9 insertions, 4 deletions
diff --git a/gui/main-window.cpp b/gui/main-window.cpp
index 8e04d1e5..4d0075f1 100644
--- a/gui/main-window.cpp
+++ b/gui/main-window.cpp
@@ -165,10 +165,13 @@ void MainWindow::init_tray_menu()
tray_menu.clear();
QString display_name(opentrack_version);
+ qDebug() << display_name;
if (display_name.startsWith("opentrack-"))
- display_name.replace(sizeof("opentrack") - 1, 1, QChar(' '));
+ {
+ display_name = tr("opentrack") + " " + display_name.mid(sizeof("opentrack-") - 1);
+ }
if (display_name.endsWith("-DEBUG"))
- display_name.replace(display_name.size() - int(sizeof("DEBUG")), display_name.size(), " (debug)");
+ display_name.replace(display_name.size() - int(sizeof("DEBUG")), display_name.size(), tr(" (debug)"));
menu_action_header.setEnabled(false);
menu_action_header.setText(display_name);
@@ -543,9 +546,11 @@ void MainWindow::set_title(const QString& game_title_)
{
QString game_title;
if (game_title_ != "")
- game_title = " :: " + game_title_;
+ game_title = tr(" :: ") + game_title_;
QString current = group::ini_filename();
- setWindowTitle(opentrack_version + QStringLiteral(" :: ") + current + game_title);
+ QString version(opentrack_version);
+ version = tr("opentrack") + " " + version.mid(sizeof("opentrack-") - 1);
+ setWindowTitle(version + tr(" :: ") + current + game_title);
}
void MainWindow::showHeadPose()