diff options
author | Dan Winship <danw@gnome.org> | 2014-11-13 10:29:37 -0500 |
---|---|---|
committer | Dan Winship <danw@gnome.org> | 2014-11-13 17:18:42 -0500 |
commit | 53f5e9afa466b0b1517cbac208ed01ab8f4b6274 (patch) | |
tree | 405cdbb4148855694518c4916b865775bac9cf2e | |
parent | 3bfb163a74fb98698b03d8a605b0164869a2ed4a (diff) |
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.)
84 files changed, 90 insertions, 80 deletions
diff --git a/libnm-core/Makefile.am b/libnm-core/Makefile.am index 785db1d7d..8fab84bcb 100644 --- a/libnm-core/Makefile.am +++ b/libnm-core/Makefile.am @@ -5,6 +5,7 @@ SUBDIRS = . tests AM_CPPFLAGS = \ -I${top_srcdir}/include \ -DG_LOG_DOMAIN=\""libnm"\" \ + -DLOCALEDIR=\"$(datadir)/locale\" \ -DNETWORKMANAGER_COMPILATION \ -DNM_VERSION_MAX_ALLOWED=NM_VERSION_NEXT_STABLE \ $(GLIB_CFLAGS) diff --git a/libnm-core/crypto.c b/libnm-core/crypto.c index a69574710..e54d101e4 100644 --- a/libnm-core/crypto.c +++ b/libnm-core/crypto.c @@ -28,7 +28,7 @@ #include <strings.h> #include <unistd.h> #include <stdlib.h> -#include <glib/gi18n.h> +#include <glib/gi18n-lib.h> #include "crypto.h" #include "nm-errors.h" diff --git a/libnm-core/crypto_gnutls.c b/libnm-core/crypto_gnutls.c index 97609f0a7..e123830d2 100644 --- a/libnm-core/crypto_gnutls.c +++ b/libnm-core/crypto_gnutls.c @@ -24,7 +24,7 @@ #include "config.h" #include <glib.h> -#include <glib/gi18n.h> +#include <glib/gi18n-lib.h> #include <gcrypt.h> #include <gnutls/gnutls.h> diff --git a/libnm-core/crypto_nss.c b/libnm-core/crypto_nss.c index b75fcf666..e7cf2eb03 100644 --- a/libnm-core/crypto_nss.c +++ b/libnm-core/crypto_nss.c @@ -24,7 +24,7 @@ #include "config.h" #include <glib.h> -#include <glib/gi18n.h> +#include <glib/gi18n-lib.h> #include <prinit.h> #include <nss.h> diff --git a/libnm-core/nm-connection.c b/libnm-core/nm-connection.c index b7d0c9e9f..a432baa48 100644 --- a/libnm-core/nm-connection.c +++ b/libnm-core/nm-connection.c @@ -23,7 +23,7 @@ #include "config.h" #include <glib-object.h> -#include <glib/gi18n.h> +#include <glib/gi18n-lib.h> #include <string.h> #include "nm-connection.h" #include "nm-connection-private.h" diff --git a/libnm-core/nm-setting-8021x.c b/libnm-core/nm-setting-8021x.c index 29fc2b84a..2cad0234a 100644 --- a/libnm-core/nm-setting-8021x.c +++ b/libnm-core/nm-setting-8021x.c @@ -23,7 +23,7 @@ #include "config.h" #include <string.h> -#include <glib/gi18n.h> +#include <glib/gi18n-lib.h> #include "nm-setting-8021x.h" #include "nm-utils.h" diff --git a/libnm-core/nm-setting-adsl.c b/libnm-core/nm-setting-adsl.c index bc56d481c..00bcef543 100644 --- a/libnm-core/nm-setting-adsl.c +++ b/libnm-core/nm-setting-adsl.c @@ -22,7 +22,7 @@ #include "config.h" #include <string.h> -#include <glib/gi18n.h> +#include <glib/gi18n-lib.h> #include "nm-setting-adsl.h" #include "nm-setting-ppp.h" diff --git a/libnm-core/nm-setting-bluetooth.c b/libnm-core/nm-setting-bluetooth.c index 7c852d6bb..41a0b4c2f 100644 --- a/libnm-core/nm-setting-bluetooth.c +++ b/libnm-core/nm-setting-bluetooth.c @@ -24,7 +24,7 @@ #include <string.h> #include <net/ethernet.h> -#include <glib/gi18n.h> +#include <glib/gi18n-lib.h> #include "nm-setting-bluetooth.h" #include "nm-setting-cdma.h" diff --git a/libnm-core/nm-setting-bond.c b/libnm-core/nm-setting-bond.c index d16b3cb88..c5402c1a6 100644 --- a/libnm-core/nm-setting-bond.c +++ b/libnm-core/nm-setting-bond.c @@ -26,7 +26,7 @@ #include <errno.h> #include <netinet/in.h> #include <arpa/inet.h> -#include <glib/gi18n.h> +#include <glib/gi18n-lib.h> #include "nm-setting-bond.h" #include "nm-utils.h" diff --git a/libnm-core/nm-setting-bridge-port.c b/libnm-core/nm-setting-bridge-port.c index 5ffa8c0fb..c594656b2 100644 --- a/libnm-core/nm-setting-bridge-port.c +++ b/libnm-core/nm-setting-bridge-port.c @@ -24,7 +24,7 @@ #include <string.h> #include <ctype.h> #include <stdlib.h> -#include <glib/gi18n.h> +#include <glib/gi18n-lib.h> #include "nm-setting-bridge-port.h" #include "nm-utils.h" diff --git a/libnm-core/nm-setting-bridge.c b/libnm-core/nm-setting-bridge.c index d34f330d8..6758b7793 100644 --- a/libnm-core/nm-setting-bridge.c +++ b/libnm-core/nm-setting-bridge.c @@ -24,7 +24,7 @@ #include <string.h> #include <ctype.h> #include <stdlib.h> -#include <glib/gi18n.h> +#include <glib/gi18n-lib.h> #include "nm-setting-bridge.h" #include "nm-connection-private.h" diff --git a/libnm-core/nm-setting-cdma.c b/libnm-core/nm-setting-cdma.c index 2d37f652b..ebbbda740 100644 --- a/libnm-core/nm-setting-cdma.c +++ b/libnm-core/nm-setting-cdma.c @@ -22,7 +22,7 @@ #include "config.h" #include <string.h> -#include <glib/gi18n.h> +#include <glib/gi18n-lib.h> #include "nm-setting-cdma.h" #include "nm-utils.h" diff --git a/libnm-core/nm-setting-connection.c b/libnm-core/nm-setting-connection.c index 8d7b9af95..323c12961 100644 --- a/libnm-core/nm-setting-connection.c +++ b/libnm-core/nm-setting-connection.c @@ -23,7 +23,7 @@ #include "config.h" #include <string.h> -#include <glib/gi18n.h> +#include <glib/gi18n-lib.h> #include "nm-utils.h" #include "nm-utils-private.h" diff --git a/libnm-core/nm-setting-dcb.c b/libnm-core/nm-setting-dcb.c index e7fcdff2b..6b213db7b 100644 --- a/libnm-core/nm-setting-dcb.c +++ b/libnm-core/nm-setting-dcb.c @@ -22,7 +22,7 @@ #include "config.h" #include <string.h> -#include <glib/gi18n.h> +#include <glib/gi18n-lib.h> #include "nm-setting-dcb.h" #include "nm-utils.h" diff --git a/libnm-core/nm-setting-gsm.c b/libnm-core/nm-setting-gsm.c index fbcdca1bc..22f8cdbad 100644 --- a/libnm-core/nm-setting-gsm.c +++ b/libnm-core/nm-setting-gsm.c @@ -23,7 +23,7 @@ #include "config.h" #include <string.h> -#include <glib/gi18n.h> +#include <glib/gi18n-lib.h> #include "nm-setting-gsm.h" #include "nm-utils.h" diff --git a/libnm-core/nm-setting-infiniband.c b/libnm-core/nm-setting-infiniband.c index c098164b0..ec193fdbf 100644 --- a/libnm-core/nm-setting-infiniband.c +++ b/libnm-core/nm-setting-infiniband.c @@ -22,7 +22,7 @@ #include "config.h" #include <stdlib.h> -#include <glib/gi18n.h> +#include <glib/gi18n-lib.h> #include "nm-setting-infiniband.h" #include "nm-utils.h" diff --git a/libnm-core/nm-setting-ip-config.c b/libnm-core/nm-setting-ip-config.c index 64f3cdfba..25f7c82f0 100644 --- a/libnm-core/nm-setting-ip-config.c +++ b/libnm-core/nm-setting-ip-config.c @@ -24,7 +24,7 @@ #include <string.h> #include <arpa/inet.h> -#include <glib/gi18n.h> +#include <glib/gi18n-lib.h> #include "nm-setting-ip-config.h" #include "nm-setting-ip4-config.h" diff --git a/libnm-core/nm-setting-ip4-config.c b/libnm-core/nm-setting-ip4-config.c index d2f6c6927..4f451f5eb 100644 --- a/libnm-core/nm-setting-ip4-config.c +++ b/libnm-core/nm-setting-ip4-config.c @@ -22,7 +22,7 @@ #include "config.h" #include <string.h> -#include <glib/gi18n.h> +#include <glib/gi18n-lib.h> #include "nm-setting-ip4-config.h" #include "nm-setting-private.h" diff --git a/libnm-core/nm-setting-ip6-config.c b/libnm-core/nm-setting-ip6-config.c index 94605fcc3..50dbc3c72 100644 --- a/libnm-core/nm-setting-ip6-config.c +++ b/libnm-core/nm-setting-ip6-config.c @@ -22,7 +22,7 @@ #include "config.h" #include <string.h> -#include <glib/gi18n.h> +#include <glib/gi18n-lib.h> #include "nm-setting-ip6-config.h" #include "nm-setting-private.h" diff --git a/libnm-core/nm-setting-olpc-mesh.c b/libnm-core/nm-setting-olpc-mesh.c index 43383abf5..7be5dcadf 100644 --- a/libnm-core/nm-setting-olpc-mesh.c +++ b/libnm-core/nm-setting-olpc-mesh.c @@ -23,7 +23,7 @@ #include "config.h" #include <string.h> -#include <glib/gi18n.h> +#include <glib/gi18n-lib.h> #include "nm-setting-olpc-mesh.h" #include "nm-dbus-interface.h" diff --git a/libnm-core/nm-setting-ppp.c b/libnm-core/nm-setting-ppp.c index d67d6329b..01f798ea7 100644 --- a/libnm-core/nm-setting-ppp.c +++ b/libnm-core/nm-setting-ppp.c @@ -22,7 +22,7 @@ #include "config.h" -#include <glib/gi18n.h> +#include <glib/gi18n-lib.h> #include "nm-setting-ppp.h" #include "nm-setting-private.h" diff --git a/libnm-core/nm-setting-pppoe.c b/libnm-core/nm-setting-pppoe.c index 93e26ff91..ac6764d06 100644 --- a/libnm-core/nm-setting-pppoe.c +++ b/libnm-core/nm-setting-pppoe.c @@ -23,7 +23,7 @@ #include "config.h" #include <string.h> -#include <glib/gi18n.h> +#include <glib/gi18n-lib.h> #include "nm-setting-pppoe.h" #include "nm-setting-ppp.h" diff --git a/libnm-core/nm-setting-team-port.c b/libnm-core/nm-setting-team-port.c index 834f7b3cc..db765b948 100644 --- a/libnm-core/nm-setting-team-port.c +++ b/libnm-core/nm-setting-team-port.c @@ -23,7 +23,7 @@ #include <string.h> #include <ctype.h> #include <stdlib.h> -#include <glib/gi18n.h> +#include <glib/gi18n-lib.h> #include "nm-setting-team-port.h" #include "nm-utils.h" diff --git a/libnm-core/nm-setting-team.c b/libnm-core/nm-setting-team.c index 231d80d67..dec6a8f6f 100644 --- a/libnm-core/nm-setting-team.c +++ b/libnm-core/nm-setting-team.c @@ -22,7 +22,7 @@ #include <string.h> #include <stdlib.h> -#include <glib/gi18n.h> +#include <glib/gi18n-lib.h> #include "nm-setting-team.h" #include "nm-utils.h" diff --git a/libnm-core/nm-setting-vlan.c b/libnm-core/nm-setting-vlan.c index b9f2274d6..c1b9940ff 100644 --- a/libnm-core/nm-setting-vlan.c +++ b/libnm-core/nm-setting-vlan.c @@ -23,7 +23,7 @@ #include <stdlib.h> #include <string.h> -#include <glib/gi18n.h> +#include <glib/gi18n-lib.h> #include "nm-setting-vlan.h" #include "nm-utils.h" diff --git a/libnm-core/nm-setting-vpn.c b/libnm-core/nm-setting-vpn.c index 1f2ffc912..b317a72a4 100644 --- a/libnm-core/nm-setting-vpn.c +++ b/libnm-core/nm-setting-vpn.c @@ -24,7 +24,7 @@ #include <string.h> #include <errno.h> #include <stdlib.h> -#include <glib/gi18n.h> +#include <glib/gi18n-lib.h> #include "nm-setting-vpn.h" #include "nm-utils.h" diff --git a/libnm-core/nm-setting-wimax.c b/libnm-core/nm-setting-wimax.c index 2a2f29ee2..541c0bbfe 100644 --- a/libnm-core/nm-setting-wimax.c +++ b/libnm-core/nm-setting-wimax.c @@ -24,7 +24,7 @@ #include <string.h> #include <net/ethernet.h> -#include <glib/gi18n.h> +#include <glib/gi18n-lib.h> #include "nm-setting-wimax.h" #include "nm-setting-private.h" diff --git a/libnm-core/nm-setting-wired.c b/libnm-core/nm-setting-wired.c index 1047d23ee..1a75ef5c0 100644 --- a/libnm-core/nm-setting-wired.c +++ b/libnm-core/nm-setting-wired.c @@ -24,7 +24,7 @@ #include <string.h> #include <net/ethernet.h> -#include <glib/gi18n.h> +#include <glib/gi18n-lib.h> #include "nm-setting-wired.h" #include "nm-utils.h" diff --git a/libnm-core/nm-setting-wireless-security.c b/libnm-core/nm-setting-wireless-security.c index 05eb0c470..9a7b5a591 100644 --- a/libnm-core/nm-setting-wireless-security.c +++ b/libnm-core/nm-setting-wireless-security.c @@ -23,7 +23,7 @@ #include "config.h" #include <string.h> -#include <glib/gi18n.h> +#include <glib/gi18n-lib.h> #include "nm-setting-wireless-security.h" #include "nm-setting-8021x.h" diff --git a/libnm-core/nm-setting-wireless.c b/libnm-core/nm-setting-wireless.c index 564023b9b..b481e5404 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" diff --git a/libnm-core/nm-setting.c b/libnm-core/nm-setting.c index cbbc4408f..278c21b1b 100644 --- a/libnm-core/nm-setting.c +++ b/libnm-core/nm-setting.c @@ -23,7 +23,7 @@ #include "config.h" #include <string.h> -#include <glib/gi18n.h> +#include <glib/gi18n-lib.h> #include <gio/gio.h> #include "nm-setting.h" diff --git a/libnm-core/nm-utils.c b/libnm-core/nm-utils.c index 37f9ca0cf..dce475569 100644 --- a/libnm-core/nm-utils.c +++ b/libnm-core/nm-utils.c @@ -26,6 +26,7 @@ #include <netinet/ether.h> #include <arpa/inet.h> #include <uuid/uuid.h> +#include <libintl.h> #include <gmodule.h> #include "nm-utils.h" @@ -242,6 +243,9 @@ nm_utils_init (GError **error) if (!initialized) { initialized = TRUE; + bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR); + bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8"); + if (!crypto_init (error)) return FALSE; diff --git a/libnm-glib/nm-device.c b/libnm-glib/nm-device.c index 88d9ce8a9..53d2a69f7 100644 --- a/libnm-glib/nm-device.c +++ b/libnm-glib/nm-device.c @@ -23,7 +23,7 @@ #include <string.h> -#include <glib/gi18n.h> +#include <glib/gi18n-lib.h> #include <gudev/gudev.h> #include "NetworkManager.h" diff --git a/libnm-glib/nm-remote-connection.c b/libnm-glib/nm-remote-connection.c index 4feba8b10..3a70e81ed 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> diff --git a/libnm-util/Makefile.am b/libnm-util/Makefile.am index 88915bf0c..f0a885afc 100644 --- a/libnm-util/Makefile.am +++ b/libnm-util/Makefile.am @@ -6,6 +6,7 @@ AM_CPPFLAGS = \ -I${top_srcdir} \ -I${top_srcdir}/include \ -DG_LOG_DOMAIN=\""libnm-util"\" \ + -DLOCALEDIR=\"$(datadir)/locale\" \ -DNM_VERSION_MAX_ALLOWED=NM_VERSION_NEXT_STABLE \ $(GLIB_CFLAGS) \ $(DBUS_CFLAGS) \ diff --git a/libnm-util/crypto.c b/libnm-util/crypto.c index d5f7608d6..8a10af945 100644 --- a/libnm-util/crypto.c +++ b/libnm-util/crypto.c @@ -28,7 +28,7 @@ #include <strings.h> #include <unistd.h> #include <stdlib.h> -#include <glib/gi18n.h> +#include <glib/gi18n-lib.h> #include "crypto.h" diff --git a/libnm-util/crypto_gnutls.c b/libnm-util/crypto_gnutls.c index 9c20f589e..03cb1b476 100644 --- a/libnm-util/crypto_gnutls.c +++ b/libnm-util/crypto_gnutls.c @@ -24,7 +24,7 @@ #include "config.h" #include <glib.h> -#include <glib/gi18n.h> +#include <glib/gi18n-lib.h> #include <gcrypt.h> #include <gnutls/gnutls.h> diff --git a/libnm-util/crypto_nss.c b/libnm-util/crypto_nss.c index 1e589ea70..52ee261d4 100644 --- a/libnm-util/crypto_nss.c +++ b/libnm-util/crypto_nss.c @@ -24,7 +24,7 @@ #include "config.h" #include <glib.h> -#include <glib/gi18n.h> +#include <glib/gi18n-lib.h> #include <prinit.h> #include <nss.h> diff --git a/libnm-util/nm-connection.c b/libnm-util/nm-connection.c index 1268d20ca..a1350f544 100644 --- a/libnm-util/nm-connection.c +++ b/libnm-util/nm-connection.c @@ -23,7 +23,7 @@ #include "config.h" #include <glib-object.h> -#include <glib/gi18n.h> +#include <glib/gi18n-lib.h> #include <dbus/dbus-glib.h> #include <string.h> #include "nm-connection.h" diff --git a/libnm-util/nm-setting-8021x.c b/libnm-util/nm-setting-8021x.c index 94a26e18f..c11ce0fe5 100644 --- a/libnm-util/nm-setting-8021x.c +++ b/libnm-util/nm-setting-8021x.c @@ -24,7 +24,7 @@ #include <string.h> #include <dbus/dbus-glib.h> -#include <glib/gi18n.h> +#include <glib/gi18n-lib.h> #include "nm-setting-8021x.h" #include "nm-param-spec-specialized.h" diff --git a/libnm-util/nm-setting-adsl.c b/libnm-util/nm-setting-adsl.c index 5b0ae2baf..601ebc2b2 100644 --- a/libnm-util/nm-setting-adsl.c +++ b/libnm-util/nm-setting-adsl.c @@ -22,7 +22,7 @@ #include "config.h" #include <string.h> -#include <glib/gi18n.h> +#include <glib/gi18n-lib.h> #include "nm-setting-adsl.h" #include "nm-setting-ppp.h" diff --git a/libnm-util/nm-setting-bluetooth.c b/libnm-util/nm-setting-bluetooth.c index 487f366e1..4a9c8eb64 100644 --- a/libnm-util/nm-setting-bluetooth.c +++ b/libnm-util/nm-setting-bluetooth.c @@ -24,7 +24,7 @@ #include <string.h> #include <net/ethernet.h> -#include <glib/gi18n.h> +#include <glib/gi18n-lib.h> #include "nm-param-spec-specialized.h" #include "nm-dbus-glib-types.h" diff --git a/libnm-util/nm-setting-bond.c b/libnm-util/nm-setting-bond.c index 515f3d598..6d6210886 100644 --- a/libnm-util/nm-setting-bond.c +++ b/libnm-util/nm-setting-bond.c @@ -27,7 +27,7 @@ #include <netinet/in.h> #include <arpa/inet.h> #include <dbus/dbus-glib.h> -#include <glib/gi18n.h> +#include <glib/gi18n-lib.h> #include "nm-setting-bond.h" #include "nm-param-spec-specialized.h" diff --git a/libnm-util/nm-setting-bridge-port.c b/libnm-util/nm-setting-bridge-port.c index 366efe016..ae38a8e8b 100644 --- a/libnm-util/nm-setting-bridge-port.c +++ b/libnm-util/nm-setting-bridge-port.c @@ -25,7 +25,7 @@ #include <ctype.h> #include <stdlib.h> #include <dbus/dbus-glib.h> -#include <glib/gi18n.h> +#include <glib/gi18n-lib.h> #include "nm-setting-bridge-port.h" #include "nm-utils.h" diff --git a/libnm-util/nm-setting-bridge.c b/libnm-util/nm-setting-bridge.c index fda46842b..86d1e781e 100644 --- a/libnm-util/nm-setting-bridge.c +++ b/libnm-util/nm-setting-bridge.c @@ -25,7 +25,7 @@ #include <ctype.h> #include <stdlib.h> #include <dbus/dbus-glib.h> -#include <glib/gi18n.h> +#include <glib/gi18n-lib.h> #include <linux/if_ether.h> #include "nm-setting-bridge.h" diff --git a/libnm-util/nm-setting-cdma.c b/libnm-util/nm-setting-cdma.c index f60869a58..44a893c7b 100644 --- a/libnm-util/nm-setting-cdma.c +++ b/libnm-util/nm-setting-cdma.c @@ -22,7 +22,7 @@ #include "config.h" #include <string.h> -#include <glib/gi18n.h> +#include <glib/gi18n-lib.h> #include "nm-setting-cdma.h" #include "nm-utils.h" diff --git a/libnm-util/nm-setting-connection.c b/libnm-util/nm-setting-connection.c index c767170aa..80e225b91 100644 --- a/libnm-util/nm-setting-connection.c +++ b/libnm-util/nm-setting-connection.c @@ -23,7 +23,7 @@ #include "config.h" #include <string.h> -#include <glib/gi18n.h> +#include <glib/gi18n-lib.h> #include "nm-utils.h" #include "nm-dbus-glib-types.h" diff --git a/libnm-util/nm-setting-dcb.c b/libnm-util/nm-setting-dcb.c index 6192d7639..45661b4bf 100644 --- a/libnm-util/nm-setting-dcb.c +++ b/libnm-util/nm-setting-dcb.c @@ -23,7 +23,7 @@ #include <string.h> #include <dbus/dbus-glib.h> -#include <glib/gi18n.h> +#include <glib/gi18n-lib.h> #include "nm-setting-dcb.h" #include "nm-param-spec-specialized.h" diff --git a/libnm-util/nm-setting-gsm.c b/libnm-util/nm-setting-gsm.c index 5b91a4c0f..a17d18b7e 100644 --- a/libnm-util/nm-setting-gsm.c +++ b/libnm-util/nm-setting-gsm.c @@ -23,7 +23,7 @@ #include "config.h" #include <string.h> -#include <glib/gi18n.h> +#include <glib/gi18n-lib.h> #include "nm-setting-gsm.h" #include "nm-utils.h" diff --git a/libnm-util/nm-setting-infiniband.c b/libnm-util/nm-setting-infiniband.c index 71942c60e..cc7a8bfd9 100644 --- a/libnm-util/nm-setting-infiniband.c +++ b/libnm-util/nm-setting-infiniband.c @@ -24,7 +24,7 @@ #include <stdlib.h> #include <dbus/dbus-glib.h> #include <linux/if_infiniband.h> -#include <glib/gi18n.h> +#include <glib/gi18n-lib.h> #include "nm-setting-infiniband.h" #include "nm-param-spec-specialized.h" diff --git a/libnm-util/nm-setting-ip4-config.c b/libnm-util/nm-setting-ip4-config.c index c86e061fb..c5115c595 100644 --- a/libnm-util/nm-setting-ip4-config.c +++ b/libnm-util/nm-setting-ip4-config.c @@ -24,7 +24,7 @@ #include <string.h> #include <dbus/dbus-glib.h> -#include <glib/gi18n.h> +#include <glib/gi18n-lib.h> #include "nm-setting-ip4-config.h" #include "nm-param-spec-specialized.h" diff --git a/libnm-util/nm-setting-ip6-config.c b/libnm-util/nm-setting-ip6-config.c index e13587bb7..7d0ed33e2 100644 --- a/libnm-util/nm-setting-ip6-config.c +++ b/libnm-util/nm-setting-ip6-config.c @@ -23,7 +23,7 @@ #include <string.h> #include <dbus/dbus-glib.h> -#include <glib/gi18n.h> +#include <glib/gi18n-lib.h> #include "nm-setting-ip6-config.h" #include "nm-param-spec-specialized.h" diff --git a/libnm-util/nm-setting-olpc-mesh.c b/libnm-util/nm-setting-olpc-mesh.c index e67ac9601..e4b6dae5b 100644 --- a/libnm-util/nm-setting-olpc-mesh.c +++ b/libnm-util/nm-setting-olpc-mesh.c @@ -25,7 +25,7 @@ #include <string.h> #include <netinet/ether.h> #include <dbus/dbus-glib.h> -#include <glib/gi18n.h> +#include <glib/gi18n-lib.h> #include "NetworkManager.h" #include "nm-setting-olpc-mesh.h" diff --git a/libnm-util/nm-setting-ppp.c b/libnm-util/nm-setting-ppp.c index 041253a96..a01d3e106 100644 --- a/libnm-util/nm-setting-ppp.c +++ b/libnm-util/nm-setting-ppp.c @@ -22,7 +22,7 @@ #include "config.h" -#include <glib/gi18n.h> +#include <glib/gi18n-lib.h> #include "nm-setting-ppp.h" #include "nm-setting-private.h" diff --git a/libnm-util/nm-setting-pppoe.c b/libnm-util/nm-setting-pppoe.c index 08a0ea297..deaeb2e88 100644 --- a/libnm-util/nm-setting-pppoe.c +++ b/libnm-util/nm-setting-pppoe.c @@ -23,7 +23,7 @@ #include "config.h" #include <string.h> -#include <glib/gi18n.h> +#include <glib/gi18n-lib.h> #include "nm-setting-pppoe.h" #include "nm-setting-ppp.h" diff --git a/libnm-util/nm-setting-team-port.c b/libnm-util/nm-setting-team-port.c index c2914ce2b..878b29720 100644 --- a/libnm-util/nm-setting-team-port.c +++ b/libnm-util/nm-setting-team-port.c @@ -24,7 +24,7 @@ #include <ctype.h> #include <stdlib.h> #include <dbus/dbus-glib.h> -#include <glib/gi18n.h> +#include <glib/gi18n-lib.h> #include "nm-setting-team-port.h" #include "nm-utils.h" diff --git a/libnm-util/nm-setting-team.c b/libnm-util/nm-setting-team.c index 27a9e8a66..9efb39321 100644 --- a/libnm-util/nm-setting-team.c +++ b/libnm-util/nm-setting-team.c @@ -23,7 +23,7 @@ #include <string.h> #include <stdlib.h> #include <dbus/dbus-glib.h> -#include <glib/gi18n.h> +#include <glib/gi18n-lib.h> #include "nm-setting-team.h" #include "nm-param-spec-specialized.h" diff --git a/libnm-util/nm-setting-vlan.c b/libnm-util/nm-setting-vlan.c index a42c60e09..f5e14558f 100644 --- a/libnm-util/nm-setting-vlan.c +++ b/libnm-util/nm-setting-vlan.c @@ -24,7 +24,7 @@ #include <stdlib.h> #include <string.h> #include <dbus/dbus-glib.h> -#include <glib/gi18n.h> +#include <glib/gi18n-lib.h> #include "nm-setting-vlan.h" #include "nm-param-spec-specialized.h" diff --git a/libnm-util/nm-setting-vpn.c b/libnm-util/nm-setting-vpn.c index ea44d9988..472ebbc3f 100644 --- a/libnm-util/nm-setting-vpn.c +++ b/libnm-util/nm-setting-vpn.c @@ -25,7 +25,7 @@ #include <errno.h> #include <stdlib.h> #include <dbus/dbus-glib.h> -#include <glib/gi18n.h> +#include <glib/gi18n-lib.h> #include "nm-setting-vpn.h" #include "nm-param-spec-specialized.h" diff --git a/libnm-util/nm-setting-wimax.c b/libnm-util/nm-setting-wimax.c index 12e60a46d..acb00f5e9 100644 --- a/libnm-util/nm-setting-wimax.c +++ b/libnm-util/nm-setting-wimax.c @@ -25,7 +25,7 @@ #include <string.h> #include <net/ethernet.h> #include <dbus/dbus-glib.h> -#include <glib/gi18n.h> +#include <glib/gi18n-lib.h> #include "nm-setting-wimax.h" #include "nm-param-spec-specialized.h" diff --git a/libnm-util/nm-setting-wired.c b/libnm-util/nm-setting-wired.c index a852b25ac..5a90d7dde 100644 --- a/libnm-util/nm-setting-wired.c +++ b/libnm-util/nm-setting-wired.c @@ -26,7 +26,7 @@ #include <net/ethernet.h> #include <netinet/ether.h> #include <dbus/dbus-glib.h> -#include <glib/gi18n.h> +#include <glib/gi18n-lib.h> #include "nm-setting-wired.h" #include "nm-param-spec-specialized.h" diff --git a/libnm-util/nm-setting-wireless-security.c b/libnm-util/nm-setting-wireless-security.c index 555b8955c..052a9327b 100644 --- a/libnm-util/nm-setting-wireless-security.c +++ b/libnm-util/nm-setting-wireless-security.c @@ -24,7 +24,7 @@ #include <string.h> #include <dbus/dbus-glib.h> -#include <glib/gi18n.h> +#include <glib/gi18n-lib.h> #include "nm-setting-wireless-security.h" #include "nm-setting-8021x.h" diff --git a/libnm-util/nm-setting-wireless.c b/libnm-util/nm-setting-wireless.c index 87a9b55b8..d6693cb9f 100644 --- a/libnm-util/nm-setting-wireless.c +++ b/libnm-util/nm-setting-wireless.c @@ -26,7 +26,7 @@ #include <net/ethernet.h> #include <netinet/ether.h> #include <dbus/dbus-glib.h> -#include <glib/gi18n.h> +#include <glib/gi18n-lib.h> #include "NetworkManager.h" #include "nm-setting-wireless.h" diff --git a/libnm-util/nm-setting.c b/libnm-util/nm-setting.c index f5026a4c0..4df2bced1 100644 --- a/libnm-util/nm-setting.c +++ b/libnm-util/nm-setting.c @@ -23,7 +23,7 @@ #include "config.h" #include <string.h> -#include <glib/gi18n.h> +#include <glib/gi18n-lib.h> #include "nm-setting.h" #include "nm-setting-private.h" diff --git a/libnm-util/nm-utils.c b/libnm-util/nm-utils.c index a5113538d..371bb49ca 100644 --- a/libnm-util/nm-utils.c +++ b/libnm-util/nm-utils.c @@ -26,6 +26,7 @@ #include <netinet/ether.h> #include <linux/if_infiniband.h> #include <uuid/uuid.h> +#include <libintl.h> #include <gmodule.h> #include "nm-utils.h" @@ -234,6 +235,9 @@ nm_utils_init (GError **error) if (!initialized) { initialized = TRUE; + bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR); + bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8"); + if (!crypto_init (error)) return FALSE; diff --git a/libnm/nm-device-adsl.c b/libnm/nm-device-adsl.c index b50933583..99771548f 100644 --- a/libnm/nm-device-adsl.c +++ b/libnm/nm-device-adsl.c @@ -29,7 +29,7 @@ #include "nm-setting-connection.h" #include <string.h> -#include <glib/gi18n.h> +#include <glib/gi18n-lib.h> G_DEFINE_TYPE (NMDeviceAdsl, nm_device_adsl, NM_TYPE_DEVICE) diff --git a/libnm/nm-device-bond.c b/libnm/nm-device-bond.c index af6d3d18f..6bb673233 100644 --- a/libnm/nm-device-bond.c +++ b/libnm/nm-device-bond.c @@ -21,7 +21,7 @@ #include "config.h" #include <string.h> -#include <glib/gi18n.h> +#include <glib/gi18n-lib.h> #include "nm-glib-compat.h" diff --git a/libnm/nm-device-bridge.c b/libnm/nm-device-bridge.c index 6d5367402..ce28f2c2f 100644 --- a/libnm/nm-device-bridge.c +++ b/libnm/nm-device-bridge.c @@ -21,7 +21,7 @@ #include "config.h" #include <string.h> -#include <glib/gi18n.h> +#include <glib/gi18n-lib.h> #include "nm-glib-compat.h" diff --git a/libnm/nm-device-bt.c b/libnm/nm-device-bt.c index 0f949372e..775264645 100644 --- a/libnm/nm-device-bt.c +++ b/libnm/nm-device-bt.c @@ -22,7 +22,7 @@ #include "config.h" #include <string.h> -#include <glib/gi18n.h> +#include <glib/gi18n-lib.h> #include "nm-glib-compat.h" diff --git a/libnm/nm-device-ethernet.c b/libnm/nm-device-ethernet.c index a8db0ffc0..be2cb4dc4 100644 --- a/libnm/nm-device-ethernet.c +++ b/libnm/nm-device-ethernet.c @@ -22,7 +22,7 @@ #include "config.h" #include <string.h> -#include <glib/gi18n.h> +#include <glib/gi18n-lib.h> #include "nm-glib-compat.h" diff --git a/libnm/nm-device-generic.c b/libnm/nm-device-generic.c index 93c9dccc9..3ed0fa7e6 100644 --- a/libnm/nm-device-generic.c +++ b/libnm/nm-device-generic.c @@ -21,7 +21,7 @@ #include "config.h" #include <string.h> -#include <glib/gi18n.h> +#include <glib/gi18n-lib.h> #include "nm-device-generic.h" #include "nm-device-private.h" diff --git a/libnm/nm-device-infiniband.c b/libnm/nm-device-infiniband.c index 2d755ba44..bce8a87aa 100644 --- a/libnm/nm-device-infiniband.c +++ b/libnm/nm-device-infiniband.c @@ -21,7 +21,7 @@ #include "config.h" #include <string.h> -#include <glib/gi18n.h> +#include <glib/gi18n-lib.h> #include "nm-glib-compat.h" diff --git a/libnm/nm-device-modem.c b/libnm/nm-device-modem.c index a2911f084..dcbb447a2 100644 --- a/libnm/nm-device-modem.c +++ b/libnm/nm-device-modem.c @@ -22,7 +22,7 @@ #include "config.h" #include <string.h> -#include <glib/gi18n.h> +#include <glib/gi18n-lib.h> #include "nm-glib-compat.h" diff --git a/libnm/nm-device-olpc-mesh.c b/libnm/nm-device-olpc-mesh.c index b881687ff..108e53398 100644 --- a/libnm/nm-device-olpc-mesh.c +++ b/libnm/nm-device-olpc-mesh.c @@ -21,7 +21,7 @@ #include "config.h" #include <string.h> -#include <glib/gi18n.h> +#include <glib/gi18n-lib.h> #include "nm-glib-compat.h" diff --git a/libnm/nm-device-team.c b/libnm/nm-device-team.c index e892d827c..cff1d7184 100644 --- a/libnm/nm-device-team.c +++ b/libnm/nm-device-team.c @@ -21,7 +21,7 @@ #include "config.h" #include <string.h> -#include <glib/gi18n.h> +#include <glib/gi18n-lib.h> #include "nm-glib-compat.h" diff --git a/libnm/nm-device-vlan.c b/libnm/nm-device-vlan.c index 57acb7a8e..b34b3e14d 100644 --- a/libnm/nm-device-vlan.c +++ b/libnm/nm-device-vlan.c @@ -21,7 +21,7 @@ #include "config.h" #include <string.h> -#include <glib/gi18n.h> +#include <glib/gi18n-lib.h> #include "nm-glib-compat.h" diff --git a/libnm/nm-device-wifi.c b/libnm/nm-device-wifi.c index 493bd79b5..4a19f2e5a 100644 --- a/libnm/nm-device-wifi.c +++ b/libnm/nm-device-wifi.c @@ -22,7 +22,7 @@ #include "config.h" #include <string.h> -#include <glib/gi18n.h> +#include <glib/gi18n-lib.h> #include "nm-glib-compat.h" diff --git a/libnm/nm-device-wimax.c b/libnm/nm-device-wimax.c index e400057ab..f199b669f 100644 --- a/libnm/nm-device-wimax.c +++ b/libnm/nm-device-wimax.c @@ -22,7 +22,7 @@ #include "config.h" #include <string.h> -#include <glib/gi18n.h> +#include <glib/gi18n-lib.h> #include "nm-glib-compat.h" diff --git a/libnm/nm-device.c b/libnm/nm-device.c index 66e9cc078..e80ac707d 100644 --- a/libnm/nm-device.c +++ b/libnm/nm-device.c @@ -23,7 +23,7 @@ #include <string.h> -#include <glib/gi18n.h> +#include <glib/gi18n-lib.h> #include <gudev/gudev.h> #include "nm-dbus-interface.h" diff --git a/libnm/nm-manager.c b/libnm/nm-manager.c index e0301fd34..11c4db9f3 100644 --- a/libnm/nm-manager.c +++ b/libnm/nm-manager.c @@ -22,7 +22,7 @@ #include "config.h" #include <string.h> -#include <glib/gi18n.h> +#include <glib/gi18n-lib.h> #include <nm-utils.h> #include "nm-manager.h" diff --git a/libnm/nm-object.c b/libnm/nm-object.c index 21a6ad7f8..f02c09c2e 100644 --- a/libnm/nm-object.c +++ b/libnm/nm-object.c @@ -23,7 +23,7 @@ #include <string.h> #include <gio/gio.h> -#include <glib/gi18n.h> +#include <glib/gi18n-lib.h> #include <stdlib.h> #include <stdio.h> #include <nm-utils.h> diff --git a/libnm/nm-remote-connection.c b/libnm/nm-remote-connection.c index 0c5370588..3afe7f8eb 100644 --- a/libnm/nm-remote-connection.c +++ b/libnm/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 <nm-dbus-interface.h> #include <nm-utils.h> diff --git a/libnm/nm-remote-settings.c b/libnm/nm-remote-settings.c index 633d25dba..d37e36661 100644 --- a/libnm/nm-remote-settings.c +++ b/libnm/nm-remote-settings.c @@ -22,7 +22,7 @@ #include "config.h" #include <string.h> -#include <glib/gi18n.h> +#include <glib/gi18n-lib.h> #include <nm-dbus-interface.h> #include <nm-connection.h> diff --git a/libnm/nm-vpn-plugin-old.c b/libnm/nm-vpn-plugin-old.c index c4d7de432..e6843f7e1 100644 --- a/libnm/nm-vpn-plugin-old.c +++ b/libnm/nm-vpn-plugin-old.c @@ -29,7 +29,7 @@ #include <signal.h> #include <stdlib.h> -#include <glib/gi18n.h> +#include <glib/gi18n-lib.h> #include <gio/gio.h> #include "nm-glib-compat.h" |