Language Changed to Japanese for multiple users

AI-generated summary

Users reported that the interface language on their Discourse forums unexpectedly changed to Japanese and other languages, with some experiencing random language switches. RyanK first noticed the issue, which others confirmed, and it self-corrected after a few minutes. Martin_Cash began gathering details, while codinghorror suggested the issue might be related to recent changes by @fantasticfears to make site settings locale-specific, possibly requiring a rollback. alexs and AnimeCanuck confirmed the problem across multiple forums, including WaniKani, with no clear cause like VPNs or regional settings. Seth_Godin noted the issue was worsening. sam reassured users it was being addressed. fantasticfears investigated potential issues with allow_user_locale and set_locale_from_accept_language_header, though j.jaffeux couldn’t reproduce it locally. tgxworld confirmed the fix was implemented in a recent commit and deployed to hosted customers.

This morning I noticed that the interface had changed to Japanese and I had no idea how to change it back. I assumed I must have somehow pocket switched it on my phone, but then others told me the same thing happened to them. It self corrected within a few minutes, but we are still a little concerned. Is there a way to find out how this happened?

I just had report of this as well. I’m gathering details.

We think this is related to changes @fantasticfears made to allow site settings to be locale specific. It looks like we we will have to roll that back.

cc @sam

We’ve had quite a few users (including myself) report the issue -

for me, the language selection seems to be random, I’ve had it switch to other languages too. I’m not using a VPN.

It’s definitely happening to us over in the WaniKani forums. In fact, some of us are pretty confused as to why it’s happening - doesn’t seem to have to do with region… maybe IMEs that are installed (a few of us have gotten Japanese), but others have gotten Finnish and Korean… No VPNs, no Finnish language pack…

it seems to be getting worse, in that the entire interface has now changed for me.

We are on it, will have it resolved very soon

thanks @sam

you guys are astounding. it’s appreciated.

I couldn’t imagine why it’s crashing but I noticed allow_user_locale is on for reported sites as well as set_locale_from_accept_language_header. Maybe related settings’ types are changed to what is supposed to be but failing to be detecting by the validators. cc @sam

I suspected the same, but couldn’t reproduce the issue locally with those settings.

SiteSettings::TypeSupervisor merely flips some string type in DB to new types like email, username. So I think it’s not related.

The interface for logined user comes from current_user.effective_locale and passes through application view. The value shouldn’t be bumpy. Does the faulty instance get changed for their SiteSetting.default_locale?

This is fixed in

https://github.com/discourse/discourse/commit/412fa78b1f785fb8850b06933a4751acd1e1b5ee

and deployed to all of our hosted customers.