feat(i18n): ADR-0029 D8 — migrate i18n ownership for moved domains to their plugins#1451
Merged
Merged
Conversation
… their plugins The object translations for the webhooks/approvals/security(RBAC+sharing) domains lived in the platform-objects generated bundles even though the objects now live in their capability plugins. Move each domain's i18n extraction + bundles to the owning plugin, preserving every hand-translated zh-CN/ja-JP/es-ES string via `os i18n extract --merge`. Per plugin: a build-time scripts/i18n-extract.config.ts (self-baselined) + a src/translations/ bundle (objects.generated per locale + index barrel) + a kernel:ready hook that loads it via i18n.loadTranslations (best-effort). - plugin-webhooks <- sys_webhook, sys_webhook_delivery - plugin-approvals <- sys_approval_request, sys_approval_action - plugin-security <- sys_role, sys_permission_set, sys_user_permission_set, sys_role_permission_set - plugin-sharing <- sys_record_share, sys_sharing_rule, sys_share_link platform-objects translation bundles regenerated to drop those objects' keys (its extract config already excluded them); all other objects + metadata-form bundles preserved. Verified: moved objects gone from platform-objects, retained objects (sys_user) intact, zh-CN translations preserved in the plugin bundles. Tests: platform-objects 58 / plugin-webhooks 45 / plugin-approvals 30 / plugin-security 76 / plugin-sharing 54 — green; turbo build (incl. DTS) green. https://claude.ai/code/session_01Tv6F1Ub6bhCedrx3r8sZM4
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes the ADR-0029 D8 follow-up tracked since K2.a: the object i18n for the already-moved domains lived in the
@objectstack/platform-objectsgenerated bundles even though the objects now live in their capability plugins. This migrates each domain's i18n extraction + bundles + runtime loading to the owning plugin, preserving every hand-translated string (zh-CN / ja-JP / es-ES).Done with the real
os i18n extracttooling (not hand-edited generated files), as requested.Per plugin
Each plugin gains:
scripts/i18n-extract.config.ts(self-baselined against its own generated bundles so--mergere-runs preserve translations);src/translations/bundle —{en,zh-CN,ja-JP,es-ES}.objects.generated.ts+ anindex.tsbarrel exporting aTranslationBundle;kernel:readyhook that loads the bundle viai18n.loadTranslations(best-effort; the i18n service is optional).plugin-webhookssys_webhook,sys_webhook_deliveryplugin-approvalssys_approval_request,sys_approval_actionplugin-securitysys_role,sys_permission_set,sys_user_permission_set,sys_role_permission_setplugin-sharingsys_record_share,sys_sharing_rule,sys_share_linkplatform-objects
Regenerated its translation bundles (its extract config already excluded these objects). The moved objects' keys are dropped; all other objects' translations and the metadata-form bundles are preserved (objects: 1634 keys/locale + 430 metadataForms).
How the seed preserved translations
Each plugin's extract was first run with a temporary baseline pointing at
platform-objects' existing bundles + a--filterfor that plugin's objects, so the hand-translated zh-CN/ja-JP/es-ES strings carried over; the committed config then self-baselines for future runs.Verification
platform-objectsbundles (sys_webhook/sys_approval_request/sys_role/… = 0); retained objects intact (sys_user= 1).sys_role→ "角色",sys_approval_request→ "审批请求",sys_webhookdescription in Chinese).turbo build(5 packages + dep graph, incl. DTS type-check): greenNotes
platform-objectscan only be regenerated once all moved domains own their bundles (otherwise their translations would be dropped before the plugins provide them) — hence all four in one PR.driver-mongodbCI-skip fix already onmain, soTest Coreshould be green.https://claude.ai/code/session_01Tv6F1Ub6bhCedrx3r8sZM4
Generated by Claude Code