In messages.en.yml, I have
confirmed: Congrats %username%, your account is now activated.
But I want to \'bold\' username to
Holding HTML stuff in translations is wrong, because translators usually break it. But if you really need it:
Twig:
{% trans %}confirmed{% endtrans %}
Yaml translation file:
confirmed: 'Congrats %username%, your account is now activated.'
Discussion about this: https://github.com/symfony/symfony/issues/2713