summaryrefslogtreecommitdiffstats
path: root/tests/auto/linguist
diff options
context:
space:
mode:
authorKent Hansen <kent.hansen@nokia.com>2010-06-29 14:56:18 (GMT)
committerKent Hansen <kent.hansen@nokia.com>2010-08-23 08:25:41 (GMT)
commita5867a413d14f307c0f20b7080840b15bd8743e4 (patch)
tree31a592ea1c42065892ecb615c68729bb6ec3a804 /tests/auto/linguist
parent1c4e3cf9870df591c60dc7d59df2b98b8eb534b0 (diff)
downloadQt-a5867a413d14f307c0f20b7080840b15bd8743e4.zip
Qt-a5867a413d14f307c0f20b7080840b15bd8743e4.tar.gz
Qt-a5867a413d14f307c0f20b7080840b15bd8743e4.tar.bz2
Make lupdate's QtScript frontend recognize qsTrId() / QT_TRID_NOOP()
Extracting the translation data is only the first step; a separate commit will make the functions available in the QtScript runtime. Task-number: QTBUG-8454 Reviewed-by: Oswald Buddenhagen
Diffstat (limited to 'tests/auto/linguist')
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/parsejs/main.js8
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/parsejs/project.ts.result27
2 files changed, 35 insertions, 0 deletions
diff --git a/tests/auto/linguist/lupdate/testdata/good/parsejs/main.js b/tests/auto/linguist/lupdate/testdata/good/parsejs/main.js
index edd7529..9f61cea 100644
--- a/tests/auto/linguist/lupdate/testdata/good/parsejs/main.js
+++ b/tests/auto/linguist/lupdate/testdata/good/parsejs/main.js
@@ -81,3 +81,11 @@ qsTr("This string has disambiguation", "Disambiguation");
qsTranslate("BarContext", "This string also has disambiguation", "Another disambiguation");
qsTr("This string contains plurals", "", 10);
+
+qsTrId("qtn_foo_bar");
+
+var more_greeting_strings = [ QT_TRID_NOOP("qtn_needle"), QT_TRID_NOOP("qtn_haystack") ];
+
+//: qsTrId() with comment, meta-data and plurals.
+//~ well-tested True
+qsTrId("qtn_bar_baz", 10);
diff --git a/tests/auto/linguist/lupdate/testdata/good/parsejs/project.ts.result b/tests/auto/linguist/lupdate/testdata/good/parsejs/project.ts.result
index d2016de..d03c713 100644
--- a/tests/auto/linguist/lupdate/testdata/good/parsejs/project.ts.result
+++ b/tests/auto/linguist/lupdate/testdata/good/parsejs/project.ts.result
@@ -2,6 +2,33 @@
<!DOCTYPE TS>
<TS version="2.0">
<context>
+ <name></name>
+ <message id="qtn_foo_bar">
+ <location filename="main.js" line="85"/>
+ <source></source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message id="qtn_needle">
+ <location filename="main.js" line="87"/>
+ <source></source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message id="qtn_haystack">
+ <location filename="main.js" line="87"/>
+ <source></source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message id="qtn_bar_baz" numerus="yes">
+ <location filename="main.js" line="91"/>
+ <source></source>
+ <extracomment>qsTrId() with comment, meta-data and plurals.</extracomment>
+ <translation type="unfinished">
+ <numerusform></numerusform>
+ </translation>
+ <extra-well-tested>True</extra-well-tested>
+ </message>
+</context>
+<context>
<name>BarContext</name>
<message>
<location filename="main.js" line="15"/>