DanielKote / Foreman2

Visual planning tool for Factorio
Other
202 stars 25 forks source link

Question/Suggestion #121

Open SakuChou opened 1 day ago

SakuChou commented 1 day ago

Hey, In France, we use an AZERTY keyboard layout, and the delete key on our numpad is a "." (period). However, French rules state that decimals should be separated by a "," (comma). Software like Excel automatically translates the period from our numpad into a comma.

In Foreman, when I try to type a decimal number using my numpad, I get an error sound (possibly because it’s trying to input a comma instead of a period).

Is there a way to correct this behavior on my end?

Olipro commented 14 hours ago

This problem is largely caused by string conversions not following CultureInfo.CurrentCulture - I'm currently working on updating the program to .NET 9 and, as an indirect consequence, the presentation and parsing of data should begin following the locale set on your system.

In short, once it's ready, someone running the program on a version of Windows in say, en-US would see/input something like 1,000.123 (1 thousand with decimal 123) but someone using Foreman on Windows with its language set to fr-FR would see/enter 1.000,123 (I'm assuming here that fr-FR is like most EU countries that use the comma and period for the opposite meaning that the US has)

For the time being, you'll need to input data using the format that would be used in the US.