summaryrefslogtreecommitdiffstats
path: root/tests/auto/linguist/lupdate/testdata/good/textsimilarity
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/linguist/lupdate/testdata/good/textsimilarity')
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/textsimilarity/project.pro3
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/textsimilarity/project.ts.before16
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/textsimilarity/project.ts.result22
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/textsimilarity/project.ui26
4 files changed, 67 insertions, 0 deletions
diff --git a/tests/auto/linguist/lupdate/testdata/good/textsimilarity/project.pro b/tests/auto/linguist/lupdate/testdata/good/textsimilarity/project.pro
new file mode 100644
index 000000000..fa56972dd
--- /dev/null
+++ b/tests/auto/linguist/lupdate/testdata/good/textsimilarity/project.pro
@@ -0,0 +1,3 @@
+FORMS += project.ui
+
+TRANSLATIONS = project.ts
diff --git a/tests/auto/linguist/lupdate/testdata/good/textsimilarity/project.ts.before b/tests/auto/linguist/lupdate/testdata/good/textsimilarity/project.ts.before
new file mode 100644
index 000000000..f06c22ca8
--- /dev/null
+++ b/tests/auto/linguist/lupdate/testdata/good/textsimilarity/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/textsimilarity/project.ts.result b/tests/auto/linguist/lupdate/testdata/good/textsimilarity/project.ts.result
new file mode 100644
index 000000000..6bc565c1e
--- /dev/null
+++ b/tests/auto/linguist/lupdate/testdata/good/textsimilarity/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/textsimilarity/project.ui b/tests/auto/linguist/lupdate/testdata/good/textsimilarity/project.ui
new file mode 100644
index 000000000..a5f8e9f79
--- /dev/null
+++ b/tests/auto/linguist/lupdate/testdata/good/textsimilarity/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>