fix: add missing translations for sole-trader and search-error strings - #427
Conversation
Three company-capture-component strings had no i18n row in nb_NO/nl_NL/sv_SE: "Select a different sole trader", "Company search is unavailable right now. Please try again shortly.", and "Could not complete sole trader signup. Please try again." Machine-translated pending a human pass.
There was a problem hiding this comment.
Reviewed: three added CSV rows (nb_NO, nl_NL, sv_SE) match the translate() call sites exactly (company-capture-component.js, company-search-panel.js, sole-trader.js), are alphabetically placed, and introduce no duplicate keys. No critical issues.
Re: the es_ES.csv question raised in the PR description — confirmed the file doesn't exist anywhere in this repo and no test references it, so deferring that to Doug as suggested is reasonable; not a blocker here.
Ready for human approval ✅
|
Self-review (clean round): 9 lines added across 3 CSVs, no other rows touched, no duplicate keys introduced, alphabetical placement preserved. All 3 missing msgids ("Select a different sole trader", "Company search is unavailable right now. Please try again shortly.", "Could not complete sole trader signup. Please try again.") verified against the exact — by Claude |
Summary
company-capture-component.js,company-search-panel.js,sole-trader.js): mode chips, search aria-label, company-number aria-label, and the sole-trader/search-error messages.i18n/{nb_NO,nl_NL,sv_SE}.csv: "Select a different sole trader", "Company search is unavailable right now. Please try again shortly.", and "Could not complete sole trader signup. Please try again." Added machine translations matching the neighbouring rows' register/tone; a human pass is expected later.es_ES.csvdoes not exist in this repo (never has, and no test references that locale) — the standing 4-locale ruling doesn't apply to this repo as-is. Flagging for Doug rather than adding a locale with no established convention here.Why this slipped through CI
This repo has no
dev/i18n-audit.sh— the closest thing isTest/Unit/I18n/AdminFormCatalogueTest.phpandCompanyGateMessageTranslationTest.php, both PHPUnit.AdminFormCatalogueTestonly scans admin-side__()calls (Block/Adminhtml,view/adminhtml/templates,Model/Config/*, admin XML forms) — it never looks atview/frontend/web/js/**.CompanyGateMessageTranslationTestchecks two specific hardcoded msgids only. Nothing in CI scans frontend-JStranslate()calls at all, so a missing row there renders in English silently, with no test failure.Test plan
i18n/*.csvparse cleanly (verified locally: no dup keys, row counts consistent)