Changeset 13284


Ignore:
Timestamp:
Apr 13, 2012, 2:49:34 PM (10 years ago)
Author:
jordan
Message:

(trunk, gtk) fix #4867 'Some strings are not translated in Transmission in Ubuntu 12.04'

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gtk/filter.c

    r13192 r13284  
    690690    struct {
    691691        int type;
     692        const char * context;
    692693        const char * name;
    693694        const char * stock_id;
    694695    } types[] = {
    695         { ACTIVITY_FILTER_ALL, N_( "All" ), NULL },
    696         { ACTIVITY_FILTER_SEPARATOR, NULL, NULL },
    697         { ACTIVITY_FILTER_ACTIVE, N_( "Active" ), GTK_STOCK_EXECUTE },
    698         { ACTIVITY_FILTER_DOWNLOADING, NC_( "Verb", "Downloading" ), GTK_STOCK_GO_DOWN },
    699         { ACTIVITY_FILTER_SEEDING, NC_( "Verb", "Seeding" ), GTK_STOCK_GO_UP },
    700         { ACTIVITY_FILTER_PAUSED, N_( "Paused" ), GTK_STOCK_MEDIA_PAUSE },
    701         { ACTIVITY_FILTER_FINISHED, N_( "Finished" ), NULL },
    702         { ACTIVITY_FILTER_VERIFYING, NC_( "Verb", "Verifying" ), GTK_STOCK_REFRESH },
    703         { ACTIVITY_FILTER_ERROR, N_( "Error" ), GTK_STOCK_DIALOG_ERROR }
     696        { ACTIVITY_FILTER_ALL, NULL, N_( "All" ), NULL },
     697        { ACTIVITY_FILTER_SEPARATOR, NULL, NULL, NULL },
     698        { ACTIVITY_FILTER_ACTIVE, NULL, N_( "Active" ), GTK_STOCK_EXECUTE },
     699        { ACTIVITY_FILTER_DOWNLOADING, "Verb", NC_( "Verb", "Downloading" ), GTK_STOCK_GO_DOWN },
     700        { ACTIVITY_FILTER_SEEDING, "Verb", NC_( "Verb", "Seeding" ), GTK_STOCK_GO_UP },
     701        { ACTIVITY_FILTER_PAUSED, NULL, N_( "Paused" ), GTK_STOCK_MEDIA_PAUSE },
     702        { ACTIVITY_FILTER_FINISHED, NULL, N_( "Finished" ), NULL },
     703        { ACTIVITY_FILTER_VERIFYING, "Verb", NC_( "Verb", "Verifying" ), GTK_STOCK_REFRESH },
     704        { ACTIVITY_FILTER_ERROR, NULL, N_( "Error" ), GTK_STOCK_DIALOG_ERROR }
    704705    };
    705706    GtkListStore * store = gtk_list_store_new( ACTIVITY_FILTER_N_COLS,
     
    708709                                               G_TYPE_INT,
    709710                                               G_TYPE_STRING );
    710     for( i=0, n=G_N_ELEMENTS(types); i<n; ++i )
     711    for( i=0, n=G_N_ELEMENTS(types); i<n; ++i ) {
     712        const char * name = types[i].context ? g_dpgettext2( NULL, types[i].context, types[i].name )
     713                                             : _( types[i].name );
    711714        gtk_list_store_insert_with_values( store, NULL, -1,
    712             ACTIVITY_FILTER_COL_NAME, _( types[i].name ),
     715            ACTIVITY_FILTER_COL_NAME, name,
    713716            ACTIVITY_FILTER_COL_TYPE, types[i].type,
    714717            ACTIVITY_FILTER_COL_STOCK_ID, types[i].stock_id,
    715718            -1 );
     719    }
    716720
    717721    g_object_set_qdata( G_OBJECT( store ), TORRENT_MODEL_KEY, tmodel );
Note: See TracChangeset for help on using the changeset viewer.