app增加语言切换功能

This commit is contained in:
yangjiaxuan 2023-01-28 10:57:18 +08:00
parent 9c1b9e9684
commit eb53786c6d
9 changed files with 3522 additions and 230 deletions

View File

@ -2,6 +2,7 @@
<qresource prefix="/translation">
<file>Scanner_zh_CN.qm</file>
<file>qt_zh_CN.qm</file>
<file>Scanner_zh_EN.qm</file>
</qresource>
<qresource prefix="/images">
<file>image_rsc/action/btnEmailScanedImages.png</file>
@ -73,7 +74,7 @@
<file>image_rsc/logo/HUAGO-LOGO-for UI.jpg</file>
<file>image_rsc/logo/HUAGO-LOGO-for UI.png</file>
<file>image_rsc/logo/Lanxum_logo.ico</file>
<file>image_rsc/logo/Cumtenn_logo.ico</file>
<file>image_rsc/logo/Cumtenn_logo.ico</file>
<file>image_rsc/logo/logo.ico</file>
<file>image_rsc/logo/NoBrand_logo.ico</file>
<file>image_rsc/logo/RightWay_logo.ico</file>

Binary file not shown.

View File

@ -2179,51 +2179,51 @@ bug description:
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="108"/>
<location filename="mainwindow.cpp" line="120"/>
<source>HuaGoScan</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="265"/>
<location filename="mainwindow.cpp" line="294"/>
<source>Grid</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="270"/>
<location filename="mainwindow.cpp" line="299"/>
<source>Move To...</source>
<translation>...</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="274"/>
<location filename="mainwindow.cpp" line="303"/>
<source>Insert files</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="301"/>
<location filename="mainwindow.cpp" line="302"/>
<location filename="mainwindow.cpp" line="303"/>
<location filename="mainwindow.cpp" line="330"/>
<location filename="mainwindow.cpp" line="331"/>
<location filename="mainwindow.cpp" line="332"/>
<source>nodevice</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="581"/>
<location filename="mainwindow.cpp" line="636"/>
<location filename="mainwindow.cpp" line="1645"/>
<location filename="mainwindow.cpp" line="1670"/>
<location filename="mainwindow.cpp" line="2439"/>
<location filename="mainwindow.cpp" line="2888"/>
<location filename="mainwindow.cpp" line="616"/>
<location filename="mainwindow.cpp" line="671"/>
<location filename="mainwindow.cpp" line="1680"/>
<location filename="mainwindow.cpp" line="1705"/>
<location filename="mainwindow.cpp" line="2474"/>
<location filename="mainwindow.cpp" line="2923"/>
<source>Question</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="582"/>
<location filename="mainwindow.cpp" line="1646"/>
<location filename="mainwindow.cpp" line="617"/>
<location filename="mainwindow.cpp" line="1681"/>
<source>modified, save it?</source>
<translation>
</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="637"/>
<location filename="mainwindow.cpp" line="672"/>
<source>file lost, remove it?</source>
<translation></translation>
</message>
@ -2232,7 +2232,7 @@ bug description:
<translation type="vanished"> </translation>
</message>
<message>
<location filename="mainwindow.cpp" line="872"/>
<location filename="mainwindow.cpp" line="907"/>
<source> disconnected</source>
<translation> </translation>
</message>
@ -2249,17 +2249,17 @@ bug description:
<translation type="vanished"></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="1666"/>
<location filename="mainwindow.cpp" line="1701"/>
<source>Clear, then start scan</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="1667"/>
<location filename="mainwindow.cpp" line="1702"/>
<source>Do NOT clear, then start scan</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="1671"/>
<location filename="mainwindow.cpp" line="1706"/>
<source>Already exist images in image list.
Do you want to clear?</source>
<translation>
@ -2274,12 +2274,12 @@ Do you want to clear?</source>
<translation type="vanished"></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="1866"/>
<location filename="mainwindow.cpp" line="1901"/>
<source>Open images</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="1877"/>
<location filename="mainwindow.cpp" line="1912"/>
<source>Insert images</source>
<translation></translation>
</message>
@ -2292,234 +2292,234 @@ Do you want to clear?</source>
<translation type="vanished"></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="1123"/>
<location filename="mainwindow.cpp" line="1158"/>
<source>binary</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="1125"/>
<location filename="mainwindow.cpp" line="1160"/>
<source>gray</source>
<translation>256</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="1127"/>
<location filename="mainwindow.cpp" line="1162"/>
<source>rgb</source>
<translation>24</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="1381"/>
<location filename="mainwindow.cpp" line="1416"/>
<source>thumbnailBar enabled</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="1385"/>
<location filename="mainwindow.cpp" line="1420"/>
<source>thumbnailBar hidden</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="1669"/>
<location filename="mainwindow.cpp" line="1704"/>
<source>cancel</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="2088"/>
<location filename="mainwindow.cpp" line="2153"/>
<location filename="mainwindow.cpp" line="2235"/>
<location filename="mainwindow.cpp" line="2123"/>
<location filename="mainwindow.cpp" line="2188"/>
<location filename="mainwindow.cpp" line="2270"/>
<source>save succeed</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="2100"/>
<location filename="mainwindow.cpp" line="2247"/>
<location filename="mainwindow.cpp" line="2135"/>
<location filename="mainwindow.cpp" line="2282"/>
<source>find savePath in thumbnail</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="2271"/>
<location filename="mainwindow.cpp" line="2306"/>
<source>Please select at least one picture before export</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="2338"/>
<location filename="mainwindow.cpp" line="2373"/>
<source>File name</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="2338"/>
<location filename="mainwindow.cpp" line="2373"/>
<source>File path</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="2338"/>
<location filename="mainwindow.cpp" line="2373"/>
<source>File size</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="2338"/>
<location filename="mainwindow.cpp" line="2373"/>
<source>Creation date/time</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="2338"/>
<location filename="mainwindow.cpp" line="2373"/>
<source>Modified date/time</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="2338"/>
<location filename="mainwindow.cpp" line="2373"/>
<source>Accessed date/time</source>
<translation>访</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="2381"/>
<location filename="mainwindow.cpp" line="2416"/>
<source>Format</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="2381"/>
<location filename="mainwindow.cpp" line="2416"/>
<source>Width</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="2381"/>
<location filename="mainwindow.cpp" line="2416"/>
<source>Height</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="2381"/>
<location filename="mainwindow.cpp" line="2416"/>
<source>depth</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="2381"/>
<location filename="mainwindow.cpp" line="2416"/>
<source>Color model</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="2381"/>
<location filename="mainwindow.cpp" line="2416"/>
<source>DPI</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="2381"/>
<location filename="mainwindow.cpp" line="2416"/>
<source>Print size</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="2381"/>
<location filename="mainwindow.cpp" line="2416"/>
<source>Frame</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="2395"/>
<location filename="mainwindow.cpp" line="2430"/>
<source>None</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="2395"/>
<location filename="mainwindow.cpp" line="2430"/>
<source>Mono</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="2395"/>
<location filename="mainwindow.cpp" line="2430"/>
<source>Gray</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="2395"/>
<location filename="mainwindow.cpp" line="2430"/>
<source>Color</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="2416"/>
<location filename="mainwindow.cpp" line="2451"/>
<source>Warning</source>
<translation>
</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="2416"/>
<location filename="mainwindow.cpp" line="2451"/>
<source>Device is Running!
Please finish scanning first.</source>
<translation>
</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="3896"/>
<location filename="mainwindow.cpp" line="3936"/>
<source>Image processing failed</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="3900"/>
<location filename="mainwindow.cpp" line="3940"/>
<source>Ocr init failed</source>
<translation>OCR初始化错误</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="3904"/>
<location filename="mainwindow.cpp" line="3944"/>
<source>Ocr failed</source>
<translation>OCR错误</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="3908"/>
<location filename="mainwindow.cpp" line="3948"/>
<source>File does not exist</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="3912"/>
<location filename="mainwindow.cpp" line="3952"/>
<source>Failed to load dynamic library</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="3916"/>
<location filename="mainwindow.cpp" line="3956"/>
<source>File data error</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="3920"/>
<location filename="mainwindow.cpp" line="3960"/>
<source>Image format processing error</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="3924"/>
<location filename="mainwindow.cpp" line="3964"/>
<source>Out of memory</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="3928"/>
<location filename="mainwindow.cpp" line="3968"/>
<source>Failed</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="1299"/>
<location filename="mainwindow.cpp" line="1300"/>
<location filename="mainwindow.cpp" line="3167"/>
<location filename="mainwindow.cpp" line="3168"/>
<location filename="mainwindow.cpp" line="3234"/>
<location filename="mainwindow.cpp" line="3235"/>
<location filename="mainwindow.cpp" line="3317"/>
<location filename="mainwindow.cpp" line="3318"/>
<location filename="mainwindow.cpp" line="3399"/>
<location filename="mainwindow.cpp" line="3400"/>
<location filename="mainwindow.cpp" line="1334"/>
<location filename="mainwindow.cpp" line="1335"/>
<location filename="mainwindow.cpp" line="3202"/>
<location filename="mainwindow.cpp" line="3203"/>
<location filename="mainwindow.cpp" line="3269"/>
<location filename="mainwindow.cpp" line="3270"/>
<location filename="mainwindow.cpp" line="3352"/>
<location filename="mainwindow.cpp" line="3353"/>
<location filename="mainwindow.cpp" line="3434"/>
<location filename="mainwindow.cpp" line="3435"/>
<source>already waked up device</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="3531"/>
<location filename="mainwindow.cpp" line="3571"/>
<source>be ready</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="3736"/>
<location filename="mainwindow.cpp" line="3737"/>
<location filename="mainwindow.cpp" line="3738"/>
<location filename="mainwindow.cpp" line="3747"/>
<location filename="mainwindow.cpp" line="3748"/>
<location filename="mainwindow.cpp" line="3749"/>
<location filename="mainwindow.cpp" line="3776"/>
<location filename="mainwindow.cpp" line="3777"/>
<location filename="mainwindow.cpp" line="3778"/>
<location filename="mainwindow.cpp" line="3787"/>
<location filename="mainwindow.cpp" line="3788"/>
<location filename="mainwindow.cpp" line="3789"/>
<source>folder limit</source>
<translation>访
访</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="3892"/>
<location filename="mainwindow.cpp" line="3932"/>
<source>Insufficient access rights</source>
<translation>访</translation>
</message>
@ -2532,47 +2532,47 @@ Please finish scanning first.</source>
<translation type="obsolete"></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="4030"/>
<location filename="mainwindow.cpp" line="4070"/>
<source>Are you sure to close </source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="4030"/>
<location filename="mainwindow.cpp" line="4070"/>
<source> ?</source>
<translation>?</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="4040"/>
<location filename="mainwindow.cpp" line="4041"/>
<location filename="mainwindow.cpp" line="4080"/>
<location filename="mainwindow.cpp" line="4081"/>
<source>close </source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="4136"/>
<location filename="mainwindow.cpp" line="4176"/>
<source>tip</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="4136"/>
<location filename="mainwindow.cpp" line="4176"/>
<source>Other versions not available</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="4159"/>
<location filename="mainwindow.cpp" line="4177"/>
<location filename="mainwindow.cpp" line="4199"/>
<location filename="mainwindow.cpp" line="4217"/>
<source>The device does not support this operation</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="4161"/>
<location filename="mainwindow.cpp" line="4179"/>
<location filename="mainwindow.cpp" line="4201"/>
<location filename="mainwindow.cpp" line="4219"/>
<source>IO error</source>
<translation>IO错误</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="3704"/>
<location filename="mainwindow.cpp" line="3736"/>
<location filename="mainwindow.cpp" line="3747"/>
<location filename="mainwindow.cpp" line="3744"/>
<location filename="mainwindow.cpp" line="3776"/>
<location filename="mainwindow.cpp" line="3787"/>
<source>error</source>
<translation></translation>
</message>
@ -2587,17 +2587,17 @@ Continue to close?</source>
</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="2889"/>
<location filename="mainwindow.cpp" line="2924"/>
<source>Sure to sign out administrator account?</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="3022"/>
<location filename="mainwindow.cpp" line="3057"/>
<source>confirm the operation</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="3023"/>
<location filename="mainwindow.cpp" line="3058"/>
<source>Are you sure to clear the rollor acount?</source>
<translation></translation>
</message>
@ -2606,34 +2606,34 @@ Continue to close?</source>
<translation type="vanished"></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="3083"/>
<location filename="mainwindow.cpp" line="3118"/>
<source>&lt;p&gt;%1: &lt;a href=&apos;%2&apos;&gt;%3&lt;/a&gt;</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="3085"/>
<location filename="mainwindow.cpp" line="3120"/>
<source>&lt;p&gt;%1: %2</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="3087"/>
<location filename="mainwindow.cpp" line="3122"/>
<source>roller number</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="3495"/>
<location filename="mainwindow.cpp" line="3535"/>
<source>open scanner </source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="3496"/>
<location filename="mainwindow.cpp" line="3996"/>
<location filename="mainwindow.cpp" line="3536"/>
<location filename="mainwindow.cpp" line="4036"/>
<source>app name</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="3526"/>
<location filename="mainwindow.cpp" line="4014"/>
<location filename="mainwindow.cpp" line="3566"/>
<location filename="mainwindow.cpp" line="4054"/>
<source>success</source>
<translation></translation>
</message>
@ -2650,22 +2650,22 @@ Continue to close?</source>
<translation type="vanished"></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="3535"/>
<location filename="mainwindow.cpp" line="4019"/>
<location filename="mainwindow.cpp" line="3575"/>
<location filename="mainwindow.cpp" line="4059"/>
<source>failed</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="920"/>
<location filename="mainwindow.cpp" line="984"/>
<location filename="mainwindow.cpp" line="3564"/>
<location filename="mainwindow.cpp" line="955"/>
<location filename="mainwindow.cpp" line="1019"/>
<location filename="mainwindow.cpp" line="3604"/>
<source>warning</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="916"/>
<location filename="mainwindow.cpp" line="980"/>
<location filename="mainwindow.cpp" line="3560"/>
<location filename="mainwindow.cpp" line="951"/>
<location filename="mainwindow.cpp" line="1015"/>
<location filename="mainwindow.cpp" line="3600"/>
<source>the disk space in the current path is unsufficient, please select a new path or clear the disk space in time.</source>
<translation>,
</translation>
@ -2675,157 +2675,176 @@ Continue to close?</source>
<translation type="vanished"></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="4011"/>
<location filename="mainwindow.cpp" line="4051"/>
<source>apply setting</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="1280"/>
<location filename="mainwindow.cpp" line="1281"/>
<location filename="mainwindow.cpp" line="1282"/>
<location filename="mainwindow.cpp" line="3148"/>
<location filename="mainwindow.cpp" line="3149"/>
<location filename="mainwindow.cpp" line="3150"/>
<location filename="mainwindow.cpp" line="3215"/>
<location filename="mainwindow.cpp" line="3216"/>
<location filename="mainwindow.cpp" line="3217"/>
<location filename="mainwindow.cpp" line="3298"/>
<location filename="mainwindow.cpp" line="3299"/>
<location filename="mainwindow.cpp" line="3300"/>
<location filename="mainwindow.cpp" line="3380"/>
<location filename="mainwindow.cpp" line="3381"/>
<location filename="mainwindow.cpp" line="3382"/>
<location filename="mainwindow.cpp" line="1315"/>
<location filename="mainwindow.cpp" line="1316"/>
<location filename="mainwindow.cpp" line="1317"/>
<location filename="mainwindow.cpp" line="3183"/>
<location filename="mainwindow.cpp" line="3184"/>
<location filename="mainwindow.cpp" line="3185"/>
<location filename="mainwindow.cpp" line="3250"/>
<location filename="mainwindow.cpp" line="3251"/>
<location filename="mainwindow.cpp" line="3252"/>
<location filename="mainwindow.cpp" line="3333"/>
<location filename="mainwindow.cpp" line="3334"/>
<location filename="mainwindow.cpp" line="3335"/>
<location filename="mainwindow.cpp" line="3415"/>
<location filename="mainwindow.cpp" line="3416"/>
<location filename="mainwindow.cpp" line="3417"/>
<source>start failed</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="96"/>
<location filename="mainwindow.cpp" line="108"/>
<source>HanvonScan</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="100"/>
<location filename="mainwindow.cpp" line="112"/>
<source>LanxumScan</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="104"/>
<location filename="mainwindow.cpp" line="116"/>
<source>CumtennScan</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="330"/>
<location filename="mainwindow.cpp" line="174"/>
<source>menu_language</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="175"/>
<source>act_simpCN</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="176"/>
<source>act_tradCN</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="177"/>
<source>act_English</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="359"/>
<source>auto save</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="331"/>
<location filename="mainwindow.cpp" line="360"/>
<source>when switching pictures, save the edited pictures directly without reminding</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="475"/>
<location filename="mainwindow.cpp" line="510"/>
<source>statusBar displayed</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="479"/>
<location filename="mainwindow.cpp" line="514"/>
<source>statusBar hidden</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="488"/>
<location filename="mainwindow.cpp" line="523"/>
<source>toolBar displayed</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="492"/>
<location filename="mainwindow.cpp" line="527"/>
<source>toolBar hidden</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="501"/>
<location filename="mainwindow.cpp" line="536"/>
<source>colorInfo enabled</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="505"/>
<location filename="mainwindow.cpp" line="540"/>
<source>colorInfo disenabled</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="538"/>
<location filename="mainwindow.cpp" line="573"/>
<source>enabling automatic saving</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="542"/>
<location filename="mainwindow.cpp" line="577"/>
<source>cancel auto save</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="576"/>
<location filename="mainwindow.cpp" line="611"/>
<source>Automatically save the edited the edited iamge when switching pictures. To cancel, uncheck the menu item: image-&gt; automatically save</source>
<translation>-&gt;</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="584"/>
<location filename="mainwindow.cpp" line="639"/>
<location filename="mainwindow.cpp" line="1648"/>
<location filename="mainwindow.cpp" line="2442"/>
<location filename="mainwindow.cpp" line="2456"/>
<location filename="mainwindow.cpp" line="2890"/>
<location filename="mainwindow.cpp" line="2945"/>
<location filename="mainwindow.cpp" line="3025"/>
<location filename="mainwindow.cpp" line="3707"/>
<location filename="mainwindow.cpp" line="4032"/>
<location filename="mainwindow.cpp" line="619"/>
<location filename="mainwindow.cpp" line="674"/>
<location filename="mainwindow.cpp" line="1683"/>
<location filename="mainwindow.cpp" line="2477"/>
<location filename="mainwindow.cpp" line="2491"/>
<location filename="mainwindow.cpp" line="2925"/>
<location filename="mainwindow.cpp" line="2980"/>
<location filename="mainwindow.cpp" line="3060"/>
<location filename="mainwindow.cpp" line="3747"/>
<location filename="mainwindow.cpp" line="4072"/>
<source>yes</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="585"/>
<location filename="mainwindow.cpp" line="620"/>
<source>save, do not remind again</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="586"/>
<location filename="mainwindow.cpp" line="640"/>
<location filename="mainwindow.cpp" line="1649"/>
<location filename="mainwindow.cpp" line="2443"/>
<location filename="mainwindow.cpp" line="2457"/>
<location filename="mainwindow.cpp" line="2891"/>
<location filename="mainwindow.cpp" line="2946"/>
<location filename="mainwindow.cpp" line="3026"/>
<location filename="mainwindow.cpp" line="4033"/>
<location filename="mainwindow.cpp" line="621"/>
<location filename="mainwindow.cpp" line="675"/>
<location filename="mainwindow.cpp" line="1684"/>
<location filename="mainwindow.cpp" line="2478"/>
<location filename="mainwindow.cpp" line="2492"/>
<location filename="mainwindow.cpp" line="2926"/>
<location filename="mainwindow.cpp" line="2981"/>
<location filename="mainwindow.cpp" line="3061"/>
<location filename="mainwindow.cpp" line="4073"/>
<source>no</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="827"/>
<source>found device </source>
<translation></translation>
<translation type="vanished"></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="839"/>
<location filename="mainwindow.cpp" line="874"/>
<source> reconnected</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="841"/>
<location filename="mainwindow.cpp" line="876"/>
<source>already connected, but open faild</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="962"/>
<location filename="mainwindow.cpp" line="963"/>
<location filename="mainwindow.cpp" line="997"/>
<location filename="mainwindow.cpp" line="998"/>
<source>save image failed: </source>
<translation> </translation>
</message>
<message>
<location filename="mainwindow.cpp" line="1020"/>
<location filename="mainwindow.cpp" line="1021"/>
<location filename="mainwindow.cpp" line="1135"/>
<location filename="mainwindow.cpp" line="1136"/>
<location filename="mainwindow.cpp" line="1055"/>
<location filename="mainwindow.cpp" line="1056"/>
<location filename="mainwindow.cpp" line="1170"/>
<location filename="mainwindow.cpp" line="1171"/>
<source>create savepath failed: </source>
<translation> </translation>
</message>
@ -2834,94 +2853,99 @@ Continue to close?</source>
<translation type="vanished">%1%2%3.%4</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="1044"/>
<location filename="mainwindow.cpp" line="1045"/>
<location filename="mainwindow.cpp" line="1079"/>
<location filename="mainwindow.cpp" line="1080"/>
<source>create image doc failed: </source>
<translation> </translation>
</message>
<message>
<location filename="mainwindow.cpp" line="1079"/>
<location filename="mainwindow.cpp" line="1080"/>
<location filename="mainwindow.cpp" line="1186"/>
<location filename="mainwindow.cpp" line="1187"/>
<location filename="mainwindow.cpp" line="2093"/>
<location filename="mainwindow.cpp" line="2094"/>
<location filename="mainwindow.cpp" line="2095"/>
<location filename="mainwindow.cpp" line="2158"/>
<location filename="mainwindow.cpp" line="2159"/>
<location filename="mainwindow.cpp" line="2160"/>
<location filename="mainwindow.cpp" line="2240"/>
<location filename="mainwindow.cpp" line="2241"/>
<location filename="mainwindow.cpp" line="2242"/>
<location filename="mainwindow.cpp" line="1114"/>
<location filename="mainwindow.cpp" line="1115"/>
<location filename="mainwindow.cpp" line="1221"/>
<location filename="mainwindow.cpp" line="1222"/>
<location filename="mainwindow.cpp" line="2128"/>
<location filename="mainwindow.cpp" line="2129"/>
<location filename="mainwindow.cpp" line="2130"/>
<location filename="mainwindow.cpp" line="2193"/>
<location filename="mainwindow.cpp" line="2194"/>
<location filename="mainwindow.cpp" line="2195"/>
<location filename="mainwindow.cpp" line="2275"/>
<location filename="mainwindow.cpp" line="2276"/>
<location filename="mainwindow.cpp" line="2277"/>
<source>save image doc failed: </source>
<translation> </translation>
</message>
<message>
<location filename="mainwindow.cpp" line="3705"/>
<location filename="mainwindow.cpp" line="3745"/>
<source>start failed!</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="2440"/>
<location filename="mainwindow.cpp" line="2475"/>
<source>There are pictures that have not been saved.
Are you sure to close?</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="2088"/>
<location filename="mainwindow.cpp" line="2093"/>
<location filename="mainwindow.cpp" line="2100"/>
<location filename="mainwindow.cpp" line="2153"/>
<location filename="mainwindow.cpp" line="2158"/>
<location filename="mainwindow.cpp" line="2235"/>
<location filename="mainwindow.cpp" line="2240"/>
<location filename="mainwindow.cpp" line="2247"/>
<location filename="mainwindow.cpp" line="2271"/>
<location filename="mainwindow.cpp" line="2453"/>
<location filename="mainwindow.cpp" line="862"/>
<source>found device : %1</source>
<translation> : %1</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="2123"/>
<location filename="mainwindow.cpp" line="2128"/>
<location filename="mainwindow.cpp" line="2135"/>
<location filename="mainwindow.cpp" line="2188"/>
<location filename="mainwindow.cpp" line="2193"/>
<location filename="mainwindow.cpp" line="2270"/>
<location filename="mainwindow.cpp" line="2275"/>
<location filename="mainwindow.cpp" line="2282"/>
<location filename="mainwindow.cpp" line="2306"/>
<location filename="mainwindow.cpp" line="2488"/>
<source>tips</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="2454"/>
<location filename="mainwindow.cpp" line="2489"/>
<source>Are you sure to close?</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="2942"/>
<location filename="mainwindow.cpp" line="2977"/>
<source>confirm operation</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="2943"/>
<location filename="mainwindow.cpp" line="2978"/>
<source>are you sure to clear the roller count?</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="2956"/>
<location filename="mainwindow.cpp" line="2960"/>
<location filename="mainwindow.cpp" line="3043"/>
<location filename="mainwindow.cpp" line="2991"/>
<location filename="mainwindow.cpp" line="2995"/>
<location filename="mainwindow.cpp" line="3078"/>
<source>hint</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="2956"/>
<location filename="mainwindow.cpp" line="3036"/>
<location filename="mainwindow.cpp" line="2991"/>
<location filename="mainwindow.cpp" line="3071"/>
<source>Roller scanned count has been set to 0.</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="2960"/>
<location filename="mainwindow.cpp" line="3041"/>
<location filename="mainwindow.cpp" line="2995"/>
<location filename="mainwindow.cpp" line="3076"/>
<source>Roller scanned count reset failed.</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="3011"/>
<location filename="mainwindow.cpp" line="3046"/>
<source>Error</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="3011"/>
<location filename="mainwindow.cpp" line="3046"/>
<source>Document missing! It would be deleted or renamed.</source>
<translation></translation>
</message>
@ -2954,28 +2978,28 @@ Are you sure to close?</source>
<translation type="vanished">&lt;br&gt;: &lt;a href=&apos;https://j.map.baidu.com/7e/1TO&apos;&gt;百度地图访问&lt;/a&gt;</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="3061"/>
<location filename="mainwindow.cpp" line="3096"/>
<source>About %1</source>
<translation> %1</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="3062"/>
<location filename="mainwindow.cpp" line="3097"/>
<source>&lt;p&gt;%1&lt;/p&gt;&lt;p&gt;Version: %2&lt;br&gt;CopyRight: &amp;#169; %3&lt;/p&gt;&lt;p&gt;%4%5%6%7%8%9&lt;/p&gt;</source>
<translation>&lt;p&gt;%1&lt;/p&gt;&lt;p&gt;: %2&lt;br&gt;: &amp;#169; %3&lt;/p&gt;&lt;p&gt;%4%5%6%7%8%9&lt;/p&gt;</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="3077"/>
<location filename="mainwindow.cpp" line="3112"/>
<source>about %1</source>
<translation> %1</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="3078"/>
<location filename="mainwindow.cpp" line="3113"/>
<source>&lt;p&gt;Version: %1&lt;/p&gt;</source>
<oldsource>&lt;p&gt;: %1&lt;/p&gt;</oldsource>
<translation>&lt;p&gt; %1&lt;/p&gt;</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="3079"/>
<location filename="mainwindow.cpp" line="3114"/>
<source>&lt;p&gt;CopyRight: &amp;#169; %1&lt;/p&gt;</source>
<oldsource>&lt;p&gt;: &amp;#169; %1&lt;/p&gt;</oldsource>
<translation>&lt;p&gt; &amp;#169; %1&lt;/p&gt;</translation>

Binary file not shown.

3131
app/scanner/Scanner_zh_EN.ts Normal file

File diff suppressed because it is too large Load Diff

View File

@ -8,13 +8,25 @@ int main(int argc, char *argv[])
{
QApplication a(argc, argv);
QTranslator translator_qt_;
if (translator_qt_.load(":translation/qt_zh_CN.qm"))
a.installTranslator(&translator_qt_);
// QTranslator translator_qt_;
// if (translator_qt_.load(":translation/qt_zh_CN.qm"))
// a.installTranslator(&translator_qt_);
QTranslator translator_qt;
if (translator_qt.load(":translation/Scanner_zh_CN.qm"))
a.installTranslator(&translator_qt);
// QTranslator translator_qt;
// if (translator_qt.load(":translation/Scanner_zh_EN.qm"))
// a.installTranslator(&translator_qt);
std::string appLanguage;
for (int i = 1; i < argc; i++)
{
char* z = argv[i];
if (z == strstr(z, "-language="))
appLanguage = z + strlen("-language=");
}
// if ("English" == appLanguage && !appLanguage.empty())
MainWindow w;
QScreen *screen = QGuiApplication::primaryScreen();

View File

@ -77,9 +77,21 @@ MainWindow::MainWindow(QWidget *parent)
, m_currDeviceName("")
, m_cacheDirNotify(false)
, m_AquirePathNotify(false)
, m_translator_qt(nullptr)
{
ui->setupUi(this);
// QTranslator translator_qt_;
// if (translator_qt_.load(":translation/qt_zh_CN.qm"))
// qApp->installTranslator(&translator_qt_);
m_translator_qt = new QTranslator;
if (m_translator_qt->load(":translation/Scanner_zh_EN.qm"))
{
qApp->installTranslator(m_translator_qt);
ui->retranslateUi(this);
}
m_versionDll = new VersionDll;
HGBase_RegisterCrashFunc(CrashFunc, this);
@ -89,7 +101,6 @@ MainWindow::MainWindow(QWidget *parent)
HGChar cfgFilePath[512];
HGBase_GetConfigPath(cfgFilePath, 512);
HGBase_CreateDir(cfgFilePath);
deleteUpgradePkg(QString::fromStdString(getStdString(cfgFilePath)));
#if defined(OEM_HANWANG)
@ -133,6 +144,7 @@ MainWindow::MainWindow(QWidget *parent)
HGChar cfgpath[512] = {0};
QString old;
HGBase_GetConfigPath(cfgpath, _countof(cfgpath) - 1);
HGBase_CreateDir(cfgpath);
dev_que_.set_root_dir(cfgpath);
old = QString::fromStdString(cfgpath) + PATH_SYMBOL + "scanner.schm";
if(QFile::exists(old))
@ -159,6 +171,18 @@ MainWindow::MainWindow(QWidget *parent)
ui->toolBar->addSeparator();
ui->toolBar->addAction(ui->act_help);
QMenu *menu_language = new QMenu(tr("menu_language"));
m_act_simpCN = new QAction(tr("act_simpCN"));
m_act_tradCN = new QAction(tr("act_tradCN"));
m_act_English = new QAction(tr("act_English"));
m_act_simpCN->setCheckable(true);
m_act_tradCN->setCheckable(true);
m_act_English->setCheckable(true);
ui->menu_info->addMenu(menu_language);
menu_language->addAction(m_act_simpCN);
menu_language->addAction(m_act_tradCN);
menu_language->addAction(m_act_English);
m_view = new HGImgView(ui->centralwidget);
ui->verticalLayout->addWidget(m_view);
ui->centralwidget->setMinimumWidth(160);
@ -198,6 +222,10 @@ MainWindow::MainWindow(QWidget *parent)
connect(m_multiPageLineEdit, SIGNAL(editingFinished()), this, SLOT(on_multiPageLineEditFinished()));
connect(m_act_simpCN, SIGNAL(triggered()), this, SLOT(on_act_simpCN_triggered()));
connect(m_act_tradCN, SIGNAL(triggered()), this, SLOT(on_act_tradCN_triggered()));
connect(m_act_English, SIGNAL(triggered()), this, SLOT(on_act_English_triggered()));
m_view->enableScroll(true);
m_view->setScrollSize(16);
m_view->setMinScrollSliderSize(20);
@ -344,6 +372,12 @@ MainWindow::MainWindow(QWidget *parent)
MainWindow::~MainWindow()
{
if(nullptr != m_translator_qt)
{
delete m_translator_qt;
m_translator_qt = nullptr;
}
if (nullptr != m_dlgFullScreen)
{
delete m_dlgFullScreen;
@ -825,7 +859,7 @@ void MainWindow::on_sane_dev_arrive(QString devName, bool opened)
dev_que_.add_scanner(stdn.c_str());
// statu info ...
QString info(tr("found device ") +": " + devName);
QString info = tr("found device : %1").arg(devName);
m_wndStatusBar->setDeviceStatusInfo(info, false);
m_dialogLog->addLog(info, false);
HGBase_WriteInfo(HGBASE_INFOTYPE_DESC, "%s", getStdString(info).c_str());
@ -4186,3 +4220,66 @@ void MainWindow::on_act_device_log_triggered()
}
}
void MainWindow::on_act_simpCN_triggered()
{
m_act_simpCN->setChecked(true);
m_act_tradCN->setChecked(false);
m_act_English->setChecked(false);
if (m_translator_qt != nullptr)
{
qApp->removeTranslator(m_translator_qt);
delete m_translator_qt;
m_translator_qt = nullptr;
m_translator_qt = new QTranslator;
if (m_translator_qt->load(":translation/Scanner_zh_CN.qm"))
{
qApp->installTranslator(m_translator_qt);
ui->retranslateUi(this);
}
}
}
void MainWindow::on_act_tradCN_triggered()
{
m_act_simpCN->setChecked(false);
m_act_tradCN->setChecked(true);
m_act_English->setChecked(false);
// if (m_translator_qt != nullptr)
// {
// qApp->removeTranslator(m_translator_qt);
// delete m_translator_qt;
// m_translator_qt = nullptr;
// m_translator_qt = new QTranslator;
// if (m_translator_qt->load(":translation/Scanner_zh_TC.qm"))
// {
// qApp->installTranslator(m_translator_qt);
// ui->retranslateUi(this);
// }
// }
}
void MainWindow::on_act_English_triggered()
{
m_act_simpCN->setChecked(false);
m_act_tradCN->setChecked(false);
m_act_English->setChecked(true);
if (m_translator_qt != nullptr)
{
qApp->removeTranslator(m_translator_qt);
delete m_translator_qt;
m_translator_qt = nullptr;
m_translator_qt = new QTranslator;
if (m_translator_qt->load(":translation/Scanner_zh_EN.qm"))
{
qApp->installTranslator(m_translator_qt);
ui->retranslateUi(this);
}
}
}

View File

@ -4,6 +4,7 @@
#include <QMainWindow>
#include <QLineEdit>
#include <QListWidgetItem>
#include <QTranslator>
#include "HGImgView.h"
#include "HGImgThumb.h"
#include "sane/sane_ex.h"
@ -237,6 +238,12 @@ private slots:
void on_act_device_log_triggered();
void on_act_simpCN_triggered();
void on_act_tradCN_triggered();
void on_act_English_triggered();
public slots:
void my_url_handler(const QUrl& url);
@ -277,6 +284,10 @@ private:
QMenu *m_thumbMenu;
QAction *m_moveToAction;
QListWidget* m_listwidget;
QTranslator* m_translator_qt;
QAction *m_act_simpCN;
QAction *m_act_tradCN;
QAction *m_act_English;
dev_que dev_que_;

View File

@ -1683,10 +1683,6 @@ Please make sure the two passwords are the same.</source>
<source>file lost, remove it?</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>found device </source>
<translation type="unfinished"></translation>
</message>
<message>
<source> reconnected</source>
<translation type="unfinished"></translation>
@ -2146,6 +2142,26 @@ Are you sure to close?</source>
<source>cancel</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>found device : %1</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>menu_language</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>act_simpCN</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>act_tradCN</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>act_English</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>Phonon::</name>