mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-11-23 20:14:05 +00:00
optimize: add qtwebengine zh_CN support
This commit is contained in:
parent
edf8c8d4f3
commit
df7fb33be6
6
.github/scripts/windows-publish.ps1
vendored
6
.github/scripts/windows-publish.ps1
vendored
|
@ -52,7 +52,11 @@ function Main() {
|
|||
Copy-Item $sdkDll $archiveName\
|
||||
Copy-Item winlibs\lib\msvc\*.dll $archiveName\
|
||||
Copy-Item locale\*.qm $archiveName\locale\
|
||||
# Copy-Item qtsingleapplication\lib\*.dll $archiveName\
|
||||
Write-Host "copy qwebengine zh_CN translation"
|
||||
Copy-Item thirdparty\qwebengine_ts\*.qm $archiveName\locale\
|
||||
$webengineqm="{0}\translations\qtwebengine_*.qm" -f $env:Qt5_Dir
|
||||
Write-Host "copy qtwebengine qm from $($webengineqm)"
|
||||
Copy-Item $webengineqm $archiveName\locale\
|
||||
Write-Host "compress zip..."
|
||||
# 打包zip
|
||||
Compress-Archive -Path $archiveName -DestinationPath $archiveName'.zip'
|
||||
|
|
22
main.cc
22
main.cc
|
@ -1,4 +1,4 @@
|
|||
/* This file is (c) 2008-2012 Konstantin Isakov <ikm@goldendict.org>
|
||||
/* This file is (c) 2008-2012 Konstantin Isakov <ikm@goldendict.org>
|
||||
* Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file */
|
||||
|
||||
#include <stdio.h>
|
||||
|
@ -385,6 +385,8 @@ int main( int argc, char ** argv )
|
|||
if( !cfg.preferences.interfaceLanguage.isEmpty() && localeName != cfg.preferences.interfaceLanguage )
|
||||
{
|
||||
localeName = cfg.preferences.interfaceLanguage;
|
||||
}
|
||||
|
||||
QLocale locale( localeName );
|
||||
QLocale::setDefault( locale );
|
||||
if( !qtTranslator.load( "qt_" + localeName, Config::getLocDir() ) )
|
||||
|
@ -395,21 +397,11 @@ int main( int argc, char ** argv )
|
|||
|
||||
translator.load( Config::getLocDir() + "/" + localeName );
|
||||
app.installTranslator( &translator );
|
||||
}
|
||||
else
|
||||
|
||||
QTranslator webengineTs;
|
||||
if( webengineTs.load( "qtwebengine_" + localeName, Config::getLocDir() ) )
|
||||
{
|
||||
QString localeName = QLocale::system().name();
|
||||
|
||||
|
||||
if( !qtTranslator.load( "qt_" + localeName, Config::getLocDir() ) )
|
||||
{
|
||||
qtTranslator.load( "qt_" + localeName, QLibraryInfo::location( QLibraryInfo::TranslationsPath ) );
|
||||
|
||||
app.installTranslator( &qtTranslator );
|
||||
}
|
||||
|
||||
translator.load( Config::getLocDir() + "/" + localeName );
|
||||
app.installTranslator( &translator );
|
||||
app.installTranslator( &webengineTs );
|
||||
}
|
||||
|
||||
// Prevent app from quitting spontaneously when it works with scan popup
|
||||
|
|
7
thirdparty/qwebengine_ts/README.md
vendored
Normal file
7
thirdparty/qwebengine_ts/README.md
vendored
Normal file
|
@ -0,0 +1,7 @@
|
|||
qt webengine lacks the translation of chinese .
|
||||
this file is a compilation of this qwebengine_zh_CN.ts
|
||||
(https://codereview.qt-project.org/c/qt/qttranslations/+/399180) .
|
||||
|
||||
provided as a temporarily way to support zh_CN.
|
||||
|
||||
|
BIN
thirdparty/qwebengine_ts/qtwebengine_zh_CN.qm
vendored
Normal file
BIN
thirdparty/qwebengine_ts/qtwebengine_zh_CN.qm
vendored
Normal file
Binary file not shown.
467
thirdparty/qwebengine_ts/qtwebengine_zh_CN.ts
vendored
Normal file
467
thirdparty/qwebengine_ts/qtwebengine_zh_CN.ts
vendored
Normal file
|
@ -0,0 +1,467 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE TS>
|
||||
<TS version="2.1" language="zh_CN">
|
||||
<context>
|
||||
<name>DownloadInterruptReason</name>
|
||||
<message>
|
||||
<source>Unknown reason or not interrupted</source>
|
||||
<translation>未知原因或非中断</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>General file operation failure</source>
|
||||
<translation>文件操作失败</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>The file cannot be written locally, due to access restrictions</source>
|
||||
<translation>由于访问限制,该文件无法在本地写入</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Insufficient space on the target drive</source>
|
||||
<translation>目标驱动器上的空间不足</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>The directory or file name is too long</source>
|
||||
<translation>目录或文件名太长</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>The file size exceeds the file system limitation</source>
|
||||
<translation>文件大小超过文件系统限制</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>The file is infected with a virus</source>
|
||||
<translation>该文件感染了病毒</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Temporary problem (for example file in use, or too many open files)</source>
|
||||
<translation>临时问题(例如文件正在使用或打开的文件太多)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>The file was blocked due to local policy</source>
|
||||
<translation>由于本地政策,该文件被阻止</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Checking the safety of the download failed due to unexpected reasons</source>
|
||||
<translation>由于意外原因,检查下载的安全性失败</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>File seek past the end of a file (resuming previously interrupted download)</source>
|
||||
<translation>文件搜索超过文件末尾(恢复先前中断的下载)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>The partial file did not match the expected hash</source>
|
||||
<translation>部分文件与预期的哈希不匹配</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>General network failure</source>
|
||||
<translation>一般网络故障</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>The network operation has timed out</source>
|
||||
<translation>网络操作超时</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>The network connection has been terminated</source>
|
||||
<translation>网络连接已终止</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>The server has gone down</source>
|
||||
<translation>服务器宕机了</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>The network request was invalid (for example, the URL or scheme is invalid)</source>
|
||||
<translation>网络请求无效(例如,URL或scheme无效)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>General server failure</source>
|
||||
<translation>一般服务器故障</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>The server does not have the requested data</source>
|
||||
<translation>服务器没有请求的数据</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>The server did not authorize access to the resource</source>
|
||||
<translation>服务器未授权访问资源</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>A problem with the server certificate occurred</source>
|
||||
<translation>服务器证书出现问题</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Access forbidden by the server</source>
|
||||
<translation>服务器禁止访问</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Unexpected server response</source>
|
||||
<translation>意外的服务器响应</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Download canceled by the user</source>
|
||||
<translation>下载被用户取消</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>QQuickPdfDocument</name>
|
||||
<message>
|
||||
<source>no error</source>
|
||||
<translation>无错误</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>data not yet available</source>
|
||||
<translation>数据不可用</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>file not found</source>
|
||||
<translation>文件未找到</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>invalid file format</source>
|
||||
<translation>无效文件格式</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>incorrect password</source>
|
||||
<translation>密码错误</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>unsupported security scheme</source>
|
||||
<translation>不支持的安全方案</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>unknown error</source>
|
||||
<translation>未知错误</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>QQuickWebEngineView</name>
|
||||
<message>
|
||||
<source>Stop</source>
|
||||
<translation>停止</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Reload and Bypass Cache</source>
|
||||
<translation>重新加载和绕过缓存</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Open link in this window</source>
|
||||
<translation>在当前窗口中打开链接</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Toggle Play/Pause</source>
|
||||
<translation>播放/暂停</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Toggle Mute</source>
|
||||
<translation>静音</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Close Page</source>
|
||||
<translation>关闭页面</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Unselect</source>
|
||||
<translation>取消选择</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>&Bold</source>
|
||||
<translation>加粗(&B)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>&Italic</source>
|
||||
<translation>斜体(&I)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>&Underline</source>
|
||||
<translation>下划线(&U)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>&Strikethrough</source>
|
||||
<translation>删除线(&S)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Align &Left</source>
|
||||
<translation>左对齐(&L)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Align &Center</source>
|
||||
<translation>居中(&C)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Align &Right</source>
|
||||
<translation>右对齐(&R)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Align &Justified</source>
|
||||
<translation>对齐(&J)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>&Indent</source>
|
||||
<translation>缩进(&I)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>&Outdent</source>
|
||||
<translation>突出(&O)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Insert &Ordered List</source>
|
||||
<translation>插入有序列表(&O)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Insert &Unordered List</source>
|
||||
<translation>插入无序列表(&U)</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>QWebEnginePage</name>
|
||||
<message>
|
||||
<source>Stop</source>
|
||||
<translation>停止</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Reload and Bypass Cache</source>
|
||||
<translation>重新加载和绕过缓存</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Toggle Play/Pause</source>
|
||||
<translation>播放/暂停</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Toggle Mute</source>
|
||||
<translation>静音</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Close Page</source>
|
||||
<translation>关闭页面</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Unselect</source>
|
||||
<translation>取消选择</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Are you sure you want to leave this page? Changes that you made may not be saved.</source>
|
||||
<translation>您确定要离开此页面吗? 您所做的更改不会被保存。</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Open link in this window</source>
|
||||
<translation>在当前窗口中打开链接</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Open link in new background tab</source>
|
||||
<translation>在新的后台选项卡中打开链接</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>&Bold</source>
|
||||
<translation>加粗(&B)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>&Italic</source>
|
||||
<translation>斜体(&I)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>&Underline</source>
|
||||
<translation>下划线(&U)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>&Strikethrough</source>
|
||||
<translation>删除线(&S)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Align &Left</source>
|
||||
<translation>左对齐(&L)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Align &Center</source>
|
||||
<translation>居中(&C)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Align &Right</source>
|
||||
<translation>右对齐(&R)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Align &Justified</source>
|
||||
<translation>对齐(&J)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>&Indent</source>
|
||||
<translation>缩进(&I)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>&Outdent</source>
|
||||
<translation>突出(&O)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Insert &Ordered List</source>
|
||||
<translation>插入有序列表(&O)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Insert &Unordered List</source>
|
||||
<translation>插入无序列表(&U)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Select folder to upload</source>
|
||||
<translation>选择要上传的文件夹</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>QtWebEnginePlugin</name>
|
||||
<message>
|
||||
<source>Cannot create separate instance of WebEngineNewViewRequest</source>
|
||||
<translation>无法创建 WebEngineNewViewRequest 的单独实例</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Cannot create separate instance of %1</source>
|
||||
<translation>无法创建 %1 的单独实例</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>QtWebEngineTestSupportPlugin</name>
|
||||
<message>
|
||||
<source>Cannot create a separate instance of WebEngineErrorPage</source>
|
||||
<translation>无法创建 WebEngineErrorPage 的单独实例</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Cannot create a separate instance of WebEngineTestEvent</source>
|
||||
<translation>无法创建单独的 WebEngineTestEvent 实例</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>RenderViewContextMenuQt</name>
|
||||
<message>
|
||||
<source>Back</source>
|
||||
<translation>后退</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Forward</source>
|
||||
<translation>前进</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Reload</source>
|
||||
<translation>重载</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Cut</source>
|
||||
<translation>剪切</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Copy</source>
|
||||
<translation>复制</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Paste</source>
|
||||
<translation>粘贴</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Undo</source>
|
||||
<translation>撤销</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Redo</source>
|
||||
<translation>恢复</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Select all</source>
|
||||
<translation>全选</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Paste and match style</source>
|
||||
<translation>粘贴并匹配样式</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Open link in new window</source>
|
||||
<translation>在新窗口中打开链接</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Open link in new tab</source>
|
||||
<translation>在新页签中打开链接</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Copy link address</source>
|
||||
<translation>复制链接地址</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Save link</source>
|
||||
<translation>保存链接</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Copy image</source>
|
||||
<translation>复制图片</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Copy image address</source>
|
||||
<translation>复制图片地址</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Save image</source>
|
||||
<translation>保存图片</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Copy media address</source>
|
||||
<translation>复制媒体链接</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Show controls</source>
|
||||
<translation>显示控制</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Loop</source>
|
||||
<translation>循环</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Save media</source>
|
||||
<translation>保存媒体</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Inspect</source>
|
||||
<translation>审核</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Exit full screen</source>
|
||||
<translation>退出全屏</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Save page</source>
|
||||
<translation>保存页面</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>View page source</source>
|
||||
<translation>查看页面源代码</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>UIDelegatesManager</name>
|
||||
<message>
|
||||
<source>Javascript Alert - %1</source>
|
||||
<translation>Javascript-警告 - %1</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Javascript Confirm - %1</source>
|
||||
<translation>Javascript-确认 - %1</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Javascript Prompt - %1</source>
|
||||
<translation>Javascript-提醒 - %1</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Are you sure you want to leave this page?</source>
|
||||
<translation>您确定要离开当前页面吗?</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Changes that you made may not be saved.</source>
|
||||
<translation>您所做的更改不会被保存。</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Connect to proxy "%1" using:</source>
|
||||
<translation>使用以下命令连接到代理“%1”:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Enter username and password for "%1" at %2://%3</source>
|
||||
<translation>在 %2://%3 输入“%1”的用户名和密码</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>WebContentsAdapter</name>
|
||||
<message>
|
||||
<source>HTTP-POST data can only be sent over HTTP(S) protocol</source>
|
||||
<translation>HTTP-POST 数据只能通过 HTTP(S) 协议发送</translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
Loading…
Reference in a new issue