all-contributors / all-contributors/allcontributors.org
docs(translations): META ISSUE for migration
- 主要言語
- MDX
- スター
- 8.1k
- フォーク
- 1.7k
- 平均マージ
- 17時間 1分
- マージ済み PR(30日)
- 6
説明
@JimMadge Editing here...
I've been playing around with i8n and Crowdin and think I have handle on it now.
Some facts,
- Crowdin manages
- sources (for us, the website source in English)
- a string database (strings written in a range of languages) and translation memory (historical translations which can be applied again in the future)
- Crowdin can produce translations. For us that means source files in different language, which we can download according to a pattern
- For this reason, having each locale in a different directory is easiest to manage,
We can _push_ sources from `/src/content/docs/en` **only**
and _pull_ translations to `/src/content/docs/` without any conflicts
- Starlight wants each language at `/src/content/docs//`
- Each language must be entered in `astro.config.mjs`
When everything is working, the process will be
- On merge to main
- Push updated sources to Crowdin
(Because Crowdin has the string database, translations should be kept even if strings move within or between files)
- In testing and on deploy
- Pull translations (for languages we want to publish) from Crowdin
- Build
There are a lot of changes so I want to break them up,
1. Move english site to `/en`, remove redirect that removes lang codes
2. Add Crowdin configuration
Add npm script to pull translations and configuration to build with translations (but in comments)
4. Workflow to sync sources when merged to main
5. Update tests to build with translations
Update Netlify build to include translations
7. Add location-based redirects
コントリビューションガイド
評価
この issue はまだ評価されていません。