-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
Username suggestion for non-English names #35984
Comments
IDK what's the best solution here.
from unidecode import unidecode
name = 'عماد' # Persian word for "Emad"
transliterated_name = unidecode(name)
print(transliterated_name) # Output: 'mad There are other packages like
Do you have any idea @kdmccormick? Maybe this was fixed somewhere in the platform before, but this piece was left out. |
Hmm, interesting, thanks for the report @CodeWithEmad . As a user of the platform in a non-ascii language, what would be your preferred behavior? If you enter your name in Arabic script, would you like that platform to try to suggest a phonetically similar ascii username, or would you rather it simply suggest no usernames? |
My 2 cents: when I enter "Régis Behmo" the suggested username is "régisb" and it would make sense to convert that into "regisb". ("é" is not a supported character) The year is 2024, and I think that the "right" fix for this would be to support unicode characters in user names. |
@kdmccormick I usually enter my name in English everywhere so I never faced this issue, but I tested a couple of services like x.com and they're using a similar solution to the @regisb I like the idea of supporting the unicode characters for username, but I'm afraid it introduces some complexity later where one small or big package/service under the hood doesn't support unicode and it breaks something. Suggesting a phonetically similar ASCII username is a reasonable workaround for this issue, but I am open to any solution. |
While a user tries to register, Authentication MFE sends a request to
LMS_HOST/api/user/v1/validation/registration
to suggest 3 usernames but usernames can only contain letters (A-Z, a-z), but, the suggested name does not follow this rule for non-English names.The
generate_username_suggestions
function inedx-platform/openedx/core/djangoapps/user_authn/utils.py
is responsible for generating these names.edx-platform/openedx/core/djangoapps/user_authn/utils.py
Lines 79 to 122 in b07464b
The text was updated successfully, but these errors were encountered: