UNPKG

6.5 kBMarkdownView Raw
1### v2.4.2: August 16, 2021
2 * [Fix] Handle null and undefined gracefully in extend and unset (#161)
3
4### v2.4.1: August 16, 2021
5 * [Fix] French starts plural at 2 (#154)
6 * [Refactor] Replace `for-each` with `object.entries` and `array.prototype.foreach` (#127)
7 * [Performance] Add plural type name memoization (#158)
8 * [Deps] Update `string.prototype.trim` (#127)
9 * [Dev Deps] update `chai`, `safe-publish-latest`, `eslint`, `eslint-plugin-import` (#127)
10
11### v2.4.0: September 10, 2019
12 * [New] add ability to configure pluralization rules (#138)
13
14### v2.3.1: June 20, 2019
15 * [Fix] fix plurals for Russian with n > 100 (#119)
16 * [Performance] Remove unnecessary dollar signs replacement (#132)
17 * [Docs] fix typo in the Czech example (#123)
18 * [Deps] update `warning`
19 * [Dev Deps] update `chai`, `eslint`, `eslint-config-airbnb-base`, `eslint-plugin-import`, `safe-publish-latest`, `uglify-js`
20 * [Tests] on `node` `v12`, `v11`, `v10`
21
22### v2.3.0: July 2, 2018
23 * [New] add ability to change interpolation regex by specifying prefix and suffix (#106, #64)
24 * [New] support for Serbian (Latin & Cyrillic), Bosnian (Latin & Cyrillic), Czech (#113)
25 * [Fix] Moved lt to it's own group (#101)
26 * [Fix] Moved tr from chinese to german group (#100)
27 * [Fix] Move persian(fa) language to german group of pluralization (#86)
28 * [Fix] Remove long-since-updated build files
29 * [Fix] fix russian pluralization; add tests (#115)
30 * [Fix] croatian is not russian (#114)
31 * [Clarity] add more specific locales, even though language codes will match them (#115)
32 * [Docs] document constructor options (#84)
33 * [Docs] document all instance and static methods (#83)
34 * [Docs] fix spelling of "delimiter" (#91)
35 * [Docs] `onMissingKey` can (rather, should) return a value (#95)
36 * [Docs] fix instructions to only recommend use with npm (#96)
37 * [Docs] Added documentation for method has (#104)
38 * [Docs] add example for languages with multiple plurals (#108)
39 * [Docs] remove outdated sentence (#112, #110)
40 * [Deps] update `for-each`, `has`, `warning`
41 * [Dev Deps] update `chai`, `eslint`, `eslint-config-airbnb-base`, `eslint-plugin-import`, `mocha`; remove `should`
42 * [Tests] up to `node` `v10`; use `nvm install-latest-npm` to ensure new npm doesn’t break old node; improve matrix
43
44### v2.2.2: January 5, 2017
45 * [Fix] revert unintentional breaking change of missing substitutions being untouched
46 * [Dev Deps] update `eslint`, `eslint-config-airbnb-base`, `mocha`, `should`; add `safe-publish-latest`
47
48### v2.2.1: November 18, 2016
49 * [Fix] restore behavior of explicit null/undefined not touching the substitution
50
51### v2.2.0: November 14, 2016
52 * [New] add `onMissingKey` constructor option - this can call `.transformPhrase`, or return `false`, or `undefined`, or throw - whatever you like (#34, #77)
53 * [Dev Deps] update `eslint`
54
55### v2.1.3: January 5, 2017
56 * [Fix] revert unintentional breaking change of missing substitutions being untouched
57
58### v2.1.2: November 18, 2016
59 * [Fix] restore behavior of explicit null/undefined not touching the substitution
60
61### v2.1.1: November 13, 2016
62 * [Fix] ensure that missing or null substitutions don’t crash (#79)
63
64### v2.1.0: November 11, 2016
65 * [New] Merge choosePluralForm & interpolate into one exported function: `transformPhrase` (#75)
66 * [New] Allow locales to have regions (#70)
67 * [New] Support Arabic pluralization (#71)
68 * [New] Added Lithuanian locale to russian group of pluralization (#68)
69 * [Deps] update `object.assign`, `warning`
70 * [Dev Deps] pin `uglify-js` because it does not follow semver
71 * [Dev Deps] update `eslint-config-airbnb-base`, `eslint`, `eslint-plugin-import`, `mocha`, `should`, `uglify-js`
72 * [Performance] instead of creating a new regex for each token, use the function form of `replace` (#19)
73 * [Refactor] use `warning` package for warnings
74 * [Robustness] Use `has` package to properly check “has own property”
75 * [Robustness] use `string.prototype.trim` rather than a homegrown trim polyfill
76 * [Tests] only test on latest `node` `v7`, `v6`, `v5`, `v4`, and `iojs`; improve test matrix
77 * [Tests] add linting
78
79### v2.0.0: April 6, 2016
80 * [Breaking] Remove non-node support + use object.assign/for-each.
81 * [New] Add Slovak language to the Czech pluralization group
82 * [Fix] fix`warn` messages in `node`, where `this` is not the global object
83 * [Tests] up to `node` `v5.10`, `v4.4`
84 * [Tests] decaffeinate tests
85
86### v1.0.0: November 29, 2015
87 * [Tests] up to `node` `v5.1`
88 * [Tests] fix npm upgrades on older nodes
89 * [Dev Deps] update `uglify-js`, `docco`, `should`, `mocha`, and fix test pollution
90
91### v0.4.5: November 29, 2015
92 * [Fix] Ensure that dollar signs are properly escaped in substitutions (#43)
93 * [Docs] use SPDX-compliant license string (#44)
94
95### v0.4.4: October 26, 2015
96 * [New] Add `unset` method (#43)
97 * [Tests] test on travis-ci
98
99### v0.4.3: June 26, 2015
100 * Add `.has(key)` method (thanks @scarfacedeb).
101 * Add UMD wrapper for AMD support (thanks @TomOne).
102
103### v0.4.2: March 13, 2015
104 * Allow blank translations.
105
106### v0.4.1: July 14, 2014
107 * Added support for `warn` option for custom error handler (thanks @terinjokes).
108 * Added some more plural forms (thanks @jgill333).
109
110### v0.4.0: May 22, 2014
111 * Added support for nested phrase objects to `extend()` and in the `phrases` option in the constructor.
112
113### v0.3.0: August 6, 2013
114 * _Breaking change_: Removed `pluralize()` method; instead, just use the `t()` method, passing in a `smart_count` option.
115 * _Breaking change_: Removed the ability to use `Array`, `Backbone.Collection`, etc. instances for the `smart_count` option; instead, must pass a `Number`.
116 * Allow passing `Number` as second argument to `t()`, which gets converted to the options object `{smart_count: <my number>}`.
117
118### v0.2.1: May 2, 2013
119 * Added `allowMissing` option to let the phrase key be the default translation (thanks @ziad-saab).
120
121### v0.2.0: Dec 20, 2012
122 * _Breaking change_: Moved from Singleton pattern to class-based. Now you create an instance of the `Polyglot` class rather than using class methods directly on it. The reason is to allow maintaining multiple sets of phrases, which is something we ran into at Airbnb with a highly-concurrent Express app.
123 * _Breaking change_: Removed the built-in Handlebars helpers, because Handlebars is a singleton, and it's messy to create a single helper function that can be bound to different Polyglot instances. Instead, it's super easy to create your own, based on your requirements.