[network-manager-openswan/nm-0-9-8] properties: call bindtextdomain()	and bind_textdomain_codeset()
- From: Dan Winship <danw src gnome org>
- To: commits-list gnome org
- Cc: 
- Subject: [network-manager-openswan/nm-0-9-8] properties: call bindtextdomain()	and bind_textdomain_codeset()
- Date: Fri, 13 Sep 2013 16:01:58 +0000 (UTC)
commit 0e9a8320d8ab81d5a6d7f0fbce3ea5a210f1a464
Author: Dan Winship <danw gnome org>
Date:   Thu Jun 13 12:07:33 2013 -0300
    properties: call bindtextdomain() and bind_textdomain_codeset()
    
    Make sure gettext knows the translations are in UTF-8, or else they'll
    get garbled if the user's domain isn't UTF-8.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=702153
 properties/Makefile.am   |    3 +--
 properties/nm-openswan.c |    3 +++
 2 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/properties/Makefile.am b/properties/Makefile.am
index 1fe3724..f599e21 100644
--- a/properties/Makefile.am
+++ b/properties/Makefile.am
@@ -17,8 +17,7 @@ libnm_openswan_properties_la_CPPFLAGS = \
        -DUIDIR=\""$(uidir)"\" \
        -DG_DISABLE_DEPRECATED \
        -DGDK_DISABLE_DEPRECATED \
-       -DGNOME_DISABLE_DEPRECATED \
-       -DGNOMELOCALEDIR=\"$(datadir)/locale\" \
+       -DLOCALEDIR=\"$(datadir)/locale\" \
        -DVERSION=\"$(VERSION)\"
 
 libnm_openswan_properties_la_LIBADD = \
diff --git a/properties/nm-openswan.c b/properties/nm-openswan.c
index 4e3ca0a..75acedd 100644
--- a/properties/nm-openswan.c
+++ b/properties/nm-openswan.c
@@ -769,6 +769,9 @@ nm_vpn_plugin_ui_factory (GError **error)
        if (error)
                g_return_val_if_fail (*error == NULL, NULL);
 
+       bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
+       bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
+
        return NM_VPN_PLUGIN_UI_INTERFACE (g_object_new (OPENSWAN_TYPE_PLUGIN_UI, NULL));
 }
 
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]