chore(cpn): Run Qt Linguist updater, translation updates (#2685)

* chore(cpn): Run Qt Linguist updater

* Fix translation errors

* fix: Reference all available translations

* Add Chinese to available radio voice languages

* fix(cpn): Add missing voice languages to firmwares

* Add translation to analogs

Co-authored-by: elecpower <neilh713@tpg.com.au>
This commit is contained in:
Peter Feerick
2022-12-21 10:41:54 +10:00
committed by GitHub
co-authored by elecpower
parent 866716b708
commit 5cf2141b59
24 changed files with 95435 additions and 128055 deletions
+1 -1
View File
@@ -102,7 +102,7 @@ configure_file(${COMPANION_SRC_DIRECTORY}/simulator.desktop.in ${CMAKE_CURRENT_B
### Generate .qm files and assemble resource (qrc) file.
# available Companion translations (src/translations/*.ts)
set(LANGUAGES cs da de en es fi fr it pl ru sv zh_CN ja)
set(LANGUAGES cs da de en es fi fr he it ja nl pl pt ru sv zh_CN zh_TW)
foreach(language ${LANGUAGES})
list(APPEND companion_TS translations/companion_${language}.ts)
endforeach(language)
+56 -46
View File
@@ -571,75 +571,85 @@ StringTagMappingTable Boards::getAnalogNamesLookupTable(Board::Type board)
StringTagMappingTable tbl;
if (getBoardCapability(board, Board::Sticks)) {
tbl.insert(tbl.end(), {"Rud", "Ele", "Thr", "Ail"});
tbl.insert(tbl.end(), {
{tr("Rud").toStdString(), "Rud"},
{tr("Ele").toStdString(), "Ele"},
{tr("Thr").toStdString(), "Thr"},
{tr("Ail").toStdString(), "Ail"},
});
}
if (IS_SKY9X(board)) {
tbl.insert(tbl.end(), {"P1", "P2", "P3"});
tbl.insert(tbl.end(), {
{tr("P1").toStdString(), "P1"},
{tr("P2").toStdString(), "P2"},
{tr("P3").toStdString(), "P3"},
});
} else if (IS_TARANIS_X9LITE(board)) {
tbl.insert(tbl.end(), {
{"S1", "POT1"},
{tr("S1").toStdString(), "S1"},
{tr("POT1").toStdString(), "POT1"},
});
} else if (IS_TARANIS_X9E(board)) {
tbl.insert(tbl.end(), {
{"F1", "POT1"},
{"F2", "POT2"},
{"F3", "POT3"},
{"F4", "POT4"},
{"S1", "SLIDER1"},
{"S2", "SLIDER2"},
{"LS", "SLIDER3"},
{"RS", "SLIDER4"},
{tr("F1").toStdString(), "POT1"},
{tr("F2").toStdString(), "POT2"},
{tr("F3").toStdString(), "POT3"},
{tr("F4").toStdString(), "POT4"},
{tr("S1").toStdString(), "SLIDER1"},
{tr("S2").toStdString(), "SLIDER2"},
{tr("LS").toStdString(), "SLIDER3"},
{tr("RS").toStdString(), "SLIDER4"},
});
} else if (IS_TARANIS_XLITES(board)) {
tbl.insert(tbl.end(), {
{"S1", "POT1"},
{"S2", "POT2"},
{"TltX", "TILT_X"},
{"TltY", "TILT_Y"},
{tr("S1").toStdString(), "POT1"},
{tr("S2").toStdString(), "POT2"},
{tr("TltX").toStdString(), "TILT_X"},
{tr("TltY").toStdString(), "TILT_Y"},
});
} else if ((IS_TARANIS_SMALL(board) && !IS_JUMPER_TLITE(board)) || IS_FLYSKY_NV14(board)) {
tbl.insert(tbl.end(), {
{"S1", "POT1"},
{"S2", "POT2"},
{tr("S1").toStdString(), "POT1"},
{tr("S2").toStdString(), "POT2"},
});
} else if (IS_TARANIS_X9(board)) {
tbl.insert(tbl.end(), {
{"S1", "POT1"},
{"S2", "POT2"},
{"S3", "POT3"},
{"LS", "SLIDER1"},
{"RS", "SLIDER2"},
{tr("S1").toStdString(), "POT1"},
{tr("S2").toStdString(), "POT2"},
{tr("S3").toStdString(), "POT3"},
{tr("LS").toStdString(), "SLIDER1"},
{tr("RS").toStdString(), "SLIDER2"},
});
} else if (IS_HORUS_X12S(board)) {
tbl.insert(tbl.end(), {
{"S1", "S1"},
{"6P", "6POS"},
{"S2", "S2"},
{"L1", "S3"},
{"L2", "S4"},
{"LS", "LS"},
{"RS", "RS"},
{"JSx", "MOUSE1"},
{"JSy", "MOUSE2"},
{"TltX", "TILT_X"},
{"TltY", "TILT_Y"},
{tr("S1").toStdString(), "S1"},
{tr("6P").toStdString(), "6POS"},
{tr("S2").toStdString(), "S2"},
{tr("L1").toStdString(), "S3"},
{tr("L2").toStdString(), "S4"},
{tr("LS").toStdString(), "LS"},
{tr("RS").toStdString(), "RS"},
{tr("JSx").toStdString(), "MOUSE1"},
{tr("JSy").toStdString(), "MOUSE2"},
{tr("TltX").toStdString(), "TILT_X"},
{tr("TltY").toStdString(), "TILT_Y"},
});
} else if (IS_HORUS_X10(board) || IS_FAMILY_T16(board)) {
tbl.insert(tbl.end(), {
{"S1", "S1"},
{"6P", "6POS"},
{"S2", "S2"},
{"EX1", "EXT1"},
{"EX2", "EXT2"},
{"EX3", "EXT3"},
{"EX4", "EXT4"},
{"LS", "LS"},
{"RS", "RS"},
{"JSx", "MOUSE1"},
{"JSy", "MOUSE2"},
{"TltX", "TILT_X"},
{"TltY", "TILT_Y"},
{tr("S1").toStdString(), "S1"},
{tr("6P").toStdString(), "6POS"},
{tr("S2").toStdString(), "S2"},
{tr("EX1").toStdString(), "EXT1"},
{tr("EX2").toStdString(), "EXT2"},
{tr("EX3").toStdString(), "EXT3"},
{tr("EX4").toStdString(), "EXT4"},
{tr("LS").toStdString(), "LS"},
{tr("RS").toStdString(), "RS"},
{tr("JSx").toStdString(), "MOUSE1"},
{tr("JSy").toStdString(), "MOUSE2"},
{tr("TltX").toStdString(), "TILT_X"},
{tr("TltY").toStdString(), "TILT_Y"},
});
}
@@ -96,17 +96,22 @@ class OpenTxFirmware: public Firmware
OpenTxFirmware(const QString & id, const QString & name, const Board::Type board):
Firmware(id, name, board)
{
// Note: these align with the radio NOT computer locales - TODO harmonise with ISO and one list!!!
addLanguage("en");
addLanguage("cn");
addLanguage("cz");
addLanguage("da");
addLanguage("de");
addLanguage("es");
addLanguage("fr");
addLanguage("hu");
addLanguage("it");
addLanguage("nl");
addLanguage("pl");
addLanguage("pt");
addLanguage("ru");
addLanguage("se");
addLanguage("sk");
}
virtual Firmware * getFirmwareVariant(const QString & id);
+8 -2
View File
@@ -352,8 +352,14 @@ void GeneralSetupPanel::populateBacklightCB()
void GeneralSetupPanel::populateVoiceLangCB()
{
QComboBox * b = ui->voiceLang_CB;
QString strings[] = { tr("English"), tr("Danish"), tr("Dutch"), tr("French"), tr("Italian"), tr("German"), tr("Czech"), tr("Slovak"), tr("Spanish"), tr("Polish"), tr("Portuguese"), tr("Russian"), tr("Swedish"), tr("Hungarian"), NULL};
QString langcode[] = { "en", "da", "nl","fr", "it", "de", "cz", "sk", "es", "pl", "pt", "ru", "se", "hu", NULL};
QString strings[] = { tr("English"), tr("Danish"), tr("Dutch"), tr("French"), tr("Italian"), tr("German"),
tr("Czech"), tr("Slovak"), tr("Spanish"), tr("Polish"), tr("Portuguese"), tr("Russian"),
tr("Swedish"), tr("Hungarian"), tr("Chinese"), NULL};
// Note: these align with the radio NOT computer locales - TODO harmonise with ISO and one list!!!
QString langcode[] = { "en", "da", "nl","fr", "it", "de",
"cz", "sk", "es", "pl", "pt", "ru",
"se", "hu", "cn", NULL};
b->clear();
for (int i=0; strings[i]!=NULL; i++) {
+1 -1
View File
@@ -387,7 +387,7 @@ bool FirmwareInterface::setSplash(const QImage & newsplash)
splashSize = RleBitmap::encode(b, SPLASH_SIZE_MAX);
if(splashSize > RLE_SPLASH_MAX_SIZE){
if(parentDialog)
QMessageBox::critical(parentDialog, CPN_STR_TTL_ERROR, parentDialog->tr("Compressed image size exceeds reserved space."));
QMessageBox::critical(parentDialog, CPN_STR_TTL_ERROR, QObject::tr("Compressed image size exceeds reserved space."));
return false;
}
}
@@ -21,6 +21,7 @@
#ifndef _FIRMWAREINTERFACE_H_
#define _FIRMWAREINTERFACE_H_
#include <QtCore>
#include <QString>
#include <QImage>
#include <QByteArray>
@@ -41,6 +42,8 @@
class FirmwareInterface
{
Q_DECLARE_TR_FUNCTIONS("FirmwareInterface")
public:
FirmwareInterface(const QString & filename, QDialog* parentDialog = nullptr);
inline QString getDate() { return date; }
+3 -3
View File
@@ -41,11 +41,11 @@ QStringList const Translations::getAvailableTranslations()
<< "es_ES"
<< "fi_FI"
<< "fr_FR"
//<< "he_IL"
<< "he_IL"
<< "it_IT"
//<< "nl_NL"
<< "nl_NL"
<< "pl_PL"
//<< "pt_PT"
<< "pt_PT"
<< "ru_RU"
<< "sv_SE"
<< "zh_CN"
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+5 -5
View File
@@ -33,29 +33,29 @@
#define OS_SUPPORTED_INSTALLER
#define OS_FILEPATTERN "edgetx-cpn-osx"
#define OS_INSTALLER_EXTN "*.dmg"
#define OS_INSTALL_QUESTION tr("Would you like to open the disk image to install the new version of Companion?")
#define OS_INSTALL_QUESTION QCoreApplication::translate("UpdateCompanion", "Would you like to open the disk image to install the new version of Companion?")
#elif defined(_WIN64)
#define OS_SUPPORTED_INSTALLER
#define OS_FILEPATTERN "edgetx-cpn-win64"
#define OS_INSTALLER_EXTN "*.exe"
#define OS_INSTALL_QUESTION tr("Would you like to launch the Companion installer?")
#define OS_INSTALL_QUESTION QCoreApplication::translate("UpdateCompanion", "Would you like to launch the Companion installer?")
#elif defined(_WIN32)
#define OS_SUPPORTED_INSTALLER
#define OS_FILEPATTERN "edgetx-cpn-win32"
#define OS_INSTALLER_EXTN "*.exe"
#define OS_INSTALL_QUESTION tr("Would you like to launch the Companion installer?")
#define OS_INSTALL_QUESTION QCoreApplication::translate("UpdateCompanion", "Would you like to launch the Companion installer?")
#elif defined(__linux__) || defined(__linux)
#define OS_SUPPORTED_INSTALLER
#define OS_FILEPATTERN "edgetx-cpn-linux"
#define OS_INSTALLER_EXTN "*.AppImage"
#else
#define OS_INSTALL_MSG tr("No install process support for your operating system")
#define OS_INSTALL_MSG QCoreApplication::translate("UpdateCompanion", "No install process support for your operating system")
#endif
UpdateCompanion::UpdateCompanion(QWidget * parent) :
UpdateInterface(parent)
{
init(CID_Companion, tr("Companion"), QString(GH_REPOS_EDGETX).append("/edgetx"), "nightly");
init(CID_Companion, QCoreApplication::translate("UpdateCompanion", "Companion"), QString(GH_REPOS_EDGETX).append("/edgetx"), "nightly");
}
void UpdateCompanion::initAssetSettings()
+1 -1
View File
@@ -92,7 +92,7 @@ class AppMessages
msgBox.setText(infoTxt);
if (!transient)
msgBox.setCheckBox(new QCheckBox(tr("Show this message again at next startup?")));
msgBox.setCheckBox(new QCheckBox(QObject::tr("Show this message again at next startup?")));
msgBox.exec();