Skip to content

Fix Finnish localization and broken theme-toggle script in opposition motions articles#828

Merged
pethers merged 2 commits intomain-7a9239b964b147d1from
copilot/sub-pr-817
Mar 5, 2026
Merged

Fix Finnish localization and broken theme-toggle script in opposition motions articles#828
pethers merged 2 commits intomain-7a9239b964b147d1from
copilot/sub-pr-817

Conversation

Copy link
Contributor

Copilot AI commented Mar 5, 2026

Two issues remained unfixed in the 2026-03-05 opposition motions articles after previous review rounds.

Finnish article: untranslated context box

fi.html lines 160–163 still contained English paragraphs inside the "Opposition strategia" <div class="context-box">. Replaced with full Finnish translations for all four party descriptions (S, MP, C, V).

Broken theme-toggle.js reference (all 14 articles + template)

All 14 articles referenced <script src="../js/theme-toggle.js"></script> — a file that does not exist in the repo, producing a 404 and a silently broken theme toggle button.

Replaced with an inline IIFE in all 14 articles:

<script>
  (function () {
    var STORAGE_KEY = 'theme';
    var DARK = 'dark';
    var LIGHT = 'light';
    var button = document.getElementById('theme-toggle');
    // reads localStorage, falls back to prefers-color-scheme
    // toggles dark-theme class + aria-pressed/aria-label/title
  })();
</script>

Also updated scripts/article-template/template.ts to embed the same inline script so newly generated articles don't reintroduce the broken external reference.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

…motions articles

Co-authored-by: pethers <1726836+pethers@users.noreply.github.com>
Copilot AI changed the title [WIP] Add opposition motions analysis for 5 March 2026 Fix Finnish localization and broken theme-toggle script in opposition motions articles Mar 5, 2026
@pethers pethers marked this pull request as ready for review March 5, 2026 12:23
@pethers pethers merged commit accb355 into main-7a9239b964b147d1 Mar 5, 2026
@pethers pethers deleted the copilot/sub-pr-817 branch March 5, 2026 12:23
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