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

i18next-conv

Package Overview
Dependencies
Maintainers
2
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 2.1.0 to 2.1.1

2

lib/gettextWrapper.js

@@ -265,3 +265,3 @@ var Gettext = require("node-gettext")

var ret = value;
if (ret.indexOf('\n') > -1) ret = ret.split('\n');
if (ret.indexOf('\n') > -1 && options.splitNewLine) ret = ret.split('\n');
return ret;

@@ -268,0 +268,0 @@ };

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

],
"version": "2.1.0",
"version": "2.1.1",
"private": false,

@@ -12,0 +12,0 @@ "preferGlobal": "true",

@@ -6,3 +6,4 @@ #!/usr/bin/env node

, converter = require("./lib/gettextWrapper")
, colors = require("colors");
, colors = require("colors")
, pkg = require("./package.json");

@@ -26,3 +27,3 @@ // test calls:

program
.version('0.0.1')
.version(pkg.version)
.option('-s, --source [path]', 'Specify path to read from')

@@ -35,2 +36,3 @@ .option('-t, --target [path]', 'Specify path to write to', '')

.option('--quiet', 'Silence output', false)
.option('--splitNewLine', 'Silence output', false)
.parse(process.argv);

@@ -42,3 +44,4 @@

plurals: program.plurals,
quiet: program.quiet
quiet: program.quiet,
splitNewLine: program.splitNewLine
};

@@ -45,0 +48,0 @@

@@ -107,3 +107,3 @@ # Introduction

Copyright (c) 2012 Jan Mühlemann
Copyright (c) 2016 Jan Mühlemann

@@ -110,0 +110,0 @@ Permission is hereby granted, free of charge, to any person obtaining a copy

@@ -85,3 +85,3 @@ var fs = require('fs')

var output = './test/_tmp/en_us.utf8.json';
wrapper.gettextToI18next('en_us', testFiles.en.utf8, output, {quiet: true}, function(){
wrapper.gettextToI18next('en_us', testFiles.en.utf8, output, {quiet: true, splitNewLine: true}, function(){
var result = require(path.join('..', output));

@@ -98,3 +98,3 @@ var expected = require(path.join('..', testFiles.en.utf8_expected));

var output = './test/_tmp/de.utf8.json';
wrapper.gettextToI18next('de', testFiles.de.utf8, output, {quiet: true}, function(){
wrapper.gettextToI18next('de', testFiles.de.utf8, output, {quiet: true, splitNewLine: true}, function(){
var result = require(path.join('..', output));

@@ -111,3 +111,3 @@ var expected = require(path.join('..', testFiles.de.utf8_expected));

var output = './test/_tmp/ru.utf8.json';
wrapper.gettextToI18next('ru', testFiles.ru.utf8, output, {quiet: true}, function(){
wrapper.gettextToI18next('ru', testFiles.ru.utf8, output, {quiet: true, splitNewLine: true}, function(){
var result = require(path.join('..', output));

@@ -128,3 +128,3 @@ var expected = require(path.join('..', testFiles.ru.utf8_expected));

// EN
wrapper.gettextToI18next('en', testFiles.en.latin13, output, {quiet: true}, function(){
wrapper.gettextToI18next('en', testFiles.en.latin13, output, {quiet: true, splitNewLine: true}, function(){
var result = require(path.join('..', output));

@@ -161,2 +161,3 @@ var expected = require(path.join('..', testFiles.en.latin13_expected));

quiet: true,
splitNewLine: true,
filter: _filter

@@ -180,2 +181,3 @@ };

quiet: true,
splitNewLine: true,
filter: _filter

@@ -200,3 +202,3 @@ };

wrapper.gettextToI18next('en', testFiles.en.missing, output, {quiet: true}, function(){
wrapper.gettextToI18next('en', testFiles.en.missing, output, {quiet: true, splitNewLine: true}, function(){
var result = require(path.join('..', output));

@@ -212,3 +214,3 @@ expect(result).to.deep.equal({});

wrapper.gettextToI18next('en', testFiles.en.empty, output, {quiet: true}, function(){
wrapper.gettextToI18next('en', testFiles.en.empty, output, {quiet: true, splitNewLine: true}, function(){
var result = require(path.join('..', output));

@@ -225,3 +227,3 @@ expect(result).to.deep.equal({});

wrapper.gettextToI18next('en', testFiles.en.bad_format, output, {quiet: true}, function(){
wrapper.gettextToI18next('en', testFiles.en.bad_format, output, {quiet: true, splitNewLine: true}, function(){
var result = require(path.join('..', output));

@@ -244,3 +246,3 @@ expect(result).to.deep.equal({});

var output = './test/_tmp/en.utf8.po';
wrapper.i18nextToGettext('en', testFiles.en.utf8_expected, output, {quiet: true}, function(){
wrapper.i18nextToGettext('en', testFiles.en.utf8_expected, output, {quiet: true, splitNewLine: true}, function(){
var result = fs.readFileSync(output);

@@ -257,3 +259,3 @@ var expected = fs.readFileSync(testFiles.en.utf8);

var output = './test/_tmp/de.utf8.po';
wrapper.i18nextToGettext('de', testFiles.de.utf8_expected, output, {quiet: true}, function(){
wrapper.i18nextToGettext('de', testFiles.de.utf8_expected, output, {quiet: true, splitNewLine: true}, function(){
var result = fs.readFileSync(output);

@@ -270,3 +272,3 @@ var expected = fs.readFileSync(testFiles.de.utf8);

var output = './test/_tmp/ru.utf8.po';
wrapper.i18nextToGettext('ru', testFiles.ru.utf8_2_expected, output, {quiet: true}, function(){
wrapper.i18nextToGettext('ru', testFiles.ru.utf8_2_expected, output, {quiet: true, splitNewLine: true}, function(){
var result = fs.readFileSync(output);

@@ -273,0 +275,0 @@ var expected = fs.readFileSync(testFiles.ru.utf8_2);

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