git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Bagas Sanjaya <bagasdotme@gmail.com>
To: Bagas Sanjaya via GitGitGadget <gitgitgadget@gmail.com>,
	git@vger.kernel.org
Cc: "Jean-Noël Avila" <jn.avila@free.fr>
Subject: Re: [PATCH 2/7] sequencer: factor GIT_AUTHOR_* from message strings
Date: Mon, 21 Mar 2022 12:22:10 +0700	[thread overview]
Message-ID: <19947a0f-fdc2-eb80-741b-0ba5ed6335d8@gmail.com> (raw)
In-Reply-To: <8bdbb32f54421f99be55493257b31b203a11f202.1647813292.git.gitgitgadget@gmail.com>

On 21/03/22 04.54, Bagas Sanjaya via GitGitGadget wrote:
> From: Bagas Sanjaya <bagasdotme@gmail.com>
> 
> Factor messages containing GIT_AUTHOR_* variable.
> 
> Signed-off-by: Bagas Sanjaya <bagasdotme@gmail.com>
> ---
>   sequencer.c | 12 ++++++------
>   1 file changed, 6 insertions(+), 6 deletions(-)
> 
> diff --git a/sequencer.c b/sequencer.c
> index 84eed9e96bc..647f5efa656 100644
> --- a/sequencer.c
> +++ b/sequencer.c
> @@ -848,17 +848,17 @@ int read_author_script(const char *path, char **name, char **email, char **date,
>   	for (i = 0; i < kv.nr; i++) {
>   		if (!strcmp(kv.items[i].string, "GIT_AUTHOR_NAME")) {
>   			if (name_i != -2)
> -				name_i = error(_("'GIT_AUTHOR_NAME' already given"));
> +				name_i = error(_("'%s' already given"), "GIT_AUTHOR_NAME");
>   			else
>   				name_i = i;
>   		} else if (!strcmp(kv.items[i].string, "GIT_AUTHOR_EMAIL")) {
>   			if (email_i != -2)
> -				email_i = error(_("'GIT_AUTHOR_EMAIL' already given"));
> +				email_i = error(_("'%s' already given"), "GIT_AUTHOR_EMAIL");
>   			else
>   				email_i = i;
>   		} else if (!strcmp(kv.items[i].string, "GIT_AUTHOR_DATE")) {
>   			if (date_i != -2)
> -				date_i = error(_("'GIT_AUTHOR_DATE' already given"));
> +				date_i = error(_("'%s' already given"), "GIT_AUTHOR_DATE");
>   			else
>   				date_i = i;
>   		} else {
> @@ -867,11 +867,11 @@ int read_author_script(const char *path, char **name, char **email, char **date,
>   		}
>   	}
>   	if (name_i == -2)
> -		error(_("missing 'GIT_AUTHOR_NAME'"));
> +		error(_("missing '%s'"), "GIT_AUTHOR_NAME");
>   	if (email_i == -2)
> -		error(_("missing 'GIT_AUTHOR_EMAIL'"));
> +		error(_("missing '%s'"), "GIT_AUTHOR_EMAIL");
>   	if (date_i == -2)
> -		error(_("missing 'GIT_AUTHOR_DATE'"));
> +		error(_("missing '%s'"), "GIT_AUTHOR_DATE");
>   	if (date_i < 0 || email_i < 0 || date_i < 0 || err)
>   		goto finish;
>   	*name = kv.items[name_i].util;

Looks OK. Thanks for picking this up.

Acked-by: Bagas Sanjaya <bagasdotme@gmail.com>

-- 
An old man doll... just what I always wanted! - Clara

  reply	other threads:[~2022-03-21  5:22 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-20 21:54 [PATCH 0/7] More i18n fixes Jean-Noël Avila via GitGitGadget
2022-03-20 21:54 ` [PATCH 1/7] i18n: factorize generic failure messages Jean-Noël Avila via GitGitGadget
2022-03-20 21:54 ` [PATCH 2/7] sequencer: factor GIT_AUTHOR_* from message strings Bagas Sanjaya via GitGitGadget
2022-03-21  5:22   ` Bagas Sanjaya [this message]
2022-03-20 21:54 ` [PATCH 3/7] i18n: factorize "bad argument" messages Jean-Noël Avila via GitGitGadget
2022-03-20 21:54 ` [PATCH 4/7] i18n: factorize "Server does not support foo" messages Jean-Noël Avila via GitGitGadget
2022-03-20 21:54 ` [PATCH 5/7] i18n: factorize "foo does not take arguments" messages Jean-Noël Avila via GitGitGadget
2022-03-20 21:54 ` [PATCH 6/7] i18n: factorize read-cache error messages Jean-Noël Avila via GitGitGadget
2022-03-20 21:54 ` [PATCH 7/7] i18n: factorize unrecognized options arguments messages Jean-Noël Avila via GitGitGadget
2022-03-21  6:48 ` [PATCH 0/7] More i18n fixes Johannes Sixt
2022-03-21 13:59   ` Ævar Arnfjörð Bjarmason
2022-03-21 19:03     ` Junio C Hamano
2022-03-21 20:13       ` Jean-Noël AVILA
2022-03-21 20:35     ` Jean-Noël AVILA
2022-04-02 16:10 ` [PATCH v2 0/6] " Jean-Noël Avila via GitGitGadget
2022-04-02 16:10   ` [PATCH v2 1/6] i18n: factorize generic failure messages Jean-Noël Avila via GitGitGadget
2022-04-03  5:56     ` Bagas Sanjaya
2022-04-03 14:34       ` Ævar Arnfjörð Bjarmason
2022-04-03 14:47     ` Ævar Arnfjörð Bjarmason
2022-04-02 16:10   ` [PATCH v2 2/6] sequencer: factor GIT_AUTHOR_* from message strings Bagas Sanjaya via GitGitGadget
2022-04-02 16:10   ` [PATCH v2 3/6] i18n: factorize server support messages in fetch-pack Jean-Noël Avila via GitGitGadget
2022-04-02 16:10   ` [PATCH v2 4/6] i18n: factorize "foo does not take arguments" messages Jean-Noël Avila via GitGitGadget
2022-04-03 14:39     ` Ævar Arnfjörð Bjarmason
2022-04-03 22:21       ` Junio C Hamano
2022-04-02 16:10   ` [PATCH v2 5/6] i18n: factorize read-cache error messages Jean-Noël Avila via GitGitGadget
2022-04-03 22:29     ` Junio C Hamano
2022-04-02 16:10   ` [PATCH v2 6/6] i18n: factorize "bad argument" messages Jean-Noël Avila via GitGitGadget
2022-04-03 14:41     ` Ævar Arnfjörð Bjarmason

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

  List information: http://vger.kernel.org/majordomo-info.html

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

  git send-email \
    --in-reply-to=19947a0f-fdc2-eb80-741b-0ba5ed6335d8@gmail.com \
    --to=bagasdotme@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitgitgadget@gmail.com \
    --cc=jn.avila@free.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).