fix: rename qt_*.ts in locale to distinguish between normal locale la… (#543)

* fix: rename qt_*.ts in locale to distinguish between normal locale language files.

also put qtwebengine_zh_CN.ts here to avoid windows script copying.

fix #533

* Update Readme.md
This commit is contained in:
xiaoyifang 2023-04-21 09:36:26 +08:00 committed by GitHub
parent 1a3bae3329
commit a5d6505765
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 474 additions and 5 deletions

View file

@ -54,12 +54,11 @@ function Main() {
Copy-Item $sdkDll $archiveName\
Copy-Item winlibs\lib\msvc\*.dll $archiveName\
Copy-Item locale\*.qm $archiveName\locale\
Write-Host "copy qwebengine zh_CN translation"
Copy-Item thirdparty\qwebengine_ts\*.qm $archiveName\locale\
$webengineqm="{0}\translations\qtwebengine_*.qm" -f $env:QTDIR.Trim()
Write-Host "copy qtwebengine qm from $($webengineqm)"
Copy-Item $webengineqm $archiveName\locale\
# $multimedia="{0}\plugins\multimedia" -f $env:QTDIR.Trim()
# if(Test-Path $multimedia){
# Write-Host "copy multimedia $($multimedia) to plugins"

3
locale/Readme.md Normal file
View file

@ -0,0 +1,3 @@
qtwebengine_zh_CN.ts is used to fixed some right context menu on webengine
previous qt_* rename to qt_extra_* to distinguish between the locale language .These qt_extra*.ts are also used to
fix GUI translation issues as qt has not provided an update version about these language.

467
locale/qtwebengine_zh_CN.ts Normal file
View 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>&amp;Bold</source>
<translation>&amp;B</translation>
</message>
<message>
<source>&amp;Italic</source>
<translation>&amp;I</translation>
</message>
<message>
<source>&amp;Underline</source>
<translation>线&amp;U</translation>
</message>
<message>
<source>&amp;Strikethrough</source>
<translation>线(&amp;S)</translation>
</message>
<message>
<source>Align &amp;Left</source>
<translation>&amp;L</translation>
</message>
<message>
<source>Align &amp;Center</source>
<translation>&amp;C</translation>
</message>
<message>
<source>Align &amp;Right</source>
<translation>&amp;R</translation>
</message>
<message>
<source>Align &amp;Justified</source>
<translation>&amp;J</translation>
</message>
<message>
<source>&amp;Indent</source>
<translation>&amp;I</translation>
</message>
<message>
<source>&amp;Outdent</source>
<translation>(&amp;O)</translation>
</message>
<message>
<source>Insert &amp;Ordered List</source>
<translation>&amp;O</translation>
</message>
<message>
<source>Insert &amp;Unordered List</source>
<translation>&amp;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>&amp;Bold</source>
<translation>&amp;B</translation>
</message>
<message>
<source>&amp;Italic</source>
<translation>&amp;I</translation>
</message>
<message>
<source>&amp;Underline</source>
<translation>线&amp;U</translation>
</message>
<message>
<source>&amp;Strikethrough</source>
<translation>线&amp;S</translation>
</message>
<message>
<source>Align &amp;Left</source>
<translation>&amp;L</translation>
</message>
<message>
<source>Align &amp;Center</source>
<translation>&amp;C</translation>
</message>
<message>
<source>Align &amp;Right</source>
<translation>&amp;R</translation>
</message>
<message>
<source>Align &amp;Justified</source>
<translation>&amp;J</translation>
</message>
<message>
<source>&amp;Indent</source>
<translation>&amp;I</translation>
</message>
<message>
<source>&amp;Outdent</source>
<translation>(&amp;O)</translation>
</message>
<message>
<source>Insert &amp;Ordered List</source>
<translation>&amp;O</translation>
</message>
<message>
<source>Insert &amp;Unordered List</source>
<translation>&amp;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 &quot;%1&quot; using:</source>
<translation>使%1</translation>
</message>
<message>
<source>Enter username and password for &quot;%1&quot; 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>

View file

@ -374,9 +374,9 @@ int main( int argc, char ** argv )
QLocale locale( localeName );
QLocale::setDefault( locale );
if( !qtTranslator.load( "qt_" + localeName, Config::getLocDir() ) )
if( !qtTranslator.load( "qt_extra_" + localeName, Config::getLocDir() ) )
{
qtTranslator.load( "qt_" + localeName, QLibraryInfo::location( QLibraryInfo::TranslationsPath ) );
qtTranslator.load( "qt_extra_" + localeName, QLibraryInfo::location( QLibraryInfo::TranslationsPath ) );
app.installTranslator( &qtTranslator );
}