Skip to content

Smartling translations are completed for commit 5144363f7342c5f72594a47e3e21539ff91db07e from main #1586

Smartling translations are completed for commit 5144363f7342c5f72594a47e3e21539ff91db07e from main

Smartling translations are completed for commit 5144363f7342c5f72594a47e3e21539ff91db07e from main #1586

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