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

Update translation-sync.yml #5888

Merged
merged 1 commit into from
Nov 10, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading