1.3.0 • Published 6 years ago

@sabios/vue-translations-extractor v1.3.0

Weekly downloads
4
License
MIT
Repository
github
Last release
6 years ago

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