We have been using easygettext to extract gettext from our Vue apps for a while. Ever since request #13702 where we started using Typescript + Vue, we have had to use a crappy "fork and patch" of easygettext because the native library does not support Typescript.
Let's go further and write our own gettext extractor. We can drop unneeded features from easygettext and add new features.
Unwanted features we will drop:
- Extraction from Pug / Jade template
- Extraction of HTML tags inside v-translate
Wanted features to implement:
- Extraction of $gettext functions inside HTML attributes. This will let us drop many computed properties that were just returning gettext-translated strings. This will in turn enable us to turn many small components into functional components, which are simpler and faster.