open-index/open-npm huggingface dataset:
npm package: @pitcher/cli
Description: A CLI for PITCHER services
Author: Giorgos Kallis
Latest version: 0.3.1
Deprecated: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.


# Pitcher CLI

Command Line Interface for Pitcher related tasks in your terminal or scripts.

## Installation

```shell
$ yarn global add @pitcher/cli
```
or 
```shell
$ npm install -g @pitcher/cli
```

## Documentation

Available commands and usage examples can be found in the [documentation](https://pitcher-ag.atlassian.net/wiki/spaces/PG/pages/287113306/Pitcher+CLI).
npm package: @pitcher/gettext-vue
Description: Extract translatable strings from Vue files. Fork of gettext-vue.
Author: Nick Muerdter
Latest version: 0.4.1

# gettext-vue

Extract translatable strings from [Vue](https://vuejs.org) files. By default, looks for the keywords `$t`, `$gettext`, and `$ngettext`.

## Installation

```sh
npm install -g gettext-vue
```

## Usage

```sh
xgettext-vue [OPTION] [INPUTFILE]...
```

#### Options

```
Input file location:
  -f, --files-from  get list of input files from FILE
  -D, --directory   add DIRECTORY to list for input files search[default: ["."]]

Output file location:
  -o, --output  write output to specified file          [default: "messages.po"]

Input file interpretation:
  --from-code  encoding of input files                        [default: "ascii"]

Operation mode:
  -j, --join-existing  join messages with existing file         [default: false]

Output details:
  --force-po     write PO file even if empty                    [default: false]
  --no-location  do not write '#: filename:line' lines          [default: false]

Informative output:
  -h, --help     display this help and exit                            [boolean]
  -V, --version  output version information and exit                   [boolean]
```

## API

### new Parser(keywordspec)

Creates a new parser.

The `keywordspec` parameter is optional, with the default being:

```javascript
{
  '$t': [0],
  '$gettext': [0],
  '$ngettext': [0, 1]
}
```

Each keyword (key) requires array of argument number(s) (value). When multiple argument numbers are specified, expressions using this keyword are treaded as single-plural.

### .parse(template)

Parses the `template` string for Swig expressions using the keywordspec.

It returns an object with this structure:

```javascript
{
  msgid1: {
    line: [1, 3]
  },
  msgid2: {
    line: [2],
    plural: 'msgid_plural'
  }
}
```

## Credits

Largely based on [gettext-ejs](https://github.com/pekala/gettext-ejs) and [xgettext-template](https://github.com/gmarty/xgettext)
npm package: @pitcher/machine-gettext
Description: Add machine translations to gettext .po files
Author: Timotheus Kampik
Latest version: 0.1.2

# machine-gettext
[![Build Status](https://travis-ci.org/signavio/machine-gettext.svg?branch=8-integrate-travis-ci)](https://travis-ci.org/signavio/machine-gettext)

``machine-gettext`` is a node module for adding machine translations to [GNU gettext .po files](https://www.gnu.org/software/gettext/manual/html_node/PO-Files.html).
To translate content, it uses Google translate cloud service.

this is a fork of https://github.com/signavio/machine-gettext

## Installation
Install ``machine-gettext`` by running ``npm install -g machine-gettext``.

## Usage
You can use ``machine-gettext`` via the command line or require it in a JavaScript file.

### Command line
On the command line you can run ``machine-gettext`` with the following arguments:

* ``-in, --input``: Relative path to input file

* ``-out, --output``: Relative path to output file

* ``-f, --fuzzy``: If specified, mark added translation as fuzzy

* ``-o, --overwrite``: If specified, overwrite existing fuzzy translations

The following example writes all missing translations as non-fuzzy msgstrs into ``messages`` and overwrites fuzzy messages:

```
machine-gettext -i=messages.po -o=messages.po -m=non-fuzzy-overwrite
```

### JavaScript
You can also require the module as ``translateGettext`` in a JavaScript file and execute ``translateGettext`` as a function with the following arguments:

* ``input`` (string): Relative path to input file

* ``markAsFuzzy`` (boolean): If ``true``, mark added translation as fuzzy

* ``overwrite`` (boolean): If ``true``, overwrite existing fuzzy translations

* ``callback`` (function): Executed after all messages have been processed. Takes a [gettext-parser](https://github.com/smhg/gettext-parser).po file object as its argument.

* ``output`` (string, optional): Relative path to output file 

The following example loads the content of ``./messages.po``, adds missing translations and logs the new content:

```JavaScript
const translateGettext = require('translateGettext')

poFile = parser.po.parse(fileSystem.readFileSync('./messages.po'))
translateGettext(poFile, true, false, processedPoFile => {
    console.log(processedPoFile)
})
```

**Note:** The example code marks the new translations as fuzzy and doesn't overwrite existing fuzzy translations.

## Contribution
Contributions are welcome.
Make sure you run the tests with ``npm run test`` before creating a pull request and add test cases that cover the contributed code.

Possible improvement are, for example:

* explicitely set the target language (currently determined via the .po file header),

* allow integration with alternative translation services,

* better support for interpolation and pluralization,

* support list of terms that shouldn't be translated (for example: product names),

* translation memory support.

## Authors

* Timotheus Kampik - [@TimKam](https://github.com/TimKam)
* Oleg Yarin - [@monapasan](https://github.com/monapasan)