From: Lukas B Date: Tue, 4 Nov 2014 23:49:28 +0000 (-0800) Subject: Fix typo and add semicolon in plural_forms X-Git-Tag: 2.2.0~3^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5784501a7584438f83756f260d912b777585ab48;p=thirdparty%2Fbabel.git Fix typo and add semicolon in plural_forms Fix typo and add semicolon in plural_forms (missing l in 'plural' and semicolon at the end). It currently produces incorrect plural form string. --- diff --git a/babel/messages/plurals.py b/babel/messages/plurals.py index 05f91102..cc7b79e3 100644 --- a/babel/messages/plurals.py +++ b/babel/messages/plurals.py @@ -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: