Socket
Socket
Sign inDemoInstall

i18next-conv

Package Overview
Dependencies
6
Maintainers
2
Versions
68
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.1.5 to 0.1.6

2

lib/gettextWrapper.js

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

self.i18nextToGettextData(domain, source, path.extname(target), options, function(err, data) {
self.i18nextToGettextData(domain, source, target, options, function(err, data) {
self.writeFile(target, data, options, callback);

@@ -73,0 +73,0 @@ });

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

],
"version": "0.1.5",
"version": "0.1.6",
"private": false,

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

@@ -213,2 +213,34 @@ var fs = require('fs')

});
describe('toPO processing', function() {
it('should convert a JSON file to utf8 PO', function(done) {
var tests = [];
// EN
tests.push(function(next) {
var output = './test/_tmp/en.utf8.po';
wrapper.i18nextToGettext('en', testFiles.en.utf8_expected, output, {quiet: true}, function(){
var result = fs.readFileSync(output);
var expected = fs.readFileSync(testFiles.en.utf8);
expect(result).to.deep.equal(expected);
fs.unlinkSync(output);
next();
});
});
// DE
tests.push(function(next) {
var output = './test/_tmp/de.utf8.po';
wrapper.i18nextToGettext('de', testFiles.de.utf8_expected, output, {quiet: true}, function(){
var result = fs.readFileSync(output);
var expected = fs.readFileSync(testFiles.de.utf8);
expect(result).to.deep.equal(expected);
fs.unlinkSync(output);
next();
});
});
async.series(tests, done);
});
})
});

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc