FIX: Use correct locale for error messages (PR #10776)

Error messages for exceeded rate limits and invalid parameters always used the English locale instead of the default locale or the current user’s locale.


This pull request has been mentioned on Discourse Meta. There might be relevant details there:

Looks like the rspec failure might be legit - worth checking before merging

Yeah, I just noticed that API requests could run into rate limits or other errors while looking up the current_user. I added a commit to prevent that from happening.