Russian strings for the flagging dialog here on meta

AI-generated summary

Users reported seeing Russian strings in the flagging dialog on Meta. @dandv and @TechnoBear shared screenshots of the issue. Others, such as @tgxworld and @fefrei, experienced the issue but couldn’t reproduce it after refreshing the page. @eviltrout suspected the issue was related to caching, which was confirmed by @gerhard. The problem was identified as caching flag descriptions translated server-side, and a solution was proposed by @riking to use cache_fragment("post_action_flag_types_#{scope.user.effective_locale}"). However, @sam suggested a modification to handle cases where the user is nil. The issue was eventually fixed by @sam with a commit to the Discourse repository.

I was trying to send a message to the user of this post and clicking the flag button got me this:

Far as I can tell, I haven’t been deported to Russia yet.

как дела?

9개의 좋아요

And I can confirm I get the same if I try to message you.

1개의 좋아요

I experienced this yesterday as well but it wasn’t russian for me. It magically went away after a couple of refreshes so I couldn’t reproduce it.

I’ve seen this issue in this topic, too – it disappeared after a refresh. I didn’t find a way to reproduce this afterwards.

I have a hunch this is related to the caching of the site json that @sam added. Is it caching the flag descriptions which are translated server side?

4개의 좋아요

Yes, it’s caching them…

Sooo… cache_fragment("post_action_flag_types_#{scope.user.effective_locale}") ?

3개의 좋아요

Yeah something like that, but allow for user nil

Oh right, I18n.locale should be set during the request. d’oh

Fixed per

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

6개의 좋아요

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