-
-
Notifications
You must be signed in to change notification settings - Fork 185
53 lines (39 loc) · 1.44 KB
/
update-translations-strings.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
name: Update Translations
on:
pull_request:
# https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#running-your-workflow-when-a-pull-request-merges
types: [ closed ]
branches: [ public-beta ]
jobs:
build:
if: github.event.pull_request.merged == true
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
# We need this particular version, as npm 8.5.5 is the last version
# that works with our package.json :sadface:.
node-version: '16.15.0'
cache: 'npm'
- name: Change Directories
run: cd kpi/
- name: Install KPI requirements
run: sudo pip install -r dependencies/pip/requirements.txt
- name: Install webpack
run: npm install webpack
- name: Run NPM build
run: npm run copy-fonts && npm run build
- name: Compile Frontend Strings
run: node ./scripts/generate_icons.js
- name: Install translate-toolkit
run: sudo apt install translate-toolkit
- name: Run make translation po file
run: sudo ./manage.py makemessages --locale en
- name: Run json2po
run: sudo json2po jsapp/compiled/extracted-strings.json locale/en/LC_MESSAGES/djangojs.po
- name: Run Transifex
uses: transifex/cli-action@v1
with:
token: ${{ secrets.TRANSIFEX_API }}
args: 'push -s'