Advaith3600 / PowerToys-Run-Currency-Converter

PowerToys Run plugin which will convert real and crypto currencies.
MIT License
161 stars 8 forks source link

Comma Ignored in Currency Conversion #15

Closed Gasased closed 3 months ago

Gasased commented 3 months ago

When entering a currency amount with a comma (e.g., $35,00 USD), the conversion tool ignores the comma, leading to incorrect results.

image image

windows 11 Version 23H2 (OS Build 22631.3527) sys language: eng, installation lang: ukrainian

Advaith3600 commented 3 months ago

I will look into this as soon as possible. Why was the second expression deemed invalid? Is it still showing the same issue?

idanyas commented 3 months ago

encountered the same problem

comma ignored: PowerToys PowerLauncher_hDCVXF1sqb

dot invalid expression: PowerToys PowerLauncher_Lj6BXhNaaB

idanyas commented 3 months ago

hello, any updates?

Advaith3600 commented 3 months ago

Hey, I was quite busy the past few days. I will start working on a fix this week. Meantime, I am open to any contributions.

Advaith3600 commented 3 months ago

I have made some changes, please let me know if this has fixed your issue.

CurrencyConverter-1.1.5-ARM64.zip CurrencyConverter-1.1.5-x64.zip

idmsln commented 3 months ago

I downloaded the source, ran the build.ps1 file to build version 1.1.6. It worked fine for me. Thank you @Advaith3600

image

Advaith3600 commented 3 months ago

Thanks for the feedback. I have published a stable build under v1.1.6

idanyas commented 3 weeks ago

i’ve noticed that converter handles numbers with commas as decimal separators really well, but when entering numbers with a dot as the separator, it seems to ignore it and treats the input as a whole number.

for example, if i type “0.001 btc,” it returns the conversion rate for “1 btc” instead of the smaller amount. i was wondering if there might be a way to modify this myself or if adding support for both comma and dot decimal separators could be considered. dot screenshot

the comma works properly, though: comma screenshot

Advaith3600 commented 3 weeks ago

One obvious way to fix this is to change the system language, but it is not feasible for many. The plugin currently relies on the windows parseInt to determine the separator automatically, I need to check if there is a manual switch and how we can integrate it with the settings. Can you create a new issue about this?