Trust Level badge change causes related title to un-translate

I am reporting a bug and asking a related question.

Bug

On the Regular badge admin page (/admin/badges/3), I accidentally removed the fa-user icon, and, trying to fix my mistake, looked up and set the far-user icon (because I couldn’t find the fa-user one). I realized that wasn’t the correct icon, and that the correct one was in fact simply named user although it was first appearing as fa-user when it was selected (now this is not the case anymore, I don’t understand why).

This little maneuver (which hopefully won’t cost me 51 years, but already 51 minutes…) had the weird side effect to make the title of some users appear as “Regular” instead of its translation in our Discourse’s default language (french, for that matter). I cannot find a way to revert it to how it was before.

The actual badge of the user isn’t affected.

This looks a lot related to this bug although it’s not the same.

Related question

I said above “of some users” because the user title isn’t the trust level for every users. Moreover, some trust_level_3 users have a small yellow badgy-thingy matching their trust level title appended to their name:
image
HTML : <span class="user-title user-title--regular">Regular</span>
but others don’t. So:

  1. How is the user title set? I can’t find a profile setting “user title” despite the screenshots from the meta thread I linked above.
  2. What is this badgy-thingy and how is it set?

I checked the docs but couldn’t find the answers.

Config

Discourse 3.2.2
Active plugins: Discourse Calendar, OpenID Connect, Encrypt, Events, Footnote, Legal Tools, Discourse Templates, Solved, Spoiler Alert, Topic Voting

1 Like

I think I was also able to reproduce the bug:

  1. Change the interface language to anything but English.
  2. Edit the title of your test user, so that you see the translated title in their profile.
  3. Go to /admin/badges and open the badge connected to the title.
  4. Save the badge form without changing anything.
  5. Look at the profile of the test user. Their title is now in English.

Usually, it’s in the preferences at /u/USERNAME/preferences/account. I think it is only visible when you have at least one badge that can be used as a title.

So you should be able to edit them in the preferences of your users, but I don’t know whether there is a way to do it in bulk.

2 Likes

@pHneutre, do you want all users who currently have “regular” as their title to get the title in French?

You can navigate to /admin/customize/site_texts and search for badges.regular.name. By editing that (for example, by adding a “1”), all titles will be updated to use the language in which you made the change. Then, you can revert the change, and all users who now have the “regular” title will have the French “Regular” title.

In general, I think this is a bug because changing the wording in one language shouldn’t update titles that use a different language. However, this could be an easy workaround for you to set all titles to French again.

1 Like