Repository navigation
[Intl/MessageFormatter] Add support for quoting with apostrophes - #723
Merged
Merged
Conversation
This was referenced Oct 27, 2026
Member
Will you send another PR to fix this ? |
Member
Author
|
I should be able to :) |
nicolas-grekas
added a commit
that referenced
this pull request
Oct 28, 2026
… (nicolas-grekas) This PR was merged into the 1.x branch. Discussion ---------- [Intl/Icu] Sync currencies metadata with symfony/intl data | Q | A | ------------- | --- | Branch? | 1.x | Bug fix? | no | New feature? | no | Deprecations? | no | Issues | - | License | MIT symfony/intl moved to ICU 79.1 in symfony/symfony#67509, which removed CNX and changed the fraction digits of MRU and PKR. `CurrenciesTest` compares this file with that data, so every new build on 1.x fails since then (see #723). Commits ------- 2fe44d0 [Intl/Icu] Sync currencies metadata with symfony/intl data
nicolas-grekas
force-pushed
the
intl-messageformatter-apostrophes
branch
from
October 28, 2026 09:16
c3c1919 to
8c23dec
Compare
nicolas-grekas
added a commit
that referenced
this pull request
Oct 28, 2026
…ke intl (nicolas-grekas) This PR was merged into the 1.x branch. Discussion ---------- [Intl/MessageFormatter] Pick the first matching selector, like intl | Q | A | ------------- | --- | Branch? | 1.x | Bug fix? | yes | New feature? | no | Deprecations? | no | Issues | - | License | MIT Follow up to #723, as asked by `@stof`. When a `select`, `plural` or `selectordinal` argument uses the same selector twice, the polyfill now picks the first matching one, like intl does. It used to pick the last one. Commits ------- b2188b9 [Intl/MessageFormatter] Pick the first matching selector, like intl
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.
The polyfill ignored the apostrophe quoting of ICU, so messages rendered differently without the intl extension.
It''sstayedIt''s,'{name}'was replaced by the value, and'#'was replaced by the number in plural messages.This PR implements the default "double optional" mode of intl.
''is an apostrophe. A single'starts quoted text only before{or}, and before#in plural and selectordinal messages.The new tokenizer also fixes
#{{{{{}}}}{, which made the constructor loop until it ran out of memory. And like intl, it reads an unmatched}as literal text.I compared the polyfill with intl on about 900k random patterns that intl accepts, using the features the polyfill supports. The only remaining differences come from a selector used twice in the same argument. The polyfill picks the last one, intl picks the first one.
Spotted while reviewing symfony/symfony#67555.