Gettext.extract in umbrella project

Hello everyone! 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...
  1. 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? (I’ve tried to use https://github.com/elixir-gettext/gettext/issues/178 solution, but it makes an error)

1 Like