Re: [PATCH 2/2] i18n translate builtin warning, error, usage, fatal messages
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Sep 5, 2014, 19:47 UTC
- Message-ID
- <xmqq4mwlrgrl.fsf@gitster.dls.corp.google.com>
- In-Reply-To
- <1409943445-12283-3-git-send-email-sandy.carter@savoirfairelinux.com>
Sandy Carter <sandy.carter@savoirfairelinux.com> writes:
Show 5 quoted lines
> 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?
Show 36 quoted lines
> 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)