From 7e5b2a94ce3c089c50c5862168d1d917e5febcf4 Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Wed, 25 Jul 2012 23:10:35 +0300 Subject: Add translation to the extensions. --- extension/filefuncs.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'extension/filefuncs.c') diff --git a/extension/filefuncs.c b/extension/filefuncs.c index 41783c85..e8c16e8f 100644 --- a/extension/filefuncs.c +++ b/extension/filefuncs.c @@ -42,6 +42,10 @@ #include "config.h" #include "gawkapi.h" +#include "gettext.h" +#define _(msgid) gettext(msgid) +#define N_(msgid) msgid + static const gawk_api_t *api; /* for convenience macros to work */ static awk_ext_id_t *ext_id; static awk_bool_t (*init_func)(void) = NULL; @@ -59,7 +63,7 @@ do_chdir(int nargs, awk_value_t *result) assert(result != NULL); if (do_lint && nargs != 1) - lintwarn(ext_id, "chdir: called with incorrect number of arguments, expecting 1"); + lintwarn(ext_id, _("chdir: called with incorrect number of arguments, expecting 1")); if (get_argument(0, AWK_STRING, & newdir)) { ret = chdir(newdir.str_value.str); @@ -339,14 +343,14 @@ do_stat(int nargs, awk_value_t *result) assert(result != NULL); if (do_lint && nargs != 2) { - lintwarn(ext_id, "stat: called with wrong number of arguments"); + lintwarn(ext_id, _("stat: called with wrong number of arguments")); return make_number(-1, result); } /* file is first arg, array to hold results is second */ if ( ! get_argument(0, AWK_STRING, & file_param) || ! get_argument(1, AWK_ARRAY, & array_param)) { - warning(ext_id, "stat: bad parameters"); + warning(ext_id, _("stat: bad parameters")); return make_number(-1, result); } -- cgit v1.2.3