Skip to content

Commit

Permalink
Automate pulling translations from Transifex (CleverRaven#50067)
Browse files Browse the repository at this point in the history
  • Loading branch information
BrettDong authored Jul 21, 2021
1 parent c6f56f7 commit 90539ba
Showing 1 changed file with 48 additions and 0 deletions.
48 changes: 48 additions & 0 deletions .github/workflows/pull-translations.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: "Pull translations from Transifex"

on:
schedule:
- cron: "42 1 * * 6"

jobs:
pull-translations:
runs-on: ubuntu-20.04
steps:
- name: "Install dependencies"
run: |
sudo apt-get update
sudo apt-get install gettext python3-pip
sudo pip3 install transifex-client
- name: "Checkout"
uses: actions/checkout@v2
with:
ref: master
fetch-depth: 0
- name: "Get current date"
uses: 1466587594/get-current-time@v2
id: current-date
with:
format: 'DD MMMM YYYY'
- name: "Pull translations"
env:
TOKEN: ${{ secrets.TX_TOKEN }}
run: |
export TX_TOKEN=$TOKEN
rm lang/po/*.po
until tx pull -a
do
echo "Retry in 10 seconds..."
sleep 10
done
- name: Create Pull Request
uses: peter-evans/[email protected]
with:
commit-message: Routine i18n updates on ${{ steps.current-date.outputs.formattedTime }}
committer: Brett Dong (BOT) <[email protected]>
author: Brett Dong (BOT) <[email protected]>
branch: i18n
delete-branch: true
base: master
title: Routine i18n updates on ${{ steps.current-date.outputs.formattedTime }}
body: "#### Summary\nNone"
labels: Translation

0 comments on commit 90539ba

Please sign in to comment.