@matheusbsbs / matheus-bagliano / commits / 54214529b5
Fork 0

i18n: git-diff basic messages

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Ævar Arnfjörð Bjarmason committed Feb 22, 2011 at 23:41 UTC 54214529b5e47a9580747a152aa646132d1d7911
1 file changed +9 -9
builtin/diff.c
+9 -9
@@ -71,9 +71,9 @@ static int builtin_diff_b_f(struct rev_info *revs,
71 usage(builtin_diff_usage);
72
73 if (lstat(path, &st))
74 - die_errno("failed to stat '%s'", path);
74 + die_errno(_("failed to stat '%s'"), path);
75 if (!(S_ISREG(st.st_mode) || S_ISLNK(st.st_mode)))
76 - die("'%s': not a regular file or symlink", path);
76 + die(_("'%s': not a regular file or symlink"), path);
77
78 diff_set_mnemonic_prefix(&revs->diffopt, "o/", "w/");
79
@@ -222,7 +222,7 @@ static int builtin_diff_files(struct rev_info *revs, int argc, const char **argv
222 else if (!strcmp(argv[1], "-h"))
223 usage(builtin_diff_usage);
224 else
225 - return error("invalid option: %s", argv[1]);
225 + return error(_("invalid option: %s"), argv[1]);
226 argv++; argc--;
227 }
228
@@ -299,12 +299,12 @@ int cmd_diff(int argc, const char **argv, const char *prefix)
299 DIFF_OPT_SET(&rev.diffopt, ALLOW_TEXTCONV);
300
301 if (nongit)
302 - die("Not a git repository");
302 + die(_("Not a git repository"));
303 argc = setup_revisions(argc, argv, &rev, NULL);
304 if (!rev.diffopt.output_format) {
305 rev.diffopt.output_format = DIFF_FORMAT_PATCH;
306 if (diff_setup_done(&rev.diffopt) < 0)
307 - die("diff_setup_done failed");
307 + die(_("diff_setup_done failed"));
308 }
309
310 DIFF_OPT_SET(&rev.diffopt, RECURSIVE);
@@ -349,12 +349,12 @@ int cmd_diff(int argc, const char **argv, const char *prefix)
349 obj = parse_object(obj->sha1);
350 obj = deref_tag(obj, NULL, 0);
351 if (!obj)
352 - die("invalid object '%s' given.", name);
352 + die(_("invalid object '%s' given."), name);
353 if (obj->type == OBJ_COMMIT)
354 obj = &((struct commit *)obj)->tree->object;
355 if (obj->type == OBJ_TREE) {
356 if (ARRAY_SIZE(ent) <= ents)
357 - die("more than %d trees given: '%s'",
357 + die(_("more than %d trees given: '%s'"),
358 (int) ARRAY_SIZE(ent), name);
359 obj->flags |= flags;
360 ent[ents].item = obj;
@@ -364,7 +364,7 @@ int cmd_diff(int argc, const char **argv, const char *prefix)
364 }
365 if (obj->type == OBJ_BLOB) {
366 if (2 <= blobs)
367 - die("more than two blobs given: '%s'", name);
367 + die(_("more than two blobs given: '%s'"), name);
368 hashcpy(blob[blobs].sha1, obj->sha1);
369 blob[blobs].name = name;
370 blob[blobs].mode = list->mode;
@@ -372,7 +372,7 @@ int cmd_diff(int argc, const char **argv, const char *prefix)
372 continue;
373
374 }
375 - die("unhandled object '%s' given.", name);
375 + die(_("unhandled object '%s' given."), name);
376 }
377 if (rev.prune_data) {
378 const char **pathspec = rev.prune_data;