Permalink
Browse files

Use activerecord translations by default.

  • Loading branch information...
1 parent 802e875 commit 62a4ca585ec01a8ec99680b739fc45c4bbb97cbd @josevalim josevalim committed Dec 29, 2009
View
4 lib/mail_form.rb
@@ -51,5 +51,5 @@ def get_from_class_and_eval(resource, method)
end
end
-
-I18n.load_path.unshift File.expand_path('mail_form/locales/en.yml', File.dirname(__FILE__))
+base = defined?(ActiveRecord) ? :ar : :amo
+I18n.load_path.unshift File.expand_path("mail_form/locales/#{base}.en.yml", File.dirname(__FILE__))
View
0 lib/mail_form/locales/en.yml → lib/mail_form/locales/amo.en.yml
File renamed without changes.
View
4 lib/mail_form/locales/ar.en.yml
@@ -0,0 +1,4 @@
+en:
+ mail_form:
+ errors:
+ messages: :"activerecord.errors.messages"

0 comments on commit 62a4ca5

Please sign in to comment.