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

node-gettext

Package Overview
Dependencies
Maintainers
1
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-gettext - npm Package Compare versions

Comparing version 1.0.1 to 1.1.0

test/fixtures/latin13.json

4

CHANGELOG.md
# Changelog
## v1.1.0
* Adds support for adding a textdomain from an already parsed json object
## v1.0.0 2015-01-21

@@ -4,0 +8,0 @@

5

lib/gettext.js

@@ -29,3 +29,6 @@ 'use strict';

if (file && typeof file !== 'string') {
if (file && file.translations) {
translation = file;
}
else if (file && typeof file !== 'string') {
translation = gettextParser.mo.parse(file, 'utf-8');

@@ -32,0 +35,0 @@ }

{
"name": "node-gettext",
"description": "Gettext client for Node.js to use .mo files for I18N",
"version": "1.0.1",
"version": "1.1.0",
"author": "Andris Reinman",
"maintainers": [{
"name": "andris",
"email": "andris@node.ee"
}],
"maintainers": [
{
"name": "andris",
"email": "andris@node.ee"
}
],
"homepage": "http://github.com/andris9/node-gettext",

@@ -19,15 +21,18 @@ "repository": {

"main": "./lib/gettext",
"licenses": [{
"type": "MIT",
"url": "http://github.com/andris9/node-gettext/blob/master/LICENSE"
}],
"licenses": [
{
"type": "MIT",
"url": "http://github.com/andris9/node-gettext/blob/master/LICENSE"
}
],
"dependencies": {
"gettext-parser": "^1.1.0"
"gettext-parser": "^1.1.2"
},
"devDependencies": {
"chai": "^1.10.0",
"grunt": "^0.4.5",
"grunt-contrib-jshint": "^0.10.0",
"chai": "^3.5.0",
"grunt": "^1.0.1",
"grunt-cli": "^1.2.0",
"grunt-contrib-jshint": "^1.0.0",
"grunt-mocha-test": "^0.12.7",
"mocha": "^2.1.0"
"mocha": "^2.4.5"
},

@@ -34,0 +39,0 @@ "engine": {

@@ -48,5 +48,2 @@ # node-gettext

If you do not include the file contents, then a blank language template object
is created which can be edited with *setTranslation*, *deleteTranslation* methods etc.
Plural rules are automatically detected from the language code

@@ -53,0 +50,0 @@

@@ -43,2 +43,12 @@ 'use strict';

it('Should add from a json file', function() {
var gt = new Gettext();
var jsonFile = JSON.parse(fs.readFileSync(__dirname + '/fixtures/latin13.json'));
gt.addTextdomain('et-EE', jsonFile);
expect(gt.domains.et_EE).to.exist;
expect(gt.domains.et_EE.charset).to.equal('iso-8859-13');
});
});

@@ -45,0 +55,0 @@

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