From dbd1bdaeed596f14af89d662e73030bb02571cfd Mon Sep 17 00:00:00 2001 From: Ruben Davila Date: Wed, 3 May 2017 21:05:38 -0500 Subject: More updates for translations plus some refactoring. --- lib/api/api.rb | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lib/api/api.rb') 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) -- cgit v1.2.1