[PATCH] Fix string in About dialog for translation

Miika Turkia miika.turkia at gmail.com
Sat Nov 30 04:57:10 UTC 2013


The translatable string in about dialog is truncated at the
VERSION_STRING. Thus it has to be given as argument to the tr function.

Signed-off-by: Miika Turkia <miika.turkia at gmail.com>
---
I am just guessing that the result will be a correct translation file
as I have no idea how to generate them and cannot do a full test.
However, this at least produces the same About box in English as without
the change.
---
 qt-ui/about.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/qt-ui/about.cpp b/qt-ui/about.cpp
index 29abf63..132f496 100644
--- a/qt-ui/about.cpp
+++ b/qt-ui/about.cpp
@@ -16,9 +16,9 @@ SubsurfaceAbout::SubsurfaceAbout(QWidget* parent, Qt::WindowFlags f)
 {
 	ui.setupUi(this);
 	ui.aboutLabel->setText(tr("<span style='font-size: 18pt; font-weight: bold;'>" \
-		"Subsurface " VERSION_STRING "</span><br><br>" \
+		"Subsurface %1 </span><br><br>" \
 		"Multi-platform divelog software<br>" \
-		"<span style='font-size: 8pt'>Linus Torvalds, Dirk Hohndel, and others, 2011, 2012, 2013</span>"));
+		"<span style='font-size: 8pt'>Linus Torvalds, Dirk Hohndel, and others, 2011, 2012, 2013</span>").arg(VERSION_STRING));
 	licenseButton = new QPushButton(tr("&License"));
 	websiteButton = new QPushButton(tr("&Website"));
 	ui.buttonBox->addButton(licenseButton, QDialogButtonBox::ActionRole);
-- 
1.8.3.2



More information about the subsurface mailing list