-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Translation] Placeholder parameter is not replaced #49093
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
Comments
I get Could you provide a reproducer? Also note that if you got the intl extension you can translate a date’s day of week with \IntlDateFormatter::create($locale, pattern: 'EEEE')->format($dt); |
@MatTheCat while writing out the reproduction code and running the translation extraction command I get a I don't know the internals of the translation bundle and when one or the other type of suffix is generated, thus I'm not sure how to replicate the issue I have in my original project. Does this somehow happen because the messages file was originally generated without the presence of intl extension, and when the intl extension was installed an alternate codepath is taken for the translation? |
The issue you describe would be the reverse: the Does refreshing the cache change anything? |
@MatTheCat found the issue and I'm going to close the ticket. In my original repository the |
Symfony version(s) affected
6.2.5
Description
Target translation message contains a placeholder %parameter% which is not replaced.
How to reproduce
I have a translation message in my
messages.en.xlf
file:And a twig extension which exposes a filter (
relativeDate
) that returns a translatable message (simplified):Output which I use in my twig template:
The end result is the message without replaced parameters:
Possible Solution
No response
Additional Context
No response
The text was updated successfully, but these errors were encountered: