Bug 511111

Summary: Use US or UK imperial units depending on the current locale
Product: [Frameworks and Libraries] frameworks-kunitconversion Reporter: forestbeasts <forestbeasts>
Component: generalAssignee: John Layt <jlayt>
Status: REPORTED ---    
Severity: wishlist CC: kdelibs-bugs-null
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Debian stable   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description forestbeasts 2025-10-25 17:54:36 UTC
SUMMARY
KUnitConversion (in the launcher / krunner) uses a mix of US/UK units, making conversions wrong (technically not wrong, if you know what it's doing, but).

STEPS TO REPRODUCE
1. Convert 1 cup to pints in a US locale.
3. Convert 1 pint to ml.

OBSERVED RESULT
1. 1 cup should be 0.5 pints, but it comes up as 0.416 imperial pints.
2. 1 pint should be 473ml (if in a US locale), but it comes up as 568ml (always).

EXPECTED RESULT
The GNU units command autodetects based on locale and uses US customary units if you're in an en_US locale, and UK units if you're in an en_GB locale (other countries get the US units; you can use UNITS_ENGLISH=US or GB for testing). Maybe KUnitConversion could do the same (perhaps disambiguating the name with "US pints" vs. "Imperial pints" etc.)?

In which case 1 cup would be 0.5 pints, always, and in a US locale 1 pint would be 473ml while in a GB locale it would be 568ml. I think teaspoons/tablespoons are different as well.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Debian Trixie
KDE Plasma Version: 6.3.6
KDE Frameworks Version: 6.13.0
Qt Version: 6.8.2

ADDITIONAL INFORMATION
-
Comment 1 forestbeasts 2025-10-25 18:09:12 UTC
Oops, I can't edit the initial report, this really should've gone under Additional Information, but.

https://bugs.kde.org/show_bug.cgi?id=458389 looks like the same issue, but they didn't propose going by locale or anything (just that the silent conversion between US and UK units was a problem), so I figured I'd post this anyway.

-- Frost