Repository navigation
Fix zh-CN abbreviations for hectare and nautical mile - #1750
Open
HuzaifaChaudary wants to merge 1 commit into
Open
HuzaifaChaudary wants to merge 1 commit into
HuzaifaChaudary wants to merge 1 commit into
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
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.
two zh-CN abbreviations were the name of a different unit , which made them ambiguous , and the generated tests had that ambiguity written in as expected :
Hectare英亩( acre , same asAcre)公顷NauticalMile纳米( nanometer , same as the generatedNanometer)海里so
Length.Parse("1 纳米", zh-CN)threwAmbiguousUnitParseExceptionbetween a nanometer and a nautical mile , andArea.Parse("1 英亩", zh-CN)between acre and hectare . the change is the two strings inArea.jsonandLength.json, the rest isgenerate-codeoutput : theParseWithAmbiguousAbbreviationcases for them are gone and the normal parse cases are generated instead .UnitsNet.Testson net10.0 , macOS : 52574 passed , the 2FeetInchesTestsde-CH failures happen on master too .found by listing every abbreviation that maps to two units of the same quantity in the generated
.restextfiles . one more is left alone because I can't judge it : ru-RUNauticalMileisмил, the same as ru-RUMil. a Russian speaker would know the usual short form .