Skip to content

Commit 2aa9425

Browse files
avargitster
authored andcommitted
mktag: mark strings for translation
Mark the errors mktag might emit for translation. This is a plumbing command, but the errors it emits are intended to be human-readable. Signed-off-by: Ævar Arnfjörð Bjarmason <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 3f390a3 commit 2aa9425

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

builtin/mktag.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,10 @@ static int mktag_fsck_error_func(struct fsck_options *o,
3131
* like missing "tagger" lines are "only" warnings
3232
* under fsck, we've always considered them an error.
3333
*/
34-
fprintf_ln(stderr, "error: tag input does not pass fsck: %s", message);
34+
fprintf_ln(stderr, _("error: tag input does not pass fsck: %s"), message);
3535
return 1;
3636
default:
37-
BUG("%d (FSCK_IGNORE?) should never trigger this callback",
37+
BUG(_("%d (FSCK_IGNORE?) should never trigger this callback"),
3838
msg_type);
3939
}
4040
}
@@ -49,10 +49,10 @@ static int verify_object_in_tag(struct object_id *tagged_oid, int *tagged_type)
4949

5050
buffer = read_object_file(tagged_oid, &type, &size);
5151
if (!buffer)
52-
die("could not read tagged object '%s'",
52+
die(_("could not read tagged object '%s'"),
5353
oid_to_hex(tagged_oid));
5454
if (type != *tagged_type)
55-
die("object '%s' tagged as '%s', but is a '%s' type",
55+
die(_("object '%s' tagged as '%s', but is a '%s' type"),
5656
oid_to_hex(tagged_oid),
5757
type_name(*tagged_type), type_name(type));
5858

@@ -79,21 +79,21 @@ int cmd_mktag(int argc, const char **argv, const char *prefix)
7979
builtin_mktag_usage, 0);
8080

8181
if (strbuf_read(&buf, 0, 0) < 0)
82-
die_errno("could not read from stdin");
82+
die_errno(_("could not read from stdin"));
8383

8484
fsck_options.error_func = mktag_fsck_error_func;
8585
fsck_set_msg_type(&fsck_options, "extraheaderentry", "warn");
8686
/* config might set fsck.extraHeaderEntry=* again */
8787
git_config(mktag_config, NULL);
8888
if (fsck_tag_standalone(NULL, buf.buf, buf.len, &fsck_options,
8989
&tagged_oid, &tagged_type))
90-
die("tag on stdin did not pass our strict fsck check");
90+
die(_("tag on stdin did not pass our strict fsck check"));
9191

9292
if (verify_object_in_tag(&tagged_oid, &tagged_type))
93-
die("tag on stdin did not refer to a valid object");
93+
die(_("tag on stdin did not refer to a valid object"));
9494

9595
if (write_object_file(buf.buf, buf.len, tag_type, &result) < 0)
96-
die("unable to write tag file");
96+
die(_("unable to write tag file"));
9797

9898
strbuf_release(&buf);
9999
puts(oid_to_hex(&result));

0 commit comments

Comments
 (0)