Commit f6589017 authored by Christophe Mutricy's avatar Christophe Mutricy

Qt4: i18n fixes

parent 1b82d1b7
...@@ -166,7 +166,7 @@ void AbstractController::createAndAddWidget( QBoxLayout *controlLayout, ...@@ -166,7 +166,7 @@ void AbstractController::createAndAddWidget( QBoxLayout *controlLayout,
CONNECT_MAP( a ); \ CONNECT_MAP( a ); \
SET_MAPPING( a, b ); SET_MAPPING( a, b );
#define BUTTON_SET_BAR( a_button ) \ #define BUTTON_SET_BAR( a_button ) \
a_button->setToolTip( tooltipL[button] ); \ a_button->setToolTip( qtr( tooltipL[button] ) ); \
a_button->setIcon( QIcon( iconL[button] ) ); a_button->setIcon( QIcon( iconL[button] ) );
#define BUTTON_SET_BAR2( button, image, tooltip ) \ #define BUTTON_SET_BAR2( button, image, tooltip ) \
button->setToolTip( tooltip ); \ button->setToolTip( tooltip ); \
......
...@@ -97,20 +97,20 @@ typedef enum buttonType_e ...@@ -97,20 +97,20 @@ typedef enum buttonType_e
} buttonType_e; } buttonType_e;
static const QString nameL[BUTTON_MAX] = { "Play", "Stop", "Open", static const char* nameL[BUTTON_MAX] = { N_("Play"), N_("Stop"), N_("Open"),
"Previous", "Next", "Slower", "Faster", "Fullscreen", "De-Fullscreen", N_("Previous"), N_("Next"), N_("Slower"), N_("Faster"), N_("Fullscreen"),
"Extended panel", "Playlist", "Snapshot", "Record", "A->B Loop", N_("De-Fullscreen"), N_("Extended panel"), N_("Playlist"), N_("Snapshot"),
"Frame By Frame", "Trickplay Reverse", "Step backward" , "Step forward", N_("Record"), N_("A->B Loop"), N_("Frame By Frame"), N_("Trickplay Reverse"),
"Quit" }; N_("Step backward" ), N_("Step forward"), N_("Quit") };
static const QString tooltipL[BUTTON_MAX] = { I_PLAY_TOOLTIP, static const char* tooltipL[BUTTON_MAX] = { I_PLAY_TOOLTIP,
_("Stop playback"), _("Open a medium"), N_("Stop playback"), N_("Open a medium"),
_("Previous media in the playlist"), N_("Previous media in the playlist"),
_("Next media in the playlist"), _("Slower"), _("Faster"), N_("Next media in the playlist"), N_("Slower"), N_("Faster"),
_("Toggle the video in fullscreen"), _("Toggle the video out fullscreen"), N_("Toggle the video in fullscreen"), N_("Toggle the video out fullscreen"),
_("Show extended settings" ), _( "Show playlist" ), _( "Take a snapshot" ), N_("Show extended settings" ), N_( "Show playlist" ),
_( "Record" ), _( "Loop from point A to point B continuously." ), N_( "Take a snapshot" ), N_( "Record" ),
_("Frame by frame"), _("Reverse"), _("Step backward"), _("Step forward"), N_( "Loop from point A to point B continuously." ), N_("Frame by frame"),
_("Quit") }; N_("Reverse"), N_("Step backward"), N_("Step forward"), N_("Quit") };
static const QString iconL[BUTTON_MAX] ={ ":/play_b", ":/stop_b", ":/eject", static const QString iconL[BUTTON_MAX] ={ ":/play_b", ":/stop_b", ":/eject",
":/previous_b", ":/next_b", ":/slower", ":/faster", ":/fullscreen", ":/previous_b", ":/next_b", ":/slower", ":/faster", ":/fullscreen",
":/defullscreen", ":/extended", ":/playlist", ":/snapshot", ":/record", ":/defullscreen", ":/extended", ":/playlist", ":/snapshot", ":/record",
......
...@@ -284,7 +284,7 @@ WidgetListing::WidgetListing( intf_thread_t *p_intf, QWidget *_parent ) ...@@ -284,7 +284,7 @@ WidgetListing::WidgetListing( intf_thread_t *p_intf, QWidget *_parent )
for( int i = 0; i < BUTTON_MAX; i++ ) for( int i = 0; i < BUTTON_MAX; i++ )
{ {
QListWidgetItem *widgetItem = new QListWidgetItem( this ); QListWidgetItem *widgetItem = new QListWidgetItem( this );
widgetItem->setText( nameL[i] ); widgetItem->setText( qtr( nameL[i] ) );
widgetItem->setIcon( QIcon( iconL[i] ) ); widgetItem->setIcon( QIcon( iconL[i] ) );
widgetItem->setData( Qt::UserRole, QVariant( i ) ); widgetItem->setData( Qt::UserRole, QVariant( i ) );
addItem( widgetItem ); addItem( widgetItem );
......
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