diff options
author | Ævar Arnfjörð Bjarmason <avarab@gmail.com> | 2011-04-10 23:34:08 +0400 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2011-04-12 11:20:28 +0400 |
commit | f06f08b78c1c8be7039bd94c5f1fb305812fda34 (patch) | |
tree | 10c9951d72886e3e6c425b53045b8a8aadcdcd95 /builtin | |
parent | 20fc73e3b0bb2b115d88e54514db13ffaf11b025 (diff) |
i18n: mark checkout plural warning for translation
Mark the "Warning: you are leaving %d commit(s) behind" message added
in v1.7.5-rc0~74^2 (commit: give final warning when reattaching HEAD
to leave commits behind) by Junio C Hamano for translation.
This message requires the use of ngettext() features, and is the first
message to use the Q_() wrapper around ngettext().
Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin')
-rw-r--r-- | builtin/checkout.c | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/builtin/checkout.c b/builtin/checkout.c index 0b65edde26..38632fc398 100644 --- a/builtin/checkout.c +++ b/builtin/checkout.c @@ -648,18 +648,30 @@ static void suggest_reattach(struct commit *commit, struct rev_info *revs) if (more == 1) describe_one_orphan(&sb, last); else - strbuf_addf(&sb, " ... and %d more.\n", more); + strbuf_addf(&sb, _(" ... and %d more.\n"), more); } fprintf(stderr, - "Warning: you are leaving %d commit%s behind, " + Q_( + /* The singular version */ + "Warning: you are leaving %d commit behind, " + "not connected to\n" + "any of your branches:\n\n" + "%s\n" + "If you want to keep it by creating a new branch, " + "this may be a good time\nto do so with:\n\n" + " git branch new_branch_name %s\n\n", + /* The plural version */ + "Warning: you are leaving %d commits behind, " "not connected to\n" "any of your branches:\n\n" "%s\n" "If you want to keep them by creating a new branch, " "this may be a good time\nto do so with:\n\n" " git branch new_branch_name %s\n\n", - lost, ((1 < lost) ? "s" : ""), + /* Give ngettext() the count */ + lost), + lost, sb.buf, sha1_to_hex(commit->object.sha1)); strbuf_release(&sb); |