intlify/vue-i18n

Linked messages to a locale with a path like key e.g (dashboard.homepage.title: "Dashboard") don't work

NRodriguezcuellar opened this issue · 1 comments

Reporting a bug?

using "@nuxtjs/i18n": "8.3.1"

When you have the keys in your locale set up as a flat object with "path" like keys

{
"common.unit.data.mb": "MB",
"component.data.usage": "Want to buy more @:common.unit.data.mb ?"
}

you will get Want to buy more . It will not correctly resolve the key

Expected behavior

It should resolve the key correctly, returning the value of common.unit.data.mb.

Reproduction

https://stackblitz.com/edit/vitejs-vite-vfwxqd?file=src%2Fmain.ts

System Info

System:
    OS: Linux 6.10 EndeavourOS
    CPU: (16) x64 AMD Ryzen 7 2700X Eight-Core Processor
    Memory: 4.73 GB / 31.29 GB
    Container: Yes
    Shell: 5.2.26 - /bin/bash
  Binaries:
    Node: 22.5.1 - ~/.local/share/mise/installs/node/22.5.1/bin/node
    npm: 10.8.2 - ~/.local/share/mise/installs/node/22.5.1/bin/npm
    pnpm: 9.6.0 - ~/.local/share/mise/installs/pnpm/9.6.0/bin/pnpm
    bun: 1.1.20 - ~/.local/share/mise/installs/bun/1.1.20/bin/bun
  Browsers:
    Chromium: 127.0.6533.72
  npmPackages:
    vue-eslint-parser: 9.4.3 => 9.4.3

Screenshot

No response

Additional context

No response

Validations

discovered the flatJson property on the config which of course fixes this issue 🥸