i18n: format_tracking_info "Your branch is behind" message

Function format_tracking_info in remote.c is called by wt_status_print_tracking in wt-status.c, which will print branch tracking message in git-status. git-checkout also show these messages through it's report_tracking function. Signed-off-by: Jiang Xin <worldhello.net@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Jiang Xin committed Feb 2, 2012 at 10:02 UTC 8a5b749428d39a0e85fb0f76306b88945cb5c6e0
1 file changed +21 -11
remote.c
+21 -11
@@ -1572,19 +1572,29 @@ int format_tracking_info(struct branch *branch, struct strbuf *sb)
1572 base = branch->merge[0]->dst;
1573 base = shorten_unambiguous_ref(base, 0);
1574 if (!num_theirs)
1575 - strbuf_addf(sb, "Your branch is ahead of '%s' "
1576 - "by %d commit%s.\n",
1577 - base, num_ours, (num_ours == 1) ? "" : "s");
1575 + strbuf_addf(sb,
1576 + Q_("Your branch is ahead of '%s' by %d commit.\n",
1577 + "Your branch is ahead of '%s' by %d commits.\n",
1578 + num_ours),
1579 + base, num_ours);
1580 else if (!num_ours)
1579 - strbuf_addf(sb, "Your branch is behind '%s' "
1580 - "by %d commit%s, "
1581 - "and can be fast-forwarded.\n",
1582 - base, num_theirs, (num_theirs == 1) ? "" : "s");
1581 + strbuf_addf(sb,
1582 + Q_("Your branch is behind '%s' by %d commit, "
1583 + "and can be fast-forwarded.\n",
1584 + "Your branch is behind '%s' by %d commits, "
1585 + "and can be fast-forwarded.\n",
1586 + num_theirs),
1587 + base, num_theirs);
1588 else
1584 - strbuf_addf(sb, "Your branch and '%s' have diverged,\n"
1585 - "and have %d and %d different commit(s) each, "
1586 - "respectively.\n",
1587 - base, num_ours, num_theirs);
1589 + strbuf_addf(sb,
1590 + Q_("Your branch and '%s' have diverged,\n"
1591 + "and have %d and %d different commit each, "
1592 + "respectively.\n",
1593 + "Your branch and '%s' have diverged,\n"
1594 + "and have %d and %d different commits each, "
1595 + "respectively.\n",
1596 + num_theirs),
1597 + base, num_ours, num_theirs);
1598 return 1;
1599 }
1600