unsplash / intlc

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

Compile to/from standard ICU #130

Open samhh opened 2 years ago

samhh commented 2 years ago

We currently support a superset of ICU that includes boolean, doesn't always require other, etc. We could compile this down to something ICU-compliant for better interop with other tools.

The conversion back would be lossy. For example {x, boolean, true {y} false {z}} could be compiled to {x, select, true {y} false {z} other {__NOOP__}}. It could be compiled back to our superset provided the keys aren't renamed and __NOOP__ is left alone.

samhh commented 2 years ago

If we do this we may want to consider giving our superset its own name.

samhh commented 2 years ago

Note that as the spec is currently written, if we support MF2 (#156), we'll once again be supporting a superset.