diff options
author | Oswald Buddenhagen <oswald.buddenhagen@nokia.com> | 2010-08-30 15:13:46 (GMT) |
---|---|---|
committer | Oswald Buddenhagen <oswald.buddenhagen@nokia.com> | 2010-08-30 15:20:14 (GMT) |
commit | d1a588512cec7d5fea8ee53b9c0f102d27d1e687 (patch) | |
tree | 624ba87e14af1bc4e8c592b098a9891cd9a77ccf /tests/auto/linguist/lconvert | |
parent | d686a95ed54b19336affc14c9222de54c9af0e72 (diff) | |
download | Qt-d1a588512cec7d5fea8ee53b9c0f102d27d1e687.zip Qt-d1a588512cec7d5fea8ee53b9c0f102d27d1e687.tar.gz Qt-d1a588512cec7d5fea8ee53b9c0f102d27d1e687.tar.bz2 |
preserve non-standard source references
the PO format doc suggests that all references are in
filename:linennumber format, but some tools seem to deviate from that.
so do our best to preserve such references, even if we can't do anything
with them.
Task-number: QTBUG-9488
Diffstat (limited to 'tests/auto/linguist/lconvert')
-rw-r--r-- | tests/auto/linguist/lconvert/data/test-refs.po | 23 | ||||
-rw-r--r-- | tests/auto/linguist/lconvert/tst_lconvert.cpp | 2 |
2 files changed, 25 insertions, 0 deletions
diff --git a/tests/auto/linguist/lconvert/data/test-refs.po b/tests/auto/linguist/lconvert/data/test-refs.po new file mode 100644 index 0000000..e149a38 --- /dev/null +++ b/tests/auto/linguist/lconvert/data/test-refs.po @@ -0,0 +1,23 @@ +msgid "" +msgstr "" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"X-Language: de_DE\n" + +#: themer/kdmlabel.cpp:285 +#, no-c-format +msgctxt "date format" +msgid "%a %d %B" +msgstr "%a %d %B" + +#: foo.bar.baz +#, no-c-format +msgid "full java class name" +msgstr "" + +#: foo.car:123 monks:here file/gar.c:17:19 no:monks:here +#, no-c-format +msgid "some excessive locations" +msgstr "" diff --git a/tests/auto/linguist/lconvert/tst_lconvert.cpp b/tests/auto/linguist/lconvert/tst_lconvert.cpp index 998f588..a3c29d8 100644 --- a/tests/auto/linguist/lconvert/tst_lconvert.cpp +++ b/tests/auto/linguist/lconvert/tst_lconvert.cpp @@ -317,6 +317,8 @@ void tst_lconvert::roundtrips_data() QTest::newRow("po-xliff-po (plural-2)") << "plural-2.po" << poXlfPo << noArgs; QTest::newRow("po-xliff-po (plural-3)") << "plural-3.po" << poXlfPo << noArgs; + QTest::newRow("po-ts-po (references)") << "test-refs.po" << poTsPo << noArgs; + QTest::newRow("ts20-ts11-ts20 (utf8)") << "codec-utf8.ts" << tsTs11Ts << noArgs; QTest::newRow("ts20-ts11-ts20 (cp1252)") << "codec-cp1252.ts" << tsTs11Ts << noArgs; QTest::newRow("ts20-ts11-ts20 (dual-encoding)") << "dual-encoding.ts" << tsTs11Ts << noArgs; |