3131 echo "Setting up Git identity"
3232 git config --global user.name "DerivFE"
3333 git config --global user.email "80095553+DerivFE@users.noreply.github.com"
34- git config --global --add url."git@github.com:".insteadOf "https://github.com/"
3534
3635 echo "Installing Crowdin CLI"
3736 sudo npm i -g @crowdin/cli
@@ -44,12 +43,12 @@ jobs:
4443 - name : Uploading new strings to Crowdin
4544 run : |
4645 last_messages_hash="$(git hash-object $(git rev-parse --show-toplevel)/src/translations/messages.pot)"
47- echo "Generating messages.pot"
46+ echo "Generating messages.pot"
4847 node ./scripts/render.js -t
4948 current_messages_hash="$(git hash-object $(git rev-parse --show-toplevel)/src/translations/messages.pot)"
5049 echo "- [crowdin]: message.pot hash is: $last_messages_hash"
5150 echo "- [generated]: message.pot hash is: $current_messages_hash"
52-
51+
5352 # We compare the generated messages.pot with the last messages.pot.
5453 # Only send a Slack message and upload it to Crowdin if there were any changes made to messages.pot.
5554 if [ "$last_messages_hash" != "$current_messages_hash" ]; then
7675
7776 - name : Create and merge translation PR
7877 run : |
79- branch_name="binary_static_translations"
78+ branch_name="binary_static_translations"
8079 if [ -z "$(git status --porcelain)" ]; then
8180 echo "Found no new translation files that need to be merged with master. Not creating a PR."
8281 else
8584 cd $(git rev-parse --show-toplevel)
8685 git add .
8786 git commit -m "translations: 📚 sync translations with crowdin"
88-
87+
8988 # Force push to this branch in case a previous run created it.
9089 git push --set-upstream origin "$branch_name" -f
9190
0 commit comments