Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for new CLDR plural operands e and c. #143

Merged
merged 1 commit into from
May 18, 2021

Conversation

devversion
Copy link
Contributor

The cldr package currently comes with CLDR 39 but the actual
plural expressions cannot be properly extracted/generated.

For example, the french plural uses the new e operand, but
the parser does not know about such. This commit adds support
for the new operands.

@papandreou When you get a chance, I'd appreciate your review on this. As mentioned,
currently extracting the plurals from CLDR 39 is not working in all cases. e.g.

(node:19684) UnhandledPromiseRejectionWarning: SyntaxError: Expected " not ", "f", "i", "n", "t", "v", "w", [0-9], or [\-+] but "e" found.
    at peg$buildStructuredError (eval at compile (C:\users\paul\_bazel_paul\gsqtgr5s\execroot\angular\node_modules\pegjs\lib\compiler\index.js:67:29), <anonymous>:343:14)
    at Object.peg$parse [as parse] (eval at compile (C:\users\paul\_bazel_paul\gsqtgr5s\execroot\angular\node_modules\pegjs\lib\compiler\index.js:67:29), <anonymous>:1164:13)
    at new CldrPluralRule (C:\users\paul\_bazel_paul\gsqtgr5s\execroot\angular\node_modules\cldr\lib\CldrPluralRule.js:209:30)
    at CldrPluralRuleSet.addRule (C:\users\paul\_bazel_paul\gsqtgr5s\execroot\angular\node_modules\cldr\lib\CldrPluralRuleSet.js:20:24)

The `cldr` package currently comes with CLDR 39 but the actual
plural expressions cannot be properly extracted/generated.

For example, the french plural uses the new `e` operand, but
the parser does not know about such. This commit adds support
for the new operands.
@coveralls
Copy link

Coverage Status

Coverage remained the same at 76.008% when pulling c0305d1 on devversion:master into f3c9fd4 on papandreou:master.

@papandreou papandreou merged commit c0305d1 into papandreou:master May 18, 2021
@papandreou
Copy link
Owner

Thanks for looking into this and for providing a high quality PR 💪

Released the fix in 6.1.1

@devversion
Copy link
Contributor Author

Thanks for the quick review and release!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants