From 4feed37cc2b680e9b9d506c9ab6c0806856412eb Mon Sep 17 00:00:00 2001 From: Aditya Hegde Date: Mon, 27 Jul 2026 16:57:22 +0530 Subject: [PATCH 1/2] chore: migrate time dropdown config to i18n --- scripts/i18n-guard.js | 151 +++++++++++-- scripts/web-test-code-quality.sh | 12 +- .../components/time-series-chart/Chart.svelte | 2 +- .../measure-selection/measure-selection.ts | 2 +- web-common/src/lib/i18n/MIGRATION_AUDIT.md | 213 ++++++++++++++++++ web-common/src/lib/i18n/README.md | 12 +- web-common/src/lib/i18n/messages/en.json | 18 ++ web-common/src/lib/i18n/messages/es.json | 18 ++ web-common/src/lib/time/config.ts | 163 ++++++++++---- web-common/src/lib/time/grains/index.spec.ts | 25 +- web-common/src/lib/time/grains/index.ts | 2 +- web-common/src/lib/time/types.ts | 6 +- 12 files changed, 541 insertions(+), 83 deletions(-) create mode 100644 web-common/src/lib/i18n/MIGRATION_AUDIT.md diff --git a/scripts/i18n-guard.js b/scripts/i18n-guard.js index 99632b5908c0..6e3361dab7a9 100644 --- a/scripts/i18n-guard.js +++ b/scripts/i18n-guard.js @@ -11,10 +11,11 @@ // consistency: selectors, match keys, and placeholders must resolve to // declared inputs or locals. // -// 2. Hardcoded-string heuristic (warning by default). Scans `.svelte` markup -// (not