fix(dashboard): wire up i18n for the analytics dashboard - #100
Merged
Merged
Conversation
public/dashboard.html shipped with zero i18n integration: every label, section title, empty-state message, gauge caption and toast was a hardcoded English literal, while index.html, kanban.html and schedule.html all support en/uk/ru/fr/he. A user who set the interface language to Russian saw the whole Dashboard tab still in English. Give the page the same TR/t()/applyI18nAttrs()/adoptServerLang() contract as kanban.html and schedule.html: read the persisted `lang`, adopt the server's /api/config lang like the sibling pages do, and route every user-facing string (nav, card titles, hero stats, gauge captions, empty states, tooltips) through t(). Month abbreviations and session dates now format via Intl/toLocaleDateString using the active locale instead of a hardcoded 'uk-UA'. Also extend test/i18n-completeness.test.js to include dashboard.html in the key-parity, placeholder-parity and hardcoded-string scans that already cover kanban.html and schedule.html, so this can't silently regress. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011E2bJQ2sL9LgEWosjvydTR
adoptServerLang() fetched /api/config concurrently with loadData(), so when localStorage.lang and the server's lang disagreed (another browser, cleared storage) the dynamic markup — hero cards, gauges, tooltips — rendered in one language and the static labels flipped to the other a moment later. kanban.html awaits the config before rendering; do the same here, and make adoptServerLang() refresh document.title along with the attributes. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Lexus2016
force-pushed
the
fix/dashboard-i18n
branch
from
September 13, 2026 13:11
8f269f3 to
a5e79f1
Compare
Owner
|
Thanks — the dashboard i18n work is good and the test extension is exactly right. Two things I did before merging, both pushed to your
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
public/dashboard.htmlshipped with zero i18n integration — every label, section title, empty-state message, gauge caption and tooltip was a hardcoded English literal, even thoughindex.html,kanban.htmlandschedule.htmlall support en/uk/ru/fr/he. A user with the interface language set to Russian (or anything but English) saw the whole Dashboard tab stay in English.dashboard.htmlthe sameTR/t()/applyI18nAttrs()/adoptServerLang()contract askanban.htmlandschedule.html: read the persistedlang, adopt the server's/api/configlang like the sibling pages do, and route every user-facing string (nav, card titles, hero stats, gauge captions, empty states, tooltips) throught().Intl/toLocaleDateStringusing the active locale instead of a hardcoded'uk-UA'.test/i18n-completeness.test.jsto includedashboard.htmlin the key-parity, placeholder-parity and hardcoded-string scans that already coverkanban.htmlandschedule.html, so this can't silently regress again.Test plan
node test/i18n-completeness.test.jspasses withdashboard.htmlincluded/dashboardand confirm every label/tooltip/empty-state follows it🤖 Generated with Claude Code
https://claude.ai/code/session_011E2bJQ2sL9LgEWosjvydTR