-
Notifications
You must be signed in to change notification settings - Fork 27
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 support for multiple messages files #81
Added support for multiple messages files #81
Conversation
…n means that file order matters if the same key exists in multiple files
return null; | ||
readMessages: (messagesFilepaths, locale) => { | ||
let messages = {}; | ||
const filepaths = [].concat(messagesFilepaths); |
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.
Great solution to make it always an array.
Please, can you add a test? |
@rxaviers I have added unit tests, however when "es" is included in the supported locales , there is a module parse failure. I'm having some trouble locating the root of this problem. |
@@ -0,0 +1,5 @@ | |||
{ | |||
"en": { |
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.
You need to update this to es
.
Fixed |
Thanks |
#11
Note that the Object.assign means that file order matters if the same key exists in multiple files.
I can add unit tests as needed, but I figured I would at least get eyes on this.