Changeset 5221


Ignore:
Timestamp:
Mar 7, 2008, 8:48:36 PM (14 years ago)
Author:
charles
Message:

lots more i18n string work -- making strings more consistent, folding redundant strings together, etc.

Location:
trunk
Files:
19 edited

Legend:

Unmodified
Added
Removed
  • trunk/gtk/actions.c

    r5216 r5221  
    102102  { "help-menu", NULL, N_("_Help"), NULL, NULL, NULL },
    103103  { "open-torrent-toolbar", GTK_STOCK_OPEN, NULL, NULL, N_("Open a torrent"), G_CALLBACK(action_cb) },
    104   { "open-torrent-menu", GTK_STOCK_OPEN, N_("_Open..."), NULL,
    105     N_("Open an existing torrent"), G_CALLBACK(action_cb) },
     104  { "open-torrent-menu", GTK_STOCK_OPEN, N_("_Open..."), NULL, N_("Open a torrent"), G_CALLBACK(action_cb) },
    106105  { "start-torrent", GTK_STOCK_MEDIA_PLAY,
    107106    N_("_Start"), "<control>S", NULL, G_CALLBACK(action_cb) },
  • trunk/gtk/details.c

    r5209 r5221  
    720720
    721721  hig_workarea_add_section_divider (t, &row);
    722   hig_workarea_add_section_title (t, &row, _("Created by"));
     722  hig_workarea_add_section_title (t, &row, _("Origins"));
    723723 
    724724    g_snprintf (name, sizeof(name), namefmt, _("Creator"));
    725     l = gtk_label_new (*info->creator ? info->creator : _("N/A"));
     725    l = gtk_label_new (*info->creator ? info->creator : _("Unknown"));
    726726    hig_workarea_add_row (t, &row, name, l, NULL);
    727727
     
    740740    hig_workarea_add_row (t, &row, name, l, NULL);
    741741
    742     g_snprintf (name, sizeof(name), namefmt, _("Torrent"));
     742    g_snprintf (name, sizeof(name), namefmt, _("Torrent file"));
    743743    l = gtk_label_new ( info->torrent );
    744744    gtk_label_set_ellipsize( GTK_LABEL( l ), PANGO_ELLIPSIZE_END );
     
    935935{
    936936  tr_torrent * tor = tr_torrent_handle (gtor);
    937   int KiB_sec = gtk_spin_button_get_value_as_int (spin);
    938   tr_torrentSetSpeedLimit( tor, up_or_down, KiB_sec );
     937  int kb_sec = gtk_spin_button_get_value_as_int (spin);
     938  tr_torrentSetSpeedLimit( tor, up_or_down, kb_sec );
    939939}
    940940static void
     
    979979  hig_workarea_add_section_title (t, &row, _("Speed Limits") );
    980980
    981     tb = gtk_check_button_new_with_mnemonic (_("Limit _download speed (KiB/s):"));
     981    tb = gtk_check_button_new_with_mnemonic (_("Limit _download speed (KB/s):"));
    982982    b = tr_torrentGetSpeedMode(tor,TR_DOWN) == TR_SPEEDLIMIT_SINGLE;
    983983    gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(tb), b );
     
    992992    sensitize_from_check_cb (GTK_TOGGLE_BUTTON(tb), w);
    993993    gtk_box_pack_start ( GTK_BOX (hb), GTK_WIDGET (w), FALSE, TRUE, 0);
    994     mis = gtk_label_new (_("KiB/s"));
     994    mis = gtk_label_new (_("KB/s"));
    995995    gtk_box_pack_start ( GTK_BOX (hb), GTK_WIDGET (mis), FALSE, TRUE, 0);
    996996    hig_workarea_add_row_w (t, &row, tb, hb, NULL);
    997997
    998     tb = gtk_check_button_new_with_mnemonic (_("Limit _upload speed (KiB/s):"));
     998    tb = gtk_check_button_new_with_mnemonic (_("Limit _upload speed (KB/s):"));
    999999    b = tr_torrentGetSpeedMode(tor,TR_UP) == TR_SPEEDLIMIT_SINGLE;
    10001000    gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(tb), b );
     
    10091009    sensitize_from_check_cb (GTK_TOGGLE_BUTTON(tb), w);
    10101010    gtk_box_pack_start ( GTK_BOX (hb), GTK_WIDGET (w), FALSE, TRUE, 0);
    1011     mis = gtk_label_new (_("KiB/s"));
     1011    mis = gtk_label_new (_("KB/s"));
    10121012    gtk_box_pack_start ( GTK_BOX (hb), GTK_WIDGET (mis), FALSE, TRUE, 0);   
    10131013    hig_workarea_add_row_w (t, &row, tb, hb, NULL);
     
    11271127refresh_countdown_lb( GtkWidget * l, time_t t )
    11281128{
    1129     const char * n_a = _( "N/A" );
    11301129    const time_t now = time( NULL );
    1131     char buf[1024];
    1132 
    1133     if( !t )
    1134         gtk_label_set_text( GTK_LABEL( l ), n_a );
    1135     else if( t < now )
    1136         gtk_label_set_text( GTK_LABEL( l ), n_a );
     1130
     1131    if( !t || ( t < now ) )
     1132        gtk_label_set_text( GTK_LABEL( l ), _( "Never" ) );
    11371133    else {
     1134        char buf[1024];
    11381135        const int seconds = t - now;
    11391136        tr_strltime( buf, seconds, sizeof( buf ) );
  • trunk/gtk/dialogs.c

    r5218 r5221  
    156156        w = gtk_check_button_new_with_mnemonic( _( "_Delete original torrent file" ) );
    157157        g_signal_connect( w, "toggled", G_CALLBACK( deleteToggled ), ctor );
    158         if( tr_ctorGetDeleteSource( ctor, &flag ) )
    159             g_assert_not_reached( );
    160158        gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( w ), flag );
    161159        gtk_box_pack_start( GTK_BOX( v ), w, FALSE, FALSE, 0 );
  • trunk/gtk/main.c

    r5216 r5221  
    272272          _("Start with all torrents paused"), NULL },
    273273        { "quit", 'q', 0, G_OPTION_ARG_NONE, &sendquit,
    274           _( "Request that the running instance quit"), NULL },
     274          _( "Ask the running instance to quit"), NULL },
    275275#ifdef STATUS_ICON_SUPPORTED
    276276        { "minimized", 'm', 0, G_OPTION_ARG_NONE, &startminimized,
  • trunk/gtk/makemeta-ui.c

    r5208 r5221  
    9494        {
    9595            const char * reason = ui->builder->abortFlag
    96                 ? _("Torrent creation cancelled.")
    97                 : _("Torrent creation failed.");
     96                ? _("Torrent creation cancelled")
     97                : _("Torrent creation failed");
    9898
    9999            gtk_progress_bar_set_text( p, reason );
     
    270270        hig_workarea_add_row (t, &row, name, w, NULL);
    271271
    272         g_snprintf( name, sizeof(name), "<i>%s</i>", _("No Files Selected"));
     272        g_snprintf( name, sizeof(name), "<i>%s</i>", _("No files selected"));
    273273        h = gtk_hbox_new( FALSE, GUI_PAD_SMALL );
    274274        w = ui->size_lb = gtk_label_new (NULL);
     
    306306   
    307307        ui->progressbar = gtk_progress_bar_new( );
    308         gtk_progress_bar_set_text( GTK_PROGRESS_BAR( ui->progressbar), _( "No Files Selected" ) );
     308        gtk_progress_bar_set_text( GTK_PROGRESS_BAR( ui->progressbar), _( "No files selected" ) );
    309309        gtk_container_add( GTK_CONTAINER( w ), ui->progressbar );
    310310
  • trunk/gtk/msgwin.c

    r5159 r5221  
    158158      {
    159159          errmsg( GTK_WINDOW(d),
    160                   _("Error writing to \"%s\": %s"),
     160                  _("Couldn't write file \"%s\": %s"),
    161161                  filename, g_strerror( errno ) );
    162162      }
     
    172172              if( len > fwrite( buf, 1, len, fp ) ) {
    173173                  errmsg( GTK_WINDOW( d ),
    174                           _("Error writing to \"%s\": %s"),
     174                          _("Couldn't write file \"%s\": %s"),
    175175                          filename, g_strerror( errno ) );
    176176              }
     
    261261  gtk_toolbar_append_element(GTK_TOOLBAR(toolbar),
    262262                             GTK_TOOLBAR_CHILD_WIDGET, gtk_label_new(_("Level ")),
    263                              NULL, _("Select the debug filter level."),
     263                             NULL, _("Set the verbosity level"),
    264264                             NULL, NULL, NULL, NULL);
    265265
  • trunk/gtk/open-dialog.c

    r5208 r5221  
    224224    w = gtk_check_button_new_with_mnemonic( _( "_Delete original torrent file" ) );
    225225    data->delete_check = GTK_TOGGLE_BUTTON( w );
    226     if( tr_ctorGetDeleteSource( ctor, &flag ) )
    227         g_assert_not_reached( );
    228226    gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( w ), flag );
    229227    gtk_table_attach( GTK_TABLE( t ), w, col, col+2, row, row+1, GTK_FILL, 0, 0, 0 );
  • trunk/gtk/tr-prefs.c

    r5217 r5221  
    286286    hig_workarea_add_section_title (t, &row, _("Bandwidth"));
    287287
    288         s = _("Limit _upload speed (KiB/s):");
     288        s = _("Limit _upload speed (KB/s):");
    289289        w = new_check_button( s, PREF_KEY_UL_LIMIT_ENABLED, core );
    290290        w2 = new_spin_button( PREF_KEY_UL_LIMIT, core, 0, INT_MAX, 5 );
     
    293293        hig_workarea_add_row_w( t, &row, w, w2, NULL );
    294294
    295         s = _("Limit _download speed (KiB/s):");
     295        s = _("Limit _download speed (KB/s):");
    296296        w = new_check_button( s, PREF_KEY_DL_LIMIT_ENABLED, core );
    297297        w2 = new_spin_button( PREF_KEY_DL_LIMIT, core, 0, INT_MAX, 5 );
  • trunk/gtk/tr-window.c

    r5208 r5221  
    524524    h = p->status = gtk_hbox_new( FALSE, GUI_PAD );
    525525    gtk_container_set_border_width( GTK_CONTAINER( h ), GUI_PAD );
    526     w = p->gutter_lb = gtk_label_new( "N transfers" );
     526    w = p->gutter_lb = gtk_label_new( "N Torrents" );
    527527    gtk_box_pack_start( GTK_BOX(h), w, 0, 0, 0 );
    528528    w = p->ul_lb = gtk_label_new( NULL );
     
    598598
    599599        if( torrentCount != visibleCount )
    600             g_snprintf( buf, sizeof( buf ), ngettext( "%d of %d Transfer",
    601                                                       "%d of %d Transfers",
     600            g_snprintf( buf, sizeof( buf ), ngettext( "%d of %d Torrent",
     601                                                      "%d of %d Torrents",
    602602                                                      torrentCount ),
    603603                                            visibleCount, torrentCount );
    604604        else
    605             g_snprintf( buf, sizeof( buf ), ngettext( "%d Transfer",
    606                                                       "%d Transfers",
     605            g_snprintf( buf, sizeof( buf ), ngettext( "%d Torrent",
     606                                                      "%d Torrents",
    607607                                                      torrentCount ),
    608608                                            torrentCount );
  • trunk/gtk/util.c

    r5220 r5221  
    9999
    100100char*
    101 tr_strlspeed( char * buf, double KiBps, size_t buflen )
    102 {
    103     const double speed = KiBps;
     101tr_strlspeed( char * buf, double kb_sec, size_t buflen )
     102{
     103    const double speed = kb_sec;
    104104
    105105    if ( speed < 1000.0 ) /* 0.0 KB to 999.9 KB */
  • trunk/libtransmission/bencode.c

    r5198 r5221  
    670670            default:
    671671                /* did caller give us an uninitialized val? */
    672                 tr_err( _( "Invalid benc type %d" ), val->type );
     672                tr_err( _( "Invalid metadata" ) );
    673673                break;
    674674        }
  • trunk/libtransmission/fastresume.c

    r5208 r5221  
    325325    fclose( file );
    326326
    327     /*tr_dbg( "Wrote resume file for '%s'", tor->info.name );*/
     327    /*tr_dbg( "Wrote resume file for \"%s\"", tor->info.name );*/
    328328}
    329329
     
    420420            else {
    421421                tr_torrentSetFileChecked( tor, i, FALSE );
    422                 tr_dbg( _( "File '%s' recheck needed" ), tor->info.files[i].name );
     422                tr_dbg( _( "Torrent \"%s\" needs to be verified" ), tor->info.files[i].name );
    423423            }
    424424        }
     
    543543        }
    544544
    545         tr_dbg( _( "found %i peers in resume file" ), count );
     545        tr_dbg( _( "Fead %i peers from resume file" ), count );
    546546        ret = TR_FR_PEERS;
    547547    }
     
    632632
    633633    if( !buf )
    634         tr_inf( _( "Couldn't read resume file for '%s'" ), tor->info.name );
     634        tr_inf( _( "Couldn't read resume file for \"%s\"" ), tor->info.name );
    635635    else {
    636636        const uint8_t * walk = buf;
     
    642642                ret |= parseVersion1 ( tor, walk, end, fieldsToLoad );
    643643            else
    644                 tr_inf( _( "Unsupported resume file %d for '%s'" ), version, tor->info.name );
     644                tr_inf( _( "Skipping invalid resume file for \"%s\"" ), tor->info.name );
    645645        }
    646646
  • trunk/libtransmission/makemeta.c

    r5193 r5221  
    5757    i = stat( buf, &sb );
    5858    if( i ) {
    59         tr_err( _( "makemeta couldn't stat \"%s\"; skipping. (%s)" ), buf, tr_strerror(errno));
     59        tr_err( _( "Torrent Creator is skipping file \"%s\": %s" ), buf, tr_strerror(errno));
    6060        return list;
    6161    }
  • trunk/libtransmission/metainfo.c

    r5209 r5221  
    189189    else
    190190    {
    191         tr_err( _( "info dictionary not found!" ) );
     191        tr_err( _( "Missing metadata entry \"%s\"" ), "info" );
    192192        return TR_EINVALID;
    193193    }
     
    275275    }
    276276
    277     if( !inf->fileCount )
    278     {
    279         tr_err( _( "Torrent has no files." ) );
    280         goto fail;
    281     }
    282 
    283     if( !inf->totalSize )
    284     {
    285         tr_err( _( "Torrent is zero bytes long." ) );
     277    if( !inf->fileCount || !inf->totalSize )
     278    {
     279        tr_err( _( "Torrent is empty" ) );
    286280        goto fail;
    287281    }
     
    292286        ( inf->totalSize + inf->pieceSize - 1 ) / inf->pieceSize )
    293287    {
    294         tr_err( _( "Size of hashes and files don't match" ) );
     288        tr_err( _( "Torrent is corrupt" ) ); /* size of hashes and files don't match */
    295289        goto fail;
    296290    }
     
    473467        if( 0 == inf->trackerTiers )
    474468        {
    475             tr_inf( _( "Incomplete benc entry \"%s\"" ), "announce-list" );
     469            tr_inf( _( "Invalid metadata entry \"%s\"" ), "announce-list" );
    476470            free( inf->trackerList );
    477471            inf->trackerList = NULL;
     
    714708    else
    715709    {
    716         tr_err( _( "Invalid or missing benc entries \"length\" and \"files\"" ) );
     710        tr_err( _( "Invalid or missing metadata entries \"length\" and \"files\"" ) );
    717711    }
    718712
  • trunk/libtransmission/natpmp.c

    r5209 r5221  
    6666{
    6767    if( ret==NATPMP_TRYAGAIN )
    68         tr_dbg( _( "%s: %s returned 'try again'" ), getKey(), func );
     68        tr_dbg( _( "%s: %s responded 'try again'" ), getKey(), func );
    6969    else if( ret >= 0 )
    70         tr_dbg( _( "%s: %s returned success (%d)" ), getKey(), func, ret );
     70        tr_dbg( _( "%s: %s succeeded (%d)" ), getKey(), func, ret );
    7171    else
    72         tr_err( _( "%s: %s returned error %d, errno is %d (%s)" ), getKey(), func, ret, errno, tr_strerror(errno) );
     72        tr_err( _( "%s: %s failed (%d): %s (%d)" ), getKey(), func, ret, tr_strerror(errno), errno );
    7373}
    7474
     
    164164        logVal( "readnatpmpresponseorretry", val );
    165165        if( val >= 0 ) {
    166             tr_inf( _( "%s: port %d has been unmapped." ), getKey(), nat->port );
     166            tr_inf( _( "%s: port %d has been unmapped" ), getKey(), nat->port );
    167167            nat->state = TR_NATPMP_IDLE;
    168168            nat->port = -1;
  • trunk/libtransmission/torrent.c

    r5204 r5221  
    156156
    157157        case TR_TRACKER_WARNING:
    158             tr_err( _( "Tracker: Warning - %s" ), event->text );
     158            tr_err( _( "Tracker warning: %s" ), event->text );
    159159            tor->error = TR_ERROR_TC_WARNING;
    160160            strlcpy( tor->errorString, event->text, sizeof(tor->errorString) );
     
    162162
    163163        case TR_TRACKER_ERROR:
    164             tr_err( _( "Tracker: Error - %s" ), event->text );
     164            tr_err( _( "Tracker error: %s" ), event->text );
    165165            tor->error = TR_ERROR_TC_ERROR;
    166166            strlcpy( tor->errorString, event->text, sizeof(tor->errorString) );
  • trunk/libtransmission/upnp.c

    r5209 r5221  
    9494        if( UPNP_GetValidIGD( devlist, &handle->urls, &handle->data, handle->lanaddr, sizeof(handle->lanaddr))) {
    9595            tr_inf( _( "%s: Found Internet Gateway Device '%s'" ), getKey(), handle->urls.controlURL );
    96             tr_inf( _( "%s: Local LAN IP Address is '%s'" ), getKey(), handle->lanaddr );
     96            tr_inf( _( "%s: Local Address is '%s'" ), getKey(), handle->lanaddr );
    9797            handle->state = TR_UPNP_IDLE;
    9898            handle->hasDiscovered = 1;
    9999        } else {
    100100            handle->state = TR_UPNP_ERR;
    101             tr_err( _( "%s: UPNP_GetValidIGD failed. (errno %d - %s)" ), getKey(), errno, tr_strerror(errno) );
     101            tr_err( _( "%s: UPNP_GetValidIGD failed (errno %d - %s)" ), getKey(), errno, tr_strerror(errno) );
    102102            tr_err( _( "%s: If your router supports UPnP, please make sure UPnP is enabled!" ), getKey() );
    103103        }
     
    154154            handle->state = TR_UPNP_IDLE;
    155155        } else {
    156             tr_err( _( "%s: Port forwarding failed with err %d (%d - %s)" ), getKey(), err, errno, tr_strerror(errno) );
     156            tr_err( _( "%s: Port forwarding failed with error %d (%d - %s)" ), getKey(), err, errno, tr_strerror(errno) );
    157157            tr_err( _( "%s: If your router supports UPnP, please make sure UPnP is enabled!" ), getKey() );
    158158            handle->port = -1;
  • trunk/libtransmission/utils.c

    r5209 r5221  
    363363    if( stat( path, &sb ) )
    364364    {
    365         tr_err( _( "Couldn't get information for file \"%s\": %s" ), path, tr_strerror(errno) );
     365        tr_err( _( "Couldn't read file \"%s\": %s" ), path, tr_strerror(errno) );
    366366        return NULL;
    367367    }
     
    369369    if( ( sb.st_mode & S_IFMT ) != S_IFREG )
    370370    {
    371         tr_err( _( "Not a regular file (%s)" ), path );
     371        tr_err( _( "Couldn't read file \"%s\": %s" ), path, _( "Not a regular file" ) );
    372372        return NULL;
    373373    }
     
    377377    if( !file )
    378378    {
    379         tr_err( _( "Couldn't open \"%s\": %s" ), path, tr_strerror(errno) );
     379        tr_err( _( "Couldn't read file \"%s\": %s" ), path, tr_strerror(errno) );
    380380        return NULL;
    381381    }
     
    454454        {
    455455            /* Node exists but isn't a folder */
    456             tr_err( _( "Remove \"%s\", it's in the way." ), path );
     456            char buf[MAX_PATH_LENGTH];
     457            snprintf( buf, sizeof( buf ), _( "File \"%s\" is in the way" ), path );
     458            tr_err( _( "Couldn't create \"%s\": %s" ), path_in, buf );
    457459            tr_free( path );
    458460            errno = ENOTDIR;
     
    840842        size_t n = siz;
    841843
     844        assert( s != NULL );
     845        assert( d != NULL );
     846
    842847        /* Copy as many bytes as will fit */
    843848        if (n != 0) {
  • trunk/libtransmission/verify.c

    r5208 r5221  
    126126        tor->verifyState = TR_VERIFY_NOW;
    127127
    128         tr_inf( _( "Verifying some pieces of \"%s\"" ), tor->info.name );
     128        tr_inf( _( "Verifying torrent \"%s\"" ), tor->info.name );
    129129        for( i=0; i<tor->info.fileCount && !stopCurrent; ++i )
    130130            checkFile( tor, i, &stopCurrent );
Note: See TracChangeset for help on using the changeset viewer.