Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make sure tests pass in any culture and extract words using unicode categories #8

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

monoblaine
Copy link

First of all thanks for this extension, it's really helpful. I'd like to change a few things if that's all right with you.

The first problem I saw after cloning the project was that the tests were failing because I use Turkish locale settings in my computer. Anyway, the short explanation is Upper(i) is not I in Turkish, it's actually İ. More info here if you're interested. So the first modification (9f60198) I did was to use en-US culture in all existing test methods.

The other modification (2c662df) is related to the word extraction algorithm. You've used a-z character ranges but this range does not include language specific letters (ş, ç, ö, ğ, ı for Turkish) so I've changed all those character ranges with unicode categories.

If we don't do that, tests won't pass in a computer using
Turkish locale settings because of the following reasons:

In Turkish,

* Upper(i) is "İ"
* Upper(ı) is "I"
* Lower(İ) is "i"
* Lower(I) is "ı"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant