From 90a9637d41016c0d230ba36657e83a4f8d54cc46 Mon Sep 17 00:00:00 2001 From: Sven Fuchs Date: Mon, 25 Aug 2008 11:06:18 +0200 Subject: [PATCH] I18n: add aliases #t and #l to TranslationHelper#translate and #localize --- .../lib/action_view/helpers/translation_helper.rb | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/actionpack/lib/action_view/helpers/translation_helper.rb b/actionpack/lib/action_view/helpers/translation_helper.rb index 60ac5c8..de4c1d7 100644 --- a/actionpack/lib/action_view/helpers/translation_helper.rb +++ b/actionpack/lib/action_view/helpers/translation_helper.rb @@ -11,10 +11,12 @@ module ActionView keys = I18n.send :normalize_translation_keys, e.locale, e.key, e.options[:scope] content_tag('span', keys.join(', '), :class => 'translation_missing') end + alias :t :translate def localize(*args) I18n.localize *args end + alias :l :localize end end end \ No newline at end of file -- 1.5.3.7