<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -36,12 +36,35 @@ module ActivePresenter
       end
     end
     
-    def self.human_attribute_name(attribute_name)
+    def self.human_attribute_name(attribute_key_name, options = {})
       presentable_type = presented.keys.detect do |type|
-        attribute_name.to_s.starts_with?(&quot;#{type}_&quot;)
+        attribute_key_name.to_s.starts_with?(&quot;#{type}_&quot;) || attribute_key_name.to_s == type.to_s
       end
+      attribute_key_name_without_class = attribute_key_name.to_s.gsub(&quot;#{presentable_type}_&quot;, &quot;&quot;)
       
-      attribute_name.to_s.gsub(&quot;#{presentable_type}_&quot;, &quot;&quot;).humanize
+      if presented[presentable_type] and attribute_key_name_without_class != presentable_type.to_s
+        presented[presentable_type].human_attribute_name(attribute_key_name_without_class, options)
+      else
+        I18n.translate(presentable_type, options.merge(:default =&gt; presentable_type.to_s.humanize, :scope =&gt; [:activerecord, :models]))
+      end
+    end
+    
+    # Since ActivePresenter does not descend from ActiveRecord, we need to
+    # mimic some ActiveRecord behavior in order for the ActiveRecord::Errors
+    # object we're using to work properly.
+    #
+    # This problem was introduced with Rails 2.3.4.
+    # Fix courtesy http://gist.github.com/191263
+    def self.self_and_descendants_from_active_record # :nodoc:
+      [self]
+    end
+    
+    def self.human_name(options = {}) # :nodoc:
+      defaults = self_and_descendants_from_active_record.map do |klass|
+        :&quot;#{klass.name.underscore}&quot;
+      end 
+      defaults &lt;&lt; self.name.humanize
+      I18n.translate(defaults.shift, {:scope =&gt; [:activerecord, :models], :count =&gt; 1, :default =&gt; defaults}.merge(options))
     end
     
     # Accepts arguments in two forms. For example, if you had a SignupPresenter that presented User, and Account, you could specify arguments in the following two forms:</diff>
      <filename>lib/active_presenter/base.rb</filename>
    </modified>
    <modified>
      <diff>@@ -69,12 +69,44 @@ Expectations do
     s.errors.on(:user_login)
   end
 
-  expect ['User Password can not be blank'] do
+  expect &quot;can't be blank&quot; do
+    s = SignupPresenter.new
+    s.valid?
+    s.errors.on(:user_login)
+  end
+
+  expect [&quot;User Password can't be blank&quot;] do
     s = SignupPresenter.new(:user_login =&gt; 'login')
     s.valid?
     s.errors.full_messages
   end
 
+  expect 'c4N n07 83 8L4nK' do
+    old_locale = I18n.locale
+    I18n.locale = '1337'
+    
+    s = SignupPresenter.new(:user_login =&gt; nil)
+    s.valid?
+    message = s.errors.on(:user_login)
+    
+    I18n.locale = old_locale
+    
+    message
+  end
+
+  expect ['U53R pa22w0rD c4N n07 83 8L4nK'] do
+    old_locale = I18n.locale
+    I18n.locale = '1337'
+    
+    s = SignupPresenter.new(:user_login =&gt; 'login')
+    s.valid?
+    message = s.errors.full_messages
+    
+    I18n.locale = old_locale
+    
+    message
+  end
+
   expect ActiveRecord::Base.to.receive(:transaction) do
     s = SignupPresenter.new
     s.save</diff>
      <filename>test/base_test.rb</filename>
    </modified>
    <modified>
      <diff>@@ -8,6 +8,21 @@ ActiveRecord::Base.establish_connection('sqlite3')
 ActiveRecord::Base.logger = Logger.new(STDERR)
 ActiveRecord::Base.logger.level = Logger::WARN
 
+I18n.backend.store_translations '1337',
+  :activerecord =&gt; {
+    :models =&gt; {
+      :user =&gt; 'U53R'
+    },
+    :attributes =&gt; {
+      :user =&gt; {:password =&gt; 'pa22w0rD'}
+    },
+    :errors =&gt; {
+      :messages =&gt; {
+        :blank =&gt; 'c4N n07 83 8L4nK'
+      }
+    }
+  }
+  
 ActiveRecord::Schema.define(:version =&gt; 0) do
   create_table :users do |t|
     t.boolean  :admin,    :default =&gt; false
@@ -37,7 +52,11 @@ class User &lt; ActiveRecord::Base
   attr_accessor   :password_confirmation
 
   def presence_of_password
-    errors.add_to_base('Password can not be blank') if password.blank?
+    if password.blank?
+      attribute_name = I18n.t(:password, {:default =&gt; &quot;Password&quot;, :scope =&gt; [:activerecord, :attributes, :user]})
+      error_message = I18n.t(:blank, {:default =&gt; &quot;can't be blank&quot;, :scope =&gt; [:activerecord, :errors, :messages]})
+      errors.add_to_base(&quot;#{attribute_name} #{error_message}&quot;)
+    end
   end
 end
 class Account &lt; ActiveRecord::Base; end</diff>
      <filename>test/test_helper.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>4c0d8c801c5ad97f513af63f88244c57863caa0d</id>
    </parent>
  </parents>
  <author>
    <name>Steven Luscher</name>
    <email>sluscher@steven-luschers-macbook-pro.local</email>
  </author>
  <url>http://github.com/jamesgolick/active_presenter/commit/11930d37f1d180b66e04c323a97fc62288caa49e</url>
  <id>11930d37f1d180b66e04c323a97fc62288caa49e</id>
  <committed-date>2009-10-04T11:11:44-07:00</committed-date>
  <authored-date>2009-09-29T16:59:08-07:00</authored-date>
  <message>Brought error handling up to speed with respect to I18n. Fixed a bug introduced by Rails 2.3.4 at the same time.</message>
  <tree>9c6e25aea0215be82d788fe0089208009133edb3</tree>
  <committer>
    <name>Daniel Haran</name>
    <email>chebuctonian@gmail.com</email>
  </committer>
</commit>
