FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Update base and other Qt translations for installers by ozgurerturk · Pull Request #4179 · sqlitebrowser/sqlitebrowser · GitHub

Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .wxs  (2) .yml  (2) All 2 file types selected
Only manifest files
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
57 changes: 56 additions & 1 deletion .github/workflows/cppcmake-ubuntu.yml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
- name: Install and cache dependencies
uses: awalsh128/cache-apt-pkgs-action@v1.6.0
with:
packages: libfuse2 libqcustomplot-dev libqscintilla2-qt5-dev libqt5svg5 ninja-build qttools5-dev
packages: libfuse2 libqcustomplot-dev libqscintilla2-qt5-dev libqt5svg5 ninja-build qttools5-dev qttranslations5-l10n
version: ${{ matrix.os }}

- if: matrix.bundle == 'SQLCipher'
Expand Down Expand Up @@ -81,6 +81,61 @@ jobs:
working-directory: ./appbuild
run: ninja test

- name: Checkout Missing Translations
uses: actions/checkout@v7
with:
repository: 'qt/qttranslations'
ref: '5.15-tr'
path: 'src/translations/qttranslations'

sparse-checkout-cone-mode: false

sparse-checkout: |
/translations/qt_pt_BR.ts
/translations/qtbase_pt_BR.ts
/translations/qtmultimedia_pt_BR.ts
/translations/qtscript_pt_BR.ts
/translations/qtxmlpatterns_pt_BR.ts
/translations/qt_sv.ts
/translations/qtbase_sv.ts
/translations/qtmultimedia_sv.ts
/translations/qtscript_sv.ts
/translations/qtxmlpatterns_sv.ts
/translations/qt_zh_CN.ts
/translations/qtbase_zh_CN.ts
/translations/qtmultimedia_zh_CN.ts
/translations/qtscript_zh_CN.ts
/translations/qtxmlpatterns_zh_CN.ts

- name: Compile Missing Translations
run: |
set -euxo pipefail

source_dir="$GITHUB_WORKSPACE/src/translations/qttranslations/translations"
output_dir="$GITHUB_WORKSPACE/appdir/usr/translations"

mkdir -p "$output_dir"

catalogs=(qt qtbase qtmultimedia qtscript qtxmlpatterns)
locales=(ar cs de en es fr id it ja ko nl pl pt_BR ro ru sv tr uk zh_CN zh_TW)

for locale in "${locales[@]}"; do
for catalog in "${catalogs[@]}"; do
translation="/usr/share/qt5/translations/${catalog}_${locale}.qm"
if [[ -f "$translation" ]]; then
cp -v "$translation" "$output_dir/"
fi
done
done

