diff options
Diffstat (limited to 'src/Daemon')
-rw-r--r-- | src/Daemon/Daemon.cpp | 23 | ||||
-rw-r--r-- | src/Daemon/Makefile.am | 2 |
2 files changed, 25 insertions, 0 deletions
diff --git a/src/Daemon/Daemon.cpp b/src/Daemon/Daemon.cpp index ddde1151..be9c9c28 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 <config.h> +#endif + +#if HAVE_LOCALE_H + #include <locale.h> +#endif + +#if ENABLE_NLS + #include <libintl.h> + #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) diff --git a/src/Daemon/Makefile.am b/src/Daemon/Makefile.am index 03c0c7d6..6961960f 100644 --- a/src/Daemon/Makefile.am +++ b/src/Daemon/Makefile.am @@ -40,5 +40,7 @@ dist_daemonconf_DATA = abrt.conf man_MANS = abrt.8 abrt.conf.5 EXTRA_DIST = $(man_MANS) +DEFS = -DLOCALEDIR=\"$(localedir)\" @DEFS@ + install-data-local: $(mkdir_p) '$(DESTDIR)/$(VAR_RUN)' |