endlessm / kolibri-explore-plugin

The kolibri plugin to add the custom channel representation
MIT License
2 stars 4 forks source link

template-ui: Use v-html to handle <strong> in translation #842

Closed dbnicholson closed 11 months ago

dbnicholson commented 11 months ago

In vue-intl, formatMessage always returns a string, which means any embedded HTML in the translation can't be displayed. Use v-html to insert the translation as raw HTML.

Fixes: https://github.com/endlessm/endless-key-flatpak/issues/77

manuq commented 11 months ago

I thought that was fixed in 55e4bbcc95cc18644ff65daf1484318bce8d76e6 but probably wasn't tested. Kolibri docs https://kolibri-dev.readthedocs.io/en/develop/i18n.html#icu-message-syntax point to ICU syntax and I see <boldThis> in there https://formatjs.io/docs/core-concepts/icu-syntax/#rich-text-formatting . Maybe we can use that?

manuq commented 11 months ago

I gave it a quick test with boldThis but it didn't work. So yeah let's use v-html.