Conversation
Scaffolds Docusaurus i18n for Turkish:
- docusaurus.config.js: add 'tr' to i18n.locales with localeConfigs
(label 'Türkçe', htmlLang 'tr'), and a localeDropdown navbar item so
visitors can actually switch language.
- i18n/tr/code.json, docusaurus-theme-classic/{navbar,footer}.json,
docusaurus-plugin-content-docs/current.json, docusaurus-plugin-content-blog/options.json:
generated via `docusaurus write-translations --locale tr` and
translated. Docusaurus's bundled Turkish theme pack already covered
most of code.json (404 page, admonition labels, pagination, copy
button, etc.) — the handful of strings it left in English, and every
string specific to this site's own navbar/sidebar structure (all
Use/Build/API/Tutorials section and category labels + generated-index
titles/descriptions), are translated here.
- i18n/tr/docusaurus-plugin-content-docs/current/getting-started.md and
.../Learn/what-is-qrl.md: full Turkish translations of the two doc
pages linked directly from the sidebar root (the site's landing page
and its "What Is The QRL" primer) — the two pages every new visitor
hits first.
footer.json's copyright message drops the year rather than translating
the config's dynamically-templated `${new Date().getFullYear()}` value,
since a locale JSON file freezes it as a static string; English keeps
the live year via the untranslated default.
Everything else in docs/ stays English for now and falls back to it
automatically — Docusaurus locale fallback is per-page, so this is
additive and doesn't leave any page blank.
Note: `write-translations` itself crashes on this Docusaurus 2.4.1 +
@cmfcmf/docusaurus-search-local combination (it tries to Babel-parse the
search plugin's generated.d.ts as source and hits a real syntax error
under TS's `isolatedDeclarations`-style const-without-initializer). Ran
it with `plugins: []` temporarily to get a clean extraction, then
restored the real config — the generated JSON is otherwise exactly what
the command would have produced.
Verified: `npm run build` builds both locales clean (onBrokenLinks:
'throw' catches any bad link in the translated markdown) — confirmed
Turkish content renders in build/tr/ (sidebar shows "Başlarken" / "QRL
Nedir", etc.).
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
✅ Deploy Preview for stalwart-palmier-0ab66c ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
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
Scaffolds Docusaurus i18n for Turkish and translates the two pages every
visitor lands on first.
docusaurus.config.js:'tr'added toi18n.localeswithlocaleConfigs(labelTürkçe,htmlLang: 'tr'), plus alocaleDropdownnavbar item so visitors can actually switch language— without it the locale would build but nothing in the UI would let
anyone reach it.
i18n/tr/code.json,docusaurus-theme-classic/{navbar,footer}.json,docusaurus-plugin-content-docs/current.json,docusaurus-plugin-content-blog/options.json: generated viadocusaurus write-translations --locale tr, then translated.Docusaurus ships a bundled Turkish theme pack, so most of
code.json(404 page, admonition labels, pagination, copy-code button, etc.) came
through already translated — I filled in the handful it left in
English, and translated everything specific to this site's own
navbar/sidebar structure (every Use/Build/API/Tutorials section and
category label, plus their generated-index titles and descriptions).
i18n/tr/docusaurus-plugin-content-docs/current/getting-started.mdand
.../Learn/what-is-qrl.md: full translations of the two doc pageslinked from the sidebar root — the site's landing page and its "What
Is The QRL" primer.
Everything else in
docs/is untranslated for now and simply falls backto English — Docusaurus's locale fallback is per-page, so this is
additive and doesn't leave any route blank. Happy to follow up with more
pages in separate, smaller PRs.
Note on
copyrightfooter.json'scopyrightmessage drops the year instead oftranslating the config's
`Copyright © ${new Date().getFullYear()}...`— a locale JSON freezes whatever string is in it, so translating the
already-evaluated 2026 would leave the Turkish footer stuck on that year
forever while English keeps ticking over via the live template.
Note on
write-translationsRunning
write-translations --locale tras-is crashes on thisDocusaurus 2.4.1 +
@cmfcmf/docusaurus-search-localcombination — ittries to Babel-parse the search plugin's
generated.d.tsas source andhits a real parse error (
Missing initializer in const declaration) onthat plugin's TypeScript declaration file. I extracted with
plugins: []temporarily to get a clean run, then restored the realconfig; the resulting JSON is otherwise exactly what the command would
produce. Flagging this in case it's worth an upstream report against the
search plugin — not something to fix in this repo.
Verification
npm run buildbuilds both locales clean end to end (the site hasonBrokenLinks: 'throw', so any bad link in the translated Markdownwould fail the build):
Spot-checked
build/tr/index.html— sidebar renders "Başlarken" /"QRL Nedir" etc.
🤖 Generated with Claude Code