[gluon] Make gluonplayer plasmoid translatable

[ Thread Index | Date Index | More lists.tuxfamily.org/gluon Archives ]


Hi,

As discussed with leinir on #kdegames I add the patch for making gluonplayer plasmoid translatable.

@shaan7: Please review and apply it.

@leinir: Sorry for the delay - I searched a good GUI for "git send-mail" but couldn't find one ... 

Thanks.
Johannes

From 09ec1ddb37eca29a2e1a422e65079e17fb383be1 Mon Sep 17 00:00:00 2001
From: Johannes Obermayr <johannesobermayr@xxxxxx>
Date: Tue, 22 Jun 2010 14:57:51 +0200
Subject: [PATCH 1/1] Make gluonplayer plasmoid translatable

---
 player/plasmoid/Messages.sh             |    2 ++
 player/plasmoid/gamedetailsoverlay.cpp  |    6 +++---
 player/plasmoid/gamesoverlay.cpp        |    6 +++---
 player/plasmoid/views/gamesviewitem.cpp |    2 +-
 4 files changed, 9 insertions(+), 7 deletions(-)
 create mode 100644 player/plasmoid/Messages.sh

diff --git a/player/plasmoid/Messages.sh b/player/plasmoid/Messages.sh
new file mode 100644
index 0000000..3e11e1c
--- /dev/null
+++ b/player/plasmoid/Messages.sh
@@ -0,0 +1,2 @@
+#! /usr/bin/env bash
+$XGETTEXT *.cpp -o $podir/plasma_applet_gluonplayer.pot
\ No newline at end of file
diff --git a/player/plasmoid/gamedetailsoverlay.cpp b/player/plasmoid/gamedetailsoverlay.cpp
index abc4dbf..e964e8b 100644
--- a/player/plasmoid/gamedetailsoverlay.cpp
+++ b/player/plasmoid/gamedetailsoverlay.cpp
@@ -32,7 +32,7 @@ GameDetailsOverlay::GameDetailsOverlay(QGraphicsItem* parent, Qt::WindowFlags wF
 {
     m_tabBar = new Plasma::TabBar(this);
 
-    m_backButton = new Plasma::IconWidget(KIcon("go-previous-view"), "Back", this);
+    m_backButton = new Plasma::IconWidget(KIcon("go-previous-view"), i18n("Back"), this);
     m_backButton->setOrientation(Qt::Horizontal);
     m_backButton->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
     connect(m_backButton, SIGNAL(activated()), SIGNAL(back()));
@@ -40,8 +40,8 @@ GameDetailsOverlay::GameDetailsOverlay(QGraphicsItem* parent, Qt::WindowFlags wF
     m_highScoresView = new HighScoresView(this);
     m_achievementsView = new AchievementsView(this);
 
-    m_tabBar->addTab(KIcon("games-highscores"), "High Scores", m_highScoresView);
-    m_tabBar->addTab(KIcon("games-endturn"), "Achievements", m_achievementsView);
+    m_tabBar->addTab(KIcon("games-highscores"), i18n("High Scores"), m_highScoresView);
+    m_tabBar->addTab(KIcon("games-endturn"), i18n("Achievements"), m_achievementsView);
 
     QGraphicsLinearLayout *layout = new QGraphicsLinearLayout(Qt::Vertical);
     layout->addItem(m_backButton);
diff --git a/player/plasmoid/gamesoverlay.cpp b/player/plasmoid/gamesoverlay.cpp
index 3ac01d1..88b393d 100644
--- a/player/plasmoid/gamesoverlay.cpp
+++ b/player/plasmoid/gamesoverlay.cpp
@@ -33,11 +33,11 @@ GamesOverlay::GamesOverlay(QGraphicsItem* parent, Qt::WindowFlags wFlags)
     m_gamesView = new GamesView(this);
     connect(m_gamesView, SIGNAL(gameToPlaySelected(QModelIndex)), SIGNAL(gameToPlaySelected(QModelIndex)));
     connect(m_gamesView, SIGNAL(gameSelected(QModelIndex)), SIGNAL(gameSelected(QModelIndex)));
-    m_tabBar->addTab(KIcon("applications-games"), "Installed", m_gamesView);
+    m_tabBar->addTab(KIcon("applications-games"), i18n("Installed"), m_gamesView);
 
     Plasma::Label *m_tempLabel = new Plasma::Label(this);
-    m_tempLabel->setText("Coming Soon!");
-    m_tabBar->addTab(KIcon("get-hot-new-stuff"), "Available", m_tempLabel);
+    m_tempLabel->setText(i18n("Coming Soon!"));
+    m_tabBar->addTab(KIcon("get-hot-new-stuff"), i18n("Available"), m_tempLabel);
 
     QGraphicsLinearLayout *layout = new QGraphicsLinearLayout(Qt::Vertical);
     layout->addItem(m_tabBar);
diff --git a/player/plasmoid/views/gamesviewitem.cpp b/player/plasmoid/views/gamesviewitem.cpp
index ec34484..1fd889a 100644
--- a/player/plasmoid/views/gamesviewitem.cpp
+++ b/player/plasmoid/views/gamesviewitem.cpp
@@ -81,7 +81,7 @@ void GamesViewItem::setToolTips()
     Plasma::ToolTipContent data;
     data.setImage(m_preview->icon());
     data.setMainText(m_gameName->text());
-    data.setSubText("Click here to Start the game");
+    data.setSubText(i18n("Click here to Start the game"));
     Plasma::ToolTipManager::self()->setContent(m_playButton, data);
 }
 
-- 
1.7.1



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/