Skip to content

Commit a6428df

Browse files
committed
Added chinese (zh) translation (#25)
1 parent f6bd9b5 commit a6428df

9 files changed

Lines changed: 2190 additions & 89 deletions

File tree

omodsim/CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
cmake_minimum_required(VERSION 3.25)
22

33
project(omodsim
4-
VERSION 1.8.0
4+
VERSION 1.8.1
55
LANGUAGES CXX)
66

77
set(CMAKE_AUTOUIC ON)
@@ -234,6 +234,7 @@ set(UI_FILES
234234

235235
set(TS_FILES
236236
translations/omodsim_ru.ts
237+
translations/omodsim_zh.ts
237238
)
238239

239240
set(JSHELP_INPUT "${CMAKE_SOURCE_DIR}/docs/jshelp.qhcp")

omodsim/mainwindow.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -892,6 +892,14 @@ void MainWindow::on_actionRussian_triggered()
892892
setLanguage("ru");
893893
}
894894

895+
///
896+
/// \brief MainWindow::on_actionChineseZh_triggered
897+
///
898+
void MainWindow::on_actionChineseZh_triggered()
899+
{
900+
setLanguage("zh");
901+
}
902+
895903
///
896904
/// \brief MainWindow::on_actionCascade_triggered
897905
///

omodsim/mainwindow.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,7 @@ private slots:
114114
/* Language menu slots */
115115
void on_actionEnglish_triggered();
116116
void on_actionRussian_triggered();
117+
void on_actionChineseZh_triggered();
117118

118119
/* Window menu slots */
119120
void on_actionCascade_triggered();

omodsim/mainwindow.ui

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
</rect>
1212
</property>
1313
<property name="contextMenuPolicy">
14-
<enum>Qt::ContextMenuPolicy::NoContextMenu</enum>
14+
<enum>Qt::NoContextMenu</enum>
1515
</property>
1616
<property name="windowTitle">
1717
<string>Open ModSim</string>
@@ -190,6 +190,7 @@
190190
</property>
191191
<addaction name="actionEnglish"/>
192192
<addaction name="actionRussian"/>
193+
<addaction name="actionChineseZh"/>
193194
</widget>
194195
<addaction name="actionToolbar"/>
195196
<addaction name="actionStatusBar"/>
@@ -644,15 +645,15 @@
644645
<bool>true</bool>
645646
</property>
646647
<property name="text">
647-
<string>English</string>
648+
<string notr="true">English</string>
648649
</property>
649650
</action>
650651
<action name="actionRussian">
651652
<property name="checkable">
652653
<bool>true</bool>
653654
</property>
654655
<property name="text">
655-
<string>Русский</string>
656+
<string notr="true">Русский</string>
656657
</property>
657658
</action>
658659
<action name="actionForceCoils">
@@ -991,7 +992,12 @@
991992
<string>ANSI</string>
992993
</property>
993994
<property name="menuRole">
994-
<enum>QAction::MenuRole::NoRole</enum>
995+
<enum>QAction::NoRole</enum>
996+
</property>
997+
</action>
998+
<action name="actionChineseZh">
999+
<property name="text">
1000+
<string notr="true">中國人</string>
9951001
</property>
9961002
</action>
9971003
</widget>

omodsim/resources.qrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,5 +50,6 @@
5050
<file>res/actionUInt64.png</file>
5151
<file>res/actionSwapBytes.png</file>
5252
<file>res/actionAnsi.png</file>
53+
<file>translations/omodsim_zh.qm</file>
5354
</qresource>
5455
</RCC>

omodsim/translations/omodsim_ru.qm

-99 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)