@@ -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