Skip to content

cli: os i18n extract --no-metadata-forms is ignored once --no-objects-only is passed — the 761-key English Studio metadataForms baseline is inlined into the app's zh-CN bundle #14894

Description

@baozhoutao

Summary

os i18n extract --no-metadata-forms is honoured only while the default --objects-only is in effect. Pass --no-objects-only (needed to get apps / dashboards / pages keys into the bundle) and the Studio metadataForms baseline (761 keys, English source text) is inlined into the app's per-locale bundle file even though --no-metadata-forms was given — the flag's own help says it exists precisely for "a package that owns only its own objects".

Minimal reproduction

Platform 17.2.0, any stack with a few objects and an app.

$ objectstack i18n extract --locales=zh-CN --no-metadata-forms --no-objects-only --dry-run
  Skeleton summary
    zh-CN     1290 key(s)  (of 1290 expected)  + 761 metadataForms key(s)
...
  metadataForms: {          ← line 1374 of the emitted zh-CN.objects.generated.ts

Control: drop --no-objects-only → no metadataForms block (but no apps either, so the app label cannot be localised).

Workaround we used: --filter=kpi_ (our namespace prefix) removes the block; a line diff against the unfiltered output shows the metadataForms block is the only difference.

Expected

  • --no-metadata-forms suppresses the metadataForms group regardless of --objects-only; the two flags are documented as independent.
  • Either way, --no-objects-only should not silently ship the platform's English Studio baseline inside an application bundle for a non-English locale — under the runtime's zh-CN → en → authored chain that file would override the platform's own zh-CN Studio strings with English.

Environment

@objectstack/cli 17.2.0 · Node 22 · app objectstack-ai/kpi (i18n.defaultLocale: 'zh-CN').

Activity

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions