Giter VIP home page Giter VIP logo

Comments (3)

evinnichenko avatar evinnichenko commented on July 24, 2024

Update: I started debugging and it looks like the problem lies in the NumberTranslator class that (as used here) formats the numbers to confirm with the chosen locale, and not just CalculateEngine as I first thought - so my test number 123.4567,89 reads as 123.456789 right after var input is created in main.cs. I am actually not sure how to fix it without turning off the "translate to locale" system for the calculator module, which I presume is there for a reason.

from powertoys.

htcfreek avatar htcfreek commented on July 24, 2024

@evinnichenko
There is a plugin setting to choose if you need English or regional input format. (PT Settings > PowerToys Run > Plugins > Calculator plugin > Expand plugin settings)

(Supporting both at the same time is a problem as we don't know if the user means decimal separation or thousand separation.)

from powertoys.

evinnichenko avatar evinnichenko commented on July 24, 2024

@htcfreek, that's exactly the problem though. The setting you are talking about overrides local number formatting, forcing en-US (that is, demanding 123,456.789 instead of e.g. 123 456,789). My computer already has en-US number formatting set, so all numbers read with , as thousand separator and . as decimal separator, irrespective of the layout. Problem is, in RU layout . is bound to different key (.> in ANSI, /? in Russian, comma also moves from ,< to Shift + /?) and numpad's . sends a , instead, so with or without that setting typing a decimal using muscle memory with wrong language turned on would result in bad number format and calculator failing. My suggestion was to give user another option, direct opposite of the one you are talking about, to ignore the formatting at all and make use of the fact that Mages apparently can read numbers without thousand separators. Probably done by changing input in Main.cs around line 99, along with other flag-dependent actions and before it gets sent to Mages.

Speaking of, do you know where I can find a) how to properly set an option flag (couldn't find the locale files to enter my own description and could use a formal process for doing it) and b) how to fix a chain of "failed to load XXX.dll" alert windows on debug startup from VS?

from powertoys.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.