diff options
author | Eric Koegel <eric.koegel@gmail.com> | 2014-10-12 09:39:07 +0300 |
---|---|---|
committer | Eric Koegel <eric.koegel@gmail.com> | 2014-10-12 09:42:31 +0300 |
commit | d6134407405b56d33c0b8d3f1769214c71dd677e (patch) | |
tree | 90ca6721edd7edd98e5c5eb9ae3cba3c883b7493 /tools/ck-collect-session-info.c | |
parent | 479b216000352df7dcc47713b48e2a8bcaf8e45a (diff) | |
download | ConsoleKit2-d6134407405b56d33c0b8d3f1769214c71dd677e.tar.gz |
Add i18n support
Sets up ConsoleKit2 for translations via GNU gettext. There might
still be a couple strings that need to be marked for translation,
but this sets up the project to use gettext. Fixes bug:
https://bugs.freedesktop.org/show_bug.cgi?id=23482
Diffstat (limited to 'tools/ck-collect-session-info.c')
-rw-r--r-- | tools/ck-collect-session-info.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tools/ck-collect-session-info.c b/tools/ck-collect-session-info.c index b803e13..7715417 100644 --- a/tools/ck-collect-session-info.c +++ b/tools/ck-collect-session-info.c @@ -29,6 +29,8 @@ #include <unistd.h> #include <pwd.h> #include <errno.h> +#include <libintl.h> +#include <locale.h> #include <glib.h> @@ -424,6 +426,14 @@ main (int argc, { NULL } }; + /* Setup for i18n */ + setlocale(LC_ALL, ""); + +#ifdef ENABLE_NLS + bindtextdomain(PACKAGE, LOCALEDIR); + textdomain(PACKAGE); +#endif + /* For now at least restrict this to root */ if (getuid () != 0) { g_warning ("You must be root to run this program"); |