2021-05-29 23:44:26 +03:00
|
|
|
name: Crowdin Download
|
|
|
|
|
|
|
|
on:
|
|
|
|
schedule:
|
|
|
|
- cron: '0 * * * *' # every hour we download translations and update the pr from crowdin
|
|
|
|
|
|
|
|
# manual trigger
|
|
|
|
workflow_dispatch:
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
download-translations:
|
|
|
|
name: Download translations
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
steps:
|
2022-06-17 00:42:18 +03:00
|
|
|
- uses: actions/checkout@v3
|
2021-05-29 23:44:26 +03:00
|
|
|
|
2022-06-17 00:42:18 +03:00
|
|
|
- uses: actions/setup-node@v3
|
2021-05-30 04:06:49 +03:00
|
|
|
with:
|
|
|
|
node-version: 14
|
|
|
|
registry-url: https://registry.npmjs.org
|
2022-06-16 16:17:48 +03:00
|
|
|
cache: 'yarn'
|
2021-05-30 04:06:49 +03:00
|
|
|
|
2022-06-17 00:42:18 +03:00
|
|
|
- uses: actions/cache@v3
|
|
|
|
id: install-cache
|
|
|
|
with:
|
|
|
|
path: node_modules/
|
|
|
|
key: ${{ runner.os }}-install-${{ hashFiles('**/yarn.lock') }}
|
|
|
|
|
|
|
|
- if: steps.install-cache.outputs.cache-hit != 'true'
|
|
|
|
run: yarn install --frozen-lockfile --ignore-scripts
|
2021-05-30 04:06:49 +03:00
|
|
|
|
2022-06-17 00:42:18 +03:00
|
|
|
- run: yarn i18n:extract
|
2021-05-30 04:06:49 +03:00
|
|
|
|
2022-06-17 00:42:18 +03:00
|
|
|
- name: Download Crowdin translations
|
2022-05-09 19:04:54 +03:00
|
|
|
uses: crowdin/github-action@1.4.9
|
2021-05-29 23:44:26 +03:00
|
|
|
with:
|
|
|
|
upload_sources: false
|
|
|
|
download_translations: true
|
|
|
|
project_id: 458284
|
|
|
|
token: ${{ secrets.CROWDIN_PERSONAL_TOKEN_SECRET }}
|
2021-05-29 23:45:49 +03:00
|
|
|
source: 'src/locales/en-US.po'
|
2021-05-29 23:44:26 +03:00
|
|
|
translation: 'src/locales/%locale%.po'
|
2022-07-01 19:00:20 +03:00
|
|
|
create_pull_request: true
|
|
|
|
pull_request_title: 'chore(i18n): new Crowdin translations'
|
|
|
|
localization_branch_name: l10n_crowdin
|
2021-06-09 03:29:57 +03:00
|
|
|
commit_message: "chore(i18n): synchronize translations from crowdin [skip ci]"
|
2021-05-29 23:44:26 +03:00
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|