jshmrtn / vue3-gettext

Translate Vue 3 applications with gettext.
https://jshmrtn.github.io/vue3-gettext/
MIT License
66 stars 23 forks source link

Allow for optionally passing a --flat flag to vue-gettext-extract #5

Closed olof-nord closed 2 years ago

olof-nord commented 2 years ago

If this is optional flag is passed, the .po files are created directly at the --out directory, with the language as the file name.

This differs from the current behavior as it does not create a folder with an app.po file for each language.

The result of passing the flag looks like this:

language
├── en_GB.po
├── fr_FR.po
├── it_IT.po
├── messages.pot
└── translations.json

Without passing, it this is the result:

language
├── en_GB
│   └── app.po
├── fr_FR
│   └── app.po
├── it_IT
│   └── app.po
├── messages.pot
└── translations.json
lzurbriggen commented 2 years ago

@olof-nord Thank you! I'll create a release for this soon.