Open chenguzhen87 opened 1 year ago
Same problem here. I am using version 9.2.2. Placeholders are replaced in dev environment (vite), but not in testing/production environment (vite build).
Same problem here it's really very blocking, it's supposed to go into production soon but this bug will stop me
Thank you for your reporting! Could you give us your minimal reproduction with github or stackblize, please?
Thank you @kazupon for your answer
Here is a simple scenario with the bug occurring: Pull the sources of this project: https://github.com/AnthonyRuelle/i18n_prod_HS Run: npm i npm run dev : all good npm run prod : pluralization not working
Thank you for your reproduction!
Unfortunately, I could not reproduce this issue.
I saw the Enfant
with $t('children', 1)
😞
We would need more information that is included reproduction.
Same problem here it's really very blocking, it's supposed to go into production soon but this bug will stop me you maybe solve this like this
Hi @kazupon !
I updated the project to reproduce the problem
Pull the sources of this project: https://github.com/AnthonyRuelle/i18n_prod_HS Run: npm i npm run dev : all good npm run prod : pluralization not working
When we put the translation keys directly in the i18n.config.ts file it works in dev and prod
However, when the messages are put in a separate file (en.json and fr.json files in the locales folder on my project) + configuration in the following nuxt.config.ts, it works fine in dev but not in production.
I remain available if you need more information but you should reproduce the problem now
I have fixed my issue setting the option runtimeOnly
to false. I am using vite.
Reporting a bug?
Placeholder for testing environment, is not replaced, development environment is replaced normally
Expected behavior
Placeholder for testing environment is replaced,
Reproduction
None
System Info
Screenshot
Test environment placeholder not replaced
Develoment environment placeholder replaced
Additional context
none
Validations