- Issue created by @zaporylie
- π³π΄Norway zaporylie
One way to support this would be to create a generic, dynamic [fallback_value:*] dynamic token, which will stop relying on the double quotes.
- πΊπΈUnited States pianomansam
@zaporylie Sorry to hear about this issue. Thanks for reporting it. I'll look into how auto_entitylabel implements token replacement. If there's a way we can resolve it on that side, we would avoid a breaking change on the token_or side. In the meantime, you're welcome to submit a fix.
- π³π΄Norway zaporylie
auto_entitylabel module uses tokens within TranslatableMarkup's placeholder ('@placeholder'), which is what's causing this issue in the first place.
If we add support for an alternative fallback string dynamic replacement token we could leave the old logic in place but document how to use new syntax, gradually deprecating old syntax.
Currently, I solved it like that in the project's custom codebase, and this solution is working well. Whitespaces are supported in case that's someone's concern.
Please also notice that a similar issue was created in auto_entitylabel module, link in Related issues.
IMHO both modules could benefit from improvements: token_or could stop relying on quotes which would also resolve β¨ Allow to use ' as enclosure for using in href attributes Postponed: needs info while auto_entitylabel should stop using TranslatableMarkup in favour of having a translatable config entity.