Subject: Re: [PATCH 2/2] i18n translate builtin warning, error, usage, fatal messages

From: Junio C Hamano <[email-masked]>
Date: Fri, 05 Sep 2014 12:47:42 -0700

Sandy Carter <[email-masked]> writes:

> Allow warnings, errors, usage and fatal messages to be translated to user
> when checking out a ambiguous refname for example
>
> Signed-off-by: Sandy Carter <[email-masked]>
> ---

Hmmmm.  Doesn't this break the plumbing commands whose messages are
meant to be matched and interpreted by scripts?

>  usage.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/usage.c b/usage.c
> index ed14645..24a450e 100644
> --- a/usage.c
> +++ b/usage.c
> @@ -27,24 +27,24 @@ void vwritef(int fd, 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)