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
This commit is contained in:
Martin Pitt 2009-02-24 16:08:05 +01:00 committed by su-fang
parent cae3d7ccc2
commit 0c36d06f9c
1 changed files with 20 additions and 0 deletions

View File

@ -904,6 +904,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;
}
@ -1021,6 +1031,16 @@ g_key_file_load_from_data (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;
}