Skip to content
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

PowerToys Run - Unit converter - Can´t use abbreviations #21472

Open
DaniDerBaer opened this issue Oct 26, 2022 · 10 comments
Open

PowerToys Run - Unit converter - Can´t use abbreviations #21472

DaniDerBaer opened this issue Oct 26, 2022 · 10 comments
Assignees
Labels
Cost-Small Small work item - 0-8 hours of work Issue-Bug Something isn't working Resolution-Fix Committed Fix is checked in, but it might be 3-4 weeks until a release. Run-Plugin Things that relate with PowerToys Run's plugin interface

Comments

@DaniDerBaer
Copy link

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

Instead I need to type "10 kilometerperhour in mileperhour" to get a result.
2022-10-26_17h50_56

This isn´t the case for all units e.g. "10ft in m" works fine.
2022-10-26_17h51_55

✔️ 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

@DaniDerBaer DaniDerBaer added Issue-Bug Something isn't working Needs-Triage For issues raised to be triaged and prioritized by internal Microsoft teams labels Oct 26, 2022
@crutkas
Copy link
Member

crutkas commented Oct 26, 2022

It can, like you can do 10m to in and will work, looks like this conversion needs some TLC overrides

@crutkas crutkas added Cost-Small Small work item - 0-8 hours of work Run-Plugin Things that relate with PowerToys Run's plugin interface and removed Needs-Triage For issues raised to be triaged and prioritized by internal Microsoft teams labels Oct 26, 2022
@Tantalus13A98B5F
Copy link
Contributor

@ethanfangg ethanfangg added this to the PowerToys 0.80 milestone Mar 22, 2024
@ethanfangg ethanfangg added Needs-Triage For issues raised to be triaged and prioritized by internal Microsoft teams and removed Needs-Triage For issues raised to be triaged and prioritized by internal Microsoft teams labels Mar 22, 2024
@GhostVaibhav
Copy link
Contributor

GhostVaibhav commented Jun 27, 2024

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?

@jaimecbernardo
Copy link
Collaborator

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 @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!

@GhostVaibhav
Copy link
Contributor

@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.

@jaimecbernardo
Copy link
Collaborator

@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

@GhostVaibhav
Copy link
Contributor

GhostVaibhav commented Jul 1, 2024

@jaimecbernardo Oh, my bad. It went under my radar. Maybe, I can fix it then. Could you assign it to me?

@jaimecbernardo
Copy link
Collaborator

Just did. Thanks a lot for picking this up 😄

@htcfreek htcfreek added the Status-In progress This issue or work-item is under development label Jul 2, 2024
@Jay-o-Way
Copy link
Collaborator

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".
  • I know mph is common enough, but technically it's ambiguous: could also be read as "meter per hour"

@GhostVaibhav
Copy link
Contributor

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 -
Screenshot 2024-07-14 at 8 41 09 PM
  • 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 -

Screenshot 2024-07-14 at 8 43 40 PM

@jaimecbernardo jaimecbernardo added Resolution-Fix Committed Fix is checked in, but it might be 3-4 weeks until a release. and removed Status-In progress This issue or work-item is under development labels Jul 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Cost-Small Small work item - 0-8 hours of work Issue-Bug Something isn't working Resolution-Fix Committed Fix is checked in, but it might be 3-4 weeks until a release. Run-Plugin Things that relate with PowerToys Run's plugin interface
Projects
Status: No status
Development

No branches or pull requests

8 participants