-
Notifications
You must be signed in to change notification settings - Fork 8
59 lines (57 loc) · 1.98 KB
/
localicious.yaml
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
54
55
56
57
58
59
name: Update translations
on:
workflow_dispatch:
push:
paths:
- 'localizations.yaml'
jobs:
localicious:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v3
- name: lint yaml files
uses: ibiqlik/action-yamllint@v3
with:
file_or_dir: ./localizations.yaml
- uses: actions/setup-node@v4
with:
cache-dependency-path: myconext-gui/
node-version: 16
cache: 'npm'
- name: Install localicious/
run: |
npm install -g @picnicsupermarket/localicious
- name: Create Localizable.strings files
run: |
cd ${{ github.workspace }}
localicious render ./localizations.yaml ./account-gui/src/locale/ --languages en,nl --outputTypes js -c SHARED
rm -fr ./account-gui/src/locale/js/Localizable.ts
localicious render ./localizations.yaml ./myconext-gui/src/locale/ --languages en,nl --outputTypes js -c SHARED
rm -fr ./myconext-gui/src/locale/js/Localizable.ts
- name: Commit updated files
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: Automated update of strings.xml after updating localizations.yaml
file_pattern: '**/strings.json'
sync-eduid-apps:
needs: localicious
runs-on: ubuntu-latest
if: ${{ !contains(github.event.head_commit.message, '#AUTO#') }}
steps:
- name: Checkout Repository
uses: actions/checkout@master
- name: Get token for the Tiqr github org
uses: actions/create-github-app-token@v1
id: app-token-tiqr-org
with:
app-id: ${{ secrets.SYNC_APP_ID }}
private-key: ${{ secrets.SYNC_PRIVATE_KEY }}
owner: Tiqr
- name: Create PR for new translation in eduid-app repos
uses: BetaHuhn/repo-file-sync-action@v1
with:
GH_INSTALLATION_TOKEN: ${{ steps.app-token-tiqr-org.outputs.token }}
COMMIT_PREFIX: "#AUTO#"
CONFIG_PATH: .github/sync.yml