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

Updated crowdin and added github workflow #112

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
29 changes: 29 additions & 0 deletions .github/workflows/crowdin.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Crowdin Sync

on:
push:
branches:
- main # Adjust the branch as needed

jobs:
sync:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Install Crowdin CLI
run: |
curl -s https://api.crowdin.com/downloads/cli/v3/crowdin-cli.zip -o crowdin-cli.zip
unzip crowdin-cli.zip -d crowdin-cli
sudo mv crowdin-cli/crowdin /usr/local/bin/

- name: Crowdin Sync
run: |
crowdin upload sources \
--project-id 683600 \
--token ${{ secrets.CROWDIN_API_TOKEN }} \
--preserve-hierarchy true \
--files 'i18n/en/**/*:/i18n/%two_letters_code%/**/%original_file_name%' \
--files 'docs/**/*:/i18n/%two_letters_code%/docusaurus-plugin-content-docs/current/**/%original_file_name%' \
--files 'changelog/**/*:/i18n/%two_letters_code%/docusaurus-plugin-content-blog-changelog/**/%original_file_name%'
12 changes: 12 additions & 0 deletions crowdin.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
project_id: 683600
preserve_hierarchy: true
files:
# JSON translation files
- source: /i18n/en/**/*
translation: /i18n/%two_letters_code%/**/%original_file_name%
# Docs Markdown files
- source: /docs/**/*
translation: /i18n/%two_letters_code%/docusaurus-plugin-content-docs/current/**/%original_file_name%
# Blog Markdown files
- source: /changelog/**/*
translation: /i18n/%two_letters_code%/docusaurus-plugin-content-blog-changelog/**/%original_file_name%