-
-
Notifications
You must be signed in to change notification settings - Fork 421
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
tweaking so that the module gives us a way to make multiple i18n objects #323
Conversation
…cts when needed -- this change should be backward compatible for anyone who isn't including the i18n.js file explitictly, instead of defaulting to the index.js file
2 similar comments
Definetly - is on my roadmap too. But tests should pass. Would you mind checking? |
3 similar comments
@@ -1,4 +1,4 @@ | |||
var i18n = require('../i18n'), | |||
var i18n = require('../index'), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alternately, I could change the require('../i18n')
bits to require('../i18n')()
instead of require('../index')
in most spots, but I think that could take more memory to test since each spot that does this would be creating it's own i18n object.
Glad to @mashpie! How that? |
Hey @mashpie, is there anything more I can do for this PR? Thanks! |
nice & thanks! Looks to be ready for merge and review... too busy atm - hope for weekend :) |
Hey @mashpie. Just checking in. Is there anything more I can do? Thanks! |
No thanks, all fine. I'll be traveling this week but will try to release latest next monday. There are a couple of pr I wanted to merge in that release also. |
Any news? |
It's a common process to have different i18n files for different parts of a project. Sometimes we want to be able to use different i18n configurations in environments and jump back and forth between which one we're using (think async build process). This change would be non-breaking for those who are using index.js (implicitly or explicitly) but also allow to build multiple unique i18n objects by going to i18n.js directly when needed.
Is this something you'd consider supporting in this project?