Skip to content

Locale parity drift — 37 keys in en.json missing from zh.json (3 zh-only keys) #3557

Description

@houko

Summary

Key-flatten diff between en.json and zh.json shows 37 keys missing from zh (e.g. analytics.avg_cost_per_call, common.on, hands.new_schedule, hands.schedule_created, media.format_* x6, media.status_* x3, memory.embedding_section, memory.api_key_env, mcp.badge, …) plus 3 keys (scheduler.cron_format, scheduler.custom_cron, scheduler.presets) only present in zh. With fallbackLng: "en", Chinese users see English text mid-page for the 37 missing strings — visible regression after recent feature merges.

Location

  • crates/librefang-api/dashboard/src/locales/en.json
  • crates/librefang-api/dashboard/src/locales/zh.json

Failure

  • Hands schedule modal, Media generator, Memory embedding section, MCP badge, Analytics — all show English to zh users.
  • 3 zh-only keys are dead — any translation flow comparing parity silently drops them.
  • No CI guard, so the drift will continue accumulating.

Fix

  • Add CI step pnpm test:i18n-parity that diffs flattened keys between en/zh and fails on mismatch.
  • Translate the 37 missing zh keys; delete the 3 dead zh keys.
  • Long-term: generate a typed key union from en.json (e.g. i18next-resources-for-ts) so missing-key access is a compile error, not a render-time fallback.

Metadata

Metadata

Assignees

No one assigned

    Labels

    has-prA pull request has been linked to this issueneeds-triageAuto-applied when the issue title/body matched no area label — needs maintainer reviewseverity/lowMinor issue, polish, or developer ergonomics

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions