mirror of
https://github.com/Serial-Studio/Serial-Studio.git
synced 2025-01-15 05:22:53 +08:00
Update translations & implement #72
This commit is contained in:
parent
2b9d8e2872
commit
3d10cc4ef6
Binary file not shown.
Before Width: | Height: | Size: 106 KiB After Width: | Height: | Size: 130 KiB |
@ -33,8 +33,8 @@ ApplicationWindow {
|
||||
//
|
||||
// Window options
|
||||
//
|
||||
minimumWidth: column.implicitWidth + 4 * app.spacing
|
||||
minimumHeight: column.implicitHeight + 4 * app.spacing
|
||||
minimumWidth: 910
|
||||
minimumHeight: 720
|
||||
title: qsTr("JSON Editor - %1").arg(Cpp_JSON_Editor.jsonFileName)
|
||||
|
||||
//
|
||||
|
@ -37,6 +37,7 @@ Control {
|
||||
property alias parity: _parityCombo.currentIndex
|
||||
property alias flowControl: _flowCombo.currentIndex
|
||||
property alias stopBits: _stopBitsCombo.currentIndex
|
||||
property alias autoReconnect: _autoreconnect.checked
|
||||
|
||||
//
|
||||
// Update listbox models when translation is changed
|
||||
|
@ -89,8 +89,12 @@ Control {
|
||||
} ComboBox {
|
||||
id: _langCombo
|
||||
Layout.fillWidth: true
|
||||
currentIndex: Cpp_Misc_Translator.language
|
||||
model: Cpp_Misc_Translator.availableLanguages
|
||||
onCurrentIndexChanged: Cpp_Misc_Translator.setLanguage(currentIndex)
|
||||
onCurrentIndexChanged: {
|
||||
if (currentIndex !== Cpp_Misc_Translator.language)
|
||||
Cpp_Misc_Translator.setLanguage(currentIndex)
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
|
@ -32,6 +32,7 @@ import "../SetupPanes" as SetupPanes
|
||||
|
||||
Item {
|
||||
id: root
|
||||
readonly property int maxItemWidth: column.width - 2 * spacing
|
||||
|
||||
//
|
||||
// Save settings
|
||||
@ -53,6 +54,7 @@ Item {
|
||||
property alias dataBits: serial.dataBits
|
||||
property alias stopBits: serial.stopBits
|
||||
property alias flowControl: serial.flowControl
|
||||
property alias autoReconnect: serial.autoReconnect
|
||||
|
||||
//
|
||||
// Network settings
|
||||
@ -126,6 +128,7 @@ Item {
|
||||
} RadioButton {
|
||||
id: commAuto
|
||||
checked: true
|
||||
Layout.maximumWidth: root.maxItemWidth
|
||||
text: qsTr("No parsing (device sends JSON data)")
|
||||
onCheckedChanged: {
|
||||
if (checked)
|
||||
@ -136,6 +139,7 @@ Item {
|
||||
} RadioButton {
|
||||
id: commManual
|
||||
checked: false
|
||||
Layout.maximumWidth: root.maxItemWidth
|
||||
text: qsTr("Parse via JSON project file")
|
||||
onCheckedChanged: {
|
||||
if (checked)
|
||||
@ -152,6 +156,7 @@ Item {
|
||||
Layout.fillWidth: true
|
||||
opacity: enabled ? 1 : 0.5
|
||||
enabled: commManual.checked
|
||||
Layout.maximumWidth: root.maxItemWidth
|
||||
onClicked: Cpp_JSON_Generator.loadJsonMap()
|
||||
Behavior on opacity {NumberAnimation{}}
|
||||
text: (Cpp_JSON_Generator.jsonMapFilename.length ? qsTr("Change project file (%1)").arg(Cpp_JSON_Generator.jsonMapFilename) :
|
||||
@ -176,6 +181,7 @@ Item {
|
||||
text: qsTr("Create CSV file")
|
||||
Layout.alignment: Qt.AlignVCenter
|
||||
checked: Cpp_CSV_Export.exportEnabled
|
||||
Layout.maximumWidth: root.maxItemWidth
|
||||
palette.highlight: Cpp_ThemeManager.csvHighlight
|
||||
|
||||
onCheckedChanged: {
|
||||
@ -212,6 +218,7 @@ Item {
|
||||
height: 24
|
||||
id: tab
|
||||
Layout.fillWidth: true
|
||||
Layout.maximumWidth: root.maxItemWidth
|
||||
onCurrentIndexChanged: {
|
||||
if (currentIndex < 2 && currentIndex !== Cpp_IO_Manager.dataSource)
|
||||
Cpp_IO_Manager.dataSource = currentIndex
|
||||
|
@ -24,23 +24,8 @@ import QtQuick 2.12
|
||||
|
||||
Item {
|
||||
id: qmlMain
|
||||
readonly property string uiFont: uiFontLoader.name
|
||||
readonly property string monoFont: monoFontLoader.name
|
||||
|
||||
FontLoader {
|
||||
id: uiFontLoader
|
||||
source: "qrc:/fonts/Roboto-Regular.ttf"
|
||||
}
|
||||
|
||||
FontLoader {
|
||||
id: uiFontLoaderBold
|
||||
source: "qrc:/fonts/Roboto-Bold.ttf"
|
||||
}
|
||||
|
||||
FontLoader {
|
||||
id: monoFontLoader
|
||||
source: "qrc:/fonts/RobotoMono-Regular.ttf"
|
||||
}
|
||||
readonly property string uiFont: "Roboto"
|
||||
readonly property string monoFont: "Roboto Mono"
|
||||
|
||||
Loader {
|
||||
asynchronous: true
|
||||
|
Binary file not shown.
@ -94,11 +94,11 @@
|
||||
<name>Application</name>
|
||||
<message>
|
||||
<source>Check for updates automatically?</source>
|
||||
<translation>Automatish auf Updates prüfen?</translation>
|
||||
<translation type="vanished">Automatish auf Updates prüfen?</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Should %1 automatically check for updates? You can always check for updates manually from the "Help" menu</source>
|
||||
<translation>Soll %1 Automatish auf Updates prüfen? Sie können jederzeit manuell über das Menü "Hilfe" nach Updates suchen</translation>
|
||||
<translation type="vanished">Soll %1 Automatish auf Updates prüfen? Sie können jederzeit manuell über das Menü "Hilfe" nach Updates suchen</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Drop JSON and CSV files here</source>
|
||||
@ -1349,7 +1349,7 @@
|
||||
</message>
|
||||
<message>
|
||||
<source>Show log file</source>
|
||||
<translation>Logdatei anzeigen</translation>
|
||||
<translation type="vanished">Logdatei anzeigen</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Report bug</source>
|
||||
@ -1508,7 +1508,7 @@
|
||||
</message>
|
||||
<message>
|
||||
<source>Show log file</source>
|
||||
<translation>Logdatei anzeigen</translation>
|
||||
<translation type="vanished">Logdatei anzeigen</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Report bug</source>
|
||||
@ -1549,6 +1549,40 @@
|
||||
<translation>Möchten Sie %1 jetzt neu starten?</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>Misc::Utilities</name>
|
||||
<message>
|
||||
<source>Check for updates automatically?</source>
|
||||
<translation>Automatish auf Updates prüfen?</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Should %1 automatically check for updates? You can always check for updates manually from the "Help" menu</source>
|
||||
<translation>Soll %1 Automatish auf Updates prüfen? Sie können jederzeit manuell über das Menü "Hilfe" nach Updates suchen</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>ModuleManager</name>
|
||||
<message>
|
||||
<source>Initializing...</source>
|
||||
<translation>Initialisierung...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Configuring updater...</source>
|
||||
<translation>Konfigurieren des Updaters...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Initializing modules...</source>
|
||||
<translation>Module initialisieren...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Starting timers...</source>
|
||||
<translation>Timer starten...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Loading user interface...</source>
|
||||
<translation>Benutzeroberfläche laden...</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>Network</name>
|
||||
<message>
|
||||
@ -1624,6 +1658,10 @@
|
||||
<source>Flow Control</source>
|
||||
<translation>Fluss-Kontrolle</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Auto-reconnect</source>
|
||||
<translation>Auto-Wiederverbindung</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>SerialManager</name>
|
||||
@ -1735,19 +1773,19 @@
|
||||
</message>
|
||||
<message>
|
||||
<source>Auto (JSON from serial device)</source>
|
||||
<translation>Auto (JSON von Gerät)</translation>
|
||||
<translation type="vanished">Auto (JSON von Gerät)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Manual (use JSON map file)</source>
|
||||
<translation>Manuell (JSON Modelldatei)</translation>
|
||||
<translation type="vanished">Manuell (JSON Modelldatei)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Change map file (%1)</source>
|
||||
<translation>Modelldatei ändern (%1)</translation>
|
||||
<translation type="vanished">Modelldatei ändern (%1)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Select map file</source>
|
||||
<translation>Modelldatei auswählen</translation>
|
||||
<translation type="vanished">Modelldatei auswählen</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>COM Port</source>
|
||||
@ -1837,6 +1875,22 @@
|
||||
<source>Setup</source>
|
||||
<translation>Einstellungen</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>No parsing (device sends JSON data)</source>
|
||||
<translation>Kein Parsing (Gerät sendet JSON-Daten)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Parse via JSON project file</source>
|
||||
<translation>Parsen über JSON-Projektdatei</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Change project file (%1)</source>
|
||||
<translation>Projektdatei ändern (%1)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Select project file</source>
|
||||
<translation>Projektdatei auswählen</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>Sidebar</name>
|
||||
|
Binary file not shown.
@ -80,14 +80,6 @@
|
||||
</context>
|
||||
<context>
|
||||
<name>Application</name>
|
||||
<message>
|
||||
<source>Check for updates automatically?</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Should %1 automatically check for updates? You can always check for updates manually from the "Help" menu</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Drop JSON and CSV files here</source>
|
||||
<translation></translation>
|
||||
@ -1197,10 +1189,6 @@
|
||||
<source>Documentation/wiki</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Show log file</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Report bug</source>
|
||||
<translation></translation>
|
||||
@ -1356,10 +1344,6 @@
|
||||
<source>Documentation/wiki</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Show log file</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Report bug</source>
|
||||
<translation></translation>
|
||||
@ -1399,6 +1383,40 @@
|
||||
<translation></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>Misc::Utilities</name>
|
||||
<message>
|
||||
<source>Check for updates automatically?</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Should %1 automatically check for updates? You can always check for updates manually from the "Help" menu</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>ModuleManager</name>
|
||||
<message>
|
||||
<source>Initializing...</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Configuring updater...</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Initializing modules...</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Starting timers...</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Loading user interface...</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>Network</name>
|
||||
<message>
|
||||
@ -1462,6 +1480,10 @@
|
||||
<source>Flow Control</source>
|
||||
<translation>Flow control</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Auto-reconnect</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>SerialManager</name>
|
||||
@ -1515,22 +1537,6 @@
|
||||
<source>Communication Mode</source>
|
||||
<translation>Communication mode</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Auto (JSON from serial device)</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Manual (use JSON map file)</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Change map file (%1)</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Select map file</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>COM Port</source>
|
||||
<translation type="vanished">COM port</translation>
|
||||
@ -1575,6 +1581,22 @@
|
||||
<source>Setup</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>No parsing (device sends JSON data)</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Parse via JSON project file</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Change project file (%1)</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Select project file</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>Toolbar</name>
|
||||
|
Binary file not shown.
@ -98,11 +98,11 @@
|
||||
<name>Application</name>
|
||||
<message>
|
||||
<source>Check for updates automatically?</source>
|
||||
<translation>¿Buscar actualizaciones automaticamente?</translation>
|
||||
<translation type="vanished">¿Buscar actualizaciones automaticamente?</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Should %1 automatically check for updates? You can always check for updates manually from the "Help" menu</source>
|
||||
<translation>¿Debería %1 buscar actualizaciones automáticamente? También puedes buscar actualizaciones manualmente desde el menu de "Ayuda"</translation>
|
||||
<translation type="vanished">¿Debería %1 buscar actualizaciones automáticamente? También puedes buscar actualizaciones manualmente desde el menu de "Ayuda"</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Drop JSON and CSV files here</source>
|
||||
@ -1416,7 +1416,7 @@
|
||||
</message>
|
||||
<message>
|
||||
<source>Show log file</source>
|
||||
<translation>Mostar archivo de log</translation>
|
||||
<translation type="vanished">Mostar archivo de log</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Report bug</source>
|
||||
@ -1575,7 +1575,7 @@
|
||||
</message>
|
||||
<message>
|
||||
<source>Show log file</source>
|
||||
<translation>Mostar archivo de log</translation>
|
||||
<translation type="vanished">Mostar archivo de log</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Report bug</source>
|
||||
@ -1616,6 +1616,40 @@
|
||||
<translation>¿Quiere reiniciar %1 ahora?</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>Misc::Utilities</name>
|
||||
<message>
|
||||
<source>Check for updates automatically?</source>
|
||||
<translation>¿Buscar actualizaciones automaticamente?</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Should %1 automatically check for updates? You can always check for updates manually from the "Help" menu</source>
|
||||
<translation>¿Debería %1 buscar actualizaciones automáticamente? También puedes buscar actualizaciones manualmente desde el menu de "Ayuda"</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>ModuleManager</name>
|
||||
<message>
|
||||
<source>Initializing...</source>
|
||||
<translation>Inicializando...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Configuring updater...</source>
|
||||
<translation>Configurando actualizador...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Initializing modules...</source>
|
||||
<translation>Inicializando módulos....</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Starting timers...</source>
|
||||
<translation>Configurando temporizadores...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Loading user interface...</source>
|
||||
<translation>Cargando la interfaz de usuario...</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>Network</name>
|
||||
<message>
|
||||
@ -1695,6 +1729,10 @@
|
||||
<source>Flow Control</source>
|
||||
<translation>Control de flujo</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Auto-reconnect</source>
|
||||
<translation>Auto reconexión</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>SerialManager</name>
|
||||
@ -1854,19 +1892,19 @@
|
||||
</message>
|
||||
<message>
|
||||
<source>Auto (JSON from serial device)</source>
|
||||
<translation>Automático (JSON desde puerto serial)</translation>
|
||||
<translation type="vanished">Automático (JSON desde puerto serial)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Manual (use JSON map file)</source>
|
||||
<translation>Manual (usar archivo de mapa JSON)</translation>
|
||||
<translation type="vanished">Manual (usar archivo de mapa JSON)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Change map file (%1)</source>
|
||||
<translation>Cambiar archivo (%1)</translation>
|
||||
<translation type="vanished">Cambiar archivo (%1)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Select map file</source>
|
||||
<translation>Seleccionar archivo de mapa</translation>
|
||||
<translation type="vanished">Seleccionar archivo de mapa</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>COM Port</source>
|
||||
@ -1956,6 +1994,22 @@
|
||||
<source>Setup</source>
|
||||
<translation>Configuración</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>No parsing (device sends JSON data)</source>
|
||||
<translation>El dispositivo envía los datos JSON</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Parse via JSON project file</source>
|
||||
<translation>Utilizar archivo de proyecto JSON</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Change project file (%1)</source>
|
||||
<translation>Cambiar el archivo del proyecto (%1)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Select project file</source>
|
||||
<translation>Seleccionar proyecto</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>Sidebar</name>
|
||||
|
Binary file not shown.
@ -82,11 +82,11 @@
|
||||
<name>Application</name>
|
||||
<message>
|
||||
<source>Check for updates automatically?</source>
|
||||
<translation>Проверять обновления автоматически?</translation>
|
||||
<translation type="vanished">Проверять обновления автоматически?</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Should %1 automatically check for updates? You can always check for updates manually from the "Help" menu</source>
|
||||
<translation>Должен ли %1 автоматически проверять наличие обновлений? Вы всегда можете проверить наличие обновлений вручную из меню "Помощь"</translation>
|
||||
<translation type="vanished">Должен ли %1 автоматически проверять наличие обновлений? Вы всегда можете проверить наличие обновлений вручную из меню "Помощь"</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Drop JSON and CSV files here</source>
|
||||
@ -222,7 +222,7 @@
|
||||
</message>
|
||||
<message>
|
||||
<source>CSV files</source>
|
||||
<translation>Файлы CSV</translation>
|
||||
<translation type="vanished">Файлы CSV</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
@ -260,27 +260,27 @@
|
||||
<name>DeviceManager</name>
|
||||
<message>
|
||||
<source>Communication Mode</source>
|
||||
<translation>Режим связи</translation>
|
||||
<translation type="vanished">Режим связи</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>COM Port</source>
|
||||
<translation>COM-порт</translation>
|
||||
<translation type="vanished">COM-порт</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Baud Rate</source>
|
||||
<translation>Скорость передачи данных</translation>
|
||||
<translation type="vanished">Скорость передачи данных</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Data Bits</source>
|
||||
<translation>Биты данных</translation>
|
||||
<translation type="vanished">Биты данных</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Stop Bits</source>
|
||||
<translation>Стоп-биты</translation>
|
||||
<translation type="vanished">Стоп-биты</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Flow Control</source>
|
||||
<translation>Управление потоком</translation>
|
||||
<translation type="vanished">Управление потоком</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
@ -445,7 +445,7 @@
|
||||
<name>Export</name>
|
||||
<message>
|
||||
<source>CSV File Error</source>
|
||||
<translation>Ошибка файла CSV</translation>
|
||||
<translation type="vanished">Ошибка файла CSV</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
@ -1199,7 +1199,7 @@
|
||||
</message>
|
||||
<message>
|
||||
<source>Show log file</source>
|
||||
<translation>Показать файл журнала</translation>
|
||||
<translation type="vanished">Показать файл журнала</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Report bug</source>
|
||||
@ -1358,7 +1358,7 @@
|
||||
</message>
|
||||
<message>
|
||||
<source>Show log file</source>
|
||||
<translation>Показать файл журнала</translation>
|
||||
<translation type="vanished">Показать файл журнала</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Report bug</source>
|
||||
@ -1399,6 +1399,40 @@
|
||||
<translation>Хотите ли вы перезапустить %1 сейчас?</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>Misc::Utilities</name>
|
||||
<message>
|
||||
<source>Check for updates automatically?</source>
|
||||
<translation>Проверять обновления автоматически?</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Should %1 automatically check for updates? You can always check for updates manually from the "Help" menu</source>
|
||||
<translation>Должен ли %1 автоматически проверять наличие обновлений? Вы всегда можете проверить наличие обновлений вручную из меню "Помощь"</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>ModuleManager</name>
|
||||
<message>
|
||||
<source>Initializing...</source>
|
||||
<translation>Инициализация...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Configuring updater...</source>
|
||||
<translation>Настройка программы обновления...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Initializing modules...</source>
|
||||
<translation>Инициализация модулей...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Starting timers...</source>
|
||||
<translation>Стартовые таймеры...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Loading user interface...</source>
|
||||
<translation>Загрузка пользовательского интерфейса...</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>Network</name>
|
||||
<message>
|
||||
@ -1462,16 +1496,20 @@
|
||||
<source>Flow Control</source>
|
||||
<translation>Управление потоком</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Auto-reconnect</source>
|
||||
<translation>Автоподключение</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>SerialManager</name>
|
||||
<message>
|
||||
<source>No Device</source>
|
||||
<translation>Нет Устройство</translation>
|
||||
<translation type="vanished">Нет Устройство</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Select Port</source>
|
||||
<translation>Выберите порт</translation>
|
||||
<translation type="vanished">Выберите порт</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
@ -1517,39 +1555,39 @@
|
||||
</message>
|
||||
<message>
|
||||
<source>Auto (JSON from serial device)</source>
|
||||
<translation>Авто (JSON с последовательного устройства)</translation>
|
||||
<translation type="vanished">Авто (JSON с последовательного устройства)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Manual (use JSON map file)</source>
|
||||
<translation>Вручную (использование файла карты JSON)</translation>
|
||||
<translation type="vanished">Вручную (использование файла карты JSON)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Change map file (%1)</source>
|
||||
<translation>Изменить файл карты (%1)</translation>
|
||||
<translation type="vanished">Изменить файл карты (%1)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Select map file</source>
|
||||
<translation>Выберите файл карты</translation>
|
||||
<translation type="vanished">Выберите файл карты</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>COM Port</source>
|
||||
<translation>COM-порт</translation>
|
||||
<translation type="vanished">COM-порт</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Baud Rate</source>
|
||||
<translation>Скорость передачи данных</translation>
|
||||
<translation type="vanished">Скорость передачи данных</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Data Bits</source>
|
||||
<translation>Биты данных</translation>
|
||||
<translation type="vanished">Биты данных</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Stop Bits</source>
|
||||
<translation>Стоп-биты</translation>
|
||||
<translation type="vanished">Стоп-биты</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Flow Control</source>
|
||||
<translation>Управление потоком</translation>
|
||||
<translation type="vanished">Управление потоком</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Create CSV file</source>
|
||||
@ -1575,6 +1613,22 @@
|
||||
<source>Setup</source>
|
||||
<translation>Установка</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>No parsing (device sends JSON data)</source>
|
||||
<translation>Устройство отправляет данные в формате JSON</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Parse via JSON project file</source>
|
||||
<translation>Используйте JSON файл проекта</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Change project file (%1)</source>
|
||||
<translation>Изменить файл проекта (%1)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Select project file</source>
|
||||
<translation>Выберите файл проекта</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>Toolbar</name>
|
||||
|
Binary file not shown.
@ -94,11 +94,11 @@
|
||||
<name>Application</name>
|
||||
<message>
|
||||
<source>Check for updates automatically?</source>
|
||||
<translation>自动检查更新?</translation>
|
||||
<translation type="vanished">自动检查更新?</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Should %1 automatically check for updates? You can always check for updates manually from the "Help" menu</source>
|
||||
<translation>%1是否应该自动检查更新? 您始终可以从“关于”对话框中手动检查更新</translation>
|
||||
<translation type="vanished">%1是否应该自动检查更新? 您始终可以从“关于”对话框中手动检查更新</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Drop JSON and CSV files here</source>
|
||||
@ -1381,7 +1381,7 @@
|
||||
</message>
|
||||
<message>
|
||||
<source>Show log file</source>
|
||||
<translation>打开日志文件</translation>
|
||||
<translation type="vanished">打开日志文件</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Report bug</source>
|
||||
@ -1540,7 +1540,7 @@
|
||||
</message>
|
||||
<message>
|
||||
<source>Show log file</source>
|
||||
<translation>打开日志文件</translation>
|
||||
<translation type="vanished">打开日志文件</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Report bug</source>
|
||||
@ -1581,6 +1581,40 @@
|
||||
<translation>你现在想重新启动%1吗?</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>Misc::Utilities</name>
|
||||
<message>
|
||||
<source>Check for updates automatically?</source>
|
||||
<translation>自动检查更新?</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Should %1 automatically check for updates? You can always check for updates manually from the "Help" menu</source>
|
||||
<translation>%1是否应该自动检查更新? 您始终可以从“关于”对话框中手动检查更新</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>ModuleManager</name>
|
||||
<message>
|
||||
<source>Initializing...</source>
|
||||
<translation>初始化...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Configuring updater...</source>
|
||||
<translation>配置更新器...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Initializing modules...</source>
|
||||
<translation>初始化模块...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Starting timers...</source>
|
||||
<translation>开始计时...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Loading user interface...</source>
|
||||
<translation>正在加载用户界面...</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>Network</name>
|
||||
<message>
|
||||
@ -1656,6 +1690,10 @@
|
||||
<source>Flow Control</source>
|
||||
<translation>流控位</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Auto-reconnect</source>
|
||||
<translation>自动重新连接</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>SerialManager</name>
|
||||
@ -1771,19 +1809,19 @@
|
||||
</message>
|
||||
<message>
|
||||
<source>Auto (JSON from serial device)</source>
|
||||
<translation>自动(来自串行设备的JSON)</translation>
|
||||
<translation type="vanished">自动(来自串行设备的JSON)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Manual (use JSON map file)</source>
|
||||
<translation>手动(使用JSON映射文件)</translation>
|
||||
<translation type="vanished">手动(使用JSON映射文件)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Change map file (%1)</source>
|
||||
<translation>更改地图文件(%1)</translation>
|
||||
<translation type="vanished">更改地图文件(%1)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Select map file</source>
|
||||
<translation>选择地图文件</translation>
|
||||
<translation type="vanished">选择地图文件</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>COM Port</source>
|
||||
@ -1873,6 +1911,22 @@
|
||||
<source>Setup</source>
|
||||
<translation>体系</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>No parsing (device sends JSON data)</source>
|
||||
<translation>不进行解析(设备发送JSON数据)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Parse via JSON project file</source>
|
||||
<translation>通过JSON项目文件进行解析</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Change project file (%1)</source>
|
||||
<translation>更改项目文件 (%1)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Select project file</source>
|
||||
<translation>选择项目文件</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>Sidebar</name>
|
||||
|
Before Width: | Height: | Size: 246 KiB After Width: | Height: | Size: 246 KiB |
BIN
doc/artwork/splash.xcf
Normal file
BIN
doc/artwork/splash.xcf
Normal file
Binary file not shown.
@ -321,9 +321,6 @@ void Serial::disconnectDevice()
|
||||
// Check if serial port pointer is valid
|
||||
if (port() != nullptr)
|
||||
{
|
||||
// Get serial port name (used for warning messages)
|
||||
auto name = portName();
|
||||
|
||||
// Disconnect signals/slots
|
||||
port()->disconnect(this, SLOT(handleError(QSerialPort::SerialPortError)));
|
||||
|
||||
@ -600,6 +597,19 @@ void Serial::refreshSerialDevices()
|
||||
}
|
||||
}
|
||||
|
||||
// Auto reconnect
|
||||
if (Manager::getInstance()->dataSource() == Manager::DataSource::Serial)
|
||||
{
|
||||
if (autoReconnect() && m_lastSerialDeviceIndex > 0)
|
||||
{
|
||||
if (m_lastSerialDeviceIndex < portList().count())
|
||||
{
|
||||
setPortIndex(m_lastSerialDeviceIndex);
|
||||
Manager::getInstance()->connectDevice();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Update UI
|
||||
emit availablePortsChanged();
|
||||
}
|
||||
@ -612,11 +622,7 @@ void Serial::refreshSerialDevices()
|
||||
void Serial::handleError(QSerialPort::SerialPortError error)
|
||||
{
|
||||
if (error != QSerialPort::NoError)
|
||||
{
|
||||
auto errorStr = port()->errorString();
|
||||
Manager::getInstance()->disconnectDevice();
|
||||
Misc::Utilities::showMessageBox(tr("Serial port error"), errorStr);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -57,27 +57,30 @@
|
||||
#include <QSimpleUpdater.h>
|
||||
|
||||
/**
|
||||
* Connect SIGNALS/SLOTS to call singleton destructors before the application
|
||||
* Configures the application font, creates a splash screen and configures
|
||||
* application signals/slots to destroy singleton classes before the application
|
||||
* quits.
|
||||
*/
|
||||
ModuleManager::ModuleManager()
|
||||
{
|
||||
// Load application font
|
||||
int id = QFontDatabase::addApplicationFont(":/fonts/Roboto-Regular.ttf");
|
||||
QString family = QFontDatabase::applicationFontFamilies(id).at(0);
|
||||
QFont customFont(family);
|
||||
// Init translator (so that splash screen displays text in user's language)
|
||||
(void)Misc::Translator::getInstance();
|
||||
|
||||
// Set font size
|
||||
// Load Roboto fonts from resources
|
||||
QFontDatabase::addApplicationFont(":/fonts/Roboto-Bold.ttf");
|
||||
QFontDatabase::addApplicationFont(":/fonts/Roboto-Regular.ttf");
|
||||
QFontDatabase::addApplicationFont(":/fonts/RobotoMono-Regular.ttf");
|
||||
|
||||
// Set Roboto as default app font
|
||||
QFont font("Roboto");
|
||||
#if defined(Q_OS_WIN)
|
||||
customFont.setPointSize(9);
|
||||
font.setPointSize(9);
|
||||
#elif defined(Q_OS_MAC)
|
||||
customFont.setPointSize(13);
|
||||
font.setPointSize(13);
|
||||
#else
|
||||
customFont.setPointSize(10);
|
||||
font.setPointSize(10);
|
||||
#endif
|
||||
|
||||
// Use custom font globally
|
||||
qApp->setFont(customFont);
|
||||
qApp->setFont(font);
|
||||
|
||||
// Show splash screen
|
||||
m_splash.setPixmap(QPixmap(":/images/splash.png"));
|
||||
|
@ -34,7 +34,7 @@ static Translator *INSTANCE = nullptr;
|
||||
*/
|
||||
Translator::Translator()
|
||||
{
|
||||
m_language = systemLanguage();
|
||||
setLanguage(m_settings.value("language", systemLanguage()).toInt());
|
||||
}
|
||||
|
||||
/**
|
||||
@ -192,6 +192,8 @@ void Translator::setLanguage(const int language)
|
||||
}
|
||||
|
||||
m_language = language;
|
||||
m_settings.setValue("language", m_language);
|
||||
|
||||
setLanguage(locale, langName);
|
||||
}
|
||||
|
||||
|
@ -67,6 +67,7 @@ public slots:
|
||||
|
||||
private:
|
||||
int m_language;
|
||||
QSettings m_settings;
|
||||
QTranslator m_translator;
|
||||
};
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user