summaryrefslogtreecommitdiff
path: root/builtin
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2017-03-30 21:07:17 (GMT)
committerJunio C Hamano <gitster@pobox.com>2017-03-30 21:07:17 (GMT)
commit3e8ff5e4f3fb0796b757730a9d64e848885d91c5 (patch)
tree53b827057ad680f85b1b436bd64195c3040e25de /builtin
parent42e1cc517b2a57fa2fad6cc41238bfdbc3f4b9d7 (diff)
parent7d5a38b61fad51b765117ae6dae9117db74dac3d (diff)
downloadgit-3e8ff5e4f3fb0796b757730a9d64e848885d91c5.zip
git-3e8ff5e4f3fb0796b757730a9d64e848885d91c5.tar.gz
git-3e8ff5e4f3fb0796b757730a9d64e848885d91c5.tar.bz2
Merge branch 'mg/describe-debug-l10n'
Some debugging output from "git describe" were marked for l10n, but some weren't. Mark missing ones for l10n. * mg/describe-debug-l10n: l10n: de: translate describe debug terms describe: localize debug output fully
Diffstat (limited to 'builtin')
-rw-r--r--builtin/describe.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/builtin/describe.c b/builtin/describe.c
index 45adbf6..a5cd8c5 100644
--- a/builtin/describe.c
+++ b/builtin/describe.c
@@ -50,7 +50,7 @@ struct commit_name {
};
static const char *prio_names[] = {
- "head", "lightweight", "annotated",
+ N_("head"), N_("lightweight"), N_("annotated"),
};
static int commit_name_cmp(const struct commit_name *cn1,
@@ -395,10 +395,19 @@ static void describe(const char *arg, int last_one)
free_commit_list(list);
if (debug) {
+ static int label_width = -1;
+ if (label_width < 0) {
+ int i, w;
+ for (i = 0; i < ARRAY_SIZE(prio_names); i++) {
+ w = strlen(_(prio_names[i]));
+ if (label_width < w)
+ label_width = w;
+ }
+ }
for (cur_match = 0; cur_match < match_cnt; cur_match++) {
struct possible_tag *t = &all_matches[cur_match];
- fprintf(stderr, " %-11s %8d %s\n",
- prio_names[t->name->prio],
+ fprintf(stderr, " %-*s %8d %s\n",
+ label_width, _(prio_names[t->name->prio]),
t->depth, t->name->path);
}
fprintf(stderr, _("traversed %lu commits\n"), seen_commits);