Giter Site home page Giter Site logo

Comments (6)

owenca avatar owenca commented on June 8, 2024

It seems Haiku doesn't support locale-sensitive decimal mark.

from filer.

humdingerb avatar humdingerb commented on June 8, 2024

Until we can find a solution, why not allow "." and "," in the size text control, and when saving the rule, replace the "," with a "." before converting to a float if that isn't done automatically?

When loading the rule, you can do something like the following to localize the rule's size float:

float fromRule = 123.45;
BString result;
BNumberFormat numberFormat;
status_t status = numberFormat.Format(result, fromRule);
if (status == B_OK)
	fPositiveNumberExampleView->SetText(result);

from filer.

owenca avatar owenca commented on June 8, 2024

why not allow "." and "," in the size text control

The user can enter either '.' or ',' (or another decimal mark if there is more) depending on the current set locale.

from filer.

owenca avatar owenca commented on June 8, 2024

Pulkomandy is implementing BNumberFormat::Parse(), which is the reverse of BNumberFormat::Format(). Then I can use it to hopefully complete the fix for this issue.

from filer.

owenca avatar owenca commented on June 8, 2024

Well, It turns out that I don't have to use BNumberFormat::Parse() to complete the fix.

from filer.

humdingerb avatar humdingerb commented on June 8, 2024

I think it works well enough. Just for completeness, I mention what could be improved (probably once Parse() exists): People currently cannot use 1000-delimiters, e.g. 1,234.56 (or German: 1.234,56). It's not crucial, but what separates Filer from perfection. :)

Let's mark this fixed then with #76 . Thanks!

from filer.

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.