diff options
| author | Matthew Wilkes <git@matthewwilkes.name> | 2013-12-10 20:29:28 +0000 |
|---|---|---|
| committer | Matthew Wilkes <git@matthewwilkes.name> | 2013-12-10 20:29:28 +0000 |
| commit | 5431138583ee9d4382c1fe6dd0fb706ed514a4bf (patch) | |
| tree | 7f859461320cf288eb283e5e6942b43f03232afd /docs/narr/i18n.rst | |
| parent | 5c4318abe647b65869ac6dbb5b57cf1088712061 (diff) | |
| download | pyramid-5431138583ee9d4382c1fe6dd0fb706ed514a4bf.tar.gz pyramid-5431138583ee9d4382c1fe6dd0fb706ed514a4bf.tar.bz2 pyramid-5431138583ee9d4382c1fe6dd0fb706ed514a4bf.zip | |
Use new pluralize calling convention recognised by Lingua 1.7
Diffstat (limited to 'docs/narr/i18n.rst')
| -rw-r--r-- | docs/narr/i18n.rst | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/docs/narr/i18n.rst b/docs/narr/i18n.rst index c9b782c08..5f50ca212 100644 --- a/docs/narr/i18n.rst +++ b/docs/narr/i18n.rst @@ -607,10 +607,8 @@ object, but the domain and mapping information attached is ignored. def aview(request): localizer = request.localizer num = 1 - translated = localizer.pluralize( - _('item_plural', default="${number} items"), - None, num, 'mydomain', mapping={'number':num} - ) + translated = localizer.pluralize('item_plural', '${number} items', + num, 'mydomain', mapping={'number':num}) The corresponding message catalog must have language plural definitions and plural alternatives set. |
