Add English and Russian ChatGUI interface translations
This commit is contained in:
1 parent
972c6b7f0a
commit
27d93ecaf9
50 files changed
+4978
-491
No files matched your search
@@ -1,3 +1,4 @@
|
||||
#include <QCoreApplication>
|
||||
#include "memberpropsdialog.h"
|
||||
#include "../db/db_manager.h"
|
||||
#include "../transport/gui_bridge.h"
|
||||
@@ -25,7 +26,7 @@ MemberPropsDialog::MemberPropsDialog(DbManager* db, const QString& channelId,
|
||||
, m_flags(flags)
|
||||
, m_transferBtn(nullptr)
|
||||
{
|
||||
setWindowTitle("Member Properties");
|
||||
setWindowTitle(QCoreApplication::translate("ChatGui", "Member Properties"));
|
||||
setMinimumWidth(340);
|
||||
setModal(true);
|
||||
|
||||
@@ -80,52 +81,52 @@ MemberPropsDialog::MemberPropsDialog(DbManager* db, const QString& channelId,
|
||||
layout->setContentsMargins(20, 16, 20, 16);
|
||||
|
||||
auto* title = new QLabel(
|
||||
QString("Node: 0x%1").arg(nodeId, 16, 16, QChar('0')) +
|
||||
QCoreApplication::translate("ChatGui", "Node: 0x%1").arg(nodeId, 16, 16, QChar('0')) +
|
||||
(memberName.isEmpty() ? "" : QString(" (%1)").arg(memberName)),
|
||||
this);
|
||||
title->setStyleSheet("font-weight: bold; font-size: 13px;");
|
||||
layout->addWidget(title);
|
||||
|
||||
m_nickEdit = new QLineEdit(this);
|
||||
m_nickEdit->setPlaceholderText("Local nickname...");
|
||||
m_nickEdit->setPlaceholderText(QCoreApplication::translate("ChatGui", "Local nickname..."));
|
||||
m_nickEdit->setText(curNick);
|
||||
m_nickEdit->setEnabled(!isOwn);
|
||||
layout->addWidget(m_nickEdit);
|
||||
|
||||
m_adminCb = new QCheckBox("Admin", this);
|
||||
m_adminCb = new QCheckBox(QCoreApplication::translate("ChatGui", "Admin"), this);
|
||||
m_adminCb->setChecked(isAdmin);
|
||||
m_adminCb->setEnabled(haveKey);
|
||||
layout->addWidget(m_adminCb);
|
||||
|
||||
m_superCb = new QCheckBox("Supernode", this);
|
||||
m_superCb = new QCheckBox(QCoreApplication::translate("ChatGui", "Supernode"), this);
|
||||
m_superCb->setChecked(isSuper);
|
||||
m_superCb->setEnabled(haveKey);
|
||||
layout->addWidget(m_superCb);
|
||||
|
||||
m_storageCb = new QCheckBox("Storage (priority attachment keeper)", this);
|
||||
m_storageCb = new QCheckBox(QCoreApplication::translate("ChatGui", "Storage (priority attachment keeper)"), this);
|
||||
m_storageCb->setChecked(curStorage);
|
||||
m_storageCb->setEnabled(haveKey);
|
||||
layout->addWidget(m_storageCb);
|
||||
|
||||
m_verifiedCb = new QCheckBox("Verified", this);
|
||||
m_verifiedCb = new QCheckBox(QCoreApplication::translate("ChatGui", "Verified"), this);
|
||||
m_verifiedCb->setChecked(curVerified);
|
||||
m_verifiedCb->setEnabled(haveKey);
|
||||
layout->addWidget(m_verifiedCb);
|
||||
|
||||
m_deletedCb = new QCheckBox("Deleted", this);
|
||||
m_deletedCb = new QCheckBox(QCoreApplication::translate("ChatGui", "Deleted"), this);
|
||||
m_deletedCb->setChecked(curDeleted);
|
||||
m_deletedCb->setEnabled(haveKey);
|
||||
layout->addWidget(m_deletedCb);
|
||||
|
||||
if (!haveKey) {
|
||||
auto* hint = new QLabel("(Admin/Super require channel private key)", this);
|
||||
auto* hint = new QLabel(QCoreApplication::translate("ChatGui", "(Admin/Super require channel private key)"), this);
|
||||
hint->setStyleSheet("color: gray; font-size: 11px;");
|
||||
layout->addWidget(hint);
|
||||
}
|
||||
|
||||
m_transferBtn = new QPushButton("Transfer admin rights", this);
|
||||
m_transferBtn = new QPushButton(QCoreApplication::translate("ChatGui", "Transfer admin rights"), this);
|
||||
m_transferBtn->setEnabled(haveKey && !isOwn);
|
||||
m_transferBtn->setToolTip(QStringLiteral("Send the channel private key to this member (encrypted + signed)"));
|
||||
m_transferBtn->setToolTip(QCoreApplication::translate("ChatGui", "Send the channel private key to this member (encrypted + signed)"));
|
||||
m_transferBtn->setStyleSheet(
|
||||
"QPushButton { border: 1px solid palette(mid); border-radius: 4px;"
|
||||
" padding: 6px 16px; font-size: 13px; background: palette(button); }"
|
||||
@@ -139,8 +140,8 @@ MemberPropsDialog::MemberPropsDialog(DbManager* db, const QString& channelId,
|
||||
auto* btnLayout = new QHBoxLayout();
|
||||
btnLayout->addStretch();
|
||||
|
||||
auto* cancelBtn = new QPushButton("Cancel", this);
|
||||
cancelBtn->setFixedWidth(90);
|
||||
auto* cancelBtn = new QPushButton(QCoreApplication::translate("ChatGui", "Cancel"), this);
|
||||
cancelBtn->setMinimumWidth(90);
|
||||
cancelBtn->setStyleSheet(
|
||||
"QPushButton { border: 1px solid palette(mid); border-radius: 4px;"
|
||||
" padding: 6px 16px; font-size: 13px; background: palette(button); }"
|
||||
@@ -148,8 +149,8 @@ MemberPropsDialog::MemberPropsDialog(DbManager* db, const QString& channelId,
|
||||
connect(cancelBtn, &QPushButton::clicked, this, &QDialog::reject);
|
||||
btnLayout->addWidget(cancelBtn);
|
||||
|
||||
auto* saveBtn = new QPushButton("Save", this);
|
||||
saveBtn->setFixedWidth(90);
|
||||
auto* saveBtn = new QPushButton(QCoreApplication::translate("ChatGui", "Save"), this);
|
||||
saveBtn->setMinimumWidth(90);
|
||||
saveBtn->setDefault(true);
|
||||
saveBtn->setStyleSheet(
|
||||
"QPushButton { border: none; border-radius: 4px;"
|
||||
@@ -214,10 +215,10 @@ void MemberPropsDialog::onTransferAdmin() {
|
||||
QString name = m_memberName.isEmpty() ? QString("0x%1").arg(m_nodeId, 16, 16, QChar('0')) : m_memberName;
|
||||
QMessageBox::StandardButton answer = QMessageBox::question(
|
||||
this,
|
||||
QStringLiteral("Transfer admin rights"),
|
||||
QStringLiteral("Send the channel private key to \"%1\"?\n\n"
|
||||
"The key is transferred encrypted and signed. The recipient will become a co-owner "
|
||||
"and will be able to manage members.").arg(name),
|
||||
QCoreApplication::translate("ChatGui", "Transfer admin rights"),
|
||||
QCoreApplication::translate("ChatGui",
|
||||
"Send the channel private key to \"%1\"?\n\nThe key is transferred encrypted and signed. The "
|
||||
"recipient will become a co-owner and will be able to manage members.").arg(name),
|
||||
QMessageBox::Yes | QMessageBox::No,
|
||||
QMessageBox::No);
|
||||
|
||||
|
||||
Reference in new issue
Block a user