react-localize-redux
Advanced tools
Comparing version 2.13.2 to 2.13.4
@@ -110,7 +110,2 @@ (function webpackUniversalModuleDefinition(root, factory) { | ||
*/ | ||
/** | ||
* TYPES | ||
*/ | ||
var INITIALIZE = exports.INITIALIZE = '@@localize/INITIALIZE'; | ||
@@ -134,6 +129,6 @@ var ADD_TRANSLATION = exports.ADD_TRANSLATION = '@@localize/ADD_TRANSLATION'; | ||
var _options = action.payload.options || {}; | ||
var _activeLanguage = action.payload.activeLanguage || _options.defaultLanguage; | ||
var activeLanguage = action.payload.activeLanguage || _options.defaultLanguage; | ||
return action.payload.languages.map(function (language, index) { | ||
var isActive = function isActive(code) { | ||
return _activeLanguage !== undefined ? code === _activeLanguage : index === 0; | ||
return activeLanguage !== undefined ? code === activeLanguage : index === 0; | ||
}; | ||
@@ -140,0 +135,0 @@ // check if it's using array of Language objects, or array of languge codes |
@@ -61,3 +61,3 @@ import { ReactElement } from 'react'; | ||
export type Translate = (value: TranslateValue, data: TranslatePlaceholderData, options?: Options) => LocalizedElement|LocalizedElementMap; | ||
export type Translate = (value: TranslateValue, data?: TranslatePlaceholderData, options?: Options) => LocalizedElement|LocalizedElementMap; | ||
@@ -64,0 +64,0 @@ type InitializePayload = { |
@@ -0,6 +1,8 @@ | ||
export { localize } from './containers/Localize'; | ||
/** | ||
* TYPES | ||
*/ | ||
export { localize } from './containers/Localize'; | ||
export { localeReducer, initialize, addTranslation, addTranslationForLanguage, setLanguages, setActiveLanguage, getTranslate, getActiveLanguage, getLanguages, getTranslations, getOptions } from './modules/locale'; |
@@ -10,7 +10,3 @@ 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; }; | ||
/** | ||
* TYPES | ||
*/ | ||
/** | ||
@@ -37,6 +33,6 @@ * ACTIONS | ||
var _options = action.payload.options || {}; | ||
var _activeLanguage = action.payload.activeLanguage || _options.defaultLanguage; | ||
var activeLanguage = action.payload.activeLanguage || _options.defaultLanguage; | ||
return action.payload.languages.map(function (language, index) { | ||
var isActive = function isActive(code) { | ||
return _activeLanguage !== undefined ? code === _activeLanguage : index === 0; | ||
return activeLanguage !== undefined ? code === activeLanguage : index === 0; | ||
}; | ||
@@ -43,0 +39,0 @@ // check if it's using array of Language objects, or array of languge codes |
@@ -61,3 +61,3 @@ import { ReactElement } from 'react'; | ||
export type Translate = (value: TranslateValue, data: TranslatePlaceholderData, options?: Options) => LocalizedElement|LocalizedElementMap; | ||
export type Translate = (value: TranslateValue, data?: TranslatePlaceholderData, options?: Options) => LocalizedElement|LocalizedElementMap; | ||
@@ -64,0 +64,0 @@ type InitializePayload = { |
@@ -27,7 +27,2 @@ 'use strict'; | ||
*/ | ||
/** | ||
* TYPES | ||
*/ | ||
var INITIALIZE = exports.INITIALIZE = '@@localize/INITIALIZE'; | ||
@@ -51,6 +46,6 @@ var ADD_TRANSLATION = exports.ADD_TRANSLATION = '@@localize/ADD_TRANSLATION'; | ||
var _options = action.payload.options || {}; | ||
var _activeLanguage = action.payload.activeLanguage || _options.defaultLanguage; | ||
var activeLanguage = action.payload.activeLanguage || _options.defaultLanguage; | ||
return action.payload.languages.map(function (language, index) { | ||
var isActive = function isActive(code) { | ||
return _activeLanguage !== undefined ? code === _activeLanguage : index === 0; | ||
return activeLanguage !== undefined ? code === activeLanguage : index === 0; | ||
}; | ||
@@ -57,0 +52,0 @@ // check if it's using array of Language objects, or array of languge codes |
{ | ||
"name": "react-localize-redux", | ||
"version": "2.13.2", | ||
"version": "2.13.4", | ||
"description": "Localization library for React/Redux", | ||
@@ -5,0 +5,0 @@ "main": "./lib/index.js", |
@@ -27,2 +27,3 @@ <p align="center"> | ||
- [Features](https://ryandrewjohnson.github.io/react-localize-redux/features/) | ||
- [FAQ](https://ryandrewjohnson.github.io/react-localize-redux/faq/) | ||
- API | ||
@@ -29,0 +30,0 @@ - [Action Creators](https://ryandrewjohnson.github.io/react-localize-redux/api/action-creators/) |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
112049
46
1539