mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-03 13:31:27 +12:00
add a job for generating translation template file (.ts)
This commit is contained in:
parent
e6b3c2061e
commit
7df5cb84b5
1 changed files with 35 additions and 0 deletions
35
.github/workflows/rpcs3.yml
vendored
35
.github/workflows/rpcs3.yml
vendored
|
@ -196,3 +196,38 @@ jobs:
|
||||||
env:
|
env:
|
||||||
RPCS3_TOKEN: ${{ secrets.RPCS3_TOKEN }}
|
RPCS3_TOKEN: ${{ secrets.RPCS3_TOKEN }}
|
||||||
run: .ci/github-upload.sh
|
run: .ci/github-upload.sh
|
||||||
|
|
||||||
|
Generate_Translation_Template:
|
||||||
|
name: Generate Translation Template
|
||||||
|
runs-on: ubuntu-24.04
|
||||||
|
if: github.ref == 'refs/heads/main'
|
||||||
|
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
|
||||||
|
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
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue