diff options
author | Ruben Davila <rdavila84@gmail.com> | 2017-05-04 05:05:38 +0300 |
---|---|---|
committer | Ruben Davila <rdavila84@gmail.com> | 2017-05-04 05:08:43 +0300 |
commit | dbd1bdaeed596f14af89d662e73030bb02571cfd (patch) | |
tree | 16712553353aa5f4f43997863357da9fd0347ce9 /lib/api/api.rb | |
parent | b7f01f2b18940eb8dc0fa30e8ebbf1784c864304 (diff) |
More updates for translations plus some refactoring.
Diffstat (limited to 'lib/api/api.rb')
-rw-r--r-- | lib/api/api.rb | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/api/api.rb b/lib/api/api.rb index 1bf20f76ad6..302ccd3e532 100644 --- a/lib/api/api.rb +++ b/lib/api/api.rb @@ -44,6 +44,9 @@ module API end before { allow_access_with_scope :api } + before { Gitlab::I18n.set_locale(current_user) } + + after { Gitlab::I18n.reset_locale } rescue_from Gitlab::Access::AccessDeniedError do rack_response({ 'message' => '403 Forbidden' }.to_json, 403) |