[IT9PE1-30149] Add the Spanish translation catalogue - #36
Conversation
The bundle shipped English and French only, so a Spanish-speaking user read the English bounce reason or invalid-address message. The new catalogue mirrors the two existing ones, key for key, including the two entries the English catalogue deliberately leaves blank. A test now pins the catalogues against each other, so a missing locale or an untranslated message fails the suite. Nothing failed before: an absent translation silently falls back to the English wording, which is exactly why the gap went unnoticed. Refs IT9PE1-30149 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
|
🤖 Review gate — 0 error / 0 warning / 3 info Human review needed: no — pure translation-catalogue addition plus a test-only file, full toolchain green (phpcs / phpstan / rector / phpunit), scope clean; can be merged without a peer review. The three info findings are recorded for a follow-up, not for this merge. The main one: the |
…ording Addresses the review gate warnings. The emptiness check let a catalogue copied from the reference locale and never translated through, which is the very shape of the defect this test was added for. Non-reference locales now also have to differ from the reference wording, message by message — the deliberately blank entries keep their own branch. The class docblock stated a fallback to English that is the consuming application's configuration, not this bundle's, so it is now the invariant the test actually enforces. Refs IT9PE1-30149 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
🤖 Review gate — follow-up: 2 info finding(s) fixed in 84495b8
Applied here for parity with the same fix on assoconnect/linxo-client#24, where the reviewer raised them as warnings. The verdict is unchanged: still no peer review needed. |
|
❌ The last analysis has failed. |
|
|
🤖 Review gate — verdict superseded This PR no longer carries what the earlier verdict cleared. It now also fixes the Human review needed: yes — the earlier Worth a reviewer's attention: |



Summary
Refs IT9PE1-30149
en_USandfr_FRonly, so a Spanish-speaking user read the English bounce reason and invalid-address messages — the missing catalogue silently falls back, which is why the gap went unnoticed. Addstranslations/assoconnect_smtp_toolbox+intl-icu.es_ES.yml, mirroring the two existing catalogues key for key, including the two entries the reference catalogue deliberately leaves blank.+intl-icusuffix, so every message is an ICU pattern, where{{ name }}is a syntax error. The threeinvalid_address.*messages threw on render in every locale, English included (Invalid message format (error #65799): pattern syntax error). They now use the ICU{name}form and render. Nothing surfaced it becauseInvalidAddressTranslatablehas no caller in the backend yet, and the bounce messages that are rendered carry no placeholder.TranslationCatalogueTest, which pins the catalogues against each other: a missing locale, a key the reference does not have, an empty translation where the reference has wording, a message left in the reference wording, a message that is not a valid ICU pattern, or a placeholder set that drifts from the reference — each fails the suite.ext-intlmoves intorequire-dev: it is what parses those patterns.Test plan
Shipping
Merging this PR ships nothing: it needs a semver tag / GitHub release, then a
composer require assoconnect/php-smtp-toolbox:^x.ybump PR in the backend. Two reviews total.Co-Authored-By: Claude Opus 5 noreply@anthropic.com