]> git.ipfire.org Git - thirdparty/babel.git/commitdiff
Fix typo and add semicolon in plural_forms
authorLukas B <lukas-b@users.noreply.github.com>
Tue, 4 Nov 2014 23:49:28 +0000 (15:49 -0800)
committerAarni Koskela <akx@iki.fi>
Wed, 30 Dec 2015 14:30:04 +0000 (16:30 +0200)
Fix typo and add semicolon in plural_forms (missing l in 'plural' and semicolon at the end).

It currently produces incorrect plural form string.

babel/messages/plurals.py

index 05f91102b01b641cb927361864d0349af7600630..cc7b79e3e44018a91c3a47c4e1ba243a52e65208 100644 (file)
@@ -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):
@@ -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: