Make entire top part of about screen translatable
authorWuzzy <almikes@aol.com>
Mon, 10 Apr 2017 23:10:56 +0200
changeset 12224 072ece492a65
parent 12223 b532cc42ebd4
child 12225 a7c08e4748ff
Make entire top part of about screen translatable
QTfrontend/ui/widget/about.cpp
--- a/QTfrontend/ui/widget/about.cpp	Mon Apr 10 22:43:55 2017 +0200
+++ b/QTfrontend/ui/widget/about.cpp	Mon Apr 10 23:10:56 2017 +0200
@@ -75,11 +75,18 @@
         "a { color: #ffcc00; }"
 //            "a:hover { color: yellow; }"
         "</style>"
-        "<div align=\"center\"><h1>Hedgewars " + *cVersionString + "</h1>"
-        "<h3>" + QLabel::tr("Revision") + " " + *cRevisionString + " (" + *cHashString + ")</h3>"
-        "<p><a href=\"https://www.hedgewars.org/\">https://www.hedgewars.org/</a></p>" +
-        QLabel::tr("This program is distributed under the %1").arg("<a \
-        href=\"http://www.gnu.org/licenses/gpl-2.0.html\">GNU GPL v2</a>") +
+        //: %1 contains Hedgewars' version number
+        "<div align=\"center\"><h1>"+QString(tr("Hedgewars %1")).arg(*cVersionString) + "</h1>"
+        //: “Revision” stands for a revision in Mercurial, a distributed version control system. %1 is the revision, %2 is the hexadecimal hash.
+        "<h3>" + QString(tr("Revision %1 (%2)")).arg(*cRevisionString, *cHashString) + "</h3>"
+        //: %1 is replaced by the URL of Hedgewars.
+        "<p>" + QString(tr("Visit our homepage: %1"))
+        .arg("<a href=\"https://www.hedgewars.org/\">https://www.hedgewars.org/</a>") + "</p>" +
+        //: %1 is the name of a license
+        tr("This program is distributed under the %1.")
+	.arg("<a href=\"http://www.gnu.org/licenses/gpl-2.0.html\">"+
+        //: Short for “GNU General Public License version 2”
+        tr("GNU GPL v2")+"</a>") +
         "</div>"
     );
     lbl1->setWordWrap(true);
@@ -94,6 +101,7 @@
     /* Library information */
 
     QString libinfo = "<style type=text/css>a:link { color: #FFFF6E; }</style>";
+    //: For the version numbers of Hedgewars' software dependencies
     libinfo.append(QString(tr("Dependency versions:") + QString("<br>")));
 
 #ifdef __GNUC__