Skip to content

Fix English body content in 52 non-English committee-reports articles (2026-02-16/17/18/24)#849

Closed
Copilot wants to merge 8 commits intomainfrom
copilot/fix-committee-reports-translations
Closed

Fix English body content in 52 non-English committee-reports articles (2026-02-16/17/18/24)#849
Copilot wants to merge 8 commits intomainfrom
copilot/fix-committee-reports-translations

Conversation

Copy link
Contributor

Copilot AI commented Mar 5, 2026

  • Identified 52 non-English committee-reports articles with English body content
  • Fixed 2026-02-16/17/18/24-committee-reports-{lang}.html for 13 languages each
  • Preserved existing correctly-translated lede paragraphs and article-meta sections
  • Added scripts/fix-committee-reports-body.ts reusable utility script
  • Verified: no English headings remain in any of the 52 non-English files
  • Fixed Vitest CI failures: restore error scenario tables in 3 workflow files
    • news-evening-analysis.md — added error table with Tool not found, Empty results, Stale data, Timeout, Too broad results
    • news-article-generator.md — added error table with Tool not found, Empty results, Stale data, Timeout
    • news-realtime-monitor.md — added error table with Tool not found, Empty results, Stale data, Timeout
  • All 53 Vitest unit tests now pass (was: 4 failed)
Original prompt

This section details on the original issue you should resolve

<issue_title>🔧 Fix committee-reports articles containing English content in non-English language versions</issue_title>
<issue_description>## 📋 Issue Type
Bug Fix - Translation Completeness

🎯 Objective

Fix ~48 committee-reports articles (4 dates × 12 languages) that contain English section headings and body paragraphs instead of content in the target language.

📊 Current State

The following committee-reports articles contain English content (headings and body text) despite being designated for non-English languages:

Affected Articles (4 dates × 12 languages = 48 articles)

Date Languages Affected
2026-02-16 da, no, fi, de, fr, es, nl, ar, he, ja, ko, zh
2026-02-17 da, no, fi, de, fr, es, nl, ar, he, ja, ko, zh
2026-02-18 da, no, fi, de, fr, es, nl, ar, he, ja, ko, zh
2026-02-24 da, no, fi, de, fr, es, nl, ar, he, ja, ko, zh

Specific English Content Found

  1. Section headings in English: <h2>What to Watch</h2>, <h2>What to Watch in the Coming Weeks</h2>
  2. Body paragraphs in English: Full analytical paragraphs about committee proceedings
  3. English phrases in body: "Chamber debate tactics", "amendment proposals from opposition parties", "Expected vote outcome"
  4. Meta keywords in English: content="committee, reports, betänkanden, Ukraine aid, data protection..."

Example (Danish article with English content)

File: news/2026-02-16-committee-reports-da.html

  • Title/description: ✅ Correctly in Danish
  • H2 headings: ❌ "What to Watch" (should be "Hvad skal man holde øje med")
  • Body paragraphs: ❌ Multiple English paragraphs
  • Keywords: ❌ English keywords

🚀 Desired State

All 48 articles fully translated into their target language:

  • Section headings translated using CONTENT_LABELS equivalents
  • Body paragraphs rewritten in the target language
  • Meta keywords translated to target language
  • data-translate markers removed if present

🔧 Implementation Approach

Recommended Strategy: Re-generate or Batch-Translate

Option A (Preferred): Use the existing scripts/generate_committee_articles.py translation system to regenerate the affected articles with proper translations.

Option B: Create a targeted fix script similar to scripts/fix-mixed-language-descriptions.py that:

  1. Scans news/2026-02-{16,17,18,24}-committee-reports-{lang}.html
  2. Identifies English headings and replaces with CONTENT_LABELS equivalents
  3. Translates English body paragraphs to the target language
  4. Localizes meta keywords
  5. Validates the result with scripts/validate-news-translations.ts

Files to Fix (48 total)

news/2026-02-16-committee-reports-{da,no,fi,de,fr,es,nl,ar,he,ja,ko,zh}.html
news/2026-02-17-committee-reports-{da,no,fi,de,fr,es,nl,ar,he,ja,ko,zh}.html
news/2026-02-18-committee-reports-{da,no,fi,de,fr,es,nl,ar,he,ja,ko,zh}.html
news/2026-02-24-committee-reports-{da,no,fi,de,fr,es,nl,ar,he,ja,ko,zh}.html

