Skip to content

Commit 1fe6f5f

Browse files
committed
Merge branch 'va/i18n'
More i18n. * va/i18n: i18n: update-index: mark warnings for translation i18n: show-branch: mark plural strings for translation i18n: show-branch: mark error messages for translation i18n: receive-pack: mark messages for translation notes: spell first word of error messages in lowercase i18n: notes: mark error messages for translation i18n: merge-recursive: mark verbose message for translation i18n: merge-recursive: mark error messages for translation i18n: config: mark error message for translation i18n: branch: mark option description for translation i18n: blame: mark error messages for translation
2 parents e8f871a + 43073f8 commit 1fe6f5f

File tree

10 files changed

+109
-106
lines changed

10 files changed

+109
-106
lines changed

builtin/blame.c

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2601,7 +2601,7 @@ int cmd_blame(int argc, const char **argv, const char *prefix)
26012601

26022602
if (incremental || (output_option & OUTPUT_PORCELAIN)) {
26032603
if (show_progress > 0)
2604-
die("--progress can't be used with --incremental or porcelain formats");
2604+
die(_("--progress can't be used with --incremental or porcelain formats"));
26052605
show_progress = 0;
26062606
} else if (show_progress < 0)
26072607
show_progress = isatty(2);
@@ -2727,7 +2727,7 @@ int cmd_blame(int argc, const char **argv, const char *prefix)
27272727
sb.commits.compare = compare_commits_by_commit_date;
27282728
}
27292729
else if (contents_from)
2730-
die("--contents and --reverse do not blend well.");
2730+
die(_("--contents and --reverse do not blend well."));
27312731
else {
27322732
final_commit_name = prepare_initial(&sb);
27332733
sb.commits.compare = compare_commits_by_reverse_commit_date;
@@ -2747,12 +2747,12 @@ int cmd_blame(int argc, const char **argv, const char *prefix)
27472747
add_pending_object(&revs, &(sb.final->object), ":");
27482748
}
27492749
else if (contents_from)
2750-
die("Cannot use --contents with final commit object name");
2750+
die(_("cannot use --contents with final commit object name"));
27512751

27522752
if (reverse && revs.first_parent_only) {
27532753
final_commit = find_single_final(sb.revs, NULL);
27542754
if (!final_commit)
2755-
die("--reverse and --first-parent together require specified latest commit");
2755+
die(_("--reverse and --first-parent together require specified latest commit"));
27562756
}
27572757

27582758
/*
@@ -2779,7 +2779,7 @@ int cmd_blame(int argc, const char **argv, const char *prefix)
27792779
}
27802780

27812781
if (oidcmp(&c->object.oid, &sb.final->object.oid))
2782-
die("--reverse --first-parent together require range along first-parent chain");
2782+
die(_("--reverse --first-parent together require range along first-parent chain"));
27832783
}
27842784

27852785
if (is_null_oid(&sb.final->object.oid)) {
@@ -2790,7 +2790,7 @@ int cmd_blame(int argc, const char **argv, const char *prefix)
27902790
else {
27912791
o = get_origin(&sb, sb.final, path);
27922792
if (fill_blob_sha1_and_mode(o))
2793-
die("no such path %s in %s", path, final_commit_name);
2793+
die(_("no such path %s in %s"), path, final_commit_name);
27942794

27952795
if (DIFF_OPT_TST(&sb.revs->diffopt, ALLOW_TEXTCONV) &&
27962796
textconv_object(path, o->mode, &o->blob_oid, 1, (char **) &sb.final_buf,
@@ -2801,7 +2801,7 @@ int cmd_blame(int argc, const char **argv, const char *prefix)
28012801
&sb.final_buf_size);
28022802

28032803
if (!sb.final_buf)
2804-
die("Cannot read blob %s for path %s",
2804+
die(_("cannot read blob %s for path %s"),
28052805
oid_to_hex(&o->blob_oid),
28062806
path);
28072807
}
@@ -2820,7 +2820,9 @@ int cmd_blame(int argc, const char **argv, const char *prefix)
28202820
&bottom, &top, sb.path))
28212821
usage(blame_usage);
28222822
if (lno < top || ((lno || bottom) && lno < bottom))
2823-
die("file %s has only %lu lines", path, lno);
2823+
die(Q_("file %s has only %lu line",
2824+
"file %s has only %lu lines",
2825+
lno), path, lno);
28242826
if (bottom < 1)
28252827
bottom = 1;
28262828
if (top < 1)

builtin/branch.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -657,7 +657,7 @@ int cmd_branch(int argc, const char **argv, const char *prefix)
657657
OPT_SET_INT( 0, "set-upstream", &track, N_("change upstream info"),
658658
BRANCH_TRACK_OVERRIDE),
659659
OPT_STRING('u', "set-upstream-to", &new_upstream, N_("upstream"), N_("change the upstream info")),
660-
OPT_BOOL(0, "unset-upstream", &unset_upstream, "Unset the upstream info"),
660+
OPT_BOOL(0, "unset-upstream", &unset_upstream, N_("Unset the upstream info")),
661661
OPT__COLOR(&branch_use_color, N_("use colored output")),
662662
OPT_SET_INT('r', "remotes", &filter.kind, N_("act on remote-tracking branches"),
663663
FILTER_REFS_REMOTES),

builtin/config.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -622,8 +622,8 @@ int cmd_config(int argc, const char **argv, const char *prefix)
622622
value = normalize_value(argv[0], argv[1]);
623623
ret = git_config_set_in_file_gently(given_config_source.file, argv[0], value);
624624
if (ret == CONFIG_NOTHING_SET)
625-
error("cannot overwrite multiple values with a single value\n"
626-
" Use a regexp, --add or --replace-all to change %s.", argv[0]);
625+
error(_("cannot overwrite multiple values with a single value\n"
626+
" Use a regexp, --add or --replace-all to change %s."), argv[0]);
627627
return ret;
628628
}
629629
else if (actions == ACTION_SET_ALL) {

builtin/merge-recursive.c

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -42,36 +42,39 @@ int cmd_merge_recursive(int argc, const char **argv, const char *prefix)
4242
if (!arg[2])
4343
break;
4444
if (parse_merge_opt(&o, arg + 2))
45-
die("Unknown option %s", arg);
45+
die(_("unknown option %s"), arg);
4646
continue;
4747
}
4848
if (bases_count < ARRAY_SIZE(bases)-1) {
4949
struct object_id *oid = xmalloc(sizeof(struct object_id));
5050
if (get_oid(argv[i], oid))
51-
die("Could not parse object '%s'", argv[i]);
51+
die(_("could not parse object '%s'"), argv[i]);
5252
bases[bases_count++] = oid;
5353
}
5454
else
55-
warning("Cannot handle more than %d bases. "
56-
"Ignoring %s.",
55+
warning(Q_("cannot handle more than %d base. "
56+
"Ignoring %s.",
57+
"cannot handle more than %d bases. "
58+
"Ignoring %s.",
59+
(int)ARRAY_SIZE(bases)-1),
5760
(int)ARRAY_SIZE(bases)-1, argv[i]);
5861
}
5962
if (argc - i != 3) /* "--" "<head>" "<remote>" */
60-
die("Not handling anything other than two heads merge.");
63+
die(_("not handling anything other than two heads merge."));
6164

6265
o.branch1 = argv[++i];
6366
o.branch2 = argv[++i];
6467

6568
if (get_oid(o.branch1, &h1))
66-
die("Could not resolve ref '%s'", o.branch1);
69+
die(_("could not resolve ref '%s'"), o.branch1);
6770
if (get_oid(o.branch2, &h2))
68-
die("Could not resolve ref '%s'", o.branch2);
71+
die(_("could not resolve ref '%s'"), o.branch2);
6972

7073
o.branch1 = better_branch_name(o.branch1);
7174
o.branch2 = better_branch_name(o.branch2);
7275

7376
if (o.verbosity >= 3)
74-
printf("Merging %s with %s\n", o.branch1, o.branch2);
77+
printf(_("Merging %s with %s\n"), o.branch1, o.branch2);
7578

