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

[PATCH 2/2] i18n: branch: move comment for translators

From
Vasco Almeida <vascomalmeida@sapo.pt>
Date
Apr 13, 2016, 10:29 UTC
Message-ID
<1460543394-11050-2-git-send-email-vascomalmeida@sapo.pt>
In-Reply-To
<1460543394-11050-1-git-send-email-vascomalmeida@sapo.pt>

Move and split comment for translators (marked by TRANSLATORS) to be immediately above the strings marked for translation.

As a result, the comment can now be extracted by xgettext.
Signed-off-by: Vasco Almeida <vascomalmeida@sapo.pt>
---
 builtin/branch.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/builtin/branch.c b/builtin/branch.c
index b327cca..8a0a181 100644
--- a/builtin/branch.c
+++ b/builtin/branch.c
@@ -369,12 +369,14 @@ static char *get_head_description(void)
 		strbuf_addf(&desc, _("(no branch, bisect started on %s)"),
 			    state.branch);
 	else if (state.detached_from) {
-		/* TRANSLATORS: make sure these match _("HEAD detached at ")
-		   and _("HEAD detached from ") in wt-status.c */
 		if (state.detached_at)
+			/* TRANSLATORS: make sure this matches
+			   "HEAD detached at " in wt-status.c */
 			strbuf_addf(&desc, _("(HEAD detached at %s)"),
 				state.detached_from);
 		else
+			/* TRANSLATORS: make sure this matches
+			   "HEAD detached from " in wt-status.c */
 			strbuf_addf(&desc, _("(HEAD detached from %s)"),
 				state.detached_from);
 	}
-- 
2.1.4
Previous: Vasco AlmeidaNext: Junio C Hamano
Message 2 of 3 in “i18n: branch: unmark string for translation”
  1. 1/2 i18n: branch: unmark string for translationVasco Almeida, Apr 13, 2016
  2. 2/2 i18n: branch: move comment for translatorsVasco Almeida, Apr 13, 2016
  3. Junio C HamanoApr 14, 2016

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.