Skip to content

Commit 205d134

Browse files
vascoolgitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 8a78d46 commit 205d134

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

builtin/show-branch.c

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -373,8 +373,9 @@ static int append_ref(const char *refname, const struct object_id *oid,
373373
return 0;
374374
}
375375
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);
378379
return 0;
379380
}
380381
ref_name[ref_name_cnt++] = xstrdup(refname);
@@ -731,8 +732,9 @@ int cmd_show_branch(int ac, const char **av, const char *prefix)
731732
die(_("--reflog option needs one branch name"));
732733

733734
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);
736738
if (!dwim_ref(*av, strlen(*av), oid.hash, &ref))
737739
die(_("no such ref %s"), *av);
738740

@@ -826,7 +828,9 @@ int cmd_show_branch(int ac, const char **av, const char *prefix)
826828
unsigned int flag = 1u << (num_rev + REV_SHIFT);
827829

828830
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);
830834
if (get_sha1(ref_name[num_rev], revkey.hash))
831835
die(_("'%s' is not a valid ref."), ref_name[num_rev]);
832836
commit = lookup_commit_reference(revkey.hash);

0 commit comments

Comments
 (0)