vue-gettext-extract

Generates gettext pot files for standard Vue projects
4,851 2
Install
npm install vue-gettext-extract
Latest Version:0.1.6
License:GPL-3.0-or-later
Last Updated:Feb 13, 2022
Links: GitHub  ·  npm
Maintainer: lajosbencz

vue-gettext-extract

Generates gettext pot files for standard Vue projects

Designed to be used with vue-gettext and nuxt-gettext

Install

npm install -D vue-gettext-extract

Usage

Usage in terminal
cd /my/project/dir/
vue-gettext-extract --help
Options:
  --version   Show version number                                      [boolean]
  --js, -j    Glob pattern for JS files            [string] [default: "**/*.js"]
  --vue, -v   Glob pattern for Vue files          [string] [default: "**/*.vue"]
  --out, -o   Path to output pot file         [string] [default: "template.pot"]
  --help, -h  Show help                                                [boolean]
Usage in code
const extract = require('vue-gettext-extract')

async function run() {
  const extractor = await extract('src/**/*.js', 'src/**/*.vue', 'locale/template.pot')
  extractor.printStats()
}

Most of the code is thanks to gettext-extractor and this gist

Related Packages

nuxt-gettext

Translation module utilizing the gettext ecosystem

3,461 4
@scayle/storefront-nuxt

Nuxt integration for the SCAYLE Commerce Engine and Storefront API

152,903
nuxt-tsconfig-stub

Stub Nuxt's generated tsconfig.json at installation

70,835 24
kuranuxt

Look at the Nuxt 3 documentation to learn more.

990 0
nuxt-define

One utility function for module authors to define compiler constants for all bui...

13,412,511

Version History

Version Released License
0.1.6 GPL-3.0-or-later
0.1.5 GPL-3.0-or-later
0.1.4 GPL-3.0-or-later
0.1.3 GPL-3.0-or-later
0.1.2 GPL-3.0-or-later