summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVasco Almeida <vascomalmeida@sapo.pt>2016-06-17 20:21:22 (GMT)
committerJunio C Hamano <gitster@pobox.com>2016-06-17 22:46:10 (GMT)
commita1b467a4eee547973709ee4e1473febd8d1b4c85 (patch)
treea9020652ff3f240048ec729c9ffeb29cfd2b7bea
parent7ba7b9abcc6f683f3b18315495d30811a6bc9e12 (diff)
downloadgit-a1b467a4eee547973709ee4e1473febd8d1b4c85.zip
git-a1b467a4eee547973709ee4e1473febd8d1b4c85.tar.gz
git-a1b467a4eee547973709ee4e1473febd8d1b4c85.tar.bz2
i18n: remote: allow translations to reorder message
Before this patch, translations couldn't place the branch name where it was better fit in the message "and with remote <branch_name>". Allow translations that, instead of forcing the branch name to display right of the message. Signed-off-by: Vasco Almeida <vascomalmeida@sapo.pt> Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rw-r--r--builtin/remote.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/builtin/remote.c b/builtin/remote.c
index 9f934cb..7f0f78b 100644
--- a/builtin/remote.c
+++ b/builtin/remote.c
@@ -952,7 +952,7 @@ static int show_local_info_item(struct string_list_item *item, void *cb_data)
struct show_info *show_info = cb_data;
struct branch_info *branch_info = item->util;
struct string_list *merge = &branch_info->merge;
- const char *also;
+ int width = show_info->width + 4;
int i;
if (branch_info->rebase && branch_info->merge.nr > 1) {
@@ -969,13 +969,12 @@ static int show_local_info_item(struct string_list_item *item, void *cb_data)
return 0;
} else if (show_info->any_rebase) {
printf_ln(_(" merges with remote %s"), merge->items[0].string);
- also = _(" and with remote");
+ width++;
} else {
printf_ln(_("merges with remote %s"), merge->items[0].string);
- also = _(" and with remote");
}
for (i = 1; i < merge->nr; i++)
- printf(" %-*s %s %s\n", show_info->width, "", also,
+ printf(_("%-*s and with remote %s\n"), width, "",
merge->items[i].string);
return 0;