[vlc-devel] commit: Qt4: i18n fixes (Christophe Mutricy )

git version control git at videolan.org
Wed Mar 25 21:50:49 CET 2009


vlc | branch: master | Christophe Mutricy <xtophe at videolan.org> | Wed Mar 25 20:22:54 2009 +0000| [f6589017c9f5d58aac2d1751feba8d68e6cf846b] | committer: Christophe Mutricy 

Qt4: i18n fixes

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=f6589017c9f5d58aac2d1751feba8d68e6cf846b
---

 modules/gui/qt4/components/controller.cpp |    2 +-
 modules/gui/qt4/components/controller.hpp |   28 ++++++++++++++--------------
 modules/gui/qt4/dialogs/toolbar.cpp       |    2 +-
 3 files changed, 16 insertions(+), 16 deletions(-)

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




More information about the vlc-devel mailing list