summaryrefslogtreecommitdiff
path: root/libnm-glib/nm-remote-connection.c
diff options
context:
space:
mode:
authorDan Winship <danw@gnome.org>2014-11-13 10:29:37 -0500
committerDan Winship <danw@gnome.org>2014-11-13 11:18:54 -0500
commit3c09b3b11133a7d1342a461bec7e2e3f8d7edbd4 (patch)
tree9b510d35f3a1cfa1a458798dc4485d4d11f6902e /libnm-glib/nm-remote-connection.c
parent7785642318fd0acb57f8b3ad819494c2809c3540 (diff)
downloadNetworkManager-3c09b3b11133a7d1342a461bec7e2e3f8d7edbd4.tar.gz
libnm*: fix library gettext usagedanw/i18n
Libraries need to include <gi18n-lib.h>, not <gi18n.h>, so that _() will get defined to "dgettext (GETTEXT_DOMAIN, string)" rather than "gettext (string)" (which will use the program's default domain, which works fine for programs in the NetworkManager tree, but not for external users). Likewise, we need to call bindtextdomain() so that gettext can find the translations if the library is installed in a different prefix from the program using it (and bind_textdomain_codeset(), so it will know the translations are in UTF-8 even if the locale isn't). (The fact that no one noticed this was broken before is because the libraries didn't really start returning useful translated strings much until 0.9.10, and none of the out-of-tree clients have been updated to actually show those strings to users yet.)
Diffstat (limited to 'libnm-glib/nm-remote-connection.c')
-rw-r--r--libnm-glib/nm-remote-connection.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libnm-glib/nm-remote-connection.c b/libnm-glib/nm-remote-connection.c
index 4feba8b10e..3a70e81ed4 100644
--- a/libnm-glib/nm-remote-connection.c
+++ b/libnm-glib/nm-remote-connection.c
@@ -23,7 +23,7 @@
#include <string.h>
#include <gio/gio.h>
-#include <glib/gi18n.h>
+#include <glib/gi18n-lib.h>
#include <NetworkManager.h>
#include <nm-utils.h>