Shared Gettext in an umbrella app?

Hey!

I have an umbrella application with two web apps, one for admin and one for users (FooAdmin and FooWeb). There’s also an app that handles assets for both web applications (FooCommon). This works well, but since both apps share styles, I want to use a shared CoreComponents module for both apps, allowing me to create forms etc. using one module. The problem is, that both web apps have their own Gettext modules, and the FooCommon app does not have Gettext, meaning that FooCommon.CoreComponents has no access to Gettext, thus I can’t have translated errors.

I tried moving Gettext only to FooCommon, but having it like this causes it to not find gettext calls from the web apps, so running mix gettext.extract --merge will result in 0 lines.

I also thought about passing the translation module (FooAdmin.Gettext or FooWeb.Gettext) to FooShared.CoreComponents as they do in PETAL, but I have no idea how it would decide which module to use.

So, is there a way to tell FooCommon to look for gettext calls in both web apps? Or, is there a way to make FooCommon.CoreComponents understand which web app the call is originating from? Or should I do something completely different?

Thanks!