summaryrefslogtreecommitdiff
path: root/fc-scan
diff options
context:
space:
mode:
Diffstat (limited to 'fc-scan')
-rw-r--r--fc-scan/fc-scan.c30
1 files changed, 19 insertions, 11 deletions
diff --git a/fc-scan/fc-scan.c b/fc-scan/fc-scan.c
index 41bd260..edb967c 100644
--- a/fc-scan/fc-scan.c
+++ b/fc-scan/fc-scan.c
@@ -40,6 +40,14 @@
#include <stdlib.h>
#include <string.h>
+#ifdef ENABLE_NLS
+#include <libintl.h>
+#define _(x) (dgettext(GETTEXT_PACKAGE, x))
+#else
+#define dgettext(d, s) (s)
+#define _(x) (x)
+#endif
+
#ifndef HAVE_GETOPT
#define HAVE_GETOPT 0
#endif
@@ -70,24 +78,24 @@ usage (char *program, int error)
{
FILE *file = error ? stderr : stdout;
#if HAVE_GETOPT_LONG
- fprintf (file, "usage: %s [-bVh] [-f FORMAT] [--brief] [--format FORMAT] [--version] [--help] font-file...\n",
+ fprintf (file, _("usage: %s [-bVh] [-f FORMAT] [--brief] [--format FORMAT] [--version] [--help] font-file...\n"),
program);
#else
- fprintf (file, "usage: %s [-bVh] [-f FORMAT] font-file...\n",
+ fprintf (file, _("usage: %s [-bVh] [-f FORMAT] font-file...\n"),
program);
#endif
- fprintf (file, "Scan font files and directories, and print resulting pattern(s)\n");
+ fprintf (file, _("Scan font files and directories, and print resulting pattern(s)\n"));
fprintf (file, "\n");
#if HAVE_GETOPT_LONG
- fprintf (file, " -b, --brief display font pattern briefly\n");
- fprintf (file, " -f, --format=FORMAT use the given output format\n");
- fprintf (file, " -V, --version display font config version and exit\n");
- fprintf (file, " -h, --help display this help and exit\n");
+ fprintf (file, _(" -b, --brief display font pattern briefly\n"));
+ fprintf (file, _(" -f, --format=FORMAT use the given output format\n"));
+ fprintf (file, _(" -V, --version display font config version and exit\n"));
+ fprintf (file, _(" -h, --help display this help and exit\n"));
#else
- fprintf (file, " -b (brief) display font pattern briefly\n");
- fprintf (file, " -f FORMAT (format) use the given output format\n");
- fprintf (file, " -V (version) display font config version and exit\n");
- fprintf (file, " -h (help) display this help and exit\n");
+ fprintf (file, _(" -b (brief) display font pattern briefly\n"));
+ fprintf (file, _(" -f FORMAT (format) use the given output format\n"));
+ fprintf (file, _(" -V (version) display font config version and exit\n"));
+ fprintf (file, _(" -h (help) display this help and exit\n"));
#endif
exit (error);
}