aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org>2014-09-01 23:16:30 +0300
committerSergey Poznyakoff <gray@gnu.org>2014-09-01 23:16:30 +0300
commite37971aa51c2bea44d41fa64e334c518d8a2d4f8 (patch)
tree2dbacdcdfe3de0d276eca55cb12088d846a95c67 /src
parent9c10801c606eceda5b37d10f441a5b7d4cfb444a (diff)
downloaddirevent-e37971aa51c2bea44d41fa64e334c518d8a2d4f8.tar.gz
direvent-e37971aa51c2bea44d41fa64e334c518d8a2d4f8.tar.bz2
Improve I18N
* po/POTFILES.in: Add grecs sources. * src/Makefile.am (AM_CPPFLAGS): Add the definition of LOCALEDIR. * src/cmdline.opt (help_hook): Add missing gettext markers. * src/direvent.c (maint): Initialize libintl
Diffstat (limited to 'src')
-rw-r--r--src/Makefile.am4
-rw-r--r--src/cmdline.opt10
-rw-r--r--src/direvent.c8
3 files changed, 15 insertions, 7 deletions
diff --git a/src/Makefile.am b/src/Makefile.am
index 8bdf610..cdb5bef 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -42,7 +42,9 @@ endif
endif
LDADD=@GRECS_LDADD@ @LIBINTL@
-AM_CPPFLAGS=-I$(top_srcdir)/grecs/src/
+AM_CPPFLAGS=\
+ -I$(top_srcdir)/grecs/src/\
+ -DLOCALEDIR=\"$(localedir)\"
BUILT_SOURCES=cmdline.h
EXTRA_DIST=cmdline.opt
diff --git a/src/cmdline.opt b/src/cmdline.opt
index b7e1dd7..a200ab8 100644
--- a/src/cmdline.opt
+++ b/src/cmdline.opt
@@ -76,11 +76,11 @@ static void
help_hook(FILE *fp)
{
fprintf(fp,
- "The optional CONFIG argument supplies the name of the "
- "configuration file\n"
- "to use instead of %s.\n\n", DEFAULT_CONFFILE);
-
- fprintf(fp, "This direvent uses %s interface.\n\n", INTERFACE);
+ _("The optional CONFIG argument supplies the name of the "
+ "configuration file\n"
+ "to use instead of %s.\n\n"), DEFAULT_CONFFILE);
+ /* TRANSLATORS: %s is one of: inotify, kqueue */
+ fprintf(fp, _("This direvent uses %s interface.\n\n"), INTERFACE);
}
void
diff --git a/src/direvent.c b/src/direvent.c
index aa0e2f3..0125cf9 100644
--- a/src/direvent.c
+++ b/src/direvent.c
@@ -455,7 +455,13 @@ main(int argc, char **argv)
{
int i;
struct grecs_node *tree;
-
+
+#ifdef ENABLE_NLS
+ setlocale(LC_ALL, "");
+ bindtextdomain(PACKAGE, LOCALEDIR);
+ textdomain(PACKAGE);
+#endif
+
set_program_name(argv[0]);
tag = (char*) program_name;

Return to:

Send suggestions and report system problems to the System administrator.