Seam request: ScopedTranslocoLoader needs a 'shared' scope path #59
Labels
No labels
in-progress
in-review
ready-for-agent
seam-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
patrick/Polaris#59
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Found while working #13 (PH1.5 — web shared UI)
frontend/src/app/core/i18n/transloco-loader.ts(ScopedTranslocoLoader, owned by PH0.5/feature/web-skeleton, not by PH1.5's owned paths) resolves a Transloco scope to an asset path like this:docs/12-implementation-plan.md's "Frontend decoupling rules" says: "shared/ has one scope for common strings". PH1.5 created that scope's files at
frontend/src/app/shared/i18n/{en,nl}.json(angular.json's asset glob**/i18n/*.jsonundersrc/appalready copies them to the build output at/shared/i18n/<lang>.json). But the loader above only special-casesshell; any other scope name — includingshared— is assumed to live underfeatures/<scope>/i18n/.... SoprovideTranslocoScope('shared')would 404 at/features/shared/i18n/en.jsoninstead of resolving to/shared/i18n/en.json.This doesn't block #13 itself (nothing wires
shared/ui/shared/admin-crudcomponents into an actual routed page yet — no feature has adopted them), but it will block the first feature ticket that mounts ashared/ui/shared/admin-crudcomponent and needs itsshared.*strings (e.g.shared.actions.save,shared.adminCrud.addNew) to actually translate at runtime.Suggested fix
One line, in a file PH1.5 isn't allowed to touch (
core/i18n/**). Whichever feature ticket first depends onshared/i18nstrings resolving at runtime should either make this fix as part of its own PR or should be blocked on a small dedicated PR that does.Owns
frontend/src/app/core/i18n/transloco-loader.tsonly (plus its existing spec, if one needs updating).