i18n: notes: mark error messages for translation
Signed-off-by: Vasco Almeida <vascomalmeida@sapo.pt> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Vasco Almeida committed
Sep 15, 2016 at 14:59 UTC
2d1252dade6cdc32be071aabddc0b9fc5ca9af46
1 file changed
+11
-9
builtin/notes.c
+11
-9
@@ -340,7 +340,9 @@ static struct notes_tree *init_notes_check(const char *subcommand,
340
341
ref = (flags & NOTES_INIT_WRITABLE) ? t->update_ref : t->ref;
342
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/)"),
346
subcommand, ref);
347
return t;
348
}
@@ -680,11 +682,11 @@ static int merge_abort(struct notes_merge_options *o)
682
*/
683
684
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"));
686
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"));
688
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"));
690
return ret;
691
}
692
@@ -704,11 +706,11 @@ static int merge_commit(struct notes_merge_options *o)
706
*/
707
708
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"));
710
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."));
712
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."));
714
715
if (partial->parents)
716
hashcpy(parent_sha1, partial->parents->item->object.oid.hash);
@@ -721,10 +723,10 @@ static int merge_commit(struct notes_merge_options *o)
723
o->local_ref = local_ref_to_free =
724
resolve_refdup("NOTES_MERGE_REF", 0, sha1, NULL);
725
if (!o->local_ref)
724
- die("Failed to resolve NOTES_MERGE_REF");
726
+ die(_("Failed to resolve NOTES_MERGE_REF"));
727
728
if (notes_merge_commit(o, t, partial, sha1))
727
- die("Failed to finalize notes merge");
729
+ die(_("Failed to finalize notes merge"));
730
731
/* Reuse existing commit message in reflog message */
732
memset(&pretty_ctx, 0, sizeof(pretty_ctx));