-
Notifications
You must be signed in to change notification settings - Fork 275
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Symphony Twig pluralization has changed #736
Comments
That makes it somewhat hard to support… Even your example is a bit ambiguous ( |
And just as annoying to use. 😂 It doesn't help that they have the issue tracker disabled too. For plurals, I'll probably just end up passing it as a template variable and have regular gettext do the translating in PHP.
|
Would you have some example files? I can't find any in their repository... |
I managed to find some examples in their unit tests: Jesus. Now a bit of the parser makes sense. It looks like if there is just a |
Here is a full example of the syntax:
More details in the Sf documentation: https://symfony.com/doc/5.4/translation.html#message-format |
There aren't more details there, though. This one limited example is literally all there is written on the subject of non-ICU formatting. |
Here's the latest version of their test following up on @withinboredom: There is a lot of information in the comments of this class: |
With the deprecation of https://github.com/twigphp/Twig-extensions and switching over to https://github.com/symfony/twig-bridge, it appears Symfony has
subtlydrastically changed how pluralization works.Former:
Now:
Is there anyway that poedit can recognize the
|
to delineate the singular/plural form?This is not well documented at all by them, and I had to go digging into the parser to figure out how to make it work 😂
The text was updated successfully, but these errors were encountered: