Some small fixes for the current I18n implementation

This commit is contained in:
Ruben Davila 2017-04-20 18:09:13 -05:00
parent 086700fa5b
commit 4471d7b84f
3 changed files with 5 additions and 4 deletions

View file

@ -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))

View file

@ -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

View file

@ -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