Files
docs/crowdin.yml
T
ErickSkrauch 930c7e63e2 Integrate Crowdin and restore CI
- Add crowdin.yml for the Docusaurus layout: documentation pages and UI strings
  (navbar, footer) with Russian as the source language. Docusaurus theme strings
  (code.json) are excluded, since the theme already has translations
- Add the CI workflow: uploads sources to Crowdin and downloads translations on
  master, builds and deploys to GitHub Pages, nightly rebuild with fresh translations.
  Local translations (i18n/en) are uploaded to Crowdin only on demand: with
  "[crowdin upload translations]" in the commit message or via a manual run
- Publish languages other than Russian and English only when their translation
  progress in Crowdin is at least 60% (scripts/crowdin-locales.mjs, DOCS_LOCALES)
- Add Chinese (zh-Hans, served under /zh/) to the locales configuration
- Generate the root index.html and robots.txt from the actually built locales
- Keep only the English translation in the repository, other i18n dirs are generated
2026-10-28 20:42:03 +01:00

26 lines
1.1 KiB
YAML

# Russian is the source language. Translations to other languages are downloaded during the CI build.
# The Russian UI strings (navbar, footer) must be generated before uploading the sources:
# npm run write-translations -- --locale ru --override
base_url: https://ely.crowdin.com
project_id: 2
api_token_env: CROWDIN_PERSONAL_TOKEN
preserve_hierarchy: true
files:
# Documentation pages
- source: /docs/**/*
translation: /i18n/%two_letters_code%/docusaurus-plugin-content-docs/current/**/%original_file_name%
# Crowdin language => Docusaurus locale (i18n directory name). Must match the localeConfigs
# in docusaurus.config.ts and LOCALES_MAPPING in scripts/crowdin-locales.mjs
languages_mapping: &languages_mapping
two_letters_code:
zh-CN: zh-Hans
# UI strings: navbar, footer, etc.
- source: /i18n/ru/**/*.json
translation: /i18n/%two_letters_code%/**/%original_file_name%
languages_mapping: *languages_mapping
ignore:
# Strings of the Docusaurus theme itself, they already have translations to most languages
- /i18n/ru/code.json