Skip to content

Commit 3813a89

Browse files
committed
Merge branch 'nd/i18n'
More _("i18n") markings. * nd/i18n: fsck: mark strings for translation fsck: reduce word legos to help i18n parse-options.c: mark more strings for translation parse-options.c: turn some die() to BUG() parse-options: replace opterror() with optname() repack: mark more strings for translation remote.c: mark messages for translation remote.c: turn some error() or die() to BUG() reflog: mark strings for translation read-cache.c: add missing colon separators read-cache.c: mark more strings for translation read-cache.c: turn die("internal error") to BUG() attr.c: mark more string for translation archive.c: mark more strings for translation alias.c: mark split_cmdline_strerror() strings for translation git.c: mark more strings for translation
2 parents b21ebb6 + 674ba34 commit 3813a89

23 files changed

+303
-266
lines changed

alias.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@ void list_aliases(struct string_list *list)
4747
#define SPLIT_CMDLINE_BAD_ENDING 1
4848
#define SPLIT_CMDLINE_UNCLOSED_QUOTE 2
4949
static const char *split_cmdline_errors[] = {
50-
"cmdline ends with \\",
51-
"unclosed quote"
50+
N_("cmdline ends with \\"),
51+
N_("unclosed quote")
5252
};
5353

5454
int split_cmdline(char *cmdline, const char ***argv)

archive.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -391,12 +391,12 @@ static void parse_treeish_arg(const char **argv,
391391
int refnamelen = colon - name;
392392

393393
if (!dwim_ref(name, refnamelen, &oid, &ref))
394-
die("no such ref: %.*s", refnamelen, name);
394+
die(_("no such ref: %.*s"), refnamelen, name);
395395
free(ref);
396396
}
397397

398398
if (get_oid(name, &oid))
399-
die("Not a valid object name");
399+
die(_("not a valid object name: %s"), name);
400400

401401
commit = lookup_commit_reference_gently(ar_args->repo, &oid, 1);
402402
if (commit) {
@@ -409,7 +409,7 @@ static void parse_treeish_arg(const char **argv,
409409

410410
tree = parse_tree_indirect(&oid);
411411
if (tree == NULL)
412-
die("not a tree object");
412+
die(_("not a tree object: %s"), oid_to_hex(&oid));
413413

414414
if (prefix) {
415415
struct object_id tree_oid;
@@ -419,7 +419,7 @@ static void parse_treeish_arg(const char **argv,
419419
err = get_tree_entry(&tree->object.oid, prefix, &tree_oid,
420420
&mode);
421421
if (err || !S_ISDIR(mode))
422-
die("current working directory is untracked");
422+
die(_("current working directory is untracked"));
423423

424424
tree = parse_tree_indirect(&tree_oid);
425425
}

attr.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -366,8 +366,8 @@ static struct match_attr *parse_attr_line(const char *line, const char *src,
366366
if (strlen(ATTRIBUTE_MACRO_PREFIX) < namelen &&
367367
starts_with(name, ATTRIBUTE_MACRO_PREFIX)) {
368368
if (!macro_ok) {
369-
fprintf(stderr, "%s not allowed: %s:%d\n",
370-
name, src, lineno);
369+
fprintf_ln(stderr, _("%s not allowed: %s:%d"),
370+
name, src, lineno);
371371
goto fail_return;
372372
}
373373
is_macro = 1;

0 commit comments

Comments
 (0)