Skip to content

Pull translations from Transifex #90

Pull translations from Transifex

Pull translations from Transifex #90

name: "Pull translations from Transifex"
on:
workflow_dispatch:
schedule:
- cron: "0 3 * * *"
jobs:
pull-translations:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ssh-key: ${{ secrets.DEPLOYMENT_SSH_KEY }}
ref: "master"
- name: l10n-pull
uses: transifex/cli-action@v2
with:
token: ${{ secrets.TX_TOKEN }}
args: pull --force --skip --all
- name: l10n-format
shell: bash
run: |
beautifyJSON() {
jq --sort-keys . "$1" >"$1.tmp"
mv "$1.tmp" "$1"
}
beautifyJSON "ownCloud Action Extension/InfoPlist.xcstrings"
beautifyJSON "ownCloud File Provider/Localizable.xcstrings"
beautifyJSON "ownCloud Share Extension/InfoPlist.xcstrings"
beautifyJSON "ownCloud/Resources/InfoPlist.xcstrings"
beautifyJSON "ownCloud/Resources/Localizable.xcstrings"
beautifyJSON "ownCloudAppFramework/Resources/Localizable.xcstrings"
- name: Install dependencies
run: sudo apt-get update && sudo apt-get install -y clang libpython2.7 libpython2.7-dev
- name: Download Swift
run: wget https://swift.org/builds/swift-5.3-release/ubuntu2004/swift-5.3-RELEASE/swift-5.3-RELEASE-ubuntu20.04.tar.gz
- name: Extract Swift
run: tar xzf swift-5.3-RELEASE-ubuntu20.04.tar.gz
- name: Move Swift to /usr/share
run: sudo mv swift-5.3-RELEASE-ubuntu20.04 /usr/share/swift
- name: Add Swift to PATH
run: echo "export PATH=/usr/share/swift/usr/bin:\$PATH" >> $GITHUB_ENV
- name: Verify Swift installation
run: swift -v
- name: Compile Swift file
run: swiftc tools/normalizestrings/main.swift -o ocstringstool
- name: Run compiled Swift program
run: ./ocstringstool normalize "ownCloud/Resources/" "ownCloud Action Extension/" "ownCloud File Provider/" "ownCloud Share Extension/" "ownCloudAppFramework/Resources/"
- uses: GuillaumeFalourd/[email protected]
with:
email: [email protected]
name: ownClouders
commit_message: "[tx] updated translations from transifex"