Skip to content

Scaffold de/fr/nl docs locale UI strings - #36

Merged
zzzoryn merged 2 commits into
v1.0.0-beta.4from
cursor/tsk-193-locales-skeleton
Dec 2, 2026
Merged

zzzoryn merged 2 commits into
v1.0.0-beta.4from
cursor/tsk-193-locales-skeleton

Conversation

@zzzoryn

@zzzoryn zzzoryn commented Dec 1, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Step 1 of 3: UI scaffolding for German, French, and Dutch docs locales. Pages are not translated yet.

Added

  • Generated and translated Docusaurus UI scaffolding for de, fr, and nl:
    • i18n/<locale>/code.json
    • i18n/<locale>/docusaurus-theme-classic/navbar.json
    • i18n/<locale>/docusaurus-theme-classic/footer.json
    • i18n/<locale>/docusaurus-plugin-content-docs/version-v1.0.json
    • i18n/<locale>/docusaurus-plugin-content-docs/current.json (label mirror; write-translations only emits version-v1.0.json while includeCurrentVersion is false)
  • Sidebar category labels translated in those JSON files. No per-locale _category_.json content folders yet, because page content is not translated in this PR.
  • Extended scripts/sync-docs-version.mjs so docs:check / docs:sync also cover i18n/<locale>/docusaurus-plugin-content-docs/current <-> version-v1.0 for de/fr/nl when both folders exist. Locales without those folders are skipped. Existing ru/en behavior is unchanged.
  • src/theme/PlanBadges: dedicated de/fr/nl badge copy with plan names from the product UI (Free / Gratuit / Gratis, Enterprise). Unknown locales fall back to English.

Intentionally left for later PRs

  • Translate docs pages by section into de/fr/nl content folders.
  • Add de/fr/nl to i18n.locales and the locale dropdown only after those locales are fully translated (final PR).
  • No config change in this PR: scaffolding builds without listing unpublished locales.

Terminology

  • Feature names taken from okkeyapp/okkey dev web locale files (packages/i18n/src/locales/web/{de,fr,nl}.json).
  • Formal address: de Sie / fr vous / nl u. Product name Okkey unchanged.
  • Plan names from app i18n: Free remains Free (de), Gratuit (fr), Gratis (nl); Enterprise remains Enterprise in all three.

Checks

  • npm run docs:check - pass
  • npm run build (ru + en) - pass
Open in Web Open in Cursor 

@zzzoryn zzzoryn left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 build green 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 as i18n/en in all three locales (plus logo.alt), no Cyrillic left in messages.
  • scripts/sync-docs-version.mjs: tested on the #36+#37 merge. docs:check passes; a changed file in i18n/nl/.../version-v1.0/intro.md and a file missing from i18n/fr/.../current both 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):

  1. src/theme/PlanBadges/index.tsx:57 - i18n.currentLocale === 'en' ? COPY.en : COPY.ru falls back to Russian, so every de/fr/nl page shows the badge as "Тариф / Бесплатный / Предприятие" (seen in the local build, e.g. build/de/index.html). Add de/fr/nl copies, with plan names as in the app (Free / Gratuit / Gratis, Enterprise), or at least fall back to EN.
  2. 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:check checks 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 with i18n/en/.../current would 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.

Comment thread i18n/nl/code.json Outdated
"description": "The ARIA label for the main navigation"
},
"theme.NotFound.p1": {
"message": "We kunnen niet vinden waar je naar op zoek bent.",

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Informal "je". Formal address: "We kunnen niet vinden waar u naar op zoek bent."

cursoragent and others added 2 commits December 1, 2026 08:41
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>
@cursor
cursor Bot force-pushed the cursor/tsk-193-locales-skeleton branch from c62d00e to a135b4a Compare December 1, 2026 08:43
@cursor cursor Bot changed the title TSK-193: scaffold de/fr/nl docs locale UI strings Scaffold de/fr/nl docs locale UI strings Dec 1, 2026

@zzzoryn zzzoryn left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 build green; 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's plan.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:186 now 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.

@zzzoryn
zzzoryn marked this pull request as ready for review December 2, 2026 07:47
@zzzoryn
zzzoryn merged commit 0fc26d1 into v1.0.0-beta.4 Dec 2, 2026
1 check passed
cursor Bot pushed a commit that referenced this pull request Dec 2, 2026
Resolve squash-merge conflicts from parent PRs #36/#37 (and #33/#34).
Keep v1.0.0-beta.4 docs content; retain #38 locale enablement changes
in docusaurus.config.ts, scripts/sync-docs-version.mjs, and README.md.

Co-authored-by: Alexander Zorin <zzzoryn@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants