Debian Codegraph @

tests/auto/linguist/lupdate/testdata/good/parsejs/main.js

raw
1 qsTr("One");
2 qsTranslate("FooContext", "Two");
3
4 var greeting_strings = [
5 QT_TR_NOOP("Hello"),
6 QT_TRANSLATE_NOOP("FooContext", "Goodbye")
7 ];
8
9 qsTr("One", "not the same one");
10
11 //: My first comment.
12 qsTr("See comment");
13
14 //: My second comment.
15 qsTranslate("BarContext", "See other comment");
16
17 //: My third comment
18 //: spans two lines.
19 qsTr("The comment explains it all");
20
21 //: My fourth comment
22 //: spans a whopping
23 //: three lines.
24 qsTranslate("BazContext", "It should be clear by now");
25
26 /*: C-style comment. */
27 qsTr("I love C++");
28
29 /*: Another C-style comment. */
30 qsTranslate("FooContext", "I really love C++");
31
32 /*: C-style comment, followed by */
33 /*: another one. */
34 qsTr("Qt is the best");
35
36 /*: Another C-style comment, followed by */
37 /*: yet another one. */
38 qsTranslate("BarContext", "Qt is the very best");
39
40 // This comment doesn't have any effect.
41 qsTr("The comment had no effect");
42
43 // This comment doesn't have any effect either.
44 qsTranslate("BazContext", "The comment had no effect, really");
45
46 /* This C-style comment doesn't have any effect. */
47 qsTr("No comment to your comment");
48
49 /* This C-style comment doesn't have any effect either. */
50 qsTranslate("FooContext", "I refuse to comment on that");
51
52 //= id_foo
53 qsTr("This string has an identifier");
54
55 //= id_bar
56 qsTranslate("BarContext", "This string also has an identifier");
57
58 //~ loc-blank False
59 qsTr("This string has meta-data");
60
61 //~ loc-layout_id foo_dialog
62 qsTranslate("BazContext", "This string also has meta-data");
63
64 // This comment is to be ignored.
65 //: This is a comment for the translator.
66 //= id_baz
67 //~ foo 123
68 //~ magic-stuff This means something special.
69 qsTr("This string has a lot of information");
70
71 // This comment is also to be ignored.
72 //: This is another comment for the translator.
73 //= id_babar
74 //~ foo-bar Important stuff
75 //~ needle-in-haystack Found
76 //~ overflow True
77 qsTranslate("FooContext", "This string has even more information");
78
79 qsTr("This string has disambiguation", "Disambiguation");
80
81 qsTranslate("BarContext", "This string also has disambiguation", "Another disambiguation");
82
83 qsTr("This string contains plurals", "", 10);
84
85 qsTrId("qtn_foo_bar");
86
87 var more_greeting_strings = [ QT_TRID_NOOP("qtn_needle"), QT_TRID_NOOP("qtn_haystack") ];
88
89 //: qsTrId() with comment, meta-data and plurals.
90 //~ well-tested True
91 qsTrId("qtn_bar_baz", 10);
92
93 //~ quoted " string with spaces "
94 qsTr("translation with extras-quoted field");
95 //~ quoted "empty string"
96 qsTr("");