feat: add French translation and enable the fr locale - #56
Open
BryanFRD wants to merge 1 commit into
Open
Conversation
Contributor
|
4.7k, a lot of change to see at once x) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this adds
French locale for SteelDocs, at full parity with the English content.
src/content/docs/fr/— all 28 documentation pagessrc/content/i18n/fr.json— the 17 UI strings, mirroringen.jsonsrc/pages/fr/—index,download,tracker, mirroring thedeandespagesastro.config.ts—frkeys in thetitleand sidebartranslationsmaps, and thefrentry inlocalesfris enabled rather than commented out likedeandes, because the translation iscomplete. That alone makes both language switchers appear; no switcher code was touched. If
you would rather review the content first, commenting out those four lines splits this in two.
Terminology
Kept in English:
chunk,item,seed,block entity,feature flag,wildcard, and allidentifiers, permission keys, TOML keys, paths and code. Translated: block -> bloc, world ->
monde, domain -> domaine, world generator -> générateur de monde. Benchmark figures use French
number formatting; the chart SVGs are shared assets and stay in English.
How this was tested
bun run buildpasses: 114 pages, no errors or warnings. All 31 French routes render withtranslated content rather than the English fallback. Anchors and visual layout are not checked
by the build, so
/fr/configuration/world-configurationand/fr/commands/permissionsareworth a look since they carry the most cross-page anchor links.
One thing to flag
With a second locale active, the build now emits 18 routes under
/fr/de/...and/fr/es/....That happens because
src/content/docs/de/andsrc/content/docs/es/are not registeredlocales, so Starlight treats them as ordinary root-locale content and the fallback duplicates
them under every active locale. It is not caused by this PR, but this PR is what makes it
visible. Enabling
deandes, or moving their content out of the docs tree until they areready, would both fix it.