From a761918e42db98b96cb04a6d1d0613a2e95f3abc Mon Sep 17 00:00:00 2001 From: Ricardo Machado Date: Tue, 5 Apr 2016 10:32:19 +0200 Subject: [PATCH] Bumps the version of the patch after fixing the message format index to support the 'one' keyword on languages with support for only the 'other' keyword --- libraries/MessageFormat/index.js | 5 +++++ package.json | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/libraries/MessageFormat/index.js b/libraries/MessageFormat/index.js index 9d366ccd..965b9cdf 100644 --- a/libraries/MessageFormat/index.js +++ b/libraries/MessageFormat/index.js @@ -883,6 +883,11 @@ MessageFormat.prototype._readPluralRules = function() { throw new TypeError('No plural rules exist for ' + this.languageTag + ' in CLDR.'); } + /** Adds support for the one cardinality when it's not available for a specific language ** HACK!! *** */ + if (!('pluralRule-count-one' in pluralRules)) { + pluralRules['pluralRule-count-one'] = pluralRules['pluralRule-count-other']; + } + for(var count in pluralRules) { var pluralRule = pluralRules[count]; var case_ = count.replace('pluralRule-count-', ''); diff --git a/package.json b/package.json index 69f0e983..7aad9dbf 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "l10ns", "description": "Internationalization workflow and formatting", - "version": "2.2.7", + "version": "2.2.8", "homepage": "https://github.com/tinganho/l10ns", "author": { "name": "Tingan Ho",