Issue with badge translate

I went to Admin -> Customize -> Text and changed “Anniversary” to “TestName”

I then changed Icon back to fa-clock-o and the name back to “Anniversary”

The icon changed back OK, but the name is still “TestName” on the public Badges page even though the Admin page shows the value as “Anniversary”

I’m not sure which, but I think either a scheduled sidekiq job will need to run or a rebuild will need to be run. Else it’s a Bug (though I did not see any error messages in the console and the network pane didn’t have any fail headers)

2 Likes

Nah, i cannot change name of badge even if i trying to name it in english. I think this a bug. I’m trying to rebuild app and clear my cache but there is no effect:(

IIRC, this seems oddly familiar to the YAML issues I found prior with the Topic/Post Reply buttons, where due to keys missing the saving of said translation fails.

@Falco, do you think that may be the case here? My sandbox server is down right now and I’ve got to be running out soon so I really don’t have time to throw something up to validate my thoughts this weekend.

That sounds like a probable cause.

@YesYesiAmKamil if you try changing the name for “editor” which has all 3 translations - name, description and long_description does that work?

No, i’m trying to change “Editor” to “Editor 1” in Russian translate and this is not working.
P.S. I’ve already edit the icon of Editor badge a few days ago. As i say — there is a sirious dependence between the fact that you edit default icon to custom and the fact that you try to change a badge title after that.

Yes, I think it is a Bug.

  • changed the locale to Russian
  • changed the Editor Badge Icon
  • changed the Editor Badge Name
  • did not change the First Mention Badge Icon
  • changed the First Mention Badge Name

2 Likes

That’s a good news! What i should do know? It’s a bug of translation?

I’d hold off on doing anything more until someone more familiar with the code has a chance to look into it.

I doubt if your situation is all that common so the problem has not surfaced before.
i.e.

  • non-default locale
  • Badge Icon changed
  • attempt to change Badge Name

But there is definitely something going on. I went to see if I could repro in Spanish and discovered the Russian has become “stuck”

2 Likes

Thank you!
I hope that developers will make a fix.

Thanks @YesYesiAmKamil for the report and @Mittineague for the reproduction steps.

This fixes both issues :cherries:

https://github.com/discourse/discourse/commit/f51e3b21317549abe6d41309f6a7b207cfc420d0

As it turns out, if you’ve changed the default locale in the site settings, changing any of the system badges would overwrite their “name” with the localized name which breaks all the translation overrides (because we use the name of the badge as the key of the translation string).

3 Likes

Sorry, i’m absolule dummy in all that things. You sent a page from Github, so what i should do now?
This issue will be fixed in one of the next release of Discourse or i should do some changes through the Terminal?

You will need to rebuild your Discourse.

SSH into your server and then do

cd /var/discourse
./launcher rebuild app
1 Like

Wow, thanks! I will try to do that.

1 Like

This topic was automatically closed after 6 hours. New replies are no longer allowed.