Skip to content

Commit

Permalink
Add workflow to synchronize translations from Crowdin
Browse files Browse the repository at this point in the history
Signed-off-by: Jon Koops <jonkoops@gmail.com>
  • Loading branch information
jonkoops committed May 29, 2024
1 parent 76a6733 commit 5849898
Show file tree
Hide file tree
Showing 2 changed files with 59 additions and 0 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/translations.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Translations
on:
push:
branches:
- main
workflow_dispatch:
jobs:
synchronize:
name: Synchronize
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Synchronize translations
uses: crowdin/github-action@v2
with:
# See: https://github.com/crowdin/github-action?tab=readme-ov-file#supported-options
# Upload options
upload_sources: true
upload_translations: true
auto_approve_imported: true
import_eq_suggestions: true
# Download options
download_translations: true
export_only_approved: true
# Git and Pull Request options
commit_message: Update translations
create_pull_request: true
pull_request_title: Update translations
pull_request_body: This pull request updates the translations with the latest approved translations from [Crowdin](https://keycloak.crowdin.com/).
pull_request_labels: area/translations
# Global options
crowdin_branch_name: update-translations
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }}
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}
21 changes: 21 additions & 0 deletions crowdin.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
base_path: .
base_url: https://keycloak.api.crowdin.com
preserve_hierarchy: true
files:
- source: js/apps/account-ui/maven-resources/theme/keycloak.v3/account/messages/messages_en.properties
translation: js/apps/account-ui/maven-resources-community/theme/keycloak.v3/account/messages/messages_%two_letters_code%.properties

- source: js/apps/admin-ui/maven-resources/theme/keycloak.v2/admin/messages/messages_en.properties
translation: js/apps/admin-ui/maven-resources-community/theme/keycloak.v2/admin/messages/messages_%two_letters_code%.properties

- source: themes/src/main/resources/theme/base/account/messages/messages_en.properties
translation: themes/src/main/resources-community/theme/base/account/messages/messages_%two_letters_code%.properties

- source: themes/src/main/resources/theme/base/admin/messages/messages_en.properties
translation: themes/src/main/resources-community/theme/base/admin/messages/messages_%two_letters_code%.properties

- source: themes/src/main/resources/theme/base/email/messages/messages_en.properties
translation: themes/src/main/resources-community/theme/base/email/messages/messages_%two_letters_code%.properties

- source: themes/src/main/resources/theme/base/login/messages/messages_en.properties
translation: themes/src/main/resources-community/theme/base/login/messages/messages_%two_letters_code%.properties

0 comments on commit 5849898

Please sign in to comment.