fix(hr-HR): feminine number words before -arda scale words#414
Open
greymoth-jp wants to merge 1 commit into
Open
fix(hr-HR): feminine number words before -arda scale words#414greymoth-jp wants to merge 1 commit into
greymoth-jp wants to merge 1 commit into
Conversation
Croatian milijarda and bilijarda, and the higher -arda scale words, are feminine like tisuća, so the count in front of them takes the feminine form: jedna milijarda, dvije milijarde, not jedan milijarda. Only thousands were marked feminine, so every -arda scale (10^9, 10^15, ...) printed the masculine count. Change the gender test from scaleIndex === 1 to scaleIndex % 2 === 1, feminine at each -arda scale and masculine at the -un scales (milijun, bilijun, ...), in both the cardinal and ordinal builders. This is the same fix forzagreen#413 made for sr-Cyrl-RS and sr-Latn-RS, which share this grammar. Adds cardinal and ordinal cases for milijarda and bilijarda.
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.
In Croatian the scale nouns alternate gender: tisuća (10^3), milijarda (10^9), bilijarda (10^15) and the higher
-ardawords are feminine, while milijun (10^6), bilijun (10^12) and the-unwords are masculine. The count in front of a feminine scale word has to agree, so one billion is "jedna milijarda" and two billion is "dvije milijarde".hr-HRonly treated thousands as feminine (isFeminine = scaleIndex === 1), so every-ardascale above thousands printed the masculine count:1_000_000_000gave"jedan milijarda"(should be"jedna milijarda")2_000_000_000gave"dva milijarde"(should be"dvije milijarde")1e15gave"jedan bilijarda"(should be"jedna bilijarda")milijun and the other
-unscales were already correct and stay unchanged (1_000_000->"jedan milijun").Fix
Change the gender test to
scaleIndex % 2 === 1, which is feminine at every-ardascale and masculine at the-unscales, in both the cardinal and ordinal builders. This is the same change #413 made forsr-Cyrl-RSandsr-Latn-RS; Croatian shares the Serbo-Croatian milijarda-is-feminine grammar, and the file's existing feminine machinery (ONES_FEM/buildSegmentFem, already used for tisuća) handles it.Added cardinal cases (milijarda, bilijarda) and ordinal cases (milijarditi) to
test/fixtures/hr-HR.js.npm testandnpm run lintpass; reverting only the source change makes the new cardinal case fail with"jedan milijarda"vs"jedna milijarda".