Changeset 5209


Ignore:
Timestamp:
Mar 7, 2008, 3:26:59 AM (14 years ago)
Author:
charles
Message:

more i18n work.

Location:
trunk
Files:
15 edited

Legend:

Unmodified
Added
Removed
  • trunk/gtk/actions.c

    r5180 r5209  
    101101  { "edit-menu", NULL, N_("_Edit"), NULL, NULL, NULL },
    102102  { "help-menu", NULL, N_("_Help"), NULL, NULL, NULL },
    103   { "open-torrent-toolbar", GTK_STOCK_OPEN, N_("_Open"), NULL,
    104     N_("Open an existing torrent"),
    105     G_CALLBACK(action_cb) },
    106   { "open-torrent-menu", GTK_STOCK_OPEN, N_("_Open..."), "<control>O",
    107     N_("Open an existing torrent"),
    108     G_CALLBACK(action_cb) },
     103  { "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) },
    109106  { "start-torrent", GTK_STOCK_MEDIA_PLAY,
    110107    N_("_Start"), "<control>S", NULL, G_CALLBACK(action_cb) },
     
    114111  { "pause-torrent", GTK_STOCK_MEDIA_PAUSE,
    115112    N_("_Pause"), "<control>P", NULL, G_CALLBACK(action_cb) },
    116   { "remove-torrent", GTK_STOCK_REMOVE,
    117     N_("_Remove"), "Delete", NULL, G_CALLBACK(action_cb) },
    118   { "delete-torrent", GTK_STOCK_DELETE,
    119     N_("_Delete Files"), "<control>Delete", NULL, G_CALLBACK(action_cb) },
     113  { "close-torrent", GTK_STOCK_CLOSE, NULL, "Delete", NULL, G_CALLBACK(action_cb) },
     114  { "delete-torrent", GTK_STOCK_DELETE, N_("_Delete Files and Close"), "<control>Delete", NULL, G_CALLBACK(action_cb) },
    120115  { "new-torrent", GTK_STOCK_NEW, N_("_New..."), NULL,
    121116    N_("Create a new torrent"),
    122117    G_CALLBACK(action_cb) },
    123   { "close", GTK_STOCK_CLOSE, N_("_Close"), "<control>W",
     118  { "close", GTK_STOCK_CLOSE, N_("Close _Window"), "<control>W",
    124119    N_("Close main window"),
    125120    G_CALLBACK(action_cb) },
    126   { "quit", GTK_STOCK_QUIT,
    127     N_("_Quit"), "<control>Q", NULL, G_CALLBACK(action_cb) },
    128   { "select-all", GTK_STOCK_SELECT_ALL,
    129     N_("Select _All"), "<control>A", NULL, G_CALLBACK(action_cb) },
     121  { "quit", GTK_STOCK_QUIT, N_("_Quit"), NULL, NULL, G_CALLBACK(action_cb) },
     122  { "select-all", GTK_STOCK_SELECT_ALL, NULL, "<control>A", NULL, G_CALLBACK(action_cb) },
    130123  { "unselect-all", NULL,
    131124    N_("Dese_lect All"), "<shift><control>A", NULL, G_CALLBACK(action_cb) },
    132   { "edit-preferences", GTK_STOCK_PREFERENCES,
    133     NULL, NULL, NULL, G_CALLBACK(action_cb) },
     125  { "edit-preferences", GTK_STOCK_PREFERENCES, NULL, NULL, NULL, G_CALLBACK(action_cb) },
    134126  { "show-torrent-details", GTK_STOCK_INFO,
    135127    N_("_Details"), "<alt>Return", N_("Torrent Details"), G_CALLBACK(action_cb) },
    136   { "show-about-dialog", GTK_STOCK_ABOUT,
    137     N_("_About Transmission"), NULL, NULL, G_CALLBACK(action_cb) },
     128  { "show-about-dialog", GTK_STOCK_ABOUT, NULL, NULL, NULL, G_CALLBACK(action_cb) },
    138129  { "update-tracker", GTK_STOCK_NETWORK,
    139130    N_("Ask Tracker for _More Peers"), NULL, NULL, G_CALLBACK(action_cb) }
  • trunk/gtk/details.c

    r5208 r5209  
    242242  N_("Address"),
    243243  N_("Client"),
     244  /* percentage */
    244245  N_("%"),
    245246  " ",
     
    582583  gtk_container_set_border_width (GTK_CONTAINER(vbox), GUI_PAD_BIG);
    583584
    584     g_snprintf (name, sizeof(name), "<b>%s</b>", _("Piece Availability"));
     585    g_snprintf (name, sizeof(name), "<b>%s</b>", _("Availability"));
    585586    l = gtk_label_new (NULL);
    586587    gtk_misc_set_alignment (GTK_MISC(l), 0.0f, 0.5f);
     
    866867
    867868  hig_workarea_add_section_divider (t, &row);
    868   hig_workarea_add_section_title (t, &row, _("Completeness"));
     869  hig_workarea_add_section_title (t, &row, _("Completion"));
    869870
    870871    w = a->availability_da = gtk_drawing_area_new ();
  • trunk/gtk/dialogs.c

    r5208 r5209  
    273273                                     GTK_RESPONSE_CANCEL );
    274274
    275     dontask = gtk_check_button_new_with_mnemonic( _("_Don't Ask Me This Again") );
     275    dontask = gtk_check_button_new_with_mnemonic( _("_Don't ask me this again") );
    276276    stuff->dontask = dontask;
    277277
     
    316316    g_list_free( data->torrents );
    317317    g_free( data );
    318 }
    319 
    320 void
    321 confirmRemove( GtkWindow * parent,
    322                TrCore    * core,
    323                GList     * torrents )
    324 {
    325     GtkWidget * d;
    326     char text[128];
    327     struct DeleteData * dd = g_new0( struct DeleteData, 1 );
    328 
    329     dd->core = core;
    330     dd->torrents = torrents;
    331     dd->delete_files = FALSE;
    332 
    333     g_snprintf( text, sizeof( text ),
    334                 ngettext( "Remove torrent?",
    335                           "Remove torrents?",
    336                           g_list_length( torrents ) ) );
    337     d = gtk_message_dialog_new_with_markup( parent,
    338                                             GTK_DIALOG_DESTROY_WITH_PARENT,
    339                                             GTK_MESSAGE_QUESTION,
    340                                             GTK_BUTTONS_NONE,
    341                                             "<b>%s</b>", text );
    342     gtk_message_dialog_format_secondary_text( GTK_MESSAGE_DIALOG( d ),
    343                    _( "This removes the torrent, not the downloaded files." ) );
    344     gtk_dialog_add_buttons( GTK_DIALOG( d ),
    345                             GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
    346                             GTK_STOCK_REMOVE, GTK_RESPONSE_ACCEPT,
    347                             NULL );
    348     gtk_dialog_set_default_response( GTK_DIALOG ( d ),
    349                                      GTK_RESPONSE_ACCEPT );
    350     gtk_dialog_set_alternative_button_order( GTK_DIALOG( d ),
    351                                              GTK_RESPONSE_ACCEPT,
    352                                              GTK_RESPONSE_CANCEL,
    353                                              -1 );
    354     g_signal_connect( d, "response", G_CALLBACK( removeResponse ), dd );
    355     gtk_widget_show_all( d );
    356318}
    357319
  • trunk/gtk/dialogs.h

    r5207 r5209  
    4040
    4141void confirmDelete( GtkWindow * parent, TrCore * core, GList * torrents );
    42 void confirmRemove( GtkWindow * parent, TrCore * core, GList * torrents );
    4342
    4443#endif /* TG_PREFS_H */
  • trunk/gtk/ipc.c

    r5143 r5209  
    264264
    265265  if(0 > (con->fd = socket(AF_UNIX, SOCK_STREAM, 0))) {
    266     g_message( _("Failed to create socket: %s"), g_strerror(errno));
     266    g_message( _("Couldn't create socket: %s"), g_strerror(errno));
    267267    return FALSE;
    268268  }
     
    273273
    274274  if(0 > connect(con->fd, (struct sockaddr*)&addr, SUN_LEN(&addr))) {
    275     g_message( _("Failed to connect to %s: %s"), path, g_strerror(errno));
     275    g_message( _("Couldn't connect to \"%s\": %s"), path, g_strerror(errno));
    276276    return FALSE;
    277277  }
     
    313313  if( NULL == con->msgs )
    314314  {
    315       g_message( _("Failed to set up IPC: %s"), g_strerror( errno ) );
     315      g_message( _("Couldn't set up IPC: %s"), g_strerror( errno ) );
    316316      g_free( con );
    317317      return FALSE;
     
    483483
    484484 fail:
    485   errmsg(con->u.serv.wind, _("Failed to set up socket: %s"),
     485  errmsg(con->u.serv.wind, _("Couldn't set up socket: %s"),
    486486         g_strerror(errno));
    487487  if(0 <= con->fd)
     
    11491149  if( NULL == con->msgs )
    11501150  {
    1151       errmsg( con->u.serv.wind, _("Failed to set up IPC: %s"),
     1151      errmsg( con->u.serv.wind, _("Couldn't set up IPC: %s"),
    11521152              g_strerror( errno ) );
    11531153      g_free( con );
  • trunk/gtk/main.c

    r5207 r5209  
    200200    action_sensitize( "pause-torrent", counts.activeCount!=0 );
    201201    action_sensitize( "start-torrent", counts.inactiveCount!=0 );
    202     action_sensitize( "remove-torrent", counts.totalCount!=0 );
     202    action_sensitize( "close-torrent", counts.totalCount!=0 );
    203203    action_sensitize( "delete-torrent", counts.totalCount!=0 );
    204204    action_sensitize( "verify-torrent", counts.totalCount!=0 );
     
    10381038
    10391039static void
    1040 removeSelected( struct cbdata * data, gboolean doDelete )
     1040closeSelected( struct cbdata * data, gboolean doDelete )
    10411041{
    10421042    GList * l = NULL;
     
    10471047        if( doDelete )
    10481048            confirmDelete( data->wind, data->core, l );
    1049         else
    1050             confirmRemove( data->wind, data->core, l );
     1049        else {
     1050            GList * m;
     1051            for( m=l; m; m=m->next )
     1052                tr_core_remove_torrent( data->core, m->data, FALSE );
     1053            g_list_foreach( l, (GFunc)g_object_unref, NULL );
     1054            g_list_free( l );
     1055        }
     1056         
    10511057    }
    10521058}
     
    11031109        gtk_widget_show_all( w );
    11041110    }
    1105     else if( !strcmp( action_name, "remove-torrent" ) )
    1106     {
    1107         removeSelected( data, FALSE );
     1111    else if( !strcmp( action_name, "close-torrent" ) )
     1112    {
     1113        closeSelected( data, FALSE );
    11081114    }
    11091115    else if( !strcmp( action_name, "delete-torrent" ) )
    11101116    {
    1111         removeSelected( data, TRUE );
     1117        closeSelected( data, TRUE );
    11121118    }
    11131119    else if (!strcmp (action_name, "close"))
  • trunk/gtk/tr-prefs.c

    r5147 r5209  
    245245        hig_workarea_add_wide_control( t, &row, w );
    246246
    247         s = _( "_Start transfers when added" );
     247        s = _( "_Start when added" );
    248248        w = new_check_button( s, PREF_KEY_START, core );
    249249        hig_workarea_add_wide_control( t, &row, w );
     
    337337        gtk_misc_set_alignment( GTK_MISC(l), 0.0f, 0.5f );
    338338        gtk_box_pack_start( GTK_BOX(h), l, FALSE, FALSE, 0 );
    339         hig_workarea_add_row( t, &row, _("Incoming TCP _Port"), h, w );
     339        hig_workarea_add_row( t, &row, _("Incoming TCP _port"), h, w );
    340340
    341341        g_object_set_data( G_OBJECT(l), "tr-port-spin", w2 );
  • trunk/gtk/tr-torrent.c

    r5208 r5209  
    216216        {
    217217            case TR_EINVALID:
    218                 *err = g_strdup_printf( _("%s: not a valid torrent file"), filename );
     218                *err = g_strdup_printf( _( "File \"%s\" is not a valid torrent" ), filename );
    219219                 break;
    220220            case TR_EDUPLICATE:
    221                 *err = g_strdup_printf( _("%s: torrent is already open"), filename );
     221                *err = g_strdup_printf( _( "File \"%s\" is already open" ), filename );
    222222                break;
    223223            default:
  • trunk/gtk/ui.h

    r5180 r5209  
    1111"      <menuitem action='verify-torrent'/>\n"
    1212"      <menuitem action='show-torrent-details'/>\n"
    13 "      <menuitem action='remove-torrent'/>\n"
     13"      <menuitem action='close-torrent'/>\n"
    1414"      <menuitem action='delete-torrent'/>\n"
    1515"      <separator/>\n"
     
    5050"    <toolitem action='start-torrent'/>\n"
    5151"    <toolitem action='pause-torrent'/>\n"
    52 "    <toolitem action='remove-torrent'/>\n"
     52"    <toolitem action='close-torrent'/>\n"
    5353"    <separator/>\n"
    5454"    <toolitem action='show-torrent-details'/>\n"
     
    6363"    <menuitem action='update-tracker'/>\n"
    6464"    <separator/>\n"
    65 "    <menuitem action='remove-torrent'/>\n"
     65"    <menuitem action='close-torrent'/>\n"
    6666"    <menuitem action='delete-torrent'/>\n"
    6767"  </popup>\n"
  • trunk/libtransmission/metainfo.c

    r5194 r5209  
    234234    {
    235235        if( val )
    236             tr_err( _( "Invalid benc entry \"%s\"" ), "piece length" );
     236            tr_err( _( "Invalid metadata entry \"%s\"" ), "piece length" );
    237237        else
    238             tr_err( _( "Missing benc entry \"%s\"" ), "piece length" );
     238            tr_err( _( "Missing metadata entry \"%s\"" ), "piece length" );
    239239        goto fail;
    240240    }
     
    246246    {
    247247        if( val )
    248             tr_err( _( "Invalid benc entry \"%s\"" ), "pieces" );
     248            tr_err( _( "Invalid metadata entry \"%s\"" ), "pieces" );
    249249        else
    250             tr_err( _( "Missing benc entry \"%s\"" ), "pieces" );
     250            tr_err( _( "Missing metadata entry \"%s\"" ), "pieces" );
    251251        goto fail;
    252252    }
    253253    if( val->val.s.i % SHA_DIGEST_LENGTH )
    254254    {
    255         tr_err( _( "Invalid benc entry \"%s\"" ), "pieces" );
     255        tr_err( _( "Invalid metadata entry \"%s\"" ), "pieces" );
    256256        goto fail;
    257257    }
     
    493493    if( NULL == val || TYPE_STR != val->type )
    494494    {
    495         tr_err( _( "Missing benc entry \"%s\"" ), "announce" );
     495        tr_err( _( "Missing metadata entry \"%s\"" ), "announce" );
    496496        return TR_EINVALID;
    497497    }
     
    617617    if( !file )
    618618    {
    619         tr_err( _( "Couldn't open file \"%s\": %s" ), path, tr_strerror( errno ) );
     619        tr_err( _( "Couldn't open \"%s\": %s" ), path, tr_strerror( errno ) );
    620620        return TR_EINVALID;
    621621    }
     
    642642    {
    643643        if( name )
    644             tr_err( _( "Invalid benc entry \"%s\"" ), "name" );
     644            tr_err( _( "Invalid metadata entry \"%s\"" ), "name" );
    645645        else
    646             tr_err( _( "Missing benc entry \"%s\"" ), "name" );
     646            tr_err( _( "Missing metadata entry \"%s\"" ), "name" );
    647647        return TR_EINVALID;
    648648    }
     
    652652    if( '\0' == inf->name[0] )
    653653    {
    654         tr_err( _( "Invalid benc entry \"%s\"" ), "name" );
     654        tr_err( _( "Invalid metadata entry \"%s\"" ), "name" );
    655655        return TR_EINVALID;
    656656    }
     
    674674            {
    675675                if( path )
    676                     tr_err( _( "Invalid benc entry \"%s\"" ), "path" );
     676                    tr_err( _( "Invalid metadata entry \"%s\"" ), "path" );
    677677                else
    678                     tr_err( _( "Missing benc entry \"%s\"" ), "path" );
     678                    tr_err( _( "Missing metadata entry \"%s\"" ), "path" );
    679679                return TR_EINVALID;
    680680            }
     
    683683            {
    684684                if( length )
    685                     tr_err( _( "Invalid benc entry \"%s\"" ), "length" );
     685                    tr_err( _( "Invalid metadata entry \"%s\"" ), "length" );
    686686                else
    687                     tr_err( _( "Missing benc entry \"%s\"" ), "length" );
     687                    tr_err( _( "Missing metadata entry \"%s\"" ), "length" );
    688688                return TR_EINVALID;
    689689            }
  • trunk/libtransmission/natpmp.c

    r5208 r5209  
    3232#define COMMAND_WAIT_SECS 8
    3333
     34static const char * getKey( void ) { return _( "Port Mapping (NAT-PMP)" ); }
     35
    3436typedef enum
    3537{
     
    6466{
    6567    if( ret==NATPMP_TRYAGAIN )
    66         tr_dbg( _( "Port Mapping (NAT-PMP): %s returned 'try again'" ), func );
     68        tr_dbg( _( "%s: %s returned 'try again'" ), getKey(), func );
    6769    else if( ret >= 0 )
    68         tr_dbg( _( "Port Mapping (NAT-PMP): %s returned success (%d)" ), func, ret );
     70        tr_dbg( _( "%s: %s returned success (%d)" ), getKey(), func, ret );
    6971    else
    70         tr_err( _( "Port Mapping (NAT-PMP): %s returned error %d, errno is %d (%s)" ), func, ret, errno, tr_strerror(errno) );
     72        tr_err( _( "%s: %s returned error %d, errno is %d (%s)" ), getKey(), func, ret, errno, tr_strerror(errno) );
    7173}
    7274
     
    108110setErrorState( struct tr_natpmp * nat )
    109111{
    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" ) );
     112    tr_err( _( "%s: If your router supports NAT-PMP, please make sure NAT-PMP is enabled!" ), getKey() );
     113    tr_err( _( "%s: NAT-PMP port forwarding unsuccessful, trying UPnP next" ), getKey() );
    112114    nat->state = TR_NATPMP_ERR;
    113115}
     
    135137        logVal( "readnatpmpresponseorretry", val );
    136138        if( val >= 0 ) {
    137             tr_inf( _( "Port Mapping (NAT-PMP): found public address %s" ), inet_ntoa( response.publicaddress.addr ) );
     139            tr_inf( _( "%s: found public address %s" ), getKey(), inet_ntoa( response.publicaddress.addr ) );
    138140            nat->state = TR_NATPMP_IDLE;
    139141        } else if( val != NATPMP_TRYAGAIN ) {
     
    162164        logVal( "readnatpmpresponseorretry", val );
    163165        if( val >= 0 ) {
    164             tr_inf( _( "Port Mapping (NAT-PMP): port %d has been unmapped." ), nat->port );
     166            tr_inf( _( "%s: port %d has been unmapped." ), getKey(), nat->port );
    165167            nat->state = TR_NATPMP_IDLE;
    166168            nat->port = -1;
     
    198200            nat->renewTime = time( NULL ) + LIFETIME_SECS;
    199201            nat->port = resp.newportmapping.privateport;
    200             tr_inf( _( "Port Mapping (NAT-PMP): port %d mapped successfully" ), nat->port );
     202            tr_inf( _( "%s: port %d mapped successfully" ), getKey(), nat->port );
    201203        } else if( val != NATPMP_TRYAGAIN ) {
    202204            setErrorState( nat );
  • trunk/libtransmission/shared.c

    r5208 r5209  
    3939#include "utils.h"
    4040
     41static const char * getKey( void ) { return _( "Port Mapping" ); }
     42
    4143struct tr_shared
    4244{
     
    8890        status = tr_upnpPulse( s->upnp, port, isEnabled );
    8991    if( status != s->natStatus ) {
    90         tr_inf( _( "Port Mapping: Mapping state changed from '%s' to '%s'" ), getNatStateStr(s->natStatus), getNatStateStr(status) );
     92        tr_inf( _( "%s: Mapping state changed from \"%s\" to \"%s\"" ), getKey(), getNatStateStr(s->natStatus), getNatStateStr(status) );
    9193        s->natStatus = status;
    9294    }
     
    98100    if( s->bindSocket >= 0 && ( s->bindPort != s->publicPort ) )
    99101    {
    100         tr_inf( _( "Port Mapping: Closing port %d" ), s->bindPort );
     102        tr_inf( _( "%s: Closing port %d" ), getKey(), s->bindPort );
    101103        tr_netClose( s->bindSocket );
    102104        s->bindSocket = -1;
     
    109111        socket = tr_netBindTCP( s->publicPort );
    110112        if( socket >= 0 ) {
    111             tr_inf( _( "Port Mapping: Opened port %d to listen for incoming peer connections" ), s->publicPort );
     113            tr_inf( _( "%s: Opened port %d to listen for incoming peer connections" ), getKey(), s->publicPort );
    112114            s->bindPort = s->publicPort;
    113115            s->bindSocket = socket;
    114116            listen( s->bindSocket, 5 );
    115117        } else {
    116             tr_err( _( "Port Mapping: Unable to open port %d to listen for incoming peer connections (errno is %d - %s)" ),
    117                     s->publicPort, errno, tr_strerror(errno) );
     118            tr_err( _( "%s: Unable to open port %d to listen for incoming peer connections (errno is %d - %s)" ),
     119                    getKey(), s->publicPort, errno, tr_strerror(errno) );
    118120            s->bindPort = -1;
    119121            s->bindSocket = -1;
     
    152154    else if( ( shared->natStatus == TR_NAT_TRAVERSAL_ERROR ) || ( shared->natStatus == TR_NAT_TRAVERSAL_UNMAPPED ) )
    153155    {
    154         tr_dbg( "Port Mapping: Port mapping shut down" );
     156        tr_dbg( _( "%s: Port mapping shut down" ), getKey() );
    155157        shared->h->shared = NULL;
    156158        tr_netClose( shared->bindSocket );
  • trunk/libtransmission/transmission.c

    r5193 r5209  
    128128{
    129129    tr_handle * h;
     130    char buf[128];
    130131
    131132#ifndef WIN32
     
    171172    h->isPortSet = publicPort >= 0;
    172173
    173     tr_inf( _( TR_NAME " " LONG_VERSION_STRING " started" ) );
     174    snprintf( buf, sizeof( buf ), _( "%s %s started" ),
     175              TR_NAME, LONG_VERSION_STRING );
     176    tr_inf( "%s", buf );
    174177
    175178    tr_statsInit( h );
     
    457460
    458461    *setmeCount = n;
    459     tr_inf( _( "Loaded %d torrents from disk" ), *setmeCount );
     462    tr_inf( _( "Loaded %d torrents" ), *setmeCount );
    460463    return torrents;
    461464}
  • trunk/libtransmission/upnp.c

    r5208 r5209  
    2424#include "utils.h"
    2525#include "upnp.h"
     26
     27static const char * getKey( void ) { return _( "Port Mapping (UPnP)" ); }
    2628
    2729typedef enum
     
    8789        devlist = upnpDiscover( 2000, NULL, NULL );
    8890        if( devlist == NULL ) {
    89             tr_err( _( "Port Mapping (UPnP): upnpDiscover returned NULL (errno %d - %s)" ), errno, tr_strerror(errno) );
     91            tr_err( _( "%s: upnpDiscover returned NULL (errno %d - %s)" ), getKey(), errno, tr_strerror(errno) );
    9092        }
    9193        errno = 0;
    9294        if( UPNP_GetValidIGD( devlist, &handle->urls, &handle->data, handle->lanaddr, sizeof(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 );
     95            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 );
    9597            handle->state = TR_UPNP_IDLE;
    9698            handle->hasDiscovered = 1;
    9799        } else {
    98100            handle->state = TR_UPNP_ERR;
    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!" ) );
     101            tr_err( _( "%s: UPNP_GetValidIGD failed.  (errno %d - %s)" ), getKey(), errno, tr_strerror(errno) );
     102            tr_err( _( "%s: If your router supports UPnP, please make sure UPnP is enabled!" ), getKey() );
    101103        }
    102104        freeUPNPDevlist( devlist );
     
    116118                                handle->data.servicetype,
    117119                                portStr, "TCP" );
    118         tr_dbg( "Port Mapping (UPnP): Stopping port forwarding of '%s', service '%s'",
    119                 handle->urls.controlURL, handle->data.servicetype );
     120        tr_dbg( _( "%s: Stopping port forwarding of '%s', service '%s'" ),
     121                getKey(), handle->urls.controlURL, handle->data.servicetype );
    120122        handle->isMapped = 0;
    121123        handle->state = TR_UPNP_IDLE;
     
    145147            handle->isMapped = !err;
    146148        }
    147         tr_inf( _( "Port Mapping (UPnP): Port forwarding via '%s', service '%s'.  (local address: %s:%d)" ),
    148                 handle->urls.controlURL, handle->data.servicetype, handle->lanaddr, port );
     149        tr_inf( _( "%s: Port forwarding via '%s', service '%s'.  (local address: %s:%d)" ),
     150                getKey(), handle->urls.controlURL, handle->data.servicetype, handle->lanaddr, port );
    149151        if( handle->isMapped ) {
    150             tr_inf( _( "Port Mapping (UPnP): Port forwarding successful!" ) );
     152            tr_inf( _( "%s: Port forwarding successful!" ), getKey() );
    151153            handle->port = port;
    152154            handle->state = TR_UPNP_IDLE;
    153155        } else {
    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!" ) );
     156            tr_err( _( "%s: Port forwarding failed with err %d (%d - %s)" ), getKey(), err, errno, tr_strerror(errno) );
     157            tr_err( _( "%s: If your router supports UPnP, please make sure UPnP is enabled!" ), getKey() );
    156158            handle->port = -1;
    157159            handle->state = TR_UPNP_ERR;
  • trunk/libtransmission/utils.c

    r5208 r5209  
    377377    if( !file )
    378378    {
    379         tr_err( _( "Couldn't open file \"%s\": %s" ), path, tr_strerror(errno) );
     379        tr_err( _( "Couldn't open \"%s\": %s" ), path, tr_strerror(errno) );
    380380        return NULL;
    381381    }
Note: See TracChangeset for help on using the changeset viewer.