diff options
author | Oswald Buddenhagen <oswald.buddenhagen@nokia.com> | 2009-11-05 15:19:02 +0100 |
---|---|---|
committer | Oswald Buddenhagen <oswald.buddenhagen@nokia.com> | 2009-11-06 22:58:01 +0100 |
commit | 0a1db39ba70060f305e5694d1a12dd3c2e5bca4c (patch) | |
tree | 0e5786d7497ac56e2ef0ba2a665c7b0d642a4c62 /tests/auto/linguist | |
parent | a66698f947e8ded2e020defa626b154aca1fde9f (diff) |
record id-based messages even if they have an empty source
this makes sense if one uses lupdate only for validation purposes, i.e.
to find out if the code uses only ids which are defined in some external
specification.
Diffstat (limited to 'tests/auto/linguist')
5 files changed, 25 insertions, 0 deletions
diff --git a/tests/auto/linguist/lupdate/testdata/good/mergecpp/finddialog.cpp b/tests/auto/linguist/lupdate/testdata/good/mergecpp/finddialog.cpp index f27e1f036c..5bd7a0a1f5 100644 --- a/tests/auto/linguist/lupdate/testdata/good/mergecpp/finddialog.cpp +++ b/tests/auto/linguist/lupdate/testdata/good/mergecpp/finddialog.cpp @@ -75,4 +75,8 @@ void FindDialog::reset() //= new_id tr("this is just some text"); + + + //: A message without source string + qtTrId("qtn_virtual"); } diff --git a/tests/auto/linguist/lupdate/testdata/good/mergecpp/project.ts.before b/tests/auto/linguist/lupdate/testdata/good/mergecpp/project.ts.before index ad2f65fd49..379cce465c 100644 --- a/tests/auto/linguist/lupdate/testdata/good/mergecpp/project.ts.before +++ b/tests/auto/linguist/lupdate/testdata/good/mergecpp/project.ts.before @@ -12,6 +12,10 @@ <source>World</source> <translation>Welt</translation> </message> + <message id="qtn_virtual"> + <location filename="finddialog.cpp" line="79"/> + <extracomment>A message without source string</extracomment> + </message> </context> <context> <name>FindDialog</name> diff --git a/tests/auto/linguist/lupdate/testdata/good/mergecpp/project.ts.result b/tests/auto/linguist/lupdate/testdata/good/mergecpp/project.ts.result index e9abf89587..de43266d29 100644 --- a/tests/auto/linguist/lupdate/testdata/good/mergecpp/project.ts.result +++ b/tests/auto/linguist/lupdate/testdata/good/mergecpp/project.ts.result @@ -14,6 +14,12 @@ <oldsource>World</oldsource> <translation type="unfinished">Welt</translation> </message> + <message id="qtn_virtual"> + <location filename="finddialog.cpp" line="81"/> + <source></source> + <extracomment>A message without source string</extracomment> + <translation></translation> + </message> </context> <context> <name>FindDialog</name> diff --git a/tests/auto/linguist/lupdate/testdata/good/parsecpp/main.cpp b/tests/auto/linguist/lupdate/testdata/good/parsecpp/main.cpp index e243e662fb..386d9b7194 100644 --- a/tests/auto/linguist/lupdate/testdata/good/parsecpp/main.cpp +++ b/tests/auto/linguist/lupdate/testdata/good/parsecpp/main.cpp @@ -247,3 +247,8 @@ class YetAnotherTest : QObject { tr("nothing"); } }; + + + +//: This is a message without a source string +QString test = qtTrId("yet_another_id"); 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 26e5a65f22..6d50c21c0d 100644 --- a/tests/auto/linguist/lupdate/testdata/good/parsecpp/project.ts.result +++ b/tests/auto/linguist/lupdate/testdata/good/parsecpp/project.ts.result @@ -18,6 +18,12 @@ backslashed \ stuff.</source> </translation> <extra-some>thing</extra-some> </message> + <message id="yet_another_id"> + <location filename="main.cpp" line="254"/> + <source></source> + <extracomment>This is a message without a source string</extracomment> + <translation type="unfinished"></translation> + </message> </context> <context> <name>Dialog2</name> |