Skip to content
This repository has been archived by the owner on Sep 26, 2024. It is now read-only.

Commit

Permalink
Update translation-sync.yml (#5888)
Browse files Browse the repository at this point in the history
  • Loading branch information
prince-deriv authored Nov 10, 2023
1 parent 92683a2 commit 9208fec
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions .github/workflows/translation-sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,28 +32,29 @@ jobs:
- run: npm i -g @crowdin/[email protected]
- name: Fetch,Sync & Push Strings to Crowdin
run: |
branch_name="new_translation_strings"
echo "Setting up Git identity"
git config --global user.name "DerivFE"
git config --global user.email "[email protected]"
echo "Checking out new branch [$branch_name]"
git checkout -b "$branch_name"
# Download new translated strings
echo 'Fetch Crowdin Master Translation ⬇️'
crowdin download -b master -T ${{ secrets.CROWDIN_API_KEY }} && crowdin download -b master -l zh-CN -T ${{ secrets.CROWDIN_API_KEY }}
if [ -n "$(git status --porcelain)" ]; then
# New strings are added, create a PR to update the master
branch_name="new_translation_strings"
echo "Setting up Git identity"
git config --global user.name "DerivFE"
git config --global user.email "[email protected]"
# Commit the newly downloaded files
cd $(git rev-parse --show-toplevel)
echo "GIT STATUS: $(git status --porcelain)"
git add .
echo "Checking out new branch [$branch_name]"
git checkout -b "$branch_name"
# Force push to this branch in case a previous run created it.
git push --set-upstream origin "$branch_name" -f
Expand Down

0 comments on commit 9208fec

Please sign in to comment.