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>
Vasco Almeida committed
Sep 15, 2016 at 14:59 UTC
205d13451d52722420cba32cebd5962e0d92793e
1 file changed
+9
-5
builtin/show-branch.c
+9
-5
@@ -373,8 +373,9 @@ static int append_ref(const char *refname, const struct object_id *oid,
373
return 0;
374
}
375
if (MAX_REVS <= ref_name_cnt) {
376
- warning("ignoring %s; cannot handle more than %d refs",
377
- refname, MAX_REVS);
376
+ warning(Q_("ignoring %s; cannot handle more than %d ref",
377
+ "ignoring %s; cannot handle more than %d refs",
378
+ MAX_REVS), refname, MAX_REVS);
379
return 0;
380
}
381
ref_name[ref_name_cnt++] = xstrdup(refname);
@@ -731,8 +732,9 @@ int cmd_show_branch(int ac, const char **av, const char *prefix)
732
die(_("--reflog option needs one branch name"));
733
734
if (MAX_REVS < reflog)
734
- die("Only %d entries can be shown at one time.",
735
- MAX_REVS);
735
+ die(Q_("only %d entry can be shown at one time.",
736
+ "only %d entries can be shown at one time.",
737
+ MAX_REVS), MAX_REVS);
738
if (!dwim_ref(*av, strlen(*av), oid.hash, &ref))
739
die(_("no such ref %s"), *av);
740
@@ -826,7 +828,9 @@ int cmd_show_branch(int ac, const char **av, const char *prefix)
828
unsigned int flag = 1u << (num_rev + REV_SHIFT);
829
830
if (MAX_REVS <= num_rev)
829
- die("cannot handle more than %d revs.", MAX_REVS);
831
+ die(Q_("cannot handle more than %d rev.",
832
+ "cannot handle more than %d revs.",
833
+ MAX_REVS), MAX_REVS);
834
if (get_sha1(ref_name[num_rev], revkey.hash))
835
die(_("'%s' is not a valid ref."), ref_name[num_rev]);
836
commit = lookup_commit_reference(revkey.hash);