Open DaniDerBaer opened 1 year ago
It can, like you can do 10m to in and will work, looks like this conversion needs some TLC overrides
You can try 10 km/h in mph
, as the abbreviations are defined at
https://github.com/angularsen/UnitsNet/blob/7519a2152b9389e6cf93aefe8a77fc9d80963149/UnitsNet/GeneratedCode/Quantities/Speed.g.cs#L469-L528
Hi @jaimecbernardo and @ethanfangg, what does this issue need? Should we close it? Should I open a PR with the extra abbreviations for kph
and mph
? How should we proceed further?
Hi @jaimecbernardo and @ethanfangg, what does this issue need? Should we close it? Should I open a PR with the extra abbreviations for
kph
andmph
? How should we proceed further?
Hi @GhostVaibhav , I assume this hasn't been tested in a while. If it's still not working, I guess a PR that fixes it would be welcome. Thank you!
@jaimecbernardo, I have tested it yesterday. It works with kp/h
but not with kph
. Also, if we decide to move forward with this, can you add the External Dependency
label, since it's an issue at the UnitsNet
end.
@GhostVaibhav , there is something that we can do on our side as well, we are converting some units before sending them to UnitsNet: https://github.com/microsoft/PowerToys/blob/3b7adbe6acc381d11d8e17866da4b79444679c08/src/modules/launcher/Plugins/Community.PowerToys.Run.Plugin.UnitConverter/InputInterpreter.cs
@jaimecbernardo Oh, my bad. It went under my radar. Maybe, I can fix it then. Could you assign it to me?
Just did. Thanks a lot for picking this up 😄
A few quick thoughts
kp/h
is something I've never seen before and it doesn't look right - to mean "kilometer per hour". At first, this looks more like "kilo-p(something) per hour".cph
is something I've never seen before and it doesn't look right - to mean "centimeter per hour". I would expect "cm".mph
is common enough, but technically it's ambiguous: could also be read as "meter per hour"Hi @Jay-o-Way A few quick answers -
There is no unit as kp/h
but kph
. The Google search for the same shows this, making it the standard -
I agree with you on this. I might remove it but I don't see any concrete reason to, since it's not conflicting with anything.
Again, the Google search shows this, making it the standard -
Microsoft PowerToys version
0.63.0
Installation method
GitHub, PowerToys auto-update
Running as admin
Yes
Area(s) with issue?
PowerToys Run
Steps to reproduce
When I type something like "10kph in mph" the unit converter plugin doesn´t recognise it. It also doesn´t change anything if I use the direct activation command.![2022-10-26_17h50_36](https://user-images.githubusercontent.com/50111541/198074431-1828745b-fc57-453e-b2a0-79aaea558a6b.png)
Instead I need to type "10 kilometerperhour in mileperhour" to get a result.![2022-10-26_17h50_56](https://user-images.githubusercontent.com/50111541/198074444-f29f8686-db20-45bd-9003-543407d959ec.png)
This isn´t the case for all units e.g. "10ft in m" works fine.![2022-10-26_17h51_55](https://user-images.githubusercontent.com/50111541/198074658-f242ae39-1df7-4118-bbb2-0d5a233e5e84.png)
✔️ Expected Behavior
Recognise an input if abbreviations are used and convert it correctly.
❌ Actual Behavior
Only recognises an input if no abbreviations are used.
Other Software
No response