Skip to content

Releases: formatjs/dust-intl

v1.1.0 — Updated Locale Data, Fixed HTML Escaping

23 Mar 22:04
Compare
Choose a tag to compare

This feature release has updated locale data to fix zh-Hant plus adds support for new locales, fixes HTML escaping of helpers' output, adds select-ordinal argument support to messages, and allows a "now" date to be specified in {@formatRelative}.

Updated Locale Data

This release has vastly improved locale data in the following ways:

  • Added locale data for all leaf locales which differ from their root locale's data; e.g. "zh-Hant-TW" is not the same as "zh".
  • Properly de-duplicate data for all CLDR locales by correctly traversing a locale's hierarchy of ancestor locales.
  • Added data for the following languages:
    aa, agq, bas, bh, ckb, dav, dje, dsb, dua, dv, dyo, ebu, ewo, guw, guz, hsb, ia, in, iu, iw, jbo, ji, jv, jw, kaj, kam, kcg, khq, ki, kln, kok, ksf, ku, lb, lu, luo, luy, mer, mfe, mgh, mo, mua, nah, nmg, no, nqo, nus, ny, pap, prg, qu, rn, rw, sbp, sh, sma, smi, smj, smn, sms, swc, syr, tk, tl, twq, vai, wa, wo, yav, yi, zgh

Fixed HTML Escaping

Now each helper forces HTML escaping of its output to ensure greater safety against XSS attacks. (#50)

Added selectordinal Support for Messages

This release adds support for selectordinal arguments in messages, which are just like plural arguments, expect the ordinal pluralization rules are used; e.g., to display which birthday your about to have:

It's my {year, selectordinal,
    one {#st}
    two {#nd}
    few {#rd}
    other{#th}
} birthday!

Added now Option to {@formatRelative} Helper

Added support for specifying the "now" value from which relative time is computed. This change adds a new now hash option to the {@formatRelative} helper which will pass along that value to IntlRelativeFormat#format() method.


Other changes include:

  • Improved source maps.
  • Added Browserify tests to CI config.
  • Removed official Bower support because bower.json wasn't kept up to date.

Checkout the full set of changes since the last release for more details.

v1.0.1 — Support for Browserify/Webpack

12 Dec 07:19
Compare
Choose a tag to compare

This patch release improves support for using Browserify or Webpack to bundle dust-intl. Since the context of these tools is to bundle for the browser, this release will only include the English locale data in the bundle by default. (Previously the data for all locales would be included when bundling with Browserify or Webpack.)

When you need to support another locale in your app and you're using Browserify or Webpack, we recommend the following approach:

// app.js
var DustIntl = window.DustIntl = require('dust-intl');
// ...
<script src="/app.bundle.js"></script>
<script src="/dust-intl/dist/locale-data/fr.js"></script>

This will expose DustIntl as a global object in the browser, allowing you to load the script for the locale data you need for the page or current request.

Source Maps Improvements

This release also includes improvements to source maps, making debugging easier.

Dust Intl 1.0

10 Oct 22:26
Compare
Choose a tag to compare

This package has undergone tons of development since the initial public release, and is now really ready for prime time!

More detailed release notes will be added soon…

bugfix to work with latest `intl-messageformat` package

07 Aug 18:02
Compare
Choose a tag to compare
  • update docs to reflect the string nature of the values passed into the helpers for dates
  • update deps and align tests to function with the latest version of intl-messageformat

ready for prime

16 May 15:55
Compare
Choose a tag to compare
  • bower ready
  • npm ready
  • license
  • examples
  • tests

Thanks to @fhemberger for the contributions on this release.

version 0.0.2

07 May 15:17
Compare
Choose a tag to compare
  • updated README with usage examples (taken from the unit tests)
  • added dependency to intl-messageformat
  • uses native global Intl object, or falls back to IntlPolyfill (which can be provided by the intl NPM package)

version 0.0.1

13 Feb 23:21
Compare
Choose a tag to compare

This is the initial release of dust-helper-intl.