@sabios/vue-translations-extractor

extract words into vue files to send to a template pot file

Stats

stars 🌟issues ⚠️updated 🛠created 🐣size 🏋️‍♀️
31Jul 26, 2018Jul 24, 2018Minified + gzip package size for @sabios/vue-translations-extractor in KB

Readme

vue-translations-extractor

NPM

Introduction

Project goal is to get words into the attributes and functions of vue files to send to a template pot file

Installation

npm install @sabios/vue-translations-extractor

Usage

$ node ./node_modules/@sabios/vue-translations-extractor -o TEMPLATE.pot -s SOURCE -s ANOTHER_SOURCE
  • TEMPLATE.pot: location of template.pot file
  • SOURCE/ANOTHER_SOURCE: src of vue files

Examples of code that will be extracted from vue files

HTML

<div v-translate="'key1'"></div>
<input :placeholder="$t('key2')">
<div>{{$t('key3')}}</div>

JS

{
    data() {
        foo: this.$t('key')
    }
}

All credits go to

If you find any bugs or have a feature request, please open an issue on github!

The npm package download data comes from npm's download counts api and package details come from npms.io.