All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jonathan Nieder <jrnieder@gmail.com>
To: Stefan Beller <sbeller@google.com>
Cc: gitster@pobox.com, pclouds@gmail.com, git@vger.kernel.org,
	Jens.Lehmann@web.de, peff@peff.net, sunshine@sunshineco.com
Subject: Re: [PATCHv20 00/12] Expose submodule parallelism to the user
Date: Mon, 29 Feb 2016 11:32:22 -0800	[thread overview]
Message-ID: <20160229193222.GX28749@google.com> (raw)
In-Reply-To: <1456773250-5510-1-git-send-email-sbeller@google.com>

Stefan Beller wrote:

> I added your suggestions as amending and as a new patch.

I think we're at the point where patches on top would work better.  I
admit I was a little scared to see another reroll.

[...]
> --- a/builtin/submodule--helper.c
> +++ b/builtin/submodule--helper.c
> @@ -299,10 +299,10 @@ static int prepare_to_clone_next_submodule(const struct cache_entry *ce,
>  
>  	if (ce_stage(ce)) {
>  		if (suc->recursive_prefix) {
> -			strbuf_addf(out, "Skipping unmerged submodule %s/%s\n",
> +			strbuf_addf(out,_("Skipping unmerged submodule %s/%s\n"),

Missing space after comma.

Usual practice for i18n would be something like

	struct strbuf path = STRBUF_INIT;
	if (suc->recursive_prefix)
		strbuf_addf(&path, "%s/%s", suc->recursive_prefix, ce->name);
	else
		strbuf_addstr(&path, ce->name);

	strbuf_addf(out, _("Skipping unmerged submodule %s"), path.buf);
	strbuf_addch(out, '\n');
	strbuf_release(&path);

Reasons:
 - translators shouldn't have to worry about the trailing newline
 - minimizing number of strings to translate
 - minimizing the chance that a translator typo produces an invalid path

[...]
> @@ -319,7 +319,7 @@ static int prepare_to_clone_next_submodule(const struct cache_entry *ce,
>  	if (suc->update.type == SM_UPDATE_NONE
>  	    || (suc->update.type == SM_UPDATE_UNSPECIFIED
>  		&& sub->update_strategy.type == SM_UPDATE_NONE)) {
> -		strbuf_addf(out, "Skipping submodule '%s'\n",
> +		strbuf_addf(out, _("Skipping submodule '%s'\n"),
>  			    displaypath);

Same issue here with the trailing \n.

If the strbuf_addf + strbuf_addch('\n') pattern is common enough, we
could introduce a helper (e.g. strbuf_addf_nl) to save typing.

Thanks and hope that helps,
Jonathan

  parent reply	other threads:[~2016-02-29 19:32 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-29 19:13 [PATCHv20 00/12] Expose submodule parallelism to the user Stefan Beller
2016-02-29 19:13 ` [PATCHv20 01/12] submodule-config: keep update strategy around Stefan Beller
2016-02-29 19:14 ` [PATCHv20 02/12] submodule-config: drop check against NULL Stefan Beller
2016-02-29 19:14 ` [PATCHv20 03/12] fetching submodules: respect `submodule.fetchJobs` config option Stefan Beller
2016-02-29 19:14 ` [PATCHv20 04/12] submodule update: direct error message to stderr Stefan Beller
2016-02-29 19:14 ` [PATCHv20 05/12] run_processes_parallel: treat output of children as byte array Stefan Beller
2016-02-29 19:14 ` [PATCHv20 06/12] run-command: expose default_{start_failure, task_finished} Stefan Beller
2016-02-29 19:14 ` [PATCHv20 07/12] run_processes_parallel: rename parameters for the callbacks Stefan Beller
2016-02-29 19:14 ` [PATCHv20 08/12] run_processes_parallel: correctly terminate callbacks with an LF Stefan Beller
2016-02-29 19:14 ` [PATCHv20 09/12] git submodule update: have a dedicated helper for cloning Stefan Beller
2016-02-29 19:14 ` [PATCHv20 10/12] submodule helper: remove double 'fatal: ' prefix Stefan Beller
2016-02-29 19:14 ` [PATCHv20 11/12] submodule update: expose parallelism to the user Stefan Beller
2016-02-29 19:14 ` [PATCHv20 12/12] clone: allow an explicit argument for parallel submodule clones Stefan Beller
2016-02-29 19:32 ` Jonathan Nieder [this message]
2016-02-29 20:40   ` [PATCHv20 00/12] Expose submodule parallelism to the user Stefan Beller
2016-02-29 20:50   ` Junio C Hamano

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=20160229193222.GX28749@google.com \
    --to=jrnieder@gmail.com \
    --cc=Jens.Lehmann@web.de \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=pclouds@gmail.com \
    --cc=peff@peff.net \
    --cc=sbeller@google.com \
    --cc=sunshine@sunshineco.com \
    /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.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.