[Gpg4win-commits] [git] Gpg4win - branch, kleo-kf5, updated. gpg4win-2.3.0-83-g863fc01

by Andre Heinecke cvs at cvs.gnupg.org
Mon Feb 22 10:53:35 CET 2016


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GnuPG for Windows".

The branch, kleo-kf5 has been updated
       via  863fc017a6540c87fb87832c61effff8075e3bbb (commit)
      from  3fc233e1b5037bece7646fae7c50310f043ecc20 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 863fc017a6540c87fb87832c61effff8075e3bbb
Author: Andre Heinecke <aheinecke at intevation.de>
Date:   Mon Feb 22 10:52:33 2016 +0100

    Add patch for language name fallback in xmlgui
    
    * Makefile.am (EXTRA_DIST): Add patch.
    * patches/kxmlgui/0005-Use-non-native-Language-name-as-fallback.patch:
     New.
    
    --
    This is upstream review request: 127136

diff --git a/Makefile.am b/Makefile.am
index 18e628e..fc0f1c7 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -43,6 +43,7 @@ EXTRA_DIST = autogen.sh README.GIT ONEWS \
         patches/kxmlgui/0002-Make-QDBus-dependency-optional.patch \
         patches/kxmlgui/0003-Make-KTextWidgets-optional.patch \
         patches/kxmlgui/0004-Cruedly-disable-KSendbugmail.patch \
+        patches/kxmlgui/0005-Use-non-native-Language-name-as-fallback.patch \
         patches/kconfigwidgets/0001-Make-QDbus-optional.patch \
         patches/kconfigwidgets/0002-Crudely-remove-KF5Auth-depedency.patch \
         patches/kiconthemes/0001-Make-DBus-optional.patch \
diff --git a/patches/kxmlgui/0005-Use-non-native-Language-name-as-fallback.patch b/patches/kxmlgui/0005-Use-non-native-Language-name-as-fallback.patch
new file mode 100644
index 0000000..f299f0e
--- /dev/null
+++ b/patches/kxmlgui/0005-Use-non-native-Language-name-as-fallback.patch
@@ -0,0 +1,41 @@
+#! /bin/sh
+patch -p1 -l -f $* < $0
+exit $?
+
+From aa75395f2d4b203b3b764f2a3a622dc4f465e930 Mon Sep 17 00:00:00 2001
+From: Andre Heinecke <aheinecke at intevation.de>
+Date: Fri, 19 Feb 2016 14:57:57 +0100
+Subject: [PATCH] Use non native Language name as fallback
+
+Some languages like Lower German don't have a native Language
+name in Qt. So we use a fallback to avoid showing empty menu
+entries.
+---
+ src/kswitchlanguagedialog_p.cpp | 8 ++++++--
+ 1 file changed, 6 insertions(+), 2 deletions(-)
+
+diff --git a/src/kswitchlanguagedialog_p.cpp b/src/kswitchlanguagedialog_p.cpp
+index 039daea..531598e 100644
+--- a/src/kswitchlanguagedialog_p.cpp
++++ b/src/kswitchlanguagedialog_p.cpp
+@@ -339,12 +339,16 @@ void KSwitchLanguageDialogPrivate::fillApplicationLanguages(KLanguageButton *but
+     foreach(const QLocale &l, allLocales) {
+         QString languageCode = l.name();
+         if (l != cLocale) {
++            const QString nativeName = l.nativeLanguageName();
++            // For some languages the native name is empty. In this case use the non native language
++            // name as fallback.
++            const QString languageName = nativeName.isEmpty() ? QLocale::languageToString(l.language()) : nativeName;
+             if (!insertedLanguges.contains(languageCode) && KLocalizedString::isApplicationTranslatedInto(languageCode)) {
+-                button->insertLanguage(languageCode, l.nativeLanguageName());
++                button->insertLanguage(languageCode, languageName);
+                 insertedLanguges << languageCode;
+             } else if (stripCountryCode(&languageCode)) {
+                 if (!insertedLanguges.contains(languageCode) && KLocalizedString::isApplicationTranslatedInto(languageCode)) {
+-                    button->insertLanguage(languageCode, l.nativeLanguageName());
++                    button->insertLanguage(languageCode, languageName);
+                     insertedLanguges << languageCode;
+                 }
+             }
+--
+2.1.4

-----------------------------------------------------------------------

Summary of changes:
 Makefile.am                                        |  1 +
 ...-Use-non-native-Language-name-as-fallback.patch | 41 ++++++++++++++++++++++
 2 files changed, 42 insertions(+)
 create mode 100644 patches/kxmlgui/0005-Use-non-native-Language-name-as-fallback.patch


hooks/post-receive
-- 
GnuPG for Windows
http://git.gnupg.org



More information about the Gpg4win-commits mailing list