[network-manager-vpnc/nm-0-9-8] properties: call bindtextdomain() and bind_textdomain_codeset()



commit 2ee995022d0f4b65025e6305511b8bebd5a3230e
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-vpnc.c   |    3 +++
 2 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/properties/Makefile.am b/properties/Makefile.am
index 4994efc..200d408 100644
--- a/properties/Makefile.am
+++ b/properties/Makefile.am
@@ -21,8 +21,7 @@ libnm_vpnc_properties_la_CPPFLAGS = \
        -DICONDIR=\""$(datadir)/pixmaps"\" \
        -DUIDIR=\""$(uidir)"\" \
        -DG_DISABLE_DEPRECATED \
-       -DGNOME_DISABLE_DEPRECATED \
-       -DGNOMELOCALEDIR=\"$(datadir)/locale\" \
+       -DLOCALEDIR=\"$(datadir)/locale\" \
        -DVERSION=\"$(VERSION)\"
 
 libnm_vpnc_properties_la_LIBADD = \
diff --git a/properties/nm-vpnc.c b/properties/nm-vpnc.c
index c6353f5..0faa52f 100644
--- a/properties/nm-vpnc.c
+++ b/properties/nm-vpnc.c
@@ -1860,6 +1860,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 (VPNC_TYPE_PLUGIN_UI, NULL));
 }
 


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