From 0ef3a2aed7c482861fb200c4a58b4ccdd1437ad3 Mon Sep 17 00:00:00 2001 From: Trial97 Date: Mon, 23 Sep 2024 11:17:58 +0300 Subject: [PATCH 1/3] Add Qt base translation to our own Signed-off-by: Trial97 --- .github/workflows/update.yml | 1 + update.sh | 8 ++++++-- 2 files changed, 7 insertions(+), 2 deletions(-) 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..b6a1bad74 100755 --- a/update.sh +++ b/update.sh @@ -5,19 +5,21 @@ 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" + $LUPDATE_BIN -ts "$ts_file" -noobsolete } cd "$ROOT" @@ -31,3 +33,5 @@ else update_file .template.ts fi + +rm ./qtbase_untranslated.ts From c4144271e37215dcdf383981e06320fe363b63bb Mon Sep 17 00:00:00 2001 From: Trial97 Date: Mon, 23 Sep 2024 13:15:04 +0300 Subject: [PATCH 2/3] remove not used line Signed-off-by: Trial97 --- update.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/update.sh b/update.sh index b6a1bad74..e959d5f52 100755 --- a/update.sh +++ b/update.sh @@ -19,7 +19,6 @@ update_file() { # Update .ts $LUPDATE_BIN "${SOURCE_FILES[@]}" -locations "absolute" -ts "$ts_file" $LCONVERT_BIN -i "$ts_file" ./qtbase_untranslated.ts -o "$ts_file" - $LUPDATE_BIN -ts "$ts_file" -noobsolete } cd "$ROOT" From 0488841c1acf72b566e47e3b74264ee117a1991c Mon Sep 17 00:00:00 2001 From: Trial97 Date: Mon, 23 Sep 2024 13:43:27 +0300 Subject: [PATCH 3/3] make qt translation not be included in merge Signed-off-by: Trial97 --- update.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/update.sh b/update.sh index e959d5f52..abbf2cc55 100755 --- a/update.sh +++ b/update.sh @@ -10,7 +10,7 @@ LUPDATE_BIN=${LUPDATE_BIN:-lupdate} ############################################################################### -curl https://l10n-files.qt.io/l10n-files/qt-old65/qtbase_untranslated.ts --output ./qtbase_untranslated.ts +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() { @@ -18,7 +18,7 @@ update_file() { # Update .ts $LUPDATE_BIN "${SOURCE_FILES[@]}" -locations "absolute" -ts "$ts_file" - $LCONVERT_BIN -i "$ts_file" ./qtbase_untranslated.ts -o "$ts_file" + $LCONVERT_BIN -i "$ts_file" ./.qtbase_untranslated.ts -o "$ts_file" } cd "$ROOT" @@ -33,4 +33,4 @@ else update_file .template.ts fi -rm ./qtbase_untranslated.ts +# rm ./.qtbase_untranslated.ts