Closed
Description
Description
Inspired by #44911
To work with translatable strings in a uniform way, currently 2 features are missing still IMHO.
- bypass the translator for literal text, and avoid if/else based on eg.
string|Translatable
input
$t = TranslatableMessage::literal('should not be translated')->trans(...);
- a bit more controversial; bypass (HTML) escaping
this is arguably already a first-class concept to regognize: https://symfony.com/doc/current/reference/forms/types/form.html#label-html
$t = TranslatableMessage::safe('should be translated, but not escaped when rendered')->trans(...);
This would generalize the case of bypass-escaping in whatever context ...
This could combine 3) safeLiteral()
WDYT?
Example
No response