Class: AdminTranslationsController

Inherits:
ApplicationController show all
Defined in:
app/controllers/admin_translations_controller.rb

Instance Method Summary collapse

Instance Method Details

#indexObject



3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# File 'app/controllers/admin_translations_controller.rb', line 3

def index
	#TODO Ennder correction : Rails 3 ? I18n.backend.send(:translations) renvoie une liste vide
	begin
		@traductions_all = I18n.backend.send(:translations)
	rescue _exception
		@traductions_all = []
		logger.error "échec I18n.backend.send(:translations) [#{_exception.message}]"
	end
	logger.debug "[#{@traductions_all.size}] traduction(s)"

	@locales_list = I18n.available_locales.inject(''){ |list, l|
		list << '&nbsp;&nbsp;<b>' + l.to_s + '</b>'
	}

	respond_to do |format|
		format.html # index.html.erb
	end
end