Kozea / Pyphen

Hy-phen-ation made easy
https://courtbouillon.org/pyphen
Other
198 stars 24 forks source link

Make language parameter case-insensitive #38

Closed BLKSerene closed 2 years ago

BLKSerene commented 2 years ago

This pull request makes the language parameter case-insensitive so that users do not have to worry about the case problem.

e.g. en_us, sr_LATN are both valid language codes now (before they should be cased as en_US and sr_Latn exactly).

liZe commented 2 years ago

Thank you!

liZe commented 2 years ago

I was about to merge this pull request, but there’s something I’m not sure about it. I like the idea of being case-insensitive when a language is given (and that’s probably the original goal of the PR), but always returning lowercase in language_fallback breaks the public API and should probably be avoided. Do you agree?

BLKSerene commented 2 years ago

@liZe Sounds reasonable, should be OK now.

BLKSerene commented 2 years ago

Flake8 should be happy now, please re-run CI.