From d956c8db042551be104253936431ccc34378478b Mon Sep 17 00:00:00 2001 From: Yunyao <896458252@qq.com> Date: Mon, 17 Oct 2022 16:17:17 +0800 Subject: [PATCH] language resource file --- DSView/pv/toolbars/filebar.cpp | 41 +++---- DSView/pv/toolbars/logobar.cpp | 27 +++-- DSView/pv/toolbars/samplingbar.cpp | 40 +++---- DSView/pv/toolbars/trigbar.cpp | 28 ++--- DSView/pv/ui/langresource.h | 3 +- DSView/pv/ui/string_ids.h | 4 + lang/cn/dlg.json | 26 +++++ lang/cn/msg.json | 30 +++++ lang/cn/toolbar.json | 170 +++++++++++++++++++++++++++++ lang/en/dlg.json | 26 +++++ lang/en/dsl.json | 10 ++ lang/en/msg.json | 28 ++++- lang/en/toolbar.json | 167 +++++++++++++++++++++++++++- 13 files changed, 531 insertions(+), 69 deletions(-) create mode 100644 lang/cn/dlg.json create mode 100644 lang/cn/msg.json create mode 100644 lang/cn/toolbar.json create mode 100644 lang/en/dlg.json create mode 100644 lang/en/dsl.json diff --git a/DSView/pv/toolbars/filebar.cpp b/DSView/pv/toolbars/filebar.cpp index 9d43ccb7..0896dd04 100644 --- a/DSView/pv/toolbars/filebar.cpp +++ b/DSView/pv/toolbars/filebar.cpp @@ -30,6 +30,8 @@ #include "../config/appconfig.h" #include "../utility/path.h" +#include "../ui/langresource.h" + namespace pv { namespace toolbars { @@ -101,17 +103,19 @@ void FileBar::changeEvent(QEvent *event) QToolBar::changeEvent(event); } + + void FileBar::retranslateUi() { - _file_button.setText(tr("File")); - _menu_session->setTitle(tr("Con&fig...")); //load,save session file - _action_load->setText(tr("&Load...")); - _action_store->setText(tr("S&tore...")); - _action_default->setText(tr("&Default...")); - _action_open->setText(tr("&Open...")); - _action_save->setText(tr("&Save...")); - _action_export->setText(tr("&Export...")); - _action_capture->setText(tr("&Capture...")); + _file_button.setText(L_S(STR_PAGE_TOOLBAR, S_ID(IDS_FILEBAR_FILE), "File")); + _menu_session->setTitle(L_S(STR_PAGE_TOOLBAR, S_ID(IDS_FILEBAR_CONFIGURATION), "Con&fig...")); //load,save session file + _action_load->setText(L_S(STR_PAGE_TOOLBAR, S_ID(IDS_FILEBAR_LOAD), "&Load...")); + _action_store->setText(L_S(STR_PAGE_TOOLBAR, S_ID(IDS_FILEBAR_STORE), "S&tore...")); + _action_default->setText(L_S(STR_PAGE_TOOLBAR, S_ID(IDS_FILEBAR_DEFAULT), "&Default...")); + _action_open->setText(L_S(STR_PAGE_TOOLBAR, S_ID(IDS_FILEBAR_0PEN), "&Open...")); + _action_save->setText(L_S(STR_PAGE_TOOLBAR, S_ID(IDS_FILEBAR_SAVE), "&Save...")); + _action_export->setText(L_S(STR_PAGE_TOOLBAR, S_ID(IDS_FILEBAR_EXPORT), "&Export...")); + _action_capture->setText(L_S(STR_PAGE_TOOLBAR, S_ID(IDS_FILEBAR_CAPTURE), "&Capture...")); } void FileBar::reStyle() @@ -135,7 +139,7 @@ void FileBar::on_actionOpen_triggered() AppConfig &app = AppConfig::Instance(); if (_session->have_hardware_data()){ - if (MsgBox::Confirm(tr("Save captured data?"))){ + if (MsgBox::Confirm(L_S(STR_PAGE_MSG, S_ID(IDS_MSG_SAVE_CAPDATE), "Save captured data?"))){ sig_save(); return; } @@ -144,9 +148,9 @@ void FileBar::on_actionOpen_triggered() // Show the dialog const QString file_name = QFileDialog::getOpenFileName( this, - tr("Open File"), + L_S(STR_PAGE_DLG, S_ID(IDS_DLG_OPEN_FILE), "Open File"), app._userHistory.openDir, - tr("DSView Data (*.dsl)")); + "DSView Data (*.dsl)"); if (!file_name.isEmpty()) { QString fname = path::GetDirectoryName(file_name); @@ -163,12 +167,11 @@ void FileBar::on_actionLoad_triggered() { //load session file AppConfig &app = AppConfig::Instance(); - const QString file_name = QFileDialog::getOpenFileName( this, - tr("Open Session"), + L_S(STR_PAGE_DLG, S_ID(IDS_DLG_OPEN_SEESION), "Open Session"), app._userHistory.sessionDir, - tr("DSView Session (*.dsc)")); + "DSView Session (*.dsc)"); if (!file_name.isEmpty()) { QString fname = path::GetDirectoryName(file_name); @@ -185,7 +188,7 @@ void FileBar::on_actionDefault_triggered() { QDir dir(GetResourceDir()); if (!dir.exists()) { - MsgBox::Show(NULL, tr("Cannot find default session file for this device!"), this); + MsgBox::Show(NULL, L_S(STR_PAGE_MSG, S_ID(IDS_MSG_SAVE_CANFIND_SESSIONFILE), "Cannot find default session file for this device!"), this); return; } @@ -211,14 +214,14 @@ void FileBar::on_actionStore_triggered() QString file_name = QFileDialog::getSaveFileName( this, - tr("Save Session"), + L_S(STR_PAGE_DLG, S_ID(IDS_DLG_SAVE_SEESION), "Save Session"), app._userHistory.sessionDir, - tr("DSView Session (*.dsc)")); + "DSView Session (*.dsc)"); if (!file_name.isEmpty()) { QFileInfo f(file_name); if(f.suffix().compare("dsc")) - file_name.append(tr(".dsc")); + file_name.append(".dsc"); QString fname = path::GetDirectoryName(file_name); if (fname != app._userHistory.sessionDir){ diff --git a/DSView/pv/toolbars/logobar.cpp b/DSView/pv/toolbars/logobar.cpp index fd2411e0..3b97ba12 100644 --- a/DSView/pv/toolbars/logobar.cpp +++ b/DSView/pv/toolbars/logobar.cpp @@ -40,6 +40,8 @@ #include "../dialogs/dsdialog.h" #include "../appcontrol.h" #include "../log.h" +#include "../ui/langresource.h" + namespace pv { namespace toolbars { @@ -127,15 +129,16 @@ void LogoBar::changeEvent(QEvent *event) void LogoBar::retranslateUi() { - _logo_button.setText(tr("Help")); - _action_en->setText("English"); - _action_cn->setText("中文"); - _language->setTitle(tr("&Language")); - _about->setText(tr("&About...")); - _manual->setText(tr("&Manual")); - _issue->setText(tr("&Bug Report")); - _update->setText(tr("&Update")); - _log->setText(tr("L&og Options")); + + _logo_button.setText(L_S(STR_PAGE_TOOLBAR, S_ID(IDS_LOGOBAR_HELP), "Help")); + _action_en->setText(L_S(STR_PAGE_TOOLBAR, S_ID(IDS_LOGOBAR_ENGLISH), "English")); + _action_cn->setText(L_S(STR_PAGE_TOOLBAR, S_ID(IDS_LOGOBAR_CHINESE), "中文")); + _language->setTitle(L_S(STR_PAGE_TOOLBAR, S_ID(IDS_LOGOBAR_LANGUAGE), "&Language")); + _about->setText(L_S(STR_PAGE_TOOLBAR, S_ID(IDS_LOGOBAR_ABOUT), "&About...")); + _manual->setText(L_S(STR_PAGE_TOOLBAR, S_ID(IDS_LOGOBAR_MANUAL), "&Manual...")); + _issue->setText(L_S(STR_PAGE_TOOLBAR, S_ID(IDS_LOGOBAR_BUG_REPORT), "&Bug Report")); + _update->setText(L_S(STR_PAGE_TOOLBAR, S_ID(IDS_LOGOBAR_UPDATE), "&Update")); + _log->setText(L_S(STR_PAGE_TOOLBAR, S_ID(IDS_LOGOBAR_LOG_OPTIONS), "L&og Options")); AppConfig &app = AppConfig::Instance(); if (app._frameOptions.language == LAN_CN) @@ -224,7 +227,7 @@ void LogoBar::on_action_setting_log() AppConfig &app = AppConfig::Instance(); auto *topWind = AppControl::Instance()->GetTopWindow(); dialogs::DSDialog dlg(topWind, false, true); - dlg.setTitle(tr("Log Options")); + dlg.setTitle(L_S(STR_PAGE_DLG, S_ID(IDS_DLG_LOG_OPTIONS), "Log Options")); dlg.setMinimumSize(260, 120); QWidget *panel = new QWidget(&dlg); dlg.layout()->addWidget(panel); @@ -235,7 +238,7 @@ void LogoBar::on_action_setting_log() QComboBox *cbBox = new QComboBox(); cbBox->setMinimumWidth(40); - lay->addRow(tr("Log Level"), cbBox); + lay->addRow(L_S(STR_PAGE_DLG, S_ID(IDS_DLG_LOG_LEVEL), "Log Level"), cbBox); for (int i=0; i<=5; i++){ cbBox->addItem(QString::number(i)); @@ -244,7 +247,7 @@ void LogoBar::on_action_setting_log() QCheckBox *ckBox = new QCheckBox(); ckBox->setChecked(app._appOptions.ableSaveLog); - lay->addRow(tr("Save To File"), ckBox); + lay->addRow(L_S(STR_PAGE_DLG, S_ID(IDS_DLG_SAVE_FILE), "Save To File"), ckBox); dlg.exec(); diff --git a/DSView/pv/toolbars/samplingbar.cpp b/DSView/pv/toolbars/samplingbar.cpp index e7b7c1a0..3b7bf172 100644 --- a/DSView/pv/toolbars/samplingbar.cpp +++ b/DSView/pv/toolbars/samplingbar.cpp @@ -48,8 +48,8 @@ namespace pv namespace toolbars { - const QString SamplingBar::RLEString = tr("(RLE)"); - const QString SamplingBar::DIVString = tr(" / div"); + const QString SamplingBar::RLEString = "(RLE)"; + const QString SamplingBar::DIVString = " / div"; SamplingBar::SamplingBar(SigSession *session, QWidget *parent) : QToolBar("Sampling Bar", parent), _device_type(this), @@ -84,7 +84,8 @@ namespace pv _sample_count.setSizeAdjustPolicy(DsComboBox::AdjustToContents); _device_selector.setMaximumWidth(ComboBoxMaxWidth); - _run_stop_button.setObjectName(tr("run_stop_button")); + //tr + _run_stop_button.setObjectName("run_stop_button"); QWidget *leftMargin = new QWidget(this); leftMargin->setFixedWidth(4); @@ -97,7 +98,8 @@ namespace pv addWidget(&_configure_button); addWidget(&_sample_count); - addWidget(new QLabel(tr(" @ "))); + //tr + addWidget(new QLabel(" @ ")); addWidget(&_sample_rate); _action_single = new QAction(this); @@ -146,11 +148,11 @@ namespace pv { if (_device_agent->is_demo()) { - _device_type.setText(tr("Demo")); + _device_type.setText(L_S(STR_PAGE_TOOLBAR, S_ID(IDS_TOOLBAR_DEMO), "Demo")); } else if (_device_agent->is_file()) { - _device_type.setText(tr("File")); + _device_type.setText(L_S(STR_PAGE_TOOLBAR, S_ID(IDS_TOOLBAR_FILE), "file")); } else { @@ -163,14 +165,14 @@ namespace pv g_variant_unref(gvar); } if (usb_speed == LIBUSB_SPEED_HIGH) - _device_type.setText(tr("USB 2.0")); + _device_type.setText("USB 2.0"); else if (usb_speed == LIBUSB_SPEED_SUPER) - _device_type.setText(tr("USB 3.0")); + _device_type.setText("USB 3.0"); else - _device_type.setText(tr("USB UNKNOWN")); + _device_type.setText("USB UNKNOWN"); } } - _configure_button.setText(tr("Options")); + _configure_button.setText(L_S(STR_PAGE_TOOLBAR, S_ID(IDS_TOOLBAR_OPTION), "Options1")); _mode_button.setText(L_S(STR_PAGE_TOOLBAR, S_ID(IDS_TOOLBAR_MODE), "Mode")); int mode = _device_agent->get_work_mode(); @@ -856,11 +858,11 @@ namespace pv if (zero) { dialogs::DSMessageBox msg(this); - msg.mBox()->setText(tr("Auto Calibration")); - msg.mBox()->setInformativeText(tr("Please adjust zero skew and save the result!")); + msg.mBox()->setText(L_S(STR_PAGE_MSG, S_ID(IDS_MSG_A_CAL), "Auto Calibration")); + msg.mBox()->setInformativeText(L_S(STR_PAGE_MSG, S_ID(IDS_MSG_ADJUST_SAVE), "Please adjust zero skew and save the result")); // msg.setStandardButtons(QMessageBox::Ok); - msg.mBox()->addButton(tr("Ok"), QMessageBox::AcceptRole); - msg.mBox()->addButton(tr("Skip"), QMessageBox::RejectRole); + msg.mBox()->addButton(L_S(STR_PAGE_MSG, S_ID(IDS_MSG_OK), "Ok"), QMessageBox::AcceptRole); + msg.mBox()->addButton(L_S(STR_PAGE_MSG, S_ID(IDS_MSG_SKIP), "Skip"), QMessageBox::RejectRole); msg.mBox()->setIcon(QMessageBox::Warning); if (msg.exec()) @@ -923,11 +925,11 @@ namespace pv if (zero) { dialogs::DSMessageBox msg(this); - msg.mBox()->setText(tr("Auto Calibration")); - msg.mBox()->setInformativeText(tr("Auto Calibration program will be started. Don't connect any probes. It can take a while!")); + msg.mBox()->setText(L_S(STR_PAGE_MSG,S_ID(IDS_MSG_A_CAL), "Auto Calibration")); + msg.mBox()->setInformativeText(L_S(STR_PAGE_MSG,S_ID(IDS_MSG_A_CAL_START), "Auto Calibration program will be started. Don't connect any probes. It can take a while!")); - msg.mBox()->addButton(tr("Ok"), QMessageBox::AcceptRole); - msg.mBox()->addButton(tr("Skip"), QMessageBox::RejectRole); + msg.mBox()->addButton(L_S(STR_PAGE_MSG,S_ID(IDS_MSG_OK), "Ok"), QMessageBox::AcceptRole); + msg.mBox()->addButton(L_S(STR_PAGE_MSG,S_ID(IDS_MSG_SKIP), "Skip"), QMessageBox::RejectRole); msg.mBox()->setIcon(QMessageBox::Warning); if (msg.exec()) @@ -965,7 +967,7 @@ namespace pv ds_device_handle devHandle = (ds_device_handle)_device_selector.currentData().toULongLong(); if (_session->have_hardware_data()){ - if (MsgBox::Confirm(tr("Save captured data?"))) + if (MsgBox::Confirm(L_S(STR_PAGE_MSG, S_ID(IDS_MSG_SAVE_CAPDATE), "Save captured data?"))) { _updating_device_list = true; _device_selector.setCurrentIndex(_last_device_index); diff --git a/DSView/pv/toolbars/trigbar.cpp b/DSView/pv/toolbars/trigbar.cpp index df5de4d5..eda0c185 100644 --- a/DSView/pv/toolbars/trigbar.cpp +++ b/DSView/pv/toolbars/trigbar.cpp @@ -32,6 +32,7 @@ #include "../view/trace.h" #include "../dialogs/applicationpardlg.h" #include "../config/appconfig.h" +#include "../ui/langresource.h" namespace pv { namespace toolbars { @@ -129,6 +130,7 @@ TrigBar::TrigBar(SigSession *session, QWidget *parent) : connect(_action_dispalyOptions, SIGNAL(triggered()), this, SLOT(on_application_param())); } +//语言变化 void TrigBar::changeEvent(QEvent *event) { if (event->type() == QEvent::LanguageChange) @@ -140,23 +142,23 @@ void TrigBar::changeEvent(QEvent *event) void TrigBar::retranslateUi() { - _trig_button.setText(tr("Trigger")); - _protocol_button.setText(tr("Decode")); - _measure_button.setText(tr("Measure")); - _search_button.setText(tr("Search")); - _function_button.setText(tr("Function")); - _setting_button.setText(tr("Display")); + _trig_button.setText(L_S(STR_PAGE_TOOLBAR, S_ID(IDS_TOOLBAR_TRIGGER), "Trigger")); + _protocol_button.setText(L_S(STR_PAGE_TOOLBAR, S_ID(IDS_TOOLBAR_DECODE), "Decode")); + _measure_button.setText(L_S(STR_PAGE_TOOLBAR, S_ID(IDS_TOOLBAR_MEASURE), "Measure")); + _search_button.setText(L_S(STR_PAGE_TOOLBAR, S_ID(IDS_TOOLBAR_SEARCH), "Search")); + _function_button.setText(L_S(STR_PAGE_TOOLBAR, S_ID(IDS_TOOLBAR_FUNCTION), "Function")); + _setting_button.setText(L_S(STR_PAGE_TOOLBAR, S_ID(IDS_TOOLBAR_DISPLAY), "Display")); - _action_lissajous->setText(tr("&Lissajous")); + _action_lissajous->setText(L_S(STR_PAGE_TOOLBAR, S_ID(IDS_TOOLBAR_LISSAJOUS), "Lissajous")); - _themes->setTitle(tr("Themes")); - _dark_style->setText(tr("Dark")); - _light_style->setText(tr("Light")); + _themes->setTitle(L_S(STR_PAGE_TOOLBAR, S_ID(IDS_TOOLBAR_THEMES), "Themes")); + _dark_style->setText(L_S(STR_PAGE_TOOLBAR, S_ID(IDS_TOOLBAR_DARK), "Dark")); + _light_style->setText(L_S(STR_PAGE_TOOLBAR, S_ID(IDS_TOOLBAR_LIGHT), "Light")); - _action_fft->setText(tr("FFT")); - _action_math->setText(tr("Math")); + _action_fft->setText(L_S(STR_PAGE_TOOLBAR, S_ID(IDS_TOOLBAR_FFT), "FFT")); + _action_math->setText(L_S(STR_PAGE_TOOLBAR, S_ID(IDS_TOOLBAR_MATH), "Math")); - _action_dispalyOptions->setText(tr("Options")); + _action_dispalyOptions->setText(L_S(STR_PAGE_TOOLBAR, S_ID(IDS_TOOLBAR_OPTIONS), "Options")); } void TrigBar::reStyle() diff --git a/DSView/pv/ui/langresource.h b/DSView/pv/ui/langresource.h index cd1fed44..0301c951 100644 --- a/DSView/pv/ui/langresource.h +++ b/DSView/pv/ui/langresource.h @@ -61,7 +61,8 @@ static const struct lang_page_item lange_page_keys[] = {STR_PAGE_MAIN, "main.json"}, {STR_PAGE_TOOLBAR, "toolbar.json"}, {STR_PAGE_MSG, "msg.json"}, - {STR_PAGE_DSL, "DSL.json"}, + {STR_PAGE_DLG, "dlg.json"}, + {STR_PAGE_DSL, "DSL.json"} }; class LangResource diff --git a/DSView/pv/ui/string_ids.h b/DSView/pv/ui/string_ids.h index 9863ee15..6a6660c1 100644 --- a/DSView/pv/ui/string_ids.h +++ b/DSView/pv/ui/string_ids.h @@ -25,8 +25,10 @@ #define STR_PAGE_MAIN 1 #define STR_PAGE_MSG 2 #define STR_PAGE_TOOLBAR 3 +#define STR_PAGE_DLG 4 #define STR_PAGE_DSL 100 +// xx #define IDS_TOOLBAR_MODE #define IDS_TOOLBAR_START #define IDS_TOOLBAR_STOP @@ -36,4 +38,6 @@ #define IDS_TOOLBAR_REPEAT_ACTION #define IDS_TOOLBAR_OPTIONS + +#define IDS_MSG_LOG_LEVEL #endif \ No newline at end of file diff --git a/lang/cn/dlg.json b/lang/cn/dlg.json new file mode 100644 index 00000000..cd2dac4e --- /dev/null +++ b/lang/cn/dlg.json @@ -0,0 +1,26 @@ +[ + { + "id": "IDS_DLG_LOG_OPTIONS", + "text": "日志选项" + }, + { + "id": "IDS_DLG_LOG_LEVEL", + "text": "日志级别" + }, + { + "id": "IDS_DLG_SAVE_FILE", + "text": "保存到文件" + }, + { + "id": "IDS_DLG_OPEN_FILE", + "text": "打开文件" + }, + { + "id": "IDS_DLG_OPEN_SEESION", + "text": "打开会话" + }, + { + "id": "IDS_DLG_SAVE_SEESION", + "text": "保存会话" + } +] \ No newline at end of file diff --git a/lang/cn/msg.json b/lang/cn/msg.json new file mode 100644 index 00000000..6e666ec6 --- /dev/null +++ b/lang/cn/msg.json @@ -0,0 +1,30 @@ +[ + { + "id": "IDS_MSG_A_CAL", + "text": "自动校准" + }, + { + "id": "IDS_MSG_ADJUST_SAVE", + "text": "请调整零偏差并保存结果" + }, + { + "id": "IDS_MSG_OK", + "text": "好" + }, + { + "id": "IDS_MSG_SKIP", + "text": "跳过" + }, + { + "id": "IDS_MSG_A_CAL_START", + "text": "自动校准程序将启动。不要连接任何探头。这可能需要一段时间!" + }, + { + "id": "IDS_MSG_SAVE_CAPDATE", + "text": "是否保存捕获的数据?" + }, + { + "id": "IDS_MSG_SAVE_CANFIND_SESSIONFILE", + "text": "找不到此设备的默认会话文件!" + } +] \ No newline at end of file diff --git a/lang/cn/toolbar.json b/lang/cn/toolbar.json new file mode 100644 index 00000000..ffe51991 --- /dev/null +++ b/lang/cn/toolbar.json @@ -0,0 +1,170 @@ +[ + { + "id": "IDS_TOOLBAR_DEMO", + "text": "演示" + }, + { + "id": "IDS_TOOLBAR_FILE", + "text": "文件" + }, + { + "id": "IDS_TOOLBAR_OPTION", + "text": "选项" + }, + { + "id": "IDS_TOOLBAR_MODE", + "text": "模式" + }, + { + "id": "IDS_TOOLBAR_START", + "text": "开始" + }, + { + "id": "IDS_TOOLBAR_STOP", + "text": "停止" + }, + { + "id": "IDS_TOOLBAR_SINGLE", + "text": "单次" + }, + { + "id": "IDS_TOOLBAR_INSTANT", + "text": "立即" + }, + { + "id": "IDS_TOOLBAR_SINGLE_ACTION", + "text": "单次(&S)" + }, + { + "id": "IDS_TOOLBAR_REPEAT_ACTION", + "text": "重复(&R)" + }, + { + "id": "IDS_TOOLBAR_TRIGGER", + "text": "触发" + }, + { + "id": "IDS_TOOLBAR_DECODE", + "text": "解码" + }, + { + "id": "IDS_TOOLBAR_MEASURE", + "text": "测量" + }, + { + "id": "IDS_TOOLBAR_SEARCH", + "text": "搜索" + }, + { + "id": "IDS_TOOLBAR_FUNCTION", + "text": "函数" + }, + { + "id": "IDS_TOOLBAR_DISPLAY", + "text": "显示" + }, + { + "id": "IDS_TOOLBAR_LISSAJOUS", + "text": "李萨如图(&L)" + }, + { + "id": "IDS_TOOLBAR_THEMES", + "text": "主题" + }, + { + "id": "IDS_TOOLBAR_DARK", + "text": "暗黑" + }, + { + "id": "IDS_TOOLBAR_LIGHT", + "text": "清新" + }, + { + "id": "IDS_TOOLBAR_FFT", + "text": "FFT" + }, + { + "id": "IDS_TOOLBAR_MATH", + "text": "数学运算" + }, + { + "id": "IDS_TOOLBAR_OPTIONS", + "text": "选项" + }, + + + { + "id": "IDS_FILEBAR_FILE", + "text": "文件" + }, + { + "id": "IDS_FILEBAR_CONFIGURATION", + "text": "配置(&F)" + }, + { + "id": "IDS_FILEBAR_LOAD", + "text": "打开(&l)" + }, + { + "id": "IDS_FILEBAR_STORE", + "text": "保存(&S)" + }, + { + "id": "IDS_FILEBAR_DEFAULT", + "text": "默认" + }, + { + "id": "IDS_FILEBAR_0PEN", + "text": "打开(&O)" + }, + { + "id": "IDS_FILEBAR_SAVE", + "text": "保存(&S)" + }, + { + "id": "IDS_FILEBAR_EXPORT", + "text": "导出(&E)" + }, + { + "id": "IDS_FILEBAR_CAPTURE", + "text": "截屏(&C)" + }, + + + { + "id": "IDS_LOGOBAR_HELP", + "text": "帮助" + }, + { + "id": "IDS_LOGOBAR_ENGLISH", + "text": "English" + }, + { + "id": "IDS_LOGOBAR_CHINESE", + "text": "中文" + }, + { + "id": "IDS_LOGOBAR_LANGUAGE", + "text": "语言(&L)" + }, + { + "id": "IDS_LOGOBAR_ABOUT", + "text": "关于(&A)" + }, + { + "id": "IDS_LOGOBAR_MANUAL", + "text": "手册(&M)" + }, + { + "id": "IDS_LOGOBAR_BUG_REPORT", + "text": "报告问题(&B)" + }, + { + "id": "IDS_LOGOBAR_UPDATE", + "text": "更新(&U)" + }, + { + "id": "IDS_LOGOBAR_LOG_OPTIONS", + "text": "日志选项(&L)" + } +] \ No newline at end of file diff --git a/lang/en/dlg.json b/lang/en/dlg.json new file mode 100644 index 00000000..84372361 --- /dev/null +++ b/lang/en/dlg.json @@ -0,0 +1,26 @@ +[ + { + "id": "IDS_DLG_LOG_OPTIONS", + "text": "Log Options" + }, + { + "id": "IDS_DLG_LOG_LEVEL", + "text": "Log Level" + }, + { + "id": "IDS_DLG_SAVE_FILE", + "text": "Save To File" + }, + { + "id": "IDS_DLG_OPEN_FILE", + "text": "Open File" + }, + { + "id": "IDS_DLG_OPEN_SEESION", + "text": "Open Session" + }, + { + "id": "IDS_DLG_SAVE_SEESION", + "text": "Save Session" + } +] \ No newline at end of file diff --git a/lang/en/dsl.json b/lang/en/dsl.json new file mode 100644 index 00000000..b8e07c0b --- /dev/null +++ b/lang/en/dsl.json @@ -0,0 +1,10 @@ +[ + { + "id": "vvv", + "text": "xxx" + }, + { + "id": "vvv1", + "text": "xxx1" + } +] \ No newline at end of file diff --git a/lang/en/msg.json b/lang/en/msg.json index b8e07c0b..ef92fbd0 100644 --- a/lang/en/msg.json +++ b/lang/en/msg.json @@ -1,10 +1,30 @@ [ { - "id": "vvv", - "text": "xxx" + "id": "IDS_MSG_A_CAL", + "text": "Auto Calibration" }, { - "id": "vvv1", - "text": "xxx1" + "id": "IDS_MSG_ADJUST_SAVE", + "text": "Please adjust zero skew and save the result" + }, + { + "id": "IDS_MSG_OK", + "text": "Ok" + }, + { + "id": "IDS_MSG_SKIP", + "text": "Skip" + }, + { + "id": "IDS_MSG_A_CAL_START", + "text": "Auto Calibration program will be started. Don't connect any probes. It can take a while!" + }, + { + "id": "IDS_MSG_SAVE_CAPDATE", + "text": "Save captured data?" + }, + { + "id": "IDS_MSG_SAVE_CANFIND_SESSIONFILE", + "text": "Cannot find default session file for this device!" } ] \ No newline at end of file diff --git a/lang/en/toolbar.json b/lang/en/toolbar.json index 1822748d..29621b23 100644 --- a/lang/en/toolbar.json +++ b/lang/en/toolbar.json @@ -1,10 +1,175 @@ [ + { + "id": "IDS_TOOLBAR_DEMO", + "text": "Demo" + }, + { + "id": "IDS_TOOLBAR_FILE", + "text": "file" + }, + { + "id": "IDS_TOOLBAR_OPTION", + "text": "Options" + }, { "id": "IDS_TOOLBAR_MODE", - "text": "模式1" + "text": "Mode" }, { "id": "IDS_TOOLBAR_START", "text": "Start" + }, + { + "id": "IDS_TOOLBAR_STOP", + "text": "Stop" + }, + { + "id": "IDS_TOOLBAR_SINGLE", + "text": "Single" + }, + { + "id": "IDS_TOOLBAR_INSTANT", + "text": "Instant" + }, + { + "id": "IDS_TOOLBAR_SINGLE_ACTION", + "text": "&Single" + }, + { + "id": "IDS_TOOLBAR_REPEAT_ACTION", + "text": "&Repetitive" + }, + { + "id": "IDS_TOOLBAR_TRIGGER", + "text": "Trigger" + }, + { + "id": "IDS_TOOLBAR_DECODE", + "text": "Decode" + }, + { + "id": "IDS_TOOLBAR_MEASURE", + "text": "Measure" + }, + { + "id": "IDS_TOOLBAR_SEARCH", + "text": "Search" + }, + { + "id": "IDS_TOOLBAR_FUNCTION", + "text": "Function" + }, + { + "id": "IDS_TOOLBAR_DISPLAY", + "text": "Display" + }, + { + "id": "IDS_TOOLBAR_LISSAJOUS", + "text": "Lissajous" + }, + { + "id": "IDS_TOOLBAR_THEMES", + "text": "Themes" + }, + { + "id": "IDS_TOOLBAR_DARK", + "text": "Dark" + }, + { + "id": "IDS_TOOLBAR_LIGHT", + "text": "Light" + }, + { + "id": "IDS_TOOLBAR_FFT", + "text": "FFT" + }, + { + "id": "IDS_TOOLBAR_MATH", + "text": "Math" + }, + { + "id": "IDS_TOOLBAR_OPTIONS", + "text": "Options" + }, + + + { + "id": "IDS_FILEBAR_FILE", + "text": "File" + }, + { + "id": "IDS_FILEBAR_CONFIGURATION", + "text": "Con&fig..." + }, + { + "id": "IDS_FILEBAR_LOAD", + "text": "Load..." + }, + { + "id": "IDS_FILEBAR_STORE", + "text": "S&tore..." + }, + { + "id": "IDS_FILEBAR_DEFAULT", + "text": "Default..." + }, + { + "id": "IDS_FILEBAR_0PEN", + "text": "&Open..." + }, + { + "id": "IDS_FILEBAR_SAVE", + "text": "&Save..." + }, + { + "id": "IDS_FILEBAR_EXPORT", + "text": "&Export..." + }, + { + "id": "IDS_FILEBAR_CAPTURE", + "text": "&Capture..." + }, + + + { + "id": "IDS_LOGOBAR_HELP", + "text": "Help" + }, + { + "id": "IDS_LOGOBAR_ENGLISH", + "text": "English" + }, + { + "id": "IDS_LOGOBAR_CHINESE", + "text": "中文" + }, + { + "id": "IDS_LOGOBAR_LANGUAGE", + "text": "&Language" + }, + { + "id": "IDS_LOGOBAR_ABOUT", + "text": "&About..." + }, + { + "id": "IDS_LOGOBAR_MANUAL", + "text": "&Manual..." + }, + { + "id": "IDS_LOGOBAR_BUG_REPORT", + "text": "&Bug Report" + }, + { + "id": "IDS_LOGOBAR_UPDATE", + "text": "&Update" + }, + { + "id": "IDS_LOGOBAR_LOG_OPTIONS", + "text": "L&og Options" } + + + + + ] \ No newline at end of file