diff --git a/.github/scripts/windows-publish.ps1 b/.github/scripts/windows-publish.ps1 index c5e8bbde..436f9656 100644 --- a/.github/scripts/windows-publish.ps1 +++ b/.github/scripts/windows-publish.ps1 @@ -47,6 +47,10 @@ function Main() { Write-Host "copy license.." Copy-Item "opencc\*" $archiveName\opencc\ Write-Host "opencc config files.." + + New-Item -ItemType Directory $archiveName\help + Copy-Item "help\*" $archiveName\help\ + Write-Host "help files.." # 拷贝WinSDK dll $sdkDll="{0}Redist\{1}ucrt\DLLs\{2}\*.dll" -f $env:winSdkDir.Trim(),$env:winSdkVer.Trim(),$env:msvcArch Write-Host "copy sdk dll$($sdkDll)" diff --git a/.github/workflows/AutoTag.yml b/.github/workflows/AutoTag.yml index 33db9e78..e287e741 100644 --- a/.github/workflows/AutoTag.yml +++ b/.github/workflows/AutoTag.yml @@ -22,9 +22,9 @@ jobs: runs-on: ubuntu-latest env: - version: 22.8.23 - version-suffix: EndOfHeat - prerelease: false + version: 22.8.24 + version-suffix: alpha + prerelease: true steps: - uses: actions/checkout@v3 @@ -42,4 +42,4 @@ jobs: custom_tag: ${{env.version}}-${{env.version-suffix}}.${{ steps.vars.outputs.release_hm }}.${{ steps.vars.outputs.sha_short }} - \ No newline at end of file + diff --git a/.github/workflows/macos-6.2.yml b/.github/workflows/macos-6.x.yml similarity index 94% rename from .github/workflows/macos-6.2.yml rename to .github/workflows/macos-6.x.yml index 8e43b541..1a4cf49c 100644 --- a/.github/workflows/macos-6.2.yml +++ b/.github/workflows/macos-6.x.yml @@ -1,4 +1,4 @@ -name: macos-6.2 +name: macos-6.x concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true @@ -29,9 +29,9 @@ jobs: qt_arch: [clang_64] env: targetName: GoldenDict - version: 22.8.23 - version-suffix: EndOfHeat - prerelease: false + version: 22.8.24 + version-suffix: alpha + prerelease: true steps: # macos 11.0 默认环境变了,要指定 @@ -110,7 +110,7 @@ jobs: with: repo_token: ${{ secrets.GITHUB_TOKEN }} file: ${{ env.targetName }}.dmg - asset_name: ${{ matrix.qt_ver }}-${{ env.targetName }}_${{ matrix.os }}_${{steps.vars.outputs.release_date}}.dmg + asset_name: ${{ matrix.qt_ver }}-${{ env.targetName }}_${{ matrix.os }}_universal_${{steps.vars.outputs.release_date}}.dmg tag: v${{env.version}}-${{env.version-suffix}}.${{ steps.vars.outputs.release_hm }}.${{ steps.vars.outputs.sha_short }} overwrite: true release_name: GoldenDict-v${{env.version}}-${{env.version-suffix}}.${{ steps.vars.outputs.release_hm }}.${{ steps.vars.outputs.sha_short }} @@ -128,7 +128,8 @@ jobs: macos built with: macos-10.15,macos-11.0,clang_64 x86_64 Qt6.X(Universal Build) Qt5.15.2(Intel Kind) - auto built by github action. use on your on risk:-) + auto built by github action. use on your on risk:-) + **recommend version**:Qt6.X (with the latest bug fixes and performance enhancements) Filename pattern: **[Qt version]-GoldenDict-[OS]-[release-date].[ext]** CHANGES: diff --git a/.github/workflows/macos-PR-check.yml b/.github/workflows/macos-PR-check.yml index cd984e6c..e46bc514 100644 --- a/.github/workflows/macos-PR-check.yml +++ b/.github/workflows/macos-PR-check.yml @@ -25,10 +25,6 @@ jobs: os: [macos-11.0] qt_ver: [5.15.2,6.2.4] qt_arch: [clang_64] - env: - version: 22.8.23 - version-suffix: EndOfHeat - prerelease: false steps: # macos 11.0 默认环境变了,要指定 diff --git a/.github/workflows/macos-homebrew-PR-check.yml b/.github/workflows/macos-homebrew-PR-check.yml new file mode 100644 index 00000000..84aefaab --- /dev/null +++ b/.github/workflows/macos-homebrew-PR-check.yml @@ -0,0 +1,81 @@ +name: macos-homebrew-PR-check +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true +on: + + workflow_dispatch: + + pull_request: + branches: + - dev + - master + - staged + paths-ignore: + - 'docs/**' + - ".github/**" + - "howto/**" + - "*.md" +jobs: + build: + name: Build + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [macos-12] + qt_ver: [6.3.1] + qt_arch: [clang_64] + env: + targetName: GoldenDict + steps: + # - name: prepare env + # run: | + # cd /opt + # mkdir homebrew + # curl -L https://github.com/Homebrew/brew/tarball/master | tar xz --strip 1 -C homebrew + # export PATH=$PATH:/opt/homebrew/bin + - name: Install Qt + uses: xiaoyifang/install-qt-action@v3 + with: + version: ${{ matrix.qt_ver }} + arch: ${{ matrix.qt_arch }} + cached: 'false' + modules: qtwebengine qtwebchannel qtpositioning qt5compat qtmultimedia + - uses: actions/checkout@v3 + with: + fetch-depth: 1 + - name: Set outputs + id: githash + run: | + echo "::set-output name=sha_short::$(git rev-parse --short HEAD)" + + - name: build macos + run: | + brew install pcre2 harfbuzz freetype + brew install cmake ninja python + brew install automake + brew install autoconf + brew install libtool + brew install opencc + brew install ffmpeg@5 + #brew reinstall $(brew deps ffmpeg) ffmpeg + brew install libao + brew install libiconv + brew install lzo bzip2 + brew install libogg + brew install zstd lzip + brew install libtiff + brew install libvorbis --force + brew install hunspell + wget ftp://ftp.sra.co.jp/pub/misc/eb/eb-4.4.3.tar.bz2 + tar xvjf eb-4.4.3.tar.bz2 + cd eb-4.4.3 && ./configure && make -j 8 && sudo make install && cd .. + #brew install qt # or use official offline installer + brew install xz lzo + brew install pkg-config + + - name: compile + run: | + qmake CONFIG+=release CONFIG+=no_macos_universal CONFIG+=zim_support CONFIG+=no_extra_tiff_handler #CONFIG+=no_epwing_support # CONFIG+=no_ffmpeg_player #CONFIG+=no_qtmultimedia_player + make + diff --git a/.github/workflows/macos-homebrew.yml b/.github/workflows/macos-homebrew.yml new file mode 100644 index 00000000..53eacb98 --- /dev/null +++ b/.github/workflows/macos-homebrew.yml @@ -0,0 +1,166 @@ +name: macos-homebrew +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true +on: + workflow_dispatch: + push: + branches: + - dev + - master + # - staged + paths-ignore: + - 'docs/**' + - ".github/**" + - "howto/**" + - "*.md" + - ".clang-format" +jobs: + build: + name: Build + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [macos-11,macos-12] + qt_ver: [6.4.0] + qt_arch: [clang_64] + env: + targetName: GoldenDict + version: 22.8.24 + version-suffix: alpha + prerelease: true + steps: + # macos 11.0 默认环境变了,要指定 + - name: prepare env + if: ${{ matrix.os == 'macos-11' }} + run: | + softwareupdate --all --install --force + sudo xcode-select --print-path + sudo xcode-select --switch /Library/Developer/CommandLineTools + - uses: actions/setup-python@v3 + with: + python-version: '3.9' + - name: Install Qt + uses: xiaoyifang/install-qt-action@v3 + with: + version: ${{ matrix.qt_ver }} + arch: ${{ matrix.qt_arch }} + cached: 'false' + modules: qtwebengine qtwebchannel qtpositioning qt5compat qtmultimedia qtimageformats + setup-python: 'false' + py7zrversion: '==0.18.1' + - uses: actions/checkout@v3 + with: + fetch-depth: 1 + - name: Set outputs + id: githash + run: | + echo "::set-output name=sha_short::$(git rev-parse --short HEAD)" + + - name: build macos + run: | + brew install pcre2 harfbuzz freetype + brew install cmake ninja python + brew install automake + brew install autoconf + brew install libtool + brew install opencc + brew install ffmpeg + brew install libao + brew install libiconv + brew install lzo bzip2 + brew install libogg + brew install zstd lzip + brew install libtiff + brew install libvorbis + brew install hunspell + wget ftp://ftp.sra.co.jp/pub/misc/eb/eb-4.4.3.tar.bz2 + tar xvjf eb-4.4.3.tar.bz2 + cd eb-4.4.3 && ./configure && make -j 8 && sudo make install && cd .. + #brew install qt # or use official offline installer + brew install xz lzo + brew install pkg-config + brew install create-dmg + - name: compile + run: | + qmake CONFIG+=release CONFIG+=no_macos_universal CONFIG+=zim_support CONFIG+=no_extra_tiff_handler #CONFIG+=no_epwing_support # CONFIG+=no_ffmpeg_player #CONFIG+=no_qtmultimedia_player + make -j8 + # libao was specificly build https://github.com/goldendict/goldendict/pull/377 + cp -fR maclibs/lib/libao* GoldenDict.app/Contents/Frameworks/ + + # # 打包 + # - name: package + # run: | + # macdeployqt ${targetName}.app -qmldir=. -verbose=1 -dmg + # 打包 + - name: package + run: | + macdeployqt ${targetName}.app -qmldir=. -verbose=1 + codesign --force --deep -s - GoldenDict.app + otool -L GoldenDict.app/Contents/MacOS/GoldenDict + # otool -L GoldenDict.app/Contents/Frameworks/lib* + mkdir tmp + mv ${targetName}.app ./tmp + # --background "installer_background.png" + create-dmg --volname "${targetName} Installer" --volicon "icons/macicon.icns" --window-pos 200 120 --window-size 800 400 --icon-size 100 --icon "${targetName}.app" 200 190 --hide-extension "${targetName}.app" --app-drop-link 600 185 --skip-jenkins "${targetName}.dmg" tmp/ + - name: Generate changelog + if: ${{!env.prerelease}} + id: changelog1 + uses: metcalfc/changelog-generator@v3.0.0 + with: + myToken: ${{ secrets.GITHUB_TOKEN }} + + - name: Set outputs + id: vars + run: | + echo "::set-output name=sha_short::$(git rev-parse --short=8 HEAD)" + echo "::set-output name=release_date::$(date +'%Y%m%d')" + echo "::set-output name=release_time::$(date +'%H%M%S')" + echo "::set-output name=release_time_clock::$(date +'%H:%M:%S')" + echo "::set-output name=release_hm::$(date +'%y%m%d')" + + - name: changelog + if: $${{env.prerelease}} + id: changelog2 + run: | + previousTag=$(git tag --sort=-creatordate | sed -n 2p) + echo "previousTag : $previousTag" + + CHANGELOG="$(git log --oneline --no-decorate $previousTag..HEAD)" + CHANGELOG="${CHANGELOG//'%'/'%25'}" + CHANGELOG="${CHANGELOG//$'\n'/'%0A'}" + CHANGELOG="${CHANGELOG//$'\r'/'%0D'}" + CHANGELOG="${CHANGELOG//'\"'/'%22'}" + CHANGELOG="${CHANGELOG//"'"/ }" + echo "::set-output name=COMMIT_SUMMARY::$(echo "$CHANGELOG")" + # tag 上传Release + - name: uploadRelease + uses: svenstaro/upload-release-action@v2 + with: + repo_token: ${{ secrets.GITHUB_TOKEN }} + file: ${{ env.targetName }}.dmg + asset_name: ${{ matrix.qt_ver }}-${{ env.targetName }}_${{ matrix.os }}_homebrew_${{steps.vars.outputs.release_date}}.dmg + tag: v${{env.version}}-${{env.version-suffix}}.${{ steps.vars.outputs.release_hm }}.${{ steps.vars.outputs.sha_short }} + overwrite: true + release_name: GoldenDict-v${{env.version}}-${{env.version-suffix}}.${{ steps.vars.outputs.release_hm }}.${{ steps.vars.outputs.sha_short }} + prerelease: ${{env.prerelease}} + body: | + release on date: ${{steps.vars.outputs.release_date}} time: ${{steps.vars.outputs.release_time_clock}} + branch: ${{ github.ref_name }} + commit: ${{ steps.vars.outputs.sha_short }} + Qt version: Qt5.15.2, Qt6.X + Windows built with: msvc64, Visual studio 2019 + ## goldendict.exe can not be used alone + if you have a previous version. replace this maybe ok. if not ,download the whole bundle. + + AppImage built with: Ubuntu-20.04 ,latest gcc + macos built with: macos-10.15,macos-11.0,clang_64 x86_64 + Qt6.X(Universal Build) + Qt5.15.2(Intel Kind) + auto built by github action. use on your on risk:-) + **recommend version**:Qt6.X (with the latest bug fixes and performance enhancements) + + Filename pattern: **[Qt version]-GoldenDict-[OS]-[release-date].[ext]** + CHANGES: + ${{ steps.changelog1.outputs.changelog }} + ${{ steps.changelog2.outputs.COMMIT_SUMMARY }} diff --git a/.github/workflows/macos-m1.yml b/.github/workflows/macos-m1.yml new file mode 100644 index 00000000..7e2d85ac --- /dev/null +++ b/.github/workflows/macos-m1.yml @@ -0,0 +1,161 @@ +name: macos-m1 +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true +on: + # workflow_run: + # workflows: [AutoTag] + # types: [completed] + workflow_dispatch: + # push: + # branches: + # - dev + # - master + # # - staged + # paths-ignore: + # - 'docs/**' + # - ".github/**" + # - "howto/**" + # - "*.md" + # - ".clang-format" +jobs: + build: + name: Build + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [macos-12] + qt_ver: [6.3.1] + qt_arch: [clang_64] + env: + targetName: GoldenDict + version: 22.8.24 + version-suffix: alpha + prerelease: true + steps: + - name: prepare env + run: | + cd /opt + mkdir homebrew + curl -L https://github.com/Homebrew/brew/tarball/master | tar xz --strip 1 -C homebrew + export PATH=$PATH:/opt/homebrew/bin + - name: Install Qt + uses: xiaoyifang/install-qt-action@v3 + with: + version: ${{ matrix.qt_ver }} + arch: ${{ matrix.qt_arch }} + cached: 'false' + modules: qtwebengine qtwebchannel qtpositioning qt5compat qtmultimedia + - uses: actions/checkout@v3 + with: + fetch-depth: 1 + - name: Set outputs + id: githash + run: | + echo "::set-output name=sha_short::$(git rev-parse --short HEAD)" + + - name: build macos + run: | + brew install pcre2 harfbuzz freetype + brew install cmake ninja python + brew install automake + brew install autoconf + brew install libtool + brew install opencc + brew install ffmpeg@5 + #brew reinstall $(brew deps ffmpeg) ffmpeg + brew install libao + brew install libiconv + brew install lzo bzip2 + brew install libogg + brew install zstd lzip + brew install libtiff + brew install libvorbis --force + brew install hunspell + wget ftp://ftp.sra.co.jp/pub/misc/eb/eb-4.4.3.tar.bz2 + tar xvjf eb-4.4.3.tar.bz2 + cd eb-4.4.3 && ./configure && make -j 8 && sudo make install && cd .. + #brew install qt # or use official offline installer + brew install xz lzo + brew install pkg-config + brew install create-dmg + - name: compile + run: | + qmake CONFIG+=release CONFIG+=no_macos_universal CONFIG+=zim_support CONFIG+=no_extra_tiff_handler #CONFIG+=no_epwing_support # CONFIG+=no_ffmpeg_player #CONFIG+=no_qtmultimedia_player + make -j 8 + # # 打包 + # - name: package + # run: | + # macdeployqt ${targetName}.app -qmldir=. -verbose=1 -dmg + # 打包 + - name: package + run: | + macdeployqt ${targetName}.app -qmldir=. -verbose=1 + codesign --force --deep -s - GoldenDict.app + # otool -L GoldenDict.app/Contents/MacOS/GoldenDict + # otool -L GoldenDict.app/Contents/Frameworks/lib* + mkdir tmp + mv ${targetName}.app ./tmp + # --background "installer_background.png" + create-dmg --volname "${targetName} Installer" --volicon "icons/macicon.icns" --window-pos 200 120 --window-size 800 400 --icon-size 100 --icon "${targetName}.app" 200 190 --hide-extension "${targetName}.app" --app-drop-link 600 185 --skip-jenkins "${targetName}.dmg" tmp/ + - name: Generate changelog + if: ${{!env.prerelease}} + id: changelog1 + uses: metcalfc/changelog-generator@v3.0.0 + with: + myToken: ${{ secrets.GITHUB_TOKEN }} + + - name: Set outputs + id: vars + run: | + echo "::set-output name=sha_short::$(git rev-parse --short=8 HEAD)" + echo "::set-output name=release_date::$(date +'%Y%m%d')" + echo "::set-output name=release_time::$(date +'%H%M%S')" + echo "::set-output name=release_time_clock::$(date +'%H:%M:%S')" + echo "::set-output name=release_hm::$(date +'%y%m%d')" + + - name: changelog + if: $${{env.prerelease}} + id: changelog2 + run: | + previousTag=$(git tag --sort=-creatordate | sed -n 2p) + echo "previousTag : $previousTag" + + CHANGELOG="$(git log --oneline --no-decorate $previousTag..HEAD)" + CHANGELOG="${CHANGELOG//'%'/'%25'}" + CHANGELOG="${CHANGELOG//$'\n'/'%0A'}" + CHANGELOG="${CHANGELOG//$'\r'/'%0D'}" + CHANGELOG="${CHANGELOG//'\"'/'%22'}" + CHANGELOG="${CHANGELOG//"'"/ }" + echo "::set-output name=COMMIT_SUMMARY::$(echo "$CHANGELOG")" + # tag 上传Release + - name: uploadRelease + uses: svenstaro/upload-release-action@v2 + with: + repo_token: ${{ secrets.GITHUB_TOKEN }} + file: ${{ env.targetName }}.dmg + asset_name: ${{ matrix.qt_ver }}-${{ env.targetName }}_${{ matrix.os }}_homebrew_${{steps.vars.outputs.release_date}}.dmg + tag: v${{env.version}}-${{env.version-suffix}}.${{ steps.vars.outputs.release_hm }}.${{ steps.vars.outputs.sha_short }} + overwrite: true + release_name: GoldenDict-v${{env.version}}-${{env.version-suffix}}.${{ steps.vars.outputs.release_hm }}.${{ steps.vars.outputs.sha_short }} + prerelease: ${{env.prerelease}} + body: | + release on date: ${{steps.vars.outputs.release_date}} time: ${{steps.vars.outputs.release_time_clock}} + branch: ${{ github.ref_name }} + commit: ${{ steps.vars.outputs.sha_short }} + Qt version: Qt5.15.2, Qt6.X + Windows built with: msvc64, Visual studio 2019 + ## goldendict.exe can not be used alone + if you have a previous version. replace this maybe ok. if not ,download the whole bundle. + + AppImage built with: Ubuntu-20.04 ,latest gcc + macos built with: macos-10.15,macos-11.0,clang_64 x86_64 + Qt6.X(Universal Build) + Qt5.15.2(Intel Kind) + auto built by github action. use on your on risk:-) + **recommend version**:Qt6.X (with the latest bug fixes and performance enhancements) + + Filename pattern: **[Qt version]-GoldenDict-[OS]-[release-date].[ext]** + CHANGES: + ${{ steps.changelog1.outputs.changelog }} + ${{ steps.changelog2.outputs.COMMIT_SUMMARY }} diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 41f69a63..9aab5942 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -1,137 +1,138 @@ -name: macos -concurrency: - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true -on: - # workflow_run: - # workflows: [AutoTag] - # types: [completed] - workflow_dispatch: - push: - branches: - - dev - - master - # - staged - paths-ignore: - - 'docs/**' - - ".github/**" - - "howto/**" - - "*.md" - - ".clang-format" - -jobs: - build: - name: Build - runs-on: ${{ matrix.os }} - strategy: - matrix: - os: [macos-11.0] - qt_ver: [5.15.2] - qt_arch: [clang_64] - env: - targetName: GoldenDict - version: 22.8.23 - version-suffix: EndOfHeat - prerelease: false - - steps: - # macos 11.0 默认环境变了,要指定 - - name: prepare env - if: ${{ matrix.os == 'macos-11.0' }} - run: | - softwareupdate --all --install --force - sudo xcode-select --print-path - sudo xcode-select --switch /Library/Developer/CommandLineTools - # brew install qt@6 - - uses: actions/setup-python@v3 - with: - python-version: '3.9' - - name: Install Qt - uses: xiaoyifang/install-qt-action@v3 - # if: ${{ matrix.qt_ver == '5.15.2' }} - with: - version: ${{ matrix.qt_ver }} - cached: 'false' - modules: qtwebengine - setup-python: 'false' - py7zrversion: '==0.18.1' - - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - name: build macos - run: | - brew uninstall opencc hunspell ffmpeg@5 ffmpeg@4 libtiff xz lzo libogg libvorbis zstd || true - brew install create-dmg - qmake CONFIG+=release CONFIG+=no_extra_tiff_handler CONFIG+=zim_support CONFIG+=chinese_conversion_support - make -j$(nproc) - # 打包 - - name: package - run: | - macdeployqt ${targetName}.app -qmldir=. -verbose=1 - codesign --force --deep -s - GoldenDict.app - otool -L GoldenDict.app/Contents/MacOS/GoldenDict - otool -L GoldenDict.app/Contents/Frameworks/lib* - mkdir tmp - mv ${targetName}.app ./tmp - # --background "installer_background.png" - create-dmg --volname "${targetName} Installer" --volicon "icons/macicon.icns" --window-pos 200 120 --window-size 800 400 --icon-size 100 --icon "${targetName}.app" 200 190 --hide-extension "${targetName}.app" --app-drop-link 600 185 --skip-jenkins "${targetName}.dmg" tmp/ - - name: Generate changelog - if: ${{!env.prerelease}} - id: changelog1 - uses: metcalfc/changelog-generator@v3.0.0 - with: - myToken: ${{ secrets.GITHUB_TOKEN }} - - - name: Set outputs - id: vars - run: | - echo "::set-output name=sha_short::$(git rev-parse --short=8 HEAD)" - echo "::set-output name=release_date::$(date +'%Y%m%d')" - echo "::set-output name=release_time::$(date +'%H%M%S')" - echo "::set-output name=release_time_clock::$(date +'%H:%M:%S')" - echo "::set-output name=release_hm::$(date +'%y%m%d')" - - - name: changelog - if: $${{env.prerelease}} - id: changelog2 - run: | - previousTag=$(git tag --sort=-creatordate | sed -n 2p) - echo "previousTag : $previousTag" - - CHANGELOG="$(git log --oneline --no-decorate $previousTag..HEAD)" - CHANGELOG="${CHANGELOG//'%'/'%25'}" - CHANGELOG="${CHANGELOG//$'\n'/'%0A'}" - CHANGELOG="${CHANGELOG//$'\r'/'%0D'}" - CHANGELOG="${CHANGELOG//'\"'/'%22'}" - CHANGELOG="${CHANGELOG//"'"/ }" - echo "::set-output name=COMMIT_SUMMARY::$(echo "$CHANGELOG")" - # tag 上传Release - - name: uploadRelease - uses: svenstaro/upload-release-action@v2 - with: - repo_token: ${{ secrets.GITHUB_TOKEN }} - file: ${{ env.targetName }}.dmg - asset_name: ${{ matrix.qt_ver }}-${{ env.targetName }}_${{ matrix.os }}_${{steps.vars.outputs.release_date}}.dmg - tag: v${{env.version}}-${{env.version-suffix}}.${{ steps.vars.outputs.release_hm }}.${{ steps.vars.outputs.sha_short }} - overwrite: true - release_name: GoldenDict-v${{env.version}}-${{env.version-suffix}}.${{ steps.vars.outputs.release_hm }}.${{ steps.vars.outputs.sha_short }} - prerelease: ${{env.prerelease}} - body: | - release on date: ${{steps.vars.outputs.release_date}} time: ${{steps.vars.outputs.release_time_clock}} - branch: ${{ github.ref_name }} - commit: ${{ steps.vars.outputs.sha_short }} - Qt version: Qt5.15.2, Qt6.X - Windows built with: msvc64, Visual studio 2019 - ## goldendict.exe can not be used alone - if you have a previous version. replace this maybe ok. if not ,download the whole bundle. - - AppImage built with: Ubuntu-20.04 ,latest gcc - macos built with: macos-10.15,macos-11.0,clang_64 x86_64 - Qt6.X(Universal Build) - Qt5.15.2(Intel Kind) - auto built by github action. use on your on risk:-) - - Filename pattern: **[Qt version]-GoldenDict-[OS]-[release-date].[ext]** - CHANGES: - ${{ steps.changelog1.outputs.changelog }} - ${{ steps.changelog2.outputs.COMMIT_SUMMARY }} +name: macos +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true +on: + # workflow_run: + # workflows: [AutoTag] + # types: [completed] + workflow_dispatch: + push: + branches: + - dev + - master + # - staged + paths-ignore: + - 'docs/**' + - ".github/**" + - "howto/**" + - "*.md" + - ".clang-format" + +jobs: + build: + name: Build + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [macos-11.0] + qt_ver: [5.15.2] + qt_arch: [clang_64] + env: + targetName: GoldenDict + version: 22.8.24 + version-suffix: alpha + prerelease: true + + steps: + # macos 11.0 默认环境变了,要指定 + - name: prepare env + if: ${{ matrix.os == 'macos-11.0' }} + run: | + softwareupdate --all --install --force + sudo xcode-select --print-path + sudo xcode-select --switch /Library/Developer/CommandLineTools + # brew install qt@6 + - uses: actions/setup-python@v3 + with: + python-version: '3.9' + - name: Install Qt + uses: xiaoyifang/install-qt-action@v3 + # if: ${{ matrix.qt_ver == '5.15.2' }} + with: + version: ${{ matrix.qt_ver }} + cached: 'false' + modules: qtwebengine + setup-python: 'false' + py7zrversion: '==0.18.1' + - uses: actions/checkout@v3 + with: + fetch-depth: 0 + - name: build macos + run: | + brew uninstall opencc hunspell ffmpeg@5 ffmpeg@4 libtiff xz lzo libogg libvorbis zstd || true + brew install create-dmg + qmake CONFIG+=release CONFIG+=no_extra_tiff_handler CONFIG+=zim_support CONFIG+=chinese_conversion_support + make -j$(nproc) + # 打包 + - name: package + run: | + macdeployqt ${targetName}.app -qmldir=. -verbose=1 + codesign --force --deep -s - GoldenDict.app + otool -L GoldenDict.app/Contents/MacOS/GoldenDict + otool -L GoldenDict.app/Contents/Frameworks/lib* + mkdir tmp + mv ${targetName}.app ./tmp + # --background "installer_background.png" + create-dmg --volname "${targetName} Installer" --volicon "icons/macicon.icns" --window-pos 200 120 --window-size 800 400 --icon-size 100 --icon "${targetName}.app" 200 190 --hide-extension "${targetName}.app" --app-drop-link 600 185 --skip-jenkins "${targetName}.dmg" tmp/ + - name: Generate changelog + if: ${{!env.prerelease}} + id: changelog1 + uses: metcalfc/changelog-generator@v3.0.0 + with: + myToken: ${{ secrets.GITHUB_TOKEN }} + + - name: Set outputs + id: vars + run: | + echo "::set-output name=sha_short::$(git rev-parse --short=8 HEAD)" + echo "::set-output name=release_date::$(date +'%Y%m%d')" + echo "::set-output name=release_time::$(date +'%H%M%S')" + echo "::set-output name=release_time_clock::$(date +'%H:%M:%S')" + echo "::set-output name=release_hm::$(date +'%y%m%d')" + + - name: changelog + if: $${{env.prerelease}} + id: changelog2 + run: | + previousTag=$(git tag --sort=-creatordate | sed -n 2p) + echo "previousTag : $previousTag" + + CHANGELOG="$(git log --oneline --no-decorate $previousTag..HEAD)" + CHANGELOG="${CHANGELOG//'%'/'%25'}" + CHANGELOG="${CHANGELOG//$'\n'/'%0A'}" + CHANGELOG="${CHANGELOG//$'\r'/'%0D'}" + CHANGELOG="${CHANGELOG//'\"'/'%22'}" + CHANGELOG="${CHANGELOG//"'"/ }" + echo "::set-output name=COMMIT_SUMMARY::$(echo "$CHANGELOG")" + # tag 上传Release + - name: uploadRelease + uses: svenstaro/upload-release-action@v2 + with: + repo_token: ${{ secrets.GITHUB_TOKEN }} + file: ${{ env.targetName }}.dmg + asset_name: ${{ matrix.qt_ver }}-${{ env.targetName }}_${{ matrix.os }}_${{steps.vars.outputs.release_date}}.dmg + tag: v${{env.version}}-${{env.version-suffix}}.${{ steps.vars.outputs.release_hm }}.${{ steps.vars.outputs.sha_short }} + overwrite: true + release_name: GoldenDict-v${{env.version}}-${{env.version-suffix}}.${{ steps.vars.outputs.release_hm }}.${{ steps.vars.outputs.sha_short }} + prerelease: ${{env.prerelease}} + body: | + release on date: ${{steps.vars.outputs.release_date}} time: ${{steps.vars.outputs.release_time_clock}} + branch: ${{ github.ref_name }} + commit: ${{ steps.vars.outputs.sha_short }} + Qt version: Qt5.15.2, Qt6.X + Windows built with: msvc64, Visual studio 2019 + ## goldendict.exe can not be used alone + if you have a previous version. replace this maybe ok. if not ,download the whole bundle. + + AppImage built with: Ubuntu-20.04 ,latest gcc + macos built with: macos-10.15,macos-11.0,clang_64 x86_64 + Qt6.X(Universal Build) + Qt5.15.2(Intel Kind) + auto built by github action. use on your on risk:-) + **recommend version**:Qt6.X (with the latest bug fixes and performance enhancements) + + Filename pattern: **[Qt version]-GoldenDict-[OS]-[release-date].[ext]** + CHANGES: + ${{ steps.changelog1.outputs.changelog }} + ${{ steps.changelog2.outputs.COMMIT_SUMMARY }} diff --git a/.github/workflows/ubuntu-6.2.yml b/.github/workflows/ubuntu-6.2.yml index abb3e1f5..19cc5fd3 100644 --- a/.github/workflows/ubuntu-6.2.yml +++ b/.github/workflows/ubuntu-6.2.yml @@ -1,140 +1,141 @@ -name: Ubuntu-6.2 -# Qt官方没有linux平台的x86包 -concurrency: - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true -on: - # workflow_run: - # workflows: [AutoTag] - # types: [completed] - workflow_dispatch: - # push: - # branches: - # - dev - # - master - # # - staged - # paths-ignore: - # - 'docs/**' - # - ".github/**" - # - "howto/**" - # - "*.md" - # - ".clang-format" - -jobs: - build: - name: Build - runs-on: ${{ matrix.os }} - strategy: - matrix: - os: [ubuntu-latest] - qt_ver: [6.3.1] - qt_arch: [gcc_64] - env: - version: 22.8.23 - version-suffix: EndOfHeat - prerelease: false - steps: - - name: Install Qt - uses: xiaoyifang/install-qt-action@v3 - with: - version: ${{ matrix.qt_ver }} - arch: ${{ matrix.qt_arch }} - cached: 'false' - modules: qtwebengine qtwebchannel qtpositioning qt5compat qtmultimedia qtimageformats - - name: ubuntu install thirdparty dependencies - run: | - sudo apt-get install git pkg-config build-essential - sudo apt-get install libvorbis-dev zlib1g-dev libhunspell-dev x11proto-record-dev - sudo apt-get install libxtst-dev liblzo2-dev libbz2-dev - sudo apt-get install libao-dev libavutil-dev libavformat-dev libtiff5-dev libeb16-dev - sudo apt-get install doxygen libzstd-dev libxkbcommon-dev libgstreamer-plugins-base1.0-0 libgstreamer-gl1.0-0 - sudo ln -sf /usr/bin/x86_64-linux-gnu-ld.gold /usr/bin/ld - - #build opencc - git clone https://github.com/BYVoid/OpenCC - cd OpenCC/ - make PREFIX=/usr -j$(nproc) - sudo make install - cd .. - - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - - name: build goldendict - run: | - qmake CONFIG+=release CONFIG+=no_extra_tiff_handler PREFIX=/usr CONFIG+=zim_support CONFIG+=chinese_conversion_support - make INSTALL_ROOT=appdir -j`nproc` install; find appdir/ - - ls -al appdir - #copy missing shared dll to appdir. - # mkdir -p appdir/usr/lib - # cp $(ldd appdir/usr/bin/goldendict | grep -o '\W/[^ ]*' |grep gobject ) appdir/usr/lib - # cp $(ldd appdir/usr/bin/goldendict | grep -o '\W/[^ ]*' |grep libpango ) appdir/usr/lib - - name: Build AppImage - run: | - wget -c https://github.com/$(wget -q https://github.com/probonopd/go-appimage/releases -O - | grep "appimagetool-.*-x86_64.AppImage" | head -n 1 | cut -d '"' -f 2) - chmod +x appimagetool-*.AppImage - ./appimagetool-*.AppImage -s deploy appdir/usr/share/applications/*.desktop # Bundle EVERYTHING - # ./linuxdeploy-x86_64.AppImage --appdir appdir --output appimage --plugin qt -i redist/icons/goldendict.png -d redist/org.goldendict.GoldenDict.desktop - - - name: Generate changelog - if: ${{!env.prerelease}} - id: changelog1 - uses: metcalfc/changelog-generator@v3.0.0 - with: - myToken: ${{ secrets.GITHUB_TOKEN }} - - - name: Set outputs - id: vars - run: | - echo "::set-output name=sha_short::$(git rev-parse --short=8 HEAD)" - echo "::set-output name=release_date::$(date +'%Y%m%d')" - echo "::set-output name=release_time::$(date +'%H%M%S')" - echo "::set-output name=release_time_clock::$(date +'%H:%M:%S')" - echo "::set-output name=release_hm::$(date +'%y%m%d')" - echo "::set-output name=appname::$(ls *.AppImage*)" - - - name: changelog - if: $${{env.prerelease}} - id: changelog2 - run: | - previousTag=$(git tag --sort=-creatordate | sed -n 2p) - echo "previousTag : $previousTag" - - CHANGELOG="$(git log --oneline --no-decorate $previousTag..HEAD)" - CHANGELOG="${CHANGELOG//'%'/'%25'}" - CHANGELOG="${CHANGELOG//$'\n'/'%0A'}" - CHANGELOG="${CHANGELOG//$'\r'/'%0D'}" - CHANGELOG="${CHANGELOG//'\"'/'%22'}" - CHANGELOG="${CHANGELOG//"'"/ }" - echo "::set-output name=COMMIT_SUMMARY::$(echo "$CHANGELOG")" - - name: uploadRelease - # if: startsWith(github.event.ref, 'refs/tags/') - uses: svenstaro/upload-release-action@v2 - with: - repo_token: ${{ secrets.GITHUB_TOKEN }} - file: ${{ steps.vars.outputs.appname }} - asset_name: ${{ matrix.qt_ver }}-${{ steps.vars.outputs.appname }} - tag: v${{env.version}}-${{env.version-suffix}}.${{ steps.vars.outputs.release_hm }}.${{ steps.vars.outputs.sha_short }} - overwrite: true - release_name: GoldenDict-v${{env.version}}-${{env.version-suffix}}.${{ steps.vars.outputs.release_hm }}.${{ steps.vars.outputs.sha_short }} - prerelease: ${{env.prerelease}} - body: | - release on date: ${{steps.vars.outputs.release_date}} time: ${{steps.vars.outputs.release_time_clock}} - branch: ${{ github.ref_name }} - commit: ${{ steps.vars.outputs.sha_short }} - Qt version: Qt5.15.2, Qt6.X - Windows built with: msvc64, Visual studio 2019 - ## goldendict.exe can not be used alone - if you have a previous version. replace this maybe ok. if not ,download the whole bundle. - - AppImage built with: Ubuntu-20.04 ,latest gcc - macos built with: macos-10.15,macos-11.0,clang_64 x86_64 - Qt6.X(Universal Build) - Qt5.15.2(Intel Kind) - auto built by github action. use on your on risk:-) - - Filename pattern: **[Qt version]-GoldenDict-[OS]-[release-date].[ext]** - CHANGES: - ${{ steps.changelog1.outputs.changelog }} - ${{ steps.changelog2.outputs.COMMIT_SUMMARY }} +name: Ubuntu-6.2 +# Qt官方没有linux平台的x86包 +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true +on: + # workflow_run: + # workflows: [AutoTag] + # types: [completed] + workflow_dispatch: + # push: + # branches: + # - dev + # - master + # # - staged + # paths-ignore: + # - 'docs/**' + # - ".github/**" + # - "howto/**" + # - "*.md" + # - ".clang-format" + +jobs: + build: + name: Build + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-latest] + qt_ver: [6.3.1] + qt_arch: [gcc_64] + env: + version: 22.8.24 + version-suffix: alpha + prerelease: true + steps: + - name: Install Qt + uses: xiaoyifang/install-qt-action@v3 + with: + version: ${{ matrix.qt_ver }} + arch: ${{ matrix.qt_arch }} + cached: 'false' + modules: qtwebengine qtwebchannel qtpositioning qt5compat qtmultimedia qtimageformats + - name: ubuntu install thirdparty dependencies + run: | + sudo apt-get install git pkg-config build-essential + sudo apt-get install libvorbis-dev zlib1g-dev libhunspell-dev x11proto-record-dev + sudo apt-get install libxtst-dev liblzo2-dev libbz2-dev + sudo apt-get install libao-dev libavutil-dev libavformat-dev libtiff5-dev libeb16-dev + sudo apt-get install doxygen libzstd-dev libxkbcommon-dev libgstreamer-plugins-base1.0-0 libgstreamer-gl1.0-0 + sudo ln -sf /usr/bin/x86_64-linux-gnu-ld.gold /usr/bin/ld + + #build opencc + git clone https://github.com/BYVoid/OpenCC + cd OpenCC/ + make PREFIX=/usr -j$(nproc) + sudo make install + cd .. + - uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - name: build goldendict + run: | + qmake CONFIG+=release CONFIG+=no_extra_tiff_handler PREFIX=/usr CONFIG+=zim_support CONFIG+=chinese_conversion_support + make INSTALL_ROOT=appdir -j`nproc` install; find appdir/ + + ls -al appdir + #copy missing shared dll to appdir. + # mkdir -p appdir/usr/lib + # cp $(ldd appdir/usr/bin/goldendict | grep -o '\W/[^ ]*' |grep gobject ) appdir/usr/lib + # cp $(ldd appdir/usr/bin/goldendict | grep -o '\W/[^ ]*' |grep libpango ) appdir/usr/lib + - name: Build AppImage + run: | + wget -c https://github.com/$(wget -q https://github.com/probonopd/go-appimage/releases -O - | grep "appimagetool-.*-x86_64.AppImage" | head -n 1 | cut -d '"' -f 2) + chmod +x appimagetool-*.AppImage + ./appimagetool-*.AppImage -s deploy appdir/usr/share/applications/*.desktop # Bundle EVERYTHING + # ./linuxdeploy-x86_64.AppImage --appdir appdir --output appimage --plugin qt -i redist/icons/goldendict.png -d redist/org.goldendict.GoldenDict.desktop + + - name: Generate changelog + if: ${{!env.prerelease}} + id: changelog1 + uses: metcalfc/changelog-generator@v3.0.0 + with: + myToken: ${{ secrets.GITHUB_TOKEN }} + + - name: Set outputs + id: vars + run: | + echo "::set-output name=sha_short::$(git rev-parse --short=8 HEAD)" + echo "::set-output name=release_date::$(date +'%Y%m%d')" + echo "::set-output name=release_time::$(date +'%H%M%S')" + echo "::set-output name=release_time_clock::$(date +'%H:%M:%S')" + echo "::set-output name=release_hm::$(date +'%y%m%d')" + echo "::set-output name=appname::$(ls *.AppImage*)" + + - name: changelog + if: $${{env.prerelease}} + id: changelog2 + run: | + previousTag=$(git tag --sort=-creatordate | sed -n 2p) + echo "previousTag : $previousTag" + + CHANGELOG="$(git log --oneline --no-decorate $previousTag..HEAD)" + CHANGELOG="${CHANGELOG//'%'/'%25'}" + CHANGELOG="${CHANGELOG//$'\n'/'%0A'}" + CHANGELOG="${CHANGELOG//$'\r'/'%0D'}" + CHANGELOG="${CHANGELOG//'\"'/'%22'}" + CHANGELOG="${CHANGELOG//"'"/ }" + echo "::set-output name=COMMIT_SUMMARY::$(echo "$CHANGELOG")" + - name: uploadRelease + # if: startsWith(github.event.ref, 'refs/tags/') + uses: svenstaro/upload-release-action@v2 + with: + repo_token: ${{ secrets.GITHUB_TOKEN }} + file: ${{ steps.vars.outputs.appname }} + asset_name: ${{ matrix.qt_ver }}-${{ steps.vars.outputs.appname }} + tag: v${{env.version}}-${{env.version-suffix}}.${{ steps.vars.outputs.release_hm }}.${{ steps.vars.outputs.sha_short }} + overwrite: true + release_name: GoldenDict-v${{env.version}}-${{env.version-suffix}}.${{ steps.vars.outputs.release_hm }}.${{ steps.vars.outputs.sha_short }} + prerelease: ${{env.prerelease}} + body: | + release on date: ${{steps.vars.outputs.release_date}} time: ${{steps.vars.outputs.release_time_clock}} + branch: ${{ github.ref_name }} + commit: ${{ steps.vars.outputs.sha_short }} + Qt version: Qt5.15.2, Qt6.X + Windows built with: msvc64, Visual studio 2019 + ## goldendict.exe can not be used alone + if you have a previous version. replace this maybe ok. if not ,download the whole bundle. + + AppImage built with: Ubuntu-20.04 ,latest gcc + macos built with: macos-10.15,macos-11.0,clang_64 x86_64 + Qt6.X(Universal Build) + Qt5.15.2(Intel Kind) + auto built by github action. use on your on risk:-) + **recommend version**:Qt6.X (with the latest bug fixes and performance enhancements) + + Filename pattern: **[Qt version]-GoldenDict-[OS]-[release-date].[ext]** + CHANGES: + ${{ steps.changelog1.outputs.changelog }} + ${{ steps.changelog2.outputs.COMMIT_SUMMARY }} diff --git a/.github/workflows/ubuntu-PR-check.yml b/.github/workflows/ubuntu-PR-check.yml index 170afdb0..4cd16225 100644 --- a/.github/workflows/ubuntu-PR-check.yml +++ b/.github/workflows/ubuntu-PR-check.yml @@ -25,10 +25,7 @@ jobs: os: [ubuntu-20.04] qt_ver: [5.15.2,6.2.4] qt_arch: [gcc_64] - env: - version: 22.8.23 - version-suffix: EndOfHeat - prerelease: false + steps: - uses: actions/setup-python@v3 with: diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml index 5784132b..e2d8f155 100644 --- a/.github/workflows/ubuntu.yml +++ b/.github/workflows/ubuntu.yml @@ -1,140 +1,141 @@ -name: Ubuntu -# Qt官方没有linux平台的x86包 -concurrency: - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true -on: - # workflow_run: - # workflows: [AutoTag] - # types: [completed] - workflow_dispatch: - push: - branches: - - dev - - master - # - staged - paths-ignore: - - 'docs/**' - - ".github/**" - - "howto/**" - - "*.md" - - ".clang-format" - -jobs: - build: - name: Build - runs-on: ${{ matrix.os }} - strategy: - matrix: - os: [ubuntu-20.04] - qt_ver: [5.15.2] - qt_arch: [gcc_64] - env: - version: 22.8.23 - version-suffix: EndOfHeat - prerelease: false - steps: - - name: Install Qt - uses: xiaoyifang/install-qt-action@v3 - with: - version: ${{ matrix.qt_ver }} - cached: 'false' - modules: qtwebengine - - name: ubuntu install thirdparty dependencies - run: | - sudo apt-get install git pkg-config build-essential qt5-qmake - sudo apt-get install libvorbis-dev zlib1g-dev libhunspell-dev x11proto-record-dev - sudo apt-get install qtdeclarative5-dev libxtst-dev liblzo2-dev libbz2-dev - sudo apt-get install libao-dev libavutil-dev libavformat-dev libtiff5-dev libeb16-dev - sudo apt-get install libqt5webkit5-dev libqt5svg5-dev libqt5x11extras5-dev qttools5-dev - sudo apt-get install qttools5-dev-tools qtmultimedia5-dev libqt5multimedia5-plugins doxygen libzstd-dev #libopencc-dev - sudo ln -sf /usr/bin/x86_64-linux-gnu-ld.gold /usr/bin/ld - git clone https://github.com/BYVoid/OpenCC - pwd - cd OpenCC/ - make PREFIX=/usr -j$(nproc) - sudo make install - cd .. - - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - - name: build goldendict - run: | - qmake CONFIG+=release CONFIG+=no_extra_tiff_handler PREFIX=/usr CONFIG+=zim_support CONFIG+=chinese_conversion_support - make INSTALL_ROOT=appdir -j`nproc` install; find appdir/ - - #copy missing shared dll to appdir. - mkdir -p appdir/usr/lib - cp $(ldd appdir/usr/bin/goldendict | grep -o '\W/[^ ]*' |grep gobject ) appdir/usr/lib - cp $(ldd appdir/usr/bin/goldendict | grep -o '\W/[^ ]*' |grep libpango ) appdir/usr/lib - - - name: Build AppImage - run: | - wget -c -nv "https://github.com/linuxdeploy/linuxdeploy-plugin-qt/releases/download/continuous/linuxdeploy-plugin-qt-x86_64.AppImage" - chmod a+x linuxdeploy-plugin-qt-x86_64.AppImage - wget -c -nv "https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage" - chmod a+x linuxdeploy-x86_64.AppImage - ./linuxdeploy-x86_64.AppImage --appdir appdir --output appimage --plugin qt -i redist/icons/goldendict.png -d redist/org.goldendict.GoldenDict.desktop - - - name: Generate changelog - if: ${{!env.prerelease}} - id: changelog1 - uses: metcalfc/changelog-generator@v3.0.0 - with: - myToken: ${{ secrets.GITHUB_TOKEN }} - - - name: Set outputs - id: vars - run: | - echo "::set-output name=sha_short::$(git rev-parse --short=8 HEAD)" - echo "::set-output name=release_date::$(date +'%Y%m%d')" - echo "::set-output name=release_time::$(date +'%H%M%S')" - echo "::set-output name=release_time_clock::$(date +'%H:%M:%S')" - echo "::set-output name=release_hm::$(date +'%y%m%d')" - echo "::set-output name=appname::$(ls *.AppImage*)" - - - name: changelog - if: $${{env.prerelease}} - id: changelog2 - run: | - previousTag=$(git tag --sort=-creatordate | sed -n 2p) - echo "previousTag : $previousTag" - - CHANGELOG="$(git log --oneline --no-decorate $previousTag..HEAD)" - CHANGELOG="${CHANGELOG//'%'/'%25'}" - CHANGELOG="${CHANGELOG//$'\n'/'%0A'}" - CHANGELOG="${CHANGELOG//$'\r'/'%0D'}" - CHANGELOG="${CHANGELOG//'\"'/'%22'}" - CHANGELOG="${CHANGELOG//"'"/ }" - echo "::set-output name=COMMIT_SUMMARY::$(echo "$CHANGELOG")" - - name: uploadRelease - # if: startsWith(github.event.ref, 'refs/tags/') - uses: svenstaro/upload-release-action@v2 - with: - repo_token: ${{ secrets.GITHUB_TOKEN }} - file: ${{ steps.vars.outputs.appname }} - asset_name: ${{ matrix.qt_ver }}-${{ env.targetName }}_${{ matrix.os }}_${{steps.vars.outputs.release_date}}.AppImage - tag: v${{env.version}}-${{env.version-suffix}}.${{ steps.vars.outputs.release_hm }}.${{ steps.vars.outputs.sha_short }} - overwrite: true - release_name: GoldenDict-v${{env.version}}-${{env.version-suffix}}.${{ steps.vars.outputs.release_hm }}.${{ steps.vars.outputs.sha_short }} - prerelease: ${{env.prerelease}} - body: | - release on date: ${{steps.vars.outputs.release_date}} time: ${{steps.vars.outputs.release_time_clock}} - branch: ${{ github.ref_name }} - commit: ${{ steps.vars.outputs.sha_short }} - Qt version: Qt5.15.2, Qt6.X - Windows built with: msvc64, Visual studio 2019 - ## goldendict.exe can not be used alone - if you have a previous version. replace this maybe ok. if not ,download the whole bundle. - - AppImage built with: Ubuntu-20.04 ,latest gcc - macos built with: macos-10.15,macos-11.0,clang_64 x86_64 - Qt6.X(Universal Build) - Qt5.15.2(Intel Kind) - auto built by github action. use on your on risk:-) - - Filename pattern: **[Qt version]-GoldenDict-[OS]-[release-date].[ext]** - CHANGES: - ${{ steps.changelog1.outputs.changelog }} - ${{ steps.changelog2.outputs.COMMIT_SUMMARY }} +name: Ubuntu +# Qt官方没有linux平台的x86包 +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true +on: + # workflow_run: + # workflows: [AutoTag] + # types: [completed] + workflow_dispatch: + push: + branches: + - dev + - master + # - staged + paths-ignore: + - 'docs/**' + - ".github/**" + - "howto/**" + - "*.md" + - ".clang-format" + +jobs: + build: + name: Build + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-20.04] + qt_ver: [5.15.2] + qt_arch: [gcc_64] + env: + version: 22.8.24 + version-suffix: alpha + prerelease: true + steps: + - name: Install Qt + uses: xiaoyifang/install-qt-action@v3 + with: + version: ${{ matrix.qt_ver }} + cached: 'false' + modules: qtwebengine + - name: ubuntu install thirdparty dependencies + run: | + sudo apt-get install git pkg-config build-essential qt5-qmake + sudo apt-get install libvorbis-dev zlib1g-dev libhunspell-dev x11proto-record-dev + sudo apt-get install qtdeclarative5-dev libxtst-dev liblzo2-dev libbz2-dev + sudo apt-get install libao-dev libavutil-dev libavformat-dev libtiff5-dev libeb16-dev + sudo apt-get install libqt5webkit5-dev libqt5svg5-dev libqt5x11extras5-dev qttools5-dev + sudo apt-get install qttools5-dev-tools qtmultimedia5-dev libqt5multimedia5-plugins doxygen libzstd-dev #libopencc-dev + sudo ln -sf /usr/bin/x86_64-linux-gnu-ld.gold /usr/bin/ld + git clone https://github.com/BYVoid/OpenCC + pwd + cd OpenCC/ + make PREFIX=/usr -j$(nproc) + sudo make install + cd .. + - uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - name: build goldendict + run: | + qmake CONFIG+=release CONFIG+=no_extra_tiff_handler PREFIX=/usr CONFIG+=zim_support CONFIG+=chinese_conversion_support + make INSTALL_ROOT=appdir -j`nproc` install; find appdir/ + + #copy missing shared dll to appdir. + mkdir -p appdir/usr/lib + cp $(ldd appdir/usr/bin/goldendict | grep -o '\W/[^ ]*' |grep gobject ) appdir/usr/lib + cp $(ldd appdir/usr/bin/goldendict | grep -o '\W/[^ ]*' |grep libpango ) appdir/usr/lib + + - name: Build AppImage + run: | + wget -c -nv "https://github.com/linuxdeploy/linuxdeploy-plugin-qt/releases/download/continuous/linuxdeploy-plugin-qt-x86_64.AppImage" + chmod a+x linuxdeploy-plugin-qt-x86_64.AppImage + wget -c -nv "https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage" + chmod a+x linuxdeploy-x86_64.AppImage + ./linuxdeploy-x86_64.AppImage --appdir appdir --output appimage --plugin qt -i redist/icons/goldendict.png -d redist/org.goldendict.GoldenDict.desktop + + - name: Generate changelog + if: ${{!env.prerelease}} + id: changelog1 + uses: metcalfc/changelog-generator@v3.0.0 + with: + myToken: ${{ secrets.GITHUB_TOKEN }} + + - name: Set outputs + id: vars + run: | + echo "::set-output name=sha_short::$(git rev-parse --short=8 HEAD)" + echo "::set-output name=release_date::$(date +'%Y%m%d')" + echo "::set-output name=release_time::$(date +'%H%M%S')" + echo "::set-output name=release_time_clock::$(date +'%H:%M:%S')" + echo "::set-output name=release_hm::$(date +'%y%m%d')" + echo "::set-output name=appname::$(ls *.AppImage*)" + + - name: changelog + if: $${{env.prerelease}} + id: changelog2 + run: | + previousTag=$(git tag --sort=-creatordate | sed -n 2p) + echo "previousTag : $previousTag" + + CHANGELOG="$(git log --oneline --no-decorate $previousTag..HEAD)" + CHANGELOG="${CHANGELOG//'%'/'%25'}" + CHANGELOG="${CHANGELOG//$'\n'/'%0A'}" + CHANGELOG="${CHANGELOG//$'\r'/'%0D'}" + CHANGELOG="${CHANGELOG//'\"'/'%22'}" + CHANGELOG="${CHANGELOG//"'"/ }" + echo "::set-output name=COMMIT_SUMMARY::$(echo "$CHANGELOG")" + - name: uploadRelease + # if: startsWith(github.event.ref, 'refs/tags/') + uses: svenstaro/upload-release-action@v2 + with: + repo_token: ${{ secrets.GITHUB_TOKEN }} + file: ${{ steps.vars.outputs.appname }} + asset_name: ${{ matrix.qt_ver }}-${{ env.targetName }}_${{ matrix.os }}_${{steps.vars.outputs.release_date}}.AppImage + tag: v${{env.version}}-${{env.version-suffix}}.${{ steps.vars.outputs.release_hm }}.${{ steps.vars.outputs.sha_short }} + overwrite: true + release_name: GoldenDict-v${{env.version}}-${{env.version-suffix}}.${{ steps.vars.outputs.release_hm }}.${{ steps.vars.outputs.sha_short }} + prerelease: ${{env.prerelease}} + body: | + release on date: ${{steps.vars.outputs.release_date}} time: ${{steps.vars.outputs.release_time_clock}} + branch: ${{ github.ref_name }} + commit: ${{ steps.vars.outputs.sha_short }} + Qt version: Qt5.15.2, Qt6.X + Windows built with: msvc64, Visual studio 2019 + ## goldendict.exe can not be used alone + if you have a previous version. replace this maybe ok. if not ,download the whole bundle. + + AppImage built with: Ubuntu-20.04 ,latest gcc + macos built with: macos-10.15,macos-11.0,clang_64 x86_64 + Qt6.X(Universal Build) + Qt5.15.2(Intel Kind) + auto built by github action. use on your on risk:-) + **recommend version**:Qt6.X (with the latest bug fixes and performance enhancements) + + Filename pattern: **[Qt version]-GoldenDict-[OS]-[release-date].[ext]** + CHANGES: + ${{ steps.changelog1.outputs.changelog }} + ${{ steps.changelog2.outputs.COMMIT_SUMMARY }} diff --git a/.github/workflows/windows-6.2.yml b/.github/workflows/windows-6.x.yml similarity index 95% rename from .github/workflows/windows-6.2.yml rename to .github/workflows/windows-6.x.yml index 1f876dde..7a64e6c8 100644 --- a/.github/workflows/windows-6.2.yml +++ b/.github/workflows/windows-6.x.yml @@ -1,4 +1,4 @@ -name: Windows-6.2 +name: Windows-6.x concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true @@ -31,9 +31,9 @@ jobs: qt_arch: [win64_msvc2019_64] env: targetName: GoldenDict.exe - version: 22.8.23 - version-suffix: EndOfHeat - prerelease: false + version: 22.8.24 + version-suffix: alpha + prerelease: true steps: - uses: actions/setup-python@v3 with: @@ -92,7 +92,6 @@ jobs: id: build shell: cmd run: | - # call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" ${{ matrix.msvc_arch }} qmake "CONFIG+=zim_support" CONFIG+=release nmake @@ -140,6 +139,7 @@ jobs: Qt6.X(Universal Build) Qt5.15.2(Intel Kind) auto built by github action. use on your on risk:-) + **recommend version**:Qt6.X (with the latest bug fixes and performance enhancements) Filename pattern: **[Qt version]-GoldenDict-[OS]-[release-date].[ext]** CHANGES: @@ -177,8 +177,8 @@ jobs: with: repo_token: ${{ secrets.GITHUB_TOKEN }} file: ${{ steps.package.outputs.packageName }}/GoldenDict-v22-Install.exe - asset_name: ${{ matrix.qt_ver }}-GoldenDict-v22-Install.exe + asset_name: ${{ matrix.qt_ver }}-GoldenDict-v${{env.version}}-${{env.version-suffix}}-Installer.exe tag: v${{env.version}}-${{env.version-suffix}}.${{ steps.vars.outputs.release_hm }}.${{ steps.vars.outputs.sha_short }} overwrite: true release_name: GoldenDict-v${{env.version}}-${{env.version-suffix}}.${{ steps.vars.outputs.release_hm }}.${{ steps.vars.outputs.sha_short }} - prerelease: ${{env.prerelease}} \ No newline at end of file + prerelease: ${{env.prerelease}} diff --git a/.github/workflows/windows-PR-check.yml b/.github/workflows/windows-PR-check.yml index f87027d4..750130c6 100644 --- a/.github/workflows/windows-PR-check.yml +++ b/.github/workflows/windows-PR-check.yml @@ -26,12 +26,6 @@ jobs: os: [windows-2019] qt_ver: [5.15.2,6.2.4] qt_arch: [win64_msvc2019_64] - - env: - targetName: GoldenDict.exe - version: 22.8.23 - version-suffix: EndOfHeat - prerelease: false steps: - uses: actions/setup-python@v3 with: @@ -66,12 +60,5 @@ jobs: id: build shell: cmd run: | - # call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" ${{ matrix.msvc_arch }} qmake "CONFIG+=zim_support" CONFIG+=release nmake - - echo winSdkDir=%WindowsSdkDir% >> %GITHUB_ENV% - echo winSdkVer=%WindowsSdkVersion% >> %GITHUB_ENV% - echo vcToolsInstallDir=%VCToolsInstallDir% >> %GITHUB_ENV% - echo vcToolsRedistDir=%VCToolsRedistDir% >> %GITHUB_ENV% - echo QTDIR=%Qt6_DIR% >> %GITHUB_ENV% diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index b8c25014..4cdae3a0 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -1,185 +1,186 @@ -name: Windows -concurrency: - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true -on: - # workflow_run: - # workflows: [AutoTag] - # types: [completed] - workflow_dispatch: - push: - branches: - - dev - - master - # - staged - paths-ignore: - - 'docs/**' - - ".github/**" - - "howto/**" - - "*.md" - - ".clang-format" - -jobs: - build: - name: Build - # 运行平台, windows-latest目前是windows server 2019 - # 参考文档 https://github.com/actions/virtual-environments/blob/main/images/win/Windows2019-Readme.md - runs-on: ${{ matrix.os }} - strategy: - matrix: - os: [windows-2019] - qt_ver: [5.15.2] - qt_arch: [win64_msvc2019_64] - env: - targetName: GoldenDict.exe - version: 22.8.23 - version-suffix: EndOfHeat - prerelease: false - # 步骤 - steps: - # 安装Qt - - name: Install Qt - # 使用外部action。这个action专门用来安装Qt - uses: xiaoyifang/install-qt-action@v3 - with: - # Version of Qt to install - version: ${{ matrix.qt_ver }} - # Target platform for build - # target: ${{ matrix.qt_target }} - arch: ${{ matrix.qt_arch }} - cached: 'false' - modules: qtwebengine - # 拉取代码 - - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - - name: Generate changelog - if: ${{!env.prerelease}} - id: changelog1 - uses: metcalfc/changelog-generator@v3.0.0 - with: - myToken: ${{ secrets.GITHUB_TOKEN }} - - - name: Set outputs - id: vars - shell: bash - run: | - echo "::set-output name=sha_short::$(git rev-parse --short=8 HEAD)" - echo "::set-output name=release_date::$(date +'%Y%m%d')" - echo "::set-output name=release_time::$(date +'%H%M%S')" - echo "::set-output name=release_time_clock::$(date +'%H:%M:%S')" - echo "::set-output name=release_hm::$(date +'%y%m%d')" - - - name: changelog - if: $${{env.prerelease}} - id: changelog2 - shell: bash - run: | - previousTag=$(git tag --sort=-creatordate | sed -n 2p) - echo "previousTag : $previousTag" - - CHANGELOG="$(git log --oneline --no-decorate $previousTag..HEAD)" - CHANGELOG="${CHANGELOG//'%'/'%25'}" - CHANGELOG="${CHANGELOG//$'\n'/'%0A'}" - CHANGELOG="${CHANGELOG//$'\r'/'%0D'}" - CHANGELOG="${CHANGELOG//'\"'/'%22'}" - CHANGELOG="${CHANGELOG//"'"/ }" - echo "::set-output name=COMMIT_SUMMARY::$(echo "$CHANGELOG")" - - uses: ilammy/msvc-dev-cmd@v1 - # msvc编译 - - name: msvc-build goldendict - id: build - shell: cmd - run: | - # call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" ${{ matrix.msvc_arch }} - qmake "CONFIG+=zim_support" CONFIG+=release - nmake - - echo winSdkDir=%WindowsSdkDir% >> %GITHUB_ENV% - echo winSdkVer=%WindowsSdkVersion% >> %GITHUB_ENV% - echo vcToolsInstallDir=%VCToolsInstallDir% >> %GITHUB_ENV% - echo vcToolsRedistDir=%VCToolsRedistDir% >> %GITHUB_ENV% - echo QTDIR=%Qt5_DIR% >> %GITHUB_ENV% - - # 打包 - - name: package - id: package - env: - archiveName: GoldenDict-Windows.${{ steps.vars.outputs.sha_short }}-${{ steps.vars.outputs.release_time }} - msvcArch: ${{ matrix.msvc_arch }} - shell: pwsh - run: | - & .github\scripts\windows-publish.ps1 ${env:archiveName} ${env:targetName} - $name = ${env:archiveName} - echo "::set-output name=packageName::$name" - - - name: uploadRelease - # if: startsWith(github.event.ref, 'refs/tags/') - uses: svenstaro/upload-release-action@v2 - with: - repo_token: ${{ secrets.GITHUB_TOKEN }} - file: ${{ steps.package.outputs.packageName }}.zip - asset_name: ${{ matrix.qt_ver }}-${{ env.targetName }}_${{ matrix.os }}_${{steps.vars.outputs.release_date}}.zip - tag: v${{env.version}}-${{env.version-suffix}}.${{ steps.vars.outputs.release_hm }}.${{ steps.vars.outputs.sha_short }} - overwrite: true - release_name: GoldenDict-v${{env.version}}-${{env.version-suffix}}.${{ steps.vars.outputs.release_hm }}.${{ steps.vars.outputs.sha_short }} - prerelease: ${{env.prerelease}} - body: | - release on date: ${{steps.vars.outputs.release_date}} time: ${{steps.vars.outputs.release_time_clock}} - branch: ${{ github.ref_name }} - commit: ${{ steps.vars.outputs.sha_short }} - Qt version: Qt5.15.2, Qt6.X - Windows built with: msvc64, Visual studio 2019 - ## goldendict.exe can not be used alone - if you have a previous version. replace this maybe ok. if not ,download the whole bundle. - AppImage built with: Ubuntu-20.04 ,latest gcc - macos built with: macos-10.15,macos-11.0,clang_64 x86_64 - Qt6.X(Universal Build) - Qt5.15.2(Intel Kind) - auto built by github action. use on your on risk:-) - - Filename pattern: **[Qt version]-GoldenDict-[OS]-[release-date].[ext]** - CHANGES: - ${{ steps.changelog1.outputs.changelog }} - ${{ steps.changelog2.outputs.COMMIT_SUMMARY }} - - name: upload goldendict.exe only - # if: startsWith(github.event.ref, 'refs/tags/') - uses: svenstaro/upload-release-action@v2 - with: - repo_token: ${{ secrets.GITHUB_TOKEN }} - file: release/${{ env.targetName }} - asset_name: ${{ matrix.qt_ver }}-${{ env.targetName }} - tag: v${{env.version}}-${{env.version-suffix}}.${{ steps.vars.outputs.release_hm }}.${{ steps.vars.outputs.sha_short }} - overwrite: true - release_name: GoldenDict-v${{env.version}}-${{env.version-suffix}}.${{ steps.vars.outputs.release_hm }}.${{ steps.vars.outputs.sha_short }} - prerelease: ${{env.prerelease}} - - - - name: copy nsis - shell: bash - run: | - ls -al - cp tools/nsis/GoldenDict.nsi ${{ steps.package.outputs.packageName }}/ - - name: Create installer - uses: joncloud/makensis-action@v3.6 - with: - arguments: "/V3" - script-file: ${{ steps.package.outputs.packageName }}/GoldenDict.nsi - - name: make installer - run: | - ls *.exe - cd ${{ steps.package.outputs.packageName }} - ls *.exe - - name: upload goldendict installer - # if: startsWith(github.event.ref, 'refs/tags/') - uses: svenstaro/upload-release-action@v2 - with: - repo_token: ${{ secrets.GITHUB_TOKEN }} - file: ${{ steps.package.outputs.packageName }}/GoldenDict-v22-Install.exe - asset_name: ${{ matrix.qt_ver }}-GoldenDict-v22-Install.exe - tag: v${{env.version}}-${{env.version-suffix}}.${{ steps.vars.outputs.release_hm }}.${{ steps.vars.outputs.sha_short }} - overwrite: true - release_name: GoldenDict-v${{env.version}}-${{env.version-suffix}}.${{ steps.vars.outputs.release_hm }}.${{ steps.vars.outputs.sha_short }} - prerelease: ${{env.prerelease}} +name: Windows +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true +on: + # workflow_run: + # workflows: [AutoTag] + # types: [completed] + workflow_dispatch: + push: + branches: + - dev + - master + # - staged + paths-ignore: + - 'docs/**' + - ".github/**" + - "howto/**" + - "*.md" + - ".clang-format" + +jobs: + build: + name: Build + # 运行平台, windows-latest目前是windows server 2019 + # 参考文档 https://github.com/actions/virtual-environments/blob/main/images/win/Windows2019-Readme.md + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [windows-2019] + qt_ver: [5.15.2] + qt_arch: [win64_msvc2019_64] + env: + targetName: GoldenDict.exe + version: 22.8.24 + version-suffix: alpha + prerelease: true + # 步骤 + steps: + # 安装Qt + - name: Install Qt + # 使用外部action。这个action专门用来安装Qt + uses: xiaoyifang/install-qt-action@v3 + with: + # Version of Qt to install + version: ${{ matrix.qt_ver }} + # Target platform for build + # target: ${{ matrix.qt_target }} + arch: ${{ matrix.qt_arch }} + cached: 'false' + modules: qtwebengine + # 拉取代码 + - uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - name: Generate changelog + if: ${{!env.prerelease}} + id: changelog1 + uses: metcalfc/changelog-generator@v3.0.0 + with: + myToken: ${{ secrets.GITHUB_TOKEN }} + + - name: Set outputs + id: vars + shell: bash + run: | + echo "::set-output name=sha_short::$(git rev-parse --short=8 HEAD)" + echo "::set-output name=release_date::$(date +'%Y%m%d')" + echo "::set-output name=release_time::$(date +'%H%M%S')" + echo "::set-output name=release_time_clock::$(date +'%H:%M:%S')" + echo "::set-output name=release_hm::$(date +'%y%m%d')" + + - name: changelog + if: $${{env.prerelease}} + id: changelog2 + shell: bash + run: | + previousTag=$(git tag --sort=-creatordate | sed -n 2p) + echo "previousTag : $previousTag" + + CHANGELOG="$(git log --oneline --no-decorate $previousTag..HEAD)" + CHANGELOG="${CHANGELOG//'%'/'%25'}" + CHANGELOG="${CHANGELOG//$'\n'/'%0A'}" + CHANGELOG="${CHANGELOG//$'\r'/'%0D'}" + CHANGELOG="${CHANGELOG//'\"'/'%22'}" + CHANGELOG="${CHANGELOG//"'"/ }" + echo "::set-output name=COMMIT_SUMMARY::$(echo "$CHANGELOG")" + - uses: ilammy/msvc-dev-cmd@v1 + # msvc编译 + - name: msvc-build goldendict + id: build + shell: cmd + run: | + # call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" ${{ matrix.msvc_arch }} + qmake "CONFIG+=zim_support" CONFIG+=release + nmake + + echo winSdkDir=%WindowsSdkDir% >> %GITHUB_ENV% + echo winSdkVer=%WindowsSdkVersion% >> %GITHUB_ENV% + echo vcToolsInstallDir=%VCToolsInstallDir% >> %GITHUB_ENV% + echo vcToolsRedistDir=%VCToolsRedistDir% >> %GITHUB_ENV% + echo QTDIR=%Qt5_DIR% >> %GITHUB_ENV% + + # 打包 + - name: package + id: package + env: + archiveName: GoldenDict-Windows.${{ steps.vars.outputs.sha_short }}-${{ steps.vars.outputs.release_time }} + msvcArch: ${{ matrix.msvc_arch }} + shell: pwsh + run: | + & .github\scripts\windows-publish.ps1 ${env:archiveName} ${env:targetName} + $name = ${env:archiveName} + echo "::set-output name=packageName::$name" + + - name: uploadRelease + # if: startsWith(github.event.ref, 'refs/tags/') + uses: svenstaro/upload-release-action@v2 + with: + repo_token: ${{ secrets.GITHUB_TOKEN }} + file: ${{ steps.package.outputs.packageName }}.zip + asset_name: ${{ matrix.qt_ver }}-${{ env.targetName }}_${{ matrix.os }}_${{steps.vars.outputs.release_date}}.zip + tag: v${{env.version}}-${{env.version-suffix}}.${{ steps.vars.outputs.release_hm }}.${{ steps.vars.outputs.sha_short }} + overwrite: true + release_name: GoldenDict-v${{env.version}}-${{env.version-suffix}}.${{ steps.vars.outputs.release_hm }}.${{ steps.vars.outputs.sha_short }} + prerelease: ${{env.prerelease}} + body: | + release on date: ${{steps.vars.outputs.release_date}} time: ${{steps.vars.outputs.release_time_clock}} + branch: ${{ github.ref_name }} + commit: ${{ steps.vars.outputs.sha_short }} + Qt version: Qt5.15.2, Qt6.X + Windows built with: msvc64, Visual studio 2019 + ## goldendict.exe can not be used alone + if you have a previous version. replace this maybe ok. if not ,download the whole bundle. + AppImage built with: Ubuntu-20.04 ,latest gcc + macos built with: macos-10.15,macos-11.0,clang_64 x86_64 + Qt6.X(Universal Build) + Qt5.15.2(Intel Kind) + auto built by github action. use on your on risk:-) + **recommend version**:Qt6.X (with the latest bug fixes and performance enhancements) + + Filename pattern: **[Qt version]-GoldenDict-[OS]-[release-date].[ext]** + CHANGES: + ${{ steps.changelog1.outputs.changelog }} + ${{ steps.changelog2.outputs.COMMIT_SUMMARY }} + - name: upload goldendict.exe only + # if: startsWith(github.event.ref, 'refs/tags/') + uses: svenstaro/upload-release-action@v2 + with: + repo_token: ${{ secrets.GITHUB_TOKEN }} + file: release/${{ env.targetName }} + asset_name: ${{ matrix.qt_ver }}-${{ env.targetName }} + tag: v${{env.version}}-${{env.version-suffix}}.${{ steps.vars.outputs.release_hm }}.${{ steps.vars.outputs.sha_short }} + overwrite: true + release_name: GoldenDict-v${{env.version}}-${{env.version-suffix}}.${{ steps.vars.outputs.release_hm }}.${{ steps.vars.outputs.sha_short }} + prerelease: ${{env.prerelease}} + + + - name: copy nsis + shell: bash + run: | + ls -al + cp tools/nsis/GoldenDict.nsi ${{ steps.package.outputs.packageName }}/ + - name: Create installer + uses: joncloud/makensis-action@v3.6 + with: + arguments: "/V3" + script-file: ${{ steps.package.outputs.packageName }}/GoldenDict.nsi + - name: make installer + run: | + ls *.exe + cd ${{ steps.package.outputs.packageName }} + ls *.exe + - name: upload goldendict installer + # if: startsWith(github.event.ref, 'refs/tags/') + uses: svenstaro/upload-release-action@v2 + with: + repo_token: ${{ secrets.GITHUB_TOKEN }} + file: ${{ steps.package.outputs.packageName }}/GoldenDict-v22-Install.exe + asset_name: ${{ matrix.qt_ver }}-GoldenDict-v${{env.version}}-${{env.version-suffix}}-Installer.exe + tag: v${{env.version}}-${{env.version-suffix}}.${{ steps.vars.outputs.release_hm }}.${{ steps.vars.outputs.sha_short }} + overwrite: true + release_name: GoldenDict-v${{env.version}}-${{env.version-suffix}}.${{ steps.vars.outputs.release_hm }}.${{ steps.vars.outputs.sha_short }} + prerelease: ${{env.prerelease}} \ No newline at end of file diff --git a/CHANGES.md b/CHANGES.md index 49f1ea9a..00560071 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,6 +1,18 @@ # Changes -## Until to now +## Until Now + +- change the original default style to classic style +- add clipboard tracking menu in trayicon +- concurrent fulltext index creation +- add CJK fulltext search ability +- many minor fixes . +- add mdx source+srcset support +- qt6.x help file can not open +- many minor optimizations. +- iframe website almost full support.(except some websites) + +## Until 2022-8-31 - **CLEANING OLD/USELESS CODE** - remove Runnable Class in dsl, zim , epwing etc files. diff --git a/CREDITS.txt b/CREDITS.txt index 6eb5b9c9..9ee98b89 100644 --- a/CREDITS.txt +++ b/CREDITS.txt @@ -32,3 +32,4 @@ Nasrollah Noori : Persian translation Vladimir Gerovski: Macedonian Translation Nikolay Korotkiy : Finnish translation Robin Townsend: Lojban translation +Patrik Studer: Swiss High-German translation (de-ch) diff --git a/README.md b/README.md index 2bf0d0fa..8476f263 100644 --- a/README.md +++ b/README.md @@ -30,10 +30,13 @@ This code has been run and tested on Windows 10/11, Ubuntu Linux, Mac OS X. ### Fedora 35 ``` -sudo dnf install git pkg-config \ +sudo dnf install git pkg-config libzstd-devel opencc-devel xz-devel xz-lzma-compat\ libvorbis-devel zlib-devel hunspell-devel lzo-devel bzip2-devel \ libao-devel ffmpeg-devel libtiff-devel eb-devel qt5-qtx11extras-devel libXtst-devel \ - libxkbcommon-devel + libxkbcommon-devel qt5-qtbase qt5-qttools qt5-qtsvg-devl qt5-qtwebengine-devel qt5-qtmultimedia-devl + +qmake-qt5 CONFIG+=release CONFIG+=no_extra_tiff_handler CONFIG+=no_epwing_support +make ``` diff --git a/article-style-st-modern.css b/article-style-st-modern.css index 22da6b9d..0380b086 100644 --- a/article-style-st-modern.css +++ b/article-style-st-modern.css @@ -10,7 +10,6 @@ body margin-left: 2px; margin-bottom: 3px; background: white; - font-family: Tahoma, Verdana, "Lucida Sans Unicode", "Segoe UI", "Palatino Linotype", "Arial Unicode MS", sans-serif; } a diff --git a/article-style.css b/article-style.css index 34c3add7..f5f09c1e 100644 --- a/article-style.css +++ b/article-style.css @@ -6,8 +6,7 @@ html { body { - font-family: Tahoma, Verdana, "Lucida Sans Unicode", sans-serif; - height: 100%; + font-family: system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen,Ubuntu,Cantarell,"Open Sans","Helvetica Neue",sans-serif; } /* This stylesheet is used to highligh current selection when doing a search. diff --git a/article_inspect.cpp b/article_inspect.cpp index 8419749b..9e4547b4 100644 --- a/article_inspect.cpp +++ b/article_inspect.cpp @@ -28,22 +28,11 @@ void ArticleInspector::setInspectPage( QWebEnginePage * page ) } qDebug() << page->lifecycleState(); -#if( QT_VERSION < QT_VERSION_CHECK( 6, 0, 0 ) ) +#if( QT_VERSION < QT_VERSION_CHECK( 6, 0, 0 ) || QT_VERSION > QT_VERSION_CHECK(6,3,0) ) page->triggerAction( QWebEnginePage::InspectElement ); #else // without this line, application will crash on qt6.2 ,see https://bugreports.qt.io/browse/QTBUG-101724 // and seems to hangup forever on qt6.3.0 ,so the best solution for now is to comment out the following lines. - static bool first{ true }; - if( first ) - { - qDebug()<<"inspector,phase first time"; - first = false; - } - else - { - qDebug()<<"inspector,phase not first time"; - page->triggerAction( QWebEnginePage::InspectElement ); - } #endif raise(); diff --git a/article_maker.cc b/article_maker.cc index d73ec036..53d45ce0 100644 --- a/article_maker.cc +++ b/article_maker.cc @@ -54,12 +54,15 @@ std::string ArticleMaker::makeHtmlHeader( QString const & word, // add jquery { result += ""; + "src=\"qrc:///scripts/jquery-3.6.0.slim.min.js\">"; result += ""; //custom javascript - result += ""; + result += ""; + + //iframe resizer javascript + result += ""; } // add qwebchannel @@ -144,7 +147,7 @@ std::string ArticleMaker::makeHtmlHeader( QString const & word, "return tr_map[key] || '';" "}" ""; - result+= ""; + result+= ""; result += ""; return result; diff --git a/articleview.cc b/articleview.cc index 16fa1e95..ea7664d5 100644 --- a/articleview.cc +++ b/articleview.cc @@ -1950,7 +1950,8 @@ void ArticleView::contextMenuRequested( QPoint const & pos ) } menu.addSeparator(); - menu.addAction( &inspectAction ); + if(!popupView||cfg.pinPopupWindow) + menu.addAction( &inspectAction ); if ( !menu.isEmpty() ) { diff --git a/base/globalregex.cc b/base/globalregex.cc index a9a6f8fc..6f72276e 100644 --- a/base/globalregex.cc +++ b/base/globalregex.cc @@ -47,10 +47,10 @@ QRegularExpression Mdx::stylesRe2( "([\\s\"']href\\s*=)\\s*(?![\\s\"']|\\b(?:(?: QRegularExpression Mdx::inlineScriptRe( "<\\s*script(?:(?=\\s)(?:(?![\\s\"']src\\s*=)[^>])+|\\s*)>", QRegularExpression::CaseInsensitiveOption ); QRegularExpression Mdx::closeScriptTagRe( "<\\s*/script\\s*>", QRegularExpression::CaseInsensitiveOption ); -QRegularExpression Mdx::srcRe( "([\\s\"']src\\s*=)\\s*([\"'])(?!\\s*\\b(?:(?:bres|https?|ftp)://" +QRegularExpression Mdx::srcRe( "([\\s\"'](?:src|srcset)\\s*=)\\s*([\"'])(?!\\s*\\b(?:(?:bres|https?|ftp)://" "|(?:data|javascript):))(?:file://)?[\\x00-\\x1f\\x7f]*\\.*/?([^\">]+)\\2", QRegularExpression::CaseInsensitiveOption ); -QRegularExpression Mdx::srcRe2( "([\\s\"']src\\s*=)\\s*(?![\\s\"']|\\b(?:(?:bres|https?|ftp)://" +QRegularExpression Mdx::srcRe2( "([\\s\"'](?:src|srcset)\\s*=)\\s*(?![\\s\"']|\\b(?:(?:bres|https?|ftp)://" "|(?:data|javascript):))(?:file://)?[\\x00-\\x1f\\x7f]*\\.*/?([^\\s\">]+)", QRegularExpression::CaseInsensitiveOption ); diff --git a/config.cc b/config.cc index a86e8c7c..b4c4a186 100644 --- a/config.cc +++ b/config.cc @@ -2264,17 +2264,12 @@ QString getProgramDataDir() noexcept #endif } -QString getEmbedLocDir() noexcept -{ - return ":/locale"; -} - QString getLocDir() noexcept { - if ( QDir( getProgramDataDir() ).cd( "locale" ) ) - return getProgramDataDir() + "/locale"; - else - return QCoreApplication::applicationDirPath() + "/locale"; + if ( QDir( getProgramDataDir() ).cd( "locale" ) ) + return getProgramDataDir() + "/locale"; + else + return QCoreApplication::applicationDirPath() + "/locale"; } QString getHelpDir() noexcept diff --git a/config.hh b/config.hh index 06d21ccf..012382cf 100644 --- a/config.hh +++ b/config.hh @@ -811,7 +811,6 @@ QString getUserQtCssFileName() ; QString getProgramDataDir() noexcept; /// Returns the directory storing program localizized files (.qm). -QString getEmbedLocDir() noexcept; QString getLocDir() noexcept; /// Returns the directory storing program help files (.qch). diff --git a/dictionary.cc b/dictionary.cc index bf72d394..3a638a76 100644 --- a/dictionary.cc +++ b/dictionary.cc @@ -273,11 +273,11 @@ bool Class::loadIconFromFile( QString const & _filename, bool isFullName ) return false; } -bool Class::loadIconFromText( QString const & text ) +bool Class::loadIconFromText( QString iconUrl, QString const & text ) { if( text.isEmpty() ) return false; - QImage img( ":/icons/mdict-bg.png" ); + QImage img( iconUrl ); if ( !img.isNull() ) { @@ -293,7 +293,7 @@ bool Class::loadIconFromText( QString const & text ) painter.drawImage( QPoint( img.width() == max ? 0 : ( max - img.width() ) / 2, img.height() == max ? 0 : ( max - img.height() ) / 2 ), img ); - painter.setCompositionMode(QPainter::CompositionMode_DestinationOut); + painter.setCompositionMode(QPainter::CompositionMode_SourceAtop); QFont font = painter.font(); //the text should be a little smaller than the icon diff --git a/dictionary.hh b/dictionary.hh index cf984210..6f266b6a 100644 --- a/dictionary.hh +++ b/dictionary.hh @@ -56,7 +56,9 @@ class Request: public QObject Q_OBJECT public: - + Request( QObject * parent = nullptr ) : QObject( parent ) + { + } /// Returns whether the request has been processed in full and finished. /// This means that the data accumulated is final and won't change anymore. bool isFinished(); @@ -177,7 +179,6 @@ class DataRequest: public Request Q_OBJECT public: - /// Returns the number of bytes read, with a -1 meaning that so far it's /// uncertain whether resource even exists or not, and any non-negative value /// meaning that that amount of bytes is not available. @@ -194,7 +195,9 @@ public: /// done, this can only be called after the request has finished. vector< char > & getFullData() ; - DataRequest(): hasAnyData( false ) {} + DataRequest( QObject * parent = 0 ) : Request( parent ), hasAnyData( false ) + { + } protected: @@ -276,7 +279,7 @@ protected: // Load icon from filename directly if isFullName == true // else treat filename as name without extension bool loadIconFromFile( QString const & filename, bool isFullName = false ); - bool loadIconFromText( QString const & text ); + bool loadIconFromText( QString iconUrl, QString const & text ); QString getAbbrName( QString const & text ); diff --git a/dsl.cc b/dsl.cc index a873f6bb..e6270411 100644 --- a/dsl.cc +++ b/dsl.cc @@ -1100,7 +1100,9 @@ string DslDictionary::nodeToHtml( ArticleDom::Node const & node ) url.setScheme( "gdlookup" ); url.setHost( "localhost" ); - url.setPath( Utils::Url::ensureLeadingSlash( gd::toQString( node.renderAsText() ) ) ); + wstring nodeStr = node.renderAsText(); + normalizeHeadword( nodeStr ); + url.setPath( Utils::Url::ensureLeadingSlash( gd::toQString( nodeStr ) ) ); if( !node.tagAttrs.empty() ) { QString attr = gd::toQString( node.tagAttrs ).remove( '\"' ); diff --git a/epwing.cc b/epwing.cc index bdb1d28b..e1e5647e 100644 --- a/epwing.cc +++ b/epwing.cc @@ -429,28 +429,6 @@ void EpwingDictionary::getArticleText( uint32_t articleAddress, QString & headwo /// EpwingDictionary::getArticle() -class EpwingArticleRequest; - -class EpwingArticleRequestRunnable: public QRunnable -{ - EpwingArticleRequest & r; - QSemaphore & hasExited; - -public: - - EpwingArticleRequestRunnable( EpwingArticleRequest & r_, - QSemaphore & hasExited_ ): r( r_ ), - hasExited( hasExited_ ) - {} - - ~EpwingArticleRequestRunnable() - { - hasExited.release(); - } - - virtual void run(); -}; - class EpwingArticleRequest: public Dictionary::DataRequest { friend class EpwingArticleRequestRunnable; @@ -476,7 +454,11 @@ public: // new EpwingArticleRequestRunnable( *this, hasExited ) ); } - void run(); // Run from another thread by EpwingArticleRequestRunnable + void run(); + + void getBuiltInArticle(wstring const & word_, QVector< int > & pages, + QVector< int > & offsets, + multimap< wstring, pair< string, string > > & mainArticles ); virtual void cancel() { @@ -491,11 +473,6 @@ public: } }; -void EpwingArticleRequestRunnable::run() -{ - r.run(); -} - void EpwingArticleRequest::run() { if ( Utils::AtomicInt::loadAcquire( isCancelled ) ) @@ -509,7 +486,6 @@ void EpwingArticleRequest::run() for( unsigned x = 0; x < alts.size(); ++x ) { /// Make an additional query for each alt - vector< WordArticleLink > altChain = dict.findArticles( alts[ x ], ignoreDiacritics ); chain.insert( chain.end(), altChain.begin(), altChain.end() ); @@ -577,44 +553,10 @@ void EpwingArticleRequest::run() } // Also try to find word in the built-in dictionary index - try - { - string headword, articleText; - - QVector< int > pg, off; - { - Mutex::Lock _( dict.eBook.getLibMutex() ); - dict.eBook.getArticlePos( gd::toQString( word ), pg, off ); - } - - for( int i = 0; i < pg.size(); i++ ) - { - bool already = false; - for( int n = 0; n < pages.size(); n++ ) - { - if( pages.at( n ) == pg.at( i ) - && abs( offsets.at( n ) - off.at( i ) ) <= 4 ) - { - already = true; - break; - } - } - - if( !already ) - { - dict.loadArticle( pg.at( i ), off.at( i ), headword, articleText ); - - mainArticles.insert( pair< wstring, pair< string, string > >( - Folding::applySimpleCaseOnly( Utf8::decode( headword ) ), - pair< string, string >( headword, articleText ) ) ); - - pages.append( pg.at( i ) ); - offsets.append( off.at( i ) ); - } - } - } - catch(...) + getBuiltInArticle(word, pages, offsets, mainArticles ); + for( unsigned x = 0; x < alts.size(); ++x ) { + getBuiltInArticle( alts[ x ], pages, offsets, alternateArticles ); } if ( mainArticles.empty() && alternateArticles.empty() ) @@ -657,6 +599,51 @@ void EpwingArticleRequest::run() finish(); } +void EpwingArticleRequest::getBuiltInArticle( wstring const & word_, + QVector< int > & pages, + QVector< int > & offsets, + multimap< wstring, pair< string, string > > & mainArticles ) +{ + try + { + string headword, articleText; + + QVector< int > pg, off; + { + Mutex::Lock _( dict.eBook.getLibMutex() ); + dict.eBook.getArticlePos( gd::toQString( word_ ), pg, off ); + } + + for( int i = 0; i < pg.size(); i++ ) + { + bool already = false; + for( int n = 0; n < pages.size(); n++ ) + { + if( pages.at( n ) == pg.at( i ) && abs( offsets.at( n ) - off.at( i ) ) <= 4 ) + { + already = true; + break; + } + } + + if( !already ) + { + dict.loadArticle( pg.at( i ), off.at( i ), headword, articleText ); + + mainArticles.insert( + pair< wstring, pair< string, string > >( Folding::applySimpleCaseOnly( Utf8::decode( headword ) ), + pair< string, string >( headword, articleText ) ) ); + + pages.append( pg.at( i ) ); + offsets.append( off.at( i ) ); + } + } + } + catch( ... ) + { + } +} + sptr< Dictionary::DataRequest > EpwingDictionary::getArticle( wstring const & word, vector< wstring > const & alts, wstring const &, diff --git a/fulltextsearch.cc b/fulltextsearch.cc index 311859bc..002f5f95 100644 --- a/fulltextsearch.cc +++ b/fulltextsearch.cc @@ -126,6 +126,72 @@ QString FtsIndexing::nowIndexingName() return nowIndexing; } +void addSortedHeadwords( QList< FtsHeadword > & base_list, QList< FtsHeadword > const & add_list) +{ + QList< FtsHeadword > list; + + if( add_list.isEmpty() ) + return; + + if( base_list.isEmpty() ) + { + base_list = add_list; + return; + } + + list.reserve( base_list.size() + add_list.size() ); + + QList< FtsHeadword >::iterator base_it = base_list.begin(); + QList< FtsHeadword >::const_iterator add_it = add_list.constBegin(); + + while( base_it != base_list.end() || add_it != add_list.end() ) + { + if( base_it == base_list.end() ) + { + while( add_it != add_list.end() ) + { + list.append( *add_it ); + ++add_it; + } + break; + } + + if( add_it == add_list.end() ) + { + while( base_it != base_list.end() ) + { + list.append( *base_it ); + ++base_it; + } + break; + } + + if( *add_it < *base_it ) + { + list.append( *add_it ); + ++add_it; + } + else if( *add_it == *base_it ) + { + base_it->dictIDs.append( add_it->dictIDs ); + for( QStringList::const_iterator itr = add_it->foundHiliteRegExps.constBegin(); + itr != add_it->foundHiliteRegExps.constEnd(); ++itr ) + { + if( !base_it->foundHiliteRegExps.contains( *itr ) ) + base_it->foundHiliteRegExps.append( *itr ); + } + ++add_it; + } + else + { + list.append( *base_it ); + ++base_it; + } + } + + base_list.swap( list ); +} + FullTextSearchDialog::FullTextSearchDialog( QWidget * parent, Config::Class & cfg_, std::vector< sptr< Dictionary::Class > > const & dictionaries_, @@ -405,6 +471,7 @@ void FullTextSearchDialog::accept() void FullTextSearchDialog::searchReqFinished() { + QList< FtsHeadword > allHeadwords; while ( searchReqs.size() ) { std::list< sptr< Dictionary::DataRequest > >::iterator it; @@ -421,13 +488,14 @@ void FullTextSearchDialog::searchReqFinished() QList< FtsHeadword > * headwords; if( (unsigned)(*it)->dataSize() >= sizeof( headwords ) ) { + QList< FtsHeadword > hws; try { (*it)->getDataSlice( 0, sizeof( headwords ), &headwords ); - model->addResults( QModelIndex(), *headwords ); + hws.swap( *headwords ); + std::sort( hws.begin(), hws.end() ); delete headwords; - ui.articlesFoundLabel->setText( tr( "Articles found: " ) - + QString::number( results.size() ) ); + addSortedHeadwords( allHeadwords, hws ); } catch( std::exception & e ) { @@ -449,6 +517,14 @@ void FullTextSearchDialog::searchReqFinished() else break; } + + if( !allHeadwords.isEmpty() ) + { + model->addResults( QModelIndex(), allHeadwords ); + ui.articlesFoundLabel->setText( tr( "Articles found: " ) + + QString::number( results.size() ) ); + } + if ( searchReqs.empty() ) { ui.searchProgressBar->hide(); @@ -608,27 +684,7 @@ void HeadwordsListModel::addResults(const QModelIndex & parent, QList< FtsHeadwo Q_UNUSED( parent ); beginResetModel(); - QList< FtsHeadword > temp; - - for( int x = 0; x < hws.length(); x++ ) - { - QList< FtsHeadword >::iterator it = std::lower_bound( headwords.begin(), headwords.end(), hws.at( x ) ); - if( it != headwords.end() && *it == hws.at( x ) ) - { - it->dictIDs.push_back( hws.at( x ).dictIDs.front() ); - for( QStringList::const_iterator itr = it->foundHiliteRegExps.constBegin(); - itr != it->foundHiliteRegExps.constEnd(); ++itr ) - { - if( !it->foundHiliteRegExps.contains( *itr ) ) - it->foundHiliteRegExps.append( *itr ); - } - } - else - temp.append( hws.at( x ) ); - } - - headwords.append( temp ); - std::sort( headwords.begin(), headwords.end() ); + addSortedHeadwords( headwords, hws ); endResetModel(); emit contentChanged(); diff --git a/goldendict.pro b/goldendict.pro index 07982be3..b23f6a35 100644 --- a/goldendict.pro +++ b/goldendict.pro @@ -1,6 +1,6 @@ TEMPLATE = app TARGET = goldendict -VERSION = 22.8.23-EndOfHeat +VERSION = 22.8.24-alpha # Generate version file. We do this here and in a build rule described later. # The build rule is required since qmake isn't run each time the project is @@ -69,19 +69,18 @@ CONFIG += exceptions \ stl \ c++17 \ lrelease \ - embed_translations \ utf8_source \ force_debug_info mac { - DEBUG:CONFIG += app_bundle + CONFIG += app_bundle } - -QM_FILES_RESOURCE_PREFIX = /locale/ + +QM_FILES_INSTALL_PATH = /locale/ OBJECTS_DIR = build UI_DIR = build MOC_DIR = build -#RCC_DIR = build +RCC_DIR = build LIBS += -lz \ -lbz2 \ -llzo2 @@ -90,7 +89,8 @@ win32 { TARGET = GoldenDict win32-msvc* { - VERSION = 22.8.23 # VS does not recognize 22.number.alpha,cause errors during compilation under MSVC++ + # VS does not recognize 22.number.alpha,cause errors during compilation under MSVC++ + VERSION = 22.8.24 DEFINES += __WIN32 _CRT_SECURE_NO_WARNINGS contains(QMAKE_TARGET.arch, x86_64) { DEFINES += NOMINMAX __WIN64 @@ -138,7 +138,9 @@ win32 { CONFIG += chinese_conversion_support } } - +!CONFIG( no_macos_universal ) { + DEFINES += INCLUDE_LIBRARY_PATH +} unix:!mac { DEFINES += HAVE_X11 @@ -202,8 +204,8 @@ mac { -lvorbisfile \ -lvorbis \ -logg \ - -lhunspell \ -llzo2 + !CONFIG( no_ffmpeg_player ) { LIBS += -lao \ -lswresample \ @@ -211,21 +213,40 @@ mac { -lavformat \ -lavcodec } - QT_CONFIG -= no-pkg-config + QT_CONFIG -= no-pkg-config CONFIG += link_pkgconfig + + +!CONFIG( no_macos_universal ) { + LIBS+= -lhunspell INCLUDEPATH = $${PWD}/maclibs/include LIBS += -L$${PWD}/maclibs/lib -framework AppKit -framework Carbon +} +else{ + PKGCONFIG += hunspell + INCLUDEPATH = /opt/homebrew/include /usr/local/include + LIBS += -L/opt/homebrew/lib -L/usr/local/lib -framework AppKit -framework Carbon +} + OBJECTIVE_SOURCES += lionsupport.mm \ machotkeywrapper.mm \ macmouseover.mm \ speechclient_mac.mm ICON = icons/macicon.icns QMAKE_INFO_PLIST = myInfo.plist + +!CONFIG( no_macos_universal ) { QMAKE_POST_LINK = mkdir -p GoldenDict.app/Contents/Frameworks && \ cp -nR $${PWD}/maclibs/lib/ GoldenDict.app/Contents/Frameworks/ && \ mkdir -p GoldenDict.app/Contents/MacOS/help && \ cp -R $${PWD}/help/*.qch GoldenDict.app/Contents/MacOS/help/ - +} +else{ + QMAKE_POST_LINK = mkdir -p GoldenDict.app/Contents/Frameworks && \ + cp -nR $${PWD}/maclibs/lib/libeb.dylib GoldenDict.app/Contents/Frameworks/ && \ + mkdir -p GoldenDict.app/Contents/MacOS/help && \ + cp -R $${PWD}/help/*.qch GoldenDict.app/Contents/MacOS/help/ +} !CONFIG( no_chinese_conversion_support ) { CONFIG += chinese_conversion_support QMAKE_POST_LINK += && mkdir -p GoldenDict.app/Contents/MacOS/opencc && \ @@ -563,12 +584,14 @@ CONFIG( chinese_conversion_support ) { } RESOURCES += resources.qrc \ + scripts.qrc \ flags.qrc #EXTRA_TRANSLATIONS += thirdparty/qwebengine_ts/qtwebengine_zh_CN.ts TRANSLATIONS += locale/ru_RU.ts \ locale/zh_CN.ts \ locale/cs_CZ.ts \ locale/de_DE.ts \ + locale/de_CH.ts \ locale/el_GR.ts \ locale/bg_BG.ts \ locale/ar_SA.ts \ @@ -604,13 +627,38 @@ TRANSLATIONS += locale/ru_RU.ts \ locale/jb_JB.ts \ locale/hi_IN.ts \ locale/ie_001.ts - # Build version file !isEmpty( hasGit ) { PRE_TARGETDEPS += $$PWD/version.txt } +# This makes qmake generate translations +isEmpty(QMAKE_LRELEASE):QMAKE_LRELEASE = $$[QT_INSTALL_BINS]/lrelease + + +# The *.qm files might not exist when qmake is run for the first time, +# causing the standard install rule to be ignored, and no translations +# will be installed. With this, we create the qm files during qmake run. +!win32 { + system($${QMAKE_LRELEASE} -silent $${_PRO_FILE_} 2> /dev/null) +} +else{ + system($${QMAKE_LRELEASE} -silent $${_PRO_FILE_}) +} + +updateqm.input = TRANSLATIONS +updateqm.output = locale/${QMAKE_FILE_BASE}.qm +updateqm.commands = $$QMAKE_LRELEASE \ + ${QMAKE_FILE_IN} \ + -qm \ + ${QMAKE_FILE_OUT} +updateqm.CONFIG += no_link +QMAKE_EXTRA_COMPILERS += updateqm +TS_OUT = $$TRANSLATIONS +TS_OUT ~= s/.ts/.qm/g +PRE_TARGETDEPS += $$TS_OUT + include( thirdparty/qtsingleapplication/src/qtsingleapplication.pri ) diff --git a/help/gdhelp_en.qch b/help/gdhelp_en.qch index 0a7adff0..2b8e76d4 100644 Binary files a/help/gdhelp_en.qch and b/help/gdhelp_en.qch differ diff --git a/help/gdhelp_ru.qch b/help/gdhelp_ru.qch index a521a9c4..f6810750 100644 Binary files a/help/gdhelp_ru.qch and b/help/gdhelp_ru.qch differ diff --git a/helpwindow.cc b/helpwindow.cc index fb81d04d..040e766d 100644 --- a/helpwindow.cc +++ b/helpwindow.cc @@ -113,6 +113,10 @@ HelpWindow::HelpWindow( QWidget * parent, Config::Class & cfg_ ) : helpEngine = new QHelpEngine( helpCollectionFile ); +#if (QT_VERSION > QT_VERSION_CHECK(6,0,0)) + helpEngine->setReadOnly( false ); +#endif + if( !helpEngine->setupData() ) { gdWarning( "Help engine initialization error: %s", helpEngine->error().toUtf8().data() ); diff --git a/hunspell.cc b/hunspell.cc index 70cb9d45..eb483b3b 100644 --- a/hunspell.cc +++ b/hunspell.cc @@ -23,7 +23,11 @@ #include #include +#ifndef INCLUDE_LIBRARY_PATH +#include +#else #include +#endif #include "gddebug.hh" #include "fsencoding.hh" #include "utils.hh" diff --git a/iframeschemehandler.cpp b/iframeschemehandler.cpp index 63d6d081..03689e7f 100644 --- a/iframeschemehandler.cpp +++ b/iframeschemehandler.cpp @@ -19,22 +19,29 @@ void IframeSchemeHandler::requestStarted(QWebEngineUrlRequestJob *requestJob) auto finishAction = [ = ]() -> void { - QByteArray contentType = "text/html;charset=UTF-8"; + QByteArray contentType = "text/html"; QBuffer * buffer = new QBuffer( requestJob ); - // Handle reply data - if( reply->error() != QNetworkReply::NoError ) - { - QString emptyHtml = QString( "%1" ).arg( reply->errorString() ); - buffer->setData( emptyHtml.toUtf8() ); - requestJob->reply( contentType, buffer ); - return; - } + QByteArray replyData = reply->readAll(); QString articleString; QTextCodec * codec = QTextCodec::codecForHtml( replyData, QTextCodec::codecForName( "UTF-8" ) ); articleString = codec->toUnicode( replyData ); + // Handle reply data + // 404 response may have response body. + if( reply->error() != QNetworkReply::NoError && articleString.isEmpty()) + { + if(reply->error()==QNetworkReply::ContentNotFoundError){ + //work around to fix QTBUG-106573 + requestJob->redirect(url); + return; + } + QString emptyHtml = QString( "%1" ).arg( reply->errorString() ); + buffer->setData( emptyHtml.toUtf8() ); + requestJob->reply( contentType, buffer ); + return; + } // Change links from relative to absolute @@ -45,6 +52,10 @@ void IframeSchemeHandler::requestStarted(QWebEngineUrlRequestJob *requestJob) QRegularExpression::CaseInsensitiveOption | QRegularExpression::DotMatchesEverythingOption ); QString baseTagHtml = ""; + + QString depressionFocus ="" + "" + ""; // remove existed base tag articleString.remove( baseTag ) ; @@ -56,12 +67,14 @@ void IframeSchemeHandler::requestStarted(QWebEngineUrlRequestJob *requestJob) if( match.hasMatch() ) { articleString.insert( match.capturedEnd(), baseTagHtml ); + articleString.insert( match.capturedEnd(), depressionFocus ); } else { // the html contain no head element // just insert at the beginning of the html ,and leave it at the mercy of browser(chrome webengine) articleString.insert( 0, baseTagHtml ); + articleString.insert( 0, depressionFocus ); } buffer->setData(codec->fromUnicode(articleString)); diff --git a/locale/de_CH.ts b/locale/de_CH.ts new file mode 100644 index 00000000..28cd3e81 --- /dev/null +++ b/locale/de_CH.ts @@ -0,0 +1,5164 @@ + + + + + About + + + About + Über + + + + GoldenDict dictionary lookup program, version + GoldenDict Programm-Version: + + + + (c) 2008-2013 Konstantin Isakov (ikm@goldendict.org) + (c) 2008-2013 Konstantin Isakov (ikm@goldendict.org) + + + + Credits: + Danksagungen: + + + + Licensed under GNU GPLv3 or later + Lizensiert unter der GNU GPLv3 oder neuer. + + + + [Unknown] + [Unbekannt] + + + + Based on Qt %1 (%2, %3 bit) + Basiert auf Qt %1 (%2, %3 bit) + + + + AnkiConnector + + + anki: post to anki failed + Anki: Anfrage zu Anki schlug fehl + + + + anki: post to anki success + Anki: Anfrage zu Anki war erfolgreich + + + + ArticleInspector + + + Inspect + Überprüfen + + + + ArticleMaker + + + Expand article + Artikel aufklappen + + + + Collapse article + Artikel einklappen + + + + No translation for <b>%1</b> was found in group <b>%2</b>. + In <b>%2</b> wurde kein Eintrag für <b>%1</b> gefunden. + + + + No translation was found in group <b>%1</b>. + Kein Eintrag, Übersetzung in Gruppe <b>%1</b> gefunden. + + + + Welcome! + Willkommen + + + + <h3 align="center">Welcome to <b>GoldenDict</b>!</h3><p>To start working with the program, first visit <b>Edit|Dictionaries</b> to add some directory paths where to search for the dictionary files, set up various Wikipedia sites or other sources, adjust dictionary order or create dictionary groups.<p>And then you're ready to look up your words! You can do that in this window by using a pane to the left, or you can <a href="Working with popup">look up words from other active applications</a>. <p>To customize program, check out the available preferences at <b>Edit|Preferences</b>. All settings there have tooltips, be sure to read them if you are in doubt about anything.<p>Should you need further help, have any questions, suggestions or just wonder what the others think, you are welcome at the program's <a href="http://goldendict.org/forum/">forum</a>.<p>Check program's <a href="http://goldendict.org/">website</a> for the updates. <p>(c) 2008-2013 Konstantin Isakov. Licensed under GPLv3 or later. + <h3 <h3 align="center">Willkommen zu <b>GoldenDict</b></h2><p>Das sind die ersten Schritte um mit dem Programm arbeiten zu können. <p> Gehen Sie zunächst auf <b>Bearbeiten » Wörterbücher...</b> um die Pfade zu abgespeicherten Wörterbüchern hinzuzufügen sowie um Wikipedia und andere Seiten einzurichten oder die Wörterbücher anzuordnen bzw. in Gruppen zu unterteilen.</p> +<p>Nun sind Sie bereit das erste Wort nachzuschlagen. Dies können Sie im Eingabe-Fenster machen oder <a href="Mit Popups arbeiten">mittels der Popup-Funktion in anderen Applikationen.</a></p> +<p>Um das Programm anzupassen öffnen Sie <b>Bearbeiten » Einstellungen...</b><br />Viele Einstellungen sind auch mit Tipps versehen.</p> +<p>Hilfe, Fragen und Antworten dazu finden Sie im archvierten <a href="http://goldendict.org/forum/">Forum</a>.<br />Programm Updates finden sind auf der Webseite <a href="https://sourceforge.net/projects/goldendict/">GoldenDict</a> und den weiterhin gepflegten Source auf <a href="https://github.com/goldendict/goldendict/">GoldenDict Source</a>. +<br />(c) 2008-2013 Konstantin Isakov. Lizensiert unter der GPLv3 oder neuer.<p></p> +<BODY> +<DIV><B><SPAN style="COLOR: red"> +<HR> +</SPAN></B></DIV> +<DIV><SPAN style="COLOR: red">Seit 2021: <br />Ein neuer Fork von XIAO, mit z.B. einer OCR Erkennung mittels dem externen Hilfsprogramm <a href="https://sourceforge.net/projects/capture2text/">Capture2Text</a> und +vielen anderen Optimierungen, finden Sie auf der </SPAN><SPAN style="COLOR: red"><A +href="https://github.com/xiaoyifang/goldendict/">Webseite von XIAO.</A><FONT color=#000000> + +<HR> + + + + + Working with popup + Mit Popups arbeiten + + + + <h3 align="center">Working with the popup</h3>To look up words from other active applications, you would need to first activate the <i>"Scan popup functionality"</i> in <b>Preferences</b>, and then enable it at any time either by triggering the 'Popup' icon above, or by clicking the tray icon down below with your right mouse button and choosing so in the menu you've popped. + <h3 align="center">Mit Popups arbeiten</h3>Um Wörter von anderen aktiven Applikationen nachzuschlagen, muss zunächst die <i>"Scan Popup Funktionalität"</i> unter <b>Bearbeiten » Einstellungen...</b> aktiviert werden. <br /> +Dies kann zu jeder Zeit über das "Popup-Symbol" in der Werkzeugleiste oder mittels Kontextmenü des Symboles in der Symbolleiste geschehen.<br /> + + + + Then just stop the cursor over the word you want to look up in another application, and a window would pop up which would describe it to you. + Dann einfach mit dem Mauszeiger über das Wort in der Applikation fahren, welches nachgeschlagen werden soll. Ein Fenster wird danach sichtbar mit der gefundenen Übersetzung. + + + + Then just select any word you want to look up in another application by your mouse (double-click it or swipe it with mouse with the button pressed), and a window would pop up which would describe the word to you. + Dann einfach ein Wort mit der Maus (Doppelklicken oder bei gedrückten Tasten darüberfahren) markieren, welches nachgeschlagen werden soll. Dann öffnet sich ein Popup, welches das Wort beschreibt. + + + + (untitled) + (unbenannt) + + + + (picture) + (Bild) + + + + ArticleRequest + + + Expand article + Artikel aufklappen + + + + From + Von + + + + Collapse article + Artikel einklappen + + + + Query error: %1 + Abfragefehler: %1 + + + + Close words: + Ähnliche Wörter: + + + + Compound expressions: + Zusammengesetzte Treffer: + + + + Individual words: + Einzelne Wörter: + + + + ArticleView + + + Select Current Article + Aktuellen Artikel auswählen + + + + Copy as text + Als Text kopieren + + + + Inspect + Betrachten + + + + Resource + Ressource + + + + Audio + Audio + + + + TTS Voice + TTS Stimme + + + + Picture + Bild + + + + Definition from dictionary "%1": %2 + Definition vom Wörterbuch "%1": %2 + + + + Definition: %1 + Definition: %1 + + + + + The referenced resource doesn't exist. + Die angegebene Ressource existiert nicht. + + + + The referenced audio program doesn't exist. + Das angegebene Audioprogramm existiert nicht. + + + + + + ERROR: %1 + FEHLER: %1 + + + + Save sound + Klang speichern + + + + Save image + Bild speichern + + + + Image files (*.bmp *.jpg *.png *.tif);;All files (*.*) + Bilder (*.bmp *.jpg *.png *.tif);;Alle Dateien (*.*) + + + + &Open Link + &Link öffnen + + + + Phrase not found + Satz nicht gefunden + + + + %1 of %2 matches + %1 von %2 übereinstimmen + + + + Video + Video + + + + Video: %1 + Video: %1 + + + + Open Link in New &Tab + Link in neuem Rei&ter öffnen + + + + Open Link in &External Browser + Link in &externen Browser öffnen + + + + &Look up "%1" + &Schlage "%1" nach + + + + Look up "%1" in &New Tab + Schlage "%1" in &neuem Tab nach + + + + Send "%1" to input line + Sende "%1" an die Eingabezeile + + + + + &Add "%1" to history + Füge "%1" zum Verlauf &hinzu + + + + Look up "%1" in %2 + Schlage "%1" in %2 nach + + + + Look up "%1" in %2 in &New Tab + Schlage "%1" in %2 in &neuem Tab nach + + + + Save &Bookmark "%1..." + Speichere &Lesezeichen "%1..." + + + + &Send "%1" to anki with selected text. + Übermittle "%1" zu Anki mit selektiertem Text. + + + + Sound files (*.wav *.ogg *.oga *.mp3 *.mp4 *.aac *.flac *.mid *.wv *.ape);;All files (*.*) + Audio Dateien (*.wav *.ogg *.oga *.mp3 *.mp4 *.aac *.flac *.mid *.wv *.ape);;All files (*.*) + + + + WARNING: Audio Player: %1 + WARNUNG: Audio Player: %1 + + + + Failed to create temporary file. + Konnte keine temporäre Datei anlegen. + + + + Failed to auto-open resource file, try opening manually: %1. + Konnte die Ressource nicht automatisch öffnen; versuchen Sie es manuell: %1. + + + + The referenced resource failed to download. + Die angegebene Ressource konnte nicht heruntergeladen werden. + + + + Save &image... + Bild &speichern... + + + + Save s&ound... + &Klang speichern... + + + + Failed to play sound file: %1 + Konnte folgende Audio Datei nicht abspielen: %1 + + + + WARNING: %1 + WARNUNG: %1 + + + + Form + Formular + + + + about:blank + about:blank + + + + x + x + + + + Find: + Suche: + + + + + &Previous + &Vorheriger + + + + + &Next + &Nächster + + + + Ctrl+G + CTRL+G + + + + &Case Sensitive + &Gross und Kleinschreibung beachten + + + + Highlight &all + &Alles hervorheben + + + + BelarusianTranslit + + + Belarusian transliteration from latin to cyrillic (classic orthography) + Weissrussische Transliteration von latein nach kyrillisch (klassische Rechtschreibung) + + + + Belarusian transliteration from latin to cyrillic (school orthography) + Weissrussische Transliteration von latein nach kyrillisch (Schulrechtschreibung) + + + + Belarusian transliteration (smoothes out the difference +between classic and school orthography in cyrillic) + Weissrussische Transliteration (glättet die Unterschiede zwischen klassischer und Schulrechtschreibung im kyrillischen) + + + + ChineseConversion + + + Chinese Conversion + Chinesische Konvertierung + + + + Enable conversion between simplified and traditional Chinese characters + Aktiviere Konvertierung zwischen Chinesischen Charakterzeichen Simpel (SC) und Traditionell (TC). + + + + Chinese Con&version + Chinesische Konvertierung (SC=Simpel, TC=Traditionell) + + + + Enable conversion from simplified characters to traditional (Taiwan variant) characters + Aktiviere Konvertierung von Chinesischen Charakterzeichen Simpel zu Traditionell (Taiwan). + + + + SC to TC (Taiwan variant) + SC zu TC (Taiwan) + + + + Enable conversion from simplified characters to traditional (Hong Kong variant) characters + Aktiviere Konvertierung von Chinesischen Charakterzeichen Simpel zu Traditionell (Hongkong). + + + + SC to TC (Hong Kong variant) + SC zu TC (Hongkong) + + + + Enable conversion from traditional characters to simplified characters + Aktiviere Konvertierung von Chinesischen Charakterzeichen Traditionell zu Simpel. + + + + TC to SC + TC zu SC + + + + Simplified to traditional Chinese (Taiwan variant) conversion + Konvertierung von Chinesischen Charakterzeichen Simpel zu Traditionell (Hongkong). + + + + Simplified to traditional Chinese (Hong Kong variant) conversion + Konvertierung von Chinesischen Charakterzeichen Simpel zu Traditionell (Hongkong). + + + + Traditional to simplified Chinese conversion + Konvertierung von Chinesischen Charakterzeichen Traditionell (TC) zu Simpel (SC). + + + + Dialog + + + Proxy authentication required + Proxy Authentifizierung erforderlich + + + + You need to supply a Username and a Password to access via proxy + Sie müssen Benutzernamen und Passwort eingeben für den Proxy Zugang + + + + Username: + Benutzername: + + + + Password: + Passwort: + + + + DictGroupWidget + + + Form + Formular + + + + Group icon: + Gruppensymbol: + + + + Shortcut: + Tastenkürzel: + + + + Favorites folder: + Lesezeichen Ordner: + + + + None + Keines + + + + From file... + Aus Datei... + + + + Choose a file to use as group icon + Wählen Sie eine Datei als Gruppensymbol + + + + Images + Bilder + + + + All files + Alle Dateien + + + + Error + Fehler + + + + Can't read the specified image file. + Konnte die angegebene Bilddatei nicht lesen. + + + + DictGroupsWidget + + + + + + Dictionaries: + Anzahl Wörterbücher: + + + + Confirmation + Bestätigung + + + + Are you sure you want to generate a set of groups based on language pairs? + Möchten Sie wirklich eine Reihe von Gruppen basierend auf den Sprachpaaren erstellen? + + + + Unassigned + Nicht zugeordnet + + + + Combine groups by source language to "%1->" + Kombiniere Gruppen nach Quellsprache nach "%1->" + + + + Combine groups by target language to "->%1" + Kombiniere Gruppen nach Zielsprache nach "%1->" + + + + Make two-side translate group "%1-%2-%1" + Doppelseitige Übersetzungsgruppen erstellen: "%1-%2-%1" + + + + + Combine groups with "%1" + Gruppen kombinieren mit "%1" + + + + DictHeadwords + + + Search mode + Suchmodus + + + + This element determines how filter string will be interpreted + Dieses Element definiert wie der Filter interpretiert wird + + + + If checked on the symbols case will be take in account when filtering + Falls Symbole aktiviert, wird das Ergebnis in die Filter Berechnung miteinbezogen + + + + Match case + Vergleich Ergebnis + + + + Exports headwords to file + Stichwörter in Datei exportieren + + + + Export + Exportieren + + + + Help + Hilfe + + + + OK + OK + + + + Press this button to apply filter to headwords list + Knopf drücken um den Suchfilter auf die Stichwortliste anzuwenden + + + + Apply + Anwenden + + + + If checked any filter changes will we immediately applied to headwords list + Falls aktiviert, wird das Ergebnis des Suchfilters ständig aktuell gehalten. + + + + Auto apply + Auto-Filter + + + + Filter: + Suchfilter: + + + + Filter string (fixed string, wildcards or regular expression) + Suchfilter eingeben (als feststehende Zeichenfolge, Wildcards oder regulären Ausdruck) + + + + Text + Text + + + + Wildcards + Beliebige Zeichen + + + + RegExp + RegExp + + + + Unique headwords total: %1, filtered: %2 + Unterschiedliche Stichwörter insgesamt: %1, gefiltert: %2 + + + + Save headwords to file + Stichwörter in Datei speichern + + + + Text files (*.txt);;All files (*.*) + Textdateien(*.txt);;Alle Dateien(*.*) + + + + Export headwords... + Stichwörter exportieren... + + + + Cancel + Abbrechen + + + + DictInfo + + + Total articles: + Artikel gesamt: + + + + Translates from: + Übersetzt von: + + + + Total words: + Wörter gesamt: + + + + Translates to: + Übersetzt nach: + + + + Open folder + Ordner öffnen + + + + Edit dictionary + Wörterbuch bearbeiten + + + + Files comprising this dictionary: + Wörterbuch zusammengesetzt aus diesen Dateien: + + + + Description: + Beschreibung: + + + + Show all unique dictionary headwords + Zeige alle Stichwörter des Wörterbuches + + + + Headwords + Stichwörter + + + + Edit the dictionary via command: +%1 + Das Wörterbuch mit folgendem Zeilenkommando bearbeiten: +%1 + + + + DictListModel + + + %1 entries + %1 Einträge + + + + DictServer + + + Url: + Url: + + + + Databases: + Datenbanken: + + + + Search strategies: + Suchplanungen: + + + + Server databases + Server Datenbanken + + + + DictServersModel + + + Enabled + Aktiviert + + + + Name + Name + + + + Address + Adresse + + + + Databases + Datenbanken + + + + Strategies + Planungen + + + + Icon + Symbol + + + + Comma-delimited list of databases +(empty string or "*" matches all databases) + Komma geteilte Liste von Datenbanken (leeres Zeichen oder "*" wählt alle Datenbanken) + + + + Comma-delimited list of search strategies +(empty string mean "prefix" strategy) + Komma geteilte Liste von Datenplanungen (leeres Zeichen oder "*" wählt alle Datenbanken) + + + + DictionaryBar + + + &Dictionary Bar + &Wörterbuchleiste + + + + Extended menu with all dictionaries... + Erweitertes Menü mit allen Wörterbüchern... + + + + Edit this group + Diese Gruppe bearbeiten + + + + Dictionary info + Wörterbuchinfo + + + + Dictionary headwords + Wörterbuch Stichwörter + + + + Open dictionary folder + Wörterbuch-Ordner öffnen + + + + Edit dictionary + Wörterbuch bearbeiten + + + + EditDictionaries + + + &Sources + &Quellen + + + + + &Dictionaries + &Wörterbücher + + + + + &Groups + &Gruppen + + + + Sources changed + Quellen geändert + + + + Some sources were changed. Would you like to accept the changes? + Einige Quellen haben sich geändert. Möchten Sie die Änderungen akzeptieren? + + + + Accept + Übernehmen + + + + Cancel + Abbrechen + + + + Dictionaries + Wörterbücher + + + + ExternalViewer + + + the viewer program name is empty + Der Name des Betrachtungsprogrammes ist leer + + + + FTS::FullTextSearchDialog + + + Full-text search + Volltextsuche + + + + Whole words + Ganze Wörter + + + + Plain text + Nur Text + + + + Wildcards + Beliebige Zeichen + + + + RegExp + RegExp + + + + Max distance between words (%1-%2): + Max. Abstand zwischen Wörtern (%1-%2): + + + + Max articles per dictionary (%1-%2): + Max. Artikel pro Wörterbuch (%1-%2): + + + + + + Articles found: + Artikel gefunden: + + + + Now indexing: + Indexiere: + + + + None + Keine + + + CJK symbols in search string are not compatible with search modes "Whole words" and "Plain text" + CJK Symbole in der Suche sind nicht kompatibel mit Suchmodi "Ganze Wörter" und "Reiner Text" + + + + The search line must contains at least one word containing + Die Suchzeile muss zumindest ein Wort enthalten, bestehend aus + + + + or more symbols + oder mehr Zeichen + + + + No dictionaries for full-text search + Keine Wörterbücher für Volltextsuche + + + + FavoritesModel + + + Error in favorities file + Fehler in Lesezeichen Datei + + + + FavoritesPaneWidget + + + &Delete Selected + Ausgewählte &löschen + + + + Copy Selected + Ausgewählte kopieren + + + + Add folder + Ordner einfügen + + + + Favorites: + Lesezeichen: + + + + All selected items will be deleted. Continue? + Alle ausgewählten Einträge werden entfernt. Fortfahren? + + + + Forvo::ForvoArticleRequest + + + XML parse error: %1 at %2,%3 + Fehler beim XML parsen: %1 bei %2,%3 + + + + Added %1 + Hinzugefügt %1 + + + + by + von + + + + Male + Mann + + + + Female + Frau + + + + from + aus + + + + Go to Edit|Dictionaries|Sources|Forvo and apply for our own API key to make this error disappear. + Damit dieser Fehler verschwindet sollten Sie Bearbeiten » Wörterbücher » Forvo auswählen und ihren eigenen API-Schlüssel eintragen. + + + + FullTextSearchDialog + + + + Search + Volltextsuche + + + + Match case + Vergleiche Ergebnis + + + + Mode: + Modus: + + + + Ignore words order + Wortreihenfolge ignorieren + + + + Ignore diacritics + Diakritika ignorieren + + + + Articles found: + Gefundene Artikel: + + + + Available dictionaries in group: + Verfügbare Wörterbücher in Gruppe: + + + + Wait for indexing: + Warte auf Vergleichsergebnisse + + + + Total: + Gesamt: + + + + Indexed: + Indexiert: + + + + Now indexing: None + Indexiere aktuell: Keine + + + + Cancel + Abbrechen + + + + Help + Hilfe + + + + GermanTranslit + + + German Transliteration + Deutsche Transliteration + + + + GreekTranslit + + + Greek Transliteration + Griechische Transliteration + + + + GroupComboBox + + + Choose a Group (Alt+G) + Gruppe auswählen (ALT+G) + + + + Groups + + + Group tabs + Gruppen Reiter + + + + Open groups list + Öffne Gruppenliste + + + + Add group + Gruppe hinzufügen + + + + Give a name for the new group: + Geben Sie den Namen der neuen Gruppe ein: + + + + Rename group + Gruppe umbenennen + + + + Give a new name for the group: + Geben Sie den neuen Namen der Gruppe ein: + + + + Remove group + Gruppe entfernen + + + + Are you sure you want to remove the group <b>%1</b>? + Möchten Sie wirklich die Gruppe <b>%1</b> entfernen? + + + + + Remove all groups + Alle Gruppen entfernen + + + + Are you sure you want to remove all the groups? + Wollen Sie wirklich alle Gruppen entfernen? + + + + Dictionaries available: + Vorhandene Wörterbücher: + + + + Add selected dictionaries to group (Ins) + Ausgewählte Wörterbücher zur Gruppe hinzufügen (DEL). + + + + > + > + + + + Ins + INS + + + + Remove selected dictionaries from group (Del) + Ausgewählte Wörterbücher von der Gruppe entfernen (DEL). + + + + < + < + + + + Del + DEL + + + + Groups: + Gruppen: + + + + Tab 2 + Tab 2 + + + + Create new dictionary group + Eine neue Gruppe von Wörterbüchern erzeugen. + + + + &Add group + Gruppe &hinzufügen + + + + Create language-based groups + Erzeugt sprachenbasierte Gruppen. + + + + Auto groups + Automatische Gruppen + + + + Rename current dictionary group + Die ausgewählte Wörterbuchgruppe umbenennen. + + + + Re&name group + Gruppe &umbenennen + + + + Remove current dictionary group + Die ausgewählte Wörterbuchgruppe entfernen. + + + + &Remove group + Gruppe &entfernen + + + + Remove all dictionary groups + Alle Gruppen von Wörterbüchern entfernen. + + + + Drag&drop dictionaries to and from the groups, move them inside the groups, reorder the groups using your mouse. + Benutzen Sie Drag & Drop um Wörterbücher zwischen oder innerhalb von Gruppen zu verschieben oder um die Reihenfolge zu verändern. + + + + Help::HelpWindow + + + GoldenDict help + GoldenDict Hilfe + + + + Home + Startseite + + + + Back + Zurück + + + + Forward + Weiter + + + + Zoom In + Vergrössern + + + + Zoom Out + Verkleinern + + + + Normal Size + Normale Grösse + + + + Content + Inhalt + + + + Index + Index + + + + HistoryPaneWidget + + + &Delete Selected + Ausgewählte &löschen + + + + Copy Selected + Ausgewählte kopieren + + + + History: + Verlauf: + + + + %1/%2 + %1/%2 + + + + History size: %1 entries out of maximum %2 + Verlaufsgrösse: %1 von maximal %2 Einträgen + + + + Hunspell + + + Spelling suggestions: + Rechtschreibvorschläge: + + + + %1 Morphology + %1 Morphologie + + + + HunspellDictsModel + + + Enabled + Aktiv + + + + Name + Name + + + + Initializing + + + Please wait... + Bitte warten... + + + + + Please wait while indexing dictionary + Bitte warten Sie während die Wörterbücher initialisiert werden + + + + GoldenDict - Initializing + GoldenDict - Initialisierung + + + + Dictionary Name + Name des Wörterbuches + + + + Language + + + Afar + Afar + + + + Abkhazian + Abkhazisch + + + + Avestan + Avestan + + + + Afrikaans + Afrikaans + + + + Akan + Akan + + + + Amharic + Amharisch + + + + Aragonese + Aragonesisch + + + + Arabic + Arabisch + + + + Assamese + Assamesisch + + + + Avaric + Avarisch + + + + Aymara + Aymara + + + + Azerbaijani + Aserbaijanisch + + + + Bashkir + Baschkir + + + + Belarusian + Weissrussisch + + + + Bulgarian + Bulgarisch + + + + Bihari + Magahi + + + + Bislama + Bislama + + + + Bambara + Bambara + + + + Bengali + Bengali + + + + Tibetan + Tibetanisch + + + + Breton + Bretonisch + + + + Bosnian + Bosnisch + + + + Catalan + Katalanisch + + + + Chechen + Tschetschenisch + + + + Chamorro + Chamorro + + + + Corsican + Korsisch + + + + Cree + Cree + + + + Czech + Tschechisch + + + + Church Slavic + Kirchenslawisch + + + + Chuvash + Tschuwasch + + + + Welsh + Walisisch + + + + Danish + Dänisch + + + + German + Deutsch + + + + Divehi + Divehi + + + + Dzongkha + Dzongkha + + + + Ewe + Ewe + + + + Greek + Griechisch + + + + English + Englisch + + + + Esperanto + Esperanto + + + + Spanish + Spanisch + + + + Estonian + Estnisch + + + + Basque + Baskisch + + + + Persian + Persisch + + + + Fulah + Fulfulde + + + + Finnish + Finnisch + + + + Fijian + Fijianisch + + + + Faroese + Färöisch + + + + French + Französisch + + + + Western Frisian + Westfriesisch + + + + Irish + Irisch + + + + Scottish Gaelic + Schottisch-Gälisch + + + + Galician + Galizisch + + + + Guarani + Guaraní + + + + Gujarati + Gujarati + + + + Manx + Manx + + + + Hausa + Hausa + + + + Hebrew + Hebräisch + + + + Hindi + Hindi + + + + Hiri Motu + Hiri Motu + + + + Croatian + Kroatisch + + + + Haitian + Haitianisch + + + + Hungarian + Ungarisch + + + + Armenian + Armenisch + + + + Herero + Herero + + + + Interlingua + Interlingua + + + + Indonesian + Indonesisch + + + + Interlingue + Interlingue + + + + Igbo + Igbo + + + + Sichuan Yi + Sichuan Yi + + + + Inupiaq + Inupiaq + + + + Ido + Ido + + + + Icelandic + Isländisch + + + + Italian + Italienisch + + + + Inuktitut + Inuktitut + + + + Japanese + Japanisch + + + + Javanese + Javanisch + + + + Georgian + Georgisch + + + + Kongo + Kongo + + + + Kikuyu + Kikuyu + + + + Kwanyama + Oshivambo + + + + Kazakh + Kasachisch + + + + Kalaallisut + Kalaallisut + + + + Khmer + Khmer + + + + Kannada + Kannada + + + + Korean + Koreanisch + + + + Kanuri + Kanuri + + + + Kashmiri + Kashmiri + + + + Kurdish + Kurdisch + + + + Komi + Komi + + + + Cornish + Cornisch + + + + Kirghiz + Kirghizstan + + + + Latin + Latein + + + + Luxembourgish + Luxemburgisch + + + + Ganda + Ganda + + + + Limburgish + Limburgisch + + + + Lingala + Lingala + + + + Lao + Laotisch + + + + Lithuanian + Litauisch + + + + Luba-Katanga + Kiluba + + + + Latvian + Litauisch + + + + Malagasy + Madagassisch + + + + Marshallese + Marshallesisch + + + + Maori + Maori + + + + Macedonian + Mazedonisch + + + + Malayalam + Malajalam + + + + Mongolian + Mongolisch + + + + Marathi + Marathi + + + + Malay + Malaysisch + + + + Maltese + Maltesisch + + + + Burmese + Burmesisch + + + + Nauru + Nauru + + + + Norwegian Bokmal + Bokmål + + + + North Ndebele + Nord-Ndebele + + + + Nepali + Nepali + + + + Ndonga + Ndonga + + + + Dutch + Holländisch + + + + Norwegian Nynorsk + Nynorsk + + + + Norwegian + Norwegisch + + + + South Ndebele + Süd-Ndebele + + + + Navajo + Navajo + + + + Chichewa + Chichewa + + + + Occitan + Okzitanisch + + + + Ojibwa + Ojibwe + + + + Oromo + Oromo + + + + Oriya + Oriya + + + + Ossetian + Ossetisch + + + + Panjabi + Punjabi + + + + Pali + Pali + + + + Polish + Polnisch + + + + Pashto + Paschto + + + + Portuguese + Portugiesisch + + + + Quechua + Quechua + + + + Raeto-Romance + Rätoromanisch + + + + Kirundi + Kirundi + + + + Romanian + Rumänisch + + + + Russian + Russisch + + + + Kinyarwanda + Kinyarwanda + + + + Sanskrit + Sanskrit + + + + Sardinian + Sardinisch + + + + Sindhi + Sindhi + + + + Northern Sami + Nordsamisch + + + + Sango + Sango + + + + Serbo-Croatian + Serbokroatisch + + + + Sinhala + Singhalesisch + + + + Slovak + Slowakisch + + + + Slovenian + Slovenisch + + + + Samoan + Samoanisch + + + + Shona + Shona + + + + Somali + Somali + + + + Albanian + Albanisch + + + + Serbian + Serbisch + + + + Swati + Swati + + + + Southern Sotho + Süd-Sotho + + + + Sundanese + Sundanesisch + + + + Swedish + Schwedisch + + + + Swahili + Swahili + + + + Tamil + Tamil + + + + Telugu + Telugu + + + + Tajik + Tadschikisch + + + + Thai + Thailändisch + + + + Tigrinya + Tigrinya + + + + Turkmen + Turkmenisch + + + + Tagalog + Tagalog + + + + Tswana + Setswana + + + + Tonga + Tongaisch + + + + Turkish + Türkisch + + + + Tsonga + Xitsonga + + + + Tatar + Tatar + + + + Twi + Twi + + + + Tahitian + Tahitianisch + + + + Uighur + Uigurisch + + + + Ukrainian + Ukrainisch + + + + Urdu + Urdu + + + + Uzbek + Usbekisch + + + + Venda + Tshivenda + + + + Vietnamese + Vietnamesisch + + + + Volapuk + Volapük + + + + Walloon + Wallonisch + + + + Wolof + Wolof + + + + Xhosa + Xhosa + + + + Yiddish + Jiddisch + + + + Yoruba + Yoruba + + + + Zhuang + Zhuang + + + + Chinese + Chinesisch + + + + Zulu + Zulu + + + + Lojban + Lojban + + + + Traditional Chinese + Chinesisch traditionell + + + + Simplified Chinese + Chinesisch vereinfacht + + + + Other + Andere + + + + Other Simplified Chinese dialects + Andere vereinfacht Chinesische Dialekte + + + + Other Traditional Chinese dialects + Andere traditionell Chinesische Dialekte + + + + Other Eastern-European languages + Andere osteuropäische Sprachen + + + + Other Western-European languages + Andere westeuropäische Sprachen + + + + Other Russian languages + Andere russische Sprachen + + + + Other Japanese languages + Andere japanische Sprachen + + + + Other Baltic languages + Andere baltische Sprachen + + + + Other Greek languages + Andere griechische Sprachen + + + + Other Korean dialects + Andere koreanische Sprachen + + + + Other Turkish dialects + Andere türkische Sprachen + + + + Other Thai dialects + Andere thai Sprachen + + + + Tamazight + Tamazight + + + + LoadDictionaries + + + Error loading dictionaries + Fehler beim Laden der Wörterbücher + + + + Main + + + Error in configuration file. Continue with default settings? + Fehler in der Konfigurationsdatei. Mit Standardeinstellungen fortfahren? + + + + MainWindow + + + &Menubar + &Menüleiste + + + + + Look up in: + Suche in: + + + + Found in Dictionaries: + In Wörterbüchern gefunden: + + + + Back + Zurück + + + + Forward + Vorwärts + + + + Scan Popup + Scan Popup + + + + Pronounce Word (Alt+S) + Wort aussprechen (ALT+S) + + + + Zoom In + Ver&grössern + + + + Zoom Out + Ver&kleinern + + + + Normal Size + Normale Grösse + + + + Words Zoom In + &Suchwörter vergrössern + + + + Words Zoom Out + S&uchwörter verkleinern + + + + Words Normal Size + Suchwörter in normaler &Grösse + + + + Show &Main Window + Im &Hauptfenster zeigen + + + + Tracking Clipboard + Zwischenspeicher überwachen + + + + Close current tab + Aktuellen Tab schliessen + + + + Close all tabs + Alle Tabs schliessen + + + + Close all tabs except current + Alle anderen Tabs schliessen + + + + Add all tabs to Favorites + Alle Tabs als Lesezeichen + + + + + Accessibility API is not enabled + Barrierefreiheit-API ist nicht aktiviert + + + + + + + + Remove current tab from Favorites + Aktuellen Tab von Lesezeichen entfernen + + + + Article, Complete (*.html) + Artikel, komplett (*.html) + + + + Article, HTML Only (*.html) + Artikel, nur HTML (*.html) + + + + Saving article... + Artikel wird gespeichert... + + + + The main window is set to be always on top. + Das Hauptfenster ist eingestellt als immer im Vordergrund. + + + + + &Hide + &Verbergen + + + + Export history to file + Verlauf in eine Datei exportieren + + + + + + Text files (*.txt);;All files (*.*) + Textdateien(*.txt);;All Dateien(*.*) + + + + History export complete + Export des Verlaufes abgeschlossen + + + + + + Export error: + Exportfehler: + + + + Import history from file + Verlauf von Datei importieren + + + + Import error: invalid data in file + Importfehler: ungültige Daten in Datei + + + + History import complete + Import des Verlaufes abgeschlossen + + + + + Import error: + Importfehler: + + + + Export Favorites to file + Exportiere Lesezeichen in Datei + + + + + XML files (*.xml);;All files (*.*) + XML Dateien (*.xml);;Alle Dateien (*.*) + + + + + Favorites export complete + Lesezeichen Export beendet + + + + Export Favorites to file as plain list + Exportiere Lesezeichen in Datei als Text + + + + Import Favorites from file + Importiere Lesezeichen von Datei + + + + Favorites import complete + Lesezeichen Import beendet + + + + Data parsing error + Datenanalyse Fehler + + + + Dictionary info + Wörterbuchinfo + + + + Dictionary headwords + Wörterbuchinfo + + + + Open dictionary folder + Wörterbuch-Ordner öffnen + + + + Edit dictionary + Wörterbuch bearbeiten + + + + Now indexing for full-text search: + Indexiere Volltextsuche: + + + + Remove headword "%1" from Favorites? + Entferne Überschrift "%1" von Lesezeichen ? + + + + + &Quit + B&eenden + + + + Loading... + Lade... + + + + + Welcome! + Willkommen + + + + %1 dictionaries, %2 articles, %3 words + %1 Wörterbücher, %2 Artikel, %3 Wörter + + + + Look up: + Nachschlagen: + + + + All + Alle + + + + Opened tabs + Offene Reiter + + + + Show Names in Dictionary &Bar + Namen in &Wörterbuchleiste anzeigen + + + + Show Small Icons in &Toolbars + Kleine Symbole in der &Toolbar anzeigen + + + + &Navigation + &Navigation + + + + String to search in dictionaries. The wildcards '*', '?' and sets of symbols '[...]' are allowed. +To find '*', '?', '[', ']' symbols use '\*', '\?', '\[', '\]' respectively + Begriff für die Suche in Wörterbüchern. Wildcards '*', '?' und Symbole '[...]' sind erlaubt. +Um folgende Symbole zu finden '*', '?', '[', ']' benutze wie folgt '\*', '\?', '\[', '\]'. + + + + Open Tabs List + Liste der Reiter öffnen + + + + (untitled) + (unbenannt) + + + + %1 - %2 + %1 - %2 + + + + Failed to initialize hotkeys monitoring mechanism.<br>Make sure your XServer has RECORD extension turned on. + Der Mechanismus für die Tastenkürzel konnte nicht initialisiert werden.<br>Vergewissern Sie sich, dass der XServer die RECORD Erweiterung aktiviert hat. + + + + New Release Available + Neue Version verfügbar + + + + Version <b>%1</b> of GoldenDict is now available for download.<br>Click <b>Download</b> to get to the download page. + Version <b>%1</b> von GoldenDict ist nun zum Herunterladen verfügbar.<br>Klicken Sie auf <b>Herunterladen</b>, um zur Seite fürs Herunterladen zu gelangen. + + + + Download + Herunterladen + + + + Skip This Release + Diese Version überspringen + + + + You have chosen to hide a menubar. Use %1 to show it back. + Es wurde eingestellt die Menüleiste zu verstecken. Mit %1 kann sie wieder angezeigt werden. + + + + Ctrl+M + CTRL+M + + + + Page Setup + Seite einrichten + + + + No printer is available. Please install one first. + Es ist kein Drucker vorhanden. Bitte zuerst einen installieren. + + + + Print Article + Drucke Artikel + + + + Save Article As + Artikel speichern als + + + + Error + Fehler + + + + Can't save article: %1 + Kann Artikel nicht speichern: %1 + + + + &File + &Datei + + + + &Edit + &Bearbeiten + + + + &Help + &Hilfe + + + + &View + &Ansicht + + + + &Zoom + &Zoom + + + + H&istory + &Verlauf + + + + &Dictionaries... + &Wörterbücher... + + + + F3 + F3 + + + + Search + &Volltextsuche + + + + Favo&rites + &Lesezeichen + + + + &Search Pane + &Suchformular + + + + &Results Navigation Pane + &Ergebnisliste + + + + &History Pane + &Verlaufsliste + + + + &Preferences... + &Einstellungen... + + + + F4 + F4 + + + + &Homepage + &Webseite + + + + &About + &Über + + + + About GoldenDict + Über GoldenDict + + + + GoldenDict reference + &GoldenDict Hilfe + + + + F1 + F1 + + + + Quit from application + Applikation beenden + + + + Favor&ites Pane + &Lesezeichenliste + + + + Ctrl+Q + CTRL+Q + + + + &Forum + &Forum + + + + &Close To Tray + In die &Symbolleiste schliessen + + + + Minimizes the window to tray + In the Symbolleiste minimieren + + + + Ctrl+F4 + CTRL+F4 + + + + &Save Article + Artikel &speichern + + + + Save Article + Artikel speichern + + + + F2 + F2 + + + + &Print + &Drucken + + + + Ctrl+P + CTRL+P + + + + Page Set&up + &Seite einrichten + + + + Print Pre&view + Druck&vorschau + + + + &Rescan Files + Dateien neu ein&lesen + + + + &New Tab + Neuer Rei&ter + + + + &Always on Top + &Immer im Vordergrund + + + + Always on Top + Immer im Vordergrund + + + + Ctrl+O + CTRL+O + + + + + + Menu Button + Menüschaltfläche + + + + Search in page + &Tab durchsuchen + + + + Ctrl+F + CTRL+F + + + + Full-text search + &Volltextsuche + + + + Ctrl+Shift+F + CTRL+Umschalt+F + + + + Show + Zeige + + + + Export + &Exportieren + + + + Import + Im&portieren + + + + Add + &Hinzufügen + + + + + + + + Add current tab to Favorites + Aktuellen Tab als Lesezeichen hinzufügen + + + + Ctrl+E + CTRL+E + + + + Export to list + Exportieren als &Liste + + + + Ctrl+F5 + CTRL+F5 + + + + &Clear + &Zurücksetzen + + + + New Tab + Neuer Tab + + + + Ctrl+T + CTRL+T + + + + &Configuration Folder + &Konfigurationsordner + + + + + + &Show + &Anzeigen + + + + Ctrl+H + CTRL+H + + + + &Export + &Exportieren + + + + &Import + &Importieren + + + + Mdx::MdxArticleRequest + + + Dictionary file was tampered or corrupted + Die Wörterbuchdatei war manipuliert oder korrupt + + + + Failed loading article from %1, reason: %2 + Konnte den Artikel von %1 nicht laden, Grund: %2 + + + + MediaWiki::MediaWikiArticleRequest + + + XML parse error: %1 at %2,%3 + Fehler beim XML-parsen: %1 bei %2,%3 + + + + MediaWiki::MediaWikiWordSearchRequest + + + XML parse error: %1 at %2,%3 + Fehler beim XML-parsen: %1 bei %2,%3 + + + + MediaWikisModel + + + Enabled + Aktiv + + + + Name + Name + + + + Address + Adresse + + + + Icon + Symbol + + + + MultimediaAudioPlayer + + + Couldn't open audio buffer for reading. + Konnte Audio Buffer nicht öffnen zwecks lesen. + + + + OrderAndProps + + + Form + Formular + + + + Dictionary order: + Reihenfolge der Wörterbücher: + + + + Inactive (disabled) dictionaries: + Inaktive (deaktivierte) Wörterbücher: + + + + Dictionary information + Informationen des ausgewählten Wörterbuches: + + + + Name: + Name: + + + + Total articles: + Artikel insgesamt: + + + + Total words: + Wörter insgesamt: + + + + Translates from: + Übersetzt von: + + + + Translates to: + Übersetzt nach: + + + + Description: + Beschreibung: + + + + Files comprising this dictionary: + Wörterbuch zusammengesetzt aus diesen Dateien: + + + + Adjust the order by dragging and dropping items in it. Drop dictionaries to the inactive group to disable their use. + Verändern Sie die Reihenfolge mit Drag & Drop. Lassen Sie ein Wörterbuch mittels Drag & Drop in die "inaktive Gruppe" fallen um es zu deaktivieren. + + + + Sort by name + Sortieren nach Name + + + + Sort by languages + Sortieren nach Sprachen + + + + Dictionary headwords + Wörterbucheinträge + + + + Dictionaries active: %1, inactive: %2 + Anzahl Wörterbücher aktiv: %1 | inaktiv: %2 + + + + PathsModel + + + Path + Pfad + + + + Recursive + Rekursiv + + + + Preferences + + + + System default + Systemvorgabe + + + + + Default + Standard + + + + Classic + Klassisch + + + + Modern + Modern + + + + Lingvo + Lingvo + + + + Babylon + Babylon + + + + Lingoes + Lingoes + + + + Lingoes-Blue + Lingoes-Blau + + + + MB + MB + + + + Changing Language + Sprache ändern + + + + Restart the program to apply the language change. + Starten Sie das Programm neu um die neue Sprache zu aktivieren. + + + + Preferences + Einstellungen + + + + &Interface + &Oberfläche + + + + Tabbed browsing + Reiter + + + + Normally, opening a new tab switches to it immediately. +With this on however, new tabs will be opened without +switching to them. + Normalerweise werden neue Reiter geöffnet und sofort selektioniert. +Mit dieser Option werden neue Reiter im Hintergrund geöffnet ohne +diese zu selektionieren. + + + + Open new tabs in background + Neue Reiter im Hintergrund öffnen + + + + With this on, new tabs are opened just after the +current, active one. Otherwise they are added to +be the last ones. + Mit dieser Option werden neue Reiter nach dem aktuellen, aktiven Reiter geöffnet. +Andernfalls werden diese ans Ende hinzugefügt. + + + + Open new tabs after the current one + Neue Reiter nach dem aktuellen öffnen + + + + When enabled, an icon appears in the system tray area which can be used +to open main window and perform other tasks. + Falls aktiviert, erscheint ein Symbol in der Symbolleiste, mit welchem das Hauptfenster geöffnet und andere Aufgaben getätigt werden können. + + + + Enable system tray icon + Aktiviert das Symbol in der Symbolleiste + + + + With this on, the application starts directly to system tray without showing +its main window. + Hiermit startet die Applikation direkt in die Symbolleiste ohne das Hauptfenster zu zeigen. + + + + Start to system tray + In die Symbolleiste starten + + + + With this on, an attempt to close main window would hide it instead of closing +the application. + Hiermit wird das Hauptfenster verborgen, falls die Applikation geschlossen wird. + + + + Close to system tray + In die Symbolleiste schliessen + + + + Startup + Start + + + + Start with system + Mit Betriebssystem starten + + + + Interface language: + Sprache der Oberfläche: + + + + Display style: + Darstellung: + + + + &Scan Popup + &Scan Popup + + + + When enabled, a translation popup window would be shown each time +you point your mouse on any word on the screen (Windows) or select +any word with mouse (Linux). When enabled, you can switch it on and +off from main window or tray icon. + Falls aktiviert, wird jedesmal das Popup-Fenster angezeigt, wenn die Maus über ein Wort am Bildschirm fährt (Windows) oder +wenn ein Wort mit der Maus markiert wird (Linux). +Dies kann im Hauptfenster und in der Symbolleiste an- und abgeschaltet werden. + + + + Enable scan popup functionality + Aktiviert die Scan Popup Funktionalität + + + + Automatically starts GoldenDict after operation system bootup. + Startet GoldenDict automatisch nach jedem Systemstart. + + + + Select this option if you don't want to see the main tab bar when only a single tab is opened. + Wählen Sie diese Option, falls Sie die Reiterleiste bei einem offenem Reiter nicht sehen möchten. + + + + Hide single tab + Einzelnen Tab ausblenden + + + + Ctrl-Tab navigates tabs in MRU order + CTRL+TAB wechselt zwischen den zuletzt verwendeten Reitern + + + + Double-click translates the word clicked + Doppelklick übersetzt das angeklickte Wort + + + + Normally, pressing ESC key moves focus to the translation line. +With this on however, it will hide the main window. + Beim Betätigen der ESC-Taste wird normalerweise der Fokus an die Übersetzungszeile übertragen. +Mit dieser Option wird jedoch das Hauptfenster verborgen. + + + + ESC key hides main window + ESC-Taste verbirgt das Hauptfenster + + + + Turn this option on if you want to select words by single mouse click + Aktivieren Sie diese Option, falls Sie Wörter mit einem einfachem Mausklick auswählen möchten. + + + + Select word by single click + Wort mit einfachem Klick auswählen + + + + Add-on style: + Add-on Stil: + + + + Help language + Sprache der Hilfe: + + + + Normally, clicking on a link, double-clicking on a word or looking up +selection in an article loads the translation and almost immediately +scrolls to the article from the same dictionary. With this option off, +however, the article from the topmost dictionary is shown. + Wird auf einen Link geklickt, ein Wort doppelgeklickt oder eine Suche in einem Artikel gestartet, +dann lädt die Übersetzung und scrollt direkt zum selben Artikel im Wörterbuch. +Wenn diese Option deaktiviert ist, dann wird das zuoberst erscheinende Wörterbuch angezeigt. + + + + Automatically scroll to target article + Automatisch zum Zielartikel scrollen + + + + Adjust this value to avoid huge context menus. + Mit der Anpassung dieses Wertes können riesige Kontextmenüs vermieden werden. + + + + Context menu dictionaries limit: + Wörterbuchlimit im Kontextmenü: + + + + Dictionary Font: + Wörterbuch Font + + + + set the fallback font family for dictionary + Wörterbuch Font auf Standart zurücksetzen. + + + + Chooses whether the scan popup mode is on by default or not. If checked, +the program would always start with the scan popup active. + Gibt an, ob der Scan Popup Modus standardmässig aktiviert ist oder nicht. +Falls aktiviert, wird das Programm immer mit aktiviertem Modus gestartet. + + + + Start with scan popup turned on + Mit aktiviertem Scan Popup starten + + + + With this enabled, the popup would only show up if all chosen keys are +in the pressed state when the word selection changes. + Fallt aktiviert, wird das Scan Popup bei Änderung der Wortauswahl nur angezeigt, wenn alle ausgewählten Tasten gedrückt sind. + + + + Only show popup when all selected keys are kept pressed: + Nur Popup anzeigen, wenn alle ausgewählten Tasten gedrückt werden: + + + + Left Ctrl only + Nur CTRL Links + + + + Left Ctrl + CTRL Links + + + + Right Shift only + Nur Umschalttaste Rechts + + + + Right Shift + Umschalttaste Rechts + + + + Alt key + ALT-Taste + + + + Alt + ALT + + + + Ctrl key + CTRL-Taste + + + + Ctrl + CTRL + + + + Left Alt only + Nur ALT Links + + + + Left Alt + ALT Links + + + + Shift key + Umschalttaste + + + + Shift + Umschalttaste + + + + Right Alt only + Nur ALT Rechts + + + + Right Alt + ALT Rechts + + + + Right Ctrl only + Nur CTRL Rechts + + + + Right Ctrl + CTRL Rechts + + + + Left Shift only + Nur Umschalttaste Links + + + + Left Shift + Umschalttaste Links + + + + Windows key or Meta key + Windows/Meta-Taste + + + + Win/Meta + Win/Meta + + + + Normally, in order to activate a popup you have to +maintain the chosen keys pressed while you select +a word. With this enabled, the chosen keys may also +be pressed shortly after the selection is done. + Normalerweise müssen die entsprechenden Tasten, während ein Wort markiert wird, gedrückt bleiben, um das Scan Popup zu aktivieren. +Mit dieser Option können die Tasten auch kurz nach der Markierung gedrückt werden. + + + + Do not show popup when selection or clipboard in one of GoldenDict's own windows changes + Zeige kein Popup während Selektion oder Zwischenablage Änderungen von GoldenDict eigenem Fenster + + + + Ignore GoldenDict's own selection and clipboard changes + Ignoriere eigene Selektion oder Zwischenablage Änderungen von GoldenDict + + + + Send translated word to main window instead of to show it in popup window + Übersetzte Wörter ans Hauptfenster senden, anstatt sie im Popup-Fenster anzuzeigen. + + + + Send translated word to main window + Übersetzte Wörter ans Hauptfenster senden + + + + Show a flag window before showing popup window, click the flag to show popup window. + Zeige ein Flaggen Fenster bevor Popup Fenster erscheint, auf Flagge klicken um Popup anzuzeigen. + + + + Show scan flag when word is selected + Zeige Flagge scannen wenn Wort selektiert wurde + + + + Playback + Abspielen + + + + Play audio files via built-in audio support + Wähle Audio Hintergrund Applikation aus. + + + + Use internal player: + Internen Abspieler verwenden: + + + + Choose audio back end + Wähle Audio Hintergrund Applikation aus. + + + + Enter audio player command line + Kommandozeile für Audio Player eingeben + + + + System proxy + System Proxy + + + + Custom proxy + Kunden Proxy + + + + Custom settings + Kunden-Einstellungen + + + + Anki Connect + Anki ist ein Programm zum Erstellen digitaler Karteikarten und Auswendiglernen. Dabei werden die Karteikarten in immer grösser werdenden Zeitintervallen abgefragt. + Mit Anki verbinden + + + + http:// + http:// + + + + Deck: + Sammlung (Deck): + + + + Model: + Modell: + + + + Maximum network cache size: + Maximale Netwerk Cache Grösse: + + + + Maximum disk space occupied by GoldenDict's network cache in +%1 +If set to 0 the network disk cache will be disabled. + Maximale Festplattengrösse benutzt durch GoldenDict Netzwerk Cache in +%1 . +Wenn auf 0 gesetzt, wird Netzwerk Cache deaktiviert. + + + + MiB + MiB + + + + When this option is enabled, GoldenDict +clears its network cache from disk during exit. + Wenn diese Option aktiviert ist, löscht GoldendDict den Netzwerk Cache während dem Beenden. + + + + Clear network cache on exit + Netzwerk Cache löschen während dem Beenden + + + + Full-text search + Volltextsuche + + + + Allow full-text search for: + Erlaube Volltext Suche für: + + + + Don't search in dictionaries containing more than + Nicht in Wörterbüchern suchen, die mehr als + + + + articles (0 - unlimited) + Einträge enthalten (0 -> unbegrenzt) + + + + ScanPopup unpinned window flags + ScanPopup nicht gewählter Window Flaggen + + + + Experiment with non-default flags if the unpinned scan popup window misbehaves + Experiment mit "non-default flags" falls nicht angefügtes Scan Popup sich komisch verhält + + + + <default> + <Default> + + + + Popup + Popup + + + + Tool + Werkzeug + + + + This hint can be combined with non-default window flags + Dieser Hinweis kann mit anderen Nichtstandart Flaggen-Fenstern kombiniert werden. + + + + Bypass window manager hint + Ignoriere Window Manager Bemerkungen + + + + Favorites + Lesezeichen + + + + Favorites saving interval. If set to 0 Favorites will be saved only during exit. + Automatischer Speicherintervall für Lesezeichen. Falls der Wert 0 eingetragen wird, erfolgt die Speicherung nur bei Beendigung des Programms. + + + + Turn this option on to confirm every operation of items deletion + Wird diese Option aktiviert, erfolgt jegliche Entfernung von Lesezeichen nur nach vorheriger Sicherheitsabfrage. + + + + Confirmation for items deletion + Sicherheitsabfrage + + + + Select this option to automatic collapse big articles + Wählen Sie diese Option, falls Sie automatisch grosse Artikel einklappen möchten. + + + + Collapse articles more than + Artikel einklappen mit mehr als + + + + Articles longer than this size will be collapsed + Artikel welche diese Grösse überschreiten werden eingeklappt + + + + + symbols + Zeichen + + + + Turn this option on to ignore unreasonably long input text +from mouse-over, selection, clipboard or command line + Aktivieren Sie diese Option um sehr lange Eingabetexte zu ignorieren, welche via +Maus, Selektionen, Zwischenspeicher, Kommandozeile eingegeben werden. + + + + Ignore input phrases longer than + Ignoriere Eingabe Sätze welche länger sind als + + + + Input phrases longer than this size will be ignored + Eingabe Sätze welche länger sind als diese Grösse werden ignoriert + + + + Turn this option on to ignore diacritics while searching articles + Option einschalten um diakritische Zeichen (Punkte, Striche, Häkchen, Bögen etc.) während der Artikelsuche zu ignorieren. + + + + Ignore diacritics while searching + Ignoriere Diakritische Zeichen während der Suche + + + + Ignore punctuation while searching + Ignoriere Satzzeichen während der Suche + + + + Turn this option on to enable extra articles search via synonym lists +from Stardict, Babylon and GLS dictionaries + Wählen Sie diese Option, falls Sie eine Zusatzsuche mit den Synonymlisten von +Stardict, Babylon und GLS Wörterbüchern wünschen. + + + + Extra search via synonyms + Zusatzsuche mit Hilfe von Synonymen + + + + Use any external program to play audio files + Ein externes Programm zum Abspielen der Audiodaten benutzen. + + + + Use external program: + Externes Programm benutzen: + + + + Ad&vanced + &Erweitert + + + + History + Verlauf + + + + Turn this option on to store history of the translated words + Aktivieren Sie diese Option, um den Verlauf der übersetzten Wörter zu speichern. + + + + Store &history + &Verlauf speichern + + + + Specify the maximum number of entries to keep in history. + Geben Sie die maximale Anzahl von Einträgen im Verlauf an. + + + + Maximum history size: + Maximale Verlaufgrösse: + + + + History saving interval. If set to 0 history will be saved only during exit. + Intervall zum Speichern des Verlaufs. Falls 0, wird der Verlauf beim Programmende gespeichert. + + + + + Save every + Speichern alle + + + + + minutes + Minuten + + + + Articles + Artikel + + + + Turn this option on to always expand optional parts of articles + Aktivieren Sie diese Option, um optionale Abschnitte von Artikeln immer auszuklappen. + + + + Expand optional &parts + Optionale &Abschnitte ausklappen + + + + Keys may also be pressed afterwards, within + Die Tasten können auch im nachhinein innerhalb von + + + + To avoid false positives, the keys are only monitored +after the selection's done for a limited amount of +seconds, which is specified here. + Um Falschmeldungen zu vermeiden, werden die Tasten nur für eine begrenzte Anzahl Sekunden überwacht, wie hier angegeben. + + + + secs + Sekunde(n) gedrückt werden + + + + Hotkeys + Tastenkürzel + + + + Use the following hotkey to show or hide the main window: + Das folgende Tastenkürzel benutzen, um das Hauptfenster zu zeigen oder zu verbergen: + + + + Use the following hotkey to translate a word from clipboard: + Das folgende Tastenkürzel benutzen, um ein Wort von der Zwischenablage zu übersetzen: + + + + The hotkeys are global and work from any program and within any context as long as GoldenDict is running in background. + Die Tastenkürzel funktionieren global und in jedem Programm und Kontext, sofern GoldenDict im Hintergrund läuft. + + + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'DejaVu Sans'; font-size:9pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#ff0000;">Note: You appear to be running an X.Org XServer release which has the RECORD extension broken. Hotkeys in GoldenDict will probably not work. This must be fixed in the server itself. Please refer to the following </span><a href="https://bugs.freedesktop.org/show_bug.cgi?id=20500"><span style=" text-decoration: underline; color:#0000ff;">bug entry</span></a><span style=" color:#ff0000;"> and leave a comment there if you like.</span></p></body></html> + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'DejaVu Sans'; font-size:9pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#ff0000;">Achtung: Es scheint, dass sie eine X.Org-XServer-Version benutzen, bei welcher die RECORD-Erweiterung nicht richtig funktioniert. Deshalb werden Tastenkürzel höchstwahrscheinlich nicht funktionieren. Dies muss am Server selbst korrigiert werden. Dies bezieht sich auf folgenden </span><a href="https://bugs.freedesktop.org/show_bug.cgi?id=20500"><span style=" text-decoration: underline; color:#0000ff;">Fehlereintrag</span></a><span style=" color:#ff0000;">, welchen Sie, falls gewünscht, kommentieren können.</span></p></body></html> + + + + &Audio + &Audio + + + + Pronunciation + Aussprache + + + + Auto-pronounce words in main window + Wörter im Hauptfenster automatisch aussprechen + + + + Auto-pronounce words in scan popup + Wörter im Scan Popup automatisch aussprechen + + + + &Network + &Netzwerk + + + + Enable if you wish to use a proxy server +for all program's network requests. + Aktivieren, falls ein Proxy-Server für alle Netzverbindungen des Programms verwendet werden soll. + + + + Use proxy server + Proxyserver verwenden + + + + Type: + Typ: + + + + + Host: + Host: + + + + + Port: + Port: + + + + User: + Benutzer: + + + + Password: + Passwort: + + + + Enabling this would make GoldenDict block most advertisements +by disallowing content (images, frames) not originating from the site +you are browsing. If some site breaks because of this, try disabling this. + Dies zu aktivieren lässt GoldenDict die meiste Werbung blockieren, indem Inhalte (Bilder, Frames) +aus Seiten blockiert werden, die nicht der jeweils angezeigten entsprechen. +Sollten einige Seiten nicht mehr funktionieren, kann das Deaktivieren dieser Option helfen. + + + + Disallow loading content from other sites (hides most advertisements) + Inhalte nicht von fremden Seiten laden (unterbindet meist Werbung) + + + + Enabling this would allow to listen to sound pronunciations from +online dictionaries that rely on Flash or other web plugins. +Plugin must be installed for this option to work. + Das Aktivieren erlaubt Audioaussprachen von Onlinewörterbüchern anzuhören, welche auf Flash oder Webplugins basieren. +Ein Plugin muss für diese Option installiert sein. + + + + Enable web plugins + Webplugins aktivieren + + + + Some sites detect GoldenDict via HTTP headers and block the requests. +Enable this option to workaround the problem. + Einige Seiten erkennen GoldenDict mittels HTTP-Kopfzeilen und blockieren die Anfrage. +Diese Option kann dieses Problem beheben. + + + + Do not identify GoldenDict in HTTP headers + GoldenDict nicht in HTTP-Kopfzeilen identifizieren + + + + When this is enabled, the program periodically +checks if a new, updated version of GoldenDict +is available for download. If it is so, the program +informs the user about it and prompts to open a +download page. + Falls aktiviert, prüft das Programm periodisch auf neue Versionen. +Sollte eine neuere Version verfügbar sein informiert GoldenDict den Benutzer und öffnet eventuell die Download-Seite. + + + + Check for new program releases periodically + Periodisch auf neue Programmversionen prüfen + + + + ProgramTypeEditor + + + Audio + Audio + + + + Plain Text + Klartext + + + + Html + Html + + + + Prefix Match + Präfixtreffer + + + + Unknown + Unbekannt + + + + Programs::RunInstance + + + No program name was given. + Kein Programmname wurde eingegeben. + + + + The program has crashed. + Das Programm ist abgestürzt. + + + + The program has returned exit code %1. + Das Program hat mit %1 beendet. + + + + ProgramsModel + + + Enabled + Aktiviert + + + + Type + Typ + + + + Name + Name + + + + Command Line + Kommandozeile + + + + Icon + Symbol + + + + QObject + + + + Article loading error + Fehler beim Laden des Artikels + + + + + Article decoding error + Fehler beim Dekodieren des Artikels + + + + + + + Copyright: %1%2 + Copyright: %1%2 + + + + + Version: %1%2 + Version: %1%2 + + + + avformat_alloc_context() failed. + avformat_alloc_context() fehlgeschlagen. + + + + av_malloc() failed. + av_malloc() fehlgeschlagen. + + + + avio_alloc_context() failed. + avio_alloc_context() fehlgeschlagen. + + + + avformat_open_input() failed: %1. + avformat_open_input() fehlgeschlagen: %1. + + + + avformat_find_stream_info() failed: %1. + avformat_find_stream_info() fehlgeschlagen: %1. + + + + Could not find audio stream. + Konnte den Audiostream nicht finden. + + + + Codec [id: %1] not found. + Codec [id: %1] nicht gefunden. + + + + avcodec_alloc_context3() failed. + avcodec_alloc_context3() fehlgeschlagen. + + + + avcodec_open2() failed: %1. + avcodec_open2() fehlgeschlagen: %1. + + + + Cannot find usable audio output device. + Konnte kein verwendbares Audioausgabegerät finden. + + + + Unsupported sample format. + Nicht unterstütztes Abtastformat. + + + + ao_open_live() failed: + ao_open_live() fehlgeschlagen: + + + + No driver. + Kein Treiber. + + + + This driver is not a live output device. + Dieser Treiber ist kein aktives Ausgabegerät. + + + + A valid option key has an invalid value. + Ein gültiger Optionsschlüssel hat einen ungültigen Wert. + + + + Cannot open the device: %1, channels: %2, rate: %3, bits: %4. + Konnte folgendes Gerät nicht öffnen: %1, Kanale: %2, Rate: %3, Bits: %4. + + + + Unknown error. + Fehler unbekannt. + + + + avcodec_alloc_frame() failed. + avcodec_alloc_frame() fehlgeschlagen. + + + + + + Author: %1%2 + Autor: %1%2 + + + + + E-mail: %1%2 + E-Mail: %1%2 + + + + Title: %1%2 + Titel: %1%2 + + + + Website: %1%2 + Webseite: %1%2 + + + + Date: %1%2 + Datum: %1%2 + + + + anki: post to anki failed + Anki: Übermittlung zu Aniki ist fehlgeschlagen + + + + QuickFilterLine + + + Dictionary search/filter (Ctrl+F) + Wörterbuch suchen/filtern (CTRL+F) + + + + Quick Search + Schnellsuche + + + + Clear Search + Suche zurücksetzen + + + + ResourceToSaveHandler + + + ERROR: %1 + FEHLER: %1 + + + + Resource saving error: + Fehler beim speichern der Ressource: + + + + The referenced resource failed to download. + Die Ressource konnte nicht heruntergeladen werden. + + + + WARNING: %1 + WARNUNG: %1 + WARNUNG: %1 + + + + Romaji + + + Hepburn Romaji for Hiragana + Hepburn Romaji für Hiragana + + + + Hepburn Romaji for Katakana + Hepburn Romaji für Katakana + + + + RussianTranslit + + + Russian Transliteration + Russische Transliteration + + + + ScanFlag + + + MainWindow + Hauptfenster + + + + ScanPopup + + + Dialog + Dialog + + + + + + + + ... + ... + + + + Back + Zurück + + + + Forward + Weiter + + + + Pronounce Word (Alt+S) + Wort aussprechen (ALT+S) + + + + Alt+S + ALT+S + + + + Send word to main window (Alt+W) + Wort an das Hauptfenster senden (ALT+W) + + + + Alt+W + ALT+W + + + + Add word to Favorites (Ctrl+E) + Wort zu Lesezeichen hinzufügen (CTRL+E) + + + + Shows or hides the dictionary bar + Zeigt oder versteckt die Wörterbuchleiste + + + + Always stay on top of all other windows + Immer im Vordergrund aller Windows Fenster + + + + Use this to pin down the window so it would stay on screen, +could be resized or managed in other ways. + Hiermit kann das Fenster fixiert werden, damit es am Bildschirm bleibt, +es in der Grösse verändert, oder andersweitig verwaltet werden kann. + + + + + %1 - %2 + %1 - %2 + + + + SoundDirsModel + + + Path + Pfad + + + + Name + Name + + + + Icon + Symbol + + + + Sources + + + Text to Speech + Sprachausgabe + + + + (not available in portable version) + (Wird in der portablen Version nicht unterstützt !) + + + + + + Choose a directory + Verzeichnis auswählen + + + + + + + + + Confirm removal + Löschung bestätigen + + + + + Remove directory <b>%1</b> from the list? + Soll das Verzeichnis <b>%1</b> von der Liste entfernt werden? + + + + + + Remove site <b>%1</b> from the list? + Soll die Seite <b>%1</b> von der Liste entfernt werden? + + + + Remove program <b>%1</b> from the list? + Soll das Programm <b>%1</b> von der Liste entfernt werden? + + + + Files + Dateien + + + + Paths to search for the dictionary files: + Pfad, um nach Wörterbuchdateien zu suchen: + + + + + + + + + &Add... + &Hinzufügen... + + + + + + + + + &Remove + &Entfernen + + + + Re&scan now + Neu ein&lesen + + + + Sound Dirs + Audioverzeichnis + + + + Make dictionaries from bunches of audiofiles by adding paths here: + Wörterbücher von Audiodateien erstellen, indem hier die Verzeichnisse eingefügt werden: + + + + Morphology + Morphologie + + + + Path to a directory with Hunspell/Myspell dictionaries: + Ordnerpfad mit Hunspell/Myspell Wörterbüchern: + + + + &Change... + Än&dern... + + + + Available morphology dictionaries: + Verfügbare Morphologie Wörterbücher: + + + + Each morphology dictionary appears as a +separate auxiliary dictionary which +provides stem words for searches and +spelling suggestions for mistyped words. +Add appropriate dictionaries to the bottoms +of the appropriate groups to use them. + Jedes Morphologie Wörterbuch erscheint als zusätzliches Hilfswörterbuch, +welches Stammwörter für Suchen und ähnliche Schreibweisen für +falsch geschriebene Wörter bereitstellt. + +Fügen Sie entsprechende Wörterbücher am besten am Ende der passenden Gruppe ein. + + + + Wikipedia + Wikipedia + + + + Wikipedia (MediaWiki) sites: + Wikipedia (MediaWiki) Seiten: + + + + Websites + Webseiten + + + + Any websites. A string %GDWORD% will be replaced with the query word: + Auf jeder Webseite wird der Text %GDWORD% mit dem Suchwort ersetzt: + + + + Programs + Programme + + + + Forvo + Forvo + + + + Live pronunciations from <a href="http://www.forvo.com/">forvo.com</a>. The site allows people to record and share word pronunciations. You can listen to them from GoldenDict. + Aussprachen live von <a href="http://www.forvo.com/">forvo.com</a>. Diese Seite erlaubt es Menschen Aussprachen von Wörter aufzunehmen und zu teilen. Diese können in GoldenDict angehört werden. + + + + Enable pronunciations from Forvo + Aussprachen von Forvo aktivieren + + + + API Key: + API Schlüssel: + + + + Use of Forvo currently requires an API key. Leave this field +blank to use the default key, which may become unavailable +in the future, or register on the site to get your own key. + Die Benutzung von Forvo erfordert einen API-Schlüssel. +Bei einem leeren Wert, wird ein Standardschlüssel verwendet, welcher vielleicht in Zukunft ungültig wird. +Sie können sich auch auf der Seite registrieren, um ihren eigenen Schlüssel zu erhalten. + + + + Get your own key <a href="http://api.forvo.com/key/">here</a>, or leave blank to use the default one. + Holen Sie sich <a href="http://api.forvo.com/key/">hier</a> den eigenen Schlüssel, oder lassen Sie das Feld leer um den Standardschlüssel zu verwenden. + + + + Alternatively, use %GD1251% for CP1251, %GDISO1%...%GDISO16% for ISO 8859-1...ISO 8859-16 respectively, +%GDBIG5% for Big-5, %GDBIG5HKSCS% for Big5-HKSCS, %GDGBK% for GBK and GB18030, %GDSHIFTJIS% for Shift-JIS. + Alternativ kann man folgenden String verwenden: %GD1251% für CP1251, %GDISO1%...%GDISO16% für ISO 8859-1...ISO 8859-16 oder auch +%GDBIG5% für Big-5, %GDBIG5HKSCS% für Big5-HKSCS, %GDGBK% für GBK und GB18030, %GDSHIFTJIS% für Shift-JIS. + + + + DICT servers + DICT Server + + + + DICT servers: + DICT Server: + + + + Any external programs. A string %GDWORD% will be replaced with the query word. If such string is not presented, the word will be fed into standard input. + Für externe Programme. Der String %GDWORD% wird mit dem Suchwort ersetzt. Falls eine solche Zeichenkette nicht vorhanden ist, wird das Wort an die Standardeingabe geschickt.. + + + + Language codes (comma-separated): + Sprach-Code (mit Komma getrennt): + + + + List of language codes you would like to have. Example: "en, ru". + Die Liste der Sprach-Code, welche Sie benutzen möchten wie zum Beispiel "de, en". + + + + Full list of language codes is available <a href="http://www.forvo.com/languages-codes/">here</a>. + Die vollständigen Listen der Sprach-Code finden Sie <a href="http://www.forvo.com/languages-codes/">hier</a>. + + + + Transliteration + Transliteration + + + + Russian transliteration + Russische Transliteration + + + + Greek transliteration + Griechische Transliteration + + + + German transliteration + Deutsche Transliteration + + + + Belarusian transliteration + Weissrussische Transliteration + + + + Enables to use the Latin alphabet to write the Japanese language + Aktiviert das Verwenden des Lateinischen Alphabetes zum Schreiben der Japanischen Sprache. + + + + Japanese Romaji + Japanisch Rōmaji + + + + Systems: + Systeme: + + + + The most widely used method of transcription of Japanese, +based on English phonology + Die weitverbreiteste Methode zur Transkription vom Japanischen, basierend auf der Englischen Aussprache. + + + + Hepburn + Hepburn + + + + The most regular system, having a one-to-one relation to the +kana writing systems. Standardized as ISO 3602 + +Not implemented yet in GoldenDict. + Das regulärste System, mit einer 1 zu 1 Beziehung zum Kana-Schrift-System. +Standardisiert als ISO 3602. + +(Noch nicht in GoldenDict implementiert.) + + + + Nihon-shiki + Nippon + + + + Based on Nihon-shiki system, but modified for modern standard Japanese. +Standardized as ISO 3602 + +Not implemented yet in GoldenDict. + Basierend auf dem Nippon-System, modifiziert fürs moderne Japanisch. +Standardisiert als ISO 3602. + +(Noch nicht in GoldenDict implementiert.) + + + + Kunrei-shiki + Kunrei-shiki + + + + Syllabaries: + Silbenschriften: + + + + Hiragana Japanese syllabary + Japanische Hiragana Silbenschrift + + + + Hiragana + Hiragana + + + + Katakana Japanese syllabary + Japanische Katakana Silbenschrift + + + + Katakana + Katakana + + + + StylesComboBox + + + None + Kein Theme + + + + TextToSpeechSource + + + Selected voice engines: + Ausgewählte Sprachmodule: + + + + &Add + &Hinzufügen + + + + &Remove + &Entfernen + + + + Preferences + Einstellungen + + + + Volume: + Lautstärke: + + + + Rate: + Rate: + + + + Preview + Aussprechen + + + + Available voice engines: + Verfügbare Sprachmodule: + + + + Text to be previewed: + Text Aussprechen (Vorlesen): + + + + Type text to be previewed here. + Text zum Vorlesen hier eingeben... + + + + &Preview + &Abspielen + + + + No TTS voice available + Keine TTS-Stimme verfügbar + + + + Cannot find available TTS voice.<br>Please make sure that at least one TTS engine installed on your computer already. + Konnte keine verfügbare TTS-Stimme finden.<br>Vergewissern Sie sich, dass mindestens ein TTS-Modul auf dem Computer installiert ist. + + + + Confirm removal + Löschung bestätigen + + + + Remove voice engine <b>%1</b> from the list? + Soll das Sprachmodul <b>%1</b> von der Liste entfernt werden ? + + + + TranslateBox + + + Type a word or phrase to search dictionaries + Ein Wort oder einen Satz eingeben um Wörterbücher zu durchsuchen... + + + + Drop-down + Dropdown + + + + VoiceEnginesModel + + + Enabled + Aktiv + + + + Name + Name + + + + Id + Id + + + + Icon + Symbol + + + + WebSitesModel + + + + Insert article as link inside <iframe> tag + Artikel als Link innerhalb Reiter "iframe" einsetzen + + + + Enabled + Aktiv + + + + As link + Als Link + + + + Name + Name + + + + Address + Adresse + + + + Icon + Symbol + + + + WordFinder + + + Failed to query some dictionaries. + Einige Wörterbücher konnten nicht abgefragt werden. + + + + WordList + + + WARNING: %1 + WARNUNG: %1 + + + diff --git a/main.cc b/main.cc index 65a05758..28afaba6 100644 --- a/main.cc +++ b/main.cc @@ -399,7 +399,7 @@ int main( int argc, char ** argv ) app.installTranslator( &qtTranslator ); } - translator.load( Config::getEmbedLocDir() + "/" + localeName ); + translator.load( Config::getLocDir() + "/" + localeName ); app.installTranslator( &translator ); QTranslator webengineTs; diff --git a/mainwindow.cc b/mainwindow.cc index f084d9a1..201b8ae3 100644 --- a/mainwindow.cc +++ b/mainwindow.cc @@ -181,7 +181,7 @@ MainWindow::MainWindow( Config::Class & cfg_ ): QWebEngineProfile::defaultProfile()->setUrlRequestInterceptor( wuri ); if(!cfg.preferences.hideGoldenDictHeader){ - QWebEngineProfile::defaultProfile()->setHttpUserAgent(QWebEngineProfile::defaultProfile()->httpUserAgent()+" GoldenDict/webengine"); + QWebEngineProfile::defaultProfile()->setHttpUserAgent(QWebEngineProfile::defaultProfile()->httpUserAgent()+" GoldenDict/WebEngine"); } qRegisterMetaType< Config::InputPhrase >(); @@ -237,8 +237,12 @@ MainWindow::MainWindow( Config::Class & cfg_ ): enableScanPopup->setCheckable( true ); enableScanPopup->setVisible( cfg.preferences.enableScanPopup ); navToolbar->widgetForAction( enableScanPopup )->setObjectName( "scanPopupButton" ); - if ( cfg.preferences.enableScanPopup && cfg.preferences.startWithScanPopupOn ) + if( cfg.preferences.enableScanPopup && cfg.preferences.startWithScanPopupOn ) + { + enableScanPopup->setIcon( QIcon( ":/icons/wizard-selected.svg" ) ); enableScanPopup->setChecked( true ); + } + connect( enableScanPopup, SIGNAL( toggled( bool ) ), this, SLOT( scanEnableToggled( bool ) ) ); @@ -1514,6 +1518,8 @@ void MainWindow::makeScanPopup() connect( scanPopup.get(), SIGNAL( setExpandMode( bool ) ), this, SLOT( setExpandMode( bool ) ) ); + connect( scanPopup.get(), &ScanPopup::inspectSignal,this,&MainWindow::inspectElement ); + connect( scanPopup.get(), SIGNAL( forceAddWordToHistory( const QString & ) ), this, SLOT( forceAddWordToHistory( const QString & ) ) ); @@ -3453,7 +3459,7 @@ static void filterAndCollectResources( QString & html, QRegExp & rx, const QStri { QUrl url( rx.cap( 1 ) ); QString host = url.host(); - QString resourcePath = QString::fromLatin1( QUrl::toPercentEncoding( Utils::Url::path( url ), "/" ) ); + QString resourcePath = Utils::Url::path( url ); if ( !host.startsWith( '/' ) ) host.insert( 0, '/' ); @@ -3470,6 +3476,7 @@ static void filterAndCollectResources( QString & html, QRegExp & rx, const QStri } // Modify original url, set to the native one + resourcePath = QString::fromLatin1( QUrl::toPercentEncoding( resourcePath, "/" ) ); QString newUrl = sep + QDir( folder ).dirName() + host + resourcePath + sep; html.replace( pos, rx.cap().length(), newUrl ); pos += newUrl.length(); @@ -3512,7 +3519,8 @@ void MainWindow::on_saveArticle_triggered() &selectedFilter, options ); - bool complete = ( selectedFilter == filters[ 0 ] ); + // The " (*.html)" part of filters[i] is absent from selectedFilter in Qt 5. + bool const complete = filters.at( 0 ).startsWith( selectedFilter ); if( fileName.isEmpty() ) return; diff --git a/mainwindow.ui b/mainwindow.ui index 7265149b..e1505c44 100644 --- a/mainwindow.ui +++ b/mainwindow.ui @@ -198,88 +198,13 @@ 0 - - - - - - - 254 - 253 - 235 - - - - - - - - - 254 - 253 - 235 - - - - - - - - - 255 - 255 - 255 - - - - - - true - - - - - - - - 254 - 253 - 235 - - - - - - - - - 254 - 253 - 235 - - - - - - - - - 255 - 255 - 255 - - - - - - - + diff --git a/mdx.cc b/mdx.cc index c83d4ea4..aedfff41 100644 --- a/mdx.cc +++ b/mdx.cc @@ -200,7 +200,7 @@ public: }; -class MdxDictionary: public BtreeIndexing::BtreeDictionary +class MdxDictionary: public QObject, public BtreeIndexing::BtreeDictionary { Mutex idxMutex; File::Class idx; @@ -695,10 +695,8 @@ class MddResourceRequest: public Dictionary::DataRequest public: - MddResourceRequest( MdxDictionary & dict_, - string const & resourceName_ ): - dict( dict_ ), - resourceName( Utf8::decode( resourceName_ ) ) + MddResourceRequest( MdxDictionary & dict_, string const & resourceName_ ) : + Dictionary::DataRequest( &dict_ ), dict( dict_ ), resourceName( Utf8::decode( resourceName_ ) ) { f = QtConcurrent::run( [ this ]() { this->run(); } ); // QThreadPool::globalInstance()->start( [ this ]() { this->run(); } ); @@ -854,7 +852,6 @@ void MddResourceRequest::run() if( Filetype::isNameOfTiff( u8ResourceName ) ) { // Convert it - Mutex::Lock _( dataMutex ); GdTiff::tiff2img( data ); } } @@ -902,7 +899,7 @@ void MdxDictionary::loadIcon() noexcept fileName.chop( 3 ); QString text = QString::fromStdString( dictionaryName ); - if( !loadIconFromFile( fileName ) && !loadIconFromText( text ) ) + if( !loadIconFromFile( fileName ) && !loadIconFromText(":/icons/mdict-bg.png", text ) ) { // Use default icons dictionaryIcon = dictionaryNativeIcon = QIcon( ":/icons/mdict.png" ); diff --git a/preferences.cc b/preferences.cc index 273bdfc3..535f5039 100644 --- a/preferences.cc +++ b/preferences.cc @@ -19,32 +19,9 @@ Preferences::Preferences( QWidget * parent, Config::Class & cfg_ ): connect( ui.enableScanPopup, SIGNAL( toggled( bool ) ), this, SLOT( enableScanPopupToggled( bool ) ) ); - connect( ui.enableScanPopupModifiers, SIGNAL( toggled( bool ) ), - this, SLOT( enableScanPopupModifiersToggled( bool ) ) ); - connect( ui.showScanFlag, SIGNAL( toggled( bool ) ), this, SLOT( showScanFlagToggled( bool ) ) ); - connect( ui.altKey, SIGNAL( clicked( bool ) ), - this, SLOT( wholeAltClicked( bool ) ) ); - connect( ui.ctrlKey, SIGNAL( clicked( bool ) ), - this, SLOT( wholeCtrlClicked( bool ) ) ); - connect( ui.shiftKey, SIGNAL( clicked( bool ) ), - this, SLOT( wholeShiftClicked( bool ) ) ); - - connect( ui.leftAlt, SIGNAL( clicked( bool ) ), - this, SLOT( sideAltClicked( bool ) ) ); - connect( ui.rightAlt, SIGNAL( clicked( bool ) ), - this, SLOT( sideAltClicked( bool ) ) ); - connect( ui.leftCtrl, SIGNAL( clicked( bool ) ), - this, SLOT( sideCtrlClicked( bool ) ) ); - connect( ui.rightCtrl, SIGNAL( clicked( bool ) ), - this, SLOT( sideCtrlClicked( bool ) ) ); - connect( ui.leftShift, SIGNAL( clicked( bool ) ), - this, SLOT( sideShiftClicked( bool ) ) ); - connect( ui.rightShift, SIGNAL( clicked( bool ) ), - this, SLOT( sideShiftClicked( bool ) ) ); - connect( ui.buttonBox, SIGNAL( helpRequested() ), this, SLOT( helpRequested() ) ); @@ -64,7 +41,7 @@ Preferences::Preferences( QWidget * parent, Config::Class & cfg_ ): // See which other translations do we have - QStringList availLocs = QDir( Config::getEmbedLocDir() ).entryList( QStringList( "*.qm" ), + QStringList availLocs = QDir( Config::getLocDir() ).entryList( QStringList( "*.qm" ), QDir::Files ); // We need to sort by language name -- otherwise list looks really weird @@ -192,21 +169,7 @@ Preferences::Preferences( QWidget * parent, Config::Class & cfg_ ): ui.enableScanPopup->setChecked( p.enableScanPopup ); ui.startWithScanPopupOn->setChecked( p.startWithScanPopupOn ); - ui.enableScanPopupModifiers->setChecked( p.enableScanPopupModifiers ); - ui.altKey->setChecked( p.scanPopupModifiers & KeyboardState::Alt ); - ui.ctrlKey->setChecked( p.scanPopupModifiers & KeyboardState::Ctrl ); - ui.shiftKey->setChecked( p.scanPopupModifiers & KeyboardState::Shift ); - ui.winKey->setChecked( p.scanPopupModifiers & KeyboardState::Win ); - ui.leftAlt->setChecked( p.scanPopupModifiers & KeyboardState::LeftAlt ); - ui.rightAlt->setChecked( p.scanPopupModifiers & KeyboardState::RightAlt ); - ui.leftCtrl->setChecked( p.scanPopupModifiers & KeyboardState::LeftCtrl ); - ui.rightCtrl->setChecked( p.scanPopupModifiers & KeyboardState::RightCtrl ); - ui.leftShift->setChecked( p.scanPopupModifiers & KeyboardState::LeftShift ); - ui.rightShift->setChecked( p.scanPopupModifiers & KeyboardState::RightShift ); - - ui.scanPopupAltMode->setChecked( p.scanPopupAltMode ); - ui.scanPopupAltModeSecs->setValue( p.scanPopupAltModeSecs ); ui.ignoreOwnClipboardChanges->setChecked( p.ignoreOwnClipboardChanges ); ui.scanToMainWindow->setChecked( p.scanToMainWindow ); ui.scanPopupUnpinnedWindowFlags->setCurrentIndex( p.scanPopupUnpinnedWindowFlags ); @@ -238,22 +201,6 @@ Preferences::Preferences( QWidget * parent, Config::Class & cfg_ ): // Different platforms have different keys available -#ifdef Q_OS_WIN32 - ui.winKey->hide(); -#else - ui.leftAlt->hide(); - ui.rightAlt->hide(); - ui.leftCtrl->hide(); - ui.rightCtrl->hide(); - ui.leftShift->hide(); - ui.rightShift->hide(); -#ifdef Q_OS_MAC - ui.altKey->setText( "Opt" ); - ui.winKey->setText( "Ctrl" ); - ui.ctrlKey->setText( "Cmd" ); -#endif -#endif - //Platform-specific options #ifndef ENABLE_SPWF_CUSTOMIZATION @@ -415,21 +362,7 @@ Config::Preferences Preferences::getPreferences() p.enableScanPopup = ui.enableScanPopup->isChecked(); p.startWithScanPopupOn = ui.startWithScanPopupOn->isChecked(); - p.enableScanPopupModifiers = ui.enableScanPopupModifiers->isChecked(); - p.scanPopupModifiers += ui.altKey->isChecked() ? KeyboardState::Alt : 0; - p.scanPopupModifiers += ui.ctrlKey->isChecked() ? KeyboardState::Ctrl: 0; - p.scanPopupModifiers += ui.shiftKey->isChecked() ? KeyboardState::Shift: 0; - p.scanPopupModifiers += ui.winKey->isChecked() ? KeyboardState::Win: 0; - p.scanPopupModifiers += ui.leftAlt->isChecked() ? KeyboardState::LeftAlt: 0; - p.scanPopupModifiers += ui.rightAlt->isChecked() ? KeyboardState::RightAlt: 0; - p.scanPopupModifiers += ui.leftCtrl->isChecked() ? KeyboardState::LeftCtrl: 0; - p.scanPopupModifiers += ui.rightCtrl->isChecked() ? KeyboardState::RightCtrl: 0; - p.scanPopupModifiers += ui.leftShift->isChecked() ? KeyboardState::LeftShift: 0; - p.scanPopupModifiers += ui.rightShift->isChecked() ? KeyboardState::RightShift: 0; - - p.scanPopupAltMode = ui.scanPopupAltMode->isChecked(); - p.scanPopupAltModeSecs = ui.scanPopupAltModeSecs->value(); p.ignoreOwnClipboardChanges = ui.ignoreOwnClipboardChanges->isChecked(); p.scanToMainWindow = ui.scanToMainWindow->isChecked(); #ifdef HAVE_X11 @@ -582,7 +515,7 @@ Config::Preferences Preferences::getPreferences() void Preferences::enableScanPopupToggled( bool b ) { - ui.scanPopupModifiers->setEnabled( b && ui.enableScanPopupModifiers->isChecked() ); + ui.scanPopupModifiers->setEnabled( b ); } void Preferences::enableScanPopupModifiersToggled( bool b ) @@ -592,62 +525,11 @@ void Preferences::enableScanPopupModifiersToggled( bool b ) ui.showScanFlag->setChecked( false ); } -void Preferences::showScanFlagToggled( bool b ) -{ - if( b ) - ui.enableScanPopupModifiers->setChecked( false ); -} - void Preferences::on_scanPopupUnpinnedWindowFlags_currentIndexChanged( int index ) { ui.scanPopupUnpinnedBypassWMHint->setEnabled( Config::spwfFromInt( index ) != Config::SPWF_default ); } -void Preferences::wholeAltClicked( bool b ) -{ - if ( b ) - { - ui.leftAlt->setChecked( false ); - ui.rightAlt->setChecked( false ); - } -} - -void Preferences::wholeCtrlClicked( bool b ) -{ - if ( b ) - { - ui.leftCtrl->setChecked( false ); - ui.rightCtrl->setChecked( false ); - } -} - -void Preferences::wholeShiftClicked( bool b ) -{ - if ( b ) - { - ui.leftShift->setChecked( false ); - ui.rightShift->setChecked( false ); - } -} - -void Preferences::sideAltClicked( bool ) -{ - if ( ui.leftAlt->isChecked() || ui.rightAlt->isChecked() ) - ui.altKey->setChecked( false ); -} - -void Preferences::sideCtrlClicked( bool ) -{ - if ( ui.leftCtrl->isChecked() || ui.rightCtrl->isChecked() ) - ui.ctrlKey->setChecked( false ); -} - -void Preferences::sideShiftClicked( bool ) -{ - if ( ui.leftShift->isChecked() || ui.rightShift->isChecked() ) - ui.shiftKey->setChecked( false ); -} - void Preferences::on_enableMainWindowHotkey_toggled( bool checked ) { ui.mainWindowHotkey->setEnabled( checked ); diff --git a/preferences.hh b/preferences.hh index dcde4cc7..b5f5255d 100644 --- a/preferences.hh +++ b/preferences.hh @@ -35,17 +35,8 @@ private slots: void enableScanPopupToggled( bool ); void enableScanPopupModifiersToggled( bool ); - void showScanFlagToggled( bool b ); void on_scanPopupUnpinnedWindowFlags_currentIndexChanged( int index ); - void wholeAltClicked( bool ); - void wholeCtrlClicked( bool ); - void wholeShiftClicked( bool ); - - void sideAltClicked( bool ); - void sideCtrlClicked( bool ); - void sideShiftClicked( bool ); - void on_enableMainWindowHotkey_toggled( bool checked ); void on_enableClipboardHotkey_toggled( bool checked ); diff --git a/preferences.ui b/preferences.ui index f4df1e9f..ac4eb794 100644 --- a/preferences.ui +++ b/preferences.ui @@ -452,17 +452,6 @@ the program would always start with the scan popup active. - - - - With this enabled, the popup would only show up if all chosen keys are -in the pressed state when the word selection changes. - - - Only show popup when all selected keys are kept pressed: - - - @@ -487,218 +476,9 @@ in the pressed state when the word selection changes. 0 - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - - Left Ctrl only - - - Left Ctrl - - - - - - - Right Shift only - - - Right Shift - - - - - - - Alt key - - - Alt - - - - - - - Ctrl key - - - Ctrl - - - - - - - Left Alt only - - - Left Alt - - - - - - - Shift key - - - Shift - - - - - - - Right Alt only - - - Right Alt - - - - - - - Right Ctrl only - - - Right Ctrl - - - - - - - Left Shift only - - - Left Shift - - - - - - - Windows key or Meta key - - - Win/Meta - - - - - - - - - QFrame::NoFrame - - - QFrame::Raised - - - 0 - - - - 0 - - - 0 - - - 0 - - - 0 - - - - - - - - - - - - Normally, in order to activate a popup you have to -maintain the chosen keys pressed while you select -a word. With this enabled, the chosen keys may also -be pressed shortly after the selection is done. - - - Keys may also be pressed afterwards, within - - - - - - - To avoid false positives, the keys are only monitored -after the selection's done for a limited amount of -seconds, which is specified here. - - - false - - - true - - - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter - - - 1 - - - 99 - - - - - - - secs - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - @@ -1911,19 +1691,6 @@ from Stardict, Babylon and GLS dictionaries cbAutostart interfaceLanguage startWithScanPopupOn - enableScanPopupModifiers - leftCtrl - rightShift - altKey - ctrlKey - leftAlt - shiftKey - rightAlt - rightCtrl - leftShift - winKey - scanPopupAltMode - scanPopupAltModeSecs useProxyServer proxyType proxyHost diff --git a/qt-style-st-babylon.css b/qt-style-st-babylon.css index f438c21b..6368f32a 100644 --- a/qt-style-st-babylon.css +++ b/qt-style-st-babylon.css @@ -1,7 +1,7 @@ MainWindow #translateLine, ScanPopup #translateLine, MainWindow #searchPane #wordList, MainWindow #dictsPane #dictsList, MainWindow #historyPane #historyList, MainWindow #favoritesPane #favoritesTree { - background: white; + } MainWindow #searchPane #translateLine diff --git a/qt-style-st-modern.css b/qt-style-st-modern.css index f079f086..1d31721c 100644 --- a/qt-style-st-modern.css +++ b/qt-style-st-modern.css @@ -1,7 +1,7 @@ MainWindow #translateLine, ScanPopup #translateLine, MainWindow #wordList, MainWindow #dictsPane #dictsList, MainWindow #historyPane #historyList, MainWindow #favoritesPane #favoritesTree { - background: white; + } /* WARNING: hides all separators! */ diff --git a/qt-style.css b/qt-style.css index dd35310f..7bf3b9f6 100644 --- a/qt-style.css +++ b/qt-style.css @@ -3,9 +3,8 @@ MainWindow #translateLine, ScanPopup #translateLine, MainWindow #wordList, MainW } MainWindow #translateLine[noResults="true"], -ScanPopup #translateLine[noResults="true"] -{ - background: #febb7d; +ScanPopup #translateLine[noResults="true"] { + background: #febb7d; } #navToolbar #menuButton::menu-indicator { diff --git a/resources.qrc b/resources.qrc index ef06f186..5c7160d6 100644 --- a/resources.qrc +++ b/resources.qrc @@ -57,9 +57,6 @@ icons/icon32_gls.png icons/folder.png icons/ontop.svg - resources/jquery-3.6.0.slim.min.js - resources/gd-custom.js - resources/gd-builtin.js icons/addtab.svg icons/book.svg icons/bookcase.svg diff --git a/scanpopup.cc b/scanpopup.cc index c3073b5a..9a3e5468 100644 --- a/scanpopup.cc +++ b/scanpopup.cc @@ -114,6 +114,8 @@ ScanPopup::ScanPopup( QWidget * parent, definition, SLOT( receiveExpandOptionalParts( bool ) ) ); connect( definition, SIGNAL( setExpandMode( bool ) ), this, SIGNAL( setExpandMode( bool ) ) ); + connect( definition, SIGNAL( inspectSignal( QWebEnginePage* ) ), + this, SLOT( inspectElementWhenPinned( QWebEnginePage* ) ) ); connect( definition, SIGNAL( forceAddWordToHistory( QString ) ), this, SIGNAL( forceAddWordToHistory( QString ) ) ); connect( this, SIGNAL( closeMenu() ), @@ -369,6 +371,11 @@ void ScanPopup::disableScanning() } } +void ScanPopup::inspectElementWhenPinned( QWebEnginePage * page ){ + if(cfg.pinPopupWindow) + emit inspectSignal(page); +} + void ScanPopup::applyZoomFactor() { definition->setZoomFactor( cfg.preferences.zoomFactor ); @@ -514,6 +521,8 @@ void ScanPopup::delayShow() void ScanPopup::clipboardChanged( QClipboard::Mode m ) { + if( !cfg.preferences.trackClipboardChanges ) + return; if( !isScanningEnabled ) return; @@ -1085,6 +1094,7 @@ void ScanPopup::pinButtonClicked( bool checked ) mouseEnteredOnce = true; } + cfg.pinPopupWindow = checked; show(); } diff --git a/scanpopup.hh b/scanpopup.hh index e081ae0a..a7c68b91 100644 --- a/scanpopup.hh +++ b/scanpopup.hh @@ -63,6 +63,7 @@ signals: void closeMenu(); /// Signals to set expand optional parts mode (retranslation from/to MainWindow and dictionary bar) void setExpandMode( bool expand ); + void inspectSignal(QWebEnginePage * page); void setViewExpandMode( bool expand ); /// Signal to switch expand optional parts mode void switchExpandMode(); @@ -92,6 +93,7 @@ signals: public slots: void requestWindowFocus(); + void inspectElementWhenPinned( QWebEnginePage * page ); /// Translates the word from the clipboard, showing the window etc. void translateWordFromClipboard(); /// Translates the word from the clipboard selection diff --git a/scripts.qrc b/scripts.qrc new file mode 100644 index 00000000..9ceb592f --- /dev/null +++ b/scripts.qrc @@ -0,0 +1,10 @@ + + + scripts/iframeResizer.contentWindow.min.js + scripts/iframeResizer.min.js + scripts/gd-builtin.js + scripts/gd-custom.js + scripts/jquery-3.6.0.slim.min.js + scripts/iframe-defer.js + + diff --git a/resources/gd-builtin.js b/scripts/gd-builtin.js similarity index 100% rename from resources/gd-builtin.js rename to scripts/gd-builtin.js diff --git a/resources/gd-custom.js b/scripts/gd-custom.js similarity index 73% rename from resources/gd-custom.js rename to scripts/gd-custom.js index 59ca36ad..087e0ac6 100644 --- a/resources/gd-custom.js +++ b/scripts/gd-custom.js @@ -49,23 +49,7 @@ }); //monitor iframe height. - - $("iframe").on("load", function () { - var iframe = $(this); - resizeIframe(iframe[0]); - }); - - function resizeIframe(obj) { - setInterval(function () { - //in some cases ,the website in iframe will load result after document has been loaded. the height will continue to change. - var height = $(obj).contents().height(); - $(obj).height(Math.min(2000, height)); - if (height >= 2000) { - obj.scrolling = "yes"; - } - }, 500); - } - + $('iframe').iFrameResize({ checkOrigin:false,maxHeight :800,scrolling:true,warningTimeout:0,minHeight :250,log:true,autoResize:false}); }); })($_$); diff --git a/scripts/iframe-defer.js b/scripts/iframe-defer.js new file mode 100644 index 00000000..8bd59800 --- /dev/null +++ b/scripts/iframe-defer.js @@ -0,0 +1,20 @@ +var start_time=new Date().getTime(); + +var interval = setInterval(function () { + var end_time=new Date().getTime(); + //for 10 seconds. + if(end_time-start_time>=10000){ + clearInterval(interval); + } + + const body = document.body; + const html = document.documentElement; + + const height = Math.max(body.scrollHeight, body.offsetHeight, + html.clientHeight, html.scrollHeight, html.offsetHeight); + + if ('parentIFrame' in window) { + console.log("iframe set height to " + height); + parentIFrame.size(height); + } +}, 500); diff --git a/scripts/iframeResizer.contentWindow.min.js b/scripts/iframeResizer.contentWindow.min.js new file mode 100644 index 00000000..e33b95f7 --- /dev/null +++ b/scripts/iframeResizer.contentWindow.min.js @@ -0,0 +1,10 @@ +/*! iFrame Resizer (iframeSizer.contentWindow.min.js) - v4.3.2 - 2021-10-18 + * Desc: Include this file in any page being loaded into an iframe + * to force the iframe to resize to the content size. + * Requires: iframeResizer.min.js on host page. + * Copyright: (c) 2021 David J. Bradshaw - dave@bradshaw.net + * License: MIT + */ + +!function(c){if("undefined"!=typeof window){var i=!0,o=10,r="",a=0,u="",s=null,d="",l=!1,f={resize:1,click:1},m=128,h=!0,g=1,n="bodyOffset",p=n,v=!0,y="",w={},b=32,T=null,E=!1,O=!1,S="[iFrameSizer]",M=S.length,I="",N={max:1,min:1,bodyScroll:1,documentElementScroll:1},A="child",C=!0,z=window.parent,k="*",R=0,x=!1,e=null,L=16,F=1,t="scroll",P=t,D=window,j=function(){re("onMessage function not defined")},q=function(){},H=function(){},W={height:function(){return re("Custom height calculation function not defined"),document.documentElement.offsetHeight},width:function(){return re("Custom width calculation function not defined"),document.body.scrollWidth}},B={},J=!1;try{var U=Object.create({},{passive:{get:function(){J=!0}}});window.addEventListener("test",ee,U),window.removeEventListener("test",ee,U)}catch(e){}var V,X,Y,K,Q,G,Z={bodyOffset:function(){return document.body.offsetHeight+pe("marginTop")+pe("marginBottom")},offset:function(){return Z.bodyOffset()},bodyScroll:function(){return document.body.scrollHeight},custom:function(){return W.height()},documentElementOffset:function(){return document.documentElement.offsetHeight},documentElementScroll:function(){return document.documentElement.scrollHeight},max:function(){return Math.max.apply(null,ye(Z))},min:function(){return Math.min.apply(null,ye(Z))},grow:function(){return Z.max()},lowestElement:function(){return Math.max(Z.bodyOffset()||Z.documentElementOffset(),ve("bottom",be()))},taggedElement:function(){return we("bottom","data-iframe-height")}},$={bodyScroll:function(){return document.body.scrollWidth},bodyOffset:function(){return document.body.offsetWidth},custom:function(){return W.width()},documentElementScroll:function(){return document.documentElement.scrollWidth},documentElementOffset:function(){return document.documentElement.offsetWidth},scroll:function(){return Math.max($.bodyScroll(),$.documentElementScroll())},max:function(){return Math.max.apply(null,ye($))},min:function(){return Math.min.apply(null,ye($))},rightMostElement:function(){return ve("right",be())},taggedElement:function(){return we("right","data-iframe-width")}},_=(V=Te,Q=null,G=0,function(){var e=Date.now(),t=L-(e-(G=G||e));return X=this,Y=arguments,t<=0||LF[s]["max"+e])throw new Error("Value for min"+e+" can not be greater than max"+e)}s in F&&"iFrameResizer"in t?N(s,"Ignored iFrame, already setup."):(o(e),function(){switch(T(s,"IFrame scrolling "+(F[s]&&F[s].scrolling?"enabled":"disabled")+" for "+s),t.style.overflow=!1===(F[s]&&F[s].scrolling)?"hidden":"auto",F[s]&&F[s].scrolling){case"omit":break;case!0:t.scrolling="yes";break;case!1:t.scrolling="no";break;default:t.scrolling=F[s]?F[s].scrolling:"no"}}(),c("Height"),c("Width"),d("maxHeight"),d("minHeight"),d("maxWidth"),d("minWidth"),"number"!=typeof(F[s]&&F[s].bodyMargin)&&"0"!==(F[s]&&F[s].bodyMargin)||(F[s].bodyMarginV1=F[s].bodyMargin,F[s].bodyMargin=F[s].bodyMargin+"px"),n(q(s)),F[s]&&(F[s].iframe.iFrameResizer={close:C.bind(null,F[s].iframe),removeListeners:p.bind(null,F[s].iframe),resize:B.bind(null,"Window resize","resize",F[s].iframe),moveToAnchor:function(e){B("Move to anchor","moveToAnchor:"+e,F[s].iframe,s)},sendMessage:function(e){B("Send Message","message:"+(e=JSON.stringify(e)),F[s].iframe,s)}}))}function c(e,n){null===i&&(i=setTimeout(function(){i=null,e()},n))}function n(){"hidden"!==document.visibilityState&&(T("document","Trigger event: Visibility change"),c(function(){w("Tab Visible","resize")},16))}function w(i,t){Object.keys(F).forEach(function(e){var n;F[n=e]&&"parent"===F[n].resizeFrom&&F[n].autoResize&&!F[n].firstRun&&B(i,t,F[e].iframe,e)})}function b(){O(window,"message",e),O(window,"resize",function(){var e;T("window","Trigger event: "+(e="resize")),c(function(){w("Window "+e,"resize")},16)}),O(document,"visibilitychange",n),O(document,"-webkit-visibilitychange",n)}function y(){function t(e,n){n&&(function(){if(!n.tagName)throw new TypeError("Object is not a valid DOM element");if("IFRAME"!==n.tagName.toUpperCase())throw new TypeError("Expected "; dr->getData().resize( result.size() ); @@ -538,7 +537,7 @@ void WebSiteDictionary::loadIcon() noexcept if( fInfo.isFile() ) loadIconFromFile( fInfo.absoluteFilePath(), true ); } - if( dictionaryIcon.isNull() ) + if( dictionaryIcon.isNull() && !loadIconFromText(":/icons/webdict.svg", QString::fromStdString(name ) ) ) dictionaryIcon = dictionaryNativeIcon = QIcon(":/icons/webdict.svg"); dictionaryIconLoaded = true; } diff --git a/weburlrequestinterceptor.cpp b/weburlrequestinterceptor.cpp index 1fcff130..412532e9 100644 --- a/weburlrequestinterceptor.cpp +++ b/weburlrequestinterceptor.cpp @@ -21,7 +21,12 @@ void WebUrlRequestInterceptor::interceptRequest( QWebEngineUrlRequestInfo &info) //whitelist url does not block return; } - if(Utils::isHtmlResources(info.requestUrl())){ + if( info.resourceType() == QWebEngineUrlRequestInfo::ResourceTypeImage + || info.resourceType() == QWebEngineUrlRequestInfo::ResourceTypeFontResource + || info.resourceType() == QWebEngineUrlRequestInfo::ResourceTypeStylesheet + || info.resourceType() == QWebEngineUrlRequestInfo::ResourceTypeMedia + || Utils::isHtmlResources( info.requestUrl() ) ) + { //let throuth the resources file. return; } diff --git a/wordlist.cc b/wordlist.cc index d560a0c2..f02988b0 100644 --- a/wordlist.cc +++ b/wordlist.cc @@ -51,52 +51,22 @@ void WordList::updateMatchResults( bool finished ) WordFinder::SearchResults const & results = wordFinder->getResults(); setUpdatesEnabled( false ); + //clear all existed items + clear(); for( unsigned x = 0; x < results.size(); ++x ) { - QListWidgetItem * i = item( x ); + QListWidgetItem * i = new QListWidgetItem( results[ x ].first, this ); + i->setToolTip( results[ x ].first ); - if ( !i ) + if( results[ x ].second ) { - i = new QListWidgetItem( results[ x ].first, this ); - i->setToolTip( results[ x ].first ); - - if ( results[ x ].second ) - { - QFont f = i->font(); - f.setItalic( true ); - i->setFont( f ); - } - addItem( i ); - } - else - { - if ( i->text() != results[ x ].first ) - { - i->setText( results[ x ].first ); - i->setToolTip( results[ x ].first ); - } - QFont f = i->font(); - if ( f.italic() != results[ x ].second ) - { - f.setItalic( results[ x ].second ); - i->setFont( f ); - } + f.setItalic( true ); + i->setFont( f ); } - i->setTextAlignment(Qt::AlignLeft); - } - - while ( count() > (int) results.size() ) - { - // Chop off any extra items that were there - QListWidgetItem * i = takeItem( count() - 1 ); - - if ( i ) - delete i; - else - break; + i->setTextAlignment( Qt::AlignLeft ); } if ( count() ) @@ -140,21 +110,4 @@ void WordList::refreshTranslateLine() translateLine->setStyleSheet( translateLine->styleSheet() ); } -} - -void WordList::resizeEvent( QResizeEvent * ev ) -{ - // In some rare cases Qt start send QResizeEvent recursively - // up to full stack depletion (tested on Qt 4.8.5, 4.8.6). - // We use this trick to break such suicidal process. - - for( int x = 0; x < resizedSizes.size(); x++ ) - if( resizedSizes.at( x ) == ev->size() ) - return; - - resizedSizes.push_back( ev->size() ); - - QListWidget::resizeEvent( ev ); - - resizedSizes.pop_back(); -} +} \ No newline at end of file diff --git a/wordlist.hh b/wordlist.hh index 71b0131f..26a04bae 100644 --- a/wordlist.hh +++ b/wordlist.hh @@ -20,7 +20,6 @@ public: { translateLine = line; } protected: - virtual void resizeEvent( QResizeEvent * ev ); signals: void statusBarMessage(QString const & message, int timeout = 0, QPixmap const & pixmap = QPixmap());