react-intl-universal
Advanced tools
Comparing version 1.3.4 to 1.4.0
@@ -115,3 +115,3 @@ /* | ||
} | ||
var msg = locales[currentLocale][key]; | ||
var msg = this.getDescendantProp(locales[currentLocale], key); | ||
if (msg == null) { | ||
@@ -297,2 +297,9 @@ console.warn("react-intl-universal key \"" + key + "\" not defined in " + currentLocale); | ||
}, { | ||
key: "getDescendantProp", | ||
value: function getDescendantProp(locale, key) { | ||
return key.split('.').reduce(function (a, b) { | ||
return a[b]; | ||
}, locale); | ||
} | ||
}, { | ||
key: "getLocaleFromBrowser", | ||
@@ -299,0 +306,0 @@ value: function getLocaleFromBrowser() { |
{ | ||
"name": "react-intl-universal", | ||
"version": "1.3.4", | ||
"version": "1.4.0", | ||
"description": "Internationalize React apps. Not only for React.Component but also for Vanilla JS.", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -345,10 +345,10 @@ # react-intl-universal | ||
Before using [react-intl-universal](https://www.npmjs.com/package/react-intl-universal), you need to include scripts below to support IE. | ||
```html | ||
Before using [react-intl-universal](https://www.npmjs.com/package/react-intl-universal), you need to include scripts below in HTML to support older browser. | ||
``` | ||
<!--[if lt IE 9]> | ||
<script src="//f.alicdn.com/es5-shim/4.5.7/es5-shim.min.js"></script> | ||
<![endif]--> | ||
<!--[if IE]> | ||
<script src="//f.alicdn.com/es6-shim/0.35.1/es6-shim.min.js"></script> | ||
<![endif]--> | ||
<scirpt> | ||
if(typeof Promise!=="function"){document.write('<script src="//f.alicdn.com/es6-shim/0.35.1/??es6-shim.min.js,es6-sham.min.js"><\/script>')} | ||
</script> | ||
``` | ||
@@ -355,0 +355,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
28568
272