Skip to content

docs(translations): META ISSUE for migration #903

@lwasser

Description

@lwasser

@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/<lang> without any conflicts
  • Starlight wants each language at /src/content/docs/<lang>/
  • 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)
  3. Workflow to sync sources when merged to main
  4. Update tests to build with translations
    Update Netlify build to include translations
  5. Add location-based redirects

Sub-issues

Metadata

Metadata

Assignees

Labels

documentationDocumentation related issue/PRtranslationsAny issues or pr's related to translations

Type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions