Skip to content

Commit

Permalink
Fix typo and add semicolon in plural_forms
Browse files Browse the repository at this point in the history
Fix typo and add semicolon in plural_forms (missing l in 'plural' and semicolon at the end).

It currently produces incorrect plural form string.
  • Loading branch information
Lukas-B authored and akx committed Dec 30, 2015
1 parent 1ba3908 commit 5784501
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions babel/messages/plurals.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ class _PluralTuple(tuple):
The number of plurals used by the locale.""")
plural_expr = property(itemgetter(1), doc="""
The plural expression used by the locale.""")
plural_forms = property(lambda x: 'npurals=%s; plural=%s' % x, doc="""
plural_forms = property(lambda x: 'nplurals=%s; plural=%s;' % x, doc="""
The plural expression used by the catalog or locale.""")

def __str__(self):
Expand All @@ -233,13 +233,13 @@ def get_plural(locale=LC_CTYPE):
>>> tup.plural_expr
'0'
>>> tup.plural_forms
'npurals=1; plural=0'
'nplurals=1; plural=0;'
Converting the tuple into a string prints the plural forms for a
gettext catalog:
>>> str(tup)
'npurals=1; plural=0'
'nplurals=1; plural=0;'
"""
locale = Locale.parse(locale)
try:
Expand Down

1 comment on commit 5784501

@sils
Copy link
Member

@sils sils commented on 5784501 Dec 30, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ack

Please sign in to comment.