Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
4 tasks done
NRodriguezcuellar opened this issue Jul 25, 2024 · 1 comment
Labels
Status: Review Needed Request for review comments

Comments

@NRodriguezcuellar
Copy link

NRodriguezcuellar commented Jul 25, 2024

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

@NRodriguezcuellar NRodriguezcuellar added the Status: Review Needed Request for review comments label Jul 25, 2024
@NRodriguezcuellar NRodriguezcuellar changed the title Linked messages to a locale with a path like key e.g (dashboard.homepage.title: "Dashboard") Linked messages to a locale with a path like key e.g (dashboard.homepage.title: "Dashboard") don't work Jul 25, 2024
@NRodriguezcuellar
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Review Needed Request for review comments
Projects
None yet
Development

No branches or pull requests

1 participant