r54276 - in /desktop/unstable/glib2.0/debian: changelog patches/01_gettext-desktopfiles.patch

laney at users.alioth.debian.org laney at users.alioth.debian.org
Thu Oct 5 14:48:59 UTC 2017


Author: laney
Date: Thu Oct  5 14:48:58 2017
New Revision: 54276

URL: http://svn.debian.org/wsvn/pkg-gnome/?sc=1&rev=54276
Log:
fix untranslated desktop action names when using gettext

Modified:
    desktop/unstable/glib2.0/debian/changelog
    desktop/unstable/glib2.0/debian/patches/01_gettext-desktopfiles.patch

Modified: desktop/unstable/glib2.0/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/unstable/glib2.0/debian/changelog?rev=54276&op=diff
==============================================================================
--- desktop/unstable/glib2.0/debian/changelog	[utf-8] (original)
+++ desktop/unstable/glib2.0/debian/changelog	[utf-8] Thu Oct  5 14:48:58 2017
@@ -1,3 +1,11 @@
+glib2.0 (2.54.1-2) UNRELEASED; urgency=medium
+
+  * debian/patches/01_gettext-desktopfiles.patch:
+    - fix untranslated desktop action names when using gettext
+      (Closes: #877761)
+
+ -- Didier Roche <didrocks at ubuntu.com>  Thu, 05 Oct 2017 09:40:31 +0200
+
 glib2.0 (2.54.1-1) unstable; urgency=medium
 
   [ Jeremy Bicha ]

Modified: desktop/unstable/glib2.0/debian/patches/01_gettext-desktopfiles.patch
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/unstable/glib2.0/debian/patches/01_gettext-desktopfiles.patch?rev=54276&op=diff
==============================================================================
--- desktop/unstable/glib2.0/debian/patches/01_gettext-desktopfiles.patch	[utf-8] (original)
+++ desktop/unstable/glib2.0/debian/patches/01_gettext-desktopfiles.patch	[utf-8] Thu Oct  5 14:48:58 2017
@@ -4,11 +4,11 @@
 ## Bug: bug URL
 # Ubuntu: https://launchpad.net/bugs/3935
 # Upstream: http://bugzilla.gnome.org/show_bug.cgi?id=569829
-Index: b/glib/gkeyfile.c
+Index: glib2.0-2.54.0/glib/gkeyfile.c
 ===================================================================
---- a/glib/gkeyfile.c
-+++ b/glib/gkeyfile.c
-@@ -460,6 +460,7 @@
+--- glib2.0-2.54.0.orig/glib/gkeyfile.c
++++ glib2.0-2.54.0/glib/gkeyfile.c
+@@ -459,6 +459,7 @@ struct _GKeyFile
    GKeyFileFlags flags;
  
    gchar **locales;
@@ -16,7 +16,7 @@
  
    volatile gint ref_count;
  };
-@@ -584,6 +585,7 @@
+@@ -583,6 +584,7 @@ g_key_file_init (GKeyFile *key_file)
    key_file->list_separator = ';';
    key_file->flags = 0;
    key_file->locales = g_strdupv ((gchar **)g_get_language_names ());
@@ -24,7 +24,7 @@
  }
  
  static void
-@@ -603,6 +605,12 @@
+@@ -602,6 +604,12 @@ g_key_file_clear (GKeyFile *key_file)
        key_file->parse_buffer = NULL;
      }
  
@@ -37,7 +37,7 @@
    tmp = key_file->groups;
    while (tmp != NULL)
      {
-@@ -818,6 +826,11 @@
+@@ -821,6 +829,11 @@ g_key_file_load_from_fd (GKeyFile
        return FALSE;
      }
  
@@ -49,7 +49,7 @@
    return TRUE;
  }
  
-@@ -923,6 +936,11 @@
+@@ -933,6 +946,11 @@ g_key_file_load_from_data (GKeyFile
        return FALSE;
      }
  
@@ -61,7 +61,7 @@
    return TRUE;
  }
  
-@@ -2138,6 +2156,8 @@
+@@ -2152,6 +2170,8 @@ g_key_file_get_locale_string (GKeyFile
    GError *key_file_error;
    gchar **languages;
    gboolean free_languages = FALSE;
@@ -70,7 +70,7 @@
    gint i;
  
    g_return_val_if_fail (key_file != NULL, NULL);
-@@ -2159,6 +2179,24 @@
+@@ -2173,6 +2193,25 @@ g_key_file_get_locale_string (GKeyFile
        free_languages = FALSE;
      }
    
@@ -85,7 +85,8 @@
 +   * have some side-effects.  Since this is a corner case, let's ignore it. */
 +  msg_locale = setlocale (LC_MESSAGES, NULL);
 +  try_gettext = msg_locale && key_file->gettext_domain &&
-+                strcmp (group_name, G_KEY_FILE_DESKTOP_GROUP) == 0 &&
++                (strcmp (group_name, G_KEY_FILE_DESKTOP_GROUP) == 0 ||
++                 g_str_has_prefix (group_name, G_KEY_FILE_DESKTOP_ACTION_GROUP_PREFIX)) &&
 +                (strcmp (key, G_KEY_FILE_DESKTOP_KEY_NAME) == 0 ||
 +                 strcmp (key, G_KEY_FILE_DESKTOP_KEY_FULLNAME) == 0 ||
 +                 strcmp (key, G_KEY_FILE_DESKTOP_KEY_GENERIC_NAME) == 0 ||
@@ -95,7 +96,7 @@
    for (i = 0; languages[i]; i++)
      {
        candidate_key = g_strdup_printf ("%s[%s]", key, languages[i]);
-@@ -2175,6 +2213,39 @@
+@@ -2189,6 +2228,39 @@ g_key_file_get_locale_string (GKeyFile
        translated_value = NULL;
     }
  
@@ -135,11 +136,19 @@
    /* Fallback to untranslated key
     */
    if (!translated_value)
-Index: b/glib/gkeyfile.h
+Index: glib2.0-2.54.0/glib/gkeyfile.h
 ===================================================================
---- a/glib/gkeyfile.h
-+++ b/glib/gkeyfile.h
-@@ -316,6 +316,9 @@
+--- glib2.0-2.54.0.orig/glib/gkeyfile.h
++++ glib2.0-2.54.0/glib/gkeyfile.h
+@@ -293,6 +293,7 @@ gboolean  g_key_file_remove_group
+ 
+ /* Defines for handling freedesktop.org Desktop files */
+ #define G_KEY_FILE_DESKTOP_GROUP                "Desktop Entry"
++#define G_KEY_FILE_DESKTOP_ACTION_GROUP_PREFIX  "Desktop Action"
+ 
+ #define G_KEY_FILE_DESKTOP_KEY_TYPE             "Type"
+ #define G_KEY_FILE_DESKTOP_KEY_VERSION          "Version"
+@@ -315,6 +316,9 @@ gboolean  g_key_file_remove_group
  #define G_KEY_FILE_DESKTOP_KEY_URL              "URL"
  #define G_KEY_FILE_DESKTOP_KEY_DBUS_ACTIVATABLE "DBusActivatable"
  #define G_KEY_FILE_DESKTOP_KEY_ACTIONS          "Actions"




More information about the pkg-gnome-commits mailing list