Spittal / vue-i18n-extract

Manage vue-i18n localization with static analysis
https://pixari.github.io/vue-i18n-extract/#what-is-it
MIT License
313 stars 86 forks source link

Gettext (.po file) support #149

Open gekkedev opened 3 years ago

gekkedev commented 3 years ago

When trying to read .po-based language files, I run into a SyntaxError: Unexpected string based on this call (in an else-closure): https://github.com/pixari/vue-i18n-extract/blob/1ed4c301636c73cd0cc32e94109bc7e02d7880e6/src/create-report/language-files.ts#L33 It looks like there is no support for Gettext / .po fles has been implemented. Could this be achieved by using a loader like @openculinary/i18next-gettext-loader? Would love to see this file format supported.

To reproduce:

  1. create a Vue project using gettext
  2. install this CLI tool
  3. run npx vue-i18n-extract --languageFiles (json|yaml|yml|po) --vueFiles (your|file|matcher) (essentially adding po files into the Glob pattern)
Spittal commented 2 years ago

We're open to a PR that adds .po support, but it's outside the scope for the contributors of the project right now! Sorry!