for source in "$source_dir"/*.ts; do
output_name="$(basename "${source%.ts}").qm"
lrelease "$source" -qm "$output_dir/$output_name"
done

cp -v "$output_dir/qt_zh_CN.qm" \
"$output_dir/qt_zh.qm"

- name: Build AppImage
run: |
wget -c -nv "https://github.com/linuxdeploy/linuxdeploy/releases/download/1-alpha-20240109-1/linuxdeploy-$(uname -m).AppImage"
Expand Down
52 changes: 52 additions & 0 deletions .github/workflows/cppcmake-windows.yml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,58 @@ jobs:
cache-key-prefix: "cache"
version: 5.15.2

- name: Checkout Missing Translations
uses: actions/checkout@v7
with:
repository: 'qt/qttranslations'
ref: '5.15-tr'
path: 'src/translations/qttranslations'

sparse-checkout-cone-mode: false

sparse-checkout: |
translations/qt_pt_BR.ts
translations/qtbase_pt_BR.ts
translations/qtmultimedia_pt_BR.ts
translations/qtscript_pt_BR.ts
translations/qtxmlpatterns_pt_BR.ts
translations/qt_sv.ts
translations/qtbase_sv.ts
translations/qtmultimedia_sv.ts
translations/qtscript_sv.ts
translations/qtxmlpatterns_sv.ts
translations/qt_zh_CN.ts
translations/qtbase_zh_CN.ts
translations/qtmultimedia_zh_CN.ts
translations/qtscript_zh_CN.ts
translations/qtxmlpatterns_zh_CN.ts

- name: Compile Missing Translations
shell: pwsh
run: |
$ErrorActionPreference = "Stop"

$sourceDir = "$env:GITHUB_WORKSPACE\src\translations\qttranslations\translations"
$outputDir = "$env:QT_ROOT_DIR\translations"

New-Item -ItemType Directory -Force -Path $outputDir | Out-Null

Get-ChildItem "$sourceDir\*.ts" | ForEach-Object {
$outputName = "$($_.BaseName).qm"

if ($_.BaseName -eq "qt_zh_CN") {
$outputName = "qt_zh.qm"
}

& "$env:QT_ROOT_DIR\bin\lrelease.exe" `
$_.FullName `
-qm (Join-Path $outputDir $outputName)

if ($LASTEXITCODE -ne 0) {
throw "Failed to compile $($_.Name)"
}
}

- name: Install VS2019
run: choco install visualstudio2019community --package-parameters "--add Microsoft.VisualStudio.Component.VC.Tools.x86.x64 --add Microsoft.VisualStudio.Component.Windows10SDK.19041 --add Microsoft.VisualStudio.Component.VC.Redist.MSM"

Expand Down
63 changes: 52 additions & 11 deletions installer/windows/translations.wxs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<DirectoryRef Id='INSTALLDIR'>

<!--
Each language requires 6 *.qm files to work properly.
Each language requires 5 *.qm files to work properly.

The list of the required files:
- qt_<language_code>.qm
Expand All @@ -18,12 +18,11 @@
- qtxmlpatterns_<language_code>.qm

Notes:
- Arabic is missing "qtxmlpatterns_ar.qm" but seems to work without a problem.
- Arabic and Turkish are missing their respective "qtxmlpatterns" qm files but seems to work without a problem.

- Chinese (China), Chinese (Taiwan), and Portuguese have only one file (qt_<language_code>.qm), so
the default buttons are not translated for these languages.
- Chinese (Taiwan) is missing "qtscript_zh_TW.qm" but seems to work without a problem.

- Turkish language doesn't have any *.qm files at all, so no default buttons translation also.
- Chinese (China), Brazilian Portuguese and Swedish translations are compiled from the Qt translation sources during the Windows workflow.
-->

<Directory Id="translations" Name="translations">
Expand All @@ -35,10 +34,17 @@
<Component><File Source="$(var.QtPath)\translations\qtscript_ar.qm" /></Component>

<!-- Chinese (China) -->
<Component><File Source="$(var.QtPath)\translations\qt_zh_CN.qm" /></Component>
<Component><File Source="$(var.QtPath)\translations\qt_zh.qm" /></Component>
<Component><File Source="$(var.QtPath)\translations\qtbase_zh_CN.qm" /></Component>
<Component><File Source="$(var.QtPath)\translations\qtmultimedia_zh_CN.qm" /></Component>
<Component><File Source="$(var.QtPath)\translations\qtscript_zh_CN.qm" /></Component>
<Component><File Source="$(var.QtPath)\translations\qtxmlpatterns_zh_CN.qm" /></Component>

<!-- Chinese (Taiwan) -->
<Component><File Source="$(var.QtPath)\translations\qt_zh_TW.qm" /></Component>
<Component><File Source="$(var.QtPath)\translations\qtbase_zh_TW.qm" /></Component>
<Component><File Source="$(var.QtPath)\translations\qtmultimedia_zh_TW.qm" /></Component>
<Component><File Source="$(var.QtPath)\translations\qtxmlpatterns_zh_TW.qm" /></Component>

<!-- Czech -->
<Component><File Source="$(var.QtPath)\translations\qt_cs.qm" /></Component>
Expand Down Expand Up @@ -97,7 +103,11 @@
<Component><File Source="$(var.QtPath)\translations\qtxmlpatterns_pl.qm" /></Component>

<!-- Brazilian Portuguese -->
<Component><File Source="$(var.QtPath)\translations\qt_pt.qm" /></Component>
<Component><File Source="$(var.QtPath)\translations\qt_pt_BR.qm" /></Component>
<Component><File Source="$(var.QtPath)\translations\qtbase_pt_BR.qm" /></Component>
<Component><File Source="$(var.QtPath)\translations\qtmultimedia_pt_BR.qm" /></Component>
<Component><File Source="$(var.QtPath)\translations\qtscript_pt_BR.qm" /></Component>
<Component><File Source="$(var.QtPath)\translations\qtxmlpatterns_pt_BR.qm" /></Component>

<!-- Russian -->
<Component><File Source="$(var.QtPath)\translations\qt_ru.qm" /></Component>
Expand All @@ -113,15 +123,25 @@
<Component><File Source="$(var.QtPath)\translations\qtscript_es.qm" /></Component>
<Component><File Source="$(var.QtPath)\translations\qtxmlpatterns_es.qm" /></Component>

<!-- Swedish -->
<Component><File Source="$(var.QtPath)\translations\qt_sv.qm" /></Component>
<Component><File Source="$(var.QtPath)\translations\qtbase_sv.qm" /></Component>
<Component><File Source="$(var.QtPath)\translations\qtmultimedia_sv.qm" /></Component>
<Component><File Source="$(var.QtPath)\translations\qtscript_sv.qm" /></Component>
<Component><File Source="$(var.QtPath)\translations\qtxmlpatterns_sv.qm" /></Component>

<!-- Turkish -->
<Component><File Source="$(var.QtPath)\translations\qt_tr.qm" /></Component>
<Component><File Source="$(var.QtPath)\translations\qtbase_tr.qm" /></Component>
<Component><File Source="$(var.QtPath)\translations\qtmultimedia_tr.qm" /></Component>
<Component><File Source="$(var.QtPath)\translations\qtscript_tr.qm" /></Component>

<!-- Ukrainian -->
<Component><File Source="$(var.QtPath)\translations\qt_uk.qm" /></Component>
<Component><File Source="$(var.QtPath)\translations\qtbase_uk.qm" /></Component>
<Component><File Source="$(var.QtPath)\translations\qtmultimedia_uk.qm" /></Component>
<Component><File Source="$(var.QtPath)\translations\qtscript_uk.qm" /></Component>
<Component><File Source="$(var.QtPath)\translations\qtxmlpatterns_uk.qm" /></Component>

</Directory>

</DirectoryRef>
Expand All @@ -135,10 +155,17 @@
<ComponentRef Id="qtscript_ar.qm" />

<!-- Chinese (China) -->
<ComponentRef Id="qt_zh_CN.qm" />
<ComponentRef Id="qt_zh.qm" />
<ComponentRef Id="qtbase_zh_CN.qm" />
<ComponentRef Id="qtmultimedia_zh_CN.qm" />
<ComponentRef Id="qtscript_zh_CN.qm" />
<ComponentRef Id="qtxmlpatterns_zh_CN.qm" />

<!-- Chinese (Taiwan) -->
<ComponentRef Id="qt_zh_TW.qm" />
<ComponentRef Id="qtbase_zh_TW.qm" />
<ComponentRef Id="qtmultimedia_zh_TW.qm" />
<ComponentRef Id="qtxmlpatterns_zh_TW.qm" />

<!-- Czech -->
<ComponentRef Id="qt_cs.qm" />
Expand Down Expand Up @@ -197,7 +224,11 @@
<ComponentRef Id="qtxmlpatterns_pl.qm" />

<!-- Brazilian Portuguese -->
<ComponentRef Id="qt_pt.qm" />
<ComponentRef Id="qt_pt_BR.qm" />
<ComponentRef Id="qtbase_pt_BR.qm" />
<ComponentRef Id="qtmultimedia_pt_BR.qm" />
<ComponentRef Id="qtscript_pt_BR.qm" />
<ComponentRef Id="qtxmlpatterns_pt_BR.qm" />

<!-- Russian -->
<ComponentRef Id="qt_ru.qm" />
Expand All @@ -213,15 +244,25 @@
<ComponentRef Id="qtscript_es.qm" />
<ComponentRef Id="qtxmlpatterns_es.qm" />

<!-- Swedish -->
<ComponentRef Id="qt_sv.qm" />
<ComponentRef Id="qtbase_sv.qm" />
<ComponentRef Id="qtmultimedia_sv.qm" />
<ComponentRef Id="qtscript_sv.qm" />
<ComponentRef Id="qtxmlpatterns_sv.qm" />

<!-- Turkish -->
<ComponentRef Id="qt_tr.qm" />
<ComponentRef Id="qtbase_tr.qm" />
<ComponentRef Id="qtmultimedia_tr.qm" />
<ComponentRef Id="qtscript_tr.qm" />

<!-- Ukrainian -->
<ComponentRef Id="qt_uk.qm" />
<ComponentRef Id="qtbase_uk.qm" />
<ComponentRef Id="qtmultimedia_uk.qm" />
<ComponentRef Id="qtscript_uk.qm" />
<ComponentRef Id="qtxmlpatterns_uk.qm" />

</ComponentGroup>

</Fragment>
Expand Down
44 changes: 29 additions & 15 deletions installer/windows_on_arm/translations.wxs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -8,22 +8,12 @@
<DirectoryRef Id='INSTALLDIR'>

<!--
Each language requires 6 *.qm files to work properly.

The list of the required files:
- qt_<language_code>.qm
- qtbase_<language_code>.qm
- qtmultimedia_<language_code>.qm
- qtscript_<language_code>.qm
- qtxmlpatterns_<language_code>.qm
Qt 6 translations can be either a standalone qt_<language_code>.qm catalog or a meta catalog
with qtbase_<language_code>.qm and qtmultimedia_<language_code>.qm dependencies.

Notes:
- Arabic is missing "qtxmlpatterns_ar.qm" but seems to work without a problem.
- The Chinese (China) Qt catalog is installed as qt_zh.qm to match the DB Browser locale code.

- Chinese (China), Chinese (Taiwan), and Portuguese have only one file (qt_<language_code>.qm), so
the default buttons are not translated for these languages.

- Turkish language doesn't have any *.qm files at all, so no default buttons translation also.
-->

<Directory Id="translations" Name="translations">
Expand All @@ -34,10 +24,14 @@
<Component><File Source="$(var.QtPath)\translations\qtmultimedia_ar.qm" /></Component>

<!-- Chinese (China) -->
<Component><File Source="$(var.QtPath)\translations\qt_zh_CN.qm" /></Component>
<Component Id="qt_zh.qm"><File Source="$(var.QtPath)\translations\qt_zh_CN.qm" Name="qt_zh.qm" /></Component>
<Component><File Source="$(var.QtPath)\translations\qtbase_zh_CN.qm" /></Component>
<Component><File Source="$(var.QtPath)\translations\qtmultimedia_zh_CN.qm" /></Component>

<!-- Chinese (Taiwan) -->
<Component><File Source="$(var.QtPath)\translations\qt_zh_TW.qm" /></Component>
<Component><File Source="$(var.QtPath)\translations\qtbase_zh_TW.qm" /></Component>
<Component><File Source="$(var.QtPath)\translations\qtmultimedia_zh_TW.qm" /></Component>

<!-- Czech -->
<Component><File Source="$(var.QtPath)\translations\qt_cs.qm" /></Component>
Expand Down Expand Up @@ -81,6 +75,8 @@

<!-- Brazilian Portuguese -->
<Component><File Source="$(var.QtPath)\translations\qt_pt_BR.qm" /></Component>
<Component><File Source="$(var.QtPath)\translations\qtbase_pt_BR.qm" /></Component>
<Component><File Source="$(var.QtPath)\translations\qtmultimedia_pt_BR.qm" /></Component>

<!-- Russian -->
<Component><File Source="$(var.QtPath)\translations\qt_ru.qm" /></Component>
Expand All @@ -92,7 +88,13 @@
<Component><File Source="$(var.QtPath)\translations\qtbase_es.qm" /></Component>
<Component><File Source="$(var.QtPath)\translations\qtmultimedia_es.qm" /></Component>

<!-- Swedish -->
<Component><File Source="$(var.QtPath)\translations\qt_sv.qm" /></Component>

<!-- Turkish -->
<Component><File Source="$(var.QtPath)\translations\qt_tr.qm" /></Component>
<Component><File Source="$(var.QtPath)\translations\qtbase_tr.qm" /></Component>
<Component><File Source="$(var.QtPath)\translations\qtmultimedia_tr.qm" /></Component>

<!-- Ukrainian -->
<Component><File Source="$(var.QtPath)\translations\qt_uk.qm" /></Component>
Expand All @@ -111,10 +113,14 @@
<ComponentRef Id="qtmultimedia_ar.qm" />

<!-- Chinese (China) -->
<ComponentRef Id="qt_zh_CN.qm" />
<ComponentRef Id="qt_zh.qm" />
<ComponentRef Id="qtbase_zh_CN.qm" />
<ComponentRef Id="qtmultimedia_zh_CN.qm" />

<!-- Chinese (Taiwan) -->
<ComponentRef Id="qt_zh_TW.qm" />
<ComponentRef Id="qtbase_zh_TW.qm" />
<ComponentRef Id="qtmultimedia_zh_TW.qm" />

<!-- Czech -->
<ComponentRef Id="qt_cs.qm" />
Expand Down Expand Up @@ -158,6 +164,8 @@

<!-- Brazilian Portuguese -->
<ComponentRef Id="qt_pt_BR.qm" />
<ComponentRef Id="qtbase_pt_BR.qm" />
<ComponentRef Id="qtmultimedia_pt_BR.qm" />

<!-- Russian -->
<ComponentRef Id="qt_ru.qm" />
Expand All @@ -169,7 +177,13 @@
<ComponentRef Id="qtbase_es.qm" />
<ComponentRef Id="qtmultimedia_es.qm" />

<!-- Swedish -->
<ComponentRef Id="qt_sv.qm" />

<!-- Turkish -->
<ComponentRef Id="qt_tr.qm" />
<ComponentRef Id="qtbase_tr.qm" />
<ComponentRef Id="qtmultimedia_tr.qm" />

<!-- Ukrainian -->
<ComponentRef Id="qt_uk.qm" />
Expand Down
Loading

Back | FazBrowse Home | New Git URL