Skip to content

Commit

Permalink
Cleanup plural forms
Browse files Browse the repository at this point in the history
  • Loading branch information
zakkudo committed Sep 24, 2018
1 parent b40f930 commit 2f3416c
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 17 deletions.
4 changes: 2 additions & 2 deletions src/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ Where `locales/fr.json` will look like this for use by your translators:
},
"There is one user": {
// src/pages/AboutPage/index.js:40
"default": {"one":"French translation", "other":"French translation"},
"default": {"0":"French translation", "1":"French translation"},
},
"Welcome to the about page!": {
// src/pages/AboutPage/index.js:38
Expand All @@ -115,7 +115,7 @@ And the optimized `src/.locales/fr.json` will look like this for use by your dev
"default": "French translation",
"menuitem": "French translation"
},
"There is one user": {"one":"French translation", "other":"French translation"},
"There is one user": {"0":"French translation", "1":"French translation"},
"Welcome to the about page!": "French translation"
}
```
Expand Down
4 changes: 2 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,14 @@ function __p(context, key) {
* @private
*/
function __n(singular) {
return [toKeyWithContext(singular), {one: "", other: ""}];
return [toKeyWithContext(singular), {"1": "", "2": ""}];
}

/**
* @private
*/
function __np(context, singular) {
return [toKeyWithContext(singular, context), {one: "", other: ""}];
return [toKeyWithContext(singular, context), {"1": "", "2": ""}];
}

/**
Expand Down

0 comments on commit 2f3416c

Please sign in to comment.