diff --git a/app/fwupgrade/FWUpgrade_zh_CN.qm b/app/fwupgrade/FWUpgrade_zh_CN.qm
index 68920b6c..38ac753c 100644
Binary files a/app/fwupgrade/FWUpgrade_zh_CN.qm and b/app/fwupgrade/FWUpgrade_zh_CN.qm differ
diff --git a/app/fwupgrade/FWUpgrade_zh_CN.ts b/app/fwupgrade/FWUpgrade_zh_CN.ts
index 02eafdbb..7d713ae5 100644
--- a/app/fwupgrade/FWUpgrade_zh_CN.ts
+++ b/app/fwupgrade/FWUpgrade_zh_CN.ts
@@ -1,61 +1,338 @@
+
+ Dialog_upgradeFirmware
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 更新升级
+
+
+
+
+
+ 设备固件自动升级中,请稍候...
+
+
+
+ LoginDialog
+
+
+
+ 用户登录
+
+
+
+
+ 账户:
+
+
+
+
+ 密码:
+
+
+
+
+ 登录
+
+
+
+
+ 帮助
+
+
+
+
+ 取消
+
+
+
+
+ 提示
+
+
+
+
+ 账户或密码错误
+
+
+
+
+ 确定
+
+
MainWindow
-
+ 扫描仪维护工具
-
-
-
+
+
+ 固件升级
-
-
-
+
+
+
+ 设备列表:
+
+
+
+
+ 在线升级:
+
+
+
+
+ 获取版本列表
+
+
+
+
+ 下载更新
+
+
+
+
+ 版本列表:
+
+
+
+
+ 本地升级:
+
+
+
+
+ 目录:
+
+
+
+
+ 打开本地目录:
+
+
+
+
+ 更新升级
+
+
+
+
+ 管理工具
+
+
+
+
+ 滚轴计数:
+
+
+
+
+
+ 0
+
+
+
+
+ 历史扫描张数:
+
+
+
+
+ 清除滚轴计数
+
+
+
+
+ 修改账户密码
+
+
+
+
+ 旧密码:
+
+
+
+
+ 新密码:
+
+
+
+
+ 确认修改
+
+
+
+
+ 确认新密码:
+
+
+
+
+ 关闭
-
- 安装
+ 安装
-
- 安装中,请稍候...
+ 安装中,请稍候...
+
+
+
+
+ 打开设备:%1,固件版本号为:%2
+
+
+
+
+
+ 设备不支持
+
+
+
+
+ 打开设备错误:%1
+
+
+
+
+ 无设备打开
+
+
+
+
+
+
+
+
+
+
+ 提示:
+
+
+
+
+ 未获取到可升级版本
+
+
+
+
+
+
+
+
+
+
+ 确定
+
+
+
+
+ 打开目录
+
+
+
+
+ 压缩文件(* .zip)
+
+
+
+
+
+ 设备:%1 固件升级成功
+
+
+
+
+ 设备:%1 固件升级失败,文件下载失败
+
+
+
+
+
+ 设备:%1 固件升级失败,IO错误
+
+
+
+
+ 滚轴计数已清零。
+
+
+
+
+ 清除滚轴计数失败。
+
+
+
+
+ 旧密码错误
+
+
+
+
+ 新密码不能为空
+
+
+
+
+ 新密码不一致
+
+
+
+
+ 密码修改失败
+
+
+
+
+ 密码修改成功
QObject
-
- 提示
+ 提示
-
- 安装成功!
+ 安装成功!
-
-
- 确定
+ 确定
-
- 错误
+ 错误
-
- 安装失败!
+ 安装失败!
diff --git a/app/fwupgrade/mainwindow.cpp b/app/fwupgrade/mainwindow.cpp
index 74d4cb43..6924e70e 100644
--- a/app/fwupgrade/mainwindow.cpp
+++ b/app/fwupgrade/mainwindow.cpp
@@ -205,10 +205,21 @@ void MainWindow::on_comboDevList_currentIndexChanged(int index)
}
m_curFwVersion = QString::fromStdString(versionNum.c_str());
- ui->labelDevInfo->setText(QString("open device: %1, firmware version: %2").arg(name).arg(m_curFwVersion));
+ ui->labelDevInfo->setText(QString(tr("open device: %1, firmware version: %2")).arg(name).arg(m_curFwVersion));
- ui->labelRollCount->setText("do not support");
- ui->labelScanCount->setText("do not support");
+ SANE_Int historyScanNum = 0;
+ unsigned int historyScanNumLen = sizeof(SANE_Int);
+ SANE_Status ret = sane_io_control(m_curDevHandle, IO_CTRL_CODE_GET_HISTORY_NUM, &historyScanNum, &historyScanNumLen);
+ if(ret == SANE_STATUS_GOOD && historyScanNum >= 0)
+ {
+ ui->labelRollCount->setText(QString(historyScanNum));
+ ui->labelScanCount->setText(QString(historyScanNum));
+ }
+ else
+ {
+ ui->labelRollCount->setText(tr("do not support"));
+ ui->labelScanCount->setText(tr("do not support"));
+ }
ui->btnGetVersionList->setEnabled(true);
ui->btnOpenFilePath->setEnabled(true);
@@ -216,12 +227,12 @@ void MainWindow::on_comboDevList_currentIndexChanged(int index)
}
else
{
- ui->labelDevInfo->setText(QString("open device error: %1").arg(name));
+ ui->labelDevInfo->setText(QString(tr("open device error: %1")).arg(name));
}
}
else
{
- ui->labelDevInfo->setText("no device opened");
+ ui->labelDevInfo->setText(tr("no device opened"));
}
}
@@ -301,15 +312,15 @@ void MainWindow::on_btnDownloadUpgrade_clicked()
dlg.exec();
if (0 == dlg.getUpgradeStatus())
{
- ui->labelDevInfo->setText(QString("device: %1 upgrade firmware success").arg(m_curDevName));
+ ui->labelDevInfo->setText(QString(tr("device: %1 upgrade firmware success")).arg(m_curDevName));
}
else if (1 == dlg.getUpgradeStatus())
{
- ui->labelDevInfo->setText(QString("device: %1 upgrade firmware failed, download file fail").arg(m_curDevName));
+ ui->labelDevInfo->setText(QString(tr("device: %1 upgrade firmware failed, download file fail")).arg(m_curDevName));
}
else if (2 == dlg.getUpgradeStatus())
{
- ui->labelDevInfo->setText(QString("device: %1 upgrade firmware failed, io error").arg(m_curDevName));
+ ui->labelDevInfo->setText(QString(tr("device: %1 upgrade firmware failed, io error")).arg(m_curDevName));
}
}
}
@@ -323,11 +334,11 @@ void MainWindow::on_btnUpgrade_clicked()
dlg.exec();
if (0 == dlg.getUpgradeStatus())
{
- ui->labelDevInfo->setText(QString("device: %1 upgrade firmware success").arg(m_curDevName));
+ ui->labelDevInfo->setText(QString(tr("device: %1 upgrade firmware success")).arg(m_curDevName));
}
else if (2 == dlg.getUpgradeStatus())
{
- ui->labelDevInfo->setText(QString("device: %1 upgrade firmware failed, io error").arg(m_curDevName));
+ ui->labelDevInfo->setText(QString(tr("device: %1 upgrade firmware failed, io error")).arg(m_curDevName));
}
}
}
@@ -364,7 +375,7 @@ void MainWindow::on_btnModifyPassword_clicked()
if (password != ui->editOldPassword->text())
{
- QMessageBox msg(QMessageBox::Information, tr("tips"), "old password is wrong", QMessageBox::Yes, this);
+ QMessageBox msg(QMessageBox::Information, tr("tips"), tr("old password is wrong"), QMessageBox::Yes, this);
msg.setButtonText(QMessageBox::Yes, tr("yes"));
msg.exec();
return;
@@ -372,7 +383,7 @@ void MainWindow::on_btnModifyPassword_clicked()
if (ui->editNewPassword->text().isEmpty())
{
- QMessageBox msg(QMessageBox::Information, tr("tips"), "new password can not be empty", QMessageBox::Yes, this);
+ QMessageBox msg(QMessageBox::Information, tr("tips"), tr("new password can not be empty"), QMessageBox::Yes, this);
msg.setButtonText(QMessageBox::Yes, tr("yes"));
msg.exec();
return;
@@ -380,7 +391,7 @@ void MainWindow::on_btnModifyPassword_clicked()
if (ui->editNewPassword->text() != ui->editNewPassword_2->text())
{
- QMessageBox msg(QMessageBox::Information, tr("tips"), "new password is inconsistent", QMessageBox::Yes, this);
+ QMessageBox msg(QMessageBox::Information, tr("tips"), tr("new password is inconsistent"), QMessageBox::Yes, this);
msg.setButtonText(QMessageBox::Yes, tr("yes"));
msg.exec();
return;
@@ -388,13 +399,13 @@ void MainWindow::on_btnModifyPassword_clicked()
if (HGBASE_ERR_OK != HGBase_SetProfileString(cfgPath, "login", "password", passwordEncrypt(ui->editNewPassword->text()).toStdString().c_str()))
{
- QMessageBox msg(QMessageBox::Information, tr("tips"), "modify password fail", QMessageBox::Yes, this);
+ QMessageBox msg(QMessageBox::Information, tr("tips"), tr("modify password fail"), QMessageBox::Yes, this);
msg.setButtonText(QMessageBox::Yes, tr("yes"));
msg.exec();
return;
}
- QMessageBox msg(QMessageBox::Information, tr("tips"), "modify password success", QMessageBox::Yes, this);
+ QMessageBox msg(QMessageBox::Information, tr("tips"), tr("modify password success"), QMessageBox::Yes, this);
msg.setButtonText(QMessageBox::Yes, tr("yes"));
msg.exec();
}
diff --git a/app/fwupgrade/mainwindow.ui b/app/fwupgrade/mainwindow.ui
index 7ae482f6..dcf2c10b 100644
--- a/app/fwupgrade/mainwindow.ui
+++ b/app/fwupgrade/mainwindow.ui
@@ -6,10 +6,22 @@
0
0
- 740
+ 739
497
+
+
+ 739
+ 497
+
+
+
+
+ 739
+ 497
+
+
MainWindow
@@ -398,7 +410,7 @@
0
0
- 740
+ 739
22