🤖 Recommended Agent

agent:news-journalist — Has expertise in the article generation system, translation pipeline, and can use MCP tools to regenerate articles with proper translations. The content-generator agent could also assist with batch translation.

✅ Acceptance Criteria

  • All 48 committee-reports articles have headings in the target language
  • All body paragraphs are translated (no English paragraphs in non-EN files)
  • Meta keywords are localized per language
  • data-translate="true" markers eliminated
  • npx tsx scripts/validate-news-translations.ts passes for all fixed files
  • HTML validation passes (htmlhint)
  • RTL languages (ar, he) maintain correct text direction

📚 References

  • Content labels for heading translations: scripts/data-transformers/constants/content-labels-part1.ts, content-labels-part2.ts
  • Translation dictionary: scripts/translation-dictionary.ts
  • Existing fix script pattern: scripts/fix-mixed-language-descriptions.py
  • Committee article generator: scripts/generate_committee_articles.py

🏷️ Labels

type:bug, component:i18n, component:news, translation, priority-high, component:content</issue_description>

<agent_instructions>Fix 48 committee-reports articles (dates: 2026-02-16, 2026-02-17, 2026-02-18, 2026-02-24, languages: da,no,fi,de,fr,es,nl,ar,he,ja,ko,zh) that contain English section headings and body content. Replace English headings like "What to Watch" with CONTENT_LABELS equivalents for each language. Translate English body paragraphs to the target language. Localize meta keywords. Remove data-translate markers. Run validate-news-translations.ts to verify fixes. Use the translation-dictionary.ts and content-labels constants for proper translations.</agent_instructions>

Comments on the Issue (you are @copilot in this section)


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI changed the title [WIP] Fix committee-reports articles with English content in non-English versions Investigation: 48 committee-reports articles body content not translated (en body left in non-EN files) Mar 6, 2026
@github-actions github-actions bot added the size-xs Extra small change (< 10 lines) label Mar 6, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Mar 6, 2026

🔍 Lighthouse Performance Audit

Category Score Status
Performance 85/100 🟡
Accessibility 95/100 🟢
Best Practices 90/100 🟢
SEO 95/100 🟢

📥 Download full Lighthouse report

Budget Compliance: Performance budgets enforced via budget.json

Copilot AI changed the title Investigation: 48 committee-reports articles body content not translated (en body left in non-EN files) WIP: Translate English body content in 52 committee-reports articles across 13 non-EN languages Mar 6, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Mar 6, 2026

🔍 Lighthouse Performance Audit

Category Score Status
Performance 85/100 🟡
Accessibility 95/100 🟢
Best Practices 90/100 🟢
SEO 95/100 🟢

📥 Download full Lighthouse report

Budget Compliance: Performance budgets enforced via budget.json

Copilot AI changed the title WIP: Translate English body content in 52 committee-reports articles across 13 non-EN languages Fix English body content in 51 non-English committee-reports articles (2026-02-16/17/18/24) Mar 6, 2026
…lish versions

Replace English body sections (h2/h3 headings and paragraphs) in 52 non-English
committee-reports articles across 4 dates with properly translated content.

The lede paragraphs and article-meta were already correctly translated; only the
body sections had English content. This fix uses the existing
generateArticleContent('committee-reports', lang) pipeline to generate
structured, fully-translated body HTML for all 13 non-English languages
(sv, da, no, fi, de, fr, es, nl, ar, he, ja, ko, zh).

Dates fixed: 2026-02-16, 2026-02-17, 2026-02-18 (10 reports each, same batch)
             2026-02-24 (20 reports: NU ×6, SfU ×12, UbU ×1, KU ×1)

Also adds scripts/fix-committee-reports-body.ts as a reusable utility for
future backport translation needs.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions github-actions bot added html-css HTML/CSS changes translation Translation updates rtl RTL language support (Arabic, Hebrew) news News articles and content generation size-l Large change (250-1000 lines) labels Mar 6, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Mar 6, 2026

🔍 Lighthouse Performance Audit

