Commit fa0c3cd5 authored by Christophe Mutricy's avatar Christophe Mutricy
Browse files

i18n fixes

parent 3ac61394
......@@ -104,11 +104,11 @@ PrefsTree::PrefsTree( intf_thread_t *_p_intf, QWidget *_parent ) :
case CONFIG_CATEGORY:
if( p_item->value.i == -1 ) break;
data = new PrefsItemData();
data->name = QString( qfu( config_CategoryNameGet
data->name = QString( qtr( config_CategoryNameGet
( p_item->value.i ) ) );
psz_help = config_CategoryHelpGet( p_item->value.i );
if( psz_help )
data->help = QString( qfu(psz_help) );
data->help = QString( qtr(psz_help) );
else
data->help.clear();
data->i_type = TYPE_CATEGORY;
......@@ -149,11 +149,11 @@ PrefsTree::PrefsTree( intf_thread_t *_p_intf, QWidget *_parent ) :
// Data still contains the correct thing
data->i_type = TYPE_CATSUBCAT;
data->i_subcat_id = p_item->value.i;
data->name = QString( qfu( config_CategoryNameGet(
data->name = QString( qtr( config_CategoryNameGet(
p_item->value.i )) );
psz_help = config_CategoryHelpGet( p_item->value.i );
if( psz_help )
data->help = QString( qfu(psz_help) );
data->help = QString( qtr(psz_help) );
else
data->help.clear();
current_item->setData( 0, Qt::UserRole,
......@@ -161,11 +161,11 @@ PrefsTree::PrefsTree( intf_thread_t *_p_intf, QWidget *_parent ) :
continue;
}
data = new PrefsItemData();
data->name = QString( qfu( config_CategoryNameGet(
data->name = QString( qtr( config_CategoryNameGet(
p_item->value.i)) );
psz_help = config_CategoryHelpGet( p_item->value.i );
if( psz_help )
data->help = QString( qfu(psz_help) );
data->help = QString( qtr(psz_help) );
else
data->help.clear();
data->i_type = TYPE_SUBCATEGORY;
......@@ -259,7 +259,7 @@ PrefsTree::PrefsTree( intf_thread_t *_p_intf, QWidget *_parent ) :
module_data->help.clear();
// TODO image
QTreeWidgetItem *module_item = new QTreeWidgetItem();
module_item->setText( 0, qfu( p_module->psz_shortname ?
module_item->setText( 0, qtr( p_module->psz_shortname ?
p_module->psz_shortname : p_module->psz_object_name) );
//item->setIcon( 0 , XXX );
module_item->setData( 0, Qt::UserRole,
......@@ -390,11 +390,11 @@ PrefsPanel::PrefsPanel( intf_thread_t *_p_intf, QWidget *_parent,
}
else
{
head = QString( qfu(p_module->psz_longname) );
head = QString( qtr(p_module->psz_longname) );
if( p_module->psz_help )
{
help.append( "\n" );
help.append( qfu( p_module->psz_help ) );
help.append( qtr( p_module->psz_help ) );
}
}
......@@ -446,7 +446,7 @@ PrefsPanel::PrefsPanel( intf_thread_t *_p_intf, QWidget *_parent,
layout->addWidget( box, i_line, 0, 1, 2 );
i_line++;
}
box = new QGroupBox( qfu(p_item->psz_text) );
box = new QGroupBox( qtr(p_item->psz_text) );
boxlayout = new QGridLayout();
}
/* Only one hotkey control */
......
......@@ -192,7 +192,7 @@ StringConfigControl::StringConfigControl( vlc_object_t *_p_this,
int &line, bool pwd ) :
VStringConfigControl( _p_this, _p_item, _parent )
{
label = new QLabel( qfu(p_item->psz_text) );
label = new QLabel( qtr(p_item->psz_text) );
text = new QLineEdit( qfu(p_item->value.psz) );
finish();
......@@ -221,9 +221,9 @@ StringConfigControl::StringConfigControl( vlc_object_t *_p_this,
void StringConfigControl::finish()
{
text->setText( qfu(p_item->value.psz) );
text->setToolTip( formatTooltip(qfu(p_item->psz_longtext)) );
text->setToolTip( formatTooltip(qtr(p_item->psz_longtext)) );
if( label )
label->setToolTip( formatTooltip(qfu(p_item->psz_longtext)) );
label->setToolTip( formatTooltip(qtr(p_item->psz_longtext)) );
}
/*********** File **************/
......@@ -233,7 +233,7 @@ FileConfigControl::FileConfigControl( vlc_object_t *_p_this,
int &line, bool pwd ) :
VStringConfigControl( _p_this, _p_item, _parent )
{
label = new QLabel( qfu(p_item->psz_text) );
label = new QLabel( qtr(p_item->psz_text) );
text = new QLineEdit( qfu(p_item->value.psz) );
browse = new QPushButton( qtr( "Browse..." ) );
QHBoxLayout *textAndButton = new QHBoxLayout();
......@@ -286,9 +286,9 @@ void FileConfigControl::updateField()
void FileConfigControl::finish()
{
text->setText( qfu(p_item->value.psz) );
text->setToolTip( formatTooltip(qfu(p_item->psz_longtext)) );
text->setToolTip( formatTooltip(qtr(p_item->psz_longtext)) );
if( label )
label->setToolTip( formatTooltip(qfu(p_item->psz_longtext)) );
label->setToolTip( formatTooltip(qtr(p_item->psz_longtext)) );
}
/********* String / Directory **********/
......@@ -343,7 +343,7 @@ StringListConfigControl::StringListConfigControl( vlc_object_t *_p_this,
QGridLayout *l, int &line) :
VStringConfigControl( _p_this, _p_item, _parent )
{
label = new QLabel( qfu(p_item->psz_text) );
label = new QLabel( qtr(p_item->psz_text) );
combo = new QComboBox();
finish( bycat );
if( !l )
......@@ -381,9 +381,9 @@ void StringListConfigControl::finish( bool bycat )
p_item->ppsz_list[i_index] ) )
combo->setCurrentIndex( combo->count() - 1 );
}
combo->setToolTip( formatTooltip(qfu(p_item->psz_longtext)) );
combo->setToolTip( formatTooltip(qtr(p_item->psz_longtext)) );
if( label )
label->setToolTip( formatTooltip(qfu(p_item->psz_longtext)) );
label->setToolTip( formatTooltip(qtr(p_item->psz_longtext)) );
}
QString StringListConfigControl::getValue()
......@@ -397,7 +397,7 @@ ModuleConfigControl::ModuleConfigControl( vlc_object_t *_p_this,
QGridLayout *l, int &line) :
VStringConfigControl( _p_this, _p_item, _parent )
{
label = new QLabel( qfu(p_item->psz_text) );
label = new QLabel( qtr(p_item->psz_text) );
combo = new QComboBox();
finish( bycat );
if( !l )
......@@ -445,7 +445,7 @@ void ModuleConfigControl::finish( bool bycat )
/* Hack: required subcategory is stored in i_min */
if( p_config->i_type == CONFIG_SUBCATEGORY &&
p_config->value.i == p_item->min.i )
combo->addItem( qfu(p_parser->psz_longname),
combo->addItem( qtr(p_parser->psz_longname),
QVariant( p_parser->psz_object_name ) );
if( p_item->value.psz && !strcmp( p_item->value.psz,
p_parser->psz_object_name) )
......@@ -454,7 +454,7 @@ void ModuleConfigControl::finish( bool bycat )
}
else if( !strcmp( p_parser->psz_capability, p_item->psz_type ) )
{
combo->addItem( qfu(p_parser->psz_longname),
combo->addItem( qtr(p_parser->psz_longname),
QVariant( p_parser->psz_object_name ) );
if( p_item->value.psz && !strcmp( p_item->value.psz,
p_parser->psz_object_name) )
......@@ -462,9 +462,9 @@ void ModuleConfigControl::finish( bool bycat )
}
}
vlc_list_release( p_list );
combo->setToolTip( formatTooltip(qfu(p_item->psz_longtext)) );
combo->setToolTip( formatTooltip(qtr(p_item->psz_longtext)) );
if( label )
label->setToolTip( formatTooltip(qfu(p_item->psz_longtext)) );
label->setToolTip( formatTooltip(qtr(p_item->psz_longtext)) );
}
QString ModuleConfigControl::getValue()
......@@ -478,7 +478,7 @@ ModuleListConfigControl::ModuleListConfigControl( vlc_object_t *_p_this,
QGridLayout *l, int &line) :
VStringConfigControl( _p_this, _p_item, _parent )
{
groupBox = new QGroupBox ( qfu(p_item->psz_text) );
groupBox = new QGroupBox ( qtr(p_item->psz_text) );
text = new QLineEdit();
QGridLayout *layoutGroupBox = new QGridLayout( groupBox );
......@@ -503,7 +503,7 @@ ModuleListConfigControl::ModuleListConfigControl( vlc_object_t *_p_this,
l->addWidget( groupBox, line, 0, 1, -1 );
}
text->setToolTip( formatTooltip( qfu( p_item->psz_longtext) ) );
text->setToolTip( formatTooltip( qtr( p_item->psz_longtext) ) );
}
#if 0
ModuleConfigControl::ModuleConfigControl( vlc_object_t *_p_this,
......@@ -529,11 +529,11 @@ ModuleListConfigControl::~ModuleListConfigControl()
#define CHECKBOX_LISTS \
{ \
QCheckBox *cb = new QCheckBox( qfu( p_parser->psz_longname ) );\
QCheckBox *cb = new QCheckBox( qtr( p_parser->psz_longname ) );\
checkBoxListItem *cbl = new checkBoxListItem; \
\
CONNECT( cb, stateChanged( int ), this, onUpdate( int ) );\
cb->setToolTip( formatTooltip( qfu(p_parser->psz_longname)) );\
cb->setToolTip( formatTooltip( qtr(p_parser->psz_longname)) );\
cbl->checkBox = cb; \
\
int i = -1; \
......@@ -578,9 +578,9 @@ void ModuleListConfigControl::finish( bool bycat )
}
}
vlc_list_release( p_list );
text->setToolTip( formatTooltip(qfu(p_item->psz_longtext)) );
text->setToolTip( formatTooltip(qtr(p_item->psz_longtext)) );
if( groupBox )
groupBox->setToolTip( formatTooltip(qfu(p_item->psz_longtext)) );
groupBox->setToolTip( formatTooltip(qtr(p_item->psz_longtext)) );
}
#undef CHECKBOX_LISTS
......@@ -644,7 +644,7 @@ IntegerConfigControl::IntegerConfigControl( vlc_object_t *_p_this,
int &line ) :
VIntConfigControl( _p_this, _p_item, _parent )
{
label = new QLabel( qfu(p_item->psz_text) );
label = new QLabel( qtr(p_item->psz_text) );
spin = new QSpinBox; spin->setMinimumWidth( 80 );
spin->setAlignment( Qt::AlignRight );
spin->setMaximumWidth( 90 );
......@@ -677,9 +677,9 @@ void IntegerConfigControl::finish()
spin->setMaximum( 2000000000 );
spin->setMinimum( -2000000000 );
spin->setValue( p_item->value.i );
spin->setToolTip( formatTooltip(qfu(p_item->psz_longtext)) );
spin->setToolTip( formatTooltip(qtr(p_item->psz_longtext)) );
if( label )
label->setToolTip( formatTooltip(qfu(p_item->psz_longtext)) );
label->setToolTip( formatTooltip(qtr(p_item->psz_longtext)) );
}
int IntegerConfigControl::getValue()
......@@ -722,9 +722,9 @@ IntegerRangeSliderConfigControl::IntegerRangeSliderConfigControl(
slider->setMaximum( p_item->max.i );
slider->setMinimum( p_item->min.i );
slider->setValue( p_item->value.i );
slider->setToolTip( formatTooltip(qfu(p_item->psz_longtext)) );
slider->setToolTip( formatTooltip(qtr(p_item->psz_longtext)) );
if( label )
label->setToolTip( formatTooltip(qfu(p_item->psz_longtext)) );
label->setToolTip( formatTooltip(qtr(p_item->psz_longtext)) );
}
int IntegerRangeSliderConfigControl::getValue()
......@@ -739,7 +739,7 @@ IntegerListConfigControl::IntegerListConfigControl( vlc_object_t *_p_this,
QGridLayout *l, int &line) :
VIntConfigControl( _p_this, _p_item, _parent )
{
label = new QLabel( qfu(p_item->psz_text) );
label = new QLabel( qtr(p_item->psz_text) );
combo = new QComboBox();
finish( bycat );
if( !l )
......@@ -769,14 +769,14 @@ void IntegerListConfigControl::finish( bool bycat )
for( int i_index = 0; i_index < p_item->i_list; i_index++ )
{
combo->addItem( qfu(p_item->ppsz_list_text[i_index] ),
combo->addItem( qtr(p_item->ppsz_list_text[i_index] ),
QVariant( p_item->pi_list[i_index] ) );
if( p_item->value.i == p_item->pi_list[i_index] )
combo->setCurrentIndex( combo->count() - 1 );
}
combo->setToolTip( formatTooltip(qfu(p_item->psz_longtext)) );
combo->setToolTip( formatTooltip(qtr(p_item->psz_longtext)) );
if( label )
label->setToolTip( formatTooltip(qfu(p_item->psz_longtext)) );
label->setToolTip( formatTooltip(qtr(p_item->psz_longtext)) );
}
int IntegerListConfigControl::getValue()
......@@ -791,7 +791,7 @@ BoolConfigControl::BoolConfigControl( vlc_object_t *_p_this,
int &line ) :
VIntConfigControl( _p_this, _p_item, _parent )
{
checkbox = new QCheckBox( qfu(p_item->psz_text) );
checkbox = new QCheckBox( qtr(p_item->psz_text) );
finish();
if( !l )
......@@ -820,7 +820,7 @@ void BoolConfigControl::finish()
{
checkbox->setCheckState( p_item->value.i == VLC_TRUE ? Qt::Checked
: Qt::Unchecked );
checkbox->setToolTip( formatTooltip(qfu(p_item->psz_longtext)) );
checkbox->setToolTip( formatTooltip(qtr(p_item->psz_longtext)) );
}
int BoolConfigControl::getValue()
......@@ -839,7 +839,7 @@ FloatConfigControl::FloatConfigControl( vlc_object_t *_p_this,
int &line ) :
VFloatConfigControl( _p_this, _p_item, _parent )
{
label = new QLabel( qfu(p_item->psz_text) );
label = new QLabel( qtr(p_item->psz_text) );
spin = new QDoubleSpinBox; spin->setMinimumWidth( 80 );
spin->setMaximumWidth( 90 );
spin->setAlignment( Qt::AlignRight );
......@@ -875,9 +875,9 @@ void FloatConfigControl::finish()
spin->setMinimum( -2000000000. );
spin->setSingleStep( 0.1 );
spin->setValue( (double)p_item->value.f );
spin->setToolTip( formatTooltip(qfu(p_item->psz_longtext)) );
spin->setToolTip( formatTooltip(qtr(p_item->psz_longtext)) );
if( label )
label->setToolTip( formatTooltip(qfu(p_item->psz_longtext)) );
label->setToolTip( formatTooltip(qtr(p_item->psz_longtext)) );
}
float FloatConfigControl::getValue()
......@@ -941,7 +941,7 @@ KeySelectorControl::KeySelectorControl( vlc_object_t *_p_this,
void KeySelectorControl::finish()
{
if( label )
label->setToolTip( formatTooltip(qfu(p_item->psz_longtext)) );
label->setToolTip( formatTooltip(qtr(p_item->psz_longtext)) );
/* Fill the table */
table->setColumnCount( 2 );
......@@ -958,7 +958,7 @@ void KeySelectorControl::finish()
strstr( p_item->psz_name , "key-" ) )
{
QTreeWidgetItem *treeItem = new QTreeWidgetItem();
treeItem->setText( 0, qfu( p_item->psz_text ) );
treeItem->setText( 0, qtr( p_item->psz_text ) );
treeItem->setText( 1, VLCKeyToString( p_item->value.i ) );
treeItem->setData( 0, Qt::UserRole,
QVariant::fromValue( (void*)p_item ) );
......
......@@ -93,8 +93,8 @@ AboutDialog::AboutDialog( intf_thread_t *_p_intf) : QVLCFrame( _p_intf )
/* add the tabs to the Tabwidget */
tab->addTab( NULL, _( "Information" ) );
tab->addTab( NULL, _( "Authors" ) );
tab->addTab( thanksEdit, _("Thanks") );
tab->addTab( licenseEdit, _("Distribution License") );
tab->addTab( thanksEdit, qtr("Thanks") );
tab->addTab( licenseEdit, qtr("Distribution License") );
BUTTONACT( closeButton, close() );
}
......
......@@ -42,32 +42,32 @@
#define EXT_FILTER_SUBTITLE 0x10
#define ADD_FILTER_MEDIA( string ) \
string += _("Media Files"); \
string += qtr("Media Files"); \
string += " ( "; \
string += EXTENSIONS_MEDIA; \
string += ");;";
#define ADD_FILTER_VIDEO( string ) \
string += _("Video Files"); \
string += qtr("Video Files"); \
string += " ( "; \
string += EXTENSIONS_VIDEO; \
string += ");;";
#define ADD_FILTER_AUDIO( string ) \
string += _("Audio Files"); \
string += qtr("Audio Files"); \
string += " ( "; \
string += EXTENSIONS_AUDIO; \
string += ");;";
#define ADD_FILTER_PLAYLIST( string )\
string += _("Playlist Files"); \
string += qtr("Playlist Files"); \
string += " ( "; \
string += EXTENSIONS_PLAYLIST; \
string += ");;";
#define ADD_FILTER_SUBTITLE( string )\
string += _("Subtitles Files"); \
string += qtr("Subtitles Files"); \
string += " ( "; \
string += EXTENSIONS_SUBTITLE; \
string += ");;";
#define ADD_FILTER_ALL( string ) \
string += _("All Files"); \
string += qtr("All Files"); \
string += " (*.*)";
#define OPEN_FILE_TAB 0x0
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment