Closed iwehrman closed 8 years ago
reviewed. questions/suggestions, but merge-able as is.
I didn't create a parseDecimal
function in js/util/nls
because that would have required pulling more math into the NLS module than seemed appropriate, so instead I just factored out normalizeDecimalExpr
, which replaces ,
with .
as needed in arithmetic decimal expressions. Back to @mcilroyc
Fixed. Back to @mcilroyc again.
This PR improves our number localization so that the operating system-specified decimal separator is used, and not just the locale default. This is done by fetch
localeInfo
from Photoshop before starting the application, and using that to provide util-level information about the correct decimal separator and a decimal-formatting function. I did it this way because a) this setting can't change without restarting Photoshop, and b) it turned out to be extremely challenging to put this into our usual Flux data flow (i.e., it would have required major refactorings, and it just didn't seem to be worth the effort).To test, manually change your locale's decimal separator this like:
And then restart Photoshop .
Addresses #3136.