Skip to content

Message function does not work #3880

@Tsuyoshi84

Description

@Tsuyoshi84

Environment

  • Operating System: Linux
  • Node Version: v20.19.1
  • Nuxt Version: 4.2.1
  • CLI Version: 3.30.0
  • Nitro Version: 2.12.9
  • Package Manager: pnpm@8.15.6
  • Builder: -
  • User Config: compatibilityDate, devtools, modules, i18n
  • Runtime Modules: @nuxtjs/i18n@10.2.0
  • Build Modules: -

Reproduction

https://stackblitz.com/edit/nuxt-starter-s2zf3hs1?file=app%2Fpages%2Findex.vue

Describe the bug

Vue I18n allows us to use Messages Functions to generate texts dynamically.

However, when I use them with @nuxtjs/i18n v10, it doesn't function as expected. It just shows the locale key. The interesting thing is that it only occurs after the build process, and it doesn't happen in dev mode.

Additional context

I'm not sure if it's a problem with the module or Vue i18n, but it seems like this issue started happening with @nuxtjs/i18n v10. It didn't happen when I used v9.

Maybe I'm missing some configuration, but please let me know if that's the case.

Logs

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions