Commit 9010812
committed
chore: 3-loop maintenance pass — i18n coverage, dead-code cleanup, JSON-LD locale fix
Loop 1 — dead code & i18n base:
- Remove empty src/lib/hooks/ directory.
- Delete unused public/images/samples/example.jpg (~158KB) and
public/scenes/thumbnails/* (6 files, ~70KB) — DofScene `thumbnail`
field was defined but never read in any UI.
- Drop the dead `thumbnail` field from DofScene.
- i18n LanguageSwitcher's "Change language" / "Select language"
aria-labels (shown on every page in every locale).
- i18n the perspective-compression simulator's "Sensor" aria-label.
Loop 2 — i18n templates, dead fields, JSON-LD locale awareness:
- Add ICU-templated controls aria-labels (apertureValue,
focalLengthValue, subjectDistanceValue, sweetSpotValue) and wire
them into ApertureField, FocalLengthField, and
CompressionControls — replaces hardcoded "Aperture: f/2.8" /
"Focal length: 50mm" / "Subject distance: 12.5 ft" / "Sweet spot:
f/8" templates.
- Remove the dead `altText` field from Scene (and its test) — it
was never read by any consumer.
- Fix glossary FAQPage JSON-LD: was generating hardcoded English
"What is X in photography?" for every locale; now uses a
translatable `questionTemplate` and adds the missing `inLanguage`
field. Mirror the fix on privacy/terms/about/contact JSON-LD —
they now include `inLanguage` and a locale-prefixed `url`,
preventing every locale's structured data from claiming the
English `/privacy` URL.
- Add `apsh` (APS-H) translation key — was a missing sensor falling
through to the English fallback name.
- AdUnit: drop a redundant `if (ins)` guard after an early-return
null check on the same ref.
Loop 3 — final i18n + memory leak:
- i18n the FaqSection heading "Frequently Asked Questions" — high-
impact since it renders on every tool page in every locale.
- Add `loading="lazy"` + `decoding="async"` to exposure-simulator
scene thumbnails.
- Fix a small blob URL leak in frame-studio: `URL.createObjectURL`
was created on each handleFile call and never revoked, so each
upload after the first leaked the previous URL until GC. Now we
revoke once the Image has decoded.
All 872 unit tests, 122 chromium smoke specs, and 85 chromium tool
e2e specs pass. Type-check and lint clean. Translation coverage
verified across all 31 locales; no hard English leaks introduced.1 parent a9b49e5 commit 9010812
85 files changed
Lines changed: 514 additions & 65 deletions
File tree
- public
- images/samples
- scenes/thumbnails
- src
- app/[locale]
- about
- contact
- exposure-simulator/_components
- frame-studio/_components
- learn/glossary
- perspective-compression-simulator/_components
- privacy
- terms
- lib
- data
- i18n/messages
- bn
- ca
- cs
- da
- de
- el
- en
- es
- fil
- fi
- fr
- hi
- hu
- id
- it
- ja
- ko
- ms
- nb
- nl
- pl
- pt
- ro
- ru
- sv
- th
- tr
- uk
- vi
- zh-TW
- zh
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
36 | | - | |
| 36 | + | |
| 37 | + | |
37 | 38 | | |
38 | 39 | | |
39 | 40 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
| 28 | + | |
| 29 | + | |
29 | 30 | | |
30 | 31 | | |
31 | 32 | | |
| |||
Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
| 50 | + | |
| 51 | + | |
50 | 52 | | |
51 | 53 | | |
52 | 54 | | |
| |||
62 | 64 | | |
63 | 65 | | |
64 | 66 | | |
| 67 | + | |
65 | 68 | | |
66 | 69 | | |
67 | 70 | | |
| |||
0 commit comments