intl-messageformat
Advanced tools
Comparing version 7.3.3 to 7.5.0
@@ -6,2 +6,24 @@ # Change Log | ||
# [7.5.0](https://github.com/formatjs/formatjs/compare/intl-messageformat@7.3.3...intl-messageformat@7.5.0) (2019-10-30) | ||
### Features | ||
* **@formatjs/cli:** A CLI for formatjs ([#234](https://github.com/formatjs/formatjs/issues/234)) ([1f57a0b](https://github.com/formatjs/formatjs/commit/1f57a0b0921e0228cf3fd4eff756b0cd17e28fb5)) | ||
# [7.4.0](https://github.com/formatjs/formatjs/compare/intl-messageformat@7.3.3...intl-messageformat@7.4.0) (2019-10-30) | ||
### Features | ||
* **@formatjs/cli:** A CLI for formatjs ([#234](https://github.com/formatjs/formatjs/issues/234)) ([1f57a0b](https://github.com/formatjs/formatjs/commit/1f57a0b0921e0228cf3fd4eff756b0cd17e28fb5)) | ||
## [7.3.3](https://github.com/formatjs/formatjs/compare/intl-messageformat@7.3.2...intl-messageformat@7.3.3) (2019-10-23) | ||
@@ -8,0 +30,0 @@ |
{ | ||
"name": "intl-messageformat", | ||
"version": "7.3.3", | ||
"version": "7.5.0", | ||
"description": "Formats ICU Message strings with number, date, plural, and select placeholders to create localized messages.", | ||
@@ -34,3 +34,3 @@ "keywords": [ | ||
"dependencies": { | ||
"intl-format-cache": "^4.2.3", | ||
"intl-format-cache": "^4.2.5", | ||
"intl-messageformat-parser": "^3.2.2" | ||
@@ -57,3 +57,3 @@ }, | ||
"license": "BSD-3-Clause", | ||
"gitHead": "cd9ad1f8d260e314b6cdb380a91ce58969b62f97" | ||
"gitHead": "eebc5905d87538092ef0227e3f612263b51b37ae" | ||
} |
@@ -59,7 +59,13 @@ # Intl MessageFormat | ||
const enNumPhotos = new IntlMessageFormat(MESSAGES['en-US'].NUM_PHOTOS, 'en-US'); | ||
const enNumPhotos = new IntlMessageFormat( | ||
MESSAGES['en-US'].NUM_PHOTOS, | ||
'en-US' | ||
); | ||
output = enNumPhotos.format({numPhotos: 1000}); | ||
console.log(output); // => "You have 1,000 photos." | ||
const esNumPhotos = new IntlMessageFormat(MESSAGES['es-MX'].NUM_PHOTOS, 'es-MX'); | ||
const esNumPhotos = new IntlMessageFormat( | ||
MESSAGES['es-MX'].NUM_PHOTOS, | ||
'es-MX' | ||
); | ||
output = esNumPhotos.format({numPhotos: 1000}); | ||
@@ -192,10 +198,14 @@ console.log(output); // => "Usted tiene 1,000 fotos." | ||
```tsx | ||
const msg = new IntlMessageFormat('The price is: {price, number, USD}', 'en-US', { | ||
number: { | ||
USD: { | ||
style: 'currency', | ||
currency: 'USD', | ||
const msg = new IntlMessageFormat( | ||
'The price is: {price, number, USD}', | ||
'en-US', | ||
{ | ||
number: { | ||
USD: { | ||
style: 'currency', | ||
currency: 'USD', | ||
}, | ||
}, | ||
}, | ||
}); | ||
} | ||
); | ||
@@ -202,0 +212,0 @@ const output = msg.format({price: 100}); |
Sorry, the diff of this file is too big to display
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
626793
318
23
5010
Updatedintl-format-cache@^4.2.5