Samyak2 / toipe

yet another typing test, but crab flavoured
MIT License
584 stars 31 forks source link

Support non-english text #12

Open Samyak2 opened 2 years ago

Samyak2 commented 2 years ago

What and why?

Currently, the word selection algorithm in toipe only supports English ASCII characters. Any other characters (including ASCII special characters will be ignored).

This is not good because the world doesn't only write in English :). Especially for a typing test app which can be used to measure and improve speeds in other languages too.

Once this is implemented, it would also be good to have built-in word lists for more languages (maybe even auto-detect the user's locale and change word list based on it?)

How?

The changes need to be done in RawWordSelector (source code).

This may require some more changes that I'm not yet aware of.

Please drop a comment if you find any inconsistencies or problems with this idea :)

Samyak2 commented 2 years ago

Some suggestions from the author of terminal-typeracer: https://www.reddit.com/r/rust/comments/tvamfz/comment/i3eva1h/