-
Notifications
You must be signed in to change notification settings - Fork 50
replace_latin boolean #13
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
Conversation
slugify/__init__.py
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you wouldn't mind adding a docstring here that would be great too, at least explain what replace_latin does when enabled and when disabled.
|
This looks good, if you can make those minor changes that'd be great, and I'll merge this. |
|
Also... may want to consider this library too: https://github.com/dimka665/awesome-slugify It might do everything this one does and then some already. |
|
I checked that library but I liked this one since it's simple. Made the changes. |
|
If it's possible to build a new version with that merge, I would like to use this package in my requirements. |
Mentioned in my first merge request, smart_boolean enables to replace common latin letters with their ascii representations.
Example:
So that people who does not have 'ı' letter in their keyboards will be able to match the string by using either 'ı' or 'i' from their keyboards.
For current version, 'bakici' cannot match 'bakıcı'. But with smart_replace, 'bakıcı' and 'bakici' can both match 'bakıcı' because 'bakici' may represent 'bakıcı' within an English keyboard.
List of common latin letters to replace
-İ, Ì, Í, Î, Ï -> I