summaryrefslogtreecommitdiff
path: root/libnm-core/nm-setting-wireless.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 17:18:42 -0500
commit53f5e9afa466b0b1517cbac208ed01ab8f4b6274 (patch)
tree405cdbb4148855694518c4916b865775bac9cf2e /libnm-core/nm-setting-wireless.c
parent3bfb163a74fb98698b03d8a605b0164869a2ed4a (diff)
downloadNetworkManager-53f5e9afa466b0b1517cbac208ed01ab8f4b6274.tar.gz
libnm*: fix library gettext usage
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-core/nm-setting-wireless.c')
-rw-r--r--libnm-core/nm-setting-wireless.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libnm-core/nm-setting-wireless.c b/libnm-core/nm-setting-wireless.c
index 564023b9b1..b481e54046 100644
--- a/libnm-core/nm-setting-wireless.c
+++ b/libnm-core/nm-setting-wireless.c
@@ -24,7 +24,7 @@
#include <string.h>
#include <net/ethernet.h>
-#include <glib/gi18n.h>
+#include <glib/gi18n-lib.h>
#include "nm-setting-wireless.h"
#include "nm-dbus-interface.h"