Skip to content

Comments

fix(ja): localize category/heading, correct article type, fix JSON-LD description truncation#497

Merged
pethers merged 2 commits intonews/2026-02-24-opposition-motions-24e7583b05f68fd1from
copilot/sub-pr-483
Feb 24, 2026
Merged

fix(ja): localize category/heading, correct article type, fix JSON-LD description truncation#497
pethers merged 2 commits intonews/2026-02-24-opposition-motions-24e7583b05f68fd1from
copilot/sub-pr-483

Conversation

Copy link
Contributor

Copilot AI commented Feb 24, 2026

Four issues in the 2026-02-24 opposition motions release: Japanese article had un-localized UI strings and wrong article type in its index entry; the English index had a mid-word truncated JSON-LD description.

File fixes

  • news/index_ja.html"type": "prospective""type": "analysis" for the 2026-02-24 opposition motions entry
  • news/2026-02-24-opposition-motions-ja.html — visible category span Analysis分析; first section <h2>Opposition Motions</h2><h2>野党動議</h2>
  • news/index.html — replace hard-truncated JSON-LD description (…waste refor) with full sentence

Root cause fix (generator)

scripts/generate-news-indexes.ts — ItemList description was substring(0, 150) with no word-boundary handling:

// before
"${escapeHtml(article.description).substring(0, 150)}"

// after — truncates at last word boundary and appends ellipsis
"${(d => d.length > 150 ? d.substring(0, 150).replace(/\s+\S*$/, '') + '...' : d)(escapeHtml(article.description))}"

Pattern matches the word-boundary truncation already used for excerpts at line 811.


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

…fix index description truncation

Co-authored-by: pethers <[email protected]>
Copilot AI changed the title [WIP] Add opposition motions analysis for February 2026 fix(ja): localize category/heading, correct article type, fix JSON-LD description truncation Feb 24, 2026
@pethers pethers marked this pull request as ready for review February 24, 2026 14:00
@pethers pethers merged commit a0b9793 into news/2026-02-24-opposition-motions-24e7583b05f68fd1 Feb 24, 2026
@pethers pethers deleted the copilot/sub-pr-483 branch February 24, 2026 14:00
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