git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* [PATCH] sequencer: mark messages for translation
@ 2020-03-28 13:05 Alban Gruin
  2020-03-30 23:59 ` Taylor Blau
  0 siblings, 1 reply; 2+ messages in thread
From: Alban Gruin @ 2020-03-28 13:05 UTC (permalink / raw)
  To: git; +Cc: Junio C Hamano, Alban Gruin

Signed-off-by: Alban Gruin <alban.gruin@gmail.com>
---
 sequencer.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/sequencer.c b/sequencer.c
index 6fd2674632..ba13a9a63b 100644
--- a/sequencer.c
+++ b/sequencer.c
@@ -3128,7 +3128,7 @@ static int do_exec(struct repository *r, const char *command_line)
 	const char *child_argv[] = { NULL, NULL };
 	int dirty, status;
 
-	fprintf(stderr, "Executing: %s\n", command_line);
+	fprintf(stderr, _("Executing: %s\n"), command_line);
 	child_argv[0] = command_line;
 	argv_array_pushf(&child_env, "GIT_DIR=%s", absolute_path(get_git_dir()));
 	argv_array_pushf(&child_env, "GIT_WORK_TREE=%s",
@@ -3841,7 +3841,7 @@ static int pick_commits(struct repository *r,
 					fclose(f);
 				}
 				if (!opts->quiet)
-					fprintf(stderr, "Rebasing (%d/%d)%s",
+					fprintf(stderr, _("Rebasing (%d/%d)%s"),
 						todo_list->done_nr,
 						todo_list->total_nr,
 						opts->verbose ? "\n" : "\r");
@@ -4093,7 +4093,7 @@ static int pick_commits(struct repository *r,
 			if (!opts->verbose)
 				term_clear_line();
 			fprintf(stderr,
-				"Successfully rebased and updated %s.\n",
+				_("Successfully rebased and updated %s.\n"),
 				head_ref.buf);
 		}
 
-- 
2.25.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] sequencer: mark messages for translation
  2020-03-28 13:05 [PATCH] sequencer: mark messages for translation Alban Gruin
@ 2020-03-30 23:59 ` Taylor Blau
  0 siblings, 0 replies; 2+ messages in thread
From: Taylor Blau @ 2020-03-30 23:59 UTC (permalink / raw)
  To: Alban Gruin; +Cc: git, Junio C Hamano

Hi Alban,

This looks good to me. I scratched my head for a little while wondering
about why these weren't marked for translation originally. They were
added back during the initial conversion to C. Some of the strings had
English-ism's such as "1st", "2nd", and so on, but weren't.

Johannes notes in [1] that marking those strings for translation was a
topic to be left until after v2.10.1, but I think he is busy enough that
this was easy to drop in the shuffle :-).

So, I am glad that you're addressing this. If you wanted, it may be
worthwhile to distill some of this into the patch message. But the
changes themselves look good to me.

On Sat, Mar 28, 2020 at 02:05:15PM +0100, Alban Gruin wrote:
> Signed-off-by: Alban Gruin <alban.gruin@gmail.com>
> ---
>  sequencer.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/sequencer.c b/sequencer.c
> index 6fd2674632..ba13a9a63b 100644
> --- a/sequencer.c
> +++ b/sequencer.c
> @@ -3128,7 +3128,7 @@ static int do_exec(struct repository *r, const char *command_line)
>  	const char *child_argv[] = { NULL, NULL };
>  	int dirty, status;
>
> -	fprintf(stderr, "Executing: %s\n", command_line);
> +	fprintf(stderr, _("Executing: %s\n"), command_line);
>  	child_argv[0] = command_line;
>  	argv_array_pushf(&child_env, "GIT_DIR=%s", absolute_path(get_git_dir()));
>  	argv_array_pushf(&child_env, "GIT_WORK_TREE=%s",
> @@ -3841,7 +3841,7 @@ static int pick_commits(struct repository *r,
>  					fclose(f);
>  				}
>  				if (!opts->quiet)
> -					fprintf(stderr, "Rebasing (%d/%d)%s",
> +					fprintf(stderr, _("Rebasing (%d/%d)%s"),
>  						todo_list->done_nr,
>  						todo_list->total_nr,
>  						opts->verbose ? "\n" : "\r");
> @@ -4093,7 +4093,7 @@ static int pick_commits(struct repository *r,
>  			if (!opts->verbose)
>  				term_clear_line();
>  			fprintf(stderr,
> -				"Successfully rebased and updated %s.\n",
> +				_("Successfully rebased and updated %s.\n"),

>  				head_ref.buf);
>  		}
>
> --
> 2.25.0

Either way, if you decide to add more context to the commit message I'd
be glad, but this is probably just fine as-is, so please have my:

  Reviewed-by: Taylor Blau <me@ttaylorr.com>

Thanks,
Taylor

[1]: https://lore.kernel.org/git/alpine.DEB.2.20.1609011658300.129229@virtualbox/

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-03-30 23:59 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-28 13:05 [PATCH] sequencer: mark messages for translation Alban Gruin
2020-03-30 23:59 ` Taylor Blau

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).