feat: add i18n module#124
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Maciek Kucmus (mkucmus)
left a comment
There was a problem hiding this comment.
this is huuuuge :O
I left few questions and asked for formatting json files and vue components ;p
| "noProducts": "No products found 😔", | ||
| } | ||
| } | ||
| const globalTranslations = getTranslations() |
There was a problem hiding this comment.
Is it possible to have one global file for cms-base translations that can be replaced by a configuration in cms-base nuxt module parameters passed in nuxt.config.ts? we could use it in getTranslations instead of adding them in every component 🤔 just asking if it's not a better idea
There was a problem hiding this comment.
In this case, you will repeat phrases for the app and CMS. Also, it can be less clear in case of building applications that are not using Nuxt
There was a problem hiding this comment.
we could use cms-base prefix in the whole translation file as a root prop there 🤔
and the package is actually a nuxt3 module and won't be used outside I guess, at this moment.
| data-testid="add-to-cart-button" | ||
| > | ||
| 🛍 Add to cart | ||
| 🛍 {{ translations.product.addToCart }} |
There was a problem hiding this comment.
please add 🛍 sign to the translation phrase in case someone would not need it ;)
There was a problem hiding this comment.
But this icon is not related to the translations. Visibility of it should be handled by props
No description provided.