Merge branch 'jx/i18n-more-marking' into maint
* jx/i18n-more-marking: i18n: format_tracking_info "Your branch is behind" message i18n: git-commit whence_s "merge/cherry-pick" messagemaint
commit
e6d88ca87c
|
@ -196,16 +196,16 @@ static void determine_whence(struct wt_status *s)
|
||||||
|
|
||||||
static const char *whence_s(void)
|
static const char *whence_s(void)
|
||||||
{
|
{
|
||||||
char *s = "";
|
const char *s = "";
|
||||||
|
|
||||||
switch (whence) {
|
switch (whence) {
|
||||||
case FROM_COMMIT:
|
case FROM_COMMIT:
|
||||||
break;
|
break;
|
||||||
case FROM_MERGE:
|
case FROM_MERGE:
|
||||||
s = "merge";
|
s = _("merge");
|
||||||
break;
|
break;
|
||||||
case FROM_CHERRY_PICK:
|
case FROM_CHERRY_PICK:
|
||||||
s = "cherry-pick";
|
s = _("cherry-pick");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
32
remote.c
32
remote.c
|
@ -1572,19 +1572,29 @@ int format_tracking_info(struct branch *branch, struct strbuf *sb)
|
||||||
base = branch->merge[0]->dst;
|
base = branch->merge[0]->dst;
|
||||||
base = shorten_unambiguous_ref(base, 0);
|
base = shorten_unambiguous_ref(base, 0);
|
||||||
if (!num_theirs)
|
if (!num_theirs)
|
||||||
strbuf_addf(sb, "Your branch is ahead of '%s' "
|
strbuf_addf(sb,
|
||||||
"by %d commit%s.\n",
|
Q_("Your branch is ahead of '%s' by %d commit.\n",
|
||||||
base, num_ours, (num_ours == 1) ? "" : "s");
|
"Your branch is ahead of '%s' by %d commits.\n",
|
||||||
|
num_ours),
|
||||||
|
base, num_ours);
|
||||||
else if (!num_ours)
|
else if (!num_ours)
|
||||||
strbuf_addf(sb, "Your branch is behind '%s' "
|
strbuf_addf(sb,
|
||||||
"by %d commit%s, "
|
Q_("Your branch is behind '%s' by %d commit, "
|
||||||
"and can be fast-forwarded.\n",
|
"and can be fast-forwarded.\n",
|
||||||
base, num_theirs, (num_theirs == 1) ? "" : "s");
|
"Your branch is behind '%s' by %d commits, "
|
||||||
|
"and can be fast-forwarded.\n",
|
||||||
|
num_theirs),
|
||||||
|
base, num_theirs);
|
||||||
else
|
else
|
||||||
strbuf_addf(sb, "Your branch and '%s' have diverged,\n"
|
strbuf_addf(sb,
|
||||||
"and have %d and %d different commit(s) each, "
|
Q_("Your branch and '%s' have diverged,\n"
|
||||||
"respectively.\n",
|
"and have %d and %d different commit each, "
|
||||||
base, num_ours, num_theirs);
|
"respectively.\n",
|
||||||
|
"Your branch and '%s' have diverged,\n"
|
||||||
|
"and have %d and %d different commits each, "
|
||||||
|
"respectively.\n",
|
||||||
|
num_theirs),
|
||||||
|
base, num_ours, num_theirs);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue