[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 01/19] Mark some missed error messages for translation.
From: |
James Youngman |
Subject: |
[PATCH 01/19] Mark some missed error messages for translation. |
Date: |
Fri, 2 Apr 2010 23:47:01 +0100 |
* find/parser.c (safe_atoi): Likewise.
* find/pred.c (pred_context): Likewise.
(do_fprintf): Likewise.
* xargs/xargs.c (xargs_do_exec): Translate error message.
(xargs_do_exec): Likewise.
* lib/buildcmd.c (exceeds): Likewise.
Signed-off-by: James Youngman <address@hidden>
---
ChangeLog | 8 ++++++++
cfg.mk | 2 +-
find/parser.c | 2 +-
find/pred.c | 5 +++--
lib/buildcmd.c | 3 ++-
xargs/xargs.c | 7 +++++--
6 files changed, 20 insertions(+), 7 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 80da264..1dcf0e9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
2010-04-02 James Youngman <address@hidden>
+ Mark error messages for translation.
+ * find/parser.c (safe_atoi): Likewise.
+ * find/pred.c (pred_context): Likewise.
+ (do_fprintf): Likewise.
+ * xargs/xargs.c (xargs_do_exec): Translate error message.
+ (xargs_do_exec): Likewise.
+ * lib/buildcmd.c (exceeds): Likewise.
+
Add customisation of the behaviour of "make syntax-check".
* cfg.mk: New file; configuration file for the maintainer-makefile
provided by gnulib.
diff --git a/cfg.mk b/cfg.mk
index 143d9ca..eb20324 100644
--- a/cfg.mk
+++ b/cfg.mk
@@ -27,7 +27,7 @@ skip_defer = sc_program_name sc_prohibit_atoi_atof \
sc_prohibit_magic_number_exit sc_prohibit_stat_st_blocks \
sc_prohibit_strcmp sc_prohibit_test_minus_ao \
sc_prohibit_xalloc_without_use sc_space_tab \
- sc_texinfo_acronym sc_unmarked_diagnostics
+ sc_texinfo_acronym
# False positives I don't have a workaround for yet.
false_positives = sc_obsolete_symbols sc_prohibit_cvs_keyword sc_the_the \
diff --git a/find/parser.c b/find/parser.c
index d2256bd..eba3839 100644
--- a/find/parser.c
+++ b/find/parser.c
@@ -1192,7 +1192,7 @@ safe_atoi (const char *s)
}
else if (end == s)
{
- error (EXIT_FAILURE, errno, "Expected an integer: %s",
+ error (EXIT_FAILURE, errno, _("Expected an integer: %s"),
quotearg_n_style (0, options.err_quoting_style, s));
}
return (int)lval;
diff --git a/find/pred.c b/find/pred.c
index a7add11..7df37b1 100644
--- a/find/pred.c
+++ b/find/pred.c
@@ -1081,7 +1081,7 @@ do_fprintf (struct format_val *dest,
to an empty string. */
checked_fprintf (dest, segment->text, "");
- error (0, errno, "getfilecon: %s",
+ error (0, errno, _("getfilecon failed: %s"),
safely_quote_err_filename (0, pathname));
state.exit_status = 1;
}
@@ -1915,7 +1915,8 @@ pred_context (const char *pathname, struct stat *stat_buf,
&scontext);
if (rv < 0)
{
- error (0, errno, "getfilecon: %s", safely_quote_err_filename (0,
pathname));
+ error (0, errno, _("getfilecon failed: %s"),
+ safely_quote_err_filename (0, pathname));
return false;
}
diff --git a/lib/buildcmd.c b/lib/buildcmd.c
index b63a28b..901f381 100644
--- a/lib/buildcmd.c
+++ b/lib/buildcmd.c
@@ -672,7 +672,8 @@ exceeds (const char *env_var_name, size_t quantity)
else
{
error (EXIT_FAILURE, errno,
- "Environment variable %s is not set to a valid decimal number",
+ _("Environment variable %s is not set to a "
+ "valid decimal number"),
env_var_name);
return 0;
}
diff --git a/xargs/xargs.c b/xargs/xargs.c
index e8bf9a8..d8a0015 100644
--- a/xargs/xargs.c
+++ b/xargs/xargs.c
@@ -1145,7 +1145,9 @@ xargs_do_exec (struct buildcmd_control *ctl, void
*usercontext, int argc, char *
case -1:
{
close (fd[0]);
- error (0, errno, "errno-buffer read failed in xargs_do_exec
(BUG?)");
+ error (0, errno,
+ _("errno-buffer read failed in xargs_do_exec "
+ "(this is probably a bug, please report it)"));
break;
}
@@ -1197,7 +1199,8 @@ xargs_do_exec (struct buildcmd_control *ctl, void
*usercontext, int argc, char *
default:
{
error (EXIT_FAILURE, errno,
- "read returned unexpected value %d! BUG?", r);
+ _("read returned unexpected value %d; "
+ "this is probably a bug, please report it"), r);
}
} /* switch on bytes read */
close (fd[0]);
--
1.7.0
- [PATCH 01/19] Mark some missed error messages for translation.,
James Youngman <=
- [PATCH 02/19] * cfg.mk: Explain that we cannot enable the sc_texinfo_acronym syntax check right now, since the perm.texi file uses @acronym{GNU} but we try to keep that in sync. with coreutils., James Youngman, 2010/04/02
- [PATCH 03/19] Fix some space-followed-by-tab sequences., James Youngman, 2010/04/02
- [PATCH 05/19] Don't include xalloc.h where we don't use it., James Youngman, 2010/04/02
- [PATCH 06/19] Avoid false positives for the sc_prohibit_test_minus_ao syntax check., James Youngman, 2010/04/02
- [PATCH 04/19] Fix some compilation unused-result and missing-declaration warnings., James Youngman, 2010/04/02
- [PATCH 08/19] Move safe_atoi out into a separate module., James Youngman, 2010/04/02
- [PATCH 09/19] Remove some obsolete source files from POTFILES.in, James Youngman, 2010/04/02