Closed Kerhael closed 4 years ago
OK just found the solution!
Here it is:
html.pug:
| #{t('mail.password_change.line_1', {name: `${name}`})}
text.pug:
= `${t('mail.password_change.line_1', {name: `${name}`})}`
In case it helps someone else :)
Hi,
I'm currently having trouble with the evaluation of a variable within a translated string.
Here is my .js file:
Here my en.json:
And my html.pug file:
I would like to see "John's password has been reset" as a result, however I am not able to find the correct syntax. If I directly write #{t('mail.password_change.line_1', {name: "John"})}, the result is what I expect. If I change "John" to #{name} or ${name}, I get a pug error INVALID_TOKEN.
And I assume I have the same question for text.pug file :)