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

[PATCH v2 3/3] branch: mark more strings for translation

From
Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Date
Jan 25, 2013, 12:50 UTC
Message-ID
<1359118225-14356-3-git-send-email-pclouds@gmail.com>
In-Reply-To
<1359118225-14356-1-git-send-email-pclouds@gmail.com>
---
 builtin/branch.c | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/builtin/branch.c b/builtin/branch.c
index ca61c5b..597b578 100644
--- a/builtin/branch.c
+++ b/builtin/branch.c
@@ -466,7 +466,7 @@ static void add_verbose_info(struct strbuf *out, struct ref_item *item,
 			     int verbose, int abbrev)
 {
 	struct strbuf subject = STRBUF_INIT, stat = STRBUF_INIT;
-	const char *sub = " **** invalid ref ****";
+	const char *sub = _(" **** invalid ref ****");
 	struct commit *commit = item->commit;
 
 	if (commit && !parse_commit(commit)) {
@@ -590,7 +590,7 @@ static int print_ref_list(int kinds, int detached, int verbose, int abbrev, stru
 		struct commit *filter;
 		filter = lookup_commit_reference_gently(merge_filter_ref, 0);
 		if (!filter)
-			die("object '%s' does not point to a commit",
+			die(_("object '%s' does not point to a commit"),
 			    sha1_to_hex(merge_filter_ref));
 
 		filter->object.flags |= UNINTERESTING;
@@ -854,7 +854,7 @@ int cmd_branch(int argc, const char **argv, const char *prefix)
 
 		if (!argc) {
 			if (detached)
-				die("Cannot give description to detached HEAD");
+				die(_("Cannot give description to detached HEAD"));
 			branch_name = head;
 		} else if (argc == 1)
 			branch_name = argv[0];
@@ -866,10 +866,11 @@ int cmd_branch(int argc, const char **argv, const char *prefix)
 			strbuf_release(&branch_ref);
 
 			if (!argc)
-				return error("No commit on branch '%s' yet.",
+				return error(_("No commit on branch '%s' yet."),
 					     branch_name);
 			else
-				return error("No such branch '%s'.", branch_name);
+				return error(_("No branch named '%s'."),
+					     branch_name);
 		}
 		strbuf_release(&branch_ref);
 
-- 
1.8.0.rc2.23.g1fb49df
Previous: Jonathan NiederNext: Jonathan Nieder
Message 7 of 14 in “branch: reject -D/-d without branch name”
  1. branch: reject -D/-d without branch nameNguyễn Thái Ngọc Duy, Jan 25, 2013
  2. Matthieu MoyJan 25, 2013
  3. Duy NguyenJan 25, 2013
  4. 1/3 branch: reject -D/-d without branch nameNguyễn Thái Ngọc Duy, Jan 25, 2013
  5. 2/3 branch: give a more helpful message on redundant argumentsNguyễn Thái Ngọc Duy, Jan 25, 2013
  6. Jonathan NiederJan 27, 2013
  7. 3/3 branch: mark more strings for translationNguyễn Thái Ngọc Duy, Jan 25, 2013
  8. Jonathan NiederJan 27, 2013
  9. Junio C HamanoJan 25, 2013
  10. Duy NguyenJan 26, 2013
  11. 1/4 branch: no detached HEAD check when editing another branch's descriptionNguyễn Thái Ngọc Duy, Jan 28, 2013
  12. 2/4 branch: reject -D/-d without branch nameNguyễn Thái Ngọc Duy, Jan 28, 2013
  13. 3/4 branch: give a more helpful message on redundant argumentsNguyễn Thái Ngọc Duy, Jan 28, 2013
  14. 4/4 branch: mark more strings for translationNguyễn Thái Ngọc Duy, Jan 28, 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.