From cd76f05a86d82afa5c9fbd2df9303570f634c78e Mon Sep 17 00:00:00 2001 From: FlexBy420 <68403300+FlexBy420@users.noreply.github.com> Date: Thu, 6 Mar 2025 18:12:35 +0100 Subject: [PATCH] Create qt-ts.yml --- .github/workflows/qt-ts.yml | 45 +++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 .github/workflows/qt-ts.yml diff --git a/.github/workflows/qt-ts.yml b/.github/workflows/qt-ts.yml new file mode 100644 index 0000000000..119faf1240 --- /dev/null +++ b/.github/workflows/qt-ts.yml @@ -0,0 +1,45 @@ +name: Generate Translation Template + +on: + workflow_dispatch: + push: + branches: + - qt-test + paths: + - 'rpcs3/**' + +jobs: + Generate_Translation_Template: + name: Generate Translation Template + runs-on: ubuntu-24.04 + steps: + - name: Checkout repository + uses: actions/checkout@main + with: + fetch-depth: 0 + + - name: Install Qt6 Tools + run: | + sudo apt-get update + sudo apt-get install -y qt6-tools-dev qt6-l10n-tools + + - name: Generate .ts file using lupdate (Qt6) + run: | + mkdir -p translations + cd rpcs3 # Change to the rpcs3 directory + LUPDATE_PATH=$(find /usr -name lupdate -type f 2>/dev/null | head -n 1) + if [ -z "$LUPDATE_PATH" ]; then + echo "Error: lupdate not found!" + exit 1 + else + echo "lupdate found at: $LUPDATE_PATH" + $LUPDATE_PATH -recursive . -ts ../translations/rpcs3_template.ts + sed -i 's|filename="\.\./|filename="./|g' ../translations/rpcs3_template.ts + fi + + - name: Upload translation template + uses: actions/upload-artifact@main + with: + name: RPCS3_Translation_Template + path: translations/rpcs3_template.ts + compression-level: 0