Package: glib2.0 / 2.58.3-2

debian/02_gettext-desktopfiles-ubuntu.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
From: Martin Pitt <mpitt@debian.org>
Date: Tue, 24 Feb 2009 16:08:05 +0100
Subject: Provide backwards compatibility for 01_gettext-desktopfiles.patch
 for X-{Debian,Ubuntu}-Gettext-Domain

Ubuntu-specific. 01_gettext-desktopfiles.patch was changed to use
X-GNOME-, so this is necessary until all our .desktop files are converted.

Forwarded: no
---
 glib/gkeyfile.c | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/glib/gkeyfile.c b/glib/gkeyfile.c
index dc06616..f95c8ac 100644
--- a/glib/gkeyfile.c
+++ b/glib/gkeyfile.c
@@ -885,6 +885,16 @@ g_key_file_load_from_fd (GKeyFile       *key_file,
                                                     G_KEY_FILE_DESKTOP_GROUP,
                                                     G_KEY_FILE_DESKTOP_KEY_GETTEXT_DOMAIN,
                                                     NULL);
+  if (!key_file->gettext_domain)
+      key_file->gettext_domain = g_key_file_get_string (key_file,
+                                                        G_KEY_FILE_DESKTOP_GROUP,
+                                                        "X-Ubuntu-Gettext-Domain",
+                                                        NULL);
+  if (!key_file->gettext_domain)
+      key_file->gettext_domain = g_key_file_get_string (key_file,
+                                                        G_KEY_FILE_DESKTOP_GROUP,
+                                                        "X-Debian-Gettext-Domain",
+                                                        NULL);
 
   return TRUE;
 }
@@ -946,6 +956,16 @@ g_key_file_load_from_file (GKeyFile       *key_file,
                                                     G_KEY_FILE_DESKTOP_GROUP,
                                                     G_KEY_FILE_DESKTOP_KEY_GETTEXT_DOMAIN,
                                                     NULL);
+  if (!key_file->gettext_domain)
+      key_file->gettext_domain = g_key_file_get_string (key_file,
+                                                        G_KEY_FILE_DESKTOP_GROUP,
+                                                        "X-Ubuntu-Gettext-Domain",
+                                                        NULL);
+  if (!key_file->gettext_domain)
+      key_file->gettext_domain = g_key_file_get_string (key_file,
+                                                        G_KEY_FILE_DESKTOP_GROUP,
+                                                        "X-Debian-Gettext-Domain",
+                                                        NULL);
 
   return TRUE;
 }