Commit eb927d77 authored by Max-Wilhelm Bruker's avatar Max-Wilhelm Bruker
Browse files

updated German translation; added some missing retranslateUi() calls

parent 95cd293b
...@@ -22,6 +22,11 @@ ChatView::ChatView(const TabSupervisor *_tabSupervisor, TabGame *_game, bool _sh ...@@ -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();
......
...@@ -32,6 +32,7 @@ private slots: ...@@ -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:
......
...@@ -106,6 +106,7 @@ TabRoom::~TabRoom() ...@@ -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"));
......
...@@ -97,21 +97,26 @@ TabSupervisor::~TabSupervisor() ...@@ -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
......
...@@ -22,15 +22,30 @@ UserContextMenu::UserContextMenu(const TabSupervisor *_tabSupervisor, QWidget *p ...@@ -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)
......
...@@ -35,6 +35,7 @@ private slots: ...@@ -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);
}; };
......
This diff is collapsed.
Supports Markdown
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