diff --git a/.github/workflows/update.yml b/.github/workflows/update.yml index c20cebecd..c48a72f45 100644 --- a/.github/workflows/update.yml +++ b/.github/workflows/update.yml @@ -52,6 +52,7 @@ jobs: run: | git clone https://github.com/PrismLauncher/PrismLauncher.git src + export LCONVERT_BIN="/usr/lib/qt6/bin/lconvert" export LUPDATE_BIN="/usr/lib/qt6/bin/lupdate" ./update.sh diff --git a/update.sh b/update.sh index d2eb38dd9..abbf2cc55 100755 --- a/update.sh +++ b/update.sh @@ -5,19 +5,20 @@ set -e ROOT="$(pwd)" SRC=${ROOT}/src +LCONVERT_BIN=${LCONVERT_BIN:-lconvert} LUPDATE_BIN=${LUPDATE_BIN:-lupdate} ############################################################################### +curl https://l10n-files.qt.io/l10n-files/qt-old65/qtbase_untranslated.ts --output ./.qtbase_untranslated.ts readarray -d '' SOURCE_FILES < <(find "$SRC" -regex '.*\.\(h\|cpp\|ui\)' -type f -print0) update_file() { ts_file="$1" - echo "Updating $ts_file..." - # Update .ts $LUPDATE_BIN "${SOURCE_FILES[@]}" -locations "absolute" -ts "$ts_file" + $LCONVERT_BIN -i "$ts_file" ./.qtbase_untranslated.ts -o "$ts_file" } cd "$ROOT" @@ -31,3 +32,5 @@ else update_file .template.ts fi + +# rm ./.qtbase_untranslated.ts