unicode-org / message-format-wg

Developing a standard for localizable message strings
Other
231 stars 34 forks source link

[FEEDBACK] Duplicate variant errors and numbers #896

Closed nicolo-ribaudo closed 3 weeks ago

nicolo-ribaudo commented 3 weeks ago

Ref https://github.com/unicode-org/message-format-wg/blob/main/spec/errors.md#duplicate-variant

There is clearly some normalization going on when checking for duplicate variant keys (and it's not just based on their raw appearance in the mf2 text), so that foo and |foo| can be considered to be the same key and thus report an error.

What happens when using number literals? Are 0.1 and 1e-1 duplicate keys? And 0.1 and 0.10? What about 1 and |1|?

nicolo-ribaudo commented 3 weeks ago

I figure out that comparison always happens as strings because keys are all converted to strings :)