-
Notifications
You must be signed in to change notification settings - Fork 604
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
Move default messages into Globalize #575
Comments
👍 I like the idea of moving that code in here. Basically, the patched API looks like this Globalize.formatMessage({
path: <path>
});
// or
Globalize.formatMessage({
message: <message>
}) @jquery/globalize any input anyone? |
The lack of input at least shows we have no objections... 😄 I would like to stress the API first. For the record: (a) should we make it backwards compatible (i.e., the Object argument above is incompatible with the current String one)? (b) consider supporting rxaviers/react-globalize-compiler#6 |
cc @Setogit... By looking at your examples at strong-globalize I believe you do something similar in your end. I thought you could be interested in this issue as well. We are aiming to bring default message functionality over to Globalize. |
Andrew pointed me here after I uncovered the same issue. Part of the globalize compiler tool chain can't extract messages from |
Hi @necolas, thanks for your input. I'm open to bring this feature into Globalize. I believe it's a good move and no one went against it so far. Although, we lack resources in order to implement it. Would anyone from your team be interested in contributing this feature? About the compiler issue, although addressing this in Globalize fixes it for you, I still think it would be good and helpful to know more about the details of the problem you faced. Could you file an issue in https://github.com/jquery-support/globalize-compiler or https://github.com/rxaviers/react-globalize-compiler/ (the one that seems most appropriate) please? Thanks |
As discussed in rxaviers/react-globalize-compiler#5, the fact that react-globalize monkeypatches Globalize to support default messages (ie. using the string in the default language as the key for the message) complicates the code for react-globalize-complier and globalize-compiler. Large projects that use both react-globalize elements and calls to Globalize.
messageFormatter
/formatMessage
can run into complications - some code might hit a Globalize that has been monkeypatched, while other code might hit an unpatched Globalize object.If the default messages code were moved into Globalize itself, this would be much simpler.
The text was updated successfully, but these errors were encountered: