Automated pull request created via MCP: adds customer-facing localization adoption specs, tests and docs. Co-authored-by: Ahmed Darrazi <ahmed.darrazi@live.de> Reviewed-on: #327
4.8 KiB
4.8 KiB
Quickstart — Customer-Facing Localization Adoption v1
Preconditions
- Docker is running and the Sail stack for
apps/platformis available. - The feature stays inside the existing Laravel monolith and current admin plane.
- Filament remains v5 on Livewire v4.
- Provider registration remains in
apps/platform/bootstrap/providers.php; no provider or panel change is part of this work. - No website localization, export or JSON or audit artifact localization, generic locale framework, global-search change, or asset-strategy change is in scope.
- The customer-facing flow must reuse the existing locale foundation, current customer review workspace, current released-review detail, current review-pack download, and current proof-routing seams.
Intended Implementation Order
- Review the current localization seams in
LocaleResolver,LocalizationController, androutes/web.phpso the implementation reuses the repo-real locale chain and feedback endpoints. - Inventory the in-scope customer-facing glossary across
CustomerReviewWorkspace,customer-review-workspace.blade.php,TenantReviewResource, andViewTenantReview, then mark any missing or mixed EN and DE lines inlang/en/localization.phpandlang/de/localization.php. - Tighten the customer review workspace intro, headings, accepted-risk accountability summary, table labels, empty states, and next-step copy so they all resolve from the approved glossary without changing tenant filters or row-action behavior.
- Tighten the released-review detail in customer-workspace mode so section labels, accepted-risk status, package and proof helper text, availability reasons, and the dominant
Download governance packageaction use the same glossary while the surface stays read-only. - Reuse existing review-pack and evidence truth for localized partial, blocked, unavailable, and expired reasons instead of adding a new state family or localization-specific presenter.
- Keep all machine-readable artifacts unchanged: no localized review-pack contents, no localized raw JSON, and no localized audit payloads.
- Add or expand the bounded feature test for customer-review surface localization and update the existing workspace or detail assertions needed for glossary alignment.
- Reuse the existing browser smoke as the only browser proof for the slice.
Targeted Validation Commands (after implementation)
export PATH="/bin:/usr/bin:/usr/local/bin:$PATH" && cd apps/platform && ./vendor/bin/sail artisan test --compact tests/Feature/Localization/LocalePreferenceFlowTest.php tests/Feature/Localization/LocalizedNotificationFormattingTest.php tests/Feature/Localization/CustomerReviewSurfaceLocalizationTest.php tests/Feature/Reviews/CustomerReviewWorkspacePageTest.php tests/Feature/TenantReview/TenantReviewUiContractTest.php
export PATH="/bin:/usr/bin:/usr/local/bin:$PATH" && cd apps/platform && ./vendor/bin/sail artisan test --compact tests/Browser/Reviews/CustomerReviewWorkspaceSmokeTest.php
export PATH="/bin:/usr/bin:/usr/local/bin:$PATH" && cd apps/platform && ./vendor/bin/sail bin pint --dirty --format agent
Planned Smoke Checklist (after implementation)
- Sign in to
/adminas an entitled customer-safe reader and open/admin/reviews/workspace. - Verify the workspace intro, disclosure copy, table labels, package and proof states, and
Open reviewaction render approved English or German copy with no raw translation keys. - Change locale through the existing override or personal preference path and confirm the same workspace keeps its current tenant filter and row set.
- Open a released review through the existing workspace handoff and confirm the detail remains read-only in customer-workspace mode.
- Verify
Download governance packageremains the one dominant header action and that blocked or unavailable reasons are localized without changing underlying entitlement behavior. - Follow an optional proof path and confirm the route remains capability-gated and secondary.
- Confirm review-pack downloads, audit identifiers, and other machine-readable artifacts stay unchanged while the surrounding UI text is localized.
Notes
- This is a preparation-only artifact package. No application implementation or validation results belong in this planning output yet.
- Filament remains v5 on Livewire v4.
- Provider registration remains unchanged in
apps/platform/bootstrap/providers.php. - No new globally searchable resource or global-search behavior is planned.
- No destructive or mutating customer-workspace action is introduced.
- No website localization or localized export, JSON, or audit artifact contents belong in this slice.
- No new Filament assets are expected. If later implementation unexpectedly registers assets, deployment still uses
cd apps/platform && php artisan filament:assets, but no such change is planned here.