diff options
author | Douwe Maan <douwe@gitlab.com> | 2017-05-25 18:05:06 +0000 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2017-05-25 18:05:06 +0000 |
commit | b3b6c78112c97df32c406f7dd18031e540df3297 (patch) | |
tree | 4abd36a4157b40fd3a6bdab227ca00b415a2f801 /app/controllers | |
parent | 43c3614ebfd3a224b9db5718f19aa1e1eb7e7e61 (diff) | |
parent | 5c921809cd86e1031a6a5075da142fef3bb01d6d (diff) | |
download | gitlab-ce-b3b6c78112c97df32c406f7dd18031e540df3297.tar.gz |
Merge branch '32748-emails-are-being-sent-with-the-wrong-language' into 'master'
Bugfix: Always use the default language when generating emails.
Closes #32748
See merge request !11662
Diffstat (limited to 'app/controllers')
-rw-r--r-- | app/controllers/application_controller.rb | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index ab5aed24917..47ce21d238b 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -283,12 +283,8 @@ class ApplicationController < ActionController::Base request.base_url end - def set_locale - Gitlab::I18n.set_locale(current_user) - - yield - ensure - Gitlab::I18n.reset_locale + def set_locale(&block) + Gitlab::I18n.with_user_locale(current_user, &block) end def sessionless_sign_in(user) |