diff options
-rw-r--r-- | app/controllers/projects/cycle_analytics_controller.rb | 1 | ||||
-rw-r--r-- | config/initializers/fast_gettext.rb | 2 | ||||
-rw-r--r-- | lib/gitlab/i18n.rb | 6 |
3 files changed, 5 insertions, 4 deletions
diff --git a/app/controllers/projects/cycle_analytics_controller.rb b/app/controllers/projects/cycle_analytics_controller.rb index 88ac3ad046b..7ef8872a90b 100644 --- a/app/controllers/projects/cycle_analytics_controller.rb +++ b/app/controllers/projects/cycle_analytics_controller.rb @@ -4,6 +4,7 @@ class Projects::CycleAnalyticsController < Projects::ApplicationController include CycleAnalyticsParams before_action :authorize_read_cycle_analytics! + before_action :set_locale, only: :show def show @cycle_analytics = ::CycleAnalytics.new(@project, options(cycle_analytics_params)) diff --git a/config/initializers/fast_gettext.rb b/config/initializers/fast_gettext.rb index 54b0049033b..10a3ee02b85 100644 --- a/config/initializers/fast_gettext.rb +++ b/config/initializers/fast_gettext.rb @@ -1,3 +1,3 @@ FastGettext.add_text_domain 'gitlab', path: 'locale', type: :po -FastGettext.default_available_locales = Gitlab::I18n::AVAILABLE_LANGUAGES.keys FastGettext.default_text_domain = 'gitlab' +FastGettext.default_available_locales = Gitlab::I18n::AVAILABLE_LANGUAGES.keys diff --git a/lib/gitlab/i18n.rb b/lib/gitlab/i18n.rb index 0459def6517..64a86b55c7f 100644 --- a/lib/gitlab/i18n.rb +++ b/lib/gitlab/i18n.rb @@ -1,9 +1,9 @@ module Gitlab module I18n AVAILABLE_LANGUAGES = { - 'en' => 'English', - 'es' => 'Spanish', - 'de' => 'Deutsch' + 'en' => N_('English'), + 'es' => N_('Spanish'), + 'de' => N_('Deutsch') }.freeze end end |