Option to provide non translated strings in a fallback locale #174
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Create translations patch | |
on: | |
pull_request: | |
types: | |
- opened | |
branches: | |
- main | |
jobs: | |
create-translations-patch: | |
if: github.actor == 'bc-svc-local' | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 2 | |
- name: Use commit SHA for filename | |
id: generate-sha | |
run: | | |
short_sha=$(echo "${GITHUB_SHA}" | cut -c1-8) | |
echo "SHORT_SHA=$short_sha" >> $GITHUB_OUTPUT | |
- name: Create a translations changeset | |
env: | |
SHORT_SHA: ${{ steps.generate-sha.outputs.SHORT_SHA }} | |
run: | | |
mkdir -p .changeset | |
echo "--- | |
\"@bigcommerce/catalyst-core\": patch | |
--- | |
Update translations." > .changeset/translations-patch-$SHORT_SHA.md | |
- name: Commit changeset | |
env: | |
SHORT_SHA: ${{ steps.generate-sha.outputs.SHORT_SHA }} | |
run: | | |
git config --global user.name 'bc-svc-local' | |
git config --global user.email '[email protected]' | |
git add .changeset/translations-patch-$SHORT_SHA.md | |
git commit -m "chore(core): create translations patch" | |
- name: Push changeset | |
env: | |
TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
git push https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }} HEAD:${{ github.event.pull_request.head.ref }} |