Badge Notifications aren't translated when granted in batches

Eu não sou do Brasil, mas eu falo um pouco português :smiley:

Seems like this might actually be a bug? This is what I’m seeing.

So the translation is pulled on the badges page, but not in the notifications dropdown, for some reason… (but some translations are pulled in the notifications dropdown).

This is a legit bug it looks like!

The call here:

https://github.com/discourse/discourse/blob/4061725a95f5013d0701e2c5ed6dc79f78e14dae/app/services/badge_granter.rb#L308

isn’t wrapped on i18n as this one:

https://github.com/discourse/discourse/blob/4061725a95f5013d0701e2c5ed6dc79f78e14dae/app/services/badge_granter.rb#L33

So, some badges get translated while the ones that are granted trough the big granter job aren’t.

4 Likes

Should we post this as a bug? I don’t fully understand the issue, so if you don’t mind posting it, that would be great! Thanks so much for looking in to this! I thought I was losing my mind…

1 Like

Ok, I have a fix:

https://github.com/discourse/discourse/pull/4476

Since this can be pretty perf sensitive, when we make this :100: you gonna have your badge notifications all localized!

3 Likes