Open auscompgeek opened 1 year ago
Something else just came to mind: not all locales use .
for decimals, instead using ,
. For programming though we'll still want a way to dictate decimals using .
– not sure what the best way to do this is.
Oh, interesting, just took a look at how we do it in dictation mode and we have a similar construction to what we have in CSS:
I would just extend the normal number command with this ability. We can either do two separate commands in the Talon file or make a capture that enables both? eg https://github.com/AndreasArvidsson/andreas-talon/blob/bd3e75779295d9f139d8bc614ecb54e50899d704/core/numbers/numbers.py#L207-L213
In the CSS support there's a couple of commands that recognise decimals:
https://github.com/talonhub/community/blob/d9c6373661eb937fc6fc1a29df4bfdce54b6914a/lang/css/css.talon#L27-L29
This only recognises how decimals are typically taught to be read in English-speaking classrooms (e.g.
three point one four
for3.14
). Some people might like to be able to dictate the fractional part of decimals like whole numbers though, e.g.twelve point thirty four
for12.34
. Others might prefer to saydot
instead ofpoint
.We should add a
decimal_string
capture to allow this to be reused in other commands and customised globally.