Skip to content
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

Merged

Conversation

justinpurcell1
Copy link
Contributor

#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.

…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);
Copy link
Owner

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.

@rxaviers
Copy link
Owner

Please, can you add a test?

@justinpurcell1
Copy link
Contributor Author

@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": {
Copy link
Owner

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.

@justinpurcell1
Copy link
Contributor Author

Fixed

@rxaviers rxaviers merged commit 9b45799 into rxaviers:master Jan 17, 2018
@rxaviers
Copy link
Owner

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants