Git development
 help / color / mirror / Atom feed
From: Jonathan Nieder <jrnieder@gmail.com>
To: Jiang Xin <worldhello.net@gmail.com>
Cc: "Junio C Hamano" <gitster@pobox.com>,
	"Nguyễn Thái Ngọc Duy" <pclouds@gmail.co>,
	"Git List" <git@vger.kernel.org>
Subject: Re: [PATCH v2] i18n: branch: mark strings for translation
Date: Mon, 15 Apr 2013 19:40:21 -0700	[thread overview]
Message-ID: <20130416024021.GG3262@elie.Belkin> (raw)
In-Reply-To: <b841ddcc538f77c89859efe867fc638005dc13f9.1365861788.git.worldhello.net@gmail.com>

Jiang Xin wrote:

> --- a/branch.c
> +++ b/branch.c
[...]
> @@ -79,23 +79,23 @@ void install_branch_config(int flag, const char *local, const char *origin, cons
>  	if (flag & BRANCH_CONFIG_VERBOSE) {
>  		if (remote_is_branch && origin)
>  			printf(rebasing ?
> -			       "Branch %s set up to track remote branch %s from %s by rebasing.\n" :
> -			       "Branch %s set up to track remote branch %s from %s.\n",
> +			       _("Branch %s set up to track remote branch %s from %s by rebasing.\n") :
> +			       _("Branch %s set up to track remote branch %s from %s.\n"),

Micronit: it would be nicer to use printf_ln to save translators the
trouble of worrying about the final newline.

With that change,
Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>

Thanks.  Here's a patch making that change for squashing in.

diff --git i/branch.c w/branch.c
index 4ddd69f3..c67b97d1 100644
--- i/branch.c
+++ w/branch.c
@@ -78,24 +78,24 @@ void install_branch_config(int flag, const char *local, const char *origin, cons
 
 	if (flag & BRANCH_CONFIG_VERBOSE) {
 		if (remote_is_branch && origin)
-			printf(rebasing ?
-			       _("Branch %s set up to track remote branch %s from %s by rebasing.\n") :
-			       _("Branch %s set up to track remote branch %s from %s.\n"),
+			printf_ln(rebasing ?
+			       _("Branch %s set up to track remote branch %s from %s by rebasing.") :
+			       _("Branch %s set up to track remote branch %s from %s."),
 			       local, shortname, origin);
 		else if (remote_is_branch && !origin)
-			printf(rebasing ?
-			       _("Branch %s set up to track local branch %s by rebasing.\n") :
-			       _("Branch %s set up to track local branch %s.\n"),
+			printf_ln(rebasing ?
+			       _("Branch %s set up to track local branch %s by rebasing.") :
+			       _("Branch %s set up to track local branch %s."),
 			       local, shortname);
 		else if (!remote_is_branch && origin)
-			printf(rebasing ?
-			       _("Branch %s set up to track remote ref %s by rebasing.\n") :
-			       _("Branch %s set up to track remote ref %s.\n"),
+			printf_ln(rebasing ?
+			       _("Branch %s set up to track remote ref %s by rebasing.") :
+			       _("Branch %s set up to track remote ref %s."),
 			       local, remote);
 		else if (!remote_is_branch && !origin)
-			printf(rebasing ?
-			       _("Branch %s set up to track local ref %s by rebasing.\n") :
-			       _("Branch %s set up to track local ref %s.\n"),
+			printf_ln(rebasing ?
+			       _("Branch %s set up to track local ref %s by rebasing.") :
+			       _("Branch %s set up to track local ref %s."),
 			       local, remote);
 		else
 			die("BUG: impossible combination of %d and %p",

  reply	other threads:[~2013-04-16  2:40 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-13  2:22 [PATCH] i18n: branch: mark strings for translation Jiang Xin
2013-04-13  4:29 ` Duy Nguyen
2013-04-13 14:08   ` [PATCH v2] " Jiang Xin
2013-04-16  2:40     ` Jonathan Nieder [this message]
2013-04-16  3:37       ` [PATCH v3] " Jiang Xin
2013-04-16  4:18         ` 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=20130416024021.GG3262@elie.Belkin \
    --to=jrnieder@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=pclouds@gmail.co \
    --cc=worldhello.net@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox