$te returns false if the key contains dot
Author: LasyIsLazyCreated Jul 4, 2022Updated Jul 23, 2024
LabelsStatus: Review Needed
Reporting a bug?
If key has dot like a.b.c, $t('a.b.c') will get the correct result, but $te will return false.
Expected behavior
$te return true
Reproduction
{
"a.b.c": "msg"
}$t('a.b.c') return false
System Info
System:
OS: macOS 12.4
CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
Memory: 88.95 MB / 16.00 GB
Shell: 5.8.1 - /bin/zsh
Binaries:
Node: 14.16.1 - ~/.nvm/versions/node/v14.16.1/bin/node
npm: 8.5.5 - ~/.nvm/versions/node/v14.16.1/bin/npm
Browsers:
Chrome: 103.0.5060.53
Chrome Canary: 105.0.5152.0
Firefox: 86.0.1
Safari: 15.5
npmPackages:
@vue/cli-plugin-babel: ^4.5.15 => 4.5.15
@vue/cli-plugin-eslint: ^4.5.4 => 4.5.15
@vue/cli-plugin-typescript: ^4.5.4 => 4.5.15
@vue/cli-service: ^4.5.4 => 4.5.15
@vue/composition-api: ^1.4.9 => 1.5.0
vue: ^2.6.14 => 2.6.14
vue-class-component: ^7.2.3 => 7.2.6
vue-eslint-parser: ^8.0.1 => 8.0.1
vue-jest: 3.0.7 => 3.0.7
vue-property-decorator: ^9.1.2 => 9.1.2
vue-router: ^3.1.2 => 3.5.3
vue-template-compiler: ^2.6.11 => 2.6.14
vuex: ^3.4.0 => 3.6.2
vuex-class: ^0.3.2 => 0.3.2Screenshot
No response
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 Discussion
- The provided reproduction is a minimal reproducible example of the bug.
Source: kazupon/vue-i18n