Skip to content

Commit fab5279

Browse files
authored
Consolidate i18n check into a reusable workflow (#22248)
* Fix i18n check bypass for RiotTranslateBot * Consolidate i18n check into a reusable workflow
1 parent b2d057b commit fab5279

File tree

1 file changed

+1
-33
lines changed

1 file changed

+1
-33
lines changed

.github/workflows/static_analysis.yaml

Lines changed: 1 addition & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -28,39 +28,7 @@ jobs:
2828

2929
i18n_lint:
3030
name: "i18n Check"
31-
runs-on: ubuntu-latest
32-
permissions:
33-
pull-requests: read
34-
steps:
35-
- uses: actions/checkout@v2
36-
37-
- name: "Get modified files"
38-
id: changed_files
39-
if: github.event_name == 'pull_request'
40-
uses: tj-actions/changed-files@v19
41-
with:
42-
files: |
43-
src/i18n/strings/*
44-
files_ignore: |
45-
src/i18n/strings/en_EN.json
46-
- name: "Assert only en_EN was modified"
47-
if: |
48-
github.event_name == 'pull_request' &&
49-
github.actor != 'RiotTranslateBot' &&
50-
steps.changed_files.outputs.any_modified == 'true'
51-
run: |
52-
echo "You can only modify en_EN.json, do not touch any of the other i18n files as Weblate will be confused"
53-
exit 1
54-
- uses: actions/setup-node@v3
55-
with:
56-
cache: 'yarn'
57-
58-
# Does not need branch matching as only analyses this layer
59-
- name: Install Deps
60-
run: "yarn install --pure-lockfile"
61-
62-
- name: i18n Check
63-
run: "yarn run diff-i18n"
31+
uses: matrix-org/matrix-react-sdk/.github/workflows/i18n_check.yml@develop
6432

6533
js_lint:
6634
name: "ESLint"

0 commit comments

Comments
 (0)