diff options
author | Mateusz Starzycki <mstarzycki@gmail.com> | 2016-06-13 23:10:13 +0100 |
---|---|---|
committer | Oswald Buddenhagen <oswald.buddenhagen@qt.io> | 2018-06-25 13:38:05 +0000 |
commit | bc47b51908e218a71a2c2078ff56375e4564c9dc (patch) | |
tree | c1ded221699dce229d434f2c056b6b0bc6493945 /tests | |
parent | f3d4e05871678f3cffb0a9867afbba1098520157 (diff) |
Add support for the new QT_TR*_N_NOOP() macro family
Task-number: QTBUG-3945
Change-Id: Ia29d97adaaf47539a19bd544729663dc893c5c14
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/linguist/lupdate/testdata/good/parsecpp/main.cpp | 17 | ||||
-rw-r--r-- | tests/auto/linguist/lupdate/testdata/good/parsecpp/project.ts.result | 25 |
2 files changed, 42 insertions, 0 deletions
diff --git a/tests/auto/linguist/lupdate/testdata/good/parsecpp/main.cpp b/tests/auto/linguist/lupdate/testdata/good/parsecpp/main.cpp index b6a002b2d..d93f1bb1f 100644 --- a/tests/auto/linguist/lupdate/testdata/good/parsecpp/main.cpp +++ b/tests/auto/linguist/lupdate/testdata/good/parsecpp/main.cpp @@ -671,3 +671,20 @@ class Class }; } + + + +// test of translation for _N_ family +static const char * const test_string_n1[] = { + QT_TRANSLATE_N_NOOP("scope", "string %n") +}; + +static const char * const test_string_n2[] = { + QT_TRANSLATE_N_NOOP3("scope", "string %n", "comment"); +}; +class testing { + Q_OBJECT + static const char * const test_string_n3[] = { + QT_TR_N_NOOP("%n test"); + }; +}; diff --git a/tests/auto/linguist/lupdate/testdata/good/parsecpp/project.ts.result b/tests/auto/linguist/lupdate/testdata/good/parsecpp/project.ts.result index e33c59bc6..7c500f6a3 100644 --- a/tests/auto/linguist/lupdate/testdata/good/parsecpp/project.ts.result +++ b/tests/auto/linguist/lupdate/testdata/good/parsecpp/project.ts.result @@ -633,5 +633,30 @@ backslashed \ stuff.</source> <source>string continuation on next line</source> <translation type="unfinished"></translation> </message> + <message numerus="yes"> + <location filename="main.cpp" line="679"/> + <source>string %n</source> + <translation type="unfinished"> + <numerusform></numerusform> + </translation> + </message> + <message numerus="yes"> + <location filename="main.cpp" line="683"/> + <source>string %n</source> + <comment>comment</comment> + <translation type="unfinished"> + <numerusform></numerusform> + </translation> + </message> +</context> +<context> + <name>testing</name> + <message numerus="yes"> + <location filename="main.cpp" line="688"/> + <source>%n test</source> + <translation type="unfinished"> + <numerusform></numerusform> + </translation> + </message> </context> </TS> |