Skip to content

Smartling translations are updated for commit fc3a0fece15f7c91e88875614432a9553b3491c5 from main #234

Smartling translations are updated for commit fc3a0fece15f7c91e88875614432a9553b3491c5 from main

Smartling translations are updated for commit fc3a0fece15f7c91e88875614432a9553b3491c5 from main #234

name: Fix translations
on:
pull_request:
workflow_dispatch:
jobs:
i18n-fixes:
name: Fix translated files
runs-on: ubuntu-latest
if: startsWith(github.head_ref, 'smartling')
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.ADJUST_NPM_TOKEN }}
steps:
- name: Checkout the latest commit
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
with:
ref: ${{ github.event.pull_request.head.ref }}
- name: Set up node
uses: actions/setup-node@v4
with:
node-version: "20.x"
registry-url: https://npm.pkg.github.com/
scope: "@adjust"
- name: Install dependencies
run: npm i
- name: Run translation fixes script
run: sh .github/scripts/fix-i18n.sh
- name: Lint code
run: npx prettier --write $(git diff --name-only --diff-filter d | grep '\.mdx$' | xargs)
- name: Check for modified files
id: git-check
run: echo "MODIFIED=$(if [ -n "$(git status --porcelain)" ]; then echo "true"; else echo "false"; fi)" >> "$GITHUB_OUTPUT"
- name: Commit changes
if: ${{ steps.git-check.outputs.MODIFIED == 'true' }}
run: |
git config --global user.name "adjust-pc-team"
git config --global user.email "[email protected]"
git commit -am "Fix translated files"
git push