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

translation-adapter-ts

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

translation-adapter-ts - npm Package Compare versions

Comparing version 1.0.5 to 1.0.6

4

build/PofileTransformer.js

@@ -22,5 +22,5 @@ "use strict";

let parsedData = PO.parse(data);
let result = [];
let result = {};
parsedData.items.forEach((i) => {
result[i.msgid] = i.msgstr;
result[i.msgid] = i.msgstr.pop();
});

@@ -27,0 +27,0 @@ return result;

{
"name": "translation-adapter-ts",
"version": "1.0.5",
"version": "1.0.6",
"description": "The translation adapter for i18n_mrg tool support in TypeScript projects.",

@@ -14,12 +14,12 @@ "main": "index.js",

"pofile": "^1.1.0",
"typescript": "^3.6.0"
"typescript": "^3.7.5"
},
"devDependencies": {
"@types/chai": "^4.2.3",
"@types/chai": "^4.2.9",
"@types/mocha": "^5.2.7",
"@types/node": "^12.7.12",
"@types/node": "^12.12.27",
"chai": "^4.2.0",
"mocha": "^6.2.1",
"ts-node": "^8.4.1"
"mocha": "^6.2.2",
"ts-node": "^8.6.2"
}
}

@@ -27,6 +27,6 @@ import {readFileSync, writeFileSync, readdirSync} from 'fs';

let result = [];
let result = {};
parsedData.items.forEach((i) => {
result[i.msgid] = i.msgstr;
})
result[i.msgid] = i.msgstr.pop();
});

@@ -33,0 +33,0 @@ return result;

@@ -12,14 +12,14 @@ import {expect} from "chai";

it.only('Transforms quotes correctly', () => {
it('Checks that translations strings are okay', () => {
let transformedFileContents = readFileSync('test/translationFiles/main.json').toString();
let jsonObject = JSON.parse(transformedFileContents);
expect(jsonObject['API Documentation']).to.equal('Документация API');
});
it('Transforms quotes correctly', () => {
let transformer = new PofileTransformer();
let data = readFileSync('test/translationFiles/main.po').toString();
console.log(data);
let jsonObject = transformer['encodePoStringToJSON'](data);
console.log(jsonObject);
// transformer.transformDirectory('test/translationFiles');
// let data = readFileSync('test/translationFiles/main.json').toString();
// let jsonObject = JSON.parse(data);
//
expect(jsonObject.hasOwnProperty('After you press the "Create campaign" button the campaign will be created and sent to the moderation. You can change it anytime')).to.be.true;
});
});

Sorry, the diff of this file is not supported yet

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