-
-
Notifications
You must be signed in to change notification settings - Fork 419
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
Added multiple directories support #291
Conversation
2 similar comments
3 similar comments
Thanks a lot for this - will certainly merge soon. Just wanted to review a bit before |
Merge it please~~ Thank you ~~ |
"will certainly merge soon" they said... |
I really like the simplicity and ease of this package vs. others. However, I need multi-directory support. |
more than 3 years later I still consider merging... or well implementing similar. One concern with that PR is the multiple use of Meanwhile you should be able to load any kind of "exotic" setup by using staticCatalog option (https://github.com/mashpie/i18n-node#some-words-on-staticcatalog-option) introduced with last release in 0.10.0. |
@mashpie Thank you for the quick response. I will use the static option for now and wait for multi-dir support. Regarding the suggested implementation, since I spoke of simplicity in my previous post, I must admit that I found the suggested approach (current PR) more complicated than I expected. What I have in mind is just to add the ability to specify the directory parameter as an array, then treat the first directory element as input/output (for compatibility reasons) and all the rest as input only (extra search path). This would keep things both very simple and backward compatible and yet, allow one to add translation files from additional paths (e.g., for sub components). Does the above make sense? |
well... although I can not merge directly - will keep as todo for refactored backend project |
i18n now support multiple sources for translations.This feature is backward compatible, check README.md for details.
Concerning tests I add some issues with the global scope. In fact the files I added passes tests when ran alone but fails with the full test suit. That is why the Makefile test function now call mocha two times.