Skip to content
This repository has been archived by the owner on Jun 8, 2019. It is now read-only.

Releases: formatjs/intl-messageformat-parser

v1.5.1

01 May 17:05
Compare
Choose a tag to compare

v1.5.0

30 Apr 19:01
Compare
Choose a tag to compare

v1.4.0...v1.5.0

v1.4.0

23 Oct 12:40
v1.4.0
Compare
Choose a tag to compare

v1.3.0

27 Feb 21:46
Compare
Choose a tag to compare

This minor release adds location information to the AST nodes so it can be used in tools like https://astexplorer.net (@Turbo87 #16, #17)

v1.2.0 — Added Support for Escaping Backslashes

27 Oct 04:09
Compare
Choose a tag to compare

This minor release adds support for escaping backslashes (formatjs/intl-messageformat#109). The following example shows how a backslash can be included in the formatted message:

Choose either: one\\\\two\\\\three.

This will produce the following AST, note the four backslashes resolve to two:

{
    "type": "messageFormatPattern",
    "elements": [
        {
            "type": "messageTextElement",
            "value": "Choose either: one\\two\\three."
        }
    ]
}

v1.1.0 — Select Ordinal Support

02 Mar 18:12
Compare
Choose a tag to compare

This release adds support for parsing selectordinal argument types which are the ordinal variant of plural style arguments. The following is an example of how selectordinal arguments could be used:

The elevator is on the {floor, selectordinal,
    =0 {ground}
    one {#st}
    two {#nd}
    few {#rd}
    other {#th}
} floor.

This would produce the following AST, note the ordinal property on the pluralFormat object:

{
    "type": "messageFormatPattern",
    "elements": [
        {
            "type": "messageTextElement",
            "value": "The elevator is on the "
        },
        {
            "type": "argumentElement",
            "id": "floor",
            "format": {
                "type": "pluralFormat",
                "ordinal": true,
                "offset": 0,
                "options": [
                    {
                        "type": "optionalFormatPattern",
                        "selector": "=0",
                        "value": {
                            "type": "messageFormatPattern",
                            "elements": [
                                {
                                    "type": "messageTextElement",
                                    "value": "ground"
                                }
                            ]
                        }
                    },
                    {
                        "type": "optionalFormatPattern",
                        "selector": "one",
                        "value": {
                            "type": "messageFormatPattern",
                            "elements": [
                                {
                                    "type": "messageTextElement",
                                    "value": "#st"
                                }
                            ]
                        }
                    },
                    {
                        "type": "optionalFormatPattern",
                        "selector": "two",
                        "value": {
                            "type": "messageFormatPattern",
                            "elements": [
                                {
                                    "type": "messageTextElement",
                                    "value": "#nd"
                                }
                            ]
                        }
                    },
                    {
                        "type": "optionalFormatPattern",
                        "selector": "few",
                        "value": {
                            "type": "messageFormatPattern",
                            "elements": [
                                {
                                    "type": "messageTextElement",
                                    "value": "#rd"
                                }
                            ]
                        }
                    },
                    {
                        "type": "optionalFormatPattern",
                        "selector": "other",
                        "value": {
                            "type": "messageFormatPattern",
                            "elements": [
                                {
                                    "type": "messageTextElement",
                                    "value": "#th"
                                }
                            ]
                        }
                    }
                ]
            }
        },
        {
            "type": "messageTextElement",
            "value": " floor."
        }
    ]
}

v1.0.2 — Actually Fixed ES3 Support When Using Browserify/Webpack

23 Jan 23:28
Compare
Choose a tag to compare

This patch release actually fixes support for ES3 environments when using Browserify or Webpack to bundle intl-messageformat-parser. The previous release had .defaults in the transpiled CommonJS modules, the es6-module-transpiler has been updated to fix that, and this release contains those fixes.

See: formatjs/intl-messageformat#90

v1.0.1 — ES3 Support When Using Browserify/Webpack

14 Jan 03:47
Compare
Choose a tag to compare

This patch release fixes support for ES3 environments when using Browserify or Webpack to bundle intl-messageformat-parser.

See: formatjs/intl-messageformat#90

Initial Public Release

02 Oct 23:05
Compare
Choose a tag to compare

This is the first public release of this package!

$ npm install intl-messageformat-parser