svsticky / constipated-koala

Management system for our study association
https://koala.svsticky.nl/
GNU General Public License v3.0
16 stars 4 forks source link

I18n-js export more translations than neccessary #955

Closed Riscky closed 2 years ago

Riscky commented 2 years ago

In the i18n-js export (generated at app/javascript/src/translations.js) we find all sorts of translations that are not actually used in the frontend (For example an exhaustive list of countries for some reason). Webpack is not smart enough to filter this data, so we actually export the whole bunch to each pack we build. We should not do this.

There is an i18n-js settings file at config/i18n-js.yml, in which we can add filters. Explanation for the filters can be found at https://github.com/fnando/i18n-js (note that we use version 3.9.1, not the alpha version of 4.0).