diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/redmine/i18n.rb | 19 | ||||
-rw-r--r-- | lib/redmine/preparation.rb | 5 |
2 files changed, 5 insertions, 19 deletions
diff --git a/lib/redmine/i18n.rb b/lib/redmine/i18n.rb index a79b4fc68..0b31cb235 100644 --- a/lib/redmine/i18n.rb +++ b/lib/redmine/i18n.rb @@ -173,24 +173,5 @@ module Redmine def current_language ::I18n.locale end - - # Custom backend based on I18n::Backend::Simple with the following changes: - # * available_locales are determined by looking at translation file names - class Backend < ::I18n::Backend::Simple - module Implementation - # Get available locales from the translations filenames - def available_locales - @available_locales ||= begin - redmine_locales = Dir[Rails.root / 'config' / 'locales' / '*.yml'].map { |f| File.basename(f, '.yml').to_sym } - super & redmine_locales - end - end - end - - # Adds custom pluralization rules - include ::I18n::Backend::Pluralization - # Adds fallback to default locale for untranslated strings - include ::I18n::Backend::Fallbacks - end end end diff --git a/lib/redmine/preparation.rb b/lib/redmine/preparation.rb index a31204904..a7387f5dc 100644 --- a/lib/redmine/preparation.rb +++ b/lib/redmine/preparation.rb @@ -280,6 +280,11 @@ module Redmine {:controller => 'auth_sources', :action => 'index'}, :icon => 'server-authentication', :html => {:class => 'icon icon-server-authentication'} + menu.push :applications, {:controller => 'oauth2_applications', :action => 'index'}, + :if => Proc.new { Setting.rest_api_enabled? }, + :caption => :'doorkeeper.layouts.admin.nav.applications', + :icon => 'apps', + :html => {:class => 'icon icon-applications'} menu.push :plugins, {:controller => 'admin', :action => 'plugins'}, :last => true, :icon => 'plugins', |