Skip to content

Commit 80e58f9

Browse files
authored
I18n: Fix path for Crowdin upload (#81733)
* refactor: upload action * refactor: move parameters from config to download action
1 parent 35514d7 commit 80e58f9

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

.github/workflows/i18n-crowdin-download.yml

+2
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@ jobs:
4545
pull_request_base_branch_name: 'main'
4646
base_url: 'https://grafana.api.crowdin.com'
4747
config: 'crowdin.yml'
48+
source: 'public/locales/en-US/grafana.json'
49+
translation: 'public/locales/%locale%/%original_file_name%'
4850
env:
4951
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5052
CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }}

.github/workflows/i18n-crowdin-upload.yml

+4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
name: Crowdin Upload Action
22

33
on:
4+
workflow_dispatch:
45
push:
56
paths:
67
- 'public/locales/en-US/grafana.json'
@@ -19,11 +20,14 @@ jobs:
1920
uses: crowdin/github-action@v1
2021
with:
2122
upload_sources: true
23+
upload_sources_args: '--dest=public/locales/en-US/grafana.json'
2224
upload_translations: false
2325
download_translations: false
2426
create_pull_request: false
2527
base_url: 'https://grafana.api.crowdin.com'
2628
config: 'crowdin.yml'
29+
source: 'public/locales/en-US/grafana.json'
30+
translation: 'public/locales/%locale%/%original_file_name%'
2731
env:
2832
CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }}
2933
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}

crowdin.yml

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
files:
2-
- source: /public/locales/en-US/grafana.json
3-
translation: /public/locales/%locale%/%original_file_name%
4-
type: i18next_json
2+
- type: i18next_json
53
# The following are pulled from env variables
64
project_id_env: CROWDIN_PROJECT_ID
75
api_token_env: CROWDIN_PERSONAL_TOKEN

0 commit comments

Comments
 (0)