| Summary: | Unit converter does not understand complex units | ||
|---|---|---|---|
| Product: | [Frameworks and Libraries] frameworks-kunitconversion | Reporter: | tusooa <tusooa> |
| Component: | general | Assignee: | John Layt <jlayt> |
| Status: | CONFIRMED --- | ||
| Severity: | normal | CC: | alexander.lohnau, giecrilj, kdelibs-bugs-null, plasma-bugs-null |
| Priority: | NOR | ||
| Version First Reported In: | 5.75.0 | ||
| Target Milestone: | --- | ||
| Platform: | Gentoo Packages | ||
| OS: | Linux | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
|
Description
tusooa
2020-11-02 19:54:52 UTC
Thank you for the bug report. I will reassign this to the kunitconversion framework, this is where the units are provided.
I will look into fixing some of the mentioned issues(like 1:), but I am no expert regarding the backend ;)
>12: Type 1 ft 1 in
This seems like a special case: You are basically saying: Give me results for 1 feet + 1 inch if I understand correctly. This is currently not supported, because it would need some "preprocessing" before calculating the result units.
(In reply to Alexander Lohnau from comment #1) > Thank you for the bug report. I will reassign this to the kunitconversion > framework, this is where the units are provided. > > I will look into fixing some of the mentioned issues(like 1:), but I am no > expert regarding the backend ;) > > >12: Type 1 ft 1 in > > This seems like a special case: You are basically saying: Give me results > for 1 feet + 1 inch if I understand correctly. This is currently not > supported, because it would need some "preprocessing" before calculating the > result units. Thank you. For the + thing it is actually described on wiki: https://userbase.kde.org/Plasma/Krunner#Calculator But `= 1 ft + 1 in` does not work, and none of the examples there actually work. As a side note, I remember that at least `1 sqft` worked in the past. This might be a regression. What you mean in the docs is a completely different component, that is the Qalculate engine of the calculator runner. Do you have it enabled? Maybe your distro build didn't come with qalculate... PS: The docs are from KDE4, so not up-to-date. In general I thing we would need a better system here than hardcoding these strings :/ The pattern seem really repetitive with the "sq" or "²" pre/postfixes. Otherwise we would also need to fix a lot of other bugs. For example "1sq in" works, but "1sqin" does not work. But theoretically that should work too, right? (In reply to Alexander Lohnau from comment #4) > What you mean in the docs is a completely different component, that is the > Qalculate engine of the calculator runner. Do you have it enabled? Maybe > your distro build didn't come with qalculate... > > PS: The docs are from KDE4, so not up-to-date. Thank you for that information. I have looked up the source code at https://invent.kde.org/frameworks/krunner but cannot find anything about qalculate, is there an option to enable it? These things do not work: input (convert to) 115º (2 rad) 3º15’ (3.25º) π rad (180º) 100ºF (38ºC) 100 ha (1 km²) 1 rt (100 ft³) 2023-01-07 (Jan. 7th, 2023) (Julian Dec. 25th, 2022) (Dec. 25th, 2776 AVC) nautical units are unsupported local units are unsupported (under Polish locale: 1 q = 100 kg, 1 KM = 1 hp) 1 Hg is accepted and treated as 1 hg (?!) 1 KM is accepted and treated as 1 km (?!) 800 mm Hg is not accepted (800 mmHg) Note: 2 ft 3 in does not work but 30′0″ is handled by the calculator and evaluates to 9 m (why not 0.5º?) I admit that AVC may be too tricky because the year number shifts on Apr. 21st XD |