mirror of
https://github.com/pelican-dev/panel.git
synced 2026-07-15 21:48:08 +03:00
ci: Fix Crowdin synchronization paths and optimize configs (#2354)
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
name: Update translations
|
||||
name: Download Crowdin Translations
|
||||
|
||||
on:
|
||||
schedule:
|
||||
@@ -6,8 +6,8 @@ on:
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
update-translations:
|
||||
name: Pull Translations from Crowdin
|
||||
download-translations:
|
||||
name: Download Translations from Crowdin
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: write
|
||||
@@ -17,18 +17,20 @@ jobs:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Sync Translations from Crowdin
|
||||
- name: Download Translations from Crowdin
|
||||
uses: crowdin/github-action@v2
|
||||
with:
|
||||
upload_sources: false
|
||||
upload_translations: false
|
||||
download_translations: true
|
||||
export_only_approved: true
|
||||
localization_branch_name: i18n_crowdin_translations
|
||||
create_pull_request: true
|
||||
pull_request_title: 'feat: Update translations'
|
||||
pull_request_body: 'Automated Pull Request containing the latest translations from Crowdin.'
|
||||
pull_request_title: 'New Crowdin Translations'
|
||||
pull_request_body: 'New Crowdin translations by [Crowdin GH Action](https://github.com/crowdin/github-action)'
|
||||
pull_request_base_branch_name: 'main'
|
||||
crowdin_branch_name: main
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
CROWDIN_PROJECT_ID: '665842'
|
||||
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}
|
||||
CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }}
|
||||
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}
|
||||
@@ -1,4 +1,4 @@
|
||||
name: Add Crowdin Translation Strings
|
||||
name: Upload Crowdin Sources
|
||||
|
||||
on:
|
||||
push:
|
||||
@@ -9,21 +9,24 @@ on:
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
synchronize-with-crowdin:
|
||||
name: Synchronize Sources with Crowdin
|
||||
upload-sources:
|
||||
name: Upload Sources to Crowdin
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Sync Sources to Crowdin
|
||||
- name: Upload Sources to Crowdin
|
||||
uses: crowdin/github-action@v2
|
||||
with:
|
||||
upload_sources: true
|
||||
upload_translations: false
|
||||
download_translations: false
|
||||
crowdin_branch_name: main
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
CROWDIN_PROJECT_ID: '665842'
|
||||
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}
|
||||
CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }}
|
||||
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}
|
||||
23
crowdin.yml
23
crowdin.yml
@@ -1,11 +1,14 @@
|
||||
project_id_env: "CROWDIN_PROJECT_ID"
|
||||
api_token_env: "CROWDIN_PERSONAL_TOKEN"
|
||||
base_path: "."
|
||||
preserve_hierarchy: true
|
||||
|
||||
files:
|
||||
- source: /lang/en/*.php
|
||||
translation: /lang/%two_letters_code%/%original_file_name%
|
||||
- source: /lang/en/admin
|
||||
translation: /lang/%two_letters_code%/admin/%original_file_name%
|
||||
- source: /lang/en/command
|
||||
translation: /lang/%two_letters_code%/command/%original_file_name%
|
||||
- source: /lang/en/dashboard
|
||||
translation: /lang/%two_letters_code%/dashboard/%original_file_name%
|
||||
- source: /lang/en/server
|
||||
translation: /lang/%two_letters_code%/server/%original_file_name%
|
||||
- source: "/lang/en/**/*.php"
|
||||
translation: "/lang/%two_letters_code%/**/%original_file_name%"
|
||||
|
||||
languages_mapping:
|
||||
two_letters_code:
|
||||
'zh-CN': 'zh_CN'
|
||||
'zh-TW': 'zh_TW'
|
||||
'pt-BR': 'pt_BR'
|
||||
Reference in New Issue
Block a user