Open daniel-jann opened 1 month ago
BTW, a workaround would be to use template literals like so:
<span :title="$t(`Here's a text that won't generate an issue.`)">
It'll work until you need to do something like
<span :title="$t(`Template literals use the ${variable} notation to include a variable`)">
vue-i18n allows using texts as keys in translation files (eg "This is my text": "This is my text"). It does however mean that we sometimes need escape characters:
The vue-i18n-extract will add these strings like so in the translation files (JSON for instance, using noEmptyTranslation and a pipe as separator to avoid nesting keys on dots):
The first one with double quotes is escaped correctly, but the second one with single quotes is not, and is (rightly so) not picked up by vue-i18n to match the text used in the $t function. Instead it should be extracted to: