Commit 4471d7b8 authored by Ruben Davila's avatar Ruben Davila

Some small fixes for the current I18n implementation

parent 086700fa
...@@ -4,6 +4,7 @@ class Projects::CycleAnalyticsController < Projects::ApplicationController ...@@ -4,6 +4,7 @@ class Projects::CycleAnalyticsController < Projects::ApplicationController
include CycleAnalyticsParams include CycleAnalyticsParams
before_action :authorize_read_cycle_analytics! before_action :authorize_read_cycle_analytics!
before_action :set_locale, only: :show
def show def show
@cycle_analytics = ::CycleAnalytics.new(@project, options(cycle_analytics_params)) @cycle_analytics = ::CycleAnalytics.new(@project, options(cycle_analytics_params))
......
FastGettext.add_text_domain 'gitlab', path: 'locale', type: :po 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_text_domain = 'gitlab'
FastGettext.default_available_locales = Gitlab::I18n::AVAILABLE_LANGUAGES.keys
module Gitlab module Gitlab
module I18n module I18n
AVAILABLE_LANGUAGES = { AVAILABLE_LANGUAGES = {
'en' => 'English', 'en' => N_('English'),
'es' => 'Spanish', 'es' => N_('Spanish'),
'de' => 'Deutsch' 'de' => N_('Deutsch')
}.freeze }.freeze
end end
end end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment