mirror of
https://github.com/discourse/discourse.git
synced 2025-01-29 05:42:18 +08:00
6b36b0b68d
Our bulk report endpoint uses `hijack`, which does not use the current user's locale via the `with_resolved_locale` method in `ApplicationController`. This is happening because we are doing `around_action` to set the locale, then calling the code in the block inside the action directly when we use `hijack`. We can fix this by capturing `I18n.locale` when starting the hijack then using `I18n.with_locale` when evaluating the block inside `hijack`, this way the translations will always use the correct locale based on the current user. |
||
---|---|---|
.. | ||
fabricators | ||
fixtures | ||
generator | ||
helpers | ||
import_export | ||
initializers | ||
integration | ||
integrity | ||
jobs | ||
lib | ||
mailers | ||
migrations | ||
models | ||
multisite | ||
requests | ||
script/import_scripts | ||
serializers | ||
services | ||
support | ||
system | ||
tasks | ||
views | ||
rails_helper.rb | ||
regenerate_swagger_docs | ||
swagger_helper.rb |