Translations: Added crowdin workflow action

This commit is contained in:
Dan Brown
2026-04-27 20:56:05 +01:00
parent c1610c4532
commit 7c1d30bc8f
2 changed files with 40 additions and 1 deletions

View File

@@ -0,0 +1,36 @@
name: Crowdin Action
on:
push:
branches: [ development ]
paths:
- 'lang/**.php'
schedule:
- cron: '30 4 * * *'
workflow_dispatch:
jobs:
synchronize-with-crowdin:
runs-on: docker
container:
image: docker.io/library/node:24-trixie
steps:
- name: Checkout
uses: https://code.forgejo.org/actions/checkout@v6
- name: crowdin action
uses: https://github.com/crowdin/github-action@v2
with:
upload_sources: true
upload_translations: false
download_translations: true
localization_branch_name: l10n_development
create_pull_request: false
github_base_url: https://codeberg.org
env:
# A numeric ID, found at https://crowdin.com/project/<projectName>/tools/api
CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }}
# Visit https://crowdin.com/settings#api-key to create this token
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}

View File

@@ -1,10 +1,13 @@
project_id: "377219"
project_identifier: bookstack
api_token_env: CROWDIN_PERSONAL_TOKEN
base_path: .
preserve_hierarchy: false
pull_request_title: Updated translations with latest Crowdin changes
pull_request_labels:
- ":earth_africa: Translations"
- "Translations"
files:
- source: /lang/en/*.php
translation: /lang/%two_letters_code%/%original_file_name%