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
Feature/icelandic language support #1116
Feature/icelandic language support #1116
Commits on Aug 16, 2021
-
Add resources for Icelandic localisation
Make basic tests for accessing resources pass. Overload DefaultFormatter in IcelandicFormatter, having to trim plural endings that do not apply to Icelandic while anticipating gender rules for Icelandic localisation of time based units with month and day being masculine, year being neuter and others, eg. seconds and hours taking the feminine gender. This called for access to CultureInfo as base class does not expose this (improvement suggestion?). Register the Icelandic Formatter in Formatter Registry. Some code branches cannot be unit tested in formatter as e.g. Argument Exception can only be thrown if missing resource key. Dual and TrialQuadral resource strings not included as they do not apply to the Icelandic implementation.
-
Make Collection tests pass for Icelandic
Consisted of adding "og" to registry.
-
Make Bytesize Tests pass for Icelandic
Similar tests as applied to e.g. German made to pass for Icelandic. Using Tölvuorðasafn and Íðorðasafn as base for using kB for kilobtytes and b as symbol for bit.
-
Make HeadingTests pass for Icelandic
Relied on already translated resources and similar tests for other languages of Germanic origin.
-
Make all Date and Time Tests pass for Icelandic
Included TimeOnly as usage in .NET 6.0 is approaching.
-
Make NumberToWords pass for Icelandic
Icelandic has some complexity that can be attributed to being 'closer' to its root than other surviving Germanic languages and having both more irregularities and retaining inflections such as four case synthetic grammar. This can mostly be represented with code branching specific to this implementation. Among other thing the first four natural numbers change based on gender and gender must be applied to the last number in a sequence. Rules are mostly consistent for powers of ten, but 'hundred' varies between single and plural. After performance measurements the final version was chosen to closely align with other implementations, while trying to be as transparent as possible. The Icelandic rules for ordinals are have additional requirements, e.g. on whether the penultimate number group or only the last match the rule. BenchmarkDotnet used on a parallel branch to make sure the implementation compares favarobly to other localisations.
-
-
Cleanup last Resharper and coverage findings
Code analysis run and no issues found in Icelandic language support files.
-
Add Humanizer.Core.is.nuspec to SLN file
Fix one mission EOL warning in PR view.
Commits on Aug 17, 2021
Commits on Aug 18, 2021
-
Add NumberToWords tests for 1M+1K edge cases
Restore AND handling code previously suggested by code coverage to be superfluous, but that turned out to be needed.
-
Added test and fix for the somewhat edge case of "the one million and two thousandth" ordinal in Icelandic
-
Finish translating values in Resources.is
Missing in _Above20 for seconds, days and years.
-
Forgot to add tests again after debugging