Repository navigation
fix: reject unsupported plural rules - #10
Conversation
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5e3e626fca
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if !has_plural_rule_for_language(tag) { | ||
| return error('no plural rule registered for ${tag.str()}') |
There was a problem hiding this comment.
Validate the default language during construction
Because this validation runs only in add_messages, new_bundle('ru') still succeeds and registers ru as the default even though the resulting bundle cannot load messages for its own default language; a pluralized default_message also fails only later during localization. Apply the same plural-rule check in new_bundle so unsupported defaults are rejected before an unusable bundle is returned.
Useful? React with 👍 / 👎.
Description
Rejects unsupported plural rules.
Checklist
v test .is fully green