1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00

Dynamic translation of call, video, mute, unmute

This commit is contained in:
TheNain38 2015-10-03 13:22:34 +02:00 committed by TheNain38
parent cfe6462fef
commit 59e8755637
2 changed files with 29 additions and 2 deletions

View File

@ -1085,5 +1085,17 @@ void ChatForm::hideNetcam()
void ChatForm::retranslateUi() void ChatForm::retranslateUi()
{ {
QString volObjectName = volButton->objectName();
QString micObjectName = micButton->objectName();
loadHistoryAction->setText(tr("Load chat history...")); loadHistoryAction->setText(tr("Load chat history..."));
if (volObjectName == QStringLiteral("green"))
volButton->setToolTip(tr("Mute call"));
else if (volObjectName == QStringLiteral("red"))
volButton->setToolTip(tr("Unmute call"));
if (micObjectName == QStringLiteral("green"))
micButton->setToolTip(tr("Mute microphone"));
else if (micObjectName == QStringLiteral("red"))
micButton->setToolTip(tr("Unmute microphone"));
} }

View File

@ -512,12 +512,27 @@ bool GenericChatForm::eventFilter(QObject* object, QEvent* event)
void GenericChatForm::retranslateUi() void GenericChatForm::retranslateUi()
{ {
QString callObjectName = callButton->objectName();
QString videoObjectName = videoButton->objectName();
if (callObjectName == QStringLiteral("green"))
callButton->setToolTip(tr("Start audio call"));
else if (callObjectName == QStringLiteral("yellow"))
callButton->setToolTip(tr("Accept audio call"));
else if (callObjectName == QStringLiteral("red"))
callButton->setToolTip(tr("End audio call"));
if (videoObjectName == QStringLiteral("green"))
videoButton->setToolTip(tr("Start video call"));
else if (videoObjectName == QStringLiteral("yellow"))
videoButton->setToolTip(tr("Accept video call"));
else if (videoObjectName == QStringLiteral("red"))
videoButton->setToolTip(tr("End video call"));
sendButton->setToolTip(tr("Send message")); sendButton->setToolTip(tr("Send message"));
emoteButton->setToolTip(tr("Smileys")); emoteButton->setToolTip(tr("Smileys"));
fileButton->setToolTip(tr("Send file(s)")); fileButton->setToolTip(tr("Send file(s)"));
screenshotButton->setToolTip(tr("Send a screenshot")); screenshotButton->setToolTip(tr("Send a screenshot"));
callButton->setToolTip(tr("Start an audio call"));
videoButton->setToolTip(tr("Start a video call"));
saveChatAction->setText(tr("Save chat log")); saveChatAction->setText(tr("Save chat log"));
clearAction->setText(tr("Clear displayed messages")); clearAction->setText(tr("Clear displayed messages"));
} }