git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Jonathan Nieder <jrnieder@gmail.com>
Date
Apr 16, 2013, 02:40 UTC
Message-ID
<20130416024021.GG3262@elie.Belkin>
In-Reply-To
<b841ddcc538f77c89859efe867fc638005dc13f9.1365861788.git.worldhello.net@gmail.com>
Jiang Xin wrote:
> --- a/branch.c
> +++ b/branch.c
[...]
Show 8 quoted lines
> @@ -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",
Previous: Jiang XinNext: Jiang Xin
Message 4 of 6 in “i18n: branch: mark strings for translation”
  1. i18n: branch: mark strings for translationJiang Xin, Apr 13, 2013
  2. Duy NguyenApr 13, 2013
  3. i18n: branch: mark strings for translationJiang Xin, Apr 13, 2013
  4. Jonathan NiederApr 16, 2013
  5. i18n: branch: mark strings for translationJiang Xin, Apr 16, 2013
  6. Junio C HamanoApr 16, 2013

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.