Skip to content

Commit

Permalink
Applied i18n for some strings
Browse files Browse the repository at this point in the history
  • Loading branch information
eribertomota committed Sep 10, 2017
1 parent 8a6d8b7 commit 7026a2d
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 11 deletions.
12 changes: 6 additions & 6 deletions src/axel.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
Copyright 2001-2007 Wilmer van der Gaast
Copyright 2007-2009 Y Giridhar Appaji Nag
Copyright 2008-2009 Philipp Hagemeister
Copyright 2015-2016 Joao Eriberto Mota Filho
Copyright 2015-2017 Joao Eriberto Mota Filho
Copyright 2016 Denis Denisov
Copyright 2016 Ivan Gimenez
Copyright 2016 Sjjad Hashemian
Expand Down Expand Up @@ -249,7 +249,7 @@ int axel_open( axel_t *axel )
nread = read( fd, &axel->conf->num_connections, sizeof( axel->conf->num_connections ) );
if( nread != sizeof( axel->conf->num_connections ) )
{
printf( "%s.st: Error, truncated state file\n",
printf( _("%s.st: Error, truncated state file\n"),
axel->filename );
close( fd );
return( 0 );
Expand All @@ -261,7 +261,7 @@ int axel_open( axel_t *axel )
/* FIXME this might be wrong, the file may have been
* truncated, we need another way to check. */
#ifdef DEBUG
printf( "State file has old format.\n" );
printf( _("State file has old format.\n") );
#endif
old_format = 1;
}
Expand Down Expand Up @@ -355,7 +355,7 @@ void reactivate_connection(axel_t *axel, int thread)
if(max_remaining >= 100 * 1024 && idx != -1)
{
#ifdef DEBUG
printf("\nReactivate connection %d\n",thread);
printf( _("\nReactivate connection %d\n"),thread);
#endif
axel->conn[thread].lastbyte = axel->conn[idx].lastbyte;
axel->conn[idx].lastbyte = axel->conn[idx].currentbyte + max_remaining/2;
Expand Down Expand Up @@ -808,13 +808,13 @@ static void axel_divide( axel_t *axel )
for( i = 1; i < axel->conf->num_connections; i ++ )
{
#ifdef DEBUG
printf( "Downloading %lld-%lld using conn. %i\n", axel->conn[i-1].currentbyte, axel->conn[i-1].lastbyte, i - 1 );
printf( _("Downloading %lld-%lld using conn. %i\n"), axel->conn[i-1].currentbyte, axel->conn[i-1].lastbyte, i - 1 );
#endif
axel->conn[i].currentbyte = axel->conn[i-1].lastbyte + 1;
axel->conn[i].lastbyte = axel->conn[i].currentbyte + axel->size / axel->conf->num_connections;
}
axel->conn[axel->conf->num_connections-1].lastbyte = axel->size - 1;
#ifdef DEBUG
printf( "Downloading %lld-%lld using conn. %i\n", axel->conn[i-1].currentbyte, axel->conn[i-1].lastbyte, i - 1 );
printf( _("Downloading %lld-%lld using conn. %i\n"), axel->conn[i-1].currentbyte, axel->conn[i-1].lastbyte, i - 1 );
#endif
}
9 changes: 5 additions & 4 deletions src/search.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
Copyright 2016 Stephen Thirlwall
Copyright 2017 Antonio Quartulli
Copyright 2017 Ismael Luceno
Copyright 2017 Joao Eriberto Mota Filho
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
Expand Down Expand Up @@ -54,7 +55,7 @@ int main( int argc, char *argv[] )

if( argc != 2 )
{
fprintf( stderr, "Incorrect amount of arguments\n" );
fprintf( stderr, _("Incorrect amount of arguments\n") );
return( 1 );
}

Expand All @@ -68,16 +69,16 @@ int main( int argc, char *argv[] )
i = search_makelist( res, argv[1] );
if( i == -1 )
{
fprintf( stderr, "File not found\n" );
fprintf( stderr, _("File not found\n") );
return( 1 );
}
num_mirrors = search_getspeeds( res, i );
if ( num_mirrors < 0 )
{
fprintf( stderr, "Speed testing failed\n" );
fprintf( stderr, _("Speed testing failed\n") );
return( 1 );
}
printf( "%i usable mirrors:\n", num_mirrors );
printf( _("%i usable mirrors:\n"), num_mirrors );
search_sortlist( res, i );
for( j = 0; j < i; j ++ )
printf( "%-70.70s %5i\n", res[j].url, res[j].speed );
Expand Down
2 changes: 1 addition & 1 deletion src/text.c
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ int main( int argc, char *argv[] )
{
printf( _("%i usable servers found, will use these URLs:\n"), j );
j = min( j, conf->search_top );
printf( "%-60s %15s\n", "URL", "Speed" );
printf( "%-60s %15s\n", "URL", _("Speed") );
for( i = 0; i < j; i ++ )
printf( "%-70.70s %5i\n", search[i].url, search[i].speed );
printf( "\n" );
Expand Down

0 comments on commit 7026a2d

Please sign in to comment.