Category Score Status
Performance 85/100 🟡
Accessibility 95/100 🟢
Best Practices 90/100 🟢
SEO 95/100 🟢

📥 Download full Lighthouse report

Budget Compliance: Performance budgets enforced via budget.json

@github-actions github-actions bot added the size-xl Extra large change (> 1000 lines) label Mar 6, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Mar 6, 2026

🔍 Lighthouse Performance Audit

Category Score Status
Performance 85/100 🟡
Accessibility 95/100 🟢
Best Practices 90/100 🟢
SEO 95/100 🟢

📥 Download full Lighthouse report

Budget Compliance: Performance budgets enforced via budget.json

@pethers pethers force-pushed the copilot/fix-committee-reports-translations branch from 089ac2b to b0306e2 Compare March 6, 2026 07:51
@github-actions github-actions bot added the refactor Code refactoring label Mar 6, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Mar 6, 2026

🔍 Lighthouse Performance Audit

Category Score Status
Performance 85/100 🟡
Accessibility 95/100 🟢
Best Practices 90/100 🟢
SEO 95/100 🟢

📥 Download full Lighthouse report

Budget Compliance: Performance budgets enforced via budget.json

Copilot AI changed the title Fix English body content in 51 non-English committee-reports articles (2026-02-16/17/18/24) Fix English body content in 52 non-English committee-reports articles (2026-02-16/17/18/24) Mar 6, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Mar 6, 2026

🔍 Lighthouse Performance Audit

Category Score Status
Performance 85/100 🟡
Accessibility 95/100 🟢
Best Practices 90/100 🟢
SEO 95/100 🟢

📥 Download full Lighthouse report

Budget Compliance: Performance budgets enforced via budget.json

@github-actions
Copy link
Contributor

github-actions bot commented Mar 6, 2026

🔍 Lighthouse Performance Audit

Category Score Status
Performance 85/100 🟡
Accessibility 95/100 🟢
Best Practices 90/100 🟢
SEO 95/100 🟢

📥 Download full Lighthouse report

Budget Compliance: Performance budgets enforced via budget.json

@pethers
Copy link
Member

pethers commented Mar 6, 2026

@copilot fix issues in TypeScript & JavaScript Testing / Unit Tests (Vitest) (pull_request)
TypeScript & JavaScript Testing / Unit Tests (Vitest) (pull_request)Failing after 1m

… failures

Co-authored-by: pethers <1726836+pethers@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Mar 6, 2026

@copilot fix issues in [TypeScript & JavaScript Testing / Unit Tests (Vitest) (pull_request)](https://github.com/Hack23/riksdagsmonitor/actions/runs/22772327938/job/66056463319?pr=84...

Fixed in commit 3085f2c4. The Vitest failures were caused by 3 workflow files (news-evening-analysis.md, news-article-generator.md, news-realtime-monitor.md) missing their error scenario tables after a previous rewrite on main. Restored the "🐛 If You Get Errors" tables containing Tool not found, Empty results, Stale data, Timeout, and Too broad results entries. All 53 unit tests now pass.

@github-actions github-actions bot added documentation Documentation updates workflow GitHub Actions workflows ci-cd CI/CD pipeline changes agentic-workflow Agentic workflow changes labels Mar 6, 2026
@pethers pethers closed this Mar 6, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Mar 6, 2026

🔍 Lighthouse Performance Audit

Category Score Status
Performance 85/100 🟡
Accessibility 95/100 🟢
Best Practices 90/100 🟢
SEO 95/100 🟢

📥 Download full Lighthouse report

Budget Compliance: Performance budgets enforced via budget.json

@pethers pethers deleted the copilot/fix-committee-reports-translations branch March 6, 2026 16:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agentic-workflow Agentic workflow changes ci-cd CI/CD pipeline changes documentation Documentation updates html-css HTML/CSS changes news News articles and content generation refactor Code refactoring rtl RTL language support (Arabic, Hebrew) size-l Large change (250-1000 lines) size-xl Extra large change (> 1000 lines) size-xs Extra small change (< 10 lines) translation Translation updates workflow GitHub Actions workflows

Projects

None yet

Development

Successfully merging this pull request may close these issues.

🔧 Fix committee-reports articles containing English content in non-English language versions

2 participants