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>
Vasco Almeida committed
Jun 17, 2016 at 20:21 UTC
a1b467a4eee547973709ee4e1473febd8d1b4c85
1 file changed
+3
-4
builtin/remote.c
+3
-4
@@ -952,7 +952,7 @@ static int show_local_info_item(struct string_list_item *item, void *cb_data)
952
struct show_info *show_info = cb_data;
953
struct branch_info *branch_info = item->util;
954
struct string_list *merge = &branch_info->merge;
955
- const char *also;
955
+ int width = show_info->width + 4;
956
int i;
957
958
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)
969
return 0;
970
} else if (show_info->any_rebase) {
971
printf_ln(_(" merges with remote %s"), merge->items[0].string);
972
- also = _(" and with remote");
972
+ width++;
973
} else {
974
printf_ln(_("merges with remote %s"), merge->items[0].string);
975
- also = _(" and with remote");
975
}
976
for (i = 1; i < merge->nr; i++)
978
- printf(" %-*s %s %s\n", show_info->width, "", also,
977
+ printf(_("%-*s and with remote %s\n"), width, "",
978
merge->items[i].string);
979
980
return 0;