[network-manager-pptp/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-pptp/nm-0-9-8] properties: call bindtextdomain() and bind_textdomain_codeset()
- Date: Fri, 13 Sep 2013 15:59:54 +0000 (UTC)
commit a43b9f7bb324559f2de04d3a13404f5edf5cbe9e
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 094b412..f368cf7 100644
--- a/properties/Makefile.am
+++ b/properties/Makefile.am
@@ -16,9 +16,10 @@ ui_DATA = nm-pptp-dialog.ui
libnm_pptp_properties_la_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]