Report extra PO plural forms without changing parse - #1324
Conversation
read_po dropped msgstr[N] entries past nplurals, so the num_plurals checker always saw a matching count on parsed catalogs.
|
This would change how Babel has parsed files for a decade. #1323 didn't yet include analysis as to what to do about the issue, just that it exists. |
|
Fair point — dropping extra I went this way because |
Keep the historical read_po truncation of msgstr[N] past nplurals, but count those dropped entries so num_plurals() can still report them. Co-authored-by: Cursor <cursoragent@cursor.com>
|
Pushed a follow-up that keeps the historical parse.
|
Fixes #1323.
read_postill dropsmsgstr[N]entries whereN >= npluralsand padsmessage.stringtocatalog.num_plurals, same as it has for a decade. Extra forms are counted onmessage.discarded_plural_formssonum_plurals()can fail on a parsed catalog instead of always seeing a matching length.