summaryrefslogtreecommitdiffstats
path: root/tools/linguist/lupdate/merge.cpp
diff options
context:
space:
mode:
authorVictor Ostashevsky <ostash@ostash.kiev.ua>2010-09-01 09:47:35 (GMT)
committerOswald Buddenhagen <oswald.buddenhagen@nokia.com>2010-09-01 09:47:46 (GMT)
commitdea941e773e297cab3a62391d21e4e1acdd93bb3 (patch)
tree6ca2a75c7ca5bdccb1a90dd578f2609d8febde09 /tools/linguist/lupdate/merge.cpp
parent6f143533666ff88c359cb7ad929e35b4decb556f (diff)
downloadQt-dea941e773e297cab3a62391d21e4e1acdd93bb3.zip
Qt-dea941e773e297cab3a62391d21e4e1acdd93bb3.tar.gz
Qt-dea941e773e297cab3a62391d21e4e1acdd93bb3.tar.bz2
Wrap translatable messages with tr() in assistant, designer and linguist
Merge-request: 2456 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Diffstat (limited to 'tools/linguist/lupdate/merge.cpp')
-rw-r--r--tools/linguist/lupdate/merge.cpp18
1 files changed, 11 insertions, 7 deletions
diff --git a/tools/linguist/lupdate/merge.cpp b/tools/linguist/lupdate/merge.cpp
index fffdf9b..87c150c 100644
--- a/tools/linguist/lupdate/merge.cpp
+++ b/tools/linguist/lupdate/merge.cpp
@@ -44,15 +44,19 @@
#include "simtexth.h"
#include "translator.h"
+#include <QtCore/QCoreApplication>
#include <QtCore/QDebug>
#include <QtCore/QMap>
#include <QtCore/QStringList>
#include <QtCore/QTextCodec>
#include <QtCore/QVector>
-
QT_BEGIN_NAMESPACE
+class LU {
+ Q_DECLARE_TR_FUNCTIONS(LUpdate)
+};
+
static bool isDigitFriendly(QChar c)
{
return c.isPunct() || c.isSpace();
@@ -485,24 +489,24 @@ Translator merge(const Translator &tor, const Translator &virginTor,
if (options & Verbose) {
int totalFound = neww + known;
- err += QObject::tr(" Found %n source text(s) (%1 new and %2 already existing)\n", 0, totalFound).arg(neww).arg(known);
+ err += LU::tr(" Found %n source text(s) (%1 new and %2 already existing)\n", 0, totalFound).arg(neww).arg(known);
if (obsoleted) {
if (options & NoObsolete) {
- err += QObject::tr(" Removed %n obsolete entries\n", 0, obsoleted);
+ err += LU::tr(" Removed %n obsolete entries\n", 0, obsoleted);
} else {
- err += QObject::tr(" Kept %n obsolete entries\n", 0, obsoleted);
+ err += LU::tr(" Kept %n obsolete entries\n", 0, obsoleted);
}
}
if (sameNumberHeuristicCount)
- err += QObject::tr(" Number heuristic provided %n translation(s)\n",
+ err += LU::tr(" Number heuristic provided %n translation(s)\n",
0, sameNumberHeuristicCount);
if (sameTextHeuristicCount)
- err += QObject::tr(" Same-text heuristic provided %n translation(s)\n",
+ err += LU::tr(" Same-text heuristic provided %n translation(s)\n",
0, sameTextHeuristicCount);
if (similarTextHeuristicCount)
- err += QObject::tr(" Similar-text heuristic provided %n translation(s)\n",
+ err += LU::tr(" Similar-text heuristic provided %n translation(s)\n",
0, similarTextHeuristicCount);
}
return outTor;