Issue : Pluralization and Linked Messages not interpreted in production #1547
-
Hello and first of all thank you for the library, it is quite powerful ! I managed to integrate nicely the library on my development environment and it works perfectly. However, when I deploy the project on Heroku, every message using vue-i18n Pluralization or Linked Locale Messages is not being interpreted and shows the entire locale message string : I've decided to open a discussion before making a bug report, as this could be a configuration mistake on my end. I have read on other threads and on StackOverflow and believe there could be issues with the way webpack or vite are packaging the project. I am using vue-i18n (9.2.2) in a Nuxt3 plugin, therefore using VueJS 3, building with Vite with the plugin for vue-i18n vite-plugin-vue-i18n. Nuxt3 configuration (nuxt.config.ts), showing the Vite plugin config to resolve the locales JSON files :
Nuxt plugin for vue-i18n (plugins/vue-i18n.ts) :
And here are the 2 locales files : locales/fr.json :
locales/en.json :
Example of how the locale messages are used within the Vue templates :
The Plurals and Linked messages syntax in the locales messages should be interpreted by vue-i18n and not display the full locale message string. [EXPECTED] Local environment output : [BUG RESULT] Same code packaged for production, deployed on Heroku : Another example with failing Linked Messages (in production) : Here are infos about my system :
What am I doing wrong here ? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Did you get to the bottom of it @guillaumeprevost ? |
Beta Was this translation helpful? Give feedback.
Did you get to the bottom of it @guillaumeprevost ?
I'm having a similar issue with the named formatting, currently and scratching my head why this is happening only on
vite build
.