32

I just earned the "access moderator tools" privilege, but the message under the achievements dialog is a bit odd:

enter image description here

I don't speak Spanish and (as far as I know) never indicated to Stack Overflow that I speak Spanish. Yet, the second sentence of the message is in Spanish and it isn't just a repeat of the first sentence, it has a whole new meaning. Even more interesting is that the message I see when I switch to Stack Overflow Meta is normal:

enter image description here

Can this bug be fixed?

5
  • 11
    Seems like a common bug with notifications that they some times show up in another language. MSE: Wrong language in recent achievements
    – VLAZ
    Commented May 29, 2023 at 13:14
  • 6
    This exact issue with this exact achievement was also reported on Meta PLDI
    – Henry Ecker Mod
    Commented May 29, 2023 at 14:04
  • 3
    Yes it's a cross network bug. It's still happening, on all sites. Commented May 29, 2023 at 14:09
  • 6
    I am (again) [status-review]ing this separately from the MSE bug report. While it's possible (or perhaps even highly likely that) this is the same bug, we have no way of knowing if resolving the russian language bug will also address this spanish language bug as we do not have access to the code responsible. We've also seen instances of bugs that SE needed to fix individually (like the series of HTML entities bug reports).
    – Henry Ecker Mod
    Commented May 29, 2023 at 14:09
  • 3
    It still blows my mind that apparently they have each sentence separately tokenised. That means the door is open for not only half the message appearing in a different language because of mysterious design choices, but to also get sentences which are not even tangibly related to each other because someone used the wrong lookup key to stitch them together.
    – Gimby
    Commented May 30, 2023 at 10:07

1 Answer 1

11

Firstly, congrats on access to mod tools! And thanks for the report! I've fixed this to correctly provide per site translations for the privilege help text.

The explanation is basically the same as past incarnations of this issue where we've had a "first hit; first cached" issue. The simple version of the fix is to just do the localization each time and never store the result. With something like this change:

- public static string Message = Localize("Learn more about it in the help center");
+ public static string Message => Localize("Learn more about it in the help center");

But we also still want to cache it, so I put in a PerLocaleDictionary (custom wrapper we use to store caches per site locale). Issue should be all set in production.

See Also: Wrong language in recent achievements

2
  • 1
    So it's still possible to use caching, but the problem was when the cache was populated? ... Why is the wrong result calculated when the cache is populated too early? Commented Sep 26 at 17:25
  • 4
    @KarlKnechtel, because we share the same web servers for all of our network sides (including non-english). Essentially a difference of caching once ever for all sites (bad), or caching once per locale (good).
    – KyleMit StaffMod
    Commented Sep 26 at 17:43

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .