Skip to content

fix(i18n): use registered Engine translations for feature metadata - #1070

Draft
sekiroxxxx wants to merge 2 commits into
cocos:mainfrom
sekiroxxxx:codex/engine-i18n-decoupling
Draft

sekiroxxxx wants to merge 2 commits into
cocos:mainfrom
sekiroxxxx:codex/engine-i18n-decoupling

Conversation

@sekiroxxxx

Copy link
Copy Markdown
Contributor

Engine initialization registers the selected Engine's dictionaries. Project settings consulted those resources, while the Engine details API reopened localization.js. A change to a registered feature label could therefore appear in only one view.

This change resolves category, feature, option and flag labels and descriptions from the registered resources in both views. Configuration values, dependencies, conditions and paths pass through unchanged. The CLI also provides the English and Chinese labels for its directory creation action, so an Engine dictionary can change independently.

Verification

  • Built the CLI on macOS arm64 with Node 22.17.0. The declaration snapshot changed only to include the new CLI translation key.
  • Passed 70 targeted tests covering Engine metadata, project settings, asset queries and directory creation. A regression test that changes the registered core label failed against the previous implementation.
  • Compared English and Chinese output before and after the change for Engine 4.0.0-alpha.36 and 4.0.0-beta.3. Render configuration, module settings metadata and the directory menu matched their baselines.
  • Packed a standalone CLI SDK and repeated the comparisons with external Engines. Relocating the same Engine preserved the results. Changing only the copied Engine's core translations changed both views, while the directory menu continued to return the CLI labels. The packaged CLI created directories and returned their matching metadata UUIDs in both languages.

@sekiroxxxx
sekiroxxxx marked this pull request as draft December 3, 2026 07:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant