Changeset 5193 for trunk/libtransmission/utils.c
- Timestamp:
- Mar 4, 2008, 2:02:25 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/libtransmission/utils.c
r5185 r5193 363 363 if( stat( path, &sb ) ) 364 364 { 365 tr_err( "Couldn't get information for file \"%s\" %s", path, tr_strerror(errno) );365 tr_err( _( "Couldn't get information for file \"%s\": %s" ), path, tr_strerror(errno) ); 366 366 return NULL; 367 367 } … … 369 369 if( ( sb.st_mode & S_IFMT ) != S_IFREG ) 370 370 { 371 tr_err( "Not a regular file (%s)", path );371 tr_err( _( "Not a regular file (%s)" ), path ); 372 372 return NULL; 373 373 } … … 377 377 if( !file ) 378 378 { 379 tr_err( "Couldn't open file \"%s\" %s", path, tr_strerror(errno) );379 tr_err( _( "Couldn't open file \"%s\": %s" ), path, tr_strerror(errno) ); 380 380 return NULL; 381 381 } … … 383 383 if( NULL == buf ) 384 384 { 385 tr_err( "Couldn't allocate memory (%"PRIu64" bytes)", 386 ( uint64_t )sb.st_size ); 385 tr_err( _( "Couldn't read file \"%s\": memory allocation failed" ) ); 387 386 fclose( file ); 387 return NULL; 388 388 } 389 389 fseek( file, 0, SEEK_SET ); 390 390 if( fread( buf, sb.st_size, 1, file ) != 1 ) 391 391 { 392 tr_err( "Error reading \"%s\" %s", path, tr_strerror(errno) );392 tr_err( _( "Couldn't read file \"%s\": %s" ), path, tr_strerror(errno) ); 393 393 free( buf ); 394 394 fclose( file ); … … 445 445 if( tr_mkdir( path, permissions ) ) { 446 446 const int err = errno; 447 tr_err( "Couldn't create directory %s (%s)", path, tr_strerror( err ) );447 tr_err( _( "Couldn't create \"%s\": %s" ), path, tr_strerror( err ) ); 448 448 tr_free( path ); 449 449 errno = err; … … 454 454 { 455 455 /* Node exists but isn't a folder */ 456 tr_err( "Remove %s, it's in the way.", path );456 tr_err( _( "Remove \"%s\", it's in the way." ), path ); 457 457 tr_free( path ); 458 458 errno = ENOTDIR; … … 520 520 { 521 521 case TR_OK: 522 return "No error";522 return _( "No error" ); 523 523 524 524 case TR_ERROR: 525 return "Generic error";525 return _( "Generic error" ); 526 526 case TR_ERROR_ASSERT: 527 return "Assert error";527 return _( "Assert error" ); 528 528 529 529 case TR_ERROR_IO_PARENT: 530 return "Download folder does not exist";530 return _( "Download folder does not exist" ); 531 531 case TR_ERROR_IO_PERMISSIONS: 532 return "Insufficient permissions";532 return _( "Insufficient permissions" ); 533 533 case TR_ERROR_IO_SPACE: 534 return "Insufficient free space";534 return _( "Insufficient free space" ); 535 535 case TR_ERROR_IO_FILE_TOO_BIG: 536 return "File too large";536 return _( "File too large" ); 537 537 case TR_ERROR_IO_OPEN_FILES: 538 return "Too many open files";538 return _( "Too many open files" ); 539 539 case TR_ERROR_IO_DUP_DOWNLOAD: 540 return "Already active transfer with same name and download folder";540 return _( "Already active transfer with same name and download folder" ); 541 541 case TR_ERROR_IO_OTHER: 542 return "Generic I/O error";542 return _( "Generic I/O error" ); 543 543 544 544 case TR_ERROR_TC_ERROR: 545 return "Tracker error";545 return _( "Tracker error" ); 546 546 case TR_ERROR_TC_WARNING: 547 return "Tracker warning";547 return _( "Tracker warning" ); 548 548 549 549 case TR_ERROR_PEER_MESSAGE: 550 return "Peer sent a bad message";550 return _( "Peer sent a bad message" ); 551 551 552 552 default: 553 return "Unknown error";553 return _( "Unknown error" ); 554 554 } 555 555 }
Note: See TracChangeset
for help on using the changeset viewer.