Interface language in profile preferences translates badge titles

AI-generated summary

The discussion revolves around the issue of badge titles being translated in a user’s profile preferences when their interface language is changed. armingrudd initially reported this issue, which only occurred with Italian, and was seeking a fix.

JammyDodger inquired about where the titles were defined, and armingrudd explained that they were defined via group titles and badges. JammyDodger clarified that badge titles are designed to be translated where a translation exists, and suggested using Default Group Titles as an alternative.

armingrudd acknowledged this and considered giving badges customized text to resolve the issue. JammyDodger provided further guidance on how to manually set a preferred version of the badge title for each language by editing the site texts.

Hi,

We have defined a few titles in our forum and they are assigned them to users based on some conditions. Apparently, if a user changes their interface language to their native language, discourse translates the titles as well. It doesn’t happen for all languages (in our case it happened with Italian).

To us, this is not expected since titles are predefined in English and also they are displayed to all other users, not only the title holder.

Is it possible to fix this?

Could you be more specific about where you’ve defined these titles?

Titles are defined via group titles and badges.
The title can be selected from the available options in profile preferences > account.

Any ideas about this issue?
Is it expected or can be fixed?

Ah, sorry Armin. I caught a case of ‘unfinished draft’.

I believe the badge titles are designed to be translated (where a translation exists), so they would seem to be working as expected. I suppose you could argue that they should be re-translated based on who’s viewing it, but I think that would be a change rather than a fix.

Though the ones you set as Default Group Titles shouldn’t be translated, and should remain as you’ve set them. Would using that feature be more suitable for your use case?

Thank you @JammyDodger,

You are right, the translated titles are the ones coming from badges. Although I think it brings confusion since two users with the same badge can have different (in language) titles, we can handle it by giving the badges a customized text (and I hope that solves our issue here?).

Oh yes, that would be another option. If you go to your /admin/customize/site_texts page and search for the badge title you want to rename, you can select each language and manually set it to your preferred version for each in there: