diff --git a/app/gui/oven_control/config.cpp b/app/gui/oven_control/config.cpp index 0392354..fd86918 100644 --- a/app/gui/oven_control/config.cpp +++ b/app/gui/oven_control/config.cpp @@ -225,11 +225,13 @@ QString Config::getValueString(Define::ConfigType idx){ break; case 2: qstrTemp = tr(config_format[(uint32_t)idx]); + break; case 3: qstrTemp.sprintf(config_format[(uint32_t)idx], configlist.values[(uint32_t)idx].d32+1); break; case 0x7f: qstrTemp = ""; + break; } return qstrTemp; } @@ -270,7 +272,7 @@ QString Config::getValueString(Define::ConfigType idx){ break; case config_set_half_energy: if(configlist.items.set_half_energy.d32 >=2) configlist.items.set_half_energy.d32 = 0; - qstrTemp = tr(on_off_menu[configlist.items.set_half_energy.d32]); + qstrTemp = tr(set_unset_menu[configlist.items.set_half_energy.d32]); break; case config_duty_wash: if(configlist.items.duty_wash.d32 >=2) configlist.items.duty_wash.d32 = 0; @@ -283,6 +285,10 @@ QString Config::getValueString(Define::ConfigType idx){ case config_loading_door_monitoring: qstrTemp.sprintf(config_format[(uint32_t)idx ], configlist.items.loading_door_monitoring.d8.d8_0); break; + case config_demo_mode: + if(configlist.items.demo_mode.d32 >=2) configlist.items.demo_mode.d32 = 0; + qstrTemp = tr(on_off_menu[configlist.items.demo_mode.d32]); + break; default: qstrTemp = ""; break; diff --git a/app/gui/oven_control/config.h b/app/gui/oven_control/config.h index 1c51b2b..dc81e99 100644 --- a/app/gui/oven_control/config.h +++ b/app/gui/oven_control/config.h @@ -199,7 +199,7 @@ namespace Define "타겟시간\0" }; - const char on_off_menu[2][16]={ + const char set_unset_menu[2][16]={ "설정취소\0", "설정\0" }; @@ -209,6 +209,11 @@ namespace Define "활성화\0" }; + const char on_off_menu[2][16] = { + "끄기\0", + "켜기\0" + }; + typedef struct _config_1digit_set{ char str_unit[8]; int maxlen; @@ -279,9 +284,15 @@ class Config : public QObject 0x02, 0x02, 0x02,0x02, 0x02,0x02, 0x80, 0x80, 0x80, 0x02, 0x02, 0x80, 0x00, 0x00,0x00, 0x80, 0x80, 0x80, - 0x7F,0x7F,0x7F,0x7F,0x7F,0x7F + 0x02,0x02,0x02,0x02,0x80,0x02 }; + const QString str_menu[3] ={ + tr("test"), + tr("name"), + tr("ok") + }; + const char config_format_kr[MAX_CONFIG_COUNT][64]={ "%S", "%S", @@ -322,12 +333,12 @@ class Config : public QObject "%s", //config_duty_wash, "%d단계", //config_loading_door_monitoring, "%d단계", //config_cooking_door_monitoring - "%s", //config_software_info, - "%s", //config_hotline_chef, - "%s", //config_hotline_service, - "%s", //config_steam_wash + "정보확인", //config_software_info, + "정보확인", //config_hotline_chef, + "정보확인", //config_hotline_service, + "헹굼", //config_steam_wash "%s", //config_demo_mode, - "%s", //config_enter_engineer_mode, + "엔지니어모드 진입", //config_enter_engineer_mode, }; diff --git a/app/gui/oven_control/confighalfenergydlg.cpp b/app/gui/oven_control/confighalfenergydlg.cpp index 6af8192..333b914 100644 --- a/app/gui/oven_control/confighalfenergydlg.cpp +++ b/app/gui/oven_control/confighalfenergydlg.cpp @@ -21,8 +21,8 @@ ConfigHalfEnergyDlg::ConfigHalfEnergyDlg(QWidget *parent) : connect(button, &QPushButton::pressed, SoundPlayer::playClick); - ui->pushButton_1->setText(tr(on_off_menu[0])); - ui->pushButton_2->setText(tr(on_off_menu[1])); + ui->pushButton_1->setText(tr(set_unset_menu[0])); + ui->pushButton_2->setText(tr(set_unset_menu[1])); reloadUi(); diff --git a/app/gui/oven_control/configwindow.h b/app/gui/oven_control/configwindow.h index 4437611..8a6fd2e 100644 --- a/app/gui/oven_control/configwindow.h +++ b/app/gui/oven_control/configwindow.h @@ -32,7 +32,7 @@ class ConfigWindow : public QMainWindow private: const uint16_t m_arrMaxMenuCount[7] ={ - 6,8,9,2,3,0,5 + 6,8,9,2,3,0,6 }; const Define::ConfigType m_arrConfigListInfos[7][20] = { {config_language,config_datetime, config_temptype,config_backlight, config_time_type,config_resttime_format,}, @@ -41,7 +41,7 @@ private: {config_set_half_energy,config_set_auto_darkness,}, {config_duty_wash,config_loading_door_monitoring,config_cooking_door_monitoring}, {config_invalid,}, - {config_software_info,config_hotline_chef,config_hotline_service,config_steam_wash,config_enter_engineer_mode} + {config_software_info,config_hotline_chef,config_hotline_service,config_steam_wash,config_demo_mode,config_enter_engineer_mode} }; public: diff --git a/app/gui/oven_control/lang_en.qm b/app/gui/oven_control/lang_en.qm new file mode 100644 index 0000000000000000000000000000000000000000..76fea30a42192aa5bb9fff30cfadcda41aff842d GIT binary patch literal 3073 zcmb7GT})e59RK$g+R{`mk`gzg=I$dpCTs6X>CiXtSzAz7ZM+u z(9H(Ai5WQD%2Kj|1bOKA&>FYsgG+P?Z$2!3M13>8r*SdH7a#O@Zs8V6FVx=Lo_o&y zfBgO*=XY*%+P&-UAMuIRJ&%0#*7WV4+lUNZM8;#d4^mmeKt%Nz1){PnnLB2P%)80_ zwFhG}H9g~ioItCq7QAmaJih-Ytp8(ZYJnP&Q0M9;vK$p!f4hbCyTS?298txP(D}q2 ztcQee?^i*8R=EEq?3tR3P5ZdkJ>!odFCMycqw%Hk%QX+;{i><<$~624=27K)=)GrN ze3B8Be^*hn&jx$HS{sB8ypLPwr%qvgm+kocCFuQWdvVXxc)w6N^8V{Y)@HFfc@H?2 z#8XF(A>P^CD4fZS6_1Lq{RO)QZ*CMG6W=(pANVK4Gk;G2*Ll&IKwRcGMQ{1hToLjLSOx5 zItj%AdKZc=JV}_#82jk}bx?r3SP$UhG7@#dxEs&4c&?|GVy;QjoY%2PT=^oxMv}_t zTxKb9fL$49pM;gsDEnwxnV(ZG$7`h)X(xzP^ekMu)CipvB9G?4lu3=T3o#y@y>(Cy zwg-cK?ZH5g&%2&@ys@rDE@b-#T^a27e>X*$qTu*;fUz;5c$6?$&QI+dZ*K@l`vRrHb?d61q5{wlz{`MBlT?3w8 zk5ev+5xDoNWklPcfn@Y8@8xqCLzoRx53YR2KE#Hj%56D&r zJ9VjT*$bOab@O4zXkBJylTmgBrjj4(8Q4qDVN0FG6$Gey0O|*{ApX~OGKDmA_UyF? zyKqs;EZxGEme}M9J3pys_+e@TqL8|)`JVQ`AUC-YUzLO(qEnXAERtNKiRw0I$mi19 zQHQ@8x!_@tI9VC==5Hnr}PIofy4b-Pq zV>gH=J2{cP6w8iBKxWxUO3HECcBwhORtiZi1t(fgz1*{;mdB43UVk(tikHXKuVM19 zW73e+7D2+M(g36^#@J{)lZr_Hr@p3c$DzhU>It=BBNiNDmY%_YOZEi=JX(FRGJnwR z*+E1e>fb5?tCgrk5OJSHW(H_Ti?;&Qn@LBN8MXO0`GyuhEg+5jJ&#;sQ)+sq%*|zN z$1P}}WWrhZ3bkvZHtdS*aF|^kS7sNADcI2)Ib=R~;wNyB`ts_^XcC)VU%gU2(n9<& z1K2!7n=(Gm65;GfS|_?nYQ+KU22TMB{@$&Qy6ysbIrX zERxW1R!yf>4(UaRYbSp`L>5W2#gFqHUs#77j@?3W3p^B*i^ZpPfZ0@v=qsQzktO0P zH{zpXMMtxay5Yu)TSjPaqqmR_gy%#y-5B{N5dV_mJ2Iapk=+FI#+1|tnI%0;R<#TK zu<6s1WMa3I_y8(a4^A@!D54kt_%gwza&wVP*KmHBj%PkkE7vEL)WzZ{kD`kOgW*5I CSwe9D literal 0 HcmV?d00001 diff --git a/app/gui/oven_control/main.cpp b/app/gui/oven_control/main.cpp index 8d9f697..3fc8f82 100644 --- a/app/gui/oven_control/main.cpp +++ b/app/gui/oven_control/main.cpp @@ -6,6 +6,7 @@ #include "config.h" #include "inputoverwatcher.h" #include +#include int main(int argc, char *argv[]) { @@ -23,6 +24,10 @@ int main(int argc, char *argv[]) OvenStatistics::getInstance(oven); Config::getInstance(oven); + QTranslator* trans = new QTranslator(); + qDebug() << trans->load(":/lang_en.qm"); + QApplication::installTranslator(trans); + MainWindow w; w.showFullScreen(); diff --git a/app/gui/oven_control/oven_control.pro b/app/gui/oven_control/oven_control.pro index 636b42d..f2f9894 100644 --- a/app/gui/oven_control/oven_control.pro +++ b/app/gui/oven_control/oven_control.pro @@ -303,5 +303,7 @@ FORMS += mainwindow.ui \ RESOURCES += \ resources.qrc +TRANSLATIONS += lang_en.ts lang_zh.ts + target.path = /falinux/dev INSTALLS += target diff --git a/app/gui/oven_control/resources.qrc b/app/gui/oven_control/resources.qrc index 32ea4f5..9b2dddc 100644 --- a/app/gui/oven_control/resources.qrc +++ b/app/gui/oven_control/resources.qrc @@ -568,5 +568,6 @@ images/error/symbol.png images/symbol/keep_warm.png images/background/popup/668.png + lang_en.qm