2019-04-09 00:40:36 +02:00
|
|
|
--- a/Lib/gettext.py
|
2013-06-03 12:24:54 +02:00
|
|
|
+++ b/Lib/gettext.py
|
2019-04-09 00:40:36 +02:00
|
|
|
@@ -387,8 +387,9 @@ class GNUTranslations(NullTranslations):
|
2009-01-19 02:18:37 +01:00
|
|
|
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
|