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
This commit is contained in:
ErickSkrauch committed 2026-10-28 20:42:03 +01:00
1 parent a5dac3b611
commit 930c7e63e2
18 files changed
+280 -1353

No files matched your search

-37
View File
@@ -1,37 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Ely.by Documentation</title>
<link rel="alternate" hreflang="ru" href="https://docs.ely.by/ru/">
<link rel="alternate" hreflang="en" href="https://docs.ely.by/en/">
<link rel="alternate" hreflang="x-default" href="https://docs.ely.by/ru/">
<script>
(function () {
var ruLike = ['ru', 'be', 'uk', 'kk'];
var languages = navigator.languages || [navigator.language || ''];
var target = '/en/';
for (var i = 0; i < languages.length; i++) {
var lang = String(languages[i]).toLowerCase().split('-')[0];
if (ruLike.indexOf(lang) !== -1) {
target = '/ru/';
break;
}
if (lang === 'en') {
break;
}
}
window.location.replace(target + window.location.search + window.location.hash);
})();
</script>
</head>
<body>
<ul>
<li><a href="/ru/" hreflang="ru">Документация Ely.by на русском</a></li>
<li><a href="/en/" hreflang="en">Ely.by documentation in English</a></li>
</ul>
</body>
</html>
-5
View File
@@ -1,5 +0,0 @@
User-agent: *
Allow: /
Sitemap: https://docs.ely.by/ru/sitemap.xml
Sitemap: https://docs.ely.by/en/sitemap.xml