i18next-scanner
Advanced tools
Comparing version 2.4.0 to 2.4.1
@@ -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 @@ } |
{ | ||
"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 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
74373
1059
780