-
Notifications
You must be signed in to change notification settings - Fork 382
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
Different abbreviations for volume unit Liters used #1115
Comments
According to SI Symbols both l and L are correct: https://en.wikipedia.org/wiki/International_System_of_Units According to CEFACT rec20 UN standard the lower case variant is used. According to a US National Institute website: https://physics.nist.gov/cuu/Units/outside.html#:~:text=Thus%2C%20although%20both%20l%20and,approved%20symbols%20for%20the%20liter.
|
I too favor uppercase "L", so I propose we change them all in #982 ? |
The standard for units, to my understanding, is that unless it's named after someone, it's lower case. Sure |
I'd like to land on a convention here, but I don't want this to come down to personal preferences, mine the least. I want to follow industry standards, however it seems to be split on American vs European/international. @Brunni listed 3 standards:
Are there more sources we can use to make a decision here? Library already favors American and US English conventionsThis library has generally been following US naming conventions, such as "liter" instead of "litre". I guess this has roots in my personal preferences when creating the first units of the library, preferring US English and US naming conventions. I don't want to change this, as this naming convention has been in place for close to 10 years now and I can't recall any requests to change "liter" to "litre". It would also be a breaking change for the majority of the library consumers, which is a hard no for me. It comes down toHaving named the units "liter", should we use "L" or "l" as the primary abbreviation for My take is that American standards and laypeople communicating in US English prefer "liter" and "L", while European/international standards prefer "litre" and "l". The above standards seems to support this. Based on this I propose to make it uppercase "L". Do you agree with the reasoning? |
If you want to land on a standard, go with SI. I don't think the spelling particularly matters (since the brain reads whole words, it doesn't care that much about small spelling differences), but for the abbreviations, it makes far more sense to standardise on the actual international standard rather than deciding to go with the Americanism. The whole point of having an international standard is to put an end to ambiguities like this and make sure that things work for the largest percentage of the global population. I also note that those Americans that I have worked with in technical fields tend to follow SI more closely than laypeople. Finally, if someone is dealing with litres as an American, chances are they're already more versed with SI than most. If we were talking about imperial units, I'd be more inclined to say go with the NIST capitalisation schema because it's only Americans that use them anyway. It's worth noting that Americans refusing to go with SI has, quite literally, crashed satellites. I guess the other options is adding some sort of localisation option. This would probably be my preferred option, but it's a bit more work. I'd be inclined to say read the locale of the current environment, if it's |
Thank you. I think your reasoning is sound and I also suspect most laypeople don't care much about "L" vs "l", while people in technical fields probably find "L" non-standard. However, I also think they will find the liter/l combination odd. To summarize "liter" vs "litre" and "L" vs "l":
Let me ping some contributors for opinions on this: Please also cast your vote here (deadline in 5 days): |
I usually like the SI one but I do few exceptions like Litter with a capital L, the reason is simple: readability on a machine. You have to have great eyes to differentiate capital/uppercase |
Considering that SI allows for both upper case and lower case of letter L (precisely because of the potential confusion with the lower case and capital i) I would vote for upper case L. That way we'll be SI compliant and also improving readability. As for litre vs liter... that's falls out of engineering scope... 😅 not being able to use Culture information I would default to English. |
If capitalizing the abbreviation means that "mL" would be the derived unit- then I vote for lowercase "l" (already the spellcheck is suggesting that I should be using "ml" instead) . |
I knew you guys wouldn't make it easy 😅 It seems there are no strong opinions on liters vs litres. So let's try to put us into some buckets on casing:
We're a bit few, but seeing that we are kind of split on preference I think it speaks to that there is no obvious correct solution for everyone and that options 1-3 are all viable. I lean towards option 1 - no change, keeping it "L" and "liter" and more importantly, not introducing any breaking change on litre vs liter. How about we instead offer a global configuration for controlling "L" vs "l" for liters? |
Being pragmatic here: not 100% sure if it's worth the trouble of implementing that config option... I would file this under "by design" and move along with the option you choose being the most appropriate. Both are SI compliant so it will always end up on a personal preference. 😉 |
Isn't this just a localization issue? Using
I would keep the properties as LiterPerMinute just to avoid a code-break. |
Interesting, I guess culture could play a part here. Some challenges that come to mind with culture:
Oh, it won't be me implementing it for sure. Whoever needs it the baddest will have to step up 😆 |
Only where there exists a preference for things like this. It is optional, not mandatory.
That is my assumption. If wrong, we can always specialize for any given culture. The generic "en" fallback should "hit the most" English speaking cultures.
I am certain of nothing 🤪 |
I created #1209 to show what this could look like. Let's iterate 😃 |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
I think this is a very important point to this... Not sure how the derived units are constructed though but mL would be very jarring.
Does it? I'm not saying you're definitely wrong, but I've never seen anything that says this. |
Fixes #1115 Change from `L` to `l` in unit abbreviations for liters. - `Density.GramPerLiter` + prefixes - `FuelEfficiency.LiterPer100Kilometers` - `FuelEfficiency.KilometerPerLiter` - `MassConcentration.GramPerMicroliter` - `MassConcentration.GramPerMilliliter` - `MassConcentration.GramPerDeciliter` - `MassConcentration.GramPerLiter` - `Molarity.MolePerLiter` - `VolumeConcentration.LitersPerLiter` - `VolumeConcentration.LitersPerMililiter` - `VolumeFlow.LiterPerSecond` - `VolumeFlow.LiterPerMinute` - `VolumeFlow.LiterPerHour` - `VolumeFlow.LiterPerDay`
Fixes #1115 Change from `L` to `l` in unit abbreviations for liters, to be consistent in library and to follow SI Unit System conventions. Note: - Parsing is backwards compatible, since parsing unit abbreviations has fallback to case insensitive as long as there is no ambiguity. E.g. `Volume.Parse("10 L")` and `Volume.Parse("10 l")` both work. - To avoid breaking backwards compatibility, we keep `liter` instead of `litre` when naming units. Also updated wiki: https://github.com/angularsen/UnitsNet/wiki/Adding-a-New-Unit#abbreviation-naming-conventions ### Changed units - `Density.GramPerLiter` + prefixes - `FuelEfficiency.LiterPer100Kilometers` - `FuelEfficiency.KilometerPerLiter` - `MassConcentration.GramPerMicroliter` - `MassConcentration.GramPerMilliliter` - `MassConcentration.GramPerDeciliter` - `MassConcentration.GramPerLiter` - `Molarity.MolePerLiter` - `VolumeConcentration.LitersPerLiter` - `VolumeConcentration.LitersPerMililiter` - `VolumeFlow.LiterPerSecond` - `VolumeFlow.LiterPerMinute` - `VolumeFlow.LiterPerHour` - `VolumeFlow.LiterPerDay`
Coming in with fresh eyes here, I'll just make a decision to at least standardize on something and move one with our lives.
Decision is final unless anyone objects in 3... 2.. 1.. aaand it's merged! Fixed in #1404 I made the change in v6, so you can still voice your strong opinions here before v6 exits prerelease. |
Not the same abbreviation for Liters is used in the whole library.
Sometimes it's an uppercase letter "L", sometimes a lowercase letter "l" is used.
Some examples:
Volume Liter => abbreviation "l"
Volume flow LiterPerMinute => abbreviation "L/min"
Volume flow LiterPerHour => abbreviation "L/h"
Volume flow LiterPerDay => abbreviations "l/day", "L/d", "LPD"
...
The same abbreviation should be used in the whole library.
The text was updated successfully, but these errors were encountered: