summaryrefslogtreecommitdiff
path: root/tests/auto/linguist/lupdate/testdata
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2016-11-04 11:27:59 +0100
committerLiang Qi <liang.qi@qt.io>2016-11-04 11:30:39 +0100
commit21c61b26bfb7d6bafac848effd0a169db48ad991 (patch)
tree4506020e9c61afd641a442b71e33ef661bab847e /tests/auto/linguist/lupdate/testdata
parentae9472a39327ce5d5d6735308bd2aef272771391 (diff)
parentb5cb222357841b8dad6fc80aa8e6e88047f20c00 (diff)
downloadqttools-21c61b26bfb7d6bafac848effd0a169db48ad991.tar.gz
Merge remote-tracking branch 'origin/5.6' into 5.7
Change-Id: I4ee208f69bed72c480c636cb18f22fd88c02d1e5
Diffstat (limited to 'tests/auto/linguist/lupdate/testdata')
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/parseqrc/main.cpp42
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/parseqrc/main.js1
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/parseqrc/main.qml40
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/parseqrc/project.pro7
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/parseqrc/project.qrc5
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/parseqrc/project.ts.result25
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/resources_cmdline/lupdatecmd1
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/resources_cmdline/main.js1
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/resources_cmdline/main.qml40
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/resources_cmdline/project.qrc6
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/resources_cmdline/project.ts.result17
11 files changed, 185 insertions, 0 deletions
diff --git a/tests/auto/linguist/lupdate/testdata/good/parseqrc/main.cpp b/tests/auto/linguist/lupdate/testdata/good/parseqrc/main.cpp
new file mode 100644
index 000000000..7108f6784
--- /dev/null
+++ b/tests/auto/linguist/lupdate/testdata/good/parseqrc/main.cpp
@@ -0,0 +1,42 @@
+/****************************************************************************
+**
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL21$
+** 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 http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+// IMPORTANT!!!! If you want to add testdata to this file,
+// always add it to the end in order to not change the linenumbers of translations!!!
+
+
+void func1() {
+ QApplication::tr("Hello world");
+}
+
+
diff --git a/tests/auto/linguist/lupdate/testdata/good/parseqrc/main.js b/tests/auto/linguist/lupdate/testdata/good/parseqrc/main.js
new file mode 100644
index 000000000..b2e1dd9e0
--- /dev/null
+++ b/tests/auto/linguist/lupdate/testdata/good/parseqrc/main.js
@@ -0,0 +1 @@
+qsTr("From JavaScript file");
diff --git a/tests/auto/linguist/lupdate/testdata/good/parseqrc/main.qml b/tests/auto/linguist/lupdate/testdata/good/parseqrc/main.qml
new file mode 100644
index 000000000..ea2258343
--- /dev/null
+++ b/tests/auto/linguist/lupdate/testdata/good/parseqrc/main.qml
@@ -0,0 +1,40 @@
+/****************************************************************************
+**
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL21$
+** 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 http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 1.0
+
+QtObject {
+ function translate() {
+ qsTr("From QML file in root");
+ }
+}
diff --git a/tests/auto/linguist/lupdate/testdata/good/parseqrc/project.pro b/tests/auto/linguist/lupdate/testdata/good/parseqrc/project.pro
new file mode 100644
index 000000000..5000c7396
--- /dev/null
+++ b/tests/auto/linguist/lupdate/testdata/good/parseqrc/project.pro
@@ -0,0 +1,7 @@
+
+SOURCES += main.cpp
+
+RESOURCES += project.qrc
+RESOURCES += main.qml
+
+TRANSLATIONS = project.ts
diff --git a/tests/auto/linguist/lupdate/testdata/good/parseqrc/project.qrc b/tests/auto/linguist/lupdate/testdata/good/parseqrc/project.qrc
new file mode 100644
index 000000000..87bacf228
--- /dev/null
+++ b/tests/auto/linguist/lupdate/testdata/good/parseqrc/project.qrc
@@ -0,0 +1,5 @@
+<!DOCTYPE RCC><RCC version="1.0">
+<qresource prefix="/">
+ <file>main.js</file>
+</qresource>
+</RCC>
diff --git a/tests/auto/linguist/lupdate/testdata/good/parseqrc/project.ts.result b/tests/auto/linguist/lupdate/testdata/good/parseqrc/project.ts.result
new file mode 100644
index 000000000..6dcd8c2a5
--- /dev/null
+++ b/tests/auto/linguist/lupdate/testdata/good/parseqrc/project.ts.result
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE TS>
+<TS version="2.1">
+<context>
+ <name>QApplication</name>
+ <message>
+ <location filename="main.cpp" line="39"/>
+ <source>Hello world</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>main</name>
+ <message>
+ <location filename="main.js" line="1"/>
+ <source>From JavaScript file</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="main.qml" line="38"/>
+ <source>From QML file in root</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+</TS>
diff --git a/tests/auto/linguist/lupdate/testdata/good/resources_cmdline/lupdatecmd b/tests/auto/linguist/lupdate/testdata/good/resources_cmdline/lupdatecmd
new file mode 100644
index 000000000..f3709944b
--- /dev/null
+++ b/tests/auto/linguist/lupdate/testdata/good/resources_cmdline/lupdatecmd
@@ -0,0 +1 @@
+lupdate project.qrc -ts project.ts
diff --git a/tests/auto/linguist/lupdate/testdata/good/resources_cmdline/main.js b/tests/auto/linguist/lupdate/testdata/good/resources_cmdline/main.js
new file mode 100644
index 000000000..b2e1dd9e0
--- /dev/null
+++ b/tests/auto/linguist/lupdate/testdata/good/resources_cmdline/main.js
@@ -0,0 +1 @@
+qsTr("From JavaScript file");
diff --git a/tests/auto/linguist/lupdate/testdata/good/resources_cmdline/main.qml b/tests/auto/linguist/lupdate/testdata/good/resources_cmdline/main.qml
new file mode 100644
index 000000000..ea2258343
--- /dev/null
+++ b/tests/auto/linguist/lupdate/testdata/good/resources_cmdline/main.qml
@@ -0,0 +1,40 @@
+/****************************************************************************
+**
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL21$
+** 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 http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 1.0
+
+QtObject {
+ function translate() {
+ qsTr("From QML file in root");
+ }
+}
diff --git a/tests/auto/linguist/lupdate/testdata/good/resources_cmdline/project.qrc b/tests/auto/linguist/lupdate/testdata/good/resources_cmdline/project.qrc
new file mode 100644
index 000000000..c5bf15067
--- /dev/null
+++ b/tests/auto/linguist/lupdate/testdata/good/resources_cmdline/project.qrc
@@ -0,0 +1,6 @@
+<!DOCTYPE RCC><RCC version="1.0">
+<qresource prefix="/">
+ <file>main.qml</file>
+ <file>main.js</file>
+</qresource>
+</RCC>
diff --git a/tests/auto/linguist/lupdate/testdata/good/resources_cmdline/project.ts.result b/tests/auto/linguist/lupdate/testdata/good/resources_cmdline/project.ts.result
new file mode 100644
index 000000000..82719c026
--- /dev/null
+++ b/tests/auto/linguist/lupdate/testdata/good/resources_cmdline/project.ts.result
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE TS>
+<TS version="2.1">
+<context>
+ <name>main</name>
+ <message>
+ <location filename="main.qml" line="38"/>
+ <source>From QML file in root</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="main.js" line="1"/>
+ <source>From JavaScript file</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+</TS>