Browse Source

Dynamic translation of call, video, mute, unmute

pull/2331/head
TheNain38 10 years ago committed by TheNain38
parent
commit
59e8755637
  1. 12
      src/widget/form/chatform.cpp
  2. 19
      src/widget/form/genericchatform.cpp

12
src/widget/form/chatform.cpp

@ -1085,5 +1085,17 @@ void ChatForm::hideNetcam() @@ -1085,5 +1085,17 @@ void ChatForm::hideNetcam()
void ChatForm::retranslateUi()
{
QString volObjectName = volButton->objectName();
QString micObjectName = micButton->objectName();
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"));
}

19
src/widget/form/genericchatform.cpp

@ -512,12 +512,27 @@ bool GenericChatForm::eventFilter(QObject* object, QEvent* event) @@ -512,12 +512,27 @@ bool GenericChatForm::eventFilter(QObject* object, QEvent* event)
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"));
emoteButton->setToolTip(tr("Smileys"));
fileButton->setToolTip(tr("Send file(s)"));
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"));
clearAction->setText(tr("Clear displayed messages"));
}

Loading…
Cancel
Save