mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-02 21:11:25 +12:00
43 lines
1.2 KiB
YAML
43 lines
1.2 KiB
YAML
name: Generate Translation Template
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
push:
|
|
branches:
|
|
- master
|
|
paths:
|
|
- 'rpcs3/**'
|
|
|
|
jobs:
|
|
Generate_Translation_Template:
|
|
name: Generate Translation Template
|
|
runs-on: ubuntu-24.04
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@main
|
|
|
|
- name: Install Qt Tools
|
|
run: |
|
|
sudo apt update
|
|
sudo apt install -y qt6-l10n-tools
|
|
|
|
- name: Generate .ts file using lupdate (Qt)
|
|
working-directory: rpcs3
|
|
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
|