Repository navigation
Register Macedonian plural rule under mk and fix 111, 211, ... - #538
Open
vtxe02023274 wants to merge 1 commit into
Open
vtxe02023274 wants to merge 1 commit into
vtxe02023274 wants to merge 1 commit into
Conversation
Macedonian was registered under "mb", which is not an ISO 639-1 code, so plural formatting with mk or mk-MK cultures threw "IsoLangToDelegate not found for mk". The rule also compared the whole value with 11, so 111, 211, ... resolved to one. CLDR uses i % 10 = 1 and i % 100 != 11 for one.
Author
|
AppVeyor failure is unrelated to this change: the unpinned |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Macedonian is registered under
"mb", which is not an ISO 639-1 code.CultureInfo("mk").TwoLetterISOLanguageNameismk, so plural formatting withmkormk-MKthrows:The
Macedonianrule also compared the whole value with 11 (value != 11), so 111, 211, 311, ... resolved toone. CLDR hasonefori % 10 = 1 and i % 100 != 11(1, 21, 101 areone; 11, 111, 211 areother), the same asIntl.PluralRules("mk").Changes:
mkvalue % 100 != 11in the ruleTest_Macedoniancoversmkandmk-MK, with both a culture provider andplural(mk). Before the change both cases throw; with only the key fixed they fail on 111. Both pass now.Full test run: 1,037 passed on net6.0 and 1,032 on net462. The two remaining failures (
Explicit_Formatter_With_Not_Enough_Parameters_Should_ThrowandPluralization_With_Changed_SplitChar) depend on the UI culture of this machine and fail the same way on unchangedmain.