summaryrefslogtreecommitdiffstats
path: root/tests/auto/linguist/lupdate/testdata/good/parsejscontexts/main.js
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/linguist/lupdate/testdata/good/parsejscontexts/main.js')
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/parsejscontexts/main.js29
1 files changed, 29 insertions, 0 deletions
diff --git a/tests/auto/linguist/lupdate/testdata/good/parsejscontexts/main.js b/tests/auto/linguist/lupdate/testdata/good/parsejscontexts/main.js
new file mode 100644
index 000000000..aa510c1ae
--- /dev/null
+++ b/tests/auto/linguist/lupdate/testdata/good/parsejscontexts/main.js
@@ -0,0 +1,29 @@
+// No context specified, default should be used.
+qsTr("One");
+QT_TR_NOOP("Two");
+
+// TRANSLATOR Foo
+qsTr("Three");
+QT_TR_NOOP("Four");
+
+// TRANSLATOR Bar
+qsTr("Five");
+
+/*
+ TRANSLATOR Baz
+ This is a comment to the translator.
+*/
+QT_TR_NOOP("Six");
+
+// TRANSLATOR Foo.Bar
+qsTr("Seven");
+
+/* TRANSLATOR Bar::Baz */
+QT_TR_NOOP("Eight");
+
+// qsTranslate() context is not affected.
+qsTranslate("Foo", "Nine");
+
+// Empty context.
+// TRANSLATOR
+qsTr("Ten");