mirror of
https://github.com/MarekWo/mc-webui.git
synced 2026-11-03 09:12:19 +01:00
Stage 5a translated the contacts pages but the browser diff was only run against /contacts/existing, so the other three kept most of their page headers, action buttons and confirmation modals in English: page titles, "Add Contact", "Pending Contacts", Refresh, Filters, Approve/Ignore and both batch-confirmation dialogs, plus Advanced Filters, Preview Cleanup and the cleanup confirmation on /contacts/manage. Most of the keys they needed already existed from 5a - the template sites were simply never wired to them. Three spinners in the Settings modal (Regions, Analyzer, Observer lists) were missed in 8b for the opposite reason: their containers are excluded from the stage-8 browser check as JS-populated, but the spinner inside is server-rendered, so excluding the container hid it. Root cause of both, and the reason for the new tool: a browser diff only sees what is visible on the page it is pointed at. Add i18n-template-diff.py, which fetches each entry point's HTML in en and pl and compares text nodes directly. No browser, no per-page script, and it covers closed modals and every page in one run - it found all of the above in a single pass. It cannot see anything JavaScript writes, so it complements the Playwright scripts rather than replacing them. Every server-rendered template in the project is now translated. The whole-project run reports 11 identical strings, all correct: the device name, version strings, the language names (which are supposed to match), "1 hop" (identical in Polish) and the glossary terms Hash, HB, Repeater. Catalog: 760 -> 781 keys, pl at 100%. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>