Repository navigation
Scaffold de/fr/nl docs locale UI strings - #36
Conversation
zzzoryn
left a comment
There was a problem hiding this comment.
Review of head c62d00e (base v1.0.0-beta.4). Verdict: OK to merge after Alex's "merge", no blockers in this PR. Two things must be fixed before the de/fr/nl locales are enabled (see below).
What I checked:
- CI
buildgreen on c62d00e; draft; mergeable clean. The branch is cut from 512c2b0 (before #35), but it only adds new files and the script, so it merges cleanly. code.json,navbar.json,footer.json,version-v1.0.json: same key set asi18n/enin all three locales (pluslogo.alt), no Cyrillic left in messages.scripts/sync-docs-version.mjs: tested on the #36+#37 merge.docs:checkpasses; a changed file ini18n/nl/.../version-v1.0/intro.mdand a file missing fromi18n/fr/.../currentboth fail the check as expected; locales without content folders are skipped.- Full build with
locales: ['ru','en','de','fr','nl']in a local temp copy (#36+#37 merged onto v1.0.0-beta.4,onBrokenLinks/onBrokenAnchors/onBrokenMarkdownLinks: 'throw'): passes for all 5 locales. - Only hyphens, no en/em dashes in the scaffolding files.
Must fix before enabling the locales (here or in the enable PR):
src/theme/PlanBadges/index.tsx:57-i18n.currentLocale === 'en' ? COPY.en : COPY.rufalls back to Russian, so every de/fr/nl page shows the badge as "Тариф / Бесплатный / Предприятие" (seen in the local build, e.g.build/de/index.html). Addde/fr/nlcopies, with plan names as in the app (Free / Gratuit / Gratis, Enterprise), or at least fall back to EN.i18n/nl/code.json:186- "We kunnen niet vinden waar je naar op zoek bent." uses informal "je". Formal: "We kunnen niet vinden waar u naar op zoek bent."
Non-blocking:
docs:checkchecks only current <-> version-v1.0 inside a locale. It does not catch a page that exists in EN but is missing in de/fr/nl (Docusaurus then silently serves the fallback). A simple file-list comparison withi18n/en/.../currentwould make the "translation is complete" condition checkable before enabling.- The PR title and commit start with "TSK-193", and the description mentions an internal glossary repo. This is a public repo; please drop the internal task number from the squash title (other docs commits have none) and the internal repo reference from the description.
| "description": "The ARIA label for the main navigation" | ||
| }, | ||
| "theme.NotFound.p1": { | ||
| "message": "We kunnen niet vinden waar je naar op zoek bent.", |
There was a problem hiding this comment.
Informal "je". Formal address: "We kunnen niet vinden waar u naar op zoek bent."
Generate and translate Docusaurus UI strings for German, French, and Dutch without publishing those locales yet. Extend docs:check to sync optional locale current/version-v1.0 content folders when they exist. Co-authored-by: Alexander Zorin <zzzoryn@users.noreply.github.com>
Add de/fr/nl plan badge copy with app tier names (Free/Gratuit/Gratis, Enterprise) and fall back to English for unknown locales. Use formal Dutch "u" on the NotFound page string. Co-authored-by: Alexander Zorin <zzzoryn@users.noreply.github.com>
c62d00e to
a135b4a
Compare
zzzoryn
left a comment
There was a problem hiding this comment.
Re-review of head a135b4a (base v1.0.0-beta.4 cc88c01). Verdict: OK to merge after Alex's "merge". All points from my previous review are fixed.
- Rebased: the branch now contains cc88c01 (#35). CI
buildgreen; draft; mergeable clean. Diff: de/fr/nl UI JSON,scripts/sync-docs-version.mjs,src/theme/PlanBadges/index.tsx. src/theme/PlanBadges/index.tsx: de/fr/nl copies added and the lookup falls back to EN (COPY[locale] ?? COPY.en). Tier names match the app'splan.free/plan.enterprise(Free / Gratuit / Gratis, Enterprise). In a local build with all five locales the badge reads "Tarif / Free / Enterprise", "Forfait / Gratuit / Enterprise", "Plan / Gratis / Enterprise"; no Russian badge text left under /de/, /fr/, /nl/.i18n/nl/code.json:186now uses formal "u".- Title and description no longer mention the internal task number or the glossary.
Note for merging: the default squash message lists the commit messages, and commit 9cd6225 still has the internal task number in its subject. Please clear the squash body (or use only the PR title) when merging.
Summary
Step 1 of 3: UI scaffolding for German, French, and Dutch docs locales. Pages are not translated yet.
Added
de,fr, andnl:i18n/<locale>/code.jsoni18n/<locale>/docusaurus-theme-classic/navbar.jsoni18n/<locale>/docusaurus-theme-classic/footer.jsoni18n/<locale>/docusaurus-plugin-content-docs/version-v1.0.jsoni18n/<locale>/docusaurus-plugin-content-docs/current.json(label mirror;write-translationsonly emitsversion-v1.0.jsonwhileincludeCurrentVersionis false)_category_.jsoncontent folders yet, because page content is not translated in this PR.scripts/sync-docs-version.mjssodocs:check/docs:syncalso coveri18n/<locale>/docusaurus-plugin-content-docs/current<->version-v1.0forde/fr/nlwhen both folders exist. Locales without those folders are skipped. Existingru/enbehavior is unchanged.src/theme/PlanBadges: dedicatedde/fr/nlbadge copy with plan names from the product UI (Free/Gratuit/Gratis,Enterprise). Unknown locales fall back to English.Intentionally left for later PRs
de/fr/nlcontent folders.de/fr/nltoi18n.localesand the locale dropdown only after those locales are fully translated (final PR).Terminology
okkeyapp/okkeydevweb locale files (packages/i18n/src/locales/web/{de,fr,nl}.json).Checks
npm run docs:check- passnpm run build(ru + en) - pass