feat(web): extract i18n messages for map, people, media, upload and sharing surfaces (wave 3) #1186

Merged
chris merged 2 commits from feature/i18n-extraction-wave3 into main 2026-10-13 09:12:30 +02:00
Owner

Summary

Wave 3 of the Paraglide v2 i18n extraction: the map, people, person, places route bodies, MediaDetailViewer + media/** components, upload surfaces and sharing surfaces.

  • 464 new keys appended to apps/web/messages/{en,de,da}.json (each locale now has 1,640 keys). The block is contiguous and prefix-grouped, appended after the wave-4 block; all pre-existing keys are byte-identical (verified programmatically: upstream key order + values unchanged, key sets identical across the three locales).
  • 522 m.* call sites wired across 24 source files, including attributes (aria-label / title / placeholder / alt).
  • 16 keys dropped in favor of reusing existing wave-1/2 keys with byte-identical English (e.g. albumReject, instanceDetailDone, albumBadgeAdd, setupReady, setupNeedsAttention) — no duplicate values introduced.
  • All Intl.* calls in touched files use getLocale() (verified: no hardcoded locale tags remain in scope).
  • Variant messages use Paraglide plural declarations, including the 3-selector cross-product mediaResetAllDone (8 arms).
  • MediaDetailViewer's closeLabel prop is now explicitly typed string (the localized default had Svelte infer the branded LocalizedString, which broke literal call sites outside this wave — albums, processing-issues, profile, … — those files were intentionally not touched).

Sites per file

File Sites
media/MediaInfoPanel.svelte 158
ContributionPanel.svelte 60
routes/uploads/+page.svelte 52
routes/sharing/+page.svelte 49
media/MediaViewer.svelte 32
media/MediaDiscoverySection.svelte 30
MediaDetailViewer.svelte 23
media/EditMarkerLabelDialog.svelte 21
media/mediaUtils.ts 20
routes/map/+page.svelte 12
PersonTargetPicker.svelte 11
media/FaceMarkerEditToolbar.svelte 9
media/RerunDiscoveryDialog.svelte 8
routes/places/+page.svelte 7
MapView.svelte, ShareTargetAutocomplete.svelte 6 each
media/EditModeActions.svelte, media/DiscoveryEditModeOverlay.svelte 4 each
media/FaceMarkerOverlay.svelte 3
media/DomainToggleBar.svelte, media/DiscoveryEditToggle.svelte 2 each
routes/people/+page.svelte, routes/person/[personId]/+page.svelte, media/EditModeBanner.svelte 1 each

E2E decisions (message values unchanged — expectations updated)

English expectation (specs mixed English and Danish assertions; app default locale is en):

  • domain-toggle-bar, face-marker-visibility, plant-overlay-markers: Toggle Planter markers → Toggle Plants markers, Toggle Personer markers → Toggle People markers (labels now come from mediaUtilsDomainPlants/mediaUtilsDomainPeople).
  • edit-nav-guard: Rediger … → Edit …, Redigerer: … → Editing: …, Annuller → Cancel, Bekræft → Confirm, Færdig med redigering af … → Done editing ….
  • manual-face-bbox: Træk for at markere ansigtet → Drag to draw a face box, Træk for at flytte → Drag to move.
  • plant-marker-move, plant-assignment: Rediger plants_image → Edit plants_image, Redigerer: plants image → Editing: plants image, Bekræft → Confirm.
  • timeline: Tildeling fjernet. → Assignment removed..
  • discovery-instance-tentative, instance-split-move (fallout found in the break-candidate run): hardcoded Danish aria 3 tentative tildelinger → 3 tentative assignments.

Locale-pinned expectation (da-pinned test block): discovery-instance-tentative assignment history (da copy pinned) asserts the Danish viewer aria Mediedetaljefremviser (the section label was hardcoded English before extraction).

Verification

  • npm run check — 0 errors (18 warnings, pre-existing).
  • npm run build — exit 0.
  • npm run test:unit — 26 files / 200 tests passed.
  • E2E after rebase onto current main (all 15 wave-scoped specs matching map|people|person|share|upload|viewer|timeline|marker|info-panel plus 20+ off-list break candidates: accessibility, media-metadata-edit, on-this-day, scope-crop, discovery-media-list, discovery-instance-tentative, instance-split-move, instance-remove-mode, instance-detail-face-crop, discovery-review, albums, discovery-domain-*, filter-sort, spec-013, explore-titles-first, incomplete-media, search-overlay/filters/backfill, thumbnails, storage-paths, header-avatar): 925 passed, 4 flaky (all passed on retry), 23 pre-existing conditional skips, 0 deterministic failures.
  • Flake notes (pre-existing classes, not chased): upload-status hydration/timing races → KNOWN_ISSUES ISSUE-072; embedding-map:463 + discovery-domain-instance-detail + accessibility:128 load races → ISSUE-148/149 class (isolated reruns pass).

Deferrals

Recorded in EXTRACTION.md wave-3 row: EmbeddingMap.svelte, ShareInstanceDialog.svelte, ActivityDialog.svelte, NotificationBell.svelte (shared components outside the wave-3 route/component scope). ContributionPanel.svelte was in scope and is extracted here.

Reviewer notes

  • de/da translations are community-quality — please request native review, especially: viewerDialogAria (da Mediedetaljefremviser), mediaDomainToggleAria (da Skjul/vis {label}-markører), the mediaReset*Done plural variants, and the personPicker* Danish copy.
  • Rule 8 kept: where the source string was already localized Danish/German, the de/da values are verbatim copies of the source (e.g. mediaMarkerCreatedToast, personPicker*, mediaAssignmentRemovedToast).
  • sharingRulesWarning EN intentionally begins lowercase (follows <strong>{m.sharingModeRules()}</strong> in markup).
  • Upload strings feeding wave-4's ActivityDialog keep byte-identical English (2 file(s) ready to upload., 1 uploaded · 0 skipped · 1 failed).
## Summary Wave 3 of the Paraglide v2 i18n extraction: the `map`, `people`, `person`, `places` route bodies, `MediaDetailViewer` + `media/**` components, upload surfaces and sharing surfaces. - **464 new keys** appended to `apps/web/messages/{en,de,da}.json` (each locale now has **1,640** keys). The block is contiguous and prefix-grouped, appended after the wave-4 block; all pre-existing keys are byte-identical (verified programmatically: upstream key order + values unchanged, key sets identical across the three locales). - **522 `m.*` call sites** wired across **24 source files**, including attributes (`aria-label` / `title` / `placeholder` / `alt`). - **16 keys dropped in favor of reusing existing wave-1/2 keys** with byte-identical English (e.g. `albumReject`, `instanceDetailDone`, `albumBadgeAdd`, `setupReady`, `setupNeedsAttention`) — no duplicate values introduced. - All `Intl.*` calls in touched files use `getLocale()` (verified: no hardcoded locale tags remain in scope). - Variant messages use Paraglide plural declarations, including the 3-selector cross-product `mediaResetAllDone` (8 arms). - `MediaDetailViewer`'s `closeLabel` prop is now explicitly typed `string` (the localized default had Svelte infer the branded `LocalizedString`, which broke literal call sites outside this wave — albums, processing-issues, profile, … — those files were intentionally not touched). ### Sites per file | File | Sites | | --- | --- | | `media/MediaInfoPanel.svelte` | 158 | | `ContributionPanel.svelte` | 60 | | `routes/uploads/+page.svelte` | 52 | | `routes/sharing/+page.svelte` | 49 | | `media/MediaViewer.svelte` | 32 | | `media/MediaDiscoverySection.svelte` | 30 | | `MediaDetailViewer.svelte` | 23 | | `media/EditMarkerLabelDialog.svelte` | 21 | | `media/mediaUtils.ts` | 20 | | `routes/map/+page.svelte` | 12 | | `PersonTargetPicker.svelte` | 11 | | `media/FaceMarkerEditToolbar.svelte` | 9 | | `media/RerunDiscoveryDialog.svelte` | 8 | | `routes/places/+page.svelte` | 7 | | `MapView.svelte`, `ShareTargetAutocomplete.svelte` | 6 each | | `media/EditModeActions.svelte`, `media/DiscoveryEditModeOverlay.svelte` | 4 each | | `media/FaceMarkerOverlay.svelte` | 3 | | `media/DomainToggleBar.svelte`, `media/DiscoveryEditToggle.svelte` | 2 each | | `routes/people/+page.svelte`, `routes/person/[personId]/+page.svelte`, `media/EditModeBanner.svelte` | 1 each | ## E2E decisions (message values unchanged — expectations updated) **English expectation** (specs mixed English and Danish assertions; app default locale is `en`): - `domain-toggle-bar`, `face-marker-visibility`, `plant-overlay-markers`: `Toggle Planter markers` → `Toggle Plants markers`, `Toggle Personer markers` → `Toggle People markers` (labels now come from `mediaUtilsDomainPlants`/`mediaUtilsDomainPeople`). - `edit-nav-guard`: `Rediger …` → `Edit …`, `Redigerer: …` → `Editing: …`, `Annuller` → `Cancel`, `Bekræft` → `Confirm`, `Færdig med redigering af …` → `Done editing …`. - `manual-face-bbox`: `Træk for at markere ansigtet` → `Drag to draw a face box`, `Træk for at flytte` → `Drag to move`. - `plant-marker-move`, `plant-assignment`: `Rediger plants_image` → `Edit plants_image`, `Redigerer: plants image` → `Editing: plants image`, `Bekræft` → `Confirm`. - `timeline`: `Tildeling fjernet.` → `Assignment removed.`. - `discovery-instance-tentative`, `instance-split-move` (fallout found in the break-candidate run): hardcoded Danish aria `3 tentative tildelinger` → `3 tentative assignments`. **Locale-pinned expectation** (da-pinned test block): `discovery-instance-tentative` `assignment history (da copy pinned)` asserts the Danish viewer aria `Mediedetaljefremviser` (the section label was hardcoded English before extraction). ## Verification - `npm run check` — **0 errors** (18 warnings, pre-existing). - `npm run build` — exit 0. - `npm run test:unit` — **26 files / 200 tests passed**. - E2E after rebase onto current `main` (all 15 wave-scoped specs matching `map|people|person|share|upload|viewer|timeline|marker|info-panel` plus 20+ off-list break candidates: accessibility, media-metadata-edit, on-this-day, scope-crop, discovery-media-list, discovery-instance-tentative, instance-split-move, instance-remove-mode, instance-detail-face-crop, discovery-review, albums, discovery-domain-*, filter-sort, spec-013, explore-titles-first, incomplete-media, search-overlay/filters/backfill, thumbnails, storage-paths, header-avatar): **925 passed, 4 flaky (all passed on retry), 23 pre-existing conditional skips, 0 deterministic failures.** - Flake notes (pre-existing classes, not chased): `upload-status` hydration/timing races → `KNOWN_ISSUES` ISSUE-072; `embedding-map:463` + `discovery-domain-instance-detail` + `accessibility:128` load races → ISSUE-148/149 class (isolated reruns pass). ## Deferrals Recorded in `EXTRACTION.md` wave-3 row: `EmbeddingMap.svelte`, `ShareInstanceDialog.svelte`, `ActivityDialog.svelte`, `NotificationBell.svelte` (shared components outside the wave-3 route/component scope). `ContributionPanel.svelte` was **in scope** and is extracted here. ## Reviewer notes - **de/da translations are community-quality — please request native review**, especially: `viewerDialogAria` (da `Mediedetaljefremviser`), `mediaDomainToggleAria` (da `Skjul/vis {label}-markører`), the `mediaReset*Done` plural variants, and the `personPicker*` Danish copy. - Rule 8 kept: where the source string was already localized Danish/German, the de/da values are verbatim copies of the source (e.g. `mediaMarkerCreatedToast`, `personPicker*`, `mediaAssignmentRemovedToast`). - `sharingRulesWarning` EN intentionally begins lowercase (follows `<strong>{m.sharingModeRules()}</strong>` in markup). - Upload strings feeding wave-4's `ActivityDialog` keep byte-identical English (`2 file(s) ready to upload.`, `1 uploaded · 0 skipped · 1 failed`).
Add 464 keys (en/de/da) covering the map, people, person, places, media
viewer/info/edit, upload and sharing routes and components, wire m.* calls
including aria-label/title/placeholder/alt attributes, and replace hardcoded
Intl locale tags with getLocale().

- Reuse existing wave-1/2 keys where English copy is identical (16 swaps)
- MediaDetailViewer closeLabel prop typed as string so literal call sites
  outside this wave's scope keep compiling
- de/da translations kept verbatim from source copy where the source was
  already localized (rule 8); community-quality translations flagged for
  native review in the PR
test(web): update wave-3 E2E expectations to post-i18n copy
All checks were successful
Wiki Sync / Sync wiki from docs (push) Has been skipped
Build and Deploy / Detect changed services and test scopes (push) Successful in 2s
Build and Deploy / Android unit tests and debug APK (push) Has been skipped
Build and Deploy / Smoke API and media worker (push) Has been skipped
Build and Deploy / Smoke web (push) Has been skipped
Build and Deploy / Smoke ML worker (push) Has been skipped
Build and Deploy / Smoke people worker (push) Has been skipped
Build and Deploy / Build postgres image (push) Has been skipped
Build and Deploy / Build plants worker image (push) Has been skipped
Build and Deploy / Build converter worker image (push) Has been skipped
Build and Deploy / Deploy postgres (push) Has been skipped
Build and Deploy / Build API image (push) Has been skipped
Build and Deploy / Build media worker image (push) Has been skipped
Build and Deploy / Build ML worker image (push) Has been skipped
Build and Deploy / Build people worker image (push) Has been skipped
Build and Deploy / Build web image (push) Has been skipped
Build and Deploy / Deploy API (push) Has been skipped
Build and Deploy / Deploy web (push) Has been skipped
Build and Deploy / Deploy media worker (push) Has been skipped
Build and Deploy / Deploy ML worker (push) Has been skipped
Build and Deploy / Deploy plants worker (push) Has been skipped
Build and Deploy / Deploy people worker (push) Has been skipped
Build and Deploy / Deploy converter worker (push) Has been skipped
Build and Deploy / Clean Docker build artifacts (push) Has been skipped
Build and Deploy / Run scoped PR tests (push) Successful in 7m29s
ee6a582338
- Domain toggle aria: 'Toggle Planter/Personer markers' -> English
  'Toggle Plants/People markers' (source labels were hardcoded Danish)
- Edit-mode banner/tooltips: Rediger/Redigerer/Bekræft/Annuller/Færdig med
  redigering -> Edit/Editing/Confirm/Cancel/Done editing
- Face hint toolbar: Træk for at ... -> Drag to draw a face box / Drag to move
- Tentative badge aria: '3 tentative tildelinger' -> '3 tentative assignments'
- Toast: 'Tildeling fjernet.' -> 'Assignment removed.'
- da-pinned discovery history test now asserts the Danish viewer aria
  'Mediedetaljefremviser' (was hardcoded English before extraction)
chris merged commit fd7f06edc2 into main 2026-10-13 09:12:30 +02:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
chris/memories!1186
No description provided.