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.
как дела?
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.
как дела?
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?
Yes, it’s caching them…
Sooo… cache_fragment("post_action_flag_types_#{scope.user.effective_locale}") ?
Yeah something like that, but allow for user nil
Oh right, I18n.locale should be set during the request. d’oh
This topic was automatically closed after 24 hours. New replies are no longer allowed.