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-log-system-stop.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-log-system-stop.c')
-rw-r--r-- | tools/ck-log-system-stop.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/tools/ck-log-system-stop.c b/tools/ck-log-system-stop.c index 879402b..e9e278b 100644 --- a/tools/ck-log-system-stop.c +++ b/tools/ck-log-system-stop.c @@ -29,7 +29,7 @@ #include <sys/types.h> #include <sys/stat.h> #include <string.h> - +#include <libintl.h> #include <locale.h> #include <glib.h> @@ -166,6 +166,14 @@ main (int argc, { CkLogEvent event; + /* Setup for i18n */ + setlocale(LC_ALL, ""); + +#ifdef ENABLE_NLS + bindtextdomain(PACKAGE, LOCALEDIR); + textdomain(PACKAGE); +#endif + memset (&event, 0, sizeof (CkLogEvent)); event.type = CK_LOG_EVENT_SYSTEM_STOP; |