diff options
Diffstat (limited to 'tests/auto/linguist/lupdate/testdata/good/mergeui_obsolete')
4 files changed, 78 insertions, 0 deletions
diff --git a/tests/auto/linguist/lupdate/testdata/good/mergeui_obsolete/project.pro b/tests/auto/linguist/lupdate/testdata/good/mergeui_obsolete/project.pro new file mode 100644 index 0000000..28ba291 --- /dev/null +++ b/tests/auto/linguist/lupdate/testdata/good/mergeui_obsolete/project.pro @@ -0,0 +1,14 @@ +TEMPLATE = app +LANGUAGE = C++ + +FORMS += project.ui + +TRANSLATIONS = project.ts + +# Copy the ts to a temp file because: +# 1. The depot file is usually read-only +# 2. We don't want to modify the original file, since then it won't be possible to run the test twice +# without reverting the original file again. + +win32: system(copy /Y project.ts.before $$TRANSLATIONS) +unix: system(cp -f project.ts.before $$TRANSLATIONS && chmod a+w $$TRANSLATIONS) diff --git a/tests/auto/linguist/lupdate/testdata/good/mergeui_obsolete/project.ts.before b/tests/auto/linguist/lupdate/testdata/good/mergeui_obsolete/project.ts.before new file mode 100644 index 0000000..f06c22c --- /dev/null +++ b/tests/auto/linguist/lupdate/testdata/good/mergeui_obsolete/project.ts.before @@ -0,0 +1,16 @@ +<?xml version="1.0"?> +<!DOCTYPE TS><TS version="1.1"> +<context> + <name>FindDialog</name> + <message> + <location filename="project.ui" line="20"/> + <source>Test similarity</source> + <translation type="unfinished">Test likhet (test1)</translation> + </message> + <message> + <location filename="project.ui" line="23"/> + <source>Similarity should have kicked in here!</source> + <translation type="unfinished">Test likhet (test2)</translation> + </message> +</context> +</TS> diff --git a/tests/auto/linguist/lupdate/testdata/good/mergeui_obsolete/project.ts.result b/tests/auto/linguist/lupdate/testdata/good/mergeui_obsolete/project.ts.result new file mode 100644 index 0000000..6bc565c --- /dev/null +++ b/tests/auto/linguist/lupdate/testdata/good/mergeui_obsolete/project.ts.result @@ -0,0 +1,22 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE TS> +<TS version="2.0"> +<context> + <name>FindDialog</name> + <message> + <source>Test similarity</source> + <translation type="obsolete">Test likhet (test1)</translation> + </message> + <message> + <location filename="project.ui" line="20"/> + <source>This should not be considered to be more or less equal to the corresponding one in the TS file.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="project.ui" line="23"/> + <source>Here, similarity should kick in!</source> + <oldsource>Similarity should have kicked in here!</oldsource> + <translation type="unfinished">Test likhet (test2)</translation> + </message> +</context> +</TS> diff --git a/tests/auto/linguist/lupdate/testdata/good/mergeui_obsolete/project.ui b/tests/auto/linguist/lupdate/testdata/good/mergeui_obsolete/project.ui new file mode 100644 index 0000000..a5f8e9f --- /dev/null +++ b/tests/auto/linguist/lupdate/testdata/good/mergeui_obsolete/project.ui @@ -0,0 +1,26 @@ +<ui version="4.0" > + <author></author> + <comment><!-- +********************************************************************* +** +** Do not change the location (linenumber) of the <string> elements in this file! +** That will make the test break! +** +** If you need to add some tests, please add them to the end of the file! +** +** +********************************************************************* +--> +</comment> + <exportmacro></exportmacro> + <class>FindDialog</class> + <widget class="QWidget" name="FindDialog" > + <property name="test1"> + <!-- If the sourcetext is not similar to the vernacular sourcetext, mark the old one as obsolete and the new one as unfinished --> + <string>This should not be considered to be more or less equal to the corresponding one in the TS file.</string> + </property> + <property name="test2"> + <string>Here, similarity should kick in!</string> + </property> + </widget> +</ui> |