i18n: git-log basic messages
Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
e4fe4ba57a
commit
5c5f1d7ce1
@ -101,7 +101,7 @@ static void cmd_log_init(int argc, const char **argv, const char *prefix,
|
|||||||
const char *v = skip_prefix(arg, "--decorate=");
|
const char *v = skip_prefix(arg, "--decorate=");
|
||||||
decoration_style = parse_decoration_style(arg, v);
|
decoration_style = parse_decoration_style(arg, v);
|
||||||
if (decoration_style < 0)
|
if (decoration_style < 0)
|
||||||
die("invalid --decorate option: %s", arg);
|
die(_("invalid --decorate option: %s"), arg);
|
||||||
decoration_given = 1;
|
decoration_given = 1;
|
||||||
} else if (!strcmp(arg, "--no-decorate")) {
|
} else if (!strcmp(arg, "--no-decorate")) {
|
||||||
decoration_style = 0;
|
decoration_style = 0;
|
||||||
@ -110,7 +110,7 @@ static void cmd_log_init(int argc, const char **argv, const char *prefix,
|
|||||||
} else if (!strcmp(arg, "-h")) {
|
} else if (!strcmp(arg, "-h")) {
|
||||||
usage(builtin_log_usage);
|
usage(builtin_log_usage);
|
||||||
} else
|
} else
|
||||||
die("unrecognized argument: %s", arg);
|
die(_("unrecognized argument: %s"), arg);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -153,7 +153,7 @@ static void show_early_header(struct rev_info *rev, const char *stage, int nr)
|
|||||||
if (rev->commit_format != CMIT_FMT_ONELINE)
|
if (rev->commit_format != CMIT_FMT_ONELINE)
|
||||||
putchar(rev->diffopt.line_termination);
|
putchar(rev->diffopt.line_termination);
|
||||||
}
|
}
|
||||||
printf("Final output: %d %s\n", nr, stage);
|
printf(_("Final output: %d %s\n"), nr, stage);
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct itimerval early_output_timer;
|
static struct itimerval early_output_timer;
|
||||||
@ -252,7 +252,7 @@ static int cmd_log_walk(struct rev_info *rev)
|
|||||||
setup_early_output(rev);
|
setup_early_output(rev);
|
||||||
|
|
||||||
if (prepare_revision_walk(rev))
|
if (prepare_revision_walk(rev))
|
||||||
die("revision walk setup failed");
|
die(_("revision walk setup failed"));
|
||||||
|
|
||||||
if (rev->early_output)
|
if (rev->early_output)
|
||||||
finish_early_output(rev);
|
finish_early_output(rev);
|
||||||
@ -343,7 +343,7 @@ static int show_object(const unsigned char *sha1, int show_tag_object,
|
|||||||
int offset = 0;
|
int offset = 0;
|
||||||
|
|
||||||
if (!buf)
|
if (!buf)
|
||||||
return error("Could not read object %s", sha1_to_hex(sha1));
|
return error(_("Could not read object %s"), sha1_to_hex(sha1));
|
||||||
|
|
||||||
if (show_tag_object)
|
if (show_tag_object)
|
||||||
while (offset < size && buf[offset] != '\n') {
|
while (offset < size && buf[offset] != '\n') {
|
||||||
@ -430,7 +430,7 @@ int cmd_show(int argc, const char **argv, const char *prefix)
|
|||||||
break;
|
break;
|
||||||
o = parse_object(t->tagged->sha1);
|
o = parse_object(t->tagged->sha1);
|
||||||
if (!o)
|
if (!o)
|
||||||
ret = error("Could not read object %s",
|
ret = error(_("Could not read object %s"),
|
||||||
sha1_to_hex(t->tagged->sha1));
|
sha1_to_hex(t->tagged->sha1));
|
||||||
objects[i].item = o;
|
objects[i].item = o;
|
||||||
i--;
|
i--;
|
||||||
@ -454,7 +454,7 @@ int cmd_show(int argc, const char **argv, const char *prefix)
|
|||||||
ret = cmd_log_walk(&rev);
|
ret = cmd_log_walk(&rev);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
ret = error("Unknown type: %d", o->type);
|
ret = error(_("Unknown type: %d"), o->type);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
free(objects);
|
free(objects);
|
||||||
@ -554,7 +554,7 @@ static int git_format_config(const char *var, const char *value, void *cb)
|
|||||||
{
|
{
|
||||||
if (!strcmp(var, "format.headers")) {
|
if (!strcmp(var, "format.headers")) {
|
||||||
if (!value)
|
if (!value)
|
||||||
die("format.headers without value");
|
die(_("format.headers without value"));
|
||||||
add_header(value);
|
add_header(value);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -626,7 +626,7 @@ static int reopen_stdout(struct commit *commit, struct rev_info *rev)
|
|||||||
strbuf_addstr(&filename, output_directory);
|
strbuf_addstr(&filename, output_directory);
|
||||||
if (filename.len >=
|
if (filename.len >=
|
||||||
PATH_MAX - FORMAT_PATCH_NAME_MAX - suffix_len)
|
PATH_MAX - FORMAT_PATCH_NAME_MAX - suffix_len)
|
||||||
return error("name of output directory is too long");
|
return error(_("name of output directory is too long"));
|
||||||
if (filename.buf[filename.len - 1] != '/')
|
if (filename.buf[filename.len - 1] != '/')
|
||||||
strbuf_addch(&filename, '/');
|
strbuf_addch(&filename, '/');
|
||||||
}
|
}
|
||||||
@ -637,7 +637,7 @@ static int reopen_stdout(struct commit *commit, struct rev_info *rev)
|
|||||||
fprintf(realstdout, "%s\n", filename.buf + outdir_offset);
|
fprintf(realstdout, "%s\n", filename.buf + outdir_offset);
|
||||||
|
|
||||||
if (freopen(filename.buf, "w", stdout) == NULL)
|
if (freopen(filename.buf, "w", stdout) == NULL)
|
||||||
return error("Cannot open patch file %s", filename.buf);
|
return error(_("Cannot open patch file %s"), filename.buf);
|
||||||
|
|
||||||
strbuf_release(&filename);
|
strbuf_release(&filename);
|
||||||
return 0;
|
return 0;
|
||||||
@ -651,7 +651,7 @@ static void get_patch_ids(struct rev_info *rev, struct patch_ids *ids, const cha
|
|||||||
unsigned flags1, flags2;
|
unsigned flags1, flags2;
|
||||||
|
|
||||||
if (rev->pending.nr != 2)
|
if (rev->pending.nr != 2)
|
||||||
die("Need exactly one range.");
|
die(_("Need exactly one range."));
|
||||||
|
|
||||||
o1 = rev->pending.objects[0].item;
|
o1 = rev->pending.objects[0].item;
|
||||||
flags1 = o1->flags;
|
flags1 = o1->flags;
|
||||||
@ -659,7 +659,7 @@ static void get_patch_ids(struct rev_info *rev, struct patch_ids *ids, const cha
|
|||||||
flags2 = o2->flags;
|
flags2 = o2->flags;
|
||||||
|
|
||||||
if ((flags1 & UNINTERESTING) == (flags2 & UNINTERESTING))
|
if ((flags1 & UNINTERESTING) == (flags2 & UNINTERESTING))
|
||||||
die("Not a range.");
|
die(_("Not a range."));
|
||||||
|
|
||||||
init_patch_ids(ids);
|
init_patch_ids(ids);
|
||||||
|
|
||||||
@ -670,7 +670,7 @@ static void get_patch_ids(struct rev_info *rev, struct patch_ids *ids, const cha
|
|||||||
add_pending_object(&check_rev, o1, "o1");
|
add_pending_object(&check_rev, o1, "o1");
|
||||||
add_pending_object(&check_rev, o2, "o2");
|
add_pending_object(&check_rev, o2, "o2");
|
||||||
if (prepare_revision_walk(&check_rev))
|
if (prepare_revision_walk(&check_rev))
|
||||||
die("revision walk setup failed");
|
die(_("revision walk setup failed"));
|
||||||
|
|
||||||
while ((commit = get_revision(&check_rev)) != NULL) {
|
while ((commit = get_revision(&check_rev)) != NULL) {
|
||||||
/* ignore merges */
|
/* ignore merges */
|
||||||
@ -696,7 +696,7 @@ static void gen_message_id(struct rev_info *info, char *base)
|
|||||||
const char *email_end = strrchr(committer, '>');
|
const char *email_end = strrchr(committer, '>');
|
||||||
struct strbuf buf = STRBUF_INIT;
|
struct strbuf buf = STRBUF_INIT;
|
||||||
if (!email_start || !email_end || email_start > email_end - 1)
|
if (!email_start || !email_end || email_start > email_end - 1)
|
||||||
die("Could not extract email from committer identity.");
|
die(_("Could not extract email from committer identity."));
|
||||||
strbuf_addf(&buf, "%s.%lu.git.%.*s", base,
|
strbuf_addf(&buf, "%s.%lu.git.%.*s", base,
|
||||||
(unsigned long) time(NULL),
|
(unsigned long) time(NULL),
|
||||||
(int)(email_end - email_start - 1), email_start + 1);
|
(int)(email_end - email_start - 1), email_start + 1);
|
||||||
@ -728,7 +728,7 @@ static void make_cover_letter(struct rev_info *rev, int use_stdout,
|
|||||||
struct commit *commit = NULL;
|
struct commit *commit = NULL;
|
||||||
|
|
||||||
if (rev->commit_format != CMIT_FMT_EMAIL)
|
if (rev->commit_format != CMIT_FMT_EMAIL)
|
||||||
die("Cover letter needs email format");
|
die(_("Cover letter needs email format"));
|
||||||
|
|
||||||
committer = git_committer_info(0);
|
committer = git_committer_info(0);
|
||||||
|
|
||||||
@ -821,7 +821,7 @@ static const char *clean_message_id(const char *msg_id)
|
|||||||
m++;
|
m++;
|
||||||
}
|
}
|
||||||
if (!z)
|
if (!z)
|
||||||
die("insane in-reply-to: %s", msg_id);
|
die(_("insane in-reply-to: %s"), msg_id);
|
||||||
if (++z == m)
|
if (++z == m)
|
||||||
return a;
|
return a;
|
||||||
return xmemdupz(a, z - a);
|
return xmemdupz(a, z - a);
|
||||||
@ -894,7 +894,7 @@ static int output_directory_callback(const struct option *opt, const char *arg,
|
|||||||
{
|
{
|
||||||
const char **dir = (const char **)opt->value;
|
const char **dir = (const char **)opt->value;
|
||||||
if (*dir)
|
if (*dir)
|
||||||
die("Two output directories?");
|
die(_("Two output directories?"));
|
||||||
*dir = arg;
|
*dir = arg;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -1082,7 +1082,7 @@ int cmd_format_patch(int argc, const char **argv, const char *prefix)
|
|||||||
committer = git_committer_info(IDENT_ERROR_ON_NO_NAME);
|
committer = git_committer_info(IDENT_ERROR_ON_NO_NAME);
|
||||||
endpos = strchr(committer, '>');
|
endpos = strchr(committer, '>');
|
||||||
if (!endpos)
|
if (!endpos)
|
||||||
die("bogus committer info %s", committer);
|
die(_("bogus committer info %s"), committer);
|
||||||
add_signoff = xmemdupz(committer, endpos - committer + 1);
|
add_signoff = xmemdupz(committer, endpos - committer + 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1127,13 +1127,13 @@ int cmd_format_patch(int argc, const char **argv, const char *prefix)
|
|||||||
numbered = 0;
|
numbered = 0;
|
||||||
|
|
||||||
if (numbered && keep_subject)
|
if (numbered && keep_subject)
|
||||||
die ("-n and -k are mutually exclusive.");
|
die (_("-n and -k are mutually exclusive."));
|
||||||
if (keep_subject && subject_prefix)
|
if (keep_subject && subject_prefix)
|
||||||
die ("--subject-prefix and -k are mutually exclusive.");
|
die (_("--subject-prefix and -k are mutually exclusive."));
|
||||||
|
|
||||||
argc = setup_revisions(argc, argv, &rev, &s_r_opt);
|
argc = setup_revisions(argc, argv, &rev, &s_r_opt);
|
||||||
if (argc > 1)
|
if (argc > 1)
|
||||||
die ("unrecognized argument: %s", argv[1]);
|
die (_("unrecognized argument: %s"), argv[1]);
|
||||||
|
|
||||||
if (rev.diffopt.output_format & DIFF_FORMAT_NAME)
|
if (rev.diffopt.output_format & DIFF_FORMAT_NAME)
|
||||||
die("--name-only does not make sense");
|
die("--name-only does not make sense");
|
||||||
@ -1163,9 +1163,9 @@ int cmd_format_patch(int argc, const char **argv, const char *prefix)
|
|||||||
|
|
||||||
if (output_directory) {
|
if (output_directory) {
|
||||||
if (use_stdout)
|
if (use_stdout)
|
||||||
die("standard output, or directory, which one?");
|
die(_("standard output, or directory, which one?"));
|
||||||
if (mkdir(output_directory, 0777) < 0 && errno != EEXIST)
|
if (mkdir(output_directory, 0777) < 0 && errno != EEXIST)
|
||||||
die_errno("Could not create directory '%s'",
|
die_errno(_("Could not create directory '%s'"),
|
||||||
output_directory);
|
output_directory);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1219,7 +1219,7 @@ int cmd_format_patch(int argc, const char **argv, const char *prefix)
|
|||||||
realstdout = xfdopen(xdup(1), "w");
|
realstdout = xfdopen(xdup(1), "w");
|
||||||
|
|
||||||
if (prepare_revision_walk(&rev))
|
if (prepare_revision_walk(&rev))
|
||||||
die("revision walk setup failed");
|
die(_("revision walk setup failed"));
|
||||||
rev.boundary = 1;
|
rev.boundary = 1;
|
||||||
while ((commit = get_revision(&rev)) != NULL) {
|
while ((commit = get_revision(&rev)) != NULL) {
|
||||||
if (commit->object.flags & BOUNDARY) {
|
if (commit->object.flags & BOUNDARY) {
|
||||||
@ -1300,7 +1300,7 @@ int cmd_format_patch(int argc, const char **argv, const char *prefix)
|
|||||||
|
|
||||||
if (!use_stdout && reopen_stdout(numbered_files ? NULL : commit,
|
if (!use_stdout && reopen_stdout(numbered_files ? NULL : commit,
|
||||||
&rev))
|
&rev))
|
||||||
die("Failed to create output files");
|
die(_("Failed to create output files"));
|
||||||
shown = log_tree_commit(&rev, commit);
|
shown = log_tree_commit(&rev, commit);
|
||||||
free(commit->buffer);
|
free(commit->buffer);
|
||||||
commit->buffer = NULL;
|
commit->buffer = NULL;
|
||||||
@ -1387,9 +1387,9 @@ int cmd_cherry(int argc, const char **argv, const char *prefix)
|
|||||||
if (!current_branch || !current_branch->merge
|
if (!current_branch || !current_branch->merge
|
||||||
|| !current_branch->merge[0]
|
|| !current_branch->merge[0]
|
||||||
|| !current_branch->merge[0]->dst) {
|
|| !current_branch->merge[0]->dst) {
|
||||||
fprintf(stderr, "Could not find a tracked"
|
fprintf(stderr, _("Could not find a tracked"
|
||||||
" remote branch, please"
|
" remote branch, please"
|
||||||
" specify <upstream> manually.\n");
|
" specify <upstream> manually.\n"));
|
||||||
usage_with_options(cherry_usage, options);
|
usage_with_options(cherry_usage, options);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1403,9 +1403,9 @@ int cmd_cherry(int argc, const char **argv, const char *prefix)
|
|||||||
DIFF_OPT_SET(&revs.diffopt, RECURSIVE);
|
DIFF_OPT_SET(&revs.diffopt, RECURSIVE);
|
||||||
|
|
||||||
if (add_pending_commit(head, &revs, 0))
|
if (add_pending_commit(head, &revs, 0))
|
||||||
die("Unknown commit %s", head);
|
die(_("Unknown commit %s"), head);
|
||||||
if (add_pending_commit(upstream, &revs, UNINTERESTING))
|
if (add_pending_commit(upstream, &revs, UNINTERESTING))
|
||||||
die("Unknown commit %s", upstream);
|
die(_("Unknown commit %s"), upstream);
|
||||||
|
|
||||||
/* Don't say anything if head and upstream are the same. */
|
/* Don't say anything if head and upstream are the same. */
|
||||||
if (revs.pending.nr == 2) {
|
if (revs.pending.nr == 2) {
|
||||||
@ -1417,11 +1417,11 @@ int cmd_cherry(int argc, const char **argv, const char *prefix)
|
|||||||
get_patch_ids(&revs, &ids, prefix);
|
get_patch_ids(&revs, &ids, prefix);
|
||||||
|
|
||||||
if (limit && add_pending_commit(limit, &revs, UNINTERESTING))
|
if (limit && add_pending_commit(limit, &revs, UNINTERESTING))
|
||||||
die("Unknown commit %s", limit);
|
die(_("Unknown commit %s"), limit);
|
||||||
|
|
||||||
/* reverse the list of commits */
|
/* reverse the list of commits */
|
||||||
if (prepare_revision_walk(&revs))
|
if (prepare_revision_walk(&revs))
|
||||||
die("revision walk setup failed");
|
die(_("revision walk setup failed"));
|
||||||
while ((commit = get_revision(&revs)) != NULL) {
|
while ((commit = get_revision(&revs)) != NULL) {
|
||||||
/* ignore merges */
|
/* ignore merges */
|
||||||
if (commit->parents && commit->parents->next)
|
if (commit->parents && commit->parents->next)
|
||||||
|
Reference in New Issue
Block a user