Files
ComfyUI_frontend/apps/website/public
glary-bot 0fe808ea10 fix(affiliates-terms): remove zh-CN route, English-only legal copy
The Affiliate Program Terms is a legal-reviewed document. Shipping
an unreviewed Chinese translation as the active terms (the previous
zh-CN page rendered translation keys whose 'zh-CN' values intentionally
mirrored 'en' verbatim) exposes us to liability from the translation
diverging from the legal-approved English source, particularly if a
future contributor 'fixes' the placeholder strings into real Chinese
without going through legal.

This change:

- Removes 'apps/website/src/pages/zh-CN/affiliates/terms.astro'.
- Removes the 9 'Disallow: /zh-CN/affiliates/terms' lines from robots.txt
  (one per UA stack); the route no longer exists.
- Simplifies '/affiliates/terms.astro' to be unconditionally English-only:
  drops the runtime locale switch and the 'Locale' import, hardcodes
  'locale=en' on the LegalContentSection.
- Updates the comment on the affiliate-terms i18n block in
  'translations.ts' from 'zh-CN mirrors en until legal approves a
  translation' (which implied a translation could later be approved
  edit-in-place) to an explicit 'ENGLISH ONLY — do NOT translate;
  if a translated terms page is ever needed, add a separate route
  only after legal signs off on that specific translation'. The
  'zh-CN' values themselves still mirror 'en' in source because the
  translations dictionary's type signature requires every entry to
  satisfy Record<Locale, string>; they are now unreachable through
  any route, sitemap, or robots rule.

Sitemap exclusion in astro.config.ts is unchanged — it generically
flatMaps NOINDEX_PATHNAMES over LOCALE_PREFIXES, so removing the
'/zh-CN/affiliates/terms' route automatically drops the (now-stale)
zh-CN entry from the excluded set.

Verification:
- 'pnpm --filter @comfyorg/website typecheck' — 0 errors (90 files, was 91)
- 'pnpm --filter @comfyorg/website test:unit' — 35/35 passing
  (including legalSections.test.ts, 5/5)
- 'pnpm format:check apps/website' — clean
- 'pnpm exec oxlint apps/website/src apps/website/e2e --quiet' — 0 errors
- 'pnpm knip' — clean (pre-existing unrelated warning)
- 'pnpm --filter @comfyorg/website build' — clean, 52 pages built,
  '/zh-CN/affiliates/' absent from dist output
- 'pnpm exec playwright test affiliates-terms' — 9/9 passing
- Probed running 'pnpm preview' server:
    /affiliates/terms        → 200
    /zh-CN/affiliates/terms  → 404 (standard site 404 page)
- Built sitemap-0.xml: zero affiliate-terms entries (en or zh-CN)
- Built robots.txt: 9 'Disallow: /affiliates/terms' entries, zero
  'Disallow: /zh-CN/...' entries

Manual verification:
Screenshots attached at .glary/screenshots/affiliate-terms-hero-date.png
(hero shows 'Effective Date: May 15, 2026' centered under H1) and
.glary/screenshots/affiliate-terms-zh-CN-404.png (zh-CN route resolves
to site 404).
2026-05-14 07:04:27 +00:00
..