Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: Per-file Crowdin synchronization to reduce translation PR size #5769

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions .github/workflows/crowdin-opff.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Crowdin Sync

on:
push:
branches:
- crowdin-trigger-opff

jobs:
synchronize-with-crowdin-opff:
name: Synchronize with crowdin
runs-on: ubuntu-latest
steps:
- name: Crowdin action for Open Pet Food Facts only
uses: crowdin/[email protected]
with:
upload_translations: false # default is false
download_translations: true
skip_untranslated_files: false
commit_message: "New Crowdin translations - Open Pet Food Facts"
localization_branch_name: l10n_main_opff
pull_request_base_branch_name: main
pull_request_title: "chore: New translations - Open Pet Food Facts"
pull_request_labels: "translations"
config: ./crowdin-opff.yml
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }}
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}
22 changes: 22 additions & 0 deletions crowdin-opff.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
project_id_env: CROWDIN_PROJECT_ID
api_token_env: CROWDIN_PERSONAL_TOKEN
files:
- source: /po/openpetfoodfacts/openpetfoodfacts.pot
translation: /po/openpetfoodfacts/%two_letters_code%.po
ignore: ["/po/openpetfoodfacts/nl.po"]
languages_mapping:
two_letters_code:
zh-HK: zh_HK
zh-CN: zh_CN
en-AU: en_AU
en-GB: en_GB
en-US: en_US
pt-BR: pt_BR
pt-PT: pt_PT
nl-BE: nl_BE
nl: nl_NL
zh-TW: zh_TW
sr-CS: sr_CS
sr: sr_RS
ku : kmr_TR
kmr: kmr