public inbox for git@vger.kernel.org 
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox•com>
To: "Nguyễn Thái Ngọc Duy" <pclouds@gmail•com>
Cc: git@vger•kernel.org, Jeff King <peff@peff•net>
Subject: Re: [PATCH 11/22] ident.c: mark strings for translation
Date: Mon, 29 Feb 2016 10:34:59 -0800	[thread overview]
Message-ID: <xmqqsi0bbc18.fsf@gitster.mtv.corp.google.com> (raw)
In-Reply-To: <1456555333-5853-12-git-send-email-pclouds@gmail.com> ("Nguyễn	Thái Ngọc Duy"'s message of "Sat, 27 Feb 2016 13:42:02 +0700")

Nguyễn Thái Ngọc Duy  <pclouds@gmail•com> writes:

> Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail•com>
> ---

All (or at least most of) these look old ones; even the ones blamed
to 59f92959 (fmt_ident: refactor strictness checks, 2016-02-04) had
original in the same file without _().

I'm inclined to say we should do the whole thing post 2.8.0 release
for this file.

>  ident.c | 18 +++++++++---------
>  1 file changed, 9 insertions(+), 9 deletions(-)
>
> diff --git a/ident.c b/ident.c
> index 6e12582..367a5dc 100644
> --- a/ident.c
> +++ b/ident.c
> @@ -75,13 +75,13 @@ static int add_mailname_host(struct strbuf *buf)
>  	mailname = fopen("/etc/mailname", "r");
>  	if (!mailname) {
>  		if (errno != ENOENT)
> -			warning("cannot open /etc/mailname: %s",
> +			warning(_("cannot open /etc/mailname: %s"),
>  				strerror(errno));
>  		return -1;
>  	}
>  	if (strbuf_getline(&mailnamebuf, mailname) == EOF) {
>  		if (ferror(mailname))
> -			warning("cannot read /etc/mailname: %s",
> +			warning(_("cannot read /etc/mailname: %s"),
>  				strerror(errno));
>  		strbuf_release(&mailnamebuf);
>  		fclose(mailname);
> @@ -125,7 +125,7 @@ static void add_domainname(struct strbuf *out, int *is_bogus)
>  	char buf[1024];
>  
>  	if (gethostname(buf, sizeof(buf))) {
> -		warning("cannot get host name: %s", strerror(errno));
> +		warning(_("cannot get host name: %s"), strerror(errno));
>  		strbuf_addstr(out, "(none)");
>  		*is_bogus = 1;
>  		return;
> @@ -355,18 +355,18 @@ const char *fmt_ident(const char *name, const char *email,
>  			using_default = 1;
>  			if (strict && default_name_is_bogus) {
>  				fputs(env_hint, stderr);
> -				die("unable to auto-detect name (got '%s')", name);
> +				die(_("unable to auto-detect name (got '%s')"), name);
>  			}
>  			if (strict && ident_use_config_only
>  			    && !(ident_config_given & IDENT_NAME_GIVEN))
> -				die("user.useConfigOnly set but no name given");
> +				die(_("user.useConfigOnly set but no name given"));
>  		}
>  		if (!*name) {
>  			struct passwd *pw;
>  			if (strict) {
>  				if (using_default)
>  					fputs(env_hint, stderr);
> -				die("empty ident name (for <%s>) not allowed", email);
> +				die(_("empty ident name (for <%s>) not allowed"), email);
>  			}
>  			pw = xgetpwuid_self(NULL);
>  			name = pw->pw_name;
> @@ -377,11 +377,11 @@ const char *fmt_ident(const char *name, const char *email,
>  		email = ident_default_email();
>  		if (strict && default_email_is_bogus) {
>  			fputs(env_hint, stderr);
> -			die("unable to auto-detect email address (got '%s')", email);
> +			die(_("unable to auto-detect email address (got '%s')"), email);
>  		}
>  		if (strict && ident_use_config_only
>  		    && !(ident_config_given & IDENT_MAIL_GIVEN))
> -			die("user.useConfigOnly set but no mail given");
> +			die(_("user.useConfigOnly set but no mail given"));
>  	}
>  
>  	strbuf_reset(&ident);
> @@ -396,7 +396,7 @@ const char *fmt_ident(const char *name, const char *email,
>  		strbuf_addch(&ident, ' ');
>  		if (date_str && date_str[0]) {
>  			if (parse_date(date_str, &ident) < 0)
> -				die("invalid date format: %s", date_str);
> +				die(_("invalid date format: %s"), date_str);
>  		}
>  		else
>  			strbuf_addstr(&ident, ident_default_date());

  reply	other threads:[~2016-02-29 18:35 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-27  6:41 [PATCH 00/22] Mark more strings for translation Nguyễn Thái Ngọc Duy
2016-02-27  6:41 ` [PATCH 01/22] credential-cache--daemon: enable localized messages Nguyễn Thái Ngọc Duy
2016-02-27  6:41 ` [PATCH 02/22] builtin/blame.c: mark strings for translation Nguyễn Thái Ngọc Duy
2016-02-28 18:57   ` Junio C Hamano
2016-02-29  0:33     ` Duy Nguyen
2016-02-29 18:22       ` Junio C Hamano
2016-02-27  6:41 ` [PATCH 03/22] builtin/checkout.c: " Nguyễn Thái Ngọc Duy
2016-02-28 19:00   ` Junio C Hamano
2016-02-27  6:41 ` [PATCH 04/22] builtin/clone.c: " Nguyễn Thái Ngọc Duy
2016-02-28 19:05   ` Junio C Hamano
2016-02-27  6:41 ` [PATCH 05/22] builtin/config.c: " Nguyễn Thái Ngọc Duy
2016-02-29 18:25   ` Junio C Hamano
2016-02-27  6:41 ` [PATCH 06/22] " Nguyễn Thái Ngọc Duy
2016-02-27  6:41 ` [PATCH 07/22] builtin/update-index.c: " Nguyễn Thái Ngọc Duy
2016-02-29 18:27   ` Junio C Hamano
2016-02-27  6:41 ` [PATCH 08/22] convert.c: " Nguyễn Thái Ngọc Duy
2016-02-29 18:29   ` Junio C Hamano
2016-02-27  6:42 ` [PATCH 09/22] credential-cache--daemon.c: " Nguyễn Thái Ngọc Duy
2016-02-29 18:30   ` Junio C Hamano
2016-02-27  6:42 ` [PATCH 10/22] http.c: " Nguyễn Thái Ngọc Duy
2016-02-29 18:31   ` Junio C Hamano
2016-02-27  6:42 ` [PATCH 11/22] ident.c: " Nguyễn Thái Ngọc Duy
2016-02-29 18:34   ` Junio C Hamano [this message]
2016-03-01 14:56     ` Jeff King
2016-02-27  6:42 ` [PATCH 12/22] notes.c: " Nguyễn Thái Ngọc Duy
2016-02-29 18:36   ` Junio C Hamano
2016-02-27  6:42 ` [PATCH 13/22] ref-filter.c: " Nguyễn Thái Ngọc Duy
2016-02-29 18:41   ` Junio C Hamano
2016-02-27  6:42 ` [PATCH 14/22] refs/files-backend.c: " Nguyễn Thái Ngọc Duy
2016-02-29 18:43   ` Junio C Hamano
2016-03-01 10:40     ` Duy Nguyen
2016-02-27  6:42 ` [PATCH 15/22] remote-curl.c: " Nguyễn Thái Ngọc Duy
2016-02-29 18:50   ` Junio C Hamano
2016-02-27  6:42 ` [PATCH 16/22] run-command.c: " Nguyễn Thái Ngọc Duy
2016-02-29 18:52   ` Junio C Hamano
2016-03-01  0:00     ` Stefan Beller
2016-02-27  6:42 ` [PATCH 17/22] sha1_file.c: " Nguyễn Thái Ngọc Duy
2016-02-27  6:42 ` [PATCH 18/22] submodule.c: " Nguyễn Thái Ngọc Duy
2016-02-27  6:42 ` [PATCH 19/22] trailer.c: " Nguyễn Thái Ngọc Duy
2016-02-29 18:55   ` Junio C Hamano
2016-02-27  6:42 ` [PATCH 20/22] transport-helper.c: mark strings for translating Nguyễn Thái Ngọc Duy
2016-02-27  6:42 ` [PATCH 21/22] transport.c: " Nguyễn Thái Ngọc Duy
2016-02-27  6:42 ` [PATCH 22/22] wrapper.c: mark strings for translation Nguyễn Thái Ngọc Duy
2016-02-27 17:34 ` [PATCH 00/22] Mark more " Junio C Hamano
2016-02-27 19:00   ` Junio C Hamano
2016-02-28  0:43   ` Duy Nguyen

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=xmqqsi0bbc18.fsf@gitster.mtv.corp.google.com \
    --to=gitster@pobox$(echo .)com \
    --cc=git@vger$(echo .)kernel.org \
    --cc=pclouds@gmail$(echo .)com \
    --cc=peff@peff$(echo .)net \
    /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