Skip to content

fix: localize lede analysis sentence in motions articles across all 14 languages - #431

Merged
pethers merged 2 commits into
news/motions-2026-03-09-0b77256ccbebdd0efrom
copilot/sub-pr-426
Mar 9, 2026
Merged

fix: localize lede analysis sentence in motions articles across all 14 languages#431
pethers merged 2 commits into
news/motions-2026-03-09-0b77256ccbebdd0efrom
copilot/sub-pr-426

Conversation

Copilot AI commented Mar 9, 2026

Copy link
Copy Markdown
Contributor

generateMotionsContent embedded a hardcoded English fragment in the lede paragraph, causing every non-English article to switch mid-sentence into English.

Changes

  • src/types/common.ts — Added ledeAnalysis: string to MotionsStrings interface
  • src/constants/language-articles.ts — Added ledeAnalysis entries with {DATE_FROM}/{DATE_TO} placeholders for all 14 languages (en, sv, da, no, fi, de, fr, es, nl, ar, he, ja, ko, zh)
  • src/generators/motions-content.ts — Replaced hardcoded English with resolved localized string
// Before
`… analysis of voting records from ${escapeHTML(dateFromStr)} to ${escapeHTML(dateStr)} provides insights into legislative decision-making and party discipline.`

// After
const ledeAnalysisRaw = strings.ledeAnalysis
  .replace('{DATE_FROM}', dateFromStr)
  .replace('{DATE_TO}', dateStr);
// …
`… ${escapeHTML(ledeAnalysisRaw)}`

💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

…nguages

Co-authored-by: pethers <1726836+pethers@users.noreply.github.com>
Copilot AI changed the title [WIP] Chore EU Parliament motions articles for 9 March 2026 fix: localize lede analysis sentence in motions articles across all 14 languages Mar 9, 2026
@pethers
pethers marked this pull request as ready for review March 9, 2026 13:56
@pethers
pethers merged commit 3d31cc3 into news/motions-2026-03-09-0b77256ccbebdd0e Mar 9, 2026
@pethers
pethers deleted the copilot/sub-pr-426 branch March 9, 2026 13:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants