-
Notifications
You must be signed in to change notification settings - Fork 22
feat(i18n): WIP YAML support #123
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
base: main
Are you sure you want to change the base?
Conversation
|
I split the loading of translations if you wanted to keep your old functionality. Maybe you can use globby to get the JSON files too and merge it into one function. Or you can go through the files without globby if you prefer. Either way works I guess. To be tested for performance diff. |
Besides integrating locale retrieval, we also need to update the dev tools, write tests, and add information to the documentation. Regarding the implementation, I don’t really like that we essentially have two identical methods, loadTranslations and loadYamlTranslations—they are 90% the same. I also have some doubts about using globby. Why scan the folder if we can construct the full path directly? Additionally, I’m not entirely sure how this will work in layers, so there are still a lot of open questions. |
…loading yaml or JSON
You are right, I just made it two functions for a proof of concept. Check this new update. I merged the loading and removed globby. |
Looks good, a separate function should slightly simplify code maintenance. |
What else do you need to merge this? |
dev tools and write tests |
What kind of dev tools? |
https://github.com/s00d/nuxt-i18n-micro/tree/main/client https://s00d.github.io/nuxt-i18n-micro/guide/devtools If you are adding support for a new format, it also requires integration with my module for the dev tool. |
WIP YAML support, using server side translation.
Related: #103