Skip to content

Commit

Permalink
Bumps the version of the patch after fixing the message format index …
Browse files Browse the repository at this point in the history
…to support the 'one' keyword on languages with support for only the 'other' keyword
  • Loading branch information
Ricardo Machado committed Apr 5, 2016
1 parent 6035a74 commit a761918
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions libraries/MessageFormat/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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-', '');
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down

0 comments on commit a761918

Please sign in to comment.