diff options
author | Sven Fuchs <svenfuchs@artweb-design.de> | 2008-08-25 11:06:18 +0200 |
---|---|---|
committer | Sven Fuchs <svenfuchs@artweb-design.de> | 2008-08-25 11:06:18 +0200 |
commit | 90a9637d41016c0d230ba36657e83a4f8d54cc46 (patch) | |
tree | fd06c77e3259e59debc94ccf5a9383cc5059cbec | |
parent | 23fb26a0dcbd46d36bdbc2caa267aa3192f77a24 (diff) | |
download | rails-90a9637d41016c0d230ba36657e83a4f8d54cc46.tar.gz rails-90a9637d41016c0d230ba36657e83a4f8d54cc46.tar.bz2 rails-90a9637d41016c0d230ba36657e83a4f8d54cc46.zip |
I18n: add aliases #t and #l to TranslationHelper#translate and #localize
-rw-r--r-- | actionpack/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 60ac5c8790..de4c1d7689 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 |