summaryrefslogtreecommitdiff
path: root/tests/auto/linguist
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2019-04-24 10:52:39 +0200
committerLiang Qi <liang.qi@qt.io>2019-04-24 11:55:36 +0200
commit4399a1683a016794e22ecdd03eafca07b93af4e2 (patch)
treed1a4da3ad9a57d60da2c7c71ae03a13701c67f16 /tests/auto/linguist
parentd91ecc26252f42641a23e25f6a6a18495e0e7700 (diff)
parent97075ce49ee73609330804b8bbbc12fabbb30766 (diff)
downloadqttools-4399a1683a016794e22ecdd03eafca07b93af4e2.tar.gz
Merge remote-tracking branch 'origin/5.12' into 5.13
Conflicts: .qmake.conf src/qdoc/qmlmarkupvisitor.h src/qdoc/qmlvisitor.h tests/auto/qtattributionsscanner/testdata/good/expected.json Done-With: Kai Koehne <kai.koehne@qt.io> Change-Id: I180ee214d1e5999fc1279b092bd9214b6bf8f858
Diffstat (limited to 'tests/auto/linguist')
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/heuristics/project.ts.before2
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/heuristics/project.ts.result2
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/merge_whitespace/project.ts.before2
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/merge_whitespace/project.ts.result6
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/mergecpp_noobsolete/project.ts.before2
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/mergecpp_noobsolete/project.ts.result2
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/mergecpp_obsolete/project.ts.before2
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/mergecpp_obsolete/project.ts.result2
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/mergeui/project.ts.before2
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/mergeui/project.ts.result2
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/mergeui_obsolete/project.ts.before2
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/mergeui_obsolete/project.ts.result2
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/notargetlanguage/main.cpp42
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/notargetlanguage/project.pro3
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/notargetlanguage/project.ts.before15
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/notargetlanguage/project.ts.result15
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/prefix/main.cpp13
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/prefix/project.ts.result24
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/textsimilarity/project.ts.before2
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/textsimilarity/project.ts.result2
20 files changed, 128 insertions, 16 deletions
diff --git a/tests/auto/linguist/lupdate/testdata/good/heuristics/project.ts.before b/tests/auto/linguist/lupdate/testdata/good/heuristics/project.ts.before
index ce8281033..e72debed9 100644
--- a/tests/auto/linguist/lupdate/testdata/good/heuristics/project.ts.before
+++ b/tests/auto/linguist/lupdate/testdata/good/heuristics/project.ts.before
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
-<TS version="2.0">
+<TS version="2.0" language="de_DE">
<context>
<name>A</name>
<message>
diff --git a/tests/auto/linguist/lupdate/testdata/good/heuristics/project.ts.result b/tests/auto/linguist/lupdate/testdata/good/heuristics/project.ts.result
index 155967a52..351bdff7d 100644
--- a/tests/auto/linguist/lupdate/testdata/good/heuristics/project.ts.result
+++ b/tests/auto/linguist/lupdate/testdata/good/heuristics/project.ts.result
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
-<TS version="2.1">
+<TS version="2.1" language="de_DE">
<context>
<name>A</name>
<message>
diff --git a/tests/auto/linguist/lupdate/testdata/good/merge_whitespace/project.ts.before b/tests/auto/linguist/lupdate/testdata/good/merge_whitespace/project.ts.before
index 0f84fedb8..ab91cac9d 100644
--- a/tests/auto/linguist/lupdate/testdata/good/merge_whitespace/project.ts.before
+++ b/tests/auto/linguist/lupdate/testdata/good/merge_whitespace/project.ts.before
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<!DOCTYPE TS><TS version="1.1">
+<!DOCTYPE TS><TS version="1.1" language="en_EN">
<context>
<name>QObject</name>
<message>
diff --git a/tests/auto/linguist/lupdate/testdata/good/merge_whitespace/project.ts.result b/tests/auto/linguist/lupdate/testdata/good/merge_whitespace/project.ts.result
index 64ec91076..486abcec4 100644
--- a/tests/auto/linguist/lupdate/testdata/good/merge_whitespace/project.ts.result
+++ b/tests/auto/linguist/lupdate/testdata/good/merge_whitespace/project.ts.result
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
-<TS version="2.1">
+<TS version="2.1" language="en_EN">
<context>
<name>QObject</name>
<message>
@@ -62,9 +62,9 @@ NEWLINE AT THE START</translation>
</message>
<message>
<location filename="main.cpp" line="49"/>
- <source>carriage return and line feed last
+ <source>carriage return and line feed last<byte value="xd"/>
</source>
- <translation type="unfinished">CARRIAGE RETURN AND LINE FEED LAST
+ <translation type="unfinished">CARRIAGE RETURN AND LINE FEED LAST<byte value="xd"/>
</translation>
</message>
</context>
diff --git a/tests/auto/linguist/lupdate/testdata/good/mergecpp_noobsolete/project.ts.before b/tests/auto/linguist/lupdate/testdata/good/mergecpp_noobsolete/project.ts.before
index feab1694d..f9915e9ba 100644
--- a/tests/auto/linguist/lupdate/testdata/good/mergecpp_noobsolete/project.ts.before
+++ b/tests/auto/linguist/lupdate/testdata/good/mergecpp_noobsolete/project.ts.before
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<!DOCTYPE TS><TS version="1.1">
+<!DOCTYPE TS><TS version="1.1" language="en_EN">
<context>
<name></name>
<message id="keep_id">
diff --git a/tests/auto/linguist/lupdate/testdata/good/mergecpp_noobsolete/project.ts.result b/tests/auto/linguist/lupdate/testdata/good/mergecpp_noobsolete/project.ts.result
index a0cdda96a..516072d5e 100644
--- a/tests/auto/linguist/lupdate/testdata/good/mergecpp_noobsolete/project.ts.result
+++ b/tests/auto/linguist/lupdate/testdata/good/mergecpp_noobsolete/project.ts.result
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
-<TS version="2.1">
+<TS version="2.1" language="en_EN">
<context>
<name></name>
<message id="keep_id">
diff --git a/tests/auto/linguist/lupdate/testdata/good/mergecpp_obsolete/project.ts.before b/tests/auto/linguist/lupdate/testdata/good/mergecpp_obsolete/project.ts.before
index 2af303be4..99443bbad 100644
--- a/tests/auto/linguist/lupdate/testdata/good/mergecpp_obsolete/project.ts.before
+++ b/tests/auto/linguist/lupdate/testdata/good/mergecpp_obsolete/project.ts.before
@@ -1,5 +1,5 @@
<?xml version="1.0"?>
-<!DOCTYPE TS><TS version="1.1">
+<!DOCTYPE TS><TS version="1.1" language="en_EN">
<context>
<name></name>
<message id="keep_id">
diff --git a/tests/auto/linguist/lupdate/testdata/good/mergecpp_obsolete/project.ts.result b/tests/auto/linguist/lupdate/testdata/good/mergecpp_obsolete/project.ts.result
index 1fcfea4e5..b6d47c8dd 100644
--- a/tests/auto/linguist/lupdate/testdata/good/mergecpp_obsolete/project.ts.result
+++ b/tests/auto/linguist/lupdate/testdata/good/mergecpp_obsolete/project.ts.result
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
-<TS version="2.1">
+<TS version="2.1" language="en_EN">
<context>
<name></name>
<message id="keep_id">
diff --git a/tests/auto/linguist/lupdate/testdata/good/mergeui/project.ts.before b/tests/auto/linguist/lupdate/testdata/good/mergeui/project.ts.before
index b96cd4ee9..b9333c9dd 100644
--- a/tests/auto/linguist/lupdate/testdata/good/mergeui/project.ts.before
+++ b/tests/auto/linguist/lupdate/testdata/good/mergeui/project.ts.before
@@ -1,5 +1,5 @@
<?xml version="1.0"?>
-<!DOCTYPE TS><TS version="1.1">
+<!DOCTYPE TS><TS version="1.1" language="no_NO">
<context>
<name>FindDialog</name>
<message>
diff --git a/tests/auto/linguist/lupdate/testdata/good/mergeui/project.ts.result b/tests/auto/linguist/lupdate/testdata/good/mergeui/project.ts.result
index 00c70ed94..8d51b197d 100644
--- a/tests/auto/linguist/lupdate/testdata/good/mergeui/project.ts.result
+++ b/tests/auto/linguist/lupdate/testdata/good/mergeui/project.ts.result
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
-<TS version="2.1">
+<TS version="2.1" language="no_NO">
<context>
<name>FindDialog</name>
<message>
diff --git a/tests/auto/linguist/lupdate/testdata/good/mergeui_obsolete/project.ts.before b/tests/auto/linguist/lupdate/testdata/good/mergeui_obsolete/project.ts.before
index f06c22ca8..d47409c84 100644
--- a/tests/auto/linguist/lupdate/testdata/good/mergeui_obsolete/project.ts.before
+++ b/tests/auto/linguist/lupdate/testdata/good/mergeui_obsolete/project.ts.before
@@ -1,5 +1,5 @@
<?xml version="1.0"?>
-<!DOCTYPE TS><TS version="1.1">
+<!DOCTYPE TS><TS version="1.1" language="no_NO">
<context>
<name>FindDialog</name>
<message>
diff --git a/tests/auto/linguist/lupdate/testdata/good/mergeui_obsolete/project.ts.result b/tests/auto/linguist/lupdate/testdata/good/mergeui_obsolete/project.ts.result
index 2636ae075..79a6e8c51 100644
--- a/tests/auto/linguist/lupdate/testdata/good/mergeui_obsolete/project.ts.result
+++ b/tests/auto/linguist/lupdate/testdata/good/mergeui_obsolete/project.ts.result
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
-<TS version="2.1">
+<TS version="2.1" language="no_NO">
<context>
<name>FindDialog</name>
<message>
diff --git a/tests/auto/linguist/lupdate/testdata/good/notargetlanguage/main.cpp b/tests/auto/linguist/lupdate/testdata/good/notargetlanguage/main.cpp
new file mode 100644
index 000000000..157979b70
--- /dev/null
+++ b/tests/auto/linguist/lupdate/testdata/good/notargetlanguage/main.cpp
@@ -0,0 +1,42 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+#include <QApplication>
+#include <QPushButton>
+#include <QTranslator>
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+
+ QTranslator translator;
+ app.installTranslator(&translator);
+
+ QObject::tr("un mot","toto",1);
+
+ return app.exec();
+}
diff --git a/tests/auto/linguist/lupdate/testdata/good/notargetlanguage/project.pro b/tests/auto/linguist/lupdate/testdata/good/notargetlanguage/project.pro
new file mode 100644
index 000000000..759bea068
--- /dev/null
+++ b/tests/auto/linguist/lupdate/testdata/good/notargetlanguage/project.pro
@@ -0,0 +1,3 @@
+SOURCES = main.cpp
+
+TRANSLATIONS = project.ts
diff --git a/tests/auto/linguist/lupdate/testdata/good/notargetlanguage/project.ts.before b/tests/auto/linguist/lupdate/testdata/good/notargetlanguage/project.ts.before
new file mode 100644
index 000000000..7216e069c
--- /dev/null
+++ b/tests/auto/linguist/lupdate/testdata/good/notargetlanguage/project.ts.before
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE TS>
+<TS version="2.1">
+<context>
+ <name>QObject</name>
+ <message numerus="yes">
+ <location filename="main.cpp" line="39"/>
+ <source>un mot</source>
+ <comment>toto</comment>
+ <translation type="unfinished">
+ <numerusform>ein Wort</numerusform>
+ </translation>
+ </message>
+</context>
+</TS>
diff --git a/tests/auto/linguist/lupdate/testdata/good/notargetlanguage/project.ts.result b/tests/auto/linguist/lupdate/testdata/good/notargetlanguage/project.ts.result
new file mode 100644
index 000000000..7216e069c
--- /dev/null
+++ b/tests/auto/linguist/lupdate/testdata/good/notargetlanguage/project.ts.result
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE TS>
+<TS version="2.1">
+<context>
+ <name>QObject</name>
+ <message numerus="yes">
+ <location filename="main.cpp" line="39"/>
+ <source>un mot</source>
+ <comment>toto</comment>
+ <translation type="unfinished">
+ <numerusform>ein Wort</numerusform>
+ </translation>
+ </message>
+</context>
+</TS>
diff --git a/tests/auto/linguist/lupdate/testdata/good/prefix/main.cpp b/tests/auto/linguist/lupdate/testdata/good/prefix/main.cpp
index 772ebfb29..6cef7a28c 100644
--- a/tests/auto/linguist/lupdate/testdata/good/prefix/main.cpp
+++ b/tests/auto/linguist/lupdate/testdata/good/prefix/main.cpp
@@ -41,3 +41,16 @@ void Foo::bar()
{
tr("BAR");
}
+
+class BitFields : public QObject
+{
+ int bits : 20;
+ QString str = tr("text BitFields");
+};
+
+Bibi::Bibi()
+{
+ int bits : 32;
+ tr("text Bibi");
+ Babebi::tr("text Babebi");
+}
diff --git a/tests/auto/linguist/lupdate/testdata/good/prefix/project.ts.result b/tests/auto/linguist/lupdate/testdata/good/prefix/project.ts.result
index 7e7e27742..e4f347db2 100644
--- a/tests/auto/linguist/lupdate/testdata/good/prefix/project.ts.result
+++ b/tests/auto/linguist/lupdate/testdata/good/prefix/project.ts.result
@@ -2,6 +2,30 @@
<!DOCTYPE TS>
<TS version="2.1">
<context>
+ <name>Babebi</name>
+ <message>
+ <location filename="main.cpp" line="55"/>
+ <source>text Babebi</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>Bibi</name>
+ <message>
+ <location filename="main.cpp" line="54"/>
+ <source>text Bibi</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>BitFields</name>
+ <message>
+ <location filename="main.cpp" line="48"/>
+ <source>text BitFields</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
<name>Foo</name>
<message>
<location filename="main.cpp" line="32"/>
diff --git a/tests/auto/linguist/lupdate/testdata/good/textsimilarity/project.ts.before b/tests/auto/linguist/lupdate/testdata/good/textsimilarity/project.ts.before
index f06c22ca8..d47409c84 100644
--- a/tests/auto/linguist/lupdate/testdata/good/textsimilarity/project.ts.before
+++ b/tests/auto/linguist/lupdate/testdata/good/textsimilarity/project.ts.before
@@ -1,5 +1,5 @@
<?xml version="1.0"?>
-<!DOCTYPE TS><TS version="1.1">
+<!DOCTYPE TS><TS version="1.1" language="no_NO">
<context>
<name>FindDialog</name>
<message>
diff --git a/tests/auto/linguist/lupdate/testdata/good/textsimilarity/project.ts.result b/tests/auto/linguist/lupdate/testdata/good/textsimilarity/project.ts.result
index 2636ae075..79a6e8c51 100644
--- a/tests/auto/linguist/lupdate/testdata/good/textsimilarity/project.ts.result
+++ b/tests/auto/linguist/lupdate/testdata/good/textsimilarity/project.ts.result
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
-<TS version="2.1">
+<TS version="2.1" language="no_NO">
<context>
<name>FindDialog</name>
<message>