Skip to content

Commit

Permalink
Merge a7e5aec into 50c994e
Browse files Browse the repository at this point in the history
  • Loading branch information
emiljanitzek committed Jan 12, 2019
2 parents 50c994e + a7e5aec commit a37f81c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -746,7 +746,7 @@ __n('dogs', 20) // --> too many dogs
__n('dogs', 199) // --> too many dogs
// no interval returned, but found a catchall
__('dogs') // --> too many dogs
__n('dogs') // --> too many dogs
```

See [en.json example](https://github.com/mashpie/i18n-node/blob/master/locales/en.json) inside `/locales` for some inspiration on use cases. Each phrase might get decorated further with mustache and sprintf expressions:
Expand Down
2 changes: 1 addition & 1 deletion i18n.js
Expand Up @@ -529,7 +529,7 @@ module.exports = (function() {
var postProcess = function(msg, namedValues, args, count) {

// test for parsable interval string
if ((/\|/).test(msg)) {
if ((/\|/).test(msg) && (typeof count !== 'undefined')) {
msg = parsePluralInterval(msg, count);
}

Expand Down

0 comments on commit a37f81c

Please sign in to comment.