Skip to content

feat(political-intelligence): localise all 14 pages, link every artifact, enrich SEO#1964

Merged
pethers merged 1 commit intomainfrom
copilot/improve-localisation-language-support
Apr 23, 2026
Merged

feat(political-intelligence): localise all 14 pages, link every artifact, enrich SEO#1964
pethers merged 1 commit intomainfrom
copilot/improve-localisation-language-support

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 23, 2026

The 14 political-intelligence*.html pages linked only to stream folders on GitHub (not individual artifacts), rendered methodology/template/stream descriptions in English regardless of target language, and carried a minimal SEO header.

Artifact-level links

  • New DailyArtifact + collectStreamArtifacts() walks each analysis/daily/$DATE/$STREAM/ recursively.
  • renderDailyDay() emits an accessible <details> per stream (collapsed, localised summary + count) listing every .md/.json as <icon> <localised title> <filename-pill> linking to its GitHub blob URL.
  • .pi-stream a.pi-stream-link so artifact links don't inherit the stream-button styling; new .pi-stream-artifacts* / .pi-artifact* styles.

Full per-language localisation (EN, SV, DA, NB, FI, DE, FR, ES, NL, AR, HE, JA, KO, ZH)

  • New i18n records: STREAM_NAME_I18N, STREAM_DESC_I18N, STREAM_GENERIC_DESC_I18N, METHODOLOGY_DESC_I18N, TEMPLATE_DESC_I18N, TEMPLATE_GENERIC_DESC_I18N, ARTIFACT_TITLE_I18N, LIBRARY_NAME_I18N.
  • CatalogEntry now carries library: 'methodologies' | 'templates'; localisedCatalogDescription(file, lang, library, fallback) resolves at render time with a localised generic fallback so unknown filenames never leak English.
  • renderCatalogGrid() / renderDailyDay() take lang and use artifactTitle(file, lang) + streamDisplayName(name, lang) + streamDescription(name, lang).

SEO

  • Head: preconnect/dns-prefetch to github.com + hack23.com, <link rel="sitemap">, per-language RSS <link rel="alternate">, news_keywords, generator, publisher, referrer, Content-Language, og:locale:alternate × 13, og:updated_time, article:publisher|section|modified_time|published_time, article:tag × N, twitter:creator, twitter:image:alt.
  • JSON-LD: CollectionPage gains mainEntityOfPage, dateModified (latest daily), publisher logo, richer about[], and hasPart[].description; new third ItemList graph enumerates the 14 most recent days for richer SERP snippets.

Rendered output (Swedish example)

<li class="pi-stream">
  <a class="pi-stream-link" href=".../analysis/daily/2026-04-23/propositions">
    <span class="pi-stream-icon">📜</span>
    <span class="pi-stream-name">Propositioner</span>
    <span class="pi-stream-count">24</span>
  </a>
  <p class="pi-stream-desc">Regeringens propositioner (lagförslag som läggs fram av regeringen).</p>
  <details class="pi-stream-artifacts">
    <summary>▸ Visa artefakter (24)</summary>
    <ol class="pi-artifact-list">
      <li><a href=".../executive-brief.md">📋 Chefsbriefing <code>executive-brief.md</code></a></li>
      <li><a href=".../risk-assessment.md">⚠️ Riskbedömning <code>risk-assessment.md</code></a></li></ol>
  </details>
</li>

…t-level links, richer SEO

Agent-Logs-Url: https://github.com/Hack23/riksdagsmonitor/sessions/ee24c06d-cdaf-4745-987c-1623422959bf

Co-authored-by: pethers <1726836+pethers@users.noreply.github.com>
@pethers pethers marked this pull request as ready for review April 23, 2026 15:38
Copilot AI review requested due to automatic review settings April 23, 2026 15:38
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot wasn't able to review any files in this pull request.

@github-actions github-actions Bot added html-css HTML/CSS changes refactor Code refactoring size-xl Extra large change (> 1000 lines) labels Apr 23, 2026
@github-actions
Copy link
Copy Markdown
Contributor

🏷️ Automatic Labeling Summary

This PR has been automatically labeled based on the files changed and PR metadata.

Applied Labels: html-css,refactor,size-xl

Label Categories

  • 🗳️ Content: news, dashboard, visualization, intelligence
  • 💻 Technology: html-css, javascript, workflow, security
  • 📊 Data: cia-data, riksdag-data, data-pipeline, schema
  • 🌍 I18n: i18n, translation, rtl
  • 🔒 ISMS: isms, iso-27001, nist-csf, cis-controls
  • 🏗️ Infrastructure: ci-cd, deployment, performance, monitoring
  • 🔄 Quality: testing, accessibility, documentation, refactor
  • 🤖 AI: agent, skill, agentic-workflow

For more information, see .github/labeler.yml.

@github-actions
Copy link
Copy Markdown
Contributor

🔍 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 requested a review from Copilot April 23, 2026 15:43
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot wasn't able to review any files in this pull request.

@pethers pethers merged commit 653ce13 into main Apr 23, 2026
15 checks passed
@pethers pethers deleted the copilot/improve-localisation-language-support branch April 23, 2026 15:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

html-css HTML/CSS changes refactor Code refactoring size-xl Extra large change (> 1000 lines)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants