Skip to content

Commit 3e8ff5e

Browse files
committed
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
2 parents 42e1cc5 + 7d5a38b commit 3e8ff5e

File tree

2 files changed

+25
-4
lines changed

2 files changed

+25
-4
lines changed

builtin/describe.c

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ struct commit_name {
5050
};
5151

5252
static const char *prio_names[] = {
53-
"head", "lightweight", "annotated",
53+
N_("head"), N_("lightweight"), N_("annotated"),
5454
};
5555

5656
static int commit_name_cmp(const struct commit_name *cn1,
@@ -395,10 +395,19 @@ static void describe(const char *arg, int last_one)
395395
free_commit_list(list);
396396

397397
if (debug) {
398+
static int label_width = -1;
399+
if (label_width < 0) {
400+
int i, w;
401+
for (i = 0; i < ARRAY_SIZE(prio_names); i++) {
402+
w = strlen(_(prio_names[i]));
403+
if (label_width < w)
404+
label_width = w;
405+
}
406+
}
398407
for (cur_match = 0; cur_match < match_cnt; cur_match++) {
399408
struct possible_tag *t = &all_matches[cur_match];
400-
fprintf(stderr, " %-11s %8d %s\n",
401-
prio_names[t->name->prio],
409+
fprintf(stderr, " %-*s %8d %s\n",
410+
label_width, _(prio_names[t->name->prio]),
402411
t->depth, t->name->path);
403412
}
404413
fprintf(stderr, _("traversed %lu commits\n"), seen_commits);

po/de.po

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7530,7 +7530,19 @@ msgstr "git describe [<Optionen>] [<Commit-Angabe>...]"
75307530
msgid "git describe [<options>] --dirty"
75317531
msgstr "git describe [<Optionen>] --dirty"
75327532

7533-
#: builtin/describe.c:217
7533+
#: builtin/describe.c:52
7534+
msgid "head"
7535+
msgstr "Branch"
7536+
7537+
#: builtin/describe.c:52
7538+
msgid "lightweight"
7539+
msgstr "nicht-annotiert"
7540+
7541+
#: builtin/describe.c:52
7542+
msgid "annotated"
7543+
msgstr "annotiert"
7544+
7545+
#: builtin/describe.c:249
75347546
#, c-format
75357547
msgid "annotated tag %s not available"
75367548
msgstr "annotiertes Tag %s ist nicht verfügbar"

0 commit comments

Comments
 (0)