diff options
author | Stef Walter <stefw@gnome.org> | 2012-07-17 10:14:27 +0200 |
---|---|---|
committer | Stef Walter <stefw@gnome.org> | 2012-07-18 07:40:01 +0200 |
commit | 54b73f5cb609b388d31d99708dc542d3aa03dbe1 (patch) | |
tree | 3aee11f986eeca2ad740bdcdf7206e02120ffe42 | |
parent | 9bf240ef4d4e3f3a22f2899a163e3cc4b790656d (diff) | |
download | libsecret-54b73f5cb609b388d31d99708dc542d3aa03dbe1.tar.gz |
Initialize gettext in secret-tool
https://bugzilla.gnome.org/show_bug.cgi?id=680072
-rw-r--r-- | tool/Makefile.am | 1 | ||||
-rw-r--r-- | tool/secret-tool.c | 9 |
2 files changed, 10 insertions, 0 deletions
diff --git a/tool/Makefile.am b/tool/Makefile.am index d3af455..f41e0f6 100644 --- a/tool/Makefile.am +++ b/tool/Makefile.am @@ -4,6 +4,7 @@ INCLUDES = \ -I$(top_srcdir) \ -I$(top_srcdir)/libsecret \ -DSECRET_COMPILATION \ + -DLOCALEDIR=\""$(datadir)/locale"\" \ $(NULL) bin_PROGRAMS = secret-tool diff --git a/tool/secret-tool.c b/tool/secret-tool.c index fd0792b..def22f5 100644 --- a/tool/secret-tool.c +++ b/tool/secret-tool.c @@ -21,6 +21,7 @@ #include <glib/gi18n.h> #include <errno.h> +#include <locale.h> #include <limits.h> #include <stdlib.h> @@ -336,6 +337,14 @@ main (int argc, { SecretToolAction action; + setlocale (LC_ALL, ""); + +#ifdef ENABLE_NLS + bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR); + bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8"); + textdomain (GETTEXT_PACKAGE); +#endif + g_type_init (); if (argc < 2) |