Check out documentation it says:
Third, it'll mark the translation as safe HTML if the key has the suffix “_html” or the last element of the key is the word “html”. For example, calling translate(“footer_html”) or translate(“footer.html”) will return a safe HTML string that won't be escaped by other HTML helper methods. This naming convention helps to identify translations that include HTML tags so that you know what kind of output to expect when you call translate in a template.
So you need to append suffix _html
to your key and now you can use html in your locales.
For example this is your locale file:
en:
welcome:
html: '<b>Hello!</b> This is first way to style your locales!'
welcome_html: '<b>Hi again!</b> This is second way to style your locales!'
Now just set I18n.t 'en.welcome.html'
or I18n.t 'en.welcome_html'
in your views. That's all! :)