Skip to content

Commit 9a01da7

Browse files
committed
feat: sync i18n with crowdin (#8293)
1 parent 6921c30 commit 9a01da7

File tree

11 files changed

+51
-657
lines changed

11 files changed

+51
-657
lines changed

.github/workflows/languages-sync.yml

Lines changed: 0 additions & 35 deletions
This file was deleted.

.github/workflows/sync-i18n.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Sync I18n with Crowdin
2+
3+
on:
4+
push:
5+
workflow_dispatch:
6+
7+
jobs:
8+
synchronize-with-crowdin:
9+
runs-on: ubuntu-latest
10+
11+
permissions:
12+
contents: write
13+
pull-requests: write
14+
15+
steps:
16+
- name: Checkout
17+
uses: actions/checkout@v4
18+
19+
- name: crowdin action
20+
uses: crowdin/github-action@v2
21+
with:
22+
upload_sources: true
23+
upload_translations: true
24+
download_translations: true
25+
auto_approve_imported: true
26+
import_eq_suggestions: true
27+
export_only_approved: true
28+
skip_untranslated_strings: true
29+
localization_branch_name: l10n_crowdin_translations
30+
create_pull_request: true
31+
pull_request_title: 'New Crowdin Translations'
32+
pull_request_body: 'New Crowdin translations by [Crowdin GH Action](https://github.com/crowdin/github-action)'
33+
pull_request_base_branch_name: 'canary'
34+
config: packages/frontend/i18n/crowdin.yml
35+
env:
36+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
37+
CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }}
38+
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}

packages/frontend/i18n/crowdin.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
'base_path': '.'
2+
'base_url': 'https://api.crowdin.com'
3+
4+
'preserve_hierarchy': true
5+
6+
'files':
7+
[
8+
{
9+
'source': '/src/resources/en.json',
10+
'translation': '/src/resources/%locale%.json',
11+
},
12+
]

packages/frontend/i18n/package.json

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,7 @@
88
},
99
"scripts": {
1010
"build": "node build.mjs",
11-
"dev": "node dev.mjs",
12-
"sync-languages": "node --loader ts-node/esm/transpile-only src/scripts/sync.ts",
13-
"sync-languages:check": "yarn run sync-languages --check",
14-
"download-resources": "node --loader ts-node/esm/transpile-only src/scripts/download.ts"
11+
"dev": "node dev.mjs"
1512
},
1613
"keywords": [],
1714
"repository": {

packages/frontend/i18n/src/scripts/api.ts

Lines changed: 0 additions & 212 deletions
This file was deleted.

0 commit comments

Comments
 (0)