NSoiffer / MathCAT

MathCAT: Math Capable Assistive Technology for generating speech, braille, and navigation.
MIT License
63 stars 35 forks source link

Add Auto value to BlockSeparators and DecimalSeparators #270

Closed NSoiffer closed 5 months ago

NSoiffer commented 6 months ago

This is actually a two- or maybe three-parter:

  1. MathCAT should set the values of BlockSeparators and DecimalSeparators every time the language changes. This should be based on the table in https://en.wikipedia.org/wiki/Decimal_separator#Conventions_worldwide. Unfortunately the language isn't always sufficient. Spanish is the most obvious exception (Europe and South America use "," as a decimal separator; North and Central America uses "."). There might be other exceptions, but they aren't obvious to me. For Spanish, if the language code includes a country code (e.g., "es-mx"), then that can be used to make a decision. For this to work, an Auto value needs to be added to BlockSeparators and DecimalSeparators.

  2. In some cases, someone in some non-English country might be reading an English page but the math isn't familiar in English, so they would like math to read in their native language. Changing the language from Auto to their language might switch the separators, but the actual language in the page doesn't change, so an automatic switch isn't right. In this case, they would change the Auto value to their language's value.

Along with this change, maybe I should change BlockSeparators and DecimalSeparators to something simpler because these values are linked together and potentially complicated to set (different kinds of spacing used for BlockSeparators). Maybe just have DecimalSeparator (singular) with allowable values ,, ., and Auto and set the block separator accordingly.

NSoiffer commented 5 months ago

Fixed with 8a883f6.