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



commit bd0a9ec0afc885f96a29a5f769e704ee36c8487c
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-openconnect.c |    3 +++
 2 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/properties/Makefile.am b/properties/Makefile.am
index 4285f79..0a88601 100644
--- a/properties/Makefile.am
+++ b/properties/Makefile.am
@@ -19,8 +19,7 @@ libnm_openconnect_properties_la_CFLAGS =                \
        -DUIDIR=\""$(uidir)"\"                          \
        -DG_DISABLE_DEPRECATED                          \
        -DGDK_DISABLE_DEPRECATED                        \
-       -DGNOME_DISABLE_DEPRECATED                      \
-       -DGNOMELOCALEDIR=\"$(datadir)/locale\"          \
+       -DLOCALEDIR=\"$(datadir)/locale\"               \
        -DVERSION=\"$(VERSION)\"
 
 libnm_openconnect_properties_la_LIBADD = \
diff --git a/properties/nm-openconnect.c b/properties/nm-openconnect.c
index 71cbe3c..aeeafcf 100644
--- a/properties/nm-openconnect.c
+++ b/properties/nm-openconnect.c
@@ -791,6 +791,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 (OPENCONNECT_TYPE_PLUGIN_UI, NULL));
 }
 


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