elixir-gettext / gettext

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

Trouble with extracting #258

Closed Shakarim closed 4 years ago

Shakarim commented 4 years ago

Hi! I got a some trouble while trying to generate *.po files. I have an umbrella project with lot of apps inside, but all translates contains in one app only (in "master"). So, when I call the "gettext.extract --merge" I've got one of two scenarions:

  1. Successfully scenario. My console contain following:

    ==> master
    Compiling n files (.ex)
    ==> second_app
    Compiling n files (.ex)
    ==> third_app
    Compiling n files (.ex)
    ...some data about new, removed and etc. messages here...
  2. Failure scenario. My console contains:

    ==> master
    Compiling n files (.ex)
    ==> second_app
    Compiling n files (.ex)
    ==> master
    Compiling n files (.ex)
    ==> third_app
    Compiling n files (.ex)
    ...and some data about new, removed and etc. translates...

As you see:

  1. Gettext initiate compiling the master app twice
  2. When Gettext does not follows order and compiling "master" twice, all messages in apps AFTER second compile are deleted from *.po files.

P.S. I've set "in_umbrella" param in mix's deps function, and define the compilation order, and it works, but gettext ignores it.

P.S.S. All apps in umbrella project is Phoenix apps

How can I fix this trouble?

josevalim commented 4 years ago

Please use the ElixirForum or StackOverflow for questions/help/feedback, where a wider community will be able to help you. We reserve the issues tracker for issues only. Thank you!

Shakarim commented 4 years ago

You're welcome, but I've tried, and...it looks like bug. Or gettext actually have to ignore compilation order?

josevalim commented 4 years ago

Oh, the way it was phrased sound like a request for help with debugging. See #178. This seems a duplicate of that.

Shakarim commented 4 years ago

Thank you very much. I've tried to use this solution. And it doesn't work :(