Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
sanny32 committed Dec 9, 2024
2 parents de1fce9 + f5a9094 commit a739668
Show file tree
Hide file tree
Showing 9 changed files with 2,589 additions and 84 deletions.
9 changes: 9 additions & 0 deletions omodscan/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,7 @@ void MainWindow::on_awake()
ui->actionDisplayBar->setChecked(ui->toolBarDisplay->isVisible());
ui->actionEnglish->setChecked(_lang == "en");
ui->actionRussian->setChecked(_lang == "ru");
ui->actionChinese->setChecked(_lang == "cn");

if(frm != nullptr)
{
Expand Down Expand Up @@ -954,6 +955,14 @@ void MainWindow::on_actionRussian_triggered()
setLanguage("ru");
}

///
/// \brief MainWindow::on_actionChinese_triggered
///
void MainWindow::on_actionChinese_triggered()
{
setLanguage("cn");
}

///
/// \brief MainWindow::on_actionCascade_triggered
///
Expand Down
1 change: 1 addition & 0 deletions omodscan/mainwindow.h
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ private slots:
/* Language menu slots */
void on_actionEnglish_triggered();
void on_actionRussian_triggered();
void on_actionChinese_triggered();

/* Window menu slots */
void on_actionCascade_triggered();
Expand Down
18 changes: 18 additions & 0 deletions omodscan/mainwindow.ui
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,7 @@
</property>
<addaction name="actionEnglish"/>
<addaction name="actionRussian"/>
<addaction name="actionChinese"/>
</widget>
<addaction name="actionToolbar"/>
<addaction name="actionStatusBar"/>
Expand Down Expand Up @@ -670,6 +671,9 @@
<property name="text">
<string>English</string>
</property>
<property name="iconText">
<string notr="true">English</string>
</property>
</action>
<action name="actionRussian">
<property name="checkable">
Expand All @@ -678,6 +682,9 @@
<property name="text">
<string>Русский</string>
</property>
<property name="iconText">
<string notr="true">Русский</string>
</property>
</action>
<action name="actionAddressScan">
<property name="text">
Expand Down Expand Up @@ -856,6 +863,17 @@
<string notr="true">Ctrl+Alt+8</string>
</property>
</action>
<action name="actionChinese">
<property name="checkable">
<bool>true</bool>
</property>
<property name="text">
<string>中文</string>
</property>
<property name="iconText">
<string notr="true">中文</string>
</property>
</action>
</widget>
<resources>
<include location="resources.qrc"/>
Expand Down
5 changes: 3 additions & 2 deletions omodscan/omodscan.pro
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ CONFIG += c++17
CONFIG -= debug_and_release
CONFIG -= debug_and_release_target

VERSION = 1.8.1
VERSION = 1.8.2

QMAKE_TARGET_PRODUCT = "Open ModScan"
QMAKE_TARGET_DESCRIPTION = "An Open Source Modbus Master (Client) Utility"
Expand Down Expand Up @@ -210,4 +210,5 @@ RESOURCES += \
resources.qrc

TRANSLATIONS += \
translations/omodscan_ru.ts
translations/omodscan_ru.ts \
translations/omodscan_cn.ts
1 change: 1 addition & 0 deletions omodscan/resources.qrc
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,6 @@
<file>res/actionUInt64.png</file>
<file>res/actionSwappedInt64.png</file>
<file>res/actionSwappedUInt64.png</file>
<file>translations/omodscan_cn.qm</file>
</qresource>
</RCC>
Binary file added omodscan/translations/omodscan_cn.qm
Binary file not shown.
Loading

0 comments on commit a739668

Please sign in to comment.