Socket
Socket
Sign inDemoInstall

i18next-scanner

Package Overview
Dependencies
Maintainers
1
Versions
92
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

i18next-scanner - npm Package Compare versions

Comparing version 2.4.0 to 2.4.1

10

lib/parser.js

@@ -74,2 +74,4 @@ 'use strict';

defaultLng: 'en', // default language used for checking default values
defaultNs: 'translation', // default namespace used if not passed to translation function

@@ -708,2 +710,3 @@

pluralSeparator = _options2.pluralSeparator,
defaultLng = _options2.defaultLng,
defaultValue = _options2.defaultValue;

@@ -809,6 +812,5 @@

resLoad[resKey] = options.defaultValue;
} else if (resLoad[resKey] !== options.defaultValue) {
// We already had a different default.
var k = _chalk2.default.yellow(JSON.stringify(resKey));
_this3.log('i18next-scanner: Translation key ' + k + ' has multiple different default values. Using first default');
} else if (resLoad[resKey] !== options.defaultValue && lng === defaultLng) {
// A default value has provided but it's different with the expected default
_this3.log('i18next-scanner: The translation key ' + _chalk2.default.yellow(JSON.stringify(resKey)) + ' has a different default value, you may need to check the translation key of default language (' + defaultLng + ')');
}

@@ -815,0 +817,0 @@ }

2

package.json
{
"name": "i18next-scanner",
"version": "2.4.0",
"version": "2.4.1",
"description": "Scan your code, extract translation keys/values, and merge them into i18n resource files.",

@@ -5,0 +5,0 @@ "homepage": "https://github.com/i18next/i18next-scanner",

@@ -124,2 +124,3 @@ # i18next-scanner [![build status](https://travis-ci.org/i18next/i18next-scanner.svg?branch=master)](https://travis-ci.org/i18next/i18next-scanner) [![Coverage Status](https://coveralls.io/repos/i18next/i18next-scanner/badge.svg?branch=master&service=github)](https://coveralls.io/github/i18next/i18next-scanner?branch=master)

],
defaultLng: 'en',
defaultNs: 'resource',

@@ -502,2 +503,3 @@ defaultValue: '__STRING_NOT_TRANSLATED__',

ns: ['translation'],
defaultLng: 'en',
defaultNs: 'translation',

@@ -625,2 +627,8 @@ defaultValue: '',

#### defaultLng
Type: `String` Default: `'en'`
The default language used for checking default values.
#### defaultNs

@@ -627,0 +635,0 @@

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