7679
failed = merge_recursive_generic(&o, &h1, &h2, bases_count, bases, &result);
7780
if (failed < 0)

builtin/notes.c

Lines changed: 34 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ static void prepare_note_data(const unsigned char *object, struct note_data *d,
191191
strbuf_reset(&d->buf);
192192

193193
if (launch_editor(d->edit_path, &d->buf, NULL)) {
194-
die(_("Please supply the note contents using either -m or -F option"));
194+
die(_("please supply the note contents using either -m or -F option"));
195195
}
196196
strbuf_stripspace(&d->buf, 1);
197197
}
@@ -202,7 +202,7 @@ static void write_note_data(struct note_data *d, unsigned char *sha1)
202202
if (write_sha1_file(d->buf.buf, d->buf.len, blob_type, sha1)) {
203203
error(_("unable to write note object"));
204204
if (d->edit_path)
205-
error(_("The note contents have been left in %s"),
205+
error(_("the note contents have been left in %s"),
206206
d->edit_path);
207207
exit(128);
208208
}
@@ -251,14 +251,14 @@ static int parse_reuse_arg(const struct option *opt, const char *arg, int unset)
251251
strbuf_addch(&d->buf, '\n');
252252

253253
if (get_sha1(arg, object))
254-
die(_("Failed to resolve '%s' as a valid ref."), arg);
254+
die(_("failed to resolve '%s' as a valid ref."), arg);
255255
if (!(buf = read_sha1_file(object, &type, &len))) {
256256
free(buf);
257-
die(_("Failed to read object '%s'."), arg);
257+
die(_("failed to read object '%s'."), arg);
258258
}
259259
if (type != OBJ_BLOB) {
260260
free(buf);
261-
die(_("Cannot read note data from non-blob object '%s'."), arg);
261+
die(_("cannot read note data from non-blob object '%s'."), arg);
262262
}
263263
strbuf_add(&d->buf, buf, len);
264264
free(buf);
@@ -298,13 +298,13 @@ static int notes_copy_from_stdin(int force, const char *rewrite_cmd)
298298

299299
split = strbuf_split(&buf, ' ');
300300
if (!split[0] || !split[1])
301-
die(_("Malformed input line: '%s'."), buf.buf);
301+
die(_("malformed input line: '%s'."), buf.buf);
302302
strbuf_rtrim(split[0]);
303303
strbuf_rtrim(split[1]);
304304
if (get_sha1(split[0]->buf, from_obj))
305-
die(_("Failed to resolve '%s' as a valid ref."), split[0]->buf);
305+
die(_("failed to resolve '%s' as a valid ref."), split[0]->buf);
306306
if (get_sha1(split[1]->buf, to_obj))
307-
die(_("Failed to resolve '%s' as a valid ref."), split[1]->buf);
307+
die(_("failed to resolve '%s' as a valid ref."), split[1]->buf);
308308

309309
if (rewrite_cmd)
310310
err = copy_note_for_rewrite(c, from_obj, to_obj);
@@ -313,7 +313,7 @@ static int notes_copy_from_stdin(int force, const char *rewrite_cmd)
313313
combine_notes_overwrite);
314314

315315
if (err) {
316-
error(_("Failed to copy notes from '%s' to '%s'"),
316+
error(_("failed to copy notes from '%s' to '%s'"),
317317
split[0]->buf, split[1]->buf);
318318
ret = 1;
319319
}
@@ -340,7 +340,9 @@ static struct notes_tree *init_notes_check(const char *subcommand,
340340

341341
ref = (flags & NOTES_INIT_WRITABLE) ? t->update_ref : t->ref;
342342
if (!starts_with(ref, "refs/notes/"))
343-
die("Refusing to %s notes in %s (outside of refs/notes/)",
343+
/* TRANSLATORS: the first %s will be replaced by a
344+
git notes command: 'add', 'merge', 'remove', etc.*/
345+
die(_("refusing to %s notes in %s (outside of refs/notes/)"),
344346
subcommand, ref);
345347
return t;
346348
}
@@ -367,13 +369,13 @@ static int list(int argc, const char **argv, const char *prefix)
367369
t = init_notes_check("list", 0);
368370
if (argc) {
369371
if (get_sha1(argv[0], object))
370-
die(_("Failed to resolve '%s' as a valid ref."), argv[0]);
372+
die(_("failed to resolve '%s' as a valid ref."), argv[0]);
371373
note = get_note(t, object);
372374
if (note) {
373375
puts(sha1_to_hex(note));
374376
retval = 0;
375377
} else
376-
retval = error(_("No note found for object %s."),
378+
retval = error(_("no note found for object %s."),
377379
sha1_to_hex(object));
378380
} else
379381
retval = for_each_note(t, 0, list_each_note, NULL);
@@ -422,7 +424,7 @@ static int add(int argc, const char **argv, const char *prefix)
422424
object_ref = argc > 1 ? argv[1] : "HEAD";
423425

424426
if (get_sha1(object_ref, object))
425-
die(_("Failed to resolve '%s' as a valid ref."), object_ref);
427+
die(_("failed to resolve '%s' as a valid ref."), object_ref);
426428

427429
t = init_notes_check("add", NOTES_INIT_WRITABLE);
428430
note = get_note(t, object);
@@ -508,12 +510,12 @@ static int copy(int argc, const char **argv, const char *prefix)
508510
}
509511

510512
if (get_sha1(argv[0], from_obj))
511-
die(_("Failed to resolve '%s' as a valid ref."), argv[0]);
513+
die(_("failed to resolve '%s' as a valid ref."), argv[0]);
512514

513515
object_ref = 1 < argc ? argv[1] : "HEAD";
514516

515517
if (get_sha1(object_ref, object))
516-
die(_("Failed to resolve '%s' as a valid ref."), object_ref);
518+
die(_("failed to resolve '%s' as a valid ref."), object_ref);
517519

518520
t = init_notes_check("copy", NOTES_INIT_WRITABLE);
519521
note = get_note(t, object);
@@ -532,7 +534,7 @@ static int copy(int argc, const char **argv, const char *prefix)
532534

533535
from_note = get_note(t, from_obj);
534536
if (!from_note) {
535-
retval = error(_("Missing notes on source object %s. Cannot "
537+
retval = error(_("missing notes on source object %s. Cannot "
536538
"copy."), sha1_to_hex(from_obj));
537539
goto out;
538540
}
@@ -591,7 +593,7 @@ static int append_edit(int argc, const char **argv, const char *prefix)
591593
object_ref = 1 < argc ? argv[1] : "HEAD";
592594

593595
if (get_sha1(object_ref, object))
594-
die(_("Failed to resolve '%s' as a valid ref."), object_ref);
596+
die(_("failed to resolve '%s' as a valid ref."), object_ref);
595597

596598
t = init_notes_check(argv[0], NOTES_INIT_WRITABLE);
597599
note = get_note(t, object);
@@ -654,13 +656,13 @@ static int show(int argc, const char **argv, const char *prefix)
654656
object_ref = argc ? argv[0] : "HEAD";
655657

656658
if (get_sha1(object_ref, object))
657-
die(_("Failed to resolve '%s' as a valid ref."), object_ref);
659+
die(_("failed to resolve '%s' as a valid ref."), object_ref);
658660

659661
t = init_notes_check("show", 0);
660662
note = get_note(t, object);
661663

662664
if (!note)
663-
retval = error(_("No note found for object %s."),
665+
retval = error(_("no note found for object %s."),
664666
sha1_to_hex(object));
665667
else {
666668
const char *show_args[3] = {"show", sha1_to_hex(note), NULL};
@@ -680,11 +682,11 @@ static int merge_abort(struct notes_merge_options *o)
680682
*/
681683

682684
if (delete_ref("NOTES_MERGE_PARTIAL", NULL, 0))
683-
ret += error("Failed to delete ref NOTES_MERGE_PARTIAL");
685+
ret += error(_("failed to delete ref NOTES_MERGE_PARTIAL"));
684686
if (delete_ref("NOTES_MERGE_REF", NULL, REF_NODEREF))
685-
ret += error("Failed to delete ref NOTES_MERGE_REF");
687+
ret += error(_("failed to delete ref NOTES_MERGE_REF"));
686688
if (notes_merge_abort(o))
687-
ret += error("Failed to remove 'git notes merge' worktree");
689+
ret += error(_("failed to remove 'git notes merge' worktree"));
688690
return ret;
689691
}
690692

@@ -704,11 +706,11 @@ static int merge_commit(struct notes_merge_options *o)
704706
*/
705707

706708
if (get_sha1("NOTES_MERGE_PARTIAL", sha1))
707-
die("Failed to read ref NOTES_MERGE_PARTIAL");
709+
die(_("failed to read ref NOTES_MERGE_PARTIAL"));
708710
else if (!(partial = lookup_commit_reference(sha1)))
709-
die("Could not find commit from NOTES_MERGE_PARTIAL.");
711+
die(_("could not find commit from NOTES_MERGE_PARTIAL."));
710712
else if (parse_commit(partial))
711-
die("Could not parse commit from NOTES_MERGE_PARTIAL.");
713+
die(_("could not parse commit from NOTES_MERGE_PARTIAL."));
712714

713715
if (partial->parents)
714716
hashcpy(parent_sha1, partial->parents->item->object.oid.hash);
@@ -721,10 +723,10 @@ static int merge_commit(struct notes_merge_options *o)
721723
o->local_ref = local_ref_to_free =
722724
resolve_refdup("NOTES_MERGE_REF", 0, sha1, NULL);
723725
if (!o->local_ref)
724-
die("Failed to resolve NOTES_MERGE_REF");
726+
die(_("failed to resolve NOTES_MERGE_REF"));
725727

726728
if (notes_merge_commit(o, t, partial, sha1))
727-
die("Failed to finalize notes merge");
729+
die(_("failed to finalize notes merge"));
728730

729731
/* Reuse existing commit message in reflog message */
730732
memset(&pretty_ctx, 0, sizeof(pretty_ctx));
@@ -794,7 +796,7 @@ static int merge(int argc, const char **argv, const char *prefix)
794796
}
795797

796798
if (do_merge && argc != 1) {
797-
error(_("Must specify a notes ref to merge"));
799+
error(_("must specify a notes ref to merge"));
798800
usage_with_options(git_notes_merge_usage, options);
799801
} else if (!do_merge && argc) {
800802
error(_("too many parameters"));
@@ -818,7 +820,7 @@ static int merge(int argc, const char **argv, const char *prefix)
818820

819821
if (strategy) {
820822
if (parse_notes_merge_strategy(strategy, &o.strategy)) {
821-
error(_("Unknown -s/--strategy: %s"), strategy);
823+
error(_("unknown -s/--strategy: %s"), strategy);
822824
usage_with_options(git_notes_merge_usage, options);
823825
}
824826
} else {
@@ -855,10 +857,10 @@ static int merge(int argc, const char **argv, const char *prefix)
855857
/* Store ref-to-be-updated into .git/NOTES_MERGE_REF */
856858
wt = find_shared_symref("NOTES_MERGE_REF", default_notes_ref());
857859
if (wt)
858-
die(_("A notes merge into %s is already in-progress at %s"),
860+
die(_("a notes merge into %s is already in-progress at %s"),
859861
default_notes_ref(), wt->path);
860862
if (create_symref("NOTES_MERGE_REF", default_notes_ref(), NULL))
861-
die(_("Failed to store link to current notes ref (%s)"),
863+
die(_("failed to store link to current notes ref (%s)"),
862864
default_notes_ref());
863865
printf(_("Automatic notes merge failed. Fix conflicts in %s and "
864866
"commit the result with 'git notes merge --commit', or "
@@ -1014,7 +1016,7 @@ int cmd_notes(int argc, const char **argv, const char *prefix)
10141016
else if (!strcmp(argv[0], "get-ref"))
10151017
result = get_ref(argc, argv, prefix);
10161018
else {
1017-
result = error(_("Unknown subcommand: %s"), argv[0]);
1019+
result = error(_("unknown subcommand: %s"), argv[0]);
10181020
usage_with_options(git_notes_usage, options);
10191021
}
10201022

0 commit comments

Comments
 (0)