-
-
Notifications
You must be signed in to change notification settings - Fork 385
Closed
Labels
Status: Review NeededRequest for review commentsRequest for review comments🔨 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?
If the key has a dot (eg. a.b.c) t('a.b.c') returns a correct translation, but te always returns false
This is problematic in projects that use a flat locale files structure like:
{
"key.exampleNestedKey": "Translation",
"key2.exampleNestedKey.evenMoreNesting": "Translation"
}Expected behavior
te returns true for dotted keys if they exist in the current locale
Reproduction
System Info
System:
OS: Linux 5.0 undefined
CPU: (8) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
Memory: 0 Bytes / 0 Bytes
Shell: 1.0 - /bin/jsh
Binaries:
Node: 20.19.1 - /usr/local/bin/node
Yarn: 1.22.19 - /usr/local/bin/yarn
npm: 10.8.2 - /usr/local/bin/npm
pnpm: 8.15.6 - /usr/local/bin/pnpm
npmPackages:
@vitejs/plugin-vue: ^4.2.3 => 4.3.4
vite: ^4.4.9 => 4.4.9
vue: ^3.3.4 => 3.3.4
vue-i18n: ^9.3.0 => 9.3.0
vue-tsc: ^1.8.8 => 1.8.10Screenshot
No response
Additional context
This is actually a duplicate of an old issue from the v8 version of Vue I18n
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
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Status: Review NeededRequest for review commentsRequest for review comments🔨 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