Repository navigation
Let project adminUi.* translations reach the admin console - #240
Merged
Merged
Conversation
In a composed site the console copy source is createAdminPresentation({ base: kit.presentation }). The admin ids were resolved only from a presentation built from options.catalogues (empty on that call), so adminUi.* entries in ui/copy/<locale>.json were ignored and the console fell back to bundled English. When a base is given, an admin id the base resolves for the request locale now wins; otherwise the bundled admin English answers.
Verified: the new integration assertion (adminUi.activityDetails on the rendered /admin dashboard) and an admin unit test both fail on the unfixed code and pass on the fix; lint, typecheck, check, npm test and verify:workspaces pass. Not verified: Windows, docs:llms (no docs touched).
Co-Authored-By: Claude Sonnet 5 <[email protected]>
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.
Fixes #227.
Root cause (confirmed by reproduction):
presentationSourcebuildscreateAdminPresentation({ base: kit.presentation }); the admin ids were answered only by an inner presentation built fromoptions.catalogues(empty there), so projectadminUi.*copy in the base was never consulted.Fix: when
baseis given, an admin id the base resolves for the request locale wins; otherwise bundled admin English. No-base and host-supplied presentations unchanged.Tests: extended the generated-consumer override test with an
adminUi.*id asserted on the rendered dashboard, plus an admin unit test. Both fail without the fix. lint, typecheck, check, npm test, verify:workspaces pass. Changeset added.Limitation: a project override supplied only for
enis not applied to other locales (they fall back to bundled admin English).🤖 Generated with Claude Code