•  
      request #44479 Do not bundle node-gettext with all Vue apps
    Infos
    #44479
    Joris MASSON (jmasson)
    2025-09-04 12:37
    2025-09-03 10:03
    46190
    Details
    Do not bundle node-gettext with all Vue apps

    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.

    Dev tools
    Empty
    Empty
    • [ ] enhancement
    • [x] internal improvement
    Empty
    Stage
    Joris MASSON (jmasson)
    Closed
    2025-09-04
    Attachments
    Empty
    References

    Follow-ups