Changeset 5208


Ignore:
Timestamp:
Mar 6, 2008, 9:59:00 PM (14 years ago)
Author:
charles
Message:

more i18n strings work

Location:
trunk
Files:
15 edited

Legend:

Unmodified
Added
Removed
  • trunk/daemon/misc.c

    r5151 r5208  
    134134    if( 0 > fd )
    135135    {
    136         errnomsg( "failed to open %s for writing", name );
     136        errnomsg( "Couldn't open \"%s\": %s", name, tr_strerror( errno ) );
    137137        return -1;
    138138    }
  • trunk/gtk/details.c

    r5157 r5208  
    658658****/
    659659
    660 static GtkWidget* info_page_new (tr_torrent * tor)
     660static GtkWidget*
     661info_page_new (tr_torrent * tor)
    661662{
    662663  int row = 0;
     
    664665  GtkWidget *l, *w, *fr;
    665666  char *pch;
    666   char *dname, *bname;
    667667  char sizeStr[128];
    668668  char buf[256];
     
    697697    hig_workarea_add_row (t, &row, name, l, NULL);
    698698
    699     g_snprintf (name, sizeof(name), namefmt, _("Secure"));
     699    g_snprintf (name, sizeof(name), namefmt, _("Privacy"));
    700700    pch = (info->isPrivate )
    701701      ? _("Private Torrent, PEX disabled")
     
    734734  hig_workarea_add_section_title (t, &row, _("Location"));
    735735
    736     g_snprintf (name, sizeof(name), namefmt, _("Downloaded data"));
     736    g_snprintf (name, sizeof(name), namefmt, _("Destination directory"));
    737737    l = gtk_label_new (tr_torrentGetFolder (tor));
    738738    gtk_label_set_ellipsize( GTK_LABEL( l ), PANGO_ELLIPSIZE_END );
    739739    hig_workarea_add_row (t, &row, name, l, NULL);
    740740
    741     g_snprintf (name, sizeof(name), namefmt, _("Torrent file path"));
    742     dname = g_path_get_dirname (info->torrent);
    743     l = gtk_label_new ( dname );
     741    g_snprintf (name, sizeof(name), namefmt, _("Torrent"));
     742    l = gtk_label_new ( info->torrent );
    744743    gtk_label_set_ellipsize( GTK_LABEL( l ), PANGO_ELLIPSIZE_END );
    745744    hig_workarea_add_row (t, &row, name, l, NULL);
    746     g_free (dname);
    747 
    748     g_snprintf (name, sizeof(name), namefmt, _("Torrent file name"));
    749     bname = g_path_get_basename (info->torrent);
    750     l = gtk_label_new (bname);
    751     gtk_label_set_ellipsize( GTK_LABEL( l ), PANGO_ELLIPSIZE_END );
    752     hig_workarea_add_row (t, &row, name, l, NULL);
    753     g_free (bname);
    754745
    755746  hig_workarea_finish (t, &row);
     
    987978  hig_workarea_add_section_title (t, &row, _("Speed Limits") );
    988979
    989     tb = gtk_check_button_new_with_mnemonic (_("Limit _download speed to:"));
     980    tb = gtk_check_button_new_with_mnemonic (_("Limit _download speed (KiB/s):"));
    990981    b = tr_torrentGetSpeedMode(tor,TR_DOWN) == TR_SPEEDLIMIT_SINGLE;
    991982    gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(tb), b );
     
    1004995    hig_workarea_add_row_w (t, &row, tb, hb, NULL);
    1005996
    1006     tb = gtk_check_button_new_with_mnemonic (_("Limit _upload speed to:"));
     997    tb = gtk_check_button_new_with_mnemonic (_("Limit _upload speed (KiB/s):"));
    1007998    b = tr_torrentGetSpeedMode(tor,TR_UP) == TR_SPEEDLIMIT_SINGLE;
    1008999    gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(tb), b );
  • trunk/gtk/dialogs.c

    r5207 r5208  
    135135    g_object_weak_ref( G_OBJECT( core ), promptdirnocore, stuff );
    136136
    137     wind =  gtk_file_chooser_dialog_new( _("Destination folder"), parent,
     137    wind =  gtk_file_chooser_dialog_new( _("Destination directory"), parent,
    138138                                         GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER,
    139139                                         GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
  • trunk/gtk/makemeta-ui.c

    r5207 r5208  
    251251        g_snprintf( name, sizeof(name), "%s:", _("File _Type"));
    252252        h = gtk_hbox_new( FALSE, GUI_PAD_SMALL );
    253         w = rb_dir = gtk_radio_button_new_with_mnemonic( NULL, _("Folder"));
     253        w = rb_dir = gtk_radio_button_new_with_mnemonic( NULL, _("Directory"));
    254254        gtk_box_pack_start ( GTK_BOX(h), w, FALSE, FALSE, 0 );
    255255        w = rb_file = gtk_radio_button_new_with_mnemonic_from_widget( GTK_RADIO_BUTTON(w), _("Single File") );
  • trunk/gtk/open-dialog.c

    r5207 r5208  
    196196    ++row;
    197197    col = 0;
    198     l = gtk_label_new_with_mnemonic( _( "Destination _folder:" ) );
     198    l = gtk_label_new_with_mnemonic( _( "Destination _directory:" ) );
    199199    gtk_misc_set_alignment( GTK_MISC( l ), 0.0f, 0.5f );
    200200    gtk_table_attach( GTK_TABLE( t ), l, col, col+1, row, row+1, GTK_FILL, 0, 0, 0 );
  • trunk/gtk/torrent-cell-renderer.c

    r5126 r5208  
    88 * the Transmission project.
    99 *
    10  * $Id:$
     10 * $Id$
    1111 */
    1212
     
    123123
    124124        case TR_STATUS_CHECK_WAIT:
    125             g_string_assign( gstr, _( "Waiting to Verify local data" ) );
     125            g_string_assign( gstr, _( "Waiting to verify local data" ) );
    126126            break;
    127127
  • trunk/gtk/tr-torrent.c

    r5122 r5208  
    288288        case TR_STATUS_DONE:
    289289            top = g_strdup_printf(
    290                 ngettext( "Uploading to %d of %d peer",
    291                           "Uploading to %d of %d peers", tpeers ),
     290                ngettext( "Uploading to %d of %d connected peer",
     291                          "Uploading to %d of %d connected peers", tpeers ),
    292292                          upeers, tpeers );
    293293            break;
     
    295295        case TR_STATUS_SEED:
    296296            top = g_strdup_printf(
    297                 ngettext( "Seeding to %d of %d peer",
    298                           "Seeding to %d of %d peers", tpeers ),
     297                ngettext( "Seeding to %d of %d connected peer",
     298                          "Seeding to %d of %d connected peers", tpeers ),
    299299                          upeers, tpeers );
    300300            break;
  • trunk/gtk/tr-window.c

    r5203 r5208  
    629629        tr_strlsize( up, stats.uploadedBytes, sizeof( up ) );
    630630        tr_strlsize( down, stats.downloadedBytes, sizeof( down ) );
    631         g_snprintf( buf, sizeof( buf ), _( "Down: %s  Up: %s" ), down, up );
     631        g_snprintf( buf, sizeof( buf ), _( "Down: %s, Up: %s" ), down, up );
    632632    } else if( !strcmp( pch, "total-transfer" ) ) {
    633633        tr_getCumulativeSessionStats( handle, &stats );
    634634        tr_strlsize( up, stats.uploadedBytes, sizeof( up ) );
    635635        tr_strlsize( down, stats.downloadedBytes, sizeof( down ) );
    636         g_snprintf( buf, sizeof( buf ), _( "Down: %s  Up: %s" ), down, up );
     636        g_snprintf( buf, sizeof( buf ), _( "Down: %s, Up: %s" ), down, up );
    637637    } else { /* default is total-ratio */
    638638        tr_getCumulativeSessionStats( handle, &stats );
  • trunk/libtransmission/fastresume.c

    r5193 r5208  
    4343
    4444#include <assert.h>
     45#include <errno.h>
    4546#include <stdio.h>
    4647#include <stdlib.h> /* calloc */
     
    187188    fastResumeFileName( path, sizeof path, tor, 1 );
    188189    file = fopen( path, "wb+" );
    189     if( NULL == file ) {
    190         tr_err( _( "Couldn't open \"%s\" for writing" ), path );
     190    if( !file ) {
     191        tr_err( _( "Couldn't open \"%s\": %s" ), path, tr_strerror( errno ) );
    191192        return;
    192193    }
  • trunk/libtransmission/natpmp.c

    r5193 r5208  
    3232#define COMMAND_WAIT_SECS 8
    3333
    34 #define KEY "Port Mapping (NAT-PMP): "
    35 
    3634typedef enum
    3735{
     
    6664{
    6765    if( ret==NATPMP_TRYAGAIN )
    68         tr_dbg( _( KEY "%s returned 'try again'" ), func );
     66        tr_dbg( _( "Port Mapping (NAT-PMP): %s returned 'try again'" ), func );
    6967    else if( ret >= 0 )
    70         tr_dbg( _( KEY "%s returned success (%d)" ), func, ret );
     68        tr_dbg( _( "Port Mapping (NAT-PMP): %s returned success (%d)" ), func, ret );
    7169    else
    72         tr_err( _( KEY "%s returned error %d, errno is %d (%s)" ), func, ret, errno, tr_strerror(errno) );
     70        tr_err( _( "Port Mapping (NAT-PMP): %s returned error %d, errno is %d (%s)" ), func, ret, errno, tr_strerror(errno) );
    7371}
    7472
     
    110108setErrorState( struct tr_natpmp * nat )
    111109{
    112     tr_err( _( KEY "If your router supports NAT-PMP, please make sure NAT-PMP is enabled!" ) );
    113     tr_err( _( KEY "NAT-PMP port forwarding unsuccessful, trying UPnP next" ) );
     110    tr_err( _( "Port Mapping (NAT-PMP): If your router supports NAT-PMP, please make sure NAT-PMP is enabled!" ) );
     111    tr_err( _( "Port Mapping (NAT-PMP): NAT-PMP port forwarding unsuccessful, trying UPnP next" ) );
    114112    nat->state = TR_NATPMP_ERR;
    115113}
     
    137135        logVal( "readnatpmpresponseorretry", val );
    138136        if( val >= 0 ) {
    139             tr_inf( _( KEY "found public address %s" ), inet_ntoa( response.publicaddress.addr ) );
     137            tr_inf( _( "Port Mapping (NAT-PMP): found public address %s" ), inet_ntoa( response.publicaddress.addr ) );
    140138            nat->state = TR_NATPMP_IDLE;
    141139        } else if( val != NATPMP_TRYAGAIN ) {
     
    164162        logVal( "readnatpmpresponseorretry", val );
    165163        if( val >= 0 ) {
    166             tr_inf( _( KEY "port %d has been unmapped." ), nat->port );
     164            tr_inf( _( "Port Mapping (NAT-PMP): port %d has been unmapped." ), nat->port );
    167165            nat->state = TR_NATPMP_IDLE;
    168166            nat->port = -1;
     
    200198            nat->renewTime = time( NULL ) + LIFETIME_SECS;
    201199            nat->port = resp.newportmapping.privateport;
    202             tr_inf( _( KEY "port %d mapped successfully" ), nat->port );
     200            tr_inf( _( "Port Mapping (NAT-PMP): port %d mapped successfully" ), nat->port );
    203201        } else if( val != NATPMP_TRYAGAIN ) {
    204202            setErrorState( nat );
  • trunk/libtransmission/net.c

    r5193 r5208  
    159159
    160160    if( ( s = createSocket( type, 1 ) ) < 0 )
    161     {
    162         tr_err( _( "Couldn't create socket of type %d" ), type );
    163161        return -1;
    164     }
    165162
    166163#ifdef SO_REUSEADDR
  • trunk/libtransmission/shared.c

    r5193 r5208  
    5858};
    5959
    60 #define NATKEY "Port Mapping: "
    61 
    6260/***
    6361****
     
    9088        status = tr_upnpPulse( s->upnp, port, isEnabled );
    9189    if( status != s->natStatus ) {
    92         tr_inf( _( NATKEY "mapping state changed from '%s' to '%s'" ), getNatStateStr(s->natStatus), getNatStateStr(status) );
     90        tr_inf( _( "Port Mapping: Mapping state changed from '%s' to '%s'" ), getNatStateStr(s->natStatus), getNatStateStr(status) );
    9391        s->natStatus = status;
    9492    }
     
    10098    if( s->bindSocket >= 0 && ( s->bindPort != s->publicPort ) )
    10199    {
    102         tr_inf( _( NATKEY "closing port %d" ), s->bindPort );
     100        tr_inf( _( "Port Mapping: Closing port %d" ), s->bindPort );
    103101        tr_netClose( s->bindSocket );
    104102        s->bindSocket = -1;
     
    111109        socket = tr_netBindTCP( s->publicPort );
    112110        if( socket >= 0 ) {
    113             tr_inf( _( NATKEY "opened port %d to listen for incoming peer connections" ), s->publicPort );
     111            tr_inf( _( "Port Mapping: Opened port %d to listen for incoming peer connections" ), s->publicPort );
    114112            s->bindPort = s->publicPort;
    115113            s->bindSocket = socket;
    116114            listen( s->bindSocket, 5 );
    117115        } else {
    118             tr_err( _( NATKEY "unable to open port %d to listen for incoming peer connections (errno is %d - %s)" ),
     116            tr_err( _( "Port Mapping: Unable to open port %d to listen for incoming peer connections (errno is %d - %s)" ),
    119117                    s->publicPort, errno, tr_strerror(errno) );
    120118            s->bindPort = -1;
     
    154152    else if( ( shared->natStatus == TR_NAT_TRAVERSAL_ERROR ) || ( shared->natStatus == TR_NAT_TRAVERSAL_UNMAPPED ) )
    155153    {
    156         tr_dbg( NATKEY "port mapping shut down" );
     154        tr_dbg( "Port Mapping: Port mapping shut down" );
    157155        shared->h->shared = NULL;
    158156        tr_netClose( shared->bindSocket );
  • trunk/libtransmission/upnp.c

    r5193 r5208  
    2424#include "utils.h"
    2525#include "upnp.h"
    26 
    27 #define KEY "Port Mapping (UPNP): "
    2826
    2927typedef enum
     
    8987        devlist = upnpDiscover( 2000, NULL, NULL );
    9088        if( devlist == NULL ) {
    91             tr_err( _( KEY "upnpDiscover returned NULL (errno %d - %s)" ), errno, tr_strerror(errno) );
     89            tr_err( _( "Port Mapping (UPnP): upnpDiscover returned NULL (errno %d - %s)" ), errno, tr_strerror(errno) );
    9290        }
    9391        errno = 0;
    9492        if( UPNP_GetValidIGD( devlist, &handle->urls, &handle->data, handle->lanaddr, sizeof(handle->lanaddr))) {
    95             tr_inf( _( KEY "Found Internet Gateway Device '%s'" ), handle->urls.controlURL );
    96             tr_inf( _( KEY "Local LAN IP Address is '%s'" ), handle->lanaddr );
     93            tr_inf( _( "Port Mapping (UPnP): Found Internet Gateway Device '%s'" ), handle->urls.controlURL );
     94            tr_inf( _( "Port Mapping (UPnP): Local LAN IP Address is '%s'" ), handle->lanaddr );
    9795            handle->state = TR_UPNP_IDLE;
    9896            handle->hasDiscovered = 1;
    9997        } else {
    10098            handle->state = TR_UPNP_ERR;
    101             tr_err( _( KEY "UPNP_GetValidIGD failed.  (errno %d - %s)" ), errno, tr_strerror(errno) );
    102             tr_err( _( KEY "If your router supports UPnP, please make sure UPnP is enabled!" ) );
     99            tr_err( _( "Port Mapping (UPnP): UPNP_GetValidIGD failed.  (errno %d - %s)" ), errno, tr_strerror(errno) );
     100            tr_err( _( "Port Mapping (UPnP): If your router supports UPnP, please make sure UPnP is enabled!" ) );
    103101        }
    104102        freeUPNPDevlist( devlist );
     
    118116                                handle->data.servicetype,
    119117                                portStr, "TCP" );
    120         tr_dbg( KEY "Stopping port forwarding of '%s', service '%s'",
     118        tr_dbg( "Port Mapping (UPnP): Stopping port forwarding of '%s', service '%s'",
    121119                handle->urls.controlURL, handle->data.servicetype );
    122120        handle->isMapped = 0;
     
    147145            handle->isMapped = !err;
    148146        }
    149         tr_inf( _( KEY "Port forwarding via '%s', service '%s'.  (local address: %s:%d)" ),
     147        tr_inf( _( "Port Mapping (UPnP): Port forwarding via '%s', service '%s'.  (local address: %s:%d)" ),
    150148                handle->urls.controlURL, handle->data.servicetype, handle->lanaddr, port );
    151149        if( handle->isMapped ) {
    152             tr_inf( _( KEY "Port forwarding successful!" ) );
     150            tr_inf( _( "Port Mapping (UPnP): Port forwarding successful!" ) );
    153151            handle->port = port;
    154152            handle->state = TR_UPNP_IDLE;
    155153        } else {
    156             tr_err( _( KEY "Port forwarding failed with err %d (%d - %s)" ), err, errno, tr_strerror(errno) );
    157             tr_err( _( KEY "If your router supports UPnP, please make sure UPnP is enabled!" ) );
     154            tr_err( _( "Port Mapping (UPnP): Port forwarding failed with err %d (%d - %s)" ), err, errno, tr_strerror(errno) );
     155            tr_err( _( "Port Mapping (UPnP): If your router supports UPnP, please make sure UPnP is enabled!" ) );
    158156            handle->port = -1;
    159157            handle->state = TR_UPNP_ERR;
  • trunk/libtransmission/utils.c

    r5194 r5208  
    383383    if( NULL == buf )
    384384    {
    385         tr_err( _( "Couldn't read file \"%s\": memory allocation failed" ) );
     385        tr_err( _( "Couldn't read file \"%s\": %s" ), path, _( "Memory allocation failed" ) );
    386386        fclose( file );
    387387        return NULL;
     
    528528
    529529        case TR_ERROR_IO_PARENT:
    530             return _( "Download folder doesn't exist" );
     530            return _( "Download directory doesn't exist" );
    531531        case TR_ERROR_IO_PERMISSIONS:
    532532            return tr_strerror( EACCES );
  • trunk/libtransmission/verify.c

    r5193 r5208  
    158158        struct verify_node * node;
    159159
    160         tr_inf( _( "Queueing %s to verify %d local file pieces" ), tor->info.name, uncheckedCount );
     160        tr_inf( _( "Queueing \"%s\" for verification" ), tor->info.name );
    161161
    162162        node = tr_new( struct verify_node, 1 );
Note: See TracChangeset for help on using the changeset viewer.