@@ -309,11 +309,11 @@ static int write_zip_entry(struct archiver_args *args,
309
309
if (is_utf8 (path ))
310
310
flags |= ZIP_UTF8 ;
311
311
else
312
- warning ("path is not valid UTF-8: %s" , path );
312
+ warning (_ ( "path is not valid UTF-8: %s" ) , path );
313
313
}
314
314
315
315
if (pathlen > 0xffff ) {
316
- return error ("path too long (%d chars, SHA1: %s): %s" ,
316
+ return error (_ ( "path too long (%d chars, SHA1: %s): %s" ) ,
317
317
(int )pathlen , oid_to_hex (oid ), path );
318
318
}
319
319
@@ -340,15 +340,15 @@ static int write_zip_entry(struct archiver_args *args,
340
340
size > big_file_threshold ) {
341
341
stream = open_istream (oid , & type , & size , NULL );
342
342
if (!stream )
343
- return error ("cannot stream blob %s" ,
343
+ return error (_ ( "cannot stream blob %s" ) ,
344
344
oid_to_hex (oid ));
345
345
flags |= ZIP_STREAM ;
346
346
out = buffer = NULL ;
347
347
} else {
348
348
buffer = object_file_to_archive (args , path , oid , mode ,
349
349
& type , & size );
350
350
if (!buffer )
351
- return error ("cannot read %s" ,
351
+ return error (_ ( "cannot read %s" ) ,
352
352
oid_to_hex (oid ));
353
353
crc = crc32 (crc , buffer , size );
354
354
is_binary = entry_is_binary (path_without_prefix ,
@@ -357,7 +357,7 @@ static int write_zip_entry(struct archiver_args *args,
357
357
}
358
358
compressed_size = (method == 0 ) ? size : 0 ;
359
359
} else {
360
- return error ("unsupported file mode: 0%o (SHA1: %s)" , mode ,
360
+ return error (_ ( "unsupported file mode: 0%o (SHA1: %s)" ) , mode ,
361
361
oid_to_hex (oid ));
362
362
}
363
363
@@ -466,7 +466,7 @@ static int write_zip_entry(struct archiver_args *args,
466
466
zstream .avail_in = readlen ;
467
467
result = git_deflate (& zstream , 0 );
468
468
if (result != Z_OK )
469
- die ("deflate error (%d)" , result );
469
+ die (_ ( "deflate error (%d)" ) , result );
470
470
out_len = zstream .next_out - compressed ;
471
471
472
472
if (out_len > 0 ) {
@@ -601,7 +601,7 @@ static void dos_time(timestamp_t *timestamp, int *dos_date, int *dos_time)
601
601
struct tm * t ;
602
602
603
603
if (date_overflows (* timestamp ))
604
- die ("timestamp too large for this system: %" PRItime ,
604
+ die (_ ( "timestamp too large for this system: %" PRItime ) ,
605
605
* timestamp );
606
606
time = (time_t )* timestamp ;
607
607
t = localtime (& time );
0 commit comments