Skip to content

Commit 093e848

Browse files
os-zhuangclaude
andauthored
docs(deploy): rewrite the Deploy section for the commercial runtime (#62)
The four Deploy pages documented a licence-free, build-it-yourself path that cannot work: a `git clone` + `docker build` section for a repository that holds only the docs site, a moving-tag publishing table, and zero mentions of licensing on a product whose walled postures refuse to boot without a licence. `air-gapped.mdx` was reverse-wrong — it told readers to leave the cloud-posture setting unset "to run fully offline", when unset resolves to the public control plane. Rewritten from the deployment artifacts that ship with the release: - The image is pinned by digest, never a tag, with the reasoning. - Licence is on the happy path, including which shape needs which licence mode. - Air-gap is a licence mode, not a firewall setting. Unset is not "off". - Unsupported combinations are described as refused at startup, with the supported matrix stated in full. - Multi-node states what becomes mandatory: cluster driver plus one shared secret key, or the runtime refuses to start. - Supply-chain verification (signature, SBOM, provenance) is in the production path. The pages carry the decision shape and point at the release's deploy bundle for values a customer copies, so there is no prose copy of a template here to drift. Stale translations of all four pages are deleted in six locales; Fumadocs falls back to English, so a missing translation renders correct content while a stale one renders the retired story. AGENTS.md's locale conventions are corrected in the same pass: they described `en` + `cn` with `.cn.mdx` siblings, while the site defines seven BCP 47 tags and uses `zh-Hans`. A `.cn.mdx` file never renders and raises no error. Claude-Session: https://claude.ai/code/session_0137TnZzVmkSjXxoSVgPFS6S Co-authored-by: Claude <noreply@anthropic.com>
1 parent d13ba76 commit 093e848

29 files changed

Lines changed: 411 additions & 2401 deletions

‎AGENTS.md‎

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ ObjectOS — the commercial runtime environment for ObjectStack applications (Cl
1010

1111
### 1. English is the single source of truth for all content
1212

13-
All marketing copy, UI strings, and documentation are authored in **English first**. Chinese (`cn`) and any future locales are **translations derived from English**.
13+
All marketing copy, UI strings, and documentation are authored in **English first**. Every other locale (`zh-Hans`, `ja`, `de`, `es`, `fr`, `ko`) is a **translation derived from English**.
1414

1515
- **Always edit the English source first.** Never patch a translation without updating the English original — translation passes will overwrite you.
16-
- If a typo or wording change only appears in Chinese, fix English too (it almost certainly has the same issue or will after the next sync).
16+
- If a typo or wording change only appears in a translation, fix English too (it almost certainly has the same issue or will after the next sync).
1717
- New content must be added to English before translations are touched.
1818
- Translations are derived artifacts; treat them like generated code that happens to be checked in.
1919

@@ -33,17 +33,17 @@ Stack: Next.js 16 App Router + Fumadocs UI 16 + Fumadocs MDX. Many UI affordance
3333
| Language display names | `apps/docs/app/[lang]/layout.tsx` (`LANGUAGE_NAMES`) |
3434
| Locale detection / URL rewrite | `apps/docs/middleware.ts` |
3535
| Header + logo | `apps/docs/lib/layout.shared.tsx` |
36-
| Homepage copy (en + cn) | `apps/docs/lib/homepage-i18n.ts` |
3736
| Docs MDX content | `content/docs/**/*.mdx` |
3837
| Sidebar structure / grouping | `content/docs/**/meta.json` |
3938

4039
### Locale conventions
4140

42-
- Supported locales: `en` (default), `cn`.
43-
- Default locale has no prefix (`/docs/...`); other locales are prefixed (`/cn/docs/...`). This is set by `hideLocale: 'default-locale'` in `lib/i18n.ts`.
44-
- **MDX translations:** add a sibling file with `.cn.mdx` next to the English `.mdx`. Fumadocs auto-falls-back to English when a translation is missing — you can ship translations incrementally without breaking links.
45-
- **Homepage strings:** must exist in both `en` and `cn` objects in `lib/homepage-i18n.ts` (they implement the `HomepageTranslations` interface; missing keys are a type error).
46-
- **Sidebar titles:** `meta.json` `title` fields currently render in all locales. If you localize sidebar labels, add per-locale `meta.cn.json` (Fumadocs convention) — don't translate inside the English file.
41+
- Supported locales, as BCP 47 tags — `apps/docs/lib/i18n.ts` is the authority: `en` (default), `zh-Hans`, `ja`, `de`, `es`, `fr`, `ko`.
42+
- ⛔ **There is no `cn` locale.** It is a legacy code that `middleware.ts` 308-redirects to `zh-Hans`. A file named `foo.cn.mdx` would never render **and would raise no error** — it is simply ignored, which is the worst possible failure mode for a translation. Simplified Chinese is `zh-Hans`.
43+
- Default locale has no prefix (`/docs/...`); other locales are prefixed (`/zh-Hans/docs/...`). This is set by `hideLocale: 'default-locale'` in `lib/i18n.ts`.
44+
- **MDX translations:** add a sibling file with the locale tag next to the English `.mdx` — `foo.zh-Hans.mdx`, `foo.ja.mdx`, and so on. Fumadocs auto-falls-back to English when a translation is missing — you can ship translations incrementally without breaking links.
45+
- **Language display names:** `LANGUAGE_NAMES` in `apps/docs/app/[lang]/layout.tsx`. Adding a locale to `i18n.ts` without a name here shows the raw tag in the switcher.
46+
- **Sidebar titles:** `meta.json` `title` fields render in all locales unless a per-locale sibling exists. To localize sidebar labels, add `meta.<locale>.json` (e.g. `meta.zh-Hans.json`, Fumadocs convention) — don't translate inside the English file.
4747

4848
### Sidebar grouping
4949

@@ -52,16 +52,18 @@ Folder `meta.json` files declare a section's title, page order, and `defaultOpen
5252
### Translation workflow
5353

5454
When the English source changes:
55-
1. Edit the English `.mdx` / `en` object first; verify it renders.
56-
2. Update the `.cn.mdx` / `cn` object to match.
57-
3. If a `.cn.mdx` doesn't exist yet, that's fine — Fumadocs falls back to English. Create one when you're ready to translate, not as a stub.
55+
1. Edit the English `.mdx` first; verify it renders.
56+
2. Update each existing locale sibling (`.zh-Hans.mdx`, `.ja.mdx`, …) to match.
57+
3. If a locale sibling doesn't exist yet, that's fine — Fumadocs falls back to English. Create one when you're ready to translate, not as a stub.
5858
4. Keep `frontmatter` (title, description) translated too.
59+
5. **A rewrite that changes what a page asserts must delete the stale siblings it invalidates**, not leave them. A missing translation renders correct English; a stale one renders content the English source no longer claims.
5960

6061
### Don't
6162

6263
- Don't reintroduce the `---Section---` + `"...folder"` flat sidebar pattern.
6364
- Don't set `alt="ObjectOS"` on the logo image when the adjacent text already says "ObjectOS" — screen readers read it twice. Use `alt=""` + `aria-hidden`.
64-
- Don't add Chinese-only strings or files. If it doesn't have an English source, it shouldn't exist yet.
65+
- Don't add translation-only strings or files. If it doesn't have an English source, it shouldn't exist yet.
66+
- Don't write a `.cn.mdx` sibling. That locale does not exist; the file is ignored silently. Use `.zh-Hans.mdx`.
6567

6668
## Commands
6769

‎content/docs/deploy/air-gapped.de.mdx‎

Lines changed: 0 additions & 70 deletions
This file was deleted.

‎content/docs/deploy/air-gapped.es.mdx‎

Lines changed: 0 additions & 69 deletions
This file was deleted.

‎content/docs/deploy/air-gapped.fr.mdx‎

Lines changed: 0 additions & 68 deletions
This file was deleted.

‎content/docs/deploy/air-gapped.ja.mdx‎

Lines changed: 0 additions & 69 deletions
This file was deleted.

0 commit comments

Comments
 (0)