Skip to content

Commit

Permalink
Update GitHub Workflows (#2023)
Browse files Browse the repository at this point in the history
  • Loading branch information
jonaharagon committed Feb 24, 2023
1 parent 561f6a7 commit 67e4d9a
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 5 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/crowdin-download.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: 💬 Crowdin Download

on:
workflow_dispatch:
release:
types: [ published ]

permissions: write-all

jobs:
synchronize-with-crowdin:
runs-on: ubuntu-latest

steps:

- name: Checkout
uses: actions/checkout@v3

- name: crowdin action
uses: crowdin/[email protected]
with:
upload_sources: true
upload_sources_args: '--auto-update --delete-obsolete'
upload_translations: false
download_translations: true
localization_branch_name: crowdin/l10n_translations
create_pull_request: true
pull_request_title: 'New Crowdin Translations'
pull_request_body: 'New Crowdin translations by [Crowdin GitHub Action](https://github.com/crowdin/github-action)'
pull_request_base_branch_name: 'jonaharagon/i18n-test2'
config: crowdin.yml
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }}
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,12 @@ name: 💬 Crowdin Upload

on:
workflow_dispatch:
release:
types: [published]
push:
branches: [ main ]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
synchronize-with-crowdin:
Expand Down
6 changes: 3 additions & 3 deletions crowdin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@ api_token_env: CROWDIN_PERSONAL_TOKEN
"preserve_hierarchy": true
files:
- source: "/docs/**/*.en.*"
translation: "/docs/**/%file_name%.%locale_with_underscore%.%file_extension%"
translation: "/docs/**/%file_name%.%two_letters_code%.%file_extension%"
translation_replace:
"en.": ""
update_option: update_as_unapproved
- source: "/theme/overrides/*.en.html"
translation: "/theme/overrides/%file_name%.%locale_with_underscore%.html"
translation: "/theme/overrides/%file_name%.%two_letters_code%.html"
translation_replace:
"en.": ""
- source: "/includes/*.en.md"
translation: "/includes/%file_name%.%locale_with_underscore%.md"
translation: "/includes/%file_name%.%two_letters_code%.md"
translation_replace:
"en.": ""
update_option: update_as_unapproved

0 comments on commit 67e4d9a

Please sign in to comment.