-
Notifications
You must be signed in to change notification settings - Fork 6
31 lines (31 loc) · 1.08 KB
/
i18n-upload.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
name: I18n Dictionary Upload
on:
push:
branches:
- main
- i18n-automation-setup
jobs:
parse-and-upload:
name: Dictionary Upload
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: 21
- name: Install i18next-parser
run: npm i -g i18next-parser@8
- name: Parse translations
run: npx -p i18next-parser i18next -c i18next-parser.config.cjs -o "${{ runner.temp }}/i18next/\$LOCALE/\$NAMESPACE.json"
- name: Install SimpleLocalize CLI
run: curl -s https://get.simplelocalize.io/2.5/install | bash
- name: Upload the dictionary files to SimpleLocalize
run: |
simplelocalize upload \
--apiKey ${{ secrets.SIMPLELOCALIZE_API_KEY }} \
--languageKey=en-US \
--uploadFormat=single-language-json \
--uploadOptions=DELETE_NOT_PRESENT_KEYS,TRIM_LEADING_TRAILING_SPACES \
--uploadPath=${{ runner.temp }}/i18next/{lang}/{ns}.json