As it stands, our internal library @tuleap/vue3-gettext-init
depends on @tuleap/gettext
only so that it can re-export some utility functions getPOFileFromLocale()
and getPOFileFromLocaleWithoutExtension()
. Those functions are useful for the init of our gettext translations, to tell the bundler (webpack or vite, respectively) to load the .po
file containing translations and to turn it into JSON.
@tuleap/gettext
also exposes a gettext imlementation that is not linked to Vue and is based on node-gettext
. After analysis, it turns out that every app in Tuleap that depends on @tuleap/vue3-gettext-init
(so, essentially all of our Vue apps) will also bundle node-gettext
, which is kind of big. It should not be so, as Vue apps do not use at all the node-gettext
part.
We should split the locale utility functions so that Vue apps do not bundle up node-gettext
as a side-effect. This should reduce the weight of all Vue apps.