[RFC PATCH 3/3] usage: translate the "error: "-prefix and others
- From
- Martin Ågren <martin.agren@gmail.com>
- Date
- May 25, 2018, 21:00 UTC
- Message-ID
- <0a709ff2b1af85d21e96d9e259f2ec9f69d3a94d.1527279322.git.martin.agren@gmail.com>
- In-Reply-To
- <cover.1527279322.git.martin.agren@gmail.com>
Translate the "error: ", "fatal: ", "usage: " and "warning: " prefixes that we use for reporting that kind of information.
Do not translate "BUG: ". We tend to prefer the messages themselves to be non-translated (and they're not supposed to ever appear anyway) so it makes sense to let the prefix be nontranslated, too.
Signed-off-by: Martin Ågren <martin.agren@gmail.com> --- This change breaks several tests under GETTEXT_POISON, e.g. t6030 which does this:
git bisect skip > my_bisect_log.txt 2>&1 && grep "warning" my_bisect_log.txt
usage.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/usage.c b/usage.c index 6a5669922f..7709cb22e7 100644 --- a/usage.c +++ b/usage.c @@ -39,24 +39,24 @@ void vreportf(const char *prefix, const char *err, va_list params) static NORETURN void usage_builtin(const char *err, va_list params) { - vreportf("usage: ", err, params); + vreportf(_("usage: "), err, params); exit(129); } static NORETURN void die_builtin(const char *err, va_list params) { - vreportf("fatal: ", err, params); + vreportf(_("fatal: "), err, params); exit(128); } static void error_builtin(const char *err, va_list params) { - vreportf("error: ", err, params); + vreportf(_("error: "), err, params); } static void warn_builtin(const char *warn, va_list params) { - vreportf("warning: ", warn, params); + vreportf(_("warning: "), warn, params); } static int die_is_recursing_builtin(void)
-- 2.17.0.1181.g093e983b05