# User\_name\_suggester diventerà instabile nella versione non inglese di Discourse

**URL:** <https://meta.discourse.org/t/user-name-suggester-will-become-buggy-when-in-non-english-version-discourse/107161>\
**Category:** Bug\
**Created:** [22 Gennaio 2019, 9:23am UTC](https://meta.discourse.org/t/user-name-suggester-will-become-buggy-when-in-non-english-version-discourse/107161 "2019-01-22T09:23:35Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![lisbethw1130](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/lisbethw1130/32/129613_2.png) [@lisbethw1130](https://meta.discourse.org/u/lisbethw1130)\
**Post date:** [22 Gennaio 2019, 9:23am UTC](https://meta.discourse.org/t/user-name-suggester-will-become-buggy-when-in-non-english-version-discourse/107161/1 "2019-01-22T09:23:35Z")

</div>

Hi, this is Lisbeth from Taiwan.  
We use Traditional Chinese version discourse here, and we found this bug when our anonymous username become random hex which looks creepy for friendly users LOL.

Our first 100 anonymous username are something like 1111, 1112…111100, after 111100, it will become random hex.

So I keep digging the source code, and see that anonymous user name use a user\_name\_suggester.suggest, it will put Anonymous in Chinese (匿名) these two words into the suggester, when it go through sanitize\_username, everything will be blank

Example:  
sanitize\_username(‘匿名’) ===\> “”

then when “” go through rightsize\_username, it will fill least username with 1, and become 111

I believe most non-english version discourse is suffering in this situation, when we use SSO login, if the username is non-english, this will happen, too.

Probably solution: if the username come from SSO isn’t English or create anonymous user, when go through user\_name\_suggester.sanitize\_username, consider using pinyin ([Pinyin - Wikipedia](https://en.wikipedia.org/wiki/Pinyin)) or something instead of 111 or random hex which is really creepy LOL

Any idea is welcome 🙂

---

_[View the full topic](https://meta.discourse.org/t/user-name-suggester-will-become-buggy-when-in-non-english-version-discourse/107161)._
