diff --git a/app/scanner/Scanner_zh_CN.qm b/app/scanner/Scanner_zh_CN.qm index cca5fcf8..d139276b 100644 Binary files a/app/scanner/Scanner_zh_CN.qm and b/app/scanner/Scanner_zh_CN.qm differ diff --git a/app/scanner/Scanner_zh_CN.ts b/app/scanner/Scanner_zh_CN.ts index 9ac22ef9..04ed4b01 100644 --- a/app/scanner/Scanner_zh_CN.ts +++ b/app/scanner/Scanner_zh_CN.ts @@ -2179,51 +2179,51 @@ bug description: 导出驱动日志 - + HuaGoScan 华高扫描软件 - + Grid 多列显示 - + Move To... 移动到... - + Insert files 插入文件 + + - - nodevice 没有发现扫描仪 - - - - - - + + + + + + Question 询问 - - + + modified, save it? 图像已被修改。 是否保存修改? - + file lost, remove it? 文件已丢失,是否删除? @@ -2232,7 +2232,7 @@ bug description: 已连接 - + disconnected 已断开连接 @@ -2249,17 +2249,17 @@ bug description: 扫描完成 - + Clear, then start scan 清空并启动扫描 - + Do NOT clear, then start scan 不清空并启动扫描 - + Already exist images in image list. Do you want to clear? 图像列表中已存在图像。 @@ -2274,12 +2274,12 @@ Do you want to clear? 磁盘空间不足,请删除不需要的文件,以保证有足够的空间 - + Open images 打开图片 - + Insert images 插入图片 @@ -2292,234 +2292,240 @@ Do you want to clear? 保存失败 - + binary 黑白 - + gray 256级灰度 - + rgb 24位彩色 - + thumbnailBar enabled 显示缩略图栏 - + thumbnailBar hidden 隐藏缩略图栏 - + cancel 取消 - - - + + + save succeed 保存成功 - - + + find savePath in thumbnail 图片名在列表中已存在 - + Please select at least one picture before export 请至少选中一张图片再进行导出 - + File name 文件名 - + File path 文件路径 - + File size 文件大小 - + Creation date/time 创建时间 - + Modified date/time 修改时间 - + Accessed date/time 访问时间 - + Format 格式 - + Width 宽度 - + Height 高度 - + depth 深度 - + Color model 色彩模式 - + DPI 每英寸像素点 - + Print size 打印尺寸 - + Frame - + None - + Mono 黑白 - + Gray 灰度 - + Color 彩色 - + Warning 警告 - + Device is Running! Please finish scanning first. 设备正在运行! 请先结束扫描。 - + Image processing failed 图像处理失败 - + Ocr init failed OCR初始化错误 - + Ocr failed OCR错误 - + File does not exist 文件不存在 - + Failed to load dynamic library 加载动态库失败 - + File data error 文件数据错误 - + Image format processing error 图像格式处理错误 - + Out of memory 内存不足 - + Failed 错误 - - - - - - - - - - + + + The language switch is successful and takes effect the next time the software is started! + 语言切换成功,下次启动软件时生效! + + + + + + + + + + + + already waked up device 已唤醒设备 - + be ready 就绪 - - - - - - + + + + + + folder limit 无法访问“我的文档”, 请前往“扫描至”更换可访问的扫描目录再进行扫描。 - + Insufficient access rights 文件访问权限不足 @@ -2532,47 +2538,47 @@ Please finish scanning first. 图像处理失败 - + Are you sure to close 您确定要断开设备: - + ? 吗? - - + + close 关闭 - + tip 提示 - + Other versions not available 未获取到其他版本 - - + + The device does not support this operation 设备不支持该操作 - - + + IO error IO错误 - - - + + + error 错误 @@ -2587,17 +2593,17 @@ Continue to close? 是否继续关闭? - + Sure to sign out administrator account? 是否确定登出管理员账户? - + confirm the operation 确认操作 - + Are you sure to clear the rollor acount? 你确定要清除滚轴计数吗 @@ -2606,34 +2612,34 @@ Continue to close? 请重新进入关于界面以获取最新值 - + <p>%1: <a href='%2'>%3</a> - + <p>%1: %2 - + roller number 滚轴张数 - + open scanner 打开扫描仪 - - + + app name 华高扫描软件 - - + + success 成功 @@ -2650,22 +2656,22 @@ Continue to close? 失败 - - + + failed 失败 - - - + + + warning 警告 - - - + + + the disk space in the current path is unsufficient, please select a new path or clear the disk space in time. 当前路径磁盘空间不足, 请重新选择路径或及时清理磁盘空间。 @@ -2675,143 +2681,145 @@ Continue to close? 配置丢失 - + apply setting 应用配置 - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + start failed 启动失败 - + HanvonScan 汉王扫描软件 - + LanxumScan 立思辰扫描软件 - + CumtennScan 沧田扫描软件 - + menu_language 语言 - + act_simpCN 简体中文 - + act_English - English + English - + auto save 自动保存 - + when switching pictures, save the edited pictures directly without reminding 切换图片时,不提醒,直接保存编辑过的图片 - + statusBar displayed 显示状态栏 - + statusBar hidden 隐藏状态栏 - + toolBar displayed 显示工具栏 - + toolBar hidden 隐藏工具栏 - + colorInfo enabled 启用图像信息 - + colorInfo disenabled 关闭图像信息 - + enabling automatic saving 启用自动保存 - + cancel auto save 取消自动保存 - + Automatically save the edited the edited iamge when switching pictures. To cancel, uncheck the menu item: image-> automatically save 切换图片时,自动保存编辑过的图像。若想取消,请取消勾选菜单项:图像->自动保存 - - - - - - - - - - + + + + + + + + + + + + yes 确定 - + save, do not remind again 保存,不再提醒 - - - - - - - - - + + + + + + + + + no 取消 @@ -2820,26 +2828,26 @@ Continue to close? 发现设备 - + reconnected 重新连接 - + already connected, but open faild 已经连接,但打开失败 - - + + save image failed: 存图失败: - - - - + + + + create savepath failed: 创建文件夹失败: @@ -2848,99 +2856,101 @@ Continue to close? %1%2%3.%4 - - + + create image doc failed: 创建图片文件失败: - - - - - - - - - - - - - + + + + + + + + + + + + + save image doc failed: 保存图片文件失败: - + start failed! 启动安装程序失败! - + There are pictures that have not been saved. Are you sure to close? 有图像未保存,确定关闭? - + found device : %1 发现设备 : %1 - + + - - - - + + + + - - - + + + + tips 提示 - + Are you sure to close? 确定关闭应用软件? - + confirm operation 确认操作 - + are you sure to clear the roller count? 您确定要清除滚轴计数吗 - - - + + + hint 提示 - - + + Roller scanned count has been set to 0. 辊轴计数已置零 - - + + Roller scanned count reset failed. 重置滚轴计数失败 - + Error 错误 - + Document missing! It would be deleted or renamed. 文档丢失!文档可能已被删除或被重命名。 @@ -2973,28 +2983,28 @@ Are you sure to close? <br>导航地址: <a href='https://j.map.baidu.com/7e/1TO'>百度地图访问</a> - + About %1 关于 %1 - + <p>%1</p><p>Version: %2<br>CopyRight: &#169; %3</p><p>%4%5%6%7%8%9</p> <p>%1</p><p>版本: %2<br>版权: &#169; %3</p><p>%4%5%6%7%8%9</p> - + about %1 关于 %1 - + <p>Version: %1</p> <p>版本: %1</p> <p>版本: %1</p> - + <p>CopyRight: &#169; %1</p> <p>版权: &#169; %1</p> <p>版权: &#169; %1</p> @@ -3015,7 +3025,7 @@ Are you sure to close? 错误 - + default_setting 默认设置 diff --git a/app/scanner/Scanner_zh_EN.qm b/app/scanner/Scanner_zh_EN.qm index c2e24c6f..d6c516dd 100644 Binary files a/app/scanner/Scanner_zh_EN.qm and b/app/scanner/Scanner_zh_EN.qm differ diff --git a/app/scanner/Scanner_zh_EN.ts b/app/scanner/Scanner_zh_EN.ts index efefe0ad..cc805e07 100644 --- a/app/scanner/Scanner_zh_EN.ts +++ b/app/scanner/Scanner_zh_EN.ts @@ -2022,167 +2022,169 @@ Please make sure the two passwords are the same. Export drive log... - + HanvonScan Hanvon scanning software - + LanxumScan LANXUM scanning software - + CumtennScan CUMTENN scanning software - + HuaGoScan HUAGOSCAN scanning software - + menu_language Language - + act_simpCN 简体中文 - + act_English English - + Grid Multi-column display - + Move To... Move to... - + Insert files Insert file + + - - nodevice No scanner detected - + auto save Auto save - + when switching pictures, save the edited pictures directly without reminding Do not show prompt and save the edited images directly when switching images. - + statusBar displayed Show status bar - + statusBar hidden Hide status bar - + toolBar displayed Show toolbar - + toolBar hidden Hide toolbar - + colorInfo enabled Enable image information - + colorInfo disenabled Disable image information - + enabling automatic saving Enable auto save - + cancel auto save Cancel auto save - + Automatically save the edited the edited iamge when switching pictures. To cancel, uncheck the menu item: image-> automatically save Save edited images automatically when switching images. If you want to cancel, please deselect the menu item: Auto save images. - - - - - - + + + + + + Question Ask - - + + modified, save it? Image modified, save changes? - - - - - - - - - - + + + + + + + + + + + + yes Yes - + save, do not remind again Save, do not prompt again - - - - - - - - - + + + + + + + + + no No - + file lost, remove it? File lost; delete? @@ -2191,555 +2193,563 @@ Please make sure the two passwords are the same. Device discovered - + found device : %1 Device discovered: %1 - + reconnected reconnect - + already connected, but open faild connected, but failed to open - + disconnected disconnected - - - + + + the disk space in the current path is unsufficient, please select a new path or clear the disk space in time. Insufficient disk space for the current path. Please reselect a path or clear disk space immediately. - - - + + + warning Warning - - + + save image failed: Failed to save image: - - - - + + + + create savepath failed: Failed to create folder: - - + + create image doc failed: Failed to create image file: - - - - - - - - - - - - - + + + + + + + + + + + + + save image doc failed: Failed to save image: - + binary Black and white - + gray Grayscale - + rgb Color - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + start failed Failed to start - - - - - - - - - - + + + + + + + + + + already waked up device Device is awake - + thumbnailBar enabled Show thumbnail bar - + thumbnailBar hidden Hide thumbnail bar - + Clear, then start scan Clear and start scan - + Do NOT clear, then start scan Do not clear and start scan - + cancel Cancel - + Already exist images in image list. Do you want to clear? Image already exists in the list of images. Clear? - + Open images Open image - + Insert images Insert image - + + - - - - + + + + - - - + + + + tips prompt - - - + + + save succeed Saved successfully - - + + find savePath in thumbnail Image name already exists in the list - + Please select at least one picture before export Please select at least one image and then export - + File name File name - + File path File path - + File size File size - + Creation date/time Creation time - + Modified date/time Modification time - + Accessed date/time Access time - + Format Format - + Width Width - + Height Height - + depth Depth - + Color model Color mode - + DPI Pixels per inch - + Print size Print size - + Frame Frame - + None None - + Mono Black and white - + Gray Gray scale - + Color Color - + Warning Warning - + Device is Running! Please finish scanning first. Device is currently running! Please stop scanning first. - + There are pictures that have not been saved. Are you sure to close? There are unsaved images; are you sure you want to close? - + Are you sure to close? Are you sure you want to close? - + Sure to sign out administrator account? Are you sure you want to log out of the administrator account? - + confirm operation Confirm operation - + are you sure to clear the roller count? Are you sure you want to clear the roller count? - - - + + + hint Prompt - - + + Roller scanned count has been set to 0. Roller count reset to zero. - - + + Roller scanned count reset failed. Failed to reset roller count. - + Error Error - + Document missing! It would be deleted or renamed. File lost! File may be deleted or renamed. - + confirm the operation Confirm operation - + Are you sure to clear the rollor acount? Are you sure you want to clear the roller count? - + About %1 About %1 - + <p>%1</p><p>Version: %2<br>CopyRight: &#169; %3</p><p>%4%5%6%7%8%9</p> <p>%1</p><p>Version: %2<br>Copyright: &#169; %3</p><p>%4%5%6%7%8%9</p> - + about %1 About %1 - + <p>Version: %1</p> <p>Version: %1</p> - + <p>CopyRight: &#169; %1</p> <p>Copyright: &#169; %1</p> - + <p>%1: <a href='%2'>%3</a> p>%1: <a href='%2'>%3</a> - + <p>%1: %2 <p>%1: %2 - + roller number Number of rollers - + open scanner Open scanner - - + + app name HUAGOSCAN scanning software - - + + success successfully - + be ready Ready - - + + failed failed - - - + + + error Error - + start failed! Failed to start! - - - - - - + + + + + + folder limit Cannot access “My Documents”. Please go to “Scan to” and change the accessible scan folder and then perform the scan. - + Insufficient access rights Insufficient file access permissions - + Image processing failed Image processing failed - + Ocr init failed OCR initialization error - + Ocr failed OCR failed - + File does not exist File does not exist - + Failed to load dynamic library Failed to load dynamic library - + File data error File data error - + Image format processing error Image format processing error - + Out of memory Insufficient memory - + Failed Failed - + apply setting Apply configuration - + Are you sure to close Are you sure you want to disconnect device: - + ? ? - - + + close Close - + tip Prompt - + Other versions not available No other versions obtained - - + + The device does not support this operation Device does not support this operation - - + + IO error IO error + + + + The language switch is successful and takes effect the next time the software is started! + The language switch is successful and takes effect the next time the software is started! + QObject - + default_setting Default setting diff --git a/app/scanner/main.cpp b/app/scanner/main.cpp index 99416486..ebaf8ff1 100644 --- a/app/scanner/main.cpp +++ b/app/scanner/main.cpp @@ -12,7 +12,7 @@ int main(int argc, char *argv[]) lang_initialize(nullptr); - QString appLang = getCfgValue("global", "language", QString("Chinese")); + QString appLang = getCfgValue("global", "language", QString("chinese")); for (int i = 1; i < argc; i++) { char* z = argv[i]; @@ -26,39 +26,28 @@ int main(int argc, char *argv[]) appLang = "chinese"; } - while (1) + QString translator_qt_name = ":translation/qt_zh_CN.qm"; + QString translator_scanner_name = ":translation/Scanner_zh_CN.qm"; + int cp = 936; + if (appLang == "english") { - QString translator_qt_name = ":translation/qt_zh_CN.qm"; - QString translator_scanner_name = ":translation/Scanner_zh_CN.qm"; - int cp = 936; - if (appLang == "english") - { - translator_qt_name = ":translation/qt_zh_CN.qm"; - translator_scanner_name = ":translation/Scanner_zh_EN.qm"; - cp = 20127; - } - - QTranslator translator_qt; - if (translator_qt.load(translator_qt_name)) - a.installTranslator(&translator_qt); - QTranslator translator_scanner; - if (translator_scanner.load(translator_scanner_name)) - a.installTranslator(&translator_scanner); - - lang_set_code_page(cp); - - MainWindow w(appLang); - QScreen *screen = QGuiApplication::primaryScreen(); - w.move((screen->size().width() - w.width()) / 2, (screen->size().height() - w.height()) / 2); - w.show(); - a.exec(); - - saveCfgValue("global", "language", appLang); - if (!w.isContinue()) - { - break; - } + translator_qt_name = ":translation/qt_zh_CN.qm"; + translator_scanner_name = ":translation/Scanner_zh_EN.qm"; + cp = 20127; } - return 0; + QTranslator translator_qt; + if (translator_qt.load(translator_qt_name)) + a.installTranslator(&translator_qt); + QTranslator translator_scanner; + if (translator_scanner.load(translator_scanner_name)) + a.installTranslator(&translator_scanner); + + lang_set_code_page(cp); + + MainWindow w(appLang); + QScreen *screen = QGuiApplication::primaryScreen(); + w.move((screen->size().width() - w.width()) / 2, (screen->size().height() - w.height()) / 2); + w.show(); + return a.exec(); } diff --git a/app/scanner/mainwindow.cpp b/app/scanner/mainwindow.cpp index 269f29c8..2eac0b0e 100644 --- a/app/scanner/mainwindow.cpp +++ b/app/scanner/mainwindow.cpp @@ -51,12 +51,10 @@ #define PASSWORD_KEY 4 #define MY_URL_SCHEME "inscanner" -MainWindow::MainWindow(QString& appLang, QWidget *parent) +MainWindow::MainWindow(const QString& appLang, QWidget *parent) : QMainWindow(parent) , ui(new Ui::MainWindow) - , m_appLang(appLang) , m_currLang(appLang) - , m_isContinue(false) , m_versionDll(nullptr) , m_admin_loggedIn(false) , m_dpi(200) @@ -401,11 +399,6 @@ MainWindow::~MainWindow() delete ui; } -bool MainWindow::isContinue() -{ - return m_isContinue; -} - void MainWindow::exitFullScreen() { assert(nullptr != m_dlgFullScreen); @@ -4227,48 +4220,40 @@ void MainWindow::on_act_device_log_triggered() void MainWindow::on_act_simpCN_triggered() { - if (m_currLang == "english") - { - m_act_simpCN->setChecked(false); - m_act_English->setChecked(true); - } - else - { - m_act_simpCN->setChecked(true); - m_act_English->setChecked(false); - } + m_act_simpCN->setChecked(true); + m_act_English->setChecked(false); if (m_currLang == "chinese") { return; } - m_appLang = "chinese"; - m_closeTip = false; - m_isContinue = true; - close(); + m_currLang = "chinese"; + saveCfgValue("global", "language", m_currLang); + + QMessageBox msg(QMessageBox::Critical, tr("tips"), + tr("The language switch is successful and takes effect the next time the software is started!"), + QMessageBox::Ok, this); + msg.setButtonText(QMessageBox::Ok, tr("yes")); + msg.exec(); } void MainWindow::on_act_English_triggered() { - if (m_currLang == "english") - { - m_act_simpCN->setChecked(false); - m_act_English->setChecked(true); - } - else - { - m_act_simpCN->setChecked(true); - m_act_English->setChecked(false); - } + m_act_simpCN->setChecked(false); + m_act_English->setChecked(true); if (m_currLang == "english") { return; } - m_appLang = "english"; - m_closeTip = false; - m_isContinue = true; - close(); + m_currLang = "english"; + saveCfgValue("global", "language", m_currLang); + + QMessageBox msg(QMessageBox::Critical, tr("tips"), + tr("The language switch is successful and takes effect the next time the software is started!"), + QMessageBox::Ok, this); + msg.setButtonText(QMessageBox::Ok, tr("yes")); + msg.exec(); } diff --git a/app/scanner/mainwindow.h b/app/scanner/mainwindow.h index 2746753f..29a59591 100644 --- a/app/scanner/mainwindow.h +++ b/app/scanner/mainwindow.h @@ -79,10 +79,9 @@ class MainWindow : public QMainWindow std::vector wrong_imgs_; public: - MainWindow(QString& appLang, QWidget *parent = nullptr); + MainWindow(const QString& appLang, QWidget *parent = nullptr); virtual ~MainWindow() override; - bool isContinue(); void exitFullScreen(); static HGResult saveImage(HGImage image, const HGImgFmtSaveInfo* info, bool ocr, const HGChar *fileName); static QString getLogInfo(HGResult ret); @@ -275,9 +274,7 @@ private: private: Ui::MainWindow *ui; - QString &m_appLang; QString m_currLang; - bool m_isContinue; VersionDll *m_versionDll; QString m_password; bool m_admin_loggedIn; diff --git a/app/scanner/qt_zh_CN.ts b/app/scanner/qt_zh_CN.ts index 9898b37b..3a13abf2 100644 --- a/app/scanner/qt_zh_CN.ts +++ b/app/scanner/qt_zh_CN.ts @@ -2158,6 +2158,10 @@ Are you sure to close? act_English + + The language switch is successful and takes effect the next time the software is started! + + Phonon:: @@ -4808,7 +4812,7 @@ Please verify the correct file name was given. default_setting - 默认设置 + 默认设置