public inbox for git@vger.kernel.org 
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox•com>
To: Sandy Carter <sandy.carter@savoirfairelinux•com>
Cc: git@vger•kernel.org
Subject: Re: [PATCH 2/2] i18n translate builtin warning, error, usage, fatal messages
Date: Fri, 05 Sep 2014 12:47:42 -0700	[thread overview]
Message-ID: <xmqq4mwlrgrl.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <1409943445-12283-3-git-send-email-sandy.carter@savoirfairelinux.com> (Sandy Carter's message of "Fri, 5 Sep 2014 14:57:25 -0400")

Sandy Carter <sandy.carter@savoirfairelinux•com> 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 <sandy.carter@savoirfairelinux•com>
> ---

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)

      reply	other threads:[~2014-09-05 19:47 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-05 18:57 [PATCH 0/2] Translations for ambiguous refname warning Sandy Carter
2014-09-05 18:57 ` [PATCH 1/2] i18n: ambiguous refname message is not translated Sandy Carter
2014-09-05 18:57 ` [PATCH 2/2] i18n translate builtin warning, error, usage, fatal messages Sandy Carter
2014-09-05 19:47   ` Junio C Hamano [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqq4mwlrgrl.fsf@gitster.dls.corp.google.com \
    --to=gitster@pobox$(echo .)com \
    --cc=git@vger$(echo .)kernel.org \
    --cc=sandy.carter@savoirfairelinux$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox