Skip to content

Commit

Permalink
Create crowdin-download.yml
Browse files Browse the repository at this point in the history
Initiate Crowdin Download Action
  • Loading branch information
marcelbrode committed Oct 25, 2023
1 parent 981be9f commit 9be53d4
Show file tree
Hide file tree
Showing 35 changed files with 14,225 additions and 8 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/crowdin-download.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Crowdin Download Action

on:
workflow_dispatch:


jobs:
crowdin-download:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Synchronize with Crowdin
uses: crowdin/github-action@v1
with:
upload_sources: false
upload_translations: false
download_translations: true
localization_branch_name: i18n_crowdin_translations

create_pull_request: true
pull_request_title: 'New Crowdin translations'
pull_request_body: 'New Crowdin pull request with translations'
pull_request_base_branch_name: 'main'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }}
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}
16 changes: 8 additions & 8 deletions crowdin.yml
Original file line number Diff line number Diff line change
@@ -1,39 +1,39 @@
"project_id_env": "CROWDIN_PROJECT_ID"
"api_token_env": "CROWDIN_PERSONAL_TOKEN"
"base_path": "."
"base_path": "/src/Resources"
"base_url": "https://api.crowdin.com"
"preserve_hierarchy": true

files: [{
"source": "",
"translation": "/src/translations/%two_letters_code%/%original_file_name%",
"source": "/sources/**/*.json",
"translation": "/translations/%two_letters_code%/**/%original_file_name%",

# Files or directories for ignore
# e.g. ["/**/?.txt", "/**/[0-9].txt", "/**/*\?*.txt"]
#
# "ignore": [],
#"ignore": [],

"type": "json",

# The parameter "update_option" is optional. If it is not set, after the files update the translations for changed strings will be removed. Use to fix typos and for minor changes in the source strings
# e.g. "update_as_unapproved" or "update_without_changes"
#
# "update_option": "",
#"update_option": "",

# 0 - do not escape single quote;
# 1 - escape single quote by another single quote;
# 2 - escape single quote by backslash;
# 3 - escape single quote by another single quote only in strings containing variables ( {0} ).
"escape_quotes": 2,
"escape_quotes": 2,

# Defines whether any special characters (=, :, ! and #) should be escaped by backslash in exported translations.
# 0 - do not escape special characters
# 1 - escape special characters by a backslash
"escape_special_characters": 0
"escape_special_characters": 0

#
# Does the first line contain header?
# e.g. true or false
#
# "first_line_contains_header": true,
#"first_line_contains_header": true,
}]
Loading

0 comments on commit 9be53d4

Please sign in to comment.