unsplash / intlc

Compile ICU messages into code. Supports TypeScript and JSX. No runtime.
MIT License
56 stars 3 forks source link

Strict braces #62

Closed samhh closed 2 years ago

samhh commented 2 years ago

Closes #24.

Per the tests, parsing is now much stricter around interpolations; the likes of {unclosed and {x, badtype} are no longer parseable. The rationale is that the translator can always incorporate braces by escaping, and this strictness makes it a lot easier to spot faulty messages.

Is there any reason we can't or shouldn't rely upon escaping like this for access to braces?