react-i18next
Advanced tools
Comparing version 1.2.0 to 1.2.1
@@ -29,4 +29,4 @@ 'use strict'; | ||
return function Wrapper(WrappedComponent) { | ||
var t = undefined, | ||
i18n = undefined; | ||
var t = void 0, | ||
i18n = void 0; | ||
@@ -33,0 +33,0 @@ var Translate = function (_Component) { |
@@ -0,10 +1,18 @@ | ||
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); | ||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } | ||
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } | ||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } | ||
import React, { Component, PropTypes, Children } from 'react'; | ||
var I18nextProvider = function (_Component) { | ||
babelHelpers.inherits(I18nextProvider, _Component); | ||
_inherits(I18nextProvider, _Component); | ||
function I18nextProvider(props, context) { | ||
babelHelpers.classCallCheck(this, I18nextProvider); | ||
_classCallCheck(this, I18nextProvider); | ||
var _this = babelHelpers.possibleConstructorReturn(this, Object.getPrototypeOf(I18nextProvider).call(this, props, context)); | ||
var _this = _possibleConstructorReturn(this, Object.getPrototypeOf(I18nextProvider).call(this, props, context)); | ||
@@ -15,3 +23,3 @@ _this.i18n = props.i18n; | ||
babelHelpers.createClass(I18nextProvider, [{ | ||
_createClass(I18nextProvider, [{ | ||
key: 'getChildContext', | ||
@@ -36,2 +44,3 @@ value: function getChildContext() { | ||
}]); | ||
return I18nextProvider; | ||
@@ -38,0 +47,0 @@ }(Component); |
@@ -0,10 +1,20 @@ | ||
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; | ||
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); | ||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } | ||
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } | ||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } | ||
import React, { Component, PropTypes } from 'react'; | ||
var Interpolate = function (_Component) { | ||
babelHelpers.inherits(Interpolate, _Component); | ||
_inherits(Interpolate, _Component); | ||
function Interpolate(props, context) { | ||
babelHelpers.classCallCheck(this, Interpolate); | ||
_classCallCheck(this, Interpolate); | ||
var _this = babelHelpers.possibleConstructorReturn(this, Object.getPrototypeOf(Interpolate).call(this, props, context)); | ||
var _this = _possibleConstructorReturn(this, Object.getPrototypeOf(Interpolate).call(this, props, context)); | ||
@@ -16,3 +26,3 @@ _this.i18n = context.i18n; | ||
babelHelpers.createClass(Interpolate, [{ | ||
_createClass(Interpolate, [{ | ||
key: 'render', | ||
@@ -25,3 +35,3 @@ value: function render() { | ||
var tOpts = babelHelpers.extends({}, this.props.options, { interpolation: { prefix: '#$?', suffix: '?$#' } }); | ||
var tOpts = _extends({}, this.props.options, { interpolation: { prefix: '#$?', suffix: '?$#' } }); | ||
var format = this.t(this.props.i18nKey, tOpts); | ||
@@ -50,2 +60,3 @@ | ||
}]); | ||
return Interpolate; | ||
@@ -52,0 +63,0 @@ }(Component); |
@@ -0,1 +1,11 @@ | ||
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; | ||
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); | ||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } | ||
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } | ||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } | ||
import React, { Component, PropTypes } from 'react'; | ||
@@ -9,12 +19,12 @@ | ||
return function Wrapper(WrappedComponent) { | ||
var t = undefined, | ||
i18n = undefined; | ||
var t = void 0, | ||
i18n = void 0; | ||
var Translate = function (_Component) { | ||
babelHelpers.inherits(Translate, _Component); | ||
_inherits(Translate, _Component); | ||
function Translate(props, context) { | ||
babelHelpers.classCallCheck(this, Translate); | ||
_classCallCheck(this, Translate); | ||
var _this = babelHelpers.possibleConstructorReturn(this, Object.getPrototypeOf(Translate).call(this, props, context)); | ||
var _this = _possibleConstructorReturn(this, Object.getPrototypeOf(Translate).call(this, props, context)); | ||
@@ -29,3 +39,3 @@ i18n = context.i18n; | ||
babelHelpers.createClass(Translate, [{ | ||
_createClass(Translate, [{ | ||
key: 'getChildContext', | ||
@@ -76,5 +86,6 @@ value: function getChildContext() { | ||
return React.createElement(WrappedComponent, babelHelpers.extends({}, this.props, { t: t, i18nLoadedAt: i18nLoadedAt })); | ||
return React.createElement(WrappedComponent, _extends({}, this.props, { t: t, i18nLoadedAt: i18nLoadedAt })); | ||
} | ||
}]); | ||
return Translate; | ||
@@ -81,0 +92,0 @@ }(Component); |
@@ -81,4 +81,4 @@ (function (global, factory) { | ||
return function Wrapper(WrappedComponent) { | ||
var t = undefined, | ||
i18n = undefined; | ||
var t = void 0, | ||
i18n = void 0; | ||
@@ -85,0 +85,0 @@ var Translate = function (_Component) { |
{ | ||
"name": "react-i18next", | ||
"version": "1.2.0", | ||
"version": "1.2.1", | ||
"description": "React integration for i18next", | ||
@@ -28,3 +28,4 @@ "main": "dist/commonjs/index.js", | ||
"babel-core": "6.5.2", | ||
"babel-eslint": "5.0.0", | ||
"babel-eslint": "6.0.0-beta.5", | ||
"babel-preset-es2015-native-modules": "^6.6.0", | ||
"babel-preset-es2015": "6.5.0", | ||
@@ -48,3 +49,3 @@ "babel-preset-es2015-rollup": "1.1.1", | ||
"copy": "cp ./dist/umd/react-i18next.min.js ./react-i18next.min.js && cp ./dist/umd/react-i18next.js ./react-i18next.js", | ||
"build:es": "BABEL_ENV=es babel src --out-dir dist/es", | ||
"build:es": "BABEL_ENV=jsnext babel src --out-dir dist/es", | ||
"build:cjs": "babel src --out-dir dist/commonjs", | ||
@@ -51,0 +52,0 @@ "build:umd": "rollup -c rollup.config.js --format umd && rollup -c rollup.config.js --format umd --uglify", |
@@ -81,4 +81,4 @@ (function (global, factory) { | ||
return function Wrapper(WrappedComponent) { | ||
var t = undefined, | ||
i18n = undefined; | ||
var t = void 0, | ||
i18n = void 0; | ||
@@ -85,0 +85,0 @@ var Translate = function (_Component) { |
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
58388
964
0
18