updated German translation; added some missing retranslateUi() calls

This commit is contained in:
Max-Wilhelm Bruker 2012-04-08 23:58:25 +02:00
parent 95cd293b9c
commit eb927d77c3
7 changed files with 437 additions and 372 deletions

View file

@ -22,6 +22,11 @@ ChatView::ChatView(const TabSupervisor *_tabSupervisor, TabGame *_game, bool _sh
connect(this, SIGNAL(anchorClicked(const QUrl &)), this, SLOT(openLink(const QUrl &))); connect(this, SIGNAL(anchorClicked(const QUrl &)), this, SLOT(openLink(const QUrl &)));
} }
void ChatView::retranslateUi()
{
userContextMenu->retranslateUi();
}
QTextCursor ChatView::prepareBlock(bool same) QTextCursor ChatView::prepareBlock(bool same)
{ {
lastSender.clear(); lastSender.clear();

View file

@ -32,6 +32,7 @@ private slots:
void openLink(const QUrl &link); void openLink(const QUrl &link);
public: public:
ChatView(const TabSupervisor *_tabSupervisor, TabGame *_game, bool _showTimestamps, QWidget *parent = 0); ChatView(const TabSupervisor *_tabSupervisor, TabGame *_game, bool _showTimestamps, QWidget *parent = 0);
void retranslateUi();
void appendHtml(const QString &html); void appendHtml(const QString &html);
void appendMessage(QString message, QString sender = QString(), UserLevelFlags userLevel = UserLevelFlags(), bool playerBold = false); void appendMessage(QString message, QString sender = QString(), UserLevelFlags userLevel = UserLevelFlags(), bool playerBold = false);
protected: protected:

View file

@ -106,6 +106,7 @@ TabRoom::~TabRoom()
void TabRoom::retranslateUi() void TabRoom::retranslateUi()
{ {
gameSelector->retranslateUi(); gameSelector->retranslateUi();
chatView->retranslateUi();
sayLabel->setText(tr("&Say:")); sayLabel->setText(tr("&Say:"));
chatGroupBox->setTitle(tr("Chat")); chatGroupBox->setTitle(tr("Chat"));
tabMenu->setTitle(tr("&Room")); tabMenu->setTitle(tr("&Room"));

View file

@ -97,21 +97,26 @@ TabSupervisor::~TabSupervisor()
void TabSupervisor::retranslateUi() void TabSupervisor::retranslateUi()
{ {
QList<Tab *> tabs; QList<Tab *> tabs;
if (tabServer) tabs.append(tabServer);
tabs.append(tabServer); tabs.append(tabReplays);
if (tabDeckStorage) tabs.append(tabDeckStorage);
tabs.append(tabDeckStorage); tabs.append(tabAdmin);
tabs.append(tabUserLists);
QMapIterator<int, TabRoom *> roomIterator(roomTabs); QMapIterator<int, TabRoom *> roomIterator(roomTabs);
while (roomIterator.hasNext()) while (roomIterator.hasNext())
tabs.append(roomIterator.next().value()); tabs.append(roomIterator.next().value());
QMapIterator<int, TabGame *> gameIterator(gameTabs); QMapIterator<int, TabGame *> gameIterator(gameTabs);
while (gameIterator.hasNext()) while (gameIterator.hasNext())
tabs.append(gameIterator.next().value()); tabs.append(gameIterator.next().value());
QListIterator<TabGame *> replayIterator(replayTabs);
while (replayIterator.hasNext())
tabs.append(replayIterator.next());
for (int i = 0; i < tabs.size(); ++i) { for (int i = 0; i < tabs.size(); ++i)
setTabText(indexOf(tabs[i]), tabs[i]->getTabText()); if (tabs[i]) {
tabs[i]->retranslateUi(); setTabText(indexOf(tabs[i]), tabs[i]->getTabText());
} tabs[i]->retranslateUi();
}
} }
AbstractClient *TabSupervisor::getClient() const AbstractClient *TabSupervisor::getClient() const

View file

@ -22,15 +22,30 @@ UserContextMenu::UserContextMenu(const TabSupervisor *_tabSupervisor, QWidget *p
{ {
aUserName = new QAction(QString(), this); aUserName = new QAction(QString(), this);
aUserName->setEnabled(false); aUserName->setEnabled(false);
aDetails = new QAction(tr("User &details"), this); aDetails = new QAction(QString(), this);
aChat = new QAction(tr("Direct &chat"), this); aChat = new QAction(QString(), this);
aShowGames = new QAction(tr("Show this user's &games"), this); aShowGames = new QAction(QString(), this);
aAddToBuddyList = new QAction(tr("Add to &buddy list"), this); aAddToBuddyList = new QAction(QString(), this);
aRemoveFromBuddyList = new QAction(tr("Remove from &buddy list"), this); aRemoveFromBuddyList = new QAction(QString(), this);
aAddToIgnoreList = new QAction(tr("Add to &ignore list"), this); aAddToIgnoreList = new QAction(QString(), this);
aRemoveFromIgnoreList = new QAction(tr("Remove from &ignore list"), this); aRemoveFromIgnoreList = new QAction(QString(), this);
aKick = new QAction(tr("Kick from &game"), this); aKick = new QAction(QString(), this);
aBan = new QAction(tr("Ban from &server"), this); aBan = new QAction(QString(), this);
retranslateUi();
}
void UserContextMenu::retranslateUi()
{
aDetails->setText(tr("User &details"));
aChat->setText(tr("Direct &chat"));
aShowGames->setText(tr("Show this user's &games"));
aAddToBuddyList->setText(tr("Add to &buddy list"));
aRemoveFromBuddyList->setText(tr("Remove from &buddy list"));
aAddToIgnoreList->setText(tr("Add to &ignore list"));
aRemoveFromIgnoreList->setText(tr("Remove from &ignore list"));
aKick->setText(tr("Kick from &game"));
aBan->setText(tr("Ban from &server"));
} }
void UserContextMenu::gamesOfUserReceived(const Response &resp, const CommandContainer &commandContainer) void UserContextMenu::gamesOfUserReceived(const Response &resp, const CommandContainer &commandContainer)

View file

@ -35,6 +35,7 @@ private slots:
void gamesOfUserReceived(const Response &resp, const CommandContainer &commandContainer); void gamesOfUserReceived(const Response &resp, const CommandContainer &commandContainer);
public: public:
UserContextMenu(const TabSupervisor *_tabSupervisor, QWidget *_parent, TabGame *_game = 0); UserContextMenu(const TabSupervisor *_tabSupervisor, QWidget *_parent, TabGame *_game = 0);
void retranslateUi();
void showContextMenu(const QPoint &pos, const QString &userName, UserLevelFlags userLevel, int playerId = -1); void showContextMenu(const QPoint &pos, const QString &userName, UserLevelFlags userLevel, int playerId = -1);
}; };

File diff suppressed because it is too large Load diff