You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
$t("A text with \"double quotes\" characters")
<span :title="$t('Here\'s a text that will generate an issue.')">
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):
{
"A text with \"double quotes\" characters": "A text with \"double quotes\" characters",
"Here\\'s a text that will generate an issue.": "Here\\'s a text that will generate an issue."
}
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:
{
"A text with \"double quotes\" characters": "A text with \"double quotes\" characters",
"Here's a text that will generate an issue.": "Here's a text that will generate an issue."
}
The text was updated successfully, but these errors were encountered:
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:
The text was updated successfully, but these errors were encountered: