From 84ae8a43927b479a8b3565e43d0b3a109b164c21 Mon Sep 17 00:00:00 2001 From: Nikola Pajkovsky Date: Wed, 2 Sep 2009 11:39:27 +0200 Subject: add gettext support for all plugins --- src/Daemon/Daemon.cpp | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'src/Daemon/Daemon.cpp') diff --git a/src/Daemon/Daemon.cpp b/src/Daemon/Daemon.cpp index ddde115..be9c9c2 100644 --- a/src/Daemon/Daemon.cpp +++ b/src/Daemon/Daemon.cpp @@ -34,6 +34,22 @@ #define VAR_RUN_PIDFILE VAR_RUN"/abrt.pid" +#if HAVE_CONFIG_H + #include +#endif + +#if HAVE_LOCALE_H + #include +#endif + +#if ENABLE_NLS + #include + #define _(S) gettext(S) +#else + #define _(S) (S) +#endif + + //FIXME: add some struct to be able to join all threads! typedef struct cron_callback_data_t { @@ -528,6 +544,13 @@ int main(int argc, char** argv) bool daemonize = true; int opt; + setlocale(LC_ALL,""); + +#if ENABLE_NLS + bindtextdomain(PACKAGE, LOCALEDIR); + textdomain(PACKAGE); +#endif + while ((opt = getopt(argc, argv, "dv")) != -1) { switch (opt) -- cgit