Skip to content

Commit b347f7c

Browse files
Synchronize changes from 1.6 master branch [ci skip]
91b633b Disable generate_translators workflow for forks 7a6eeb7 Update run-generate-translators.yaml c51439b Add workflow for generate-translators 07f8d11 Add CI script action for generate-translators fd759fe Add generate-translators utils script
2 parents a5ea3ae + 91b633b commit b347f7c

File tree

8 files changed

+1891
-0
lines changed

8 files changed

+1891
-0
lines changed
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: "Update crowdin-translators.json"
2+
3+
on:
4+
workflow_dispatch:
5+
delete:
6+
branches:
7+
- l10n/master
8+
9+
jobs:
10+
generate_translators:
11+
if: github.event.repository.fork == false
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Checkout code
15+
uses: actions/checkout@v4
16+
with:
17+
fetch-depth: 0
18+
ref: master
19+
20+
- name: Setup Node.js
21+
uses: actions/setup-node@v4
22+
with:
23+
node-version: latest
24+
cache: 'npm'
25+
cache-dependency-path: ./utils/localization/generate-translators/package-lock.json
26+
27+
- name: Install dependencies
28+
working-directory: ./utils/localization/generate-translators
29+
run: npm clean-install
30+
31+
- name: Generate translators
32+
working-directory: ./utils/localization/generate-translators
33+
env:
34+
CROWDIN_TOKEN: "${{ secrets.CROWDIN_TOKEN }}"
35+
CROWDIN_ORGANIZATION: "multitheftauto"
36+
CROWDIN_PROJECT_ID: "13" # Multi Theft Auto
37+
CROWDIN_IGNORE_USER_ID: "2" # multitheftautoqa
38+
run: npm run ci
39+
40+
- name: Commit changes
41+
env:
42+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
43+
run: |
44+
git config --global user.name 'github-actions[bot]'
45+
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
46+
47+
git add ./utils/localization/generate-translators/crowdin-translators.json
48+
49+
if ! git diff-index --quiet HEAD; then
50+
git commit -m "Update crowdin-translators.json" -m "[ci skip]"
51+
git push
52+
fi
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
.vscode
2+
dist
3+
node_modules
4+
crowdin-report.json

0 commit comments

Comments
 (0)