Skip to content

Commit

Permalink
add crowdin integration
Browse files Browse the repository at this point in the history
  • Loading branch information
tilalx committed Aug 11, 2024
1 parent 6dbcf2a commit 3b2db13
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 0 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/crowdin.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# This workflow requires additional setup, see: https://jenkins.io/doc/developer/crowdin/

name: Crowdin Action

on:
schedule:
- cron: '0 0 * * *'
workflow_dispatch:

permissions:
actions: write
contents: write
pull-requests: write

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

steps:

- name: Checkout
uses: actions/checkout@v4

- name: crowdin action
uses: crowdin/github-action@v2
with:
upload_translations: false
download_translations: true
skip_untranslated_files: true
push_translations: true
export_only_approved: true
commit_message: 'New Crowdin translations'
create_pull_request: true
pull_request_title: 'Update localization'
pull_request_labels: 'localization'
base_url: 'https://jenkins.crowdin.com'
config: 'crowdin.yml'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CROWDIN_PROJECT_ID: 31
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}
16 changes: 16 additions & 0 deletions crowdin.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
files:
- source: '/src/main/resources/hudson/plugins/msbuild/**/*.properties'
ignore:
- '/src/main/resources/hudson/plugins/msbuild/**/%file_name%_%two_letters_code%.properties'
translation: '/src/main/resources/hudson/plugins/msbuild/**/%file_name%_%two_letters_code%.properties'
escape_quotes: 1
escape_special_characters: 0
- source: '/src/main/resources/hudson/plugins/msbuild/**/*.html'
ignore:
- '/src/main/resources/hudson/plugins/msbuild/**/%file_name%_%two_letters_code%.html'
translation: '/src/main/resources/hudson/plugins/msbuild/**/%file_name%_%two_letters_code%.html'
escape_quotes: 0
escape_special_characters: 0

project_id_env: CROWDIN_PROJECT_ID
api_token_env: CROWDIN_PERSONAL_TOKEN

0 comments on commit 3b2db13

Please sign in to comment.