Skip to content

cli: os i18n extract --check failure prints a regenerate command with --locales= empty and every other flag dropped — following it yields a different bundle that fails --check again #14895

Description

@baozhoutao

Summary

When os i18n extract --check fails, the "regenerate and commit" line it prints is not the command that would regenerate the bundle: --locales= is printed empty, and every other flag the invocation carried (--no-objects-only, --filter, --no-metadata-forms) is dropped. Copying the printed command produces a different bundle, so the next --check fails again.

Minimal reproduction

Platform 17.2.0.

$ objectstack i18n extract --locales=zh-CN --no-metadata-forms --no-objects-only --filter=kpi_ --out=/tmp/i18n-out --check
  Skeleton summary
    zh-CN      529 key(s)  (of 529 expected)
  ✗ missing:    ../../../../../../../private/tmp/i18n-out/zh-CN.objects.generated.ts
  ✗ Translation bundles have drifted from the schema. Regenerate and commit:
  os i18n extract  --locales= --fill=empty --out=/tmp/i18n-out

Three defects in one line:

  1. --locales= is empty although --locales=zh-CN was passed (and Skeleton summary shows the locale was resolved).
  2. --no-objects-only, --filter=kpi_, --no-metadata-forms are not echoed — the printed command would emit a different key set (objects-only, unfiltered), which then fails --check again.
  3. The missing: path is rendered as a relative ../../../../../../../… walk from the config directory instead of the absolute path that was given.

Expected

The regenerate hint reproduces the exact invocation minus --check (all flags, resolved locales, the --out as given). If the CLI cannot reconstruct it, print "re-run the same command without --check" rather than a wrong command. Paths in diagnostics should be printed as given (or absolute).

Environment

@objectstack/cli 17.2.0 · Node 22 · app objectstack-ai/kpi.


Blocker discharged — ⛔ no live Blocked-by: line remains on this card. This body previously carried Blocked-by: #16502. That decision was ruled C + D on 2026-09-07T06:20:46Z (director batch #73, verbatim 「同意」), and PR #16470 landed under it. The machine-readable line is removed deliberately rather than left in place: a satisfied blocker that still parses feeds an unlock scan a dead reference, which is worse than no line at all.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions