Skip to content
Browse files

I18n: add aliases #t and #l to TranslationHelper#translate and #localize

  • Loading branch information...
1 parent 23fb26a commit 90a9637d41016c0d230ba36657e83a4f8d54cc46 @svenfuchs svenfuchs committed
Showing with 2 additions and 0 deletions.
  1. +2 −0 actionpack/lib/action_view/helpers/translation_helper.rb
View
2 actionpack/lib/action_view/helpers/translation_helper.rb
@@ -11,10 +11,12 @@ def translate(*args)
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

0 comments on commit 90a9637

Please sign in to comment.
Something went wrong with that request. Please try again.