Casing sensitive path (kebab case)
Jeromearsene opened this issue · comments
Jerome commented
Module versions
vue
: 2.6.14vue-i18n
: 8.26.1
Reproduction Link
Sorry but it is too complicated to replicated folder structure.
To Reproduce
Steps to reproduce the behavior:
{
"instructions1": "Glissez-Déposez votre fichier ici",
}
- Try to use translation like this:
$t('add-data.instructions1')
Expected behavior
Preserve kebab-case and not write in camelCase like this:
$t('addData.instructions1')
It is possible to preserve kebab-case style ?
Thanks
kazuya kawaguchi commented
Thank you for your reporting!
The file name of the resource for which the locale messages is defined cannot be used as the key.
The key you specify for $t
is the key defined in the locale messages resource imported with JS import
syntax (or require
in commonjs).
Thanks!