Changeset 5307


Ignore:
Timestamp:
Mar 19, 2008, 5:14:47 PM (14 years ago)
Author:
charles
Message:

(gtk) small string folding & i18n tweaks.

Location:
trunk/gtk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/gtk/actions.c

    r5298 r5307  
    3737#if !GTK_CHECK_VERSION(2,8,0)
    3838#define GTK_STOCK_INFO GTK_STOCK_PROPERTIES
     39#endif
     40
     41#if !GTK_CHECK_VERSION(2,10,0)
     42#define GTK_STOCK_SELECT_ALL NULL
    3943#endif
    4044
     
    114118    G_CALLBACK(action_cb) },
    115119  { "quit", GTK_STOCK_QUIT, N_("_Quit"), NULL, NULL, G_CALLBACK(action_cb) },
    116   { "select-all", NULL,
     120  { "select-all", GTK_STOCK_SELECT_ALL,
    117121    N_( "Select _All" ), "<control>A", NULL, G_CALLBACK(action_cb) },
    118122  { "unselect-all", NULL,
  • trunk/gtk/open-dialog.c

    r5302 r5307  
    202202    ++row;
    203203    col = 0;
    204     l = gtk_label_new_with_mnemonic( _( "Destination _folder:" ) );
     204    l = gtk_label_new_with_mnemonic( _( "_Destination folder:" ) );
    205205    gtk_misc_set_alignment( GTK_MISC( l ), 0.0f, 0.5f );
    206206    gtk_table_attach( GTK_TABLE( t ), l, col, col+1, row, row+1, GTK_FILL, 0, 0, 0 );
  • trunk/gtk/stats.c

    r5227 r5307  
    4848updateStats( gpointer gdata )
    4949{
     50    const char * fmt;
    5051    char buf[128];
    5152
     
    6061    setLabelFromRatio( ui->one_ratio_lb, one.ratio );
    6162
    62     g_snprintf( buf, sizeof( buf ), _( "Started %d times" ), (int)all.sessionCount );
     63    fmt = ngettext( "Started %'d time", "Started %'d times", (int)all.sessionCount );
     64    g_snprintf( buf, sizeof(buf), fmt, (int)all.sessionCount );
    6365    setLabel( ui->all_sessions_lb, buf );
    6466    setLabel( ui->all_up_lb, tr_strlsize( buf, all.uploadedBytes, sizeof(buf) ) );
  • trunk/gtk/tr-prefs.c

    r5295 r5307  
    253253
    254254        w = new_path_chooser_button( PREF_KEY_DIR_DEFAULT, core );
    255         hig_workarea_add_row( t, &row, _( "Default destination _folder:" ), w, NULL );
     255        hig_workarea_add_row( t, &row, _( "_Destination folder:" ), w, NULL );
    256256
    257257#ifdef HAVE_LIBNOTIFY
     
    340340        gtk_misc_set_alignment( GTK_MISC(l), 0.0f, 0.5f );
    341341        gtk_box_pack_start( GTK_BOX(h), l, FALSE, FALSE, 0 );
    342         hig_workarea_add_row( t, &row, _("Incoming TCP _port:"), h, w );
     342        hig_workarea_add_row( t, &row, _("Incoming _port:"), h, w );
    343343
    344344        g_object_set_data( G_OBJECT(l), "tr-port-spin", w2 );
  • trunk/gtk/util.c

    r5301 r5307  
    5959        g_strlcpy( buf, "\xE2\x88\x9E", buflen );
    6060    else if( ratio < 10.0 )
    61         g_snprintf( buf, buflen, "%.2f", ratio );
     61        g_snprintf( buf, buflen, "%'.2f", ratio );
    6262    else if( ratio < 100.0 )
    63         g_snprintf( buf, buflen, "%.1f", ratio );
     63        g_snprintf( buf, buflen, "%'.1f", ratio );
    6464    else
    65         g_snprintf( buf, buflen, "%.0f", ratio );
     65        g_snprintf( buf, buflen, "%'.0f", ratio );
    6666    return buf;
    6767}
     
    8484#else
    8585    else if( size < (guint64)KILOBYTE_FACTOR )
    86         g_snprintf( buf, buflen, ngettext("%u byte", "%u bytes", (guint)size), (guint)size );
     86        g_snprintf( buf, buflen, ngettext("%'u byte", "%'u bytes", (guint)size), (guint)size );
    8787    else {
    8888        gdouble displayed_size;
    8989        if (size < (guint64)MEGABYTE_FACTOR) {
    9090            displayed_size = (gdouble) size / KILOBYTE_FACTOR;
    91             g_snprintf( buf, buflen, _("%.1f KB"), displayed_size );
     91            g_snprintf( buf, buflen, _("%'.1f KB"), displayed_size );
    9292        } else if (size < (guint64)GIGABYTE_FACTOR) {
    9393            displayed_size = (gdouble) size / MEGABYTE_FACTOR;
    94             g_snprintf( buf, buflen, _("%.1f MB"), displayed_size );
     94            g_snprintf( buf, buflen, _("%'.1f MB"), displayed_size );
    9595        } else {
    9696            displayed_size = (gdouble) size / GIGABYTE_FACTOR;
    97             g_snprintf( buf, buflen, _("%.1f GB"), displayed_size );
     97            g_snprintf( buf, buflen, _("%'.1f GB"), displayed_size );
    9898        }
    9999    }
Note: See TracChangeset for help on using the changeset viewer.