diff options
author | Anas Nashif <anas.nashif@intel.com> | 2012-11-07 07:29:36 -0800 |
---|---|---|
committer | Chanho Park <chanho61.park@samsung.com> | 2014-08-19 19:37:01 +0900 |
commit | 62eced0da4cad6f42ea6eb77442c0d78f6249b8d (patch) | |
tree | fa31e6a18ca5dc89ee7255e099f07eae018d29a2 | |
parent | 4147c67419897d6cc2bf4a549a8d35bfd50b357d (diff) | |
download | python-62eced0da4cad6f42ea6eb77442c0d78f6249b8d.tar.gz python-62eced0da4cad6f42ea6eb77442c0d78f6249b8d.tar.bz2 python-62eced0da4cad6f42ea6eb77442c0d78f6249b8d.zip |
python-2.6-gettext-plurals
===================================================================
-rw-r--r-- | Lib/gettext.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Lib/gettext.py b/Lib/gettext.py index 3f47580..146b19a 100644 --- a/Lib/gettext.py +++ b/Lib/gettext.py @@ -311,8 +311,9 @@ class GNUTranslations(NullTranslations): self._charset = v.split('charset=')[1] elif k == 'plural-forms': v = v.split(';') - plural = v[1].split('plural=')[1] - self.plural = c2py(plural) + if len(v) > 1: + plural = v[1].split('plural=')[1] + self.plural = c2py(plural) # Note: we unconditionally convert both msgids and msgstrs to # Unicode using the character encoding specified in the charset # parameter of the Content-Type header. The gettext documentation |