Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Breaking changes in v3.0.0 for users with language 'pt' #12082

Closed
hugogameiro opened this issue Oct 5, 2019 · 2 comments · Fixed by #12092

Comments

@hugogameiro
Copy link
Contributor

commented Oct 5, 2019

#11799 changes the language 'pt' to 'pt-PT'

I have notice that users that have set their language to 'pt' in the past (locale in the database) do not receive notifications (possible other issues) and there a lot of errors in Sidekiq because the language doesn't exist in https://github.com/tootsuite/mastodon/blob/master/config/application.rb

If the user affected goes to Preferences->Appearance and presses the 'save' button, the database gets updated and the issue is solved.

For admins, running something like update users set locale='pt-PT' where locale='pt'; on the database should fix the issue.

Probably this could be done in a future release automatically. Unfortunately this is way outside my knowledge of Ruby and I don't feel comfortable creating a PR that touches the database.

Also, it wouldn't be a bad idea to mention in a future release that anyone using DEFAULT_LOCALE=pt should change it to either DEFAULT_LOCALE=pt-PT or DEFAULT_LOCALE=pt-BR.

@noellabo

This comment has been minimized.

Copy link
Contributor

commented Oct 6, 2019

If you write within the knowledge of rails,

bin/rails r "User.where(locale: 'pt').in_batches.update_all(locale: 'pt-PT')"
@nightpool

This comment has been minimized.

Copy link
Collaborator

commented Oct 6, 2019

Gargron added a commit that referenced this issue Oct 7, 2019
Gargron added a commit that referenced this issue Oct 7, 2019
Gargron added a commit that referenced this issue Oct 7, 2019
Fix #12082
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.