3574e147fb
- Add bundle-lang patch to find .qm translations in /usr/share/locale-bundle/ (boo#1027925, boo#1048030) OBS-URL: https://build.opensuse.org/request/show/510131 OBS-URL: https://build.opensuse.org/package/show/KDE:Frameworks5/extra-cmake-modules?expand=0&rev=137
35 lines
1.4 KiB
Diff
35 lines
1.4 KiB
Diff
From 8c4c416228acf30862792b4a0da24d865988ea0f Mon Sep 17 00:00:00 2001
|
|
From: Wolfgang Bauer <wbauer@tmo.at>
|
|
Date: Thu, 13 Jul 2017 16:53:08 +0200
|
|
Subject: [PATCH] Also search in /usr/share/locale-bundle/ for translations
|
|
|
|
openSUSE's bundle-lang packages install the translations in
|
|
/usr/share/locale-bundle/ to not conflict with the standard -lang
|
|
packages.
|
|
|
|
So look there too if a translation was not found in /usr/share/locale/.
|
|
---
|
|
modules/ECMQmLoader.cpp.in | 6 +++++-
|
|
1 file changed, 5 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/modules/ECMQmLoader.cpp.in b/modules/ECMQmLoader.cpp.in
|
|
index 12a2d14..81fb6fb 100644
|
|
--- a/modules/ECMQmLoader.cpp.in
|
|
+++ b/modules/ECMQmLoader.cpp.in
|
|
@@ -43,7 +43,11 @@ namespace {
|
|
QString subPath = QStringLiteral("locale/") + localeDirName + QStringLiteral("/LC_MESSAGES/@QM_LOADER_CATALOG_NAME@.qm");
|
|
QString fullPath = QStandardPaths::locate(QStandardPaths::GenericDataLocation, subPath);
|
|
if (fullPath.isEmpty()) {
|
|
- return false;
|
|
+ subPath = QStringLiteral("locale-bundle/") + localeDirName + QStringLiteral("/LC_MESSAGES/@QM_LOADER_CATALOG_NAME@.qm");
|
|
+ fullPath = QStandardPaths::locate(QStandardPaths::GenericDataLocation, subPath);
|
|
+ if (fullPath.isEmpty()) {
|
|
+ return false;
|
|
+ }
|
|
}
|
|
QTranslator *translator = new QTranslator(QCoreApplication::instance());
|
|
if (!translator->load(fullPath)) {
|
|
--
|
|
2.12.3
|
|
|