Language resource file

This commit is contained in:
dreamsourcelabTAI 2023-05-16 19:29:03 +08:00
parent e7464a02d3
commit 04b36c9b2b
4 changed files with 30 additions and 34 deletions

View File

@ -39,7 +39,7 @@
#include "../sigsession.h"
#include "../ui/langresource.h"
#include "../log.h"
#include <QDebug>
#include "../ui/msgbox.h"
using namespace boost;
using namespace std;
@ -578,14 +578,9 @@ void DeviceOptions::channel_checkbox_clicked(QCheckBox *sc)
int vld_ch_num = g_variant_get_int16(gvar);
g_variant_unref(gvar);
if (cur_ch_num > vld_ch_num) {
dialogs::DSMessageBox msg(this);
msg.mBox()->setText(L_S(STR_PAGE_MSG, S_ID(IDS_MSG_INFORMATION), "Information"));
msg.mBox()->setInformativeText(L_S(STR_PAGE_MSG, S_ID(IDS_MSG_MAX_CHANNEL), "Current mode only suppport max ")
+ QString::number(vld_ch_num)
+ L_S(STR_PAGE_MSG, S_ID(IDS_MSG_CHANNEL), " channels!"));
msg.mBox()->addButton(L_S(STR_PAGE_MSG, S_ID(IDS_MSG_OK), "Ok"), QMessageBox::AcceptRole);
msg.mBox()->setIcon(QMessageBox::Information);
msg.exec();
QString msg_str(L_S(STR_PAGE_MSG, S_ID(IDS_MSG_MAX_CHANNEL_COUNT_WARNING), "max count of channels!"));
msg_str = msg_str.replace("{0}", QString::number(vld_ch_num) );
MsgBox::Show("", msg_str);
sc->setChecked(false);
}

View File

@ -576,7 +576,8 @@ namespace pv
if (_device_agent.have_enabled_channel() == false)
{
_callback->show_error("No probes enabled.");
QString err_str(L_S(STR_PAGE_MSG, S_ID(IDS_MSG_NO_ENABLED_CHANNEL), "No channels enabled!"));
_callback->show_error(err_str);
return false;
}

View File

@ -28,7 +28,7 @@
},
{
"id": "IDS_MSG_A_CAL_START",
"text": "自动校准程序将启动。不要连接任何探头。这可能需要一段时间"
"text": "自动校准程序将启动。不要连接任何探头。这可能需要一段时间!"
},
{
"id": "IDS_MSG_A_CAL",
@ -56,11 +56,11 @@
},
{
"id": "IDS_MSG_RE_WIN_ST_ER",
"text": " 还原窗口状态错误!"
"text": "还原窗口状态错误!"
},
{
"id": "IDS_MSG_INVAILD_CURSOR",
"text": " 样本范围的游标索引无效!"
"text": "样本范围的游标索引无效!"
},
{
"id": "IDS_MSG_SEL_FILENAME",
@ -104,15 +104,11 @@
},
{
"id": "IDS_MSG_ALL_CHANNEL_DISABLE",
"text": " 所有频道已禁用请至少启用一个通道"
"text": "所有通道已禁用,请至少启用一个通道!"
},
{
"id": "IDS_MSG_MAX_CHANNEL",
"text": "当前模式仅支持最大"
},
{
"id": "IDS_MSG_CHANNEL",
"text": " 频道数!"
"id": "IDS_MSG_MAX_CHANNEL_COUNT_WARNING",
"text": "当前模式仅支持最大 {0}\n通道数!"
},
{
"id": "IDS_MSG_TRI_SET_ISSUE",
@ -132,7 +128,7 @@
},
{
"id": "IDS_MSG_CHANGE_SOURCE_FAIL",
"text": " 更改触发源失败!"
"text": "更改触发源失败!"
},
{
"id": "IDS_MSG_CHANGE_CHANNEL_FAIL",
@ -176,7 +172,7 @@
},
{
"id": "IDS_MSG_AD_TRIGGER_NEED_HARDWARE",
"text": " 高级触发模式需要DSLogic硬件支持!"
"text": "高级触发模式需要DSLogic硬件支持!"
},
{
"id": "IDS_MSG_SET_TRI_MULTI_CHANNEL",
@ -217,7 +213,7 @@
},
{
"id": "IDS_MSG_MALLOC_ERROR_DET",
"text": " 内存不足,无法容纳此样本!\n请降低采样深度!"
"text": "内存不足,无法容纳此样本!\n请降低采样深度!"
},
{
"id": "IDS_DATA_ERROR",
@ -225,7 +221,7 @@
},
{
"id": "IDS_DATA_ERROR_DET1",
"text": " 接收的数据与预定义的测试数据不一致!"
"text": "接收的数据与预定义的测试数据不一致!"
},
{
"id": "IDS_DATA_ERROR_DET2",
@ -237,7 +233,7 @@
},
{
"id": "IDS_MSG_PACKET_ERROR_DET",
"text": " 接收到的数据包的内容不是预期的 !"
"text": "接收到的数据包的内容不是预期的 !"
},
{
"id": "IDS_MSG_DATA_OVERFLOW",
@ -245,7 +241,7 @@
},
{
"id": "IDS_MSG_DATA_OVERFLOW_DET",
"text": " USB带宽无法支持当前采样率 ! \n请降低采样深度!"
"text": "USB带宽无法支持当前采样率 ! \n请降低采样深度!"
},
{
"id": "IDS_MSG_UNDEFINED_ERROR",
@ -257,7 +253,7 @@
},
{
"id": "IDS_MSG_STORESESS_SAVESTART_ERROR1",
"text": " DSView当前不支持\n多数据类型的文件保存."
"text": "DSView当前不支持\n多数据类型的文件保存."
},
{
"id": "IDS_MSG_STORESESS_SAVESTART_ERROR2",
@ -269,7 +265,7 @@
},
{
"id": "IDS_MSG_STORESESS_SAVESTART_ERROR4",
"text": " 生成临时文件数据失败."
"text": "生成临时文件数据失败."
},
{
"id": "IDS_MSG_STORESESS_SAVESTART_ERROR5",
@ -370,5 +366,9 @@
{
"id": "IDS_MSG_DEVICE_BUSY_SWITCH_FAILED",
"text": "设备在使用中,切换失败!"
},
{
"id": "IDS_MSG_NO_ENABLED_CHANNEL",
"text": "未启用通道!"
}
]

View File

@ -108,12 +108,8 @@
"text": "All channel disabled! Please enable at least one channel."
},
{
"id": "IDS_MSG_MAX_CHANNEL",
"text": "Current mode only suppport max "
},
{
"id": "IDS_MSG_CHANNEL",
"text": " channels!"
"id": "IDS_MSG_MAX_CHANNEL_COUNT_WARNING",
"text": "Current mode only suppport max {0}\nchannels!"
},
{
"id": "IDS_MSG_TRI_SET_ISSUE",
@ -371,5 +367,9 @@
{
"id": "IDS_MSG_DEVICE_BUSY_SWITCH_FAILED",
"text": "The device is busy,switch failed!"
},
{
"id": "IDS_MSG_NO_ENABLED_CHANNEL",
"text": "No channels enabled!"
}
]