From cf5b70fe37a35a410cd562d4f7d5653f7d4655cb Mon Sep 17 00:00:00 2001 From: Seb Bacon Date: Thu, 13 Jan 2011 17:41:44 +0000 Subject: top-level gettext functions already available --- app/controllers/application_controller.rb | 3 +++ 1 file changed, 3 insertions(+) (limited to 'app/controllers/application_controller.rb') diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 1628d2f31..0ec8daf0a 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -12,6 +12,7 @@ class ApplicationController < ActionController::Base # Standard headers, footers and navigation for whole site layout "default" + before_filter :set_gettext_locale # scrub sensitive parameters from the logs @@ -24,6 +25,8 @@ class ApplicationController < ActionController::Base return site_name end + include FastGettext::Translation # make functions like _, n_, N_ etc available) + # Help work out which request causes RAM spike. # http://www.codeweblog.com/rails-to-monitor-the-process-of-memory-leaks-skills/ # This shows the memory use increase of the Ruby process due to the request. -- cgit v1.2.3