Add English and Russian ChatGUI interface translations

This commit is contained in:
evgeny committed 2026-10-05 16:55:43 +02:00
1 parent 972c6b7f0a
commit 27d93ecaf9
50 files changed
+4978 -491

No files matched your search

+8 -7
View File
@@ -1,3 +1,4 @@
#include <QCoreApplication>
#include "channellist.h"
#include "channeldelegate.h"
#include "../db/db_manager.h"
@@ -146,7 +147,7 @@ ChannelList::ChannelList(DbManager* db, QWidget *parent)
layout->setContentsMargins(0, 0, 0, 0);
layout->setSpacing(0);
auto *header = new QLabel("Channels", this);
auto *header = new QLabel(QCoreApplication::translate("ChatGui", "Channels"), this);
header->setAlignment(Qt::AlignCenter);
header->setStyleSheet("font-weight: bold; padding: 8px; background: palette(window);");
layout->addWidget(header);
@@ -167,7 +168,7 @@ ChannelList::ChannelList(DbManager* db, QWidget *parent)
auto *gearBtn = new QPushButton(QString::fromUtf8("\xE2\x9A\x99"), footer);
gearBtn->setFixedSize(28, 28);
gearBtn->setToolTip(QString::fromUtf8("Настройки"));
gearBtn->setToolTip(QCoreApplication::translate("ChatGui", "Settings"));
gearBtn->setStyleSheet(
"QPushButton { border: none; font-size: 18px; background: transparent; color: #666; }"
"QPushButton:hover { color: #3390EC; background: rgba(51,144,236,20); border-radius: 14px; }");
@@ -177,7 +178,7 @@ ChannelList::ChannelList(DbManager* db, QWidget *parent)
auto *monitorBtn = new QPushButton(QString::fromUtf8("\xF0\x9F\x94\x8D"), footer); /* 🔍 */
monitorBtn->setFixedSize(28, 28);
monitorBtn->setToolTip(QString::fromUtf8("Connection Monitor"));
monitorBtn->setToolTip(QCoreApplication::translate("ChatGui", "Connection Monitor"));
monitorBtn->setStyleSheet(
"QPushButton { border: none; font-size: 16px; background: transparent; color: #666; }"
"QPushButton:hover { color: #3390EC; background: rgba(51,144,236,20); border-radius: 14px; }");
@@ -186,9 +187,9 @@ ChannelList::ChannelList(DbManager* db, QWidget *parent)
fl->addStretch();
auto *createBtn = new QPushButton("GRP", footer);
auto *createBtn = new QPushButton(QCoreApplication::translate("ChatGui", "GRP"), footer);
createBtn->setFixedSize(36, 28);
createBtn->setToolTip(QString::fromUtf8("Создать группу"));
createBtn->setToolTip(QCoreApplication::translate("ChatGui", "Create group"));
createBtn->setStyleSheet(
"QPushButton { border: none; border-radius: 6px; font-size: 11px; font-weight: bold;"
" color: white; background: #27AE60; }"
@@ -198,7 +199,7 @@ ChannelList::ChannelList(DbManager* db, QWidget *parent)
auto *plusBtn = new QPushButton("+", footer);
plusBtn->setFixedSize(28, 28);
plusBtn->setToolTip(QString::fromUtf8("Присоединиться"));
plusBtn->setToolTip(QCoreApplication::translate("ChatGui", "Join"));
plusBtn->setStyleSheet(
"QPushButton { border: none; border-radius: 14px; font-size: 18px; font-weight: bold;"
" color: white; background: #3390EC; }"
@@ -294,7 +295,7 @@ void ChannelList::loadChannels() {
auto dms = m_db->getDmConversations();
if (!dms.isEmpty()) {
auto *section = new QStandardItem();
section->setData(QStringLiteral("Личные"), ChannelNameRole);
section->setData(QCoreApplication::translate("ChatGui", "Direct messages"), ChannelNameRole);
section->setData(true, ChannelIsSectionRole);
section->setFlags(Qt::NoItemFlags);
m_model->appendRow(section);