elixir-gettext / gettext

Internationalization and localization support for Elixir.
https://hexdocs.pm/gettext
469 stars 87 forks source link

Replace PO parse / compose with Expo library #307

Closed maennchen closed 2 years ago

maennchen commented 2 years ago

Partial implementation of #215

Blocked by elixir-gettext/expo#30

This is only an initial draft and not the finished implementation. I'll be on vacation until 25th and will probably not work on this until then.

maennchen commented 2 years ago

@whatyouhide I would really like to finish up this PR. Will you be able to have a look at the outstanding parser issue or should I try to find some help somewhere else?

whatyouhide commented 2 years ago

@maennchen hey, sorry for the wait. I was spending my OSS cycles mostly on Xandra the past few weeks, and I have just a little more to go. I would be able to take a look at this in something like a couple of weeks, would that works? If I'll get to it sooner, I'll get to it sooner 😄

maennchen commented 2 years ago

@whatyouhide Thanks for the feedback. Xandra sounds interesting, I'll have to look at that one a bit closer :)

I think I'm going to attempt it once more on my own in the meantime and if that doesn't work I'll wait for you.

maennchen commented 2 years ago

@whatyouhide I tried in a new way and I nearly got it working.

To get to this point, I added a $end token and tried to get rid of as many $empty states as possible.

There are now only 2 errors left. It seems like the previous and obsolete tokens are somehow consumed prematurely.

Details: https://github.com/elixir-gettext/expo/pull/30

maennchen commented 2 years ago

@josevalim FYI: I quickly rebased & fixed the tests.

I will have to do one more pass over the PR and make sure all the naming etc. is correct.

maennchen commented 2 years ago

@josevalim / @whatyouhide I've completed the integration.

A few points to note:

Thank you both for your time :)

josevalim commented 2 years ago

:green_heart: :blue_heart: :purple_heart: :yellow_heart: :heart:

maennchen commented 2 years ago

@josevalim Oh wow, I was not expecting for this to get through that easy. Thanks :heart:

josevalim commented 2 years ago

We just need an expo release and we can start working on the other issues. :)