mirror of
https://github.com/qTox/qTox.git
synced 2024-03-22 14:00:36 +08:00
Merge branch 'upstream/master'
This commit is contained in:
commit
135ab3ba0f
|
@ -12,6 +12,8 @@ TEMPLATE = app
|
|||
FORMS += widget.ui
|
||||
CONFIG += c++11
|
||||
|
||||
TRANSLATIONS = translations/fr.ts
|
||||
|
||||
RESOURCES += \
|
||||
res.qrc
|
||||
|
||||
|
|
BIN
translations/fr.qm
Normal file
BIN
translations/fr.qm
Normal file
Binary file not shown.
289
translations/fr.ts
Normal file
289
translations/fr.ts
Normal file
|
@ -0,0 +1,289 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE TS>
|
||||
<TS version="2.0" language="fr_FR">
|
||||
<context>
|
||||
<name>AddFriendForm</name>
|
||||
<message>
|
||||
<location filename="../widget/form/addfriendform.cpp" line="15"/>
|
||||
<source>Add Friends</source>
|
||||
<translation>Ajouter des amis</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/form/addfriendform.cpp" line="18"/>
|
||||
<source>Tox ID</source>
|
||||
<comment>Tox ID of the person you're sending a friend request to</comment>
|
||||
<translation>ID Tox</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/form/addfriendform.cpp" line="19"/>
|
||||
<source>Message</source>
|
||||
<comment>The message you send in friend requests</comment>
|
||||
<translation>Message</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/form/addfriendform.cpp" line="20"/>
|
||||
<source>Send friend request</source>
|
||||
<translation>Envoyer une demande d'ami</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/form/addfriendform.cpp" line="67"/>
|
||||
<source>Tox me maybe?</source>
|
||||
<comment>Default message in friend requests if the field is left blank. Write something appropriate!</comment>
|
||||
<translation>Je souhaiterais vous ajouter en tant qu'ami</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/form/addfriendform.cpp" line="75"/>
|
||||
<source>Please fill in a valid Tox ID</source>
|
||||
<comment>Tox ID of the friend you're sending a friend request to</comment>
|
||||
<translation>Merci d'écrire un ID Tox valide</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/form/addfriendform.cpp" line="90"/>
|
||||
<source>Error while looking up DNS</source>
|
||||
<comment>The DNS gives the Tox ID associated to toxme.se addresses</comment>
|
||||
<translation>Erreur en consultant le serveur DNS</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/form/addfriendform.cpp" line="96"/>
|
||||
<source>Unexpected number of text records</source>
|
||||
<comment>Error with the DNS</comment>
|
||||
<translation>Nombre d'entrées texte innatendu</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/form/addfriendform.cpp" line="102"/>
|
||||
<source>Unexpected number of values in text record</source>
|
||||
<comment>Error with the DNS</comment>
|
||||
<translation>Nombre d'entrées numétiques innetendues dans l'entrée texte</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/form/addfriendform.cpp" line="109"/>
|
||||
<source>The DNS lookup does not contain any Tox ID</source>
|
||||
<comment>Error with the DNS</comment>
|
||||
<translation>La requête DNS ne contient aucun ID Tox</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/form/addfriendform.cpp" line="115"/>
|
||||
<location filename="../widget/form/addfriendform.cpp" line="121"/>
|
||||
<source>The DNS lookup does not contain a valid Tox ID</source>
|
||||
<comment>Error with the DNS</comment>
|
||||
<translation>La requête DNS ne contient pas d'ID Tox valide</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>Camera</name>
|
||||
<message>
|
||||
<location filename="../widget/camera.cpp" line="145"/>
|
||||
<source>Camera eror</source>
|
||||
<translation>Erreur de caméra</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/camera.cpp" line="146"/>
|
||||
<source>Camera format %1 not supported, can't use the camera</source>
|
||||
<translation>Format de caméra %1 non supporté, impossible d'utiliser la caméra</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>ChatForm</name>
|
||||
<message>
|
||||
<location filename="../widget/form/chatform.cpp" line="261"/>
|
||||
<source>Send a file</source>
|
||||
<translation>Envoyer un fichier</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/form/chatform.cpp" line="586"/>
|
||||
<location filename="../widget/form/chatform.cpp" line="592"/>
|
||||
<source>Save chat log</source>
|
||||
<translation>Sauvegarder l'historique de conversation</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>CopyableElideLabel</name>
|
||||
<message>
|
||||
<location filename="../widget/tool/copyableelidelabel.cpp" line="29"/>
|
||||
<source>Copy</source>
|
||||
<translation>Copier</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>FileTransfertWidget</name>
|
||||
<message>
|
||||
<location filename="../widget/filetransfertwidget.cpp" line="231"/>
|
||||
<source>Save a file</source>
|
||||
<comment>Title of the file saving dialog</comment>
|
||||
<translation>Sauvegarder le fichier</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>FriendRequestDialog</name>
|
||||
<message>
|
||||
<location filename="../widget/tool/friendrequestdialog.cpp" line="30"/>
|
||||
<source>Friend request</source>
|
||||
<comment>Title of the window to aceept/deny a friend request</comment>
|
||||
<translation>Demande d'ami</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/tool/friendrequestdialog.cpp" line="32"/>
|
||||
<source>Someone wants to make friends with you</source>
|
||||
<translation>Quelqu'un veut devenir votre ami</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/tool/friendrequestdialog.cpp" line="33"/>
|
||||
<source>User ID:</source>
|
||||
<translation>ID utilisateur:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/tool/friendrequestdialog.cpp" line="37"/>
|
||||
<source>Friend request message:</source>
|
||||
<translation>Message de la demande: </translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/tool/friendrequestdialog.cpp" line="44"/>
|
||||
<source>Accept</source>
|
||||
<comment>Accept a friend request</comment>
|
||||
<translation>Accepter</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/tool/friendrequestdialog.cpp" line="45"/>
|
||||
<source>Reject</source>
|
||||
<comment>Reject a friend request</comment>
|
||||
<translation>Rejeter</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>FriendWidget</name>
|
||||
<message>
|
||||
<location filename="../widget/friendwidget.cpp" line="65"/>
|
||||
<source>Copy friend ID</source>
|
||||
<comment>Menu to copy the Tox ID of that friend</comment>
|
||||
<translation>Copier l'ID ami</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/friendwidget.cpp" line="66"/>
|
||||
<source>Invite in group</source>
|
||||
<comment>Menu to invite a friend in a groupchat</comment>
|
||||
<translation>Inviter dans un groupe</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/friendwidget.cpp" line="76"/>
|
||||
<source>Remove friend</source>
|
||||
<comment>Menu to remove the friend from our friendlist</comment>
|
||||
<translation>Supprimer ami</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>GroupChatForm</name>
|
||||
<message>
|
||||
<location filename="../widget/form/groupchatform.cpp" line="155"/>
|
||||
<source><Unknown></source>
|
||||
<translation><Inconnu></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/form/groupchatform.cpp" line="220"/>
|
||||
<source>%1 users in chat</source>
|
||||
<translation>%1 personnes</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/form/groupchatform.cpp" line="239"/>
|
||||
<source>Save chat log</source>
|
||||
<translation>Sauvegarder l'historique de conversation</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>GroupWidget</name>
|
||||
<message>
|
||||
<location filename="../widget/groupwidget.cpp" line="68"/>
|
||||
<source>Quit group</source>
|
||||
<comment>Menu to quit a groupchat</comment>
|
||||
<translation>Quitter le groupe</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/groupwidget.cpp" line="126"/>
|
||||
<source>%1 users in chat</source>
|
||||
<translation>%1 personnes</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/groupwidget.cpp" line="128"/>
|
||||
<source>0 users in chat</source>
|
||||
<translation>0 personnes</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>SettingsForm</name>
|
||||
<message>
|
||||
<location filename="../widget/form/settingsform.cpp" line="13"/>
|
||||
<source>User Settings</source>
|
||||
<comment>"Headline" of the window</comment>
|
||||
<translation>Configuration</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/form/settingsform.cpp" line="16"/>
|
||||
<source>Name</source>
|
||||
<comment>Username/nick</comment>
|
||||
<translation>Nom</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/form/settingsform.cpp" line="17"/>
|
||||
<source>Status</source>
|
||||
<comment>Status message</comment>
|
||||
<translation>Status</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/form/settingsform.cpp" line="22"/>
|
||||
<source>Test video</source>
|
||||
<comment>Text on a button to test the video/webcam</comment>
|
||||
<translation>Tester la vidéo</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/form/settingsform.cpp" line="23"/>
|
||||
<source>Enable IPv6 (recommended)</source>
|
||||
<comment>Text on a checkbox to enable IPv6</comment>
|
||||
<translation>Activé l'IPv6 (recommandé)</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>Widget</name>
|
||||
<message>
|
||||
<location filename="../widget.ui" line="20"/>
|
||||
<source>Tox</source>
|
||||
<translation>Tox</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget.ui" line="1593"/>
|
||||
<source>Your name</source>
|
||||
<translation>Votre nom</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget.ui" line="1675"/>
|
||||
<source>Your status</source>
|
||||
<translation>Votre status</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget.ui" line="2811"/>
|
||||
<source>Close</source>
|
||||
<translation>Fermer</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget.ui" line="2814"/>
|
||||
<source>Ctrl+Q</source>
|
||||
<translation>Ctrl+Q</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/widget.cpp" line="1112"/>
|
||||
<source>Online</source>
|
||||
<comment>Button to set your status to 'Online'</comment>
|
||||
<translation>Connecté</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/widget.cpp" line="1113"/>
|
||||
<source>Away</source>
|
||||
<comment>Button to set your status to 'Away'</comment>
|
||||
<translation>Absent</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/widget.cpp" line="1114"/>
|
||||
<source>Busy</source>
|
||||
<comment>Button to set your status to 'Busy'</comment>
|
||||
<translation>Occupé</translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
|
@ -142,8 +142,8 @@ bool Camera::isFormatSupported(const QVideoSurfaceFormat& format) const
|
|||
}
|
||||
else
|
||||
{
|
||||
QMessageBox::warning(0, "Camera eror",
|
||||
QString("Camera format %1 not supported, can't use the camera")
|
||||
QMessageBox::warning(0, tr("Camera eror"),
|
||||
tr("Camera format %1 not supported, can't use the camera")
|
||||
.arg(format.pixelFormat()));
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -228,7 +228,7 @@ void FileTransfertWidget::rejectRecvRequest()
|
|||
|
||||
void FileTransfertWidget::acceptRecvRequest()
|
||||
{
|
||||
QString path = QFileDialog::getSaveFileName(0,"Save a file",QDir::currentPath()+'/'+filename->text());
|
||||
QString path = QFileDialog::getSaveFileName(0,tr("Save a file","Title of the file saving dialog"),QDir::currentPath()+'/'+filename->text());
|
||||
if (path.isEmpty())
|
||||
return;
|
||||
|
||||
|
|
|
@ -12,12 +12,12 @@ AddFriendForm::AddFriendForm() : dns(this)
|
|||
main = new QWidget(), head = new QWidget();
|
||||
QFont bold;
|
||||
bold.setBold(true);
|
||||
headLabel.setText("Add Friends");
|
||||
headLabel.setText(tr("Add Friends"));
|
||||
headLabel.setFont(bold);
|
||||
|
||||
toxIdLabel.setText("Tox ID");
|
||||
messageLabel.setText("Message");
|
||||
sendButton.setText("Send friend request");
|
||||
toxIdLabel.setText(tr("Tox ID","Tox ID of the person you're sending a friend request to"));
|
||||
messageLabel.setText(tr("Message","The message you send in friend requests"));
|
||||
sendButton.setText(tr("Send friend request"));
|
||||
|
||||
main->setLayout(&layout);
|
||||
layout.addWidget(&toxIdLabel);
|
||||
|
@ -64,7 +64,7 @@ void AddFriendForm::showWarning(const QString &message) const
|
|||
QString AddFriendForm::getMessage() const
|
||||
{
|
||||
const QString msg = message.toPlainText();
|
||||
return !msg.isEmpty() ? msg : "Tox me maybe?";
|
||||
return !msg.isEmpty() ? msg : tr("Tox me maybe?","Default message in friend requests if the field is left blank. Write something appropriate!");
|
||||
}
|
||||
|
||||
void AddFriendForm::onSendTriggered()
|
||||
|
@ -72,7 +72,7 @@ void AddFriendForm::onSendTriggered()
|
|||
QString id = toxId.text().trimmed();
|
||||
|
||||
if (id.isEmpty()) {
|
||||
showWarning("Please fill in a valid Tox ID");
|
||||
showWarning(tr("Please fill in a valid Tox ID","Tox ID of the friend you're sending a friend request to"));
|
||||
} else if (isToxId(id)) {
|
||||
emit friendRequested(id, getMessage());
|
||||
} else {
|
||||
|
@ -87,38 +87,38 @@ void AddFriendForm::handleDnsLookup()
|
|||
const QString idKeyWord("id=");
|
||||
|
||||
if (dns.error() != QDnsLookup::NoError) {
|
||||
showWarning("Error while looking up DNS");
|
||||
showWarning(tr("Error while looking up DNS","The DNS gives the Tox ID associated to toxme.se addresses"));
|
||||
return;
|
||||
}
|
||||
|
||||
const QList<QDnsTextRecord> textRecords = dns.textRecords();
|
||||
if (textRecords.length() != 1) {
|
||||
showWarning("Unexpected number of text records");
|
||||
showWarning(tr("Unexpected number of text records", "Error with the DNS"));
|
||||
return;
|
||||
}
|
||||
|
||||
const QList<QByteArray> textRecordValues = textRecords.first().values();
|
||||
if (textRecordValues.length() != 1) {
|
||||
showWarning("Unexpected number of values in text record");
|
||||
showWarning(tr("Unexpected number of values in text record", "Error with the DNS"));
|
||||
return;
|
||||
}
|
||||
|
||||
const QString entry(textRecordValues.first());
|
||||
int idx = entry.indexOf(idKeyWord);
|
||||
if (idx < 0) {
|
||||
showWarning("The DNS lookup does not contain any Tox ID");
|
||||
showWarning(tr("The DNS lookup does not contain any Tox ID", "Error with the DNS"));
|
||||
return;
|
||||
}
|
||||
|
||||
idx += idKeyWord.length();
|
||||
if (entry.length() < idx + static_cast<int>(TOX_ID_SIZE)) {
|
||||
showWarning("The DNS lookup does not contain a valid Tox ID");
|
||||
showWarning(tr("The DNS lookup does not contain a valid Tox ID", "Error with the DNS"));
|
||||
return;
|
||||
}
|
||||
|
||||
const QString friendAdress = entry.mid(idx, TOX_ID_SIZE);
|
||||
if (!isToxId(friendAdress)) {
|
||||
showWarning("The DNS lookup does not contain a valid Tox ID");
|
||||
showWarning(tr("The DNS lookup does not contain a valid Tox ID", "Error with the DNS"));
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -258,7 +258,7 @@ void ChatForm::addMessage(QLabel* author, QLabel* message, QLabel* date)
|
|||
|
||||
void ChatForm::onAttachClicked()
|
||||
{
|
||||
QString path = QFileDialog::getOpenFileName(0,"Send a file");
|
||||
QString path = QFileDialog::getOpenFileName(0,tr("Send a file"));
|
||||
if (path.isEmpty())
|
||||
return;
|
||||
|
||||
|
@ -583,13 +583,13 @@ void ChatForm::onChatContextMenuRequested(QPoint pos)
|
|||
QWidget* sender = (QWidget*)QObject::sender();
|
||||
pos = sender->mapToGlobal(pos);
|
||||
QMenu menu;
|
||||
menu.addAction("Save chat log", this, SLOT(onSaveLogClicked()));
|
||||
menu.addAction(tr("Save chat log"), this, SLOT(onSaveLogClicked()));
|
||||
menu.exec(pos);
|
||||
}
|
||||
|
||||
void ChatForm::onSaveLogClicked()
|
||||
{
|
||||
QString path = QFileDialog::getSaveFileName(0,"Save chat log");
|
||||
QString path = QFileDialog::getSaveFileName(0,tr("Save chat log"));
|
||||
if (path.isEmpty())
|
||||
return;
|
||||
|
||||
|
|
|
@ -29,7 +29,7 @@ GroupChatForm::GroupChatForm(Group* chatGroup)
|
|||
name->setText(group->widget->name.text());
|
||||
name->setFont(bold);
|
||||
nusers->setFont(small);
|
||||
nusers->setText(QString("%1 users in chat").arg(group->peers.size()));
|
||||
nusers->setText(GroupChatForm::tr("%1 users in chat","Number of users in chat").arg(group->peers.size()));
|
||||
avatar->setPixmap(QPixmap(":/img/group.png"));
|
||||
QString names;
|
||||
for (QString& s : group->peers)
|
||||
|
@ -152,7 +152,7 @@ void GroupChatForm::addGroupMessage(QString message, int peerId)
|
|||
if (group->peers.contains(peerId))
|
||||
msgAuthor = new QLabel(group->peers[peerId]);
|
||||
else
|
||||
msgAuthor = new QLabel("<Unknown>");
|
||||
msgAuthor = new QLabel(tr("<Unknown>"));
|
||||
|
||||
QLabel *msgText = new QLabel(message);
|
||||
QLabel *msgDate = new QLabel(QTime::currentTime().toString("hh:mm"));
|
||||
|
@ -217,7 +217,7 @@ void GroupChatForm::onSliderRangeChanged()
|
|||
|
||||
void GroupChatForm::onUserListChanged()
|
||||
{
|
||||
nusers->setText(QString("%1 users in chat").arg(group->nPeers));
|
||||
nusers->setText(tr("%1 users in chat").arg(group->nPeers));
|
||||
QString names;
|
||||
for (QString& s : group->peers)
|
||||
names.append(s+", ");
|
||||
|
@ -236,7 +236,7 @@ void GroupChatForm::onChatContextMenuRequested(QPoint pos)
|
|||
|
||||
void GroupChatForm::onSaveLogClicked()
|
||||
{
|
||||
QString path = QFileDialog::getSaveFileName(0,"Save chat log");
|
||||
QString path = QFileDialog::getSaveFileName(0,tr("Save chat log"));
|
||||
if (path.isEmpty())
|
||||
return;
|
||||
|
||||
|
|
|
@ -10,17 +10,17 @@ SettingsForm::SettingsForm()
|
|||
QFont bold, small;
|
||||
bold.setBold(true);
|
||||
small.setPixelSize(7);
|
||||
headLabel.setText("User Settings");
|
||||
headLabel.setText(tr("User Settings","\"Headline\" of the window"));
|
||||
headLabel.setFont(bold);
|
||||
|
||||
nameLabel.setText("Name");
|
||||
statusTextLabel.setText("Status");
|
||||
nameLabel.setText(tr("Name","Username/nick"));
|
||||
statusTextLabel.setText(tr("Status","Status message"));
|
||||
idLabel.setText("Tox ID");
|
||||
id.setFont(small);
|
||||
id.setTextInteractionFlags(Qt::TextSelectableByMouse);
|
||||
|
||||
videoTest.setText("Test video");
|
||||
enableIPv6.setText("Enable IPv6 (recommended)");
|
||||
videoTest.setText(tr("Test video","Text on a button to test the video/webcam"));
|
||||
enableIPv6.setText(tr("Enable IPv6 (recommended)","Text on a checkbox to enable IPv6"));
|
||||
enableIPv6.setChecked(Settings::getInstance().getEnableIPv6());
|
||||
|
||||
main->setLayout(&layout);
|
||||
|
|
|
@ -62,8 +62,8 @@ void FriendWidget::contextMenuEvent(QContextMenuEvent * event)
|
|||
{
|
||||
QPoint pos = event->globalPos();
|
||||
QMenu menu;
|
||||
menu.addAction("Copy friend ID");
|
||||
QMenu* inviteMenu = menu.addMenu("Invite in group");
|
||||
menu.addAction(tr("Copy friend ID","Menu to copy the Tox ID of that friend"));
|
||||
QMenu* inviteMenu = menu.addMenu(tr("Invite in group","Menu to invite a friend in a groupchat"));
|
||||
QMap<QAction*, Group*> groupActions;
|
||||
for (Group* group : GroupList::groupList)
|
||||
{
|
||||
|
@ -73,7 +73,7 @@ void FriendWidget::contextMenuEvent(QContextMenuEvent * event)
|
|||
if (groupActions.isEmpty())
|
||||
inviteMenu->setEnabled(false);
|
||||
menu.addSeparator();
|
||||
menu.addAction("Remove friend");
|
||||
menu.addAction(tr("Remove friend", "Menu to remove the friend from our friendlist"));
|
||||
|
||||
QAction* selectedItem = menu.exec(pos);
|
||||
if (selectedItem)
|
||||
|
|
|
@ -35,9 +35,9 @@ GroupWidget::GroupWidget(int GroupId, QString Name)
|
|||
this->setPalette(pal3);
|
||||
Group* g = GroupList::findGroup(groupId);
|
||||
if (g)
|
||||
nusers.setText(QString("%1 users in chat").arg(g->peers.size()));
|
||||
nusers.setText(GroupWidget::tr("%1 users in chat").arg(g->peers.size()));
|
||||
else
|
||||
nusers.setText("0 users in chat");
|
||||
nusers.setText(GroupWidget::tr("0 users in chat"));
|
||||
|
||||
textLayout.addStretch();
|
||||
textLayout.addWidget(&name);
|
||||
|
@ -65,7 +65,7 @@ void GroupWidget::contextMenuEvent(QContextMenuEvent * event)
|
|||
{
|
||||
QPoint pos = event->globalPos();
|
||||
QMenu menu;
|
||||
menu.addAction("Quit group");
|
||||
menu.addAction(tr("Quit group","Menu to quit a groupchat"));
|
||||
|
||||
QAction* selectedItem = menu.exec(pos);
|
||||
if (selectedItem)
|
||||
|
@ -123,9 +123,9 @@ void GroupWidget::onUserListChanged()
|
|||
{
|
||||
Group* g = GroupList::findGroup(groupId);
|
||||
if (g)
|
||||
nusers.setText(QString("%1 users in chat").arg(g->nPeers));
|
||||
nusers.setText(tr("%1 users in chat").arg(g->nPeers));
|
||||
else
|
||||
nusers.setText("0 users in chat");
|
||||
nusers.setText(tr("0 users in chat"));
|
||||
}
|
||||
|
||||
void GroupWidget::setAsActiveChatroom()
|
||||
|
|
|
@ -13,7 +13,7 @@ SelfCamView::SelfCamView(Camera* Cam, QWidget* parent)
|
|||
mainLayout{new QHBoxLayout()}, cam(Cam)
|
||||
{
|
||||
setLayout(mainLayout);
|
||||
setWindowTitle("Tox video test");
|
||||
setWindowTitle(SelfCamView::tr("Tox video test","Title of the window to test the video/webcam"));
|
||||
setMinimumSize(320,240);
|
||||
|
||||
updateDisplayTimer.setInterval(5);
|
||||
|
|
|
@ -26,7 +26,7 @@ CopyableElideLabel::CopyableElideLabel(QWidget* parent) :
|
|||
setContextMenuPolicy(Qt::CustomContextMenu);
|
||||
connect(this, &CopyableElideLabel::customContextMenuRequested, this, &CopyableElideLabel::showContextMenu);
|
||||
|
||||
actionCopy = new QAction(tr("Copy"), this);
|
||||
actionCopy = new QAction(CopyableElideLabel::tr("Copy"), this);
|
||||
connect(actionCopy, &QAction::triggered, [this]() {
|
||||
QApplication::clipboard()->setText(text());
|
||||
});
|
||||
|
|
|
@ -21,6 +21,7 @@
|
|||
|
||||
class CopyableElideLabel : public ElideLabel
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit CopyableElideLabel(QWidget* parent = 0);
|
||||
|
||||
|
|
|
@ -27,22 +27,22 @@ FriendRequestDialog::FriendRequestDialog(QWidget *parent, const QString &userId,
|
|||
QDialog(parent)
|
||||
{
|
||||
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
|
||||
setWindowTitle("Friend request");
|
||||
setWindowTitle(tr("Friend request","Title of the window to aceept/deny a friend request"));
|
||||
|
||||
QLabel *friendsLabel = new QLabel("Someone wants to make friends with you.", this);
|
||||
QLabel *userIdLabel = new QLabel("User ID:", this);
|
||||
QLabel *friendsLabel = new QLabel(tr("Someone wants to make friends with you"), this);
|
||||
QLabel *userIdLabel = new QLabel(tr("User ID:"), this);
|
||||
QLineEdit *userIdEdit = new QLineEdit(userId, this);
|
||||
userIdEdit->setCursorPosition(0);
|
||||
userIdEdit->setReadOnly(true);
|
||||
QLabel *messageLabel = new QLabel("Friend request message:", this);
|
||||
QLabel *messageLabel = new QLabel(tr("Friend request message:"), this);
|
||||
QPlainTextEdit *messageEdit = new QPlainTextEdit(message, this);
|
||||
messageEdit->setReadOnly(true);
|
||||
|
||||
|
||||
QDialogButtonBox *buttonBox = new QDialogButtonBox(Qt::Horizontal, this);
|
||||
|
||||
buttonBox->addButton("Accept", QDialogButtonBox::AcceptRole);
|
||||
buttonBox->addButton("Reject", QDialogButtonBox::RejectRole);
|
||||
buttonBox->addButton(tr("Accept","Accept a friend request"), QDialogButtonBox::AcceptRole);
|
||||
buttonBox->addButton(tr("Reject","Reject a friend request"), QDialogButtonBox::RejectRole);
|
||||
|
||||
connect(buttonBox, &QDialogButtonBox::accepted, this, &FriendRequestDialog::accept);
|
||||
connect(buttonBox, &QDialogButtonBox::rejected, this, &FriendRequestDialog::reject);
|
||||
|
|
|
@ -1109,9 +1109,9 @@ void Widget::minimizeBtnClicked()
|
|||
void Widget::onStatusImgClicked()
|
||||
{
|
||||
QMenu menu;
|
||||
menu.addAction("Online");
|
||||
menu.addAction("Away");
|
||||
menu.addAction("Busy");
|
||||
menu.addAction(tr("Online","Button to set your status to 'Online'"));
|
||||
menu.addAction(tr("Away","Button to set your status to 'Away'"));
|
||||
menu.addAction(tr("Busy","Button to set your status to 'Busy'"));
|
||||
|
||||
QPoint pos = QCursor::pos();
|
||||
QAction* selectedItem = menu.exec(pos);
|
||||
|
|
Loading…
Reference in New Issue
Block a user