We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5f56dd6 commit c8ae54eCopy full SHA for c8ae54e
Lib/gettext.py
@@ -417,8 +417,10 @@ def _parse(self, fp):
417
v = v.split(';')
418
try:
419
plural = v[1].split('plural=')[1]
420
- except IndexError as e:
421
- raise ValueError('invalid plural forms syntax') from e
+ except IndexError:
+ raise ValueError(
422
+ f"invalid plural forms syntax in '{filename}': '{v}'. Expected ';' and 'plural='."
423
+ ) from None
424
self.plural = c2py(plural)
425
# Note: we unconditionally convert both msgids and msgstrs to
426
# Unicode using the character encoding specified in the charset
0 commit comments