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 "audiodevicesettingspage.h"
|
||||
#include "sound_manager.h"
|
||||
#include "audiorecorder.h"
|
||||
@@ -33,14 +34,14 @@ AudioDeviceSettingsPage::AudioDeviceSettingsPage(DbManager* db, AudioRecorder* r
|
||||
formLayout->setContentsMargins(0, 0, 0, 0);
|
||||
formLayout->setSpacing(10);
|
||||
|
||||
auto* outLabel = new QLabel("Playback device:", this);
|
||||
auto* outLabel = new QLabel(QCoreApplication::translate("ChatGui", "Playback device:"), this);
|
||||
m_outputCombo = new QComboBox(this);
|
||||
m_outputCombo->setStyleSheet(
|
||||
"QComboBox { border: 1px solid palette(mid); border-radius: 4px;"
|
||||
" padding: 6px 10px; font-size: 13px; background: palette(base); }");
|
||||
formLayout->addRow(outLabel, m_outputCombo);
|
||||
|
||||
auto* inLabel = new QLabel("Recording device:", this);
|
||||
auto* inLabel = new QLabel(QCoreApplication::translate("ChatGui", "Recording device:"), this);
|
||||
m_inputCombo = new QComboBox(this);
|
||||
m_inputCombo->setStyleSheet(m_outputCombo->styleSheet());
|
||||
formLayout->addRow(inLabel, m_inputCombo);
|
||||
@@ -54,7 +55,7 @@ AudioDeviceSettingsPage::AudioDeviceSettingsPage(DbManager* db, AudioRecorder* r
|
||||
layout->addWidget(sep1);
|
||||
|
||||
/* --- Microphone test --- */
|
||||
auto* micLabel = new QLabel("Microphone test", this);
|
||||
auto* micLabel = new QLabel(QCoreApplication::translate("ChatGui", "Microphone test"), this);
|
||||
micLabel->setStyleSheet("font-size: 13px; font-weight: bold;");
|
||||
layout->addWidget(micLabel);
|
||||
|
||||
@@ -67,7 +68,7 @@ AudioDeviceSettingsPage::AudioDeviceSettingsPage(DbManager* db, AudioRecorder* r
|
||||
m_micLevelBar->setFixedHeight(16);
|
||||
micRow->addWidget(m_micLevelBar, 1);
|
||||
|
||||
m_testMicBtn = new QPushButton("Test Microphone", this);
|
||||
m_testMicBtn = new QPushButton(QCoreApplication::translate("ChatGui", "Test Microphone"), this);
|
||||
m_testMicBtn->setCheckable(true);
|
||||
m_testMicBtn->setStyleSheet(
|
||||
"QPushButton { border: 1px solid palette(mid); border-radius: 4px;"
|
||||
@@ -84,11 +85,11 @@ AudioDeviceSettingsPage::AudioDeviceSettingsPage(DbManager* db, AudioRecorder* r
|
||||
layout->addWidget(sep2);
|
||||
|
||||
/* --- Speaker test --- */
|
||||
auto* spkLabel = new QLabel("Speaker test", this);
|
||||
auto* spkLabel = new QLabel(QCoreApplication::translate("ChatGui", "Speaker test"), this);
|
||||
spkLabel->setStyleSheet("font-size: 13px; font-weight: bold;");
|
||||
layout->addWidget(spkLabel);
|
||||
|
||||
m_testSpeakerBtn = new QPushButton("Test Speaker (440Hz)", this);
|
||||
m_testSpeakerBtn = new QPushButton(QCoreApplication::translate("ChatGui", "Test Speaker (440Hz)"), this);
|
||||
m_testSpeakerBtn->setStyleSheet(
|
||||
"QPushButton { border: 1px solid palette(mid); border-radius: 4px;"
|
||||
" padding: 6px 16px; font-size: 13px; background: palette(button); }"
|
||||
@@ -103,14 +104,14 @@ AudioDeviceSettingsPage::AudioDeviceSettingsPage(DbManager* db, AudioRecorder* r
|
||||
layout->addWidget(sep3);
|
||||
|
||||
/* --- Codec quality --- */
|
||||
auto* codecLabel = new QLabel("Voice codec quality", this);
|
||||
auto* codecLabel = new QLabel(QCoreApplication::translate("ChatGui", "Voice codec quality"), this);
|
||||
codecLabel->setStyleSheet("font-size: 13px; font-weight: bold;");
|
||||
layout->addWidget(codecLabel);
|
||||
|
||||
m_codecPresetCombo = new QComboBox(this);
|
||||
m_codecPresetCombo->addItem("Low (16 kbps, fast)", 0);
|
||||
m_codecPresetCombo->addItem("Standard (32 kbps)", 1);
|
||||
m_codecPresetCombo->addItem("High (64 kbps, best)", 2);
|
||||
m_codecPresetCombo->addItem(QCoreApplication::translate("ChatGui", "Low (16 kbps, fast)"), 0);
|
||||
m_codecPresetCombo->addItem(QCoreApplication::translate("ChatGui", "Standard (32 kbps)"), 1);
|
||||
m_codecPresetCombo->addItem(QCoreApplication::translate("ChatGui", "High (64 kbps, best)"), 2);
|
||||
m_codecPresetCombo->setStyleSheet(m_outputCombo->styleSheet());
|
||||
layout->addWidget(m_codecPresetCombo);
|
||||
|
||||
@@ -121,7 +122,7 @@ AudioDeviceSettingsPage::AudioDeviceSettingsPage(DbManager* db, AudioRecorder* r
|
||||
layout->addWidget(sep5);
|
||||
|
||||
/* --- Radio (PTT) Opus --- */
|
||||
auto* radioLabel = new QLabel("Radio (PTT) — Opus", this);
|
||||
auto* radioLabel = new QLabel(QCoreApplication::translate("ChatGui", "Radio (PTT) — Opus"), this);
|
||||
radioLabel->setStyleSheet("font-size: 13px; font-weight: bold;");
|
||||
layout->addWidget(radioLabel);
|
||||
|
||||
@@ -130,20 +131,20 @@ AudioDeviceSettingsPage::AudioDeviceSettingsPage(DbManager* db, AudioRecorder* r
|
||||
radioForm->setSpacing(10);
|
||||
|
||||
m_radioOpusModeCombo = new QComboBox(this);
|
||||
m_radioOpusModeCombo->addItem("Voice (VOIP)", 0);
|
||||
m_radioOpusModeCombo->addItem("Music (AUDIO)", 1);
|
||||
m_radioOpusModeCombo->addItem(QCoreApplication::translate("ChatGui", "Voice (VOIP)"), 0);
|
||||
m_radioOpusModeCombo->addItem(QCoreApplication::translate("ChatGui", "Music (AUDIO)"), 1);
|
||||
m_radioOpusModeCombo->setStyleSheet(m_outputCombo->styleSheet());
|
||||
radioForm->addRow(new QLabel("Mode:", this), m_radioOpusModeCombo);
|
||||
radioForm->addRow(new QLabel(QCoreApplication::translate("ChatGui", "Mode:"), this), m_radioOpusModeCombo);
|
||||
|
||||
m_radioOpusBitrateCombo = new QComboBox(this);
|
||||
for (int br : {16, 32, 64, 96, 128})
|
||||
m_radioOpusBitrateCombo->addItem(QString::number(br) + " kbps", br);
|
||||
m_radioOpusBitrateCombo->addItem(QString::number(br) + QCoreApplication::translate("ChatGui", " kbps"), br);
|
||||
m_radioOpusBitrateCombo->setStyleSheet(m_outputCombo->styleSheet());
|
||||
radioForm->addRow(new QLabel("Bitrate:", this), m_radioOpusBitrateCombo);
|
||||
radioForm->addRow(new QLabel(QCoreApplication::translate("ChatGui", "Bitrate:"), this), m_radioOpusBitrateCombo);
|
||||
|
||||
layout->addLayout(radioForm);
|
||||
|
||||
m_radioCaptureStereoCb = new QCheckBox("Capture stereo (playback is always stereo)", this);
|
||||
m_radioCaptureStereoCb = new QCheckBox(QCoreApplication::translate("ChatGui", "Capture stereo (playback is always stereo)"), this);
|
||||
m_radioCaptureStereoCb->setStyleSheet("font-size: 12px;");
|
||||
layout->addWidget(m_radioCaptureStereoCb);
|
||||
|
||||
@@ -159,9 +160,9 @@ AudioDeviceSettingsPage::AudioDeviceSettingsPage(DbManager* db, AudioRecorder* r
|
||||
m_jitterReserveSpin->setDecimals(1);
|
||||
m_jitterReserveSpin->setSingleStep(0.1);
|
||||
m_jitterReserveSpin->setValue(1.0);
|
||||
m_jitterReserveSpin->setSuffix(" s");
|
||||
m_jitterReserveSpin->setToolTip("Maximum adaptive jitter reserve for calls. Applies to the next call.");
|
||||
callForm->addRow("Call: maximum jitter reserve", m_jitterReserveSpin);
|
||||
m_jitterReserveSpin->setSuffix(QCoreApplication::translate("ChatGui", " s"));
|
||||
m_jitterReserveSpin->setToolTip(QCoreApplication::translate("ChatGui", "Maximum adaptive jitter reserve for calls. Applies to the next call."));
|
||||
callForm->addRow(QCoreApplication::translate("ChatGui", "Call: maximum jitter reserve"), m_jitterReserveSpin);
|
||||
layout->addLayout(callForm);
|
||||
|
||||
buildCompressorUI(layout);
|
||||
@@ -183,19 +184,19 @@ void AudioDeviceSettingsPage::loadFromDb() {
|
||||
|
||||
/* Output devices */
|
||||
m_outputCombo->clear();
|
||||
m_outputCombo->addItem("Default (auto)", QString());
|
||||
m_outputCombo->addItem(QCoreApplication::translate("ChatGui", "Default (auto)"), QString());
|
||||
for (int i = 0; i < playbackDevs.size(); i++) {
|
||||
QString label = playbackDevs[i].name;
|
||||
if (playbackDevs[i].isDefault) label += " (default)";
|
||||
if (playbackDevs[i].isDefault) label += QCoreApplication::translate("ChatGui", " (default)");
|
||||
m_outputCombo->addItem(label, playbackDevs[i].id);
|
||||
}
|
||||
|
||||
/* Input devices */
|
||||
m_inputCombo->clear();
|
||||
m_inputCombo->addItem("Default (auto)", QString());
|
||||
m_inputCombo->addItem(QCoreApplication::translate("ChatGui", "Default (auto)"), QString());
|
||||
for (int i = 0; i < captureDevs.size(); i++) {
|
||||
QString label = captureDevs[i].name;
|
||||
if (captureDevs[i].isDefault) label += " (default)";
|
||||
if (captureDevs[i].isDefault) label += QCoreApplication::translate("ChatGui", " (default)");
|
||||
m_inputCombo->addItem(label, captureDevs[i].id);
|
||||
}
|
||||
|
||||
@@ -366,11 +367,11 @@ void AudioDeviceSettingsPage::onTestMicToggled() {
|
||||
m_testRecorder->startRecording(true);
|
||||
m_micTestActive = true;
|
||||
m_levelTimer->start();
|
||||
m_testMicBtn->setText("Stop Test");
|
||||
m_testMicBtn->setText(QCoreApplication::translate("ChatGui", "Stop Test"));
|
||||
m_micLevelBar->setValue(0);
|
||||
} else {
|
||||
stopMicTest();
|
||||
m_testMicBtn->setText("Test Microphone");
|
||||
m_testMicBtn->setText(QCoreApplication::translate("ChatGui", "Test Microphone"));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -415,15 +416,15 @@ void AudioDeviceSettingsPage::onTestSpeaker() {
|
||||
}
|
||||
|
||||
void AudioDeviceSettingsPage::buildCompressorUI(QVBoxLayout* layout) {
|
||||
auto* compLabel = new QLabel("Voice Compressor", this);
|
||||
auto* compLabel = new QLabel(QCoreApplication::translate("ChatGui", "Voice Compressor"), this);
|
||||
compLabel->setStyleSheet("font-size: 13px; font-weight: bold;");
|
||||
layout->addWidget(compLabel);
|
||||
|
||||
m_compressorEnabledCb = new QCheckBox("Enable compressor (leveler/normalizer)", this);
|
||||
m_compressorEnabledCb = new QCheckBox(QCoreApplication::translate("ChatGui", "Enable compressor (leveler/normalizer)"), this);
|
||||
m_compressorEnabledCb->setStyleSheet("font-size: 12px;");
|
||||
layout->addWidget(m_compressorEnabledCb);
|
||||
|
||||
m_aecEnabledCb = new QCheckBox("Enable echo cancellation (AEC) in calls", this);
|
||||
m_aecEnabledCb = new QCheckBox(QCoreApplication::translate("ChatGui", "Enable echo cancellation (AEC) in calls"), this);
|
||||
m_aecEnabledCb->setStyleSheet("font-size: 12px;");
|
||||
layout->addWidget(m_aecEnabledCb);
|
||||
|
||||
@@ -432,7 +433,7 @@ void AudioDeviceSettingsPage::buildCompressorUI(QVBoxLayout* layout) {
|
||||
auto* row = new QHBoxLayout();
|
||||
row->setSpacing(6);
|
||||
auto* textLabel = new QLabel(name, this);
|
||||
textLabel->setFixedWidth(180);
|
||||
textLabel->setMinimumWidth(180);
|
||||
textLabel->setStyleSheet("font-size: 12px;");
|
||||
row->addWidget(textLabel);
|
||||
slider = new QSlider(Qt::Horizontal, this);
|
||||
@@ -450,9 +451,9 @@ void AudioDeviceSettingsPage::buildCompressorUI(QVBoxLayout* layout) {
|
||||
layout->addLayout(row);
|
||||
};
|
||||
|
||||
makeSliderRow("Max gain:", m_compressorMaxGainSlider, m_compressorMaxGainLabel,
|
||||
makeSliderRow(QCoreApplication::translate("ChatGui", "Max gain:"), m_compressorMaxGainSlider, m_compressorMaxGainLabel,
|
||||
1, 50, 1);
|
||||
makeSliderRow("Rise rate (x/sec):", m_compressorRiseRateSlider, m_compressorRiseRateLabel,
|
||||
makeSliderRow(QCoreApplication::translate("ChatGui", "Rise rate (x/sec):"), m_compressorRiseRateSlider, m_compressorRiseRateLabel,
|
||||
2, 10, 1);
|
||||
|
||||
auto connectSlider = [this](QSlider* slider) {
|
||||
@@ -464,7 +465,7 @@ void AudioDeviceSettingsPage::buildCompressorUI(QVBoxLayout* layout) {
|
||||
|
||||
void AudioDeviceSettingsPage::updateCompressorLabels() {
|
||||
if (m_compressorMaxGainLabel)
|
||||
m_compressorMaxGainLabel->setText(QString::number(m_compressorMaxGainSlider->value()) + " dB");
|
||||
m_compressorMaxGainLabel->setText(QString::number(m_compressorMaxGainSlider->value()) + QCoreApplication::translate("ChatGui", " dB"));
|
||||
if (m_compressorRiseRateLabel) {
|
||||
int v = m_compressorRiseRateSlider->value();
|
||||
m_compressorRiseRateLabel->setText(QString::number(v) + "x");
|
||||
|
||||
Reference in new issue
Block a user