lingui / js-lingui

🌍 📖 A readable, automated, and optimized (3 kb) internationalization for JavaScript
https://lingui.dev
MIT License
4.49k stars 378 forks source link

Add support for gettext message format #703

Closed zsolt-dev closed 4 years ago

zsolt-dev commented 4 years ago

There seems to be no translations tools working with linguijs right now.

In order for lingui to gain traction, it needs to work nice with translation tools. Problem is lingui custom plurals format.

For example, this is a response from webtranslateit.com customer support:

this library uses its own way for declaring plurals, which is a shame since Gettext already has its own way of declaring plurals since years and years.

Unfortunately, it is very difficult for translation tools to extract these embedded plural forms and display them nicely in different text areas. I don't think this is something that should be done, because these embedded plurals can be complex and the translation tools would have to glue them back in the segment.

tricoder42 commented 4 years ago

Hey @zsolt-dev, this library doesn't use a custom plurals format nor custom message format. It uses ICU MessageFormat. What webtranslateit refers to is a gettext message format, which is a different one.

If you want to add support for gettext then take a look at #677

zsolt-dev commented 4 years ago

@tricoder42 thanks for response.

Any good on-line tools for translation that works with lingui? Something that plays nice with plurals, like this:

image