eo-locale icon indicating copy to clipboard operation
eo-locale copied to clipboard

Does not handle ICU offset

Open Flydiverny opened this issue 3 years ago • 2 comments

ICU format specifies offset:N which eo-locale currently doesn't handle parsing, neither ignoring or using.

Example from ICU user guide http://userguide.icu-project.org/formatparse/messages

{num_guests, plural, offset:1 "
      "=0 {{host} does not give a party.}"
      "=1 {{host} invites {guest} to her party.}"
      "=2 {{host} invites {guest} and one other person to her party.}

eo-locale will just print the entire translation text in this case. image

This makes eo-locale hard to use with pluralisation or tools like Phrase which seem to add offset:0 by default 😅

Flydiverny avatar Jun 13 '21 19:06 Flydiverny

Hi @Flydiverny thank you for the issue! Do you think this property makes sense for real use cases?

pret-a-porter avatar Jun 14 '21 08:06 pret-a-porter

I haven't seen anyone actually use it, and to be fair I don't really know why one would. I suppose there might be use for it in some localisation but with the plural syntax what I see most translations end up with just one and other regardless of being able to add more forms.

For our usage now I just made this dirty fix using patch-package since it was blocking our release 😄 image

Flydiverny avatar Jun 14 '21 10:06 Flydiverny