Re: [PATCH v2] i18n: branch: mark strings for translation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>

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",
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]