Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

i18next-conv

Package Overview
Dependencies
Maintainers
4
Versions
69
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

i18next-conv - npm Package Compare versions

Comparing version 9.0.0 to 9.1.0

4

CHANGELOG.md

@@ -0,1 +1,5 @@

### 9.1.0
- add option `persistMsgIdPlural` to merge msgid and msgid_plural (po -> json -> po)
### 9.0.0

@@ -2,0 +6,0 @@

@@ -128,2 +128,12 @@ "use strict";

const values = context[key].msgstr;
if (options.persistMsgIdPlural) {
// eslint-disable-next-line camelcase
const _context$key = context[key],
msgid = _context$key.msgid,
msgid_plural = _context$key.msgid_plural; // eslint-disable-next-line camelcase
if (msgid_plural && msgid !== msgid_plural) targetKey = `${msgid}|#|${msgid_plural}`;
}
const newValues = getGettextValues(values, locale, targetKey, options);

@@ -130,0 +140,0 @@ Object.assign(appendTo, newValues);

"use strict";
/* eslint-disable prefer-destructuring */
const GettextParser = require('gettext-parser');

@@ -122,6 +123,17 @@

} else {
let msgid = kv.key; // eslint-disable-next-line camelcase
let msgid_plural = kv.key;
if (options.persistMsgIdPlural && kv.key.indexOf('|#|') > -1) {
const p = kv.key.split('|#|');
msgid = p[0]; // eslint-disable-next-line camelcase
msgid_plural = p[1];
}
trans[kv.context][kv.key] = {
msgctxt: kv.context,
msgid: kv.key,
msgid_plural: kv.key,
msgid,
msgid_plural,
msgstr: pArray

@@ -128,0 +140,0 @@ };

3

package.json

@@ -9,3 +9,3 @@ {

],
"version": "9.0.0",
"version": "9.1.0",
"private": false,

@@ -50,3 +50,2 @@ "main": "lib",

"lint": "eslint '**/*.js'",
"pretest": "npm run lint",
"test": "mocha",

@@ -53,0 +52,0 @@ "build": "babel src --out-dir .",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc