summaryrefslogtreecommitdiff
path: root/builtin/describe.c
diff options
context:
space:
mode:
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>2011-02-22 23:42:23 (GMT)
committerJunio C Hamano <gitster@pobox.com>2011-03-10 07:52:57 (GMT)
commite41f1cb36b71485715941c2abe67d3e184baf061 (patch)
treea1fcdd90ab6acc2ebbd0b5d93c1b3dc935d1b339 /builtin/describe.c
parenta66f9b2afde8ae0d6bd8991e6a8f848904c8bdde (diff)
downloadgit-e41f1cb36b71485715941c2abe67d3e184baf061.zip
git-e41f1cb36b71485715941c2abe67d3e184baf061.tar.gz
git-e41f1cb36b71485715941c2abe67d3e184baf061.tar.bz2
i18n: git-describe basic messages
Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/describe.c')
-rw-r--r--builtin/describe.c36
1 files changed, 18 insertions, 18 deletions
diff --git a/builtin/describe.c b/builtin/describe.c
index 342129f..037691e 100644
--- a/builtin/describe.c
+++ b/builtin/describe.c
@@ -231,13 +231,13 @@ static void display_name(struct commit_name *n)
if (n->prio == 2 && !n->tag) {
n->tag = lookup_tag(n->sha1);
if (!n->tag || parse_tag(n->tag))
- die("annotated tag %s not available", n->path);
+ die(_("annotated tag %s not available"), n->path);
}
if (n->tag && !n->name_checked) {
if (!n->tag->tag)
- die("annotated tag %s has no embedded name", n->path);
+ die(_("annotated tag %s has no embedded name"), n->path);
if (strcmp(n->tag->tag, all ? n->path + 5 : n->path))
- warning("tag '%s' is really '%s' here", n->tag->tag, n->path);
+ warning(_("tag '%s' is really '%s' here"), n->tag->tag, n->path);
n->name_checked = 1;
}
@@ -264,10 +264,10 @@ static void describe(const char *arg, int last_one)
unsigned int unannotated_cnt = 0;
if (get_sha1(arg, sha1))
- die("Not a valid object name %s", arg);
+ die(_("Not a valid object name %s"), arg);
cmit = lookup_commit_reference(sha1);
if (!cmit)
- die("%s is not a valid '%s' object", arg, commit_type);
+ die(_("%s is not a valid '%s' object"), arg, commit_type);
n = find_commit_name(cmit->object.sha1);
if (n && (tags || all || n->prio == 2)) {
@@ -284,9 +284,9 @@ static void describe(const char *arg, int last_one)
}
if (!max_candidates)
- die("no tag exactly matches '%s'", sha1_to_hex(cmit->object.sha1));
+ die(_("no tag exactly matches '%s'"), sha1_to_hex(cmit->object.sha1));
if (debug)
- fprintf(stderr, "searching to describe %s\n", arg);
+ fprintf(stderr, _("searching to describe %s\n"), arg);
if (!have_util) {
for_each_hash(&names, set_util);
@@ -326,7 +326,7 @@ static void describe(const char *arg, int last_one)
}
if (annotated_cnt && !list) {
if (debug)
- fprintf(stderr, "finished search at %s\n",
+ fprintf(stderr, _("finished search at %s\n"),
sha1_to_hex(c->object.sha1));
break;
}
@@ -350,12 +350,12 @@ static void describe(const char *arg, int last_one)
return;
}
if (unannotated_cnt)
- die("No annotated tags can describe '%s'.\n"
- "However, there were unannotated tags: try --tags.",
+ die(_("No annotated tags can describe '%s'.\n"
+ "However, there were unannotated tags: try --tags."),
sha1_to_hex(sha1));
else
- die("No tags can describe '%s'.\n"
- "Try --always, or create some tags.",
+ die(_("No tags can describe '%s'.\n"
+ "Try --always, or create some tags."),
sha1_to_hex(sha1));
}
@@ -375,11 +375,11 @@ static void describe(const char *arg, int last_one)
prio_names[t->name->prio],
t->depth, t->name->path);
}
- fprintf(stderr, "traversed %lu commits\n", seen_commits);
+ fprintf(stderr, _("traversed %lu commits\n"), seen_commits);
if (gave_up_on) {
fprintf(stderr,
- "more than %i tags found; listed %i most recent\n"
- "gave up search at %s\n",
+ _("more than %i tags found; listed %i most recent\n"
+ "gave up search at %s\n"),
max_candidates, max_candidates,
sha1_to_hex(gave_up_on->object.sha1));
}
@@ -429,7 +429,7 @@ int cmd_describe(int argc, const char **argv, const char *prefix)
save_commit_buffer = 0;
if (longformat && abbrev == 0)
- die("--long is incompatible with --abbrev=0");
+ die(_("--long is incompatible with --abbrev=0"));
if (contains) {
const char **args = xmalloc((7 + argc) * sizeof(char *));
@@ -455,14 +455,14 @@ int cmd_describe(int argc, const char **argv, const char *prefix)
init_hash(&names);
for_each_rawref(get_name, NULL);
if (!names.nr && !always)
- die("No names found, cannot describe anything.");
+ die(_("No names found, cannot describe anything."));
if (argc == 0) {
if (dirty && !cmd_diff_index(ARRAY_SIZE(diff_index_args) - 1, diff_index_args, prefix))
dirty = NULL;
describe("HEAD", 1);
} else if (dirty) {
- die("--dirty is incompatible with committishes");
+ die(_("--dirty is incompatible with committishes"));
} else {
while (argc-- > 0) {
describe(*argv++, argc == 0);