-
-
Notifications
You must be signed in to change notification settings - Fork 380
Closed
Labels
Type: BugBug or Bug fixesBug or Bug fixes🔨 p3-minor-bugPriority 3: a bug in an edge case that only affects very specific usagePriority 3: a bug in an edge case that only affects very specific usage
Description
Reporting a bug?
Using a placeholder with hyphens in [email protected] is causing errors
const messages = {
en: {
message: {
"message-with-placeholder-using-hyphens":
"My message with {placeholder-hyphens}.",
},
},
};
// usage:
$t("message.message-with-placeholder-using-hyphens", {
"placeholder-hyphens": 'XXXX'
});Error message
1 | My message with {placeholder-hyphens}.
Using <i18n-t> is breaking component rendering
<i18n-t
keypath="message.message-with-placeholder-using-hyphens"
v-if="false"
>
<template #placeholder-hyphens>
{{ $t("message.hello") }}
</template>
</i18n-t>
Demo: https://codesandbox.io/p/devbox/vuei18n-hyphen-vxst9x?file=%2Fsrc%2FApp.vue
(<i18n> can be enabled via v-if="true")
Expected behavior
Above message-syntax works in vue-i18n@8
Reproduction
https://codesandbox.io/p/devbox/vuei18n-hyphen-vxst9x?file=%2Fsrc%2FApp.vue
System Info
System:
OS: Windows 11 10.0.22631
CPU: (20) x64 13th Gen Intel(R) Core(TM) i7-13700H
Memory: 20.88 GB / 63.68 GB
Binaries:
Node: 20.9.0 - C:\Program Files\nodejs\node.EXE
npm: 6.14.18 - C:\Program Files\nodejs\npm.CMD
Browsers:
Edge: Chromium (123.0.2420.81)
Internet Explorer: 11.0.22621.1Screenshot
Additional context
No response
Validations
- Read the Contributing Guidelines
- Read the Documentation
- Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- Check that this is a concrete bug. For Q&A open a GitHub Discussions
Metadata
Metadata
Assignees
Labels
Type: BugBug or Bug fixesBug or Bug fixes🔨 p3-minor-bugPriority 3: a bug in an edge case that only affects very specific usagePriority 3: a bug in an edge case that only affects very specific usage


