[IT9PE1-30149] Fix the ICU placeholders and name the catalogues after the base language - #37
Merged
Merged
Conversation
The domain carries the +intl-icu suffix, so every message is an ICU pattern, where `{{ name }}` is a
syntax error. The three invalid_address messages threw on render in every locale, English included:
Invalid message format (error #65799): pattern syntax error
Nothing surfaced it because the only consumer, InvalidAddressTranslatable, has no caller in the backend
yet, and the bounce messages that are rendered carry no placeholder. The catalogues now use the ICU
`{name}` form and render.
Two tests pin it: every message must parse as an ICU pattern for its locale, and must carry the same
placeholders as the reference catalogue, so a `{mail}` typo no longer renders literally. ext-intl moves
into require-dev, which is what parses those patterns.
The stray space before the colon goes with it in en_US and es_ES; French keeps it, its typography wants
one.
Refs IT9PE1-30149
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The files were named after a country variant, en_US and fr_FR, so they only served those exact locales. Symfony resolves a locale by falling back to its parent, so a base-language name serves every regional variant: en_GB and en_US both reach en. Verified against the consuming application's own configuration, which restricts enabled_locales to ['en_US', 'fr_FR', 'es_ES']: all three still resolve, the restriction does not disable the parent fallback. The backend names its own ~2300 catalogues this way and none with a country code, so the bundle was the outlier. Refs IT9PE1-30149 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
❌ The last analysis has failed. |
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Summary
Refs IT9PE1-30149
+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 — latent, not a live error.…en_US.yml→…en.yml, and so on. A country-variant name only serves that exact locale; Symfony falls back to the parent, soenservesen_GBanden_USalike. The backend names its own ~2300 catalogues this way and none with a country code.{mail}typo no longer renders literally.ext-intlmoves intorequire-dev: it is what parses those patterns.enandes; French keeps it, its typography wants one.Test plan
enabled_locales: ['en_US', 'fr_FR', 'es_ES']: all three resolve to the renamed files, and the ICU messages interpolate.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