Smartling translations are completed for commit cdf60f0f8359a6836a23259e7859dc2b165a4d90 from main #1582
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: Fix translations | |
on: | |
pull_request: | |
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 full PR history | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
# Set up Node.js environment | |
- name: Set up Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: "20.x" | |
registry-url: https://npm.pkg.github.com/ | |
scope: "@adjust" | |
# Install npm dependencies | |
- name: Install dependencies | |
working-directory: .github/scripts | |
run: npm install | |
# Run the .mjs script to fix translations and format modified files | |
- name: Run translation fixes script | |
working-directory: .github/scripts | |
run: node fixTranslations.mjs | |
# Check for modified files | |
- 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" | |
# Commit and push changes if any files were modified | |
- name: Commit changes | |
if: ${{ steps.git-check.outputs.MODIFIED == 'true' }} | |
run: | | |
git config --global user.name "github-actions" | |
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
git commit -am "Fix translated and formatted files" | |
git push |