[network-manager-pptp] properties: call bindtextdomain() and bind_textdomain_codeset()
- From: Dan Winship <danw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [network-manager-pptp] properties: call bindtextdomain() and bind_textdomain_codeset()
- Date: Wed, 11 Sep 2013 18:22:55 +0000 (UTC)
commit e110e77b39b8c2420bc4d0f9abd20fb704c61d24
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-pptp.c | 3 +++
2 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/properties/Makefile.am b/properties/Makefile.am
index 55bbf22..b2f3672 100644
--- a/properties/Makefile.am
+++ b/properties/Makefile.am
@@ -17,9 +17,10 @@ ui_DATA = nm-pptp-dialog.ui
libnm_pptp_properties_la_CFLAGS = \
$(GLIB_CFLAGS) \
$(GTK_CFLAGS) \
- $(NM_CFLAGS) \
+ $(NM_CFLAGS) \
-DICONDIR=\""$(datadir)/pixmaps"\" \
-DUIDIR=\""$(uidir)"\" \
+ -DLOCALEDIR=\""$(datadir)/locale"\" \
-DG_DISABLE_DEPRECATED \
-DVERSION=\"$(VERSION)\"
diff --git a/properties/nm-pptp.c b/properties/nm-pptp.c
index 2e10170..4f4a349 100644
--- a/properties/nm-pptp.c
+++ b/properties/nm-pptp.c
@@ -788,6 +788,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 (PPTP_TYPE_PLUGIN_UI, NULL));
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]