New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

fill-pot-po

Package Overview
Dependencies
Maintainers
1
Versions
46
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fill-pot-po - npm Package Compare versions

Comparing version

to
2.0.1

2

package.json
{
"name": "fill-pot-po",
"version": "2.0.0",
"version": "2.0.1",
"description": "Create pre-filled PO files from POT file, using previous PO files.",

@@ -5,0 +5,0 @@ "main": "src/index.js",

# fill-pot-po
[![GitHub release (latest SemVer)][release-image]][release-url]
[![Build Status][ci-image]][ci-url]
[![Coverage Status][coverage-image]][coverage-url]
[![Dependencies Status][deps-image]][deps-url]
[![NPM version][npm-image]][npm-url]
[![Downloads][downloads-image]][npm-url]
> Generate pre-filled PO files from POT file, using source PO files.

@@ -31,3 +38,3 @@ >

<td><code>required</code></td>
<td><code>function</code> Callback function, with one argument containing the results (see <a href="#Results-Async-mode">Results</a>).</td>
<td><code>function</code> Callback function, with one argument containing the results (see <a href="#results---async-mode">Results</a>).</td>
</tr>

@@ -37,6 +44,6 @@ <tr>

<td rowspan="2"><code>optional</code></td>
<td><code>object</code> Options object (see <a href="#Options">Options</a>).</td>
<td><code>object</code> Options object (see <a href="#options">Options</a>).</td>
</tr>
<tr>
<td><code>string|array</code> Alternatively, a glob string or array can be provided that will be used as <strong>options.poSources</strong>. All other options will have their default values.</td>
<td><code>string|array</code> Alternatively, a glob string or array can be provided that will be used as <a href="#posources"><code>options.poSources</code></a>. All other options will have their default values.</td>
</tr>

@@ -67,10 +74,10 @@ </table>

<td rowspan="2"><code>optional</code></td>
<td><code>object</code> Options object (see <a href="#Options">Options</a>).</td>
<td><code>object</code> Options object (see <a href="#options">Options</a>).</td>
</tr>
<tr>
<td><code>string|array</code> Alternatively, a glob string or array can be provided that will be used as <strong>options.poSources</strong>. All other options will have their default values.</td>
<td><code>string|array</code> Alternatively, a glob string or array can be provided that will be used as <a href="#posources"><code>options.poSources</code></a>. All other options will have their default values.</td>
</tr>
<tr>
<td colspan="2"><strong><em>returns</em></strong></td>
<td><code>array</code> Results array on success (see <a href="#Results-Sync-mode">Results</a>).</td>
<td><code>array</code> Results array on success (see <a href="#results---sync-mode">Results</a>).</td>
</tr>

@@ -113,7 +120,7 @@ <tr>

>
> By default, or if falsy, the module will look for PO files with filenames like `{text-domain}-{locale}.po` or `{locale}.po` if `domainInPOPath` is set to false.
> By default, or if falsy, the module will look for PO files with filenames like `{text-domain}-{locale}.po` or `{locale}.po` if [`domainInPOPath`](#domaininpopath) is set to false.
>
> `{text-domain}` is either the POT filename or the value set in the `domain` option.
> `{text-domain}` is either the POT filename or the value set in the [`domain`](#domain) option.
>
> See also `domainInPOPath`, `domainFromPOTPath` and `domain`.
> See also [`domainInPOPath`](#domaininpopath), [`domainFromPOTPath`](#domainfrompotpath) and [`domain`](#domain).

@@ -132,5 +139,7 @@ Default: `null`

`boolean`
> Match source PO files with the text domain name in the filename. For example: `text-domain-en_EN.po` and `text-domain-nl_NL.po`.
> Match source PO files with the text domain name in the filename.
>
> See also `domainFromPOTPath` and `domain`.
> For example: `text-domain-en_EN.po` and `text-domain-nl_NL.po`.
>
> See also [`domainFromPOTPath`](#domainfrompotpath) and [`domain`](#domain).

@@ -143,3 +152,5 @@ Default: `true`

>
> If set to `false` and `domainInPOPath` is `true`, a domain must be set using the `domain` option.
> If set to `false` and [`domainInPOPath`](#domaininpopath) is `true`, a text domain must be set using the [`domain`](#domain) option.
>
> See also [`domainInPOPath`](#domaininpopath) and [`domain`](#domain).

@@ -154,3 +165,3 @@ Default: `true`

>
> See also `domainInPOPath` and `domainFromPOTPath`.
> See also [`domainInPOPath`](#domaininpopath) and [`domainFromPOTPath`](#domainfrompotpath).

@@ -173,3 +184,3 @@ Default: `''`

>
> _**NOTE**_: If `returnPOT` is `true`, you need to set `writeFiles` to `true` or else no PO files will be generated and the plugin throws an error.
> _**NOTE**_: If set to `true`, you need to set [`writeFiles`](#writefiles) to `true` as well or else no PO files will be generated and the plugin throws an error.

@@ -184,3 +195,3 @@ Default: `false`

>
> _**NOTE**_: When using `gulp-fill-pot-po`, the default is `false`, since the resulting buffers will probably be `.pipe()`'d to a `.dest()` which writes them to disk instead.
> _**NOTE**_: When using [**gulp-fill-pot-po**](https://github.com/vHeemstra/gulp-fill-pot-po), the default is `false`, since the resulting buffers will probably be `.pipe( dest() )`'d, which writes them to disk instead.

@@ -191,3 +202,5 @@ Default: `true` (for gulp-fill-pot-po: `false`)

`string`
> (Only if `writeFiles` is `true`) Relative path from current working directory or absolute path to the folder where the PO files should be written.
> _Only if [`writeFiles`](#writefiles) is `true`._
>
> Relative path from current working directory or absolute path to the folder where the PO files should be written.

@@ -206,3 +219,5 @@ Default: `''`

`integer`
> Line wrapping length excluding quotation marks. The is forwarded as `foldLength` to [`gettext-parser`](https://github.com/smhg/gettext-parser#compile-po-from-a-translation-object).
> Line wrapping length excluding quotation marks.
>
> This is forwarded as `foldLength` to [`gettext-parser`](https://github.com/smhg/gettext-parser#compile-po-from-a-translation-object).

@@ -249,3 +264,3 @@ Default: `77`

#### results[1] (on success)
`array` Array of [Vinyl](https://github.com/gulpjs/vinyl) file objects, depending on the value of `options.returnPOT`:
`array` Array of [Vinyl](https://github.com/gulpjs/vinyl) file objects, depending on the value of [`options.returnPOT`](#returnpot):
<ul><table>

@@ -266,6 +281,6 @@ <tr>

### Result - Sync mode
### Results - Sync mode
#### On success
`array` Returns an array of [Vinyl](https://github.com/gulpjs/vinyl) file objects, depending on the value of `options.returnPOT`:
`array` Returns an array of [Vinyl](https://github.com/gulpjs/vinyl) file objects, depending on the value of [`options.returnPOT`](#returnpot):
<ul><table>

@@ -297,1 +312,18 @@ <tr>

MIT © [Philip van Heemstra](https://github.com/vheemstra)
[npm-url]: https://www.npmjs.com/package/fill-pot-po
[npm-image]: https://img.shields.io/npm/v/fill-pot-po.svg?color=cb0000&labelColor=444D56&logo=data:image/svg+xml;base64,PHN2ZyByb2xlPSJpbWciIHZpZXdCb3g9IjAgMCAyNCAyNCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBmaWxsPSIjOTU5REE1IiBkPSJNMS43NjMgMEMuNzg2IDAgMCAuNzg2IDAgMS43NjN2MjAuNDc0QzAgMjMuMjE0Ljc4NiAyNCAxLjc2MyAyNGgyMC40NzRjLjk3NyAwIDEuNzYzLS43ODYgMS43NjMtMS43NjNWMS43NjNDMjQgLjc4NiAyMy4yMTQgMCAyMi4yMzcgMHpNNS4xMyA1LjMyM2wxMy44MzcuMDE5LS4wMDkgMTMuODM2aC0zLjQ2NGwuMDEtMTAuMzgyaC0zLjQ1NkwxMi4wNCAxOS4xN0g1LjExM3oiPjwvcGF0aD48L3N2Zz4=
[downloads-image]: https://img.shields.io/npm/dm/fill-pot-po.svg?color=34D058&labelColor=444D56&logo=data:image/svg+xml;base64,PHN2ZyByb2xlPSJpbWciIHZpZXdCb3g9IjAgMCAyNCAyNCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBmaWxsPSIjOTU5REE1IiBkPSJNMS43NjMgMEMuNzg2IDAgMCAuNzg2IDAgMS43NjN2MjAuNDc0QzAgMjMuMjE0Ljc4NiAyNCAxLjc2MyAyNGgyMC40NzRjLjk3NyAwIDEuNzYzLS43ODYgMS43NjMtMS43NjNWMS43NjNDMjQgLjc4NiAyMy4yMTQgMCAyMi4yMzcgMHpNNS4xMyA1LjMyM2wxMy44MzcuMDE5LS4wMDkgMTMuODM2aC0zLjQ2NGwuMDEtMTAuMzgyaC0zLjQ1NkwxMi4wNCAxOS4xN0g1LjExM3oiPjwvcGF0aD48L3N2Zz4=
[release-url]: https://github.com/vHeemstra/fill-pot-po/releases
[release-image]: https://img.shields.io/github/v/release/vHeemstra/fill-pot-po?sort=semver&logo=github&logoColor=959DA5&labelColor=444D56
[ci-url]: https://github.com/vHeemstra/fill-pot-po/actions/workflows/ci_push.yml
[ci-image]: https://img.shields.io/static/v1?logo=github&logoColor=959DA5&label=lint%20%26%20tests&labelColor=444D56&message=passing&color=34D058
[ci-image2]: https://github.com/vHeemstra/fill-pot-po/actions/workflows/ci_push.yml/badge.svg
[coverage-url]: https://coveralls.io/github/vHeemstra/fill-pot-po?branch=main
[coverage-image]: https://coveralls.io/repos/github/vHeemstra/fill-pot-po/badge.svg?branch=main
[deps-url]: https://libraries.io/npm/fill-pot-po
[deps-image]: https://img.shields.io/librariesio/release/npm/gulp-fill-pot-po?color=34D058&logo=Libraries.io&logoColor=959DA5&labelColor=444D56

@@ -119,3 +119,5 @@ 'use strict';

return (parseInt(a_line) - parseInt(b_line));
if (a_line.length && b_line.length) {
return (parseInt(a_line) - parseInt(b_line));
}
}

@@ -122,0 +124,0 @@