Fix Crowdin language mapping and integrate automated Pint formatting (#2383)

This commit is contained in:
sangege
2026-06-15 07:07:07 +08:00
committed by GitHub
parent 666a409b66
commit 420ae022e9
2 changed files with 21 additions and 12 deletions

View File

@@ -24,13 +24,23 @@ jobs:
upload_translations: false
download_translations: true
export_only_approved: true
localization_branch_name: i18n_crowdin_translations
create_pull_request: true
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'
push_translations: false
create_pull_request: false
crowdin_branch_name: main
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }}
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}
- name: Run Laravel Pint
uses: aglipanci/laravel-pint-action@8eedec46a1856977c41667f9c66d5562fa3f9c08 # 2.4
- name: Create Pull Request
uses: peter-evans/create-pull-request@c5a7806660adbe173f04e3e038b0ccdcd758773c # v6
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: 'chore: update translations and format with pint'
title: 'New Crowdin Translations'
body: 'New Crowdin translations by [Crowdin GH Action](https://github.com/crowdin/github-action), formatted by Laravel Pint.'
branch: 'i18n_crowdin_translations'
base: 'main'

View File

@@ -6,9 +6,8 @@ preserve_hierarchy: true
files:
- 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'
languages_mapping:
two_letters_code:
'zh-CN': 'zh_CN'
'zh-TW': 'zh_TW'
'pt-BR': 'pt_BR'