[gimp/gimp-2-8] Bug 770708 - First language preference is ignored when multiple ...



commit f2e483df028ca05bcfbf3dcdd92e89ed1d67dd7a
Author: Kristian Rietveld <kris loopnest org>
Date:   Sat Nov 19 21:25:54 2016 +0100

    Bug 770708 - First language preference is ignored when multiple ...
    
    ... languages are set under Location and Region
    
    We tracked this down to be a gettext bug, so include the gettext patch into
    our DMG build. The gettext patch has also been submitted upstream.

 build/osx/README                                   |    1 +
 build/osx/gimp.modules                             |    6 +++++
 ...ext-fix-English-fallback-for-macOS-Sierra.patch |   23 ++++++++++++++++++++
 3 files changed, 30 insertions(+), 0 deletions(-)
---
diff --git a/build/osx/README b/build/osx/README
index c2e6515..ea8d010 100644
--- a/build/osx/README
+++ b/build/osx/README
@@ -82,6 +82,7 @@ curl -o $HOME/gimp/directory/patches/libffi-fix-wrong-variable-substitution-in-c
 curl -o $HOME/gimp/directory/patches/libgcrypt-build-without-docs.patch 
https://git.gnome.org/browse/gimp/plain/build/osx/patches/libgcrypt-build-without-docs.patch?h=gimp-2-8
 curl -o $HOME/gimp/directory/patches/libsecret-fix-secret-dbus-generation.c.patch 
https://git.gnome.org/browse/gimp/plain/build/osx/patches/libsecret-fix-secret-dbus-generation.c.patch?h=gimp-2-8
 curl -o $HOME/gimp/directory/patches/poppler-support-overriding-datadir-through-env-variable.patch 
https://git.gnome.org/browse/gimp/plain/build/osx/patches/poppler-support-overriding-datadir-through-env-variable.patch?h=gimp-2-8
+curl -o $HOME/gimp/directory/patches/gettext-fix-English-fallback-for-macOS-Sierra.patch 
https://git.gnome.org/browse/gimp/plain/build/osx/patches/gettext-fix-English-fallback-for-macOS-Sierra.patch?h=gimp-2-8
 
 Check https://git.gnome.org/browse/gimp/tree/build/osx/patches?h=gimp-2-8:
 If there are less patches than listed above, then you don't need to try to
diff --git a/build/osx/gimp.modules b/build/osx/gimp.modules
index 71ecd98..44a3aa1 100644
--- a/build/osx/gimp.modules
+++ b/build/osx/gimp.modules
@@ -1278,6 +1278,9 @@
                autogenargs="--without-emacs --disable-java --disable-native-java --disable-libasprintf 
--disable-csharp --disable-rpath --enable-nls">
                <branch repo="ftp.gnu.org" source-subdir="gettext-runtime"
                        module="gettext/gettext-0.19.4.tar.gz" version="0.19.4">
+                       <patch
+                               file="gettext-fix-English-fallback-for-macOS-Sierra.patch"
+                               strip="1" />
                </branch>
        </autotools>
 
@@ -1285,6 +1288,9 @@
                autogenargs="--without-emacs --disable-java --disable-native-java --disable-libasprintf 
--disable-csharp --with-included-glib --enable-nls --disable-rpath">
                <branch repo="ftp.gnu.org" source-subdir="gettext-tools"
                        module="gettext/gettext-0.19.4.tar.gz" version="0.19.4">
+                       <patch
+                               file="gettext-fix-English-fallback-for-macOS-Sierra.patch"
+                               strip="1" />
                </branch>
        </autotools>
 
diff --git a/build/osx/patches/gettext-fix-English-fallback-for-macOS-Sierra.patch 
b/build/osx/patches/gettext-fix-English-fallback-for-macOS-Sierra.patch
new file mode 100644
index 0000000..d7b6e9a
--- /dev/null
+++ b/build/osx/patches/gettext-fix-English-fallback-for-macOS-Sierra.patch
@@ -0,0 +1,23 @@
+diff -upr gettext-0.19.3.orig/gettext-runtime/intl/langprefs.c 
gettext-0.19.3/gettext-runtime/intl/langprefs.c
+--- gettext-0.19.3.orig/gettext-runtime/intl/langprefs.c       2013-03-07 09:44:37.000000000 +0100
++++ gettext-0.19.3/gettext-runtime/intl/langprefs.c    2016-11-06 12:40:20.000000000 +0100
+@@ -269,7 +269,8 @@ _nl_language_preferences_default (void)
+                        in the preferences list, arrange for gettext() to
+                        return the msgid, and ignore all further elements of
+                        the preferences list.  */
+-                    if (strcmp (buf, "en") == 0)
++                    if (strcmp (buf, "en") == 0
++                        || strncmp (buf, "en-", 3))
+                       break;
+                   }
+                 else
+@@ -297,7 +298,8 @@ _nl_language_preferences_default (void)
+                             strcpy (p, buf);
+                             p += strlen (buf);
+                             *p++ = ':';
+-                            if (strcmp (buf, "en") == 0)
++                            if (strcmp (buf, "en") == 0
++                                || strncmp (buf, "en-", 3))
+                               break;
+                           }
+                         else


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]