mirror of
https://github.com/inaturalist/iNaturalistReactNative.git
synced 2026-04-18 13:58:44 -04:00
Github Actions and scripts to * push strings.ftl to Crowdin when it changes * pull translations from Crowdin every day and a PR should get made if there are changes * FTL validation and normalization happens in the action and will prevent a PR from being created Closes #2103 Closes #2104
37 lines
1003 B
YAML
37 lines
1003 B
YAML
name: Crowdin Push
|
|
|
|
on:
|
|
push:
|
|
branches: [ main ]
|
|
paths: ["src/i18n/strings.ftl"]
|
|
workflow_dispatch:
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
push-to-crowdin:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Sync with Crowdin
|
|
uses: crowdin/github-action@v2
|
|
with:
|
|
# Note: a lot of the way this behaves is controlled in crowdin.yml,
|
|
# e.g. the path to the source files and paths to translations
|
|
# Upload options
|
|
upload_sources: true
|
|
upload_translations: false
|
|
# Download options
|
|
download_translations: false
|
|
# Pull request options
|
|
create_pull_request: false
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.CROWDIN_GITHUB_TOKEN }}
|
|
CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }}
|
|
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}
|