Problem/Motivation
Before #2565895: Add a new :placeholder to SafeMarkup::format() for URLs that handles bad protocols, each string placeholder had an equivalent in Twig. So if you wanted to say {% trans %}Hello {{ username|placeholder }}{% trans %} this would end up as t('Hello %username') (instead of the default t('Hello @username'). The :placeholder type added by #2565895: Add a new :placeholder to SafeMarkup::format() for URLs that handles bad protocols however did not get any Twig updates, so it is not possible to use from there.
Proposed resolution
Let's not leave Twig behind. Figure out the best way to name that "filter" and apply that. Proposed "url" for now.
Remaining tasks
Review.
User interface changes
None.
API changes
Twig up to par again with t() and not a second class citizen. Adding a new "filter" to trans tags.
Data model changes
None.
Comment | File | Size | Author |
---|---|---|---|
#2 | 2592573.patch | 2.55 KB | Gábor Hojtsy |
Comments
Comment #2
Gábor HojtsyComment #3
Gábor HojtsyComment #4
star-szr@Gábor Hojtsy thanks, seems like a possible duplicate of #2575275: {% trans %} (and other parts of templates) are unable to use URL escaping though…
Comment #5
Gábor HojtsyDuplicate of #2575275: {% trans %} (and other parts of templates) are unable to use URL escaping then. Made some significant metadata updates there, so its not hidden so well :P
Comment #7
Gábor Hojtsy