aboutsummaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorKai Koehne <kai.koehne@qt.io>2018-06-28 15:38:01 +0200
committerSimon Hausmann <simon.hausmann@qt.io>2018-07-17 08:55:11 +0000
commit369998639b37b5de46ab1b19b3dd6ca6c2b77d34 (patch)
tree684a4d9dccb42a353707a10f923b5c0120c7ac1f /examples
parent33a9fb9f4b577f8417a51379ead9008763325107 (diff)
i18n examples: Add en translation dummies
We endorse using QTranslator::install(const QLocale&...), because it tries loading translations from all QLocale::uiLanguages() instead of the commonly used QLocale::system().name() setup. Anyhow, the first method requires an English translation - otherwise a second favorite language might be used. Pave the way to making the switch by adding (empty) English translations to our examples. Task-number: QTBUG-69196 Change-Id: Ie85be875e34e29e80c1693bbf477b962e35a7d87 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Diffstat (limited to 'examples')
-rw-r--r--examples/qml/qml-i18n/i18n/qml_en.ts4
-rw-r--r--examples/quick/demos/photoviewer/i18n/qml_en.qmbin0 -> 23 bytes
-rw-r--r--examples/quick/demos/photoviewer/i18n/qml_en.ts4
-rw-r--r--examples/quick/demos/photoviewer/photoviewer.pro3
-rw-r--r--examples/quick/demos/photoviewer/qml.qrc1
5 files changed, 11 insertions, 1 deletions
diff --git a/examples/qml/qml-i18n/i18n/qml_en.ts b/examples/qml/qml-i18n/i18n/qml_en.ts
new file mode 100644
index 0000000000..eb9b75f7bf
--- /dev/null
+++ b/examples/qml/qml-i18n/i18n/qml_en.ts
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE TS>
+<TS version="2.1" language="en" sourcelanguage="en">
+</TS>
diff --git a/examples/quick/demos/photoviewer/i18n/qml_en.qm b/examples/quick/demos/photoviewer/i18n/qml_en.qm
new file mode 100644
index 0000000000..9dad8dffce
--- /dev/null
+++ b/examples/quick/demos/photoviewer/i18n/qml_en.qm
Binary files differ
diff --git a/examples/quick/demos/photoviewer/i18n/qml_en.ts b/examples/quick/demos/photoviewer/i18n/qml_en.ts
new file mode 100644
index 0000000000..5315a75526
--- /dev/null
+++ b/examples/quick/demos/photoviewer/i18n/qml_en.ts
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE TS>
+<TS version="2.1" language="en">
+</TS>
diff --git a/examples/quick/demos/photoviewer/photoviewer.pro b/examples/quick/demos/photoviewer/photoviewer.pro
index 68e43e13f9..885b81b4ad 100644
--- a/examples/quick/demos/photoviewer/photoviewer.pro
+++ b/examples/quick/demos/photoviewer/photoviewer.pro
@@ -10,7 +10,8 @@ SOURCES = *.qml \
PhotoViewerCore/script/*.js
}
-TRANSLATIONS += i18n/qml_fr.ts \
+TRANSLATIONS += i18n/qml_en.ts \
+ i18n/qml_fr.ts \
i18n/qml_de.ts
RESOURCES += qml.qrc
diff --git a/examples/quick/demos/photoviewer/qml.qrc b/examples/quick/demos/photoviewer/qml.qrc
index 8abefc6212..49f0b27e50 100644
--- a/examples/quick/demos/photoviewer/qml.qrc
+++ b/examples/quick/demos/photoviewer/qml.qrc
@@ -15,5 +15,6 @@
<file>PhotoViewerCore/script/script.js</file>
<file>i18n/qml_fr.qm</file>
<file>i18n/qml_de.qm</file>
+ <file>i18n/qml_en.qm</file>
</qresource>
</RCC>