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

[PATCH 12/13] i18n: show-branch: mark error messages for translation

From
Vasco Almeida <vascomalmeida@sapo.pt>
Date
Sep 7, 2016, 14:49 UTC
Message-ID
<1473259758-11836-12-git-send-email-vascomalmeida@sapo.pt>
In-Reply-To
<1473259758-11836-1-git-send-email-vascomalmeida@sapo.pt>
Lowercase some messages first word to match style of the others.
Signed-off-by: Vasco Almeida <vascomalmeida@sapo.pt>
---
 builtin/show-branch.c | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/builtin/show-branch.c b/builtin/show-branch.c
index 2566935..8a5097d 100644
--- a/builtin/show-branch.c
+++ b/builtin/show-branch.c
@@ -701,8 +701,8 @@ int cmd_show_branch(int ac, const char **av, const char *prefix)
 			 *
 			 * Also --all and --remotes do not make sense either.
 			 */
-			die("--reflog is incompatible with --all, --remotes, "
-			    "--independent or --merge-base");
+			die(_("--reflog is incompatible with --all, --remotes, "
+			      "--independent or --merge-base"));
 	}
 
 	/* If nothing is specified, show all branches by default */
@@ -725,16 +725,16 @@ int cmd_show_branch(int ac, const char **av, const char *prefix)
 			av = fake_av;
 			ac = 1;
 			if (!*av)
-				die("no branches given, and HEAD is not valid");
+				die(_("no branches given, and HEAD is not valid"));
 		}
 		if (ac != 1)
-			die("--reflog option needs one branch name");
+			die(_("--reflog option needs one branch name"));
 
 		if (MAX_REVS < reflog)
-			die("Only %d entries can be shown at one time.",
+			die(_("only %d entries can be shown at one time."),
 			    MAX_REVS);
 		if (!dwim_ref(*av, strlen(*av), oid.hash, &ref))
-			die("No such ref %s", *av);
+			die(_("no such ref %s"), *av);
 
 		/* Has the base been specified? */
 		if (reflog_base) {
@@ -826,12 +826,12 @@ int cmd_show_branch(int ac, const char **av, const char *prefix)
 		unsigned int flag = 1u << (num_rev + REV_SHIFT);
 
 		if (MAX_REVS <= num_rev)
-			die("cannot handle more than %d revs.", MAX_REVS);
+			die(_("cannot handle more than %d revs."), MAX_REVS);
 		if (get_sha1(ref_name[num_rev], revkey.hash))
-			die("'%s' is not a valid ref.", ref_name[num_rev]);
+			die(_("'%s' is not a valid ref."), ref_name[num_rev]);
 		commit = lookup_commit_reference(revkey.hash);
 		if (!commit)
-			die("cannot find commit %s (%s)",
+			die(_("cannot find commit %s (%s)"),
 			    ref_name[num_rev], oid_to_hex(&revkey));
 		parse_commit(commit);
 		mark_seen(commit, &seen);
-- 
2.7.4
Previous: Vasco AlmeidaNext: Vasco Almeida
Message 10 of 34 in “i18n: apply: mark plural string for translation”
  1. 01/13 i18n: apply: mark plural string for translationVasco Almeida, Sep 7, 2016
  2. 03/13 i18n: apply: mark info messages for translationVasco Almeida, Sep 7, 2016
  3. 02/13 i18n: apply: mark error messages for translationVasco Almeida, Sep 7, 2016
  4. 04/13 i18n: blame: mark error messages for translationVasco Almeida, Sep 7, 2016
  5. Jean-Noël AVILASep 10, 2016
  6. Junio C HamanoSep 12, 2016
  7. 05/13 i18n: branch: mark option description for translationVasco Almeida, Sep 7, 2016
  8. 11/13 i18n: receive-pack: mark messages for translationVasco Almeida, Sep 7, 2016
  9. 13/13 i18n: update-index: mark warning for translationVasco Almeida, Sep 7, 2016
  10. 12/13 i18n: show-branch: mark error messages for translationVasco Almeida, Sep 7, 2016
  11. 09/13 i18n: notes: mark error messages for translationVasco Almeida, Sep 7, 2016
  12. 13/13 i18n: update-index: mark warnings for translationVasco Almeida, Sep 7, 2016
  13. 10/13 notes: lowercase first word of error messagesVasco Almeida, Sep 7, 2016
  14. 08/13 i18n: merge-recursive: mark verbose message for translationVasco Almeida, Sep 7, 2016
  15. 06/13 i18n: config: mark error message for translationVasco Almeida, Sep 7, 2016
  16. 07/13 i18n: merge-recursive: mark error messages for translationVasco Almeida, Sep 7, 2016
  17. Junio C HamanoSep 9, 2016
  18. Junio C HamanoSep 8, 2016
  19. 01/14 i18n: apply: mark plural string for translationVasco Almeida, Sep 15, 2016
  20. 02/14 i18n: apply: mark error messages for translationVasco Almeida, Sep 15, 2016
  21. 03/14 i18n: apply: mark info messages for translationVasco Almeida, Sep 15, 2016
  22. 04/14 i18n: blame: mark error messages for translationVasco Almeida, Sep 15, 2016
  23. Junio C HamanoSep 15, 2016
  24. 05/14 i18n: branch: mark option description for translationVasco Almeida, Sep 15, 2016
  25. 06/14 i18n: config: mark error message for translationVasco Almeida, Sep 15, 2016
  26. 07/14 i18n: merge-recursive: mark error messages for translationVasco Almeida, Sep 15, 2016
  27. 08/14 i18n: merge-recursive: mark verbose message for translationVasco Almeida, Sep 15, 2016
  28. 09/14 i18n: notes: mark error messages for translationVasco Almeida, Sep 15, 2016
  29. 11/14 i18n: receive-pack: mark messages for translationVasco Almeida, Sep 15, 2016
  30. 10/14 notes: lowercase first word of error messagesVasco Almeida, Sep 15, 2016
  31. 12/14 i18n: show-branch: mark error messages for translationVasco Almeida, Sep 15, 2016
  32. 14/14 i18n: update-index: mark warnings for translationVasco Almeida, Sep 15, 2016
  33. 13/14 i18n: show-branch: mark plural strings for translationVasco Almeida, Sep 15, 2016
  34. Junio C HamanoSep 15, 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.