summaryrefslogtreecommitdiff
path: root/builtin
diff options
context:
space:
mode:
authorLibravatar Vasco Almeida <vascomalmeida@sapo.pt>2016-09-15 14:59:07 +0000
committerLibravatar Junio C Hamano <gitster@pobox.com>2016-09-15 13:17:32 -0700
commit205d13451d52722420cba32cebd5962e0d92793e (patch)
tree7cfa7f1853c262147ece3089463ff4833bd68227 /builtin
parenti18n: show-branch: mark error messages for translation (diff)
downloadtgif-205d13451d52722420cba32cebd5962e0d92793e.tar.xz
i18n: show-branch: mark plural strings for translation
Mark plural string for translation using Q_(). Although we already know that the plural sentence is always used in the English source, other languages have complex plural rules they must comply according to the value of MAX_REVS. Signed-off-by: Vasco Almeida <vascomalmeida@sapo.pt> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin')
-rw-r--r--builtin/show-branch.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/builtin/show-branch.c b/builtin/show-branch.c
index 58093711f6..623ca563a2 100644
--- a/builtin/show-branch.c
+++ b/builtin/show-branch.c
@@ -373,8 +373,9 @@ static int append_ref(const char *refname, const struct object_id *oid,
return 0;
}
if (MAX_REVS <= ref_name_cnt) {
- warning("ignoring %s; cannot handle more than %d refs",
- refname, MAX_REVS);
+ warning(Q_("ignoring %s; cannot handle more than %d ref",
+ "ignoring %s; cannot handle more than %d refs",
+ MAX_REVS), refname, MAX_REVS);
return 0;
}
ref_name[ref_name_cnt++] = xstrdup(refname);
@@ -731,8 +732,9 @@ int cmd_show_branch(int ac, const char **av, const char *prefix)
die(_("--reflog option needs one branch name"));
if (MAX_REVS < reflog)
- die("Only %d entries can be shown at one time.",
- MAX_REVS);
+ die(Q_("only %d entry can be shown at one time.",
+ "only %d entries can be shown at one time.",
+ MAX_REVS), MAX_REVS);
if (!dwim_ref(*av, strlen(*av), oid.hash, &ref))
die(_("no such ref %s"), *av);
@@ -826,7 +828,9 @@ 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(Q_("cannot handle more than %d rev.",
+ "cannot handle more than %d revs.",
+ MAX_REVS), MAX_REVS);
if (get_sha1(ref_name[num_rev], revkey.hash))
die(_("'%s' is not a valid ref."), ref_name[num_rev]);
commit = lookup_commit_reference(revkey.hash);