Conversation
Agent-Logs-Url: https://github.com/Hack23/riksdagsmonitor/sessions/3825b135-b27e-4353-84ed-3defa6ec92bb Co-authored-by: pethers <1726836+pethers@users.noreply.github.com>
…ract Agent-Logs-Url: https://github.com/Hack23/riksdagsmonitor/sessions/3825b135-b27e-4353-84ed-3defa6ec92bb Co-authored-by: pethers <1726836+pethers@users.noreply.github.com>
Copilot created this pull request from a session on behalf of
pethers
May 2, 2026 13:54
View session
Contributor
🔍 Lighthouse Performance Audit
📥 Download full Lighthouse report Budget Compliance: Performance budgets enforced via |
Contributor
🏷️ Automatic Labeling SummaryThis PR has been automatically labeled based on the files changed and PR metadata. Applied Labels: documentation,dashboard,html-css,i18n,translation,rtl,testing,refactor,size-xl,news Label Categories
For more information, see |
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
Implements UI/UX, completeness and multi-language consistency improvements for every generated and post-processed HTML page across the 14 supported languages. All 14 static landing pages (
index_*.html), all 2,683+ news/article pages, news indexes, and political-intelligence pages now flow through a single i18n source of truth:scripts/render-lib/chrome-i18n.ts.Highest-leverage fix
Before this PR,
chrome.ts:353hardcoded English'Swedish parliamentary intelligence · Open-source · Apache-2.0'for every translated news article, news index, sitemap, and political-intelligence page. The Swedish, Arabic, Japanese, etc. variants were rendering English in their.rm-logo-tagline. Likewise the hero block in the 14index_*.htmllanding pages was hand-edited per file and drifted between variants.This PR routes every chrome string through
chromeStrings(lang)and adds areplaceHero()step to the prebuild normalize script.Changes
Phase B — Theme toggle improvement
☀️+🌙) so users see what theme will activate next, not what's active now.html[data-theme]; transition respectsprefers-reduced-motion.aria-label,title,data-label-{dark,light}per language.Phase C — Chrome i18n completeness
ChromeStrings× 14 languages = 140 new translated strings:headerTagline,heroSubtitle,heroTagline,electionCountdownLabel,electionDateLong,heroStatPoliticians,heroStatBallots,heroStatDocuments,heroStatBills,heroStatDecisions.chrome.tsnow sourcescs.headerTaglineinstead of the hardcoded English literal.Phase D — Static-page hero normalization extended
replaceHero()inscripts/normalize-static-html-chrome.tsinjects the localized hero block into all 14index_*.htmllanding pages on every prebuild.chrome-i18n.ts.Phase E — Icon consistency
Phase F — Tests & validation
tests/chrome-i18n-hero.test.ts(5 cases): every new key defined for every language, no English copy-paste, Swedish/Arabic/English chrome render their own tagline.npx tsc -p tsconfig.scripts.jsonclean.Phase G — Documentation
Article-Generation.md§"Light and dark mode" — documents the new dual-icon button + CSS contract.chromeStringskey.Out of scope (deferred to follow-up PRs)
@media (prefers-color-scheme: dark)blocks (item Enhanced Multi-Language Support for All 14 Languages #14 inArticle-Generation.md"Future Improvements Roadmap") — current PR addsdata-theme-driven CSS only for the new icons.Files changed
scripts/render-lib/chrome-i18n.ts— +10 keys × 14 languagesscripts/render-lib/chrome.ts—taglineconstant sourced fromcs.headerTaglinescripts/normalize-static-html-chrome.ts—replaceHero(),themeToggleButton(), 4 footer-heading iconsstyles.css— dual-icon morph styles for theme toggleindex_*.html— regenerated heroArticle-Generation.md— new contract sectionstests/chrome-i18n-hero.test.ts— new test (5 cases)