summaryrefslogtreecommitdiff
path: root/data
diff options
context:
space:
mode:
authorRichard Hughes <richard@hughsie.com>2016-01-26 15:56:45 +0000
committerRichard Hughes <richard@hughsie.com>2016-01-26 15:56:55 +0000
commite740ab00457cd7bbbf5a940d79a356ed0b918d1b (patch)
tree5ae1e2abd3bfd8001038bda62b873b2aa853a681 /data
parent50d31f68ffe161195f6aff606f824bdca7805ea9 (diff)
downloadappstream-glib-e740ab00457cd7bbbf5a940d79a356ed0b918d1b.tar.gz
Support the QT translation system
Fixes: https://github.com/hughsie/appdata-tools/issues/26
Diffstat (limited to 'data')
-rw-r--r--data/tests/Makefile.am5
-rw-r--r--data/tests/kdeapp.cpp4
-rw-r--r--data/tests/kdeapp.pro3
-rw-r--r--data/tests/kdeapp_fr.ts12
-rw-r--r--data/tests/usr/share/kdeapp/translations/kdeapp_fr.qmbin0 -> 112 bytes
-rwxr-xr-xdata/tests/usr/share/locale/en_GB/LC_MESSAGES/app.mo (renamed from data/tests/locale/en_GB/LC_MESSAGES/app.mo)bin628 -> 628 bytes
-rwxr-xr-xdata/tests/usr/share/locale/ru/LC_MESSAGES/app.mo (renamed from data/tests/locale/ru/LC_MESSAGES/app.mo)bin181 -> 181 bytes
7 files changed, 22 insertions, 2 deletions
diff --git a/data/tests/Makefile.am b/data/tests/Makefile.am
index 330bfa3..42cd208 100644
--- a/data/tests/Makefile.am
+++ b/data/tests/Makefile.am
@@ -30,8 +30,6 @@ test_files = \
font-1-1.fc21.noarch.rpm \
font-serif-1-1.fc21.noarch.rpm \
intltool.appdata.xml.in \
- locale/en_GB/LC_MESSAGES/app.mo \
- locale/ru/LC_MESSAGES/app.mo \
origin-icons.tar.gz \
origin.xml \
rpmbuild/app.png \
@@ -49,6 +47,9 @@ test_files = \
usr/share/applications/test.desktop \
usr/share/icons/hicolor/64x64/apps/test2.png \
usr/share/icons/hicolor/128x128/apps/test3.png \
+ usr/share/kdeapp/translations/kdeapp_fr.qm \
+ usr/share/locale/en_GB/LC_MESSAGES/app.mo \
+ usr/share/locale/ru/LC_MESSAGES/app.mo \
usr/share/pixmaps/test.png \
validate.xml.gz
diff --git a/data/tests/kdeapp.cpp b/data/tests/kdeapp.cpp
new file mode 100644
index 0000000..327efe8
--- /dev/null
+++ b/data/tests/kdeapp.cpp
@@ -0,0 +1,4 @@
+// lupdate-qt4 kdeapp.pro && lrelease-qt4 kdeapp.pro
+
+//TRANSLATIONS: comment
+label->setText(QObject::tr("Hello World"))
diff --git a/data/tests/kdeapp.pro b/data/tests/kdeapp.pro
new file mode 100644
index 0000000..3f2f5a4
--- /dev/null
+++ b/data/tests/kdeapp.pro
@@ -0,0 +1,3 @@
+SOURCES = kdeapp.cpp
+CODECFORSRC = UTF-8
+TRANSLATIONS = kdeapp_fr.ts
diff --git a/data/tests/kdeapp_fr.ts b/data/tests/kdeapp_fr.ts
new file mode 100644
index 0000000..02e3874
--- /dev/null
+++ b/data/tests/kdeapp_fr.ts
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE TS>
+<TS version="2.0" language="fr_FR">
+<context>
+ <name>QObject</name>
+ <message>
+ <location filename="kdeapp.cpp" line="4"/>
+ <source>Hello World</source>
+ <translation type="unfinished">Bonjour le monde</translation>
+ </message>
+</context>
+</TS>
diff --git a/data/tests/usr/share/kdeapp/translations/kdeapp_fr.qm b/data/tests/usr/share/kdeapp/translations/kdeapp_fr.qm
new file mode 100644
index 0000000..3c6397e
--- /dev/null
+++ b/data/tests/usr/share/kdeapp/translations/kdeapp_fr.qm
Binary files differ
diff --git a/data/tests/locale/en_GB/LC_MESSAGES/app.mo b/data/tests/usr/share/locale/en_GB/LC_MESSAGES/app.mo
index 985a1ce..985a1ce 100755
--- a/data/tests/locale/en_GB/LC_MESSAGES/app.mo
+++ b/data/tests/usr/share/locale/en_GB/LC_MESSAGES/app.mo
Binary files differ
diff --git a/data/tests/locale/ru/LC_MESSAGES/app.mo b/data/tests/usr/share/locale/ru/LC_MESSAGES/app.mo
index e70e55a..e70e55a 100755
--- a/data/tests/locale/ru/LC_MESSAGES/app.mo
+++ b/data/tests/usr/share/locale/ru/LC_MESSAGES/app.mo
Binary files differ