summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJiri Moskovcak <jmoskovc@redhat.com>2009-09-02 12:16:13 +0200
committerJiri Moskovcak <jmoskovc@redhat.com>2009-09-02 12:16:13 +0200
commit5b79533ec48b0ec9eb2cdd5cafc705160a486888 (patch)
tree9800012383e1cb4e27d8fb42d91cb3591f93e15a /src
parentd28efd514ea109db680dd143fe9bcad147d0730f (diff)
parent84ae8a43927b479a8b3565e43d0b3a109b164c21 (diff)
downloadabrt-5b79533ec48b0ec9eb2cdd5cafc705160a486888.tar.gz
abrt-5b79533ec48b0ec9eb2cdd5cafc705160a486888.tar.xz
abrt-5b79533ec48b0ec9eb2cdd5cafc705160a486888.zip
Merge branch 'master' of ssh://git.fedorahosted.org/git/abrt
Diffstat (limited to 'src')
-rw-r--r--src/Daemon/Daemon.cpp23
-rw-r--r--src/Daemon/Makefile.am2
2 files changed, 25 insertions, 0 deletions
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 <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 03c0c7d..6961960 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)'