-
Notifications
You must be signed in to change notification settings - Fork 131
53 lines (44 loc) · 1.74 KB
/
pull-transifex.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: "Pull translations from Transifex"
on:
workflow_dispatch:
schedule:
- cron: "0 3 * * *"
jobs:
pull-translations:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ssh-key: ${{ secrets.DEPLOYMENT_SSH_KEY }}
ref: "master"
- name: l10n-pull
uses: transifex/cli-action@v2
with:
token: ${{ secrets.TX_TOKEN }}
args: pull --force --skip --all
- name: l10n-format
shell: bash
run: |
beautifyJSON() {
jq --sort-keys 'walk(if type == "object" then del(."th_TH", ."pt_PT", ."pt_BR", ."nn_NO", ."nb_NO", ."en_GB") else . end)' "$1" >"$1.tmp"
mv "$1.tmp" "$1"
}
beautifyJSON "ownCloud Action Extension/InfoPlist.xcstrings"
beautifyJSON "ownCloud File Provider/Localizable.xcstrings"
beautifyJSON "ownCloud Share Extension/InfoPlist.xcstrings"
beautifyJSON "ownCloud/Resources/InfoPlist.xcstrings"
beautifyJSON "ownCloud/Resources/Localizable.xcstrings"
beautifyJSON "ownCloudAppFramework/Resources/Localizable.xcstrings"
- name: Setup Swift
uses: swift-actions/[email protected]
- name: Build ocstringstool
run: |
swift -v
swiftc tools/normalizestrings/main.swift -o /tmp/ocstringstool
- name: Run ocstringstool
run: /tmp/ocstringstool normalize "ownCloud/Resources" "ownCloud Action Extension" "ownCloud File Provider" "ownCloud Share Extension" "ownCloudAppFramework/Resources"
- uses: GuillaumeFalourd/[email protected]
with:
email: [email protected]
name: ownClouders
commit_message: "[tx] updated translations from transifex"