Closed eemeli closed 5 years ago
Yeah seems good to me. Not sure when I'll have a chance to get to this though.
I am also interested in this feature, and i would like to help on it. @ericf I may not know how you wish to implement it so i opened a PR with first steps as i see it.
One thing that would be very useful, but may need a bit of refactoring, is the ability to incorporate the original message within the compiler error. I did not find a simple way to do it, because a compiler never gets the original message.
I will be glad to update the PR if you share your vision on how it should be implemented.
See #186 for more context
It would appear that intl-messageformat is not requiring an
other
case in arguments. The original Java implementation does have this requirement, from where messageformat.js has adopted it as well:As a consequence, a source string like
Test {x, select, true{this}}
will compile with intl-messageformat, but not with messageformat.js. This is a problem for migrating from one implementation to the other, as we've now discovered with SlexAxton/messageformat.js#141.It would be good if we could resolve this discrepancy. How would you feel about introducing a compile-time check for
other
to intl-messageformat, to bring it in line with other ICU MessageFormat implementations?