diff --git a/gtk/details.c b/gtk/details.c index 06d1cc166..2c5d399f2 100644 --- a/gtk/details.c +++ b/gtk/details.c @@ -1253,7 +1253,7 @@ torrent_inspector_new ( GtkWindow * parent, TrTorrent * gtor ) gtk_notebook_append_page (GTK_NOTEBOOK(n), info_page_new (tor), - gtk_label_new (_("Info"))); + gtk_label_new (_("Information"))); w = file_list_new( gtor ); gtk_container_set_border_width( GTK_CONTAINER( w ), GUI_PAD_BIG ); diff --git a/gtk/msgwin.c b/gtk/msgwin.c index 03f7e886a..de905db3c 100644 --- a/gtk/msgwin.c +++ b/gtk/msgwin.c @@ -218,7 +218,7 @@ static struct { int id; } trLevels[] = { { N_("Error"), "error", "ERR", TR_MSG_ERR }, - { N_("Info"), "info", "INF", TR_MSG_INF }, + { N_("Information"), "info", "INF", TR_MSG_INF }, { N_("Debug"), "debug", "DBG", TR_MSG_DBG }, }; diff --git a/gtk/stats.c b/gtk/stats.c index 7d57aa88c..969454112 100644 --- a/gtk/stats.c +++ b/gtk/stats.c @@ -58,7 +58,9 @@ updateStats( gpointer gdata ) setLabel( ui->one_down_lb, tr_strlsize( buf, one.downloadedBytes, sizeof(buf) ) ); setLabel( ui->one_time_lb, tr_strltime( buf, one.secondsActive, sizeof(buf) ) ); setLabelFromRatio( ui->one_ratio_lb, one.ratio ); - setLabel( ui->all_sessions_lb, g_strdup_printf( _("Started %d times"), (int)all.sessionCount ) ); + + g_snprintf( buf, sizeof( buf ), _( "Started %d times" ), (int)all.sessionCount ); + setLabel( ui->all_sessions_lb, buf ); setLabel( ui->all_up_lb, tr_strlsize( buf, all.uploadedBytes, sizeof(buf) ) ); setLabel( ui->all_down_lb, tr_strlsize( buf, all.downloadedBytes, sizeof(buf) ) ); setLabel( ui->all_time_lb, tr_strltime( buf, all.secondsActive, sizeof(buf) ) ); diff --git a/gtk/util.c b/gtk/util.c index 2522a216e..014adadef 100644 --- a/gtk/util.c +++ b/gtk/util.c @@ -118,6 +118,7 @@ char* tr_strltime( char * buf, int seconds, size_t buflen ) { int hours; + int days; if( seconds < 0 ) seconds = 0; @@ -135,7 +136,7 @@ tr_strltime( char * buf, int seconds, size_t buflen ) return buf; } - hours = seconds / ( 60 *60 ); + hours = seconds / ( 60 * 60 ); if( seconds < ( 60 * 60 * 4 ) ) { @@ -150,7 +151,14 @@ tr_strltime( char * buf, int seconds, size_t buflen ) return buf; } - g_snprintf( buf, buflen, ngettext( "%'d hour", "%'d hours", hours ), hours ); + if( hours < 24 ) + { + g_snprintf( buf, buflen, ngettext( "%'d hour", "%'d hours", hours ), hours ); + return buf; + } + + days = seconds / ( 60 * 60 * 24 ); + g_snprintf( buf, buflen, ngettext( "'%d day", "%'d days", days ), days ); return buf; }