chore(i18n): drop 178 dead translation keys from all locales#3867
Conversation
|
@shubham1206agra is attempting to deploy a commit to the World Monitor Team on Vercel. A member of the Team first needs to authorize it. |
Greptile SummaryThis PR removes 178 unused translation keys from all 21 locale files, plus 13 stale extras that existed only in translated files with no corresponding source reference. The cleanup was validated by static analysis against
Confidence Score: 5/5Pure dead-code removal across locale files only — no logic, component, or API changes. Safe to merge. Every sampled removal was verified against grep results across src/: app.title, modals.downloadBanner.dismiss/title, modals.search.hint variants, components.breakingNews.enableNotifications, components.status.dataFeeds, components.energyCrisis.infoTooltip (panel uses a hardcoded string), and the nl/pt/sv-only deckgl.layers and modals.countryIntel extras. The preserved offline keys and CII sidecar note are intact. No src-referenced key was dropped. No files require special attention. nl.json, pt.json, and sv.json had 5 extra locale-only keys removed beyond the universal set, but all are confirmed unused. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[Static Analysis Sweep] --> B{Key referenced in src/?}
B -- Yes --> C[Keep key in all locales]
B -- No --> D{Locale-only extra?}
D -- Yes, universal --> E[Remove from all 21 locales]
D -- Yes, nl/pt/sv only --> F[Remove from nl, pt, sv only]
D -- No --> G[Remove 178 dead keys universally]
C --> H[shell.offline* preserved\ncii._methodologyLink preserved]
E --> I[panels.liveYouTube\npanels.pinnedWebcams\n8x components.economic.*]
F --> J[deckgl.layers.laborMarket\ndeckgl.layers.metroUnemployment\nmodals.countryIntel.geocodeFailed\nmodals.countryIntel.retryBtn\nmodals.countryIntel.closeBtn]
G --> K[178 keys removed\nfrom 21 locale files]
Reviews (1): Last reviewed commit: "chore(i18n): drop 178 dead translation k..." | Re-trigger Greptile |
Static-analysis sweep against literal t() calls, dynamic key construction,
pluralization variants, and substring use in lookup tables / property-access
scripts. 178 keys had no reference in src/, scripts/, server/, shared/, api/,
public/, or tests/, plus 13 stale extras that existed only in non-English
translations (8 components.economic.* + panels.{liveYouTube,pinnedWebcams}
universally, 5 more under deckgl.layers / modals.countryIntel in nl/pt/sv).
translate-locales.mjs would otherwise re-add them on next backfill.
Coverage: all 22 locales (en + 20 originals + hu added in koala73#3857).
Preserved: shell.offline{Title,Message,Retry} (read by
scripts/sync-offline-translations.mjs into public/offline.html) and the
components.cii._methodologyLink_translatorNote sidecar.
Test-contract: drop 'createWithAi' and 'changeAccent' from REQUIRED_KEYS in
tests/widget-builder.test.mjs — both keys lost their last production
reference in 80c3751 and 47f0dd1 respectively; the contract was stale.
Verification: all 22 JSON files validate; widget-builder test 203/203;
sync-offline runs clean (no public/offline.html diff); all 21 locales
have exact en-parity except CLDR plural-cohort siblings (signals_few/_many/
_zero etc) added by koala73#3908, which are legitimate.
Co-authored-by: Elie Habib <[email protected]>
a41b009 to
0429dc2
Compare
Summary
Static-analysis sweep against literal t() calls, dynamic key construction, pluralization variants, and substring use in lookup tables / property-access scripts. 178 keys had no reference in src/ and no consumer outside src/.
Also drops 13 stale extras that existed only in translations (8 components.economic.* + panels.{liveYouTube,pinnedWebcams} universally, 5 more under deckgl.layers / modals.countryIntel in nl/pt/sv) — translate-locales.mjs would otherwise re-add them.
Preserved: shell.offline{Title,Message,Retry} (read directly by scripts/sync-offline-translations.mjs into public/offline.html) and the components.cii._methodologyLink_translatorNote sidecar.
Verification: all 21 JSON files validate; translate-locales --dry-run shows only the pre-existing 6-key untranslated gap; sync-offline diff on public/offline.html is empty.
Type of change
Affected areas
/api/*)Checklist
api/rss-proxy.jsallowlist (if adding feeds)npm run typecheck)Screenshots
NA