summaryrefslogtreecommitdiffstats
path: root/tests/auto/qscriptengine/translations/translatable_la.ts
diff options
context:
space:
mode:
authorKent Hansen <kent.hansen@nokia.com>2010-04-12 14:55:37 (GMT)
committerKent Hansen <kent.hansen@nokia.com>2010-04-13 13:24:40 (GMT)
commit058ba4d19b296464f87504bdc2a2076ee1368e57 (patch)
treedf97586ad78a8402e25672eb5d187b1223160a44 /tests/auto/qscriptengine/translations/translatable_la.ts
parent70141f27e6151f7d7e635ef4ac99fb1f38a1f881 (diff)
downloadQt-058ba4d19b296464f87504bdc2a2076ee1368e57.zip
Qt-058ba4d19b296464f87504bdc2a2076ee1368e57.tar.gz
Qt-058ba4d19b296464f87504bdc2a2076ee1368e57.tar.bz2
Make qsTr work in global scope
Search up the call stack to find the first non-empty source URL. Also and add an autotest for the QtScript translator functions since there was none (their presence was checked, but not their behavior...). Task-number: QTBUG-9775 Reviewed-by: Olivier Goffart
Diffstat (limited to 'tests/auto/qscriptengine/translations/translatable_la.ts')
-rw-r--r--tests/auto/qscriptengine/translations/translatable_la.ts34
1 files changed, 34 insertions, 0 deletions
diff --git a/tests/auto/qscriptengine/translations/translatable_la.ts b/tests/auto/qscriptengine/translations/translatable_la.ts
new file mode 100644
index 0000000..3f631de
--- /dev/null
+++ b/tests/auto/qscriptengine/translations/translatable_la.ts
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE TS>
+<TS version="2.0" language="nb_NO">
+<context>
+ <name>FooContext</name>
+ <message>
+ <location filename="translatable.js" line="2"/>
+ <source>Two</source>
+ <translation>To</translation>
+ </message>
+ <message>
+ <location filename="translatable.js" line="6"/>
+ <source>Goodbye</source>
+ <translation>Farvel</translation>
+ </message>
+</context>
+<context>
+ <name>translatable</name>
+ <message>
+ <location filename="translatable.js" line="1"/>
+ <source>One</source>
+ <translation>En</translation>
+ </message>
+ <message>
+ <location filename="translatable.js" line="5"/>
+ <source>Hello</source>
+ <translation>Hallo</translation>
+ </message>
+ <message>
+ <source>Goodbye</source>
+ <translation type="obsolete">Farvel</translation>
+ </message>
+</context>
+</TS>