<?xml version="1.0" encoding="UTF-8"?>
<ticket>
  <assigned-user-id type="integer">141</assigned-user-id>
  <attachments-count type="integer">1</attachments-count>
  <closed type="boolean">true</closed>
  <created-at type="datetime">2008-06-03T17:19:18+01:00</created-at>
  <creator-id type="integer">18585</creator-id>
  <milestone-due-on type="datetime" nil="true"></milestone-due-on>
  <milestone-id type="integer" nil="true"></milestone-id>
  <number type="integer">319</number>
  <permalink>validation-message-formatting-across-the-board</permalink>
  <priority type="integer">17176</priority>
  <project-id type="integer">8994</project-id>
  <raw-data type="binary" nil="true" encoding="base64"></raw-data>
  <state>duplicate</state>
  <tag>activerecord enhancement patch</tag>
  <title>Validation message formatting across the board</title>
  <updated-at type="datetime">2009-02-08T16:49:31+00:00</updated-at>
  <user-id type="integer">46636</user-id>
  <user-name>Alex</user-name>
  <creator-name>John Hume</creator-name>
  <assigned-user-name>Michael Koziarski</assigned-user-name>
  <url>http://rails.lighthouseapp.com/projects/8994/tickets/319</url>
  <original-body>This is a follow-up from #273.

This patch adds the same feature to the other validations where it made sense. (I didn't include validates_confirmation_of since that's for values you shouldn't be displaying (at least in any non-obnoxious usage).)

Also includes new/modified examples in the documentation.</original-body>
  <latest-body>This is a follow-up from #273.

This patch adds the same feature to the other validations where it made sense. (I didn't include validates_confirmation_of since that's for values you shouldn't be displaying (at least in any non-obnoxious usage).)

Also includes new/modified examples in the documentation.</latest-body>
  <original-body-html>&lt;div&gt;&lt;p&gt;
This is a follow-up from &lt;a href=&quot;/projects/8994/tickets/273&quot; title=&quot;Ticket #273&quot;&gt;#273&lt;/a&gt;.
&lt;/p&gt;&lt;p&gt;
This patch adds the same feature to the other validations where it made sense. (I didn't include validates_confirmation_of since that's for values you shouldn't be displaying (at least in any non-obnoxious usage).)
&lt;/p&gt;&lt;p&gt;
Also includes new/modified examples in the documentation.
&lt;/p&gt;&lt;/div&gt;</original-body-html>
  <versions type="array">
    <version type="Ticket::Version">
      <assigned-user-id type="integer" nil="true"></assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body>This is a follow-up from #273.

This patch adds the same feature to the other validations where it made sense. (I didn't include validates_confirmation_of since that's for values you shouldn't be displaying (at least in any non-obnoxious usage).)

Also includes new/modified examples in the documentation.</body>
      <body-html>&lt;div&gt;&lt;p&gt;
This is a follow-up from &lt;a href=&quot;/projects/8994/tickets/273&quot; title=&quot;Ticket #273&quot;&gt;#273&lt;/a&gt;.
&lt;/p&gt;&lt;p&gt;
This patch adds the same feature to the other validations where it made sense. (I didn't include validates_confirmation_of since that's for values you shouldn't be displaying (at least in any non-obnoxious usage).)
&lt;/p&gt;&lt;p&gt;
Also includes new/modified examples in the documentation.
&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">false</closed>
      <created-at type="datetime">2008-06-03T17:19:19+01:00</created-at>
      <creator-id type="integer">18585</creator-id>
      <diffable-attributes type="yaml">--- {}

</diffable-attributes>
      <milestone-id type="integer" nil="true"></milestone-id>
      <number type="integer">319</number>
      <permalink>validation-message-formatting-across-the-board</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">8994</project-id>
      <state>new</state>
      <tag nil="true"></tag>
      <title>Validation message formatting across the board</title>
      <updated-at type="datetime">2008-06-03T17:19:19+01:00</updated-at>
      <user-id type="integer">18585</user-id>
      <user-name>John Hume</user-name>
      <creator-name>John Hume</creator-name>
      <assigned-user-name nil="true"></assigned-user-name>
      <url>http://rails.lighthouseapp.com/projects/8994/tickets/319</url>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">141</assigned-user-id>
      <attachments-count type="integer">1</attachments-count>
      <body></body>
      <body-html></body-html>
      <closed type="boolean">false</closed>
      <created-at type="datetime">2008-06-03T23:44:43+01:00</created-at>
      <creator-id type="integer">18585</creator-id>
      <diffable-attributes type="yaml">--- 
:assigned_user: 
</diffable-attributes>
      <milestone-id type="integer" nil="true"></milestone-id>
      <number type="integer">319</number>
      <permalink>validation-message-formatting-across-the-board</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">8994</project-id>
      <state>new</state>
      <tag nil="true"></tag>
      <title>Validation message formatting across the board</title>
      <updated-at type="datetime">2008-06-03T23:44:43+01:00</updated-at>
      <user-id type="integer">141</user-id>
      <user-name>Michael Koziarski</user-name>
      <creator-name>John Hume</creator-name>
      <assigned-user-name>Michael Koziarski</assigned-user-name>
      <url>http://rails.lighthouseapp.com/projects/8994/tickets/319</url>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">141</assigned-user-id>
      <attachments-count type="integer">1</attachments-count>
      <body>Sorry it took so long for me to get back to this, but the patch nolonger applies cleanly. 

If you rebase it I'll be happy to apply this.</body>
      <body-html>&lt;div&gt;&lt;p&gt;Sorry it took so long for me to get back to this, but the patch
nolonger applies cleanly.&lt;/p&gt;
&lt;p&gt;If you rebase it I'll be happy to apply this.&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">false</closed>
      <created-at type="datetime">2008-08-31T18:40:38+01:00</created-at>
      <creator-id type="integer">18585</creator-id>
      <diffable-attributes type="yaml">--- 
:tag: 
</diffable-attributes>
      <milestone-id type="integer" nil="true"></milestone-id>
      <number type="integer">319</number>
      <permalink>validation-message-formatting-across-the-board-2</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">8994</project-id>
      <state>new</state>
      <tag>activerecord enhancement patch</tag>
      <title>Validation message formatting across the board</title>
      <updated-at type="datetime">2008-08-31T18:40:38+01:00</updated-at>
      <user-id type="integer">141</user-id>
      <user-name>Michael Koziarski</user-name>
      <creator-name>John Hume</creator-name>
      <assigned-user-name>Michael Koziarski</assigned-user-name>
      <url>http://rails.lighthouseapp.com/projects/8994/tickets/319</url>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">141</assigned-user-id>
      <attachments-count type="integer">1</attachments-count>
      <body>Will do.</body>
      <body-html>&lt;div&gt;&lt;p&gt;Will do.&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">false</closed>
      <created-at type="datetime">2008-09-01T04:25:47+01:00</created-at>
      <creator-id type="integer">18585</creator-id>
      <diffable-attributes type="yaml">--- {}

</diffable-attributes>
      <milestone-id type="integer" nil="true"></milestone-id>
      <number type="integer">319</number>
      <permalink>validation-message-formatting-across-the-board-3</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">8994</project-id>
      <state>new</state>
      <tag>activerecord enhancement patch</tag>
      <title>Validation message formatting across the board</title>
      <updated-at type="datetime">2008-09-01T04:25:47+01:00</updated-at>
      <user-id type="integer">18585</user-id>
      <user-name>John Hume</user-name>
      <creator-name>John Hume</creator-name>
      <assigned-user-name>Michael Koziarski</assigned-user-name>
      <url>http://rails.lighthouseapp.com/projects/8994/tickets/319</url>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">141</assigned-user-id>
      <attachments-count type="integer">1</attachments-count>
      <body>After a look at the conflict, I think this patch is now moot. It appears the I18n effort has resulted in {{value}} always being available for interpolation in error messages.

It took me a while to figure out how the old-style substitution is still supported. I finally found this hack in simple.rb:

@@@ ruby
string = string.gsub(/%d/, '{{count}}').gsub(/%s/, '{{value}}')
@@@

If I'm missing anything let me know. Otherwise I guess this ticket should be closed.
-hume.</body>
      <body-html>&lt;div&gt;&lt;p&gt;After a look at the conflict, I think this patch is now moot. It
appears the I18n effort has resulted in {{value}} always being
available for interpolation in error messages.&lt;/p&gt;
&lt;p&gt;It took me a while to figure out how the old-style substitution
is still supported. I finally found this hack in simple.rb:&lt;/p&gt;


&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;
string = string.gsub(/%d/, '{{count}}').gsub(/%s/, '{{value}}')
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;If I'm missing anything let me know. Otherwise I guess this
ticket should be closed. -hume.&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">false</closed>
      <created-at type="datetime">2008-09-03T05:51:50+01:00</created-at>
      <creator-id type="integer">18585</creator-id>
      <diffable-attributes type="yaml">--- {}

</diffable-attributes>
      <milestone-id type="integer" nil="true"></milestone-id>
      <number type="integer">319</number>
      <permalink>validation-message-formatting-across-the-board-4</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">8994</project-id>
      <state>new</state>
      <tag>activerecord enhancement patch</tag>
      <title>Validation message formatting across the board</title>
      <updated-at type="datetime">2008-09-03T05:51:50+01:00</updated-at>
      <user-id type="integer">18585</user-id>
      <user-name>John Hume</user-name>
      <creator-name>John Hume</creator-name>
      <assigned-user-name>Michael Koziarski</assigned-user-name>
      <url>http://rails.lighthouseapp.com/projects/8994/tickets/319</url>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">141</assigned-user-id>
      <attachments-count type="integer">1</attachments-count>
      <body></body>
      <body-html></body-html>
      <closed type="boolean">true</closed>
      <created-at type="datetime">2008-12-20T19:18:04+00:00</created-at>
      <creator-id type="integer">18585</creator-id>
      <diffable-attributes type="yaml">--- 
:state: new
</diffable-attributes>
      <milestone-id type="integer" nil="true"></milestone-id>
      <number type="integer">319</number>
      <permalink>validation-message-formatting-across-the-board</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">8994</project-id>
      <state>duplicate</state>
      <tag>activerecord enhancement patch</tag>
      <title>Validation message formatting across the board</title>
      <updated-at type="datetime">2008-12-20T19:18:06+00:00</updated-at>
      <user-id type="integer">1366</user-id>
      <user-name>Pratik</user-name>
      <creator-name>John Hume</creator-name>
      <assigned-user-name>Michael Koziarski</assigned-user-name>
      <url>http://rails.lighthouseapp.com/projects/8994/tickets/319</url>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">141</assigned-user-id>
      <attachments-count type="integer">1</attachments-count>
      <body>This raises two issues:

a: more than one %s causes problem thru interpolation key interambiguity (gsub results in more than one {{value}}s)
b: {{value}} in beginning does not work

alex</body>
      <body-html>&lt;div&gt;&lt;p&gt;This raises two issues:&lt;/p&gt;
&lt;p&gt;a: more than one %s causes problem thru interpolation key
interambiguity (gsub results in more than one {{value}}s) b:
{{value}} in beginning does not work&lt;/p&gt;
&lt;p&gt;alex&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">true</closed>
      <created-at type="datetime">2009-02-08T14:11:09+00:00</created-at>
      <creator-id type="integer">18585</creator-id>
      <diffable-attributes type="yaml">--- {}

</diffable-attributes>
      <milestone-id type="integer" nil="true"></milestone-id>
      <number type="integer">319</number>
      <permalink>validation-message-formatting-across-the-board</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">8994</project-id>
      <state>duplicate</state>
      <tag>activerecord enhancement patch</tag>
      <title>Validation message formatting across the board</title>
      <updated-at type="datetime">2009-02-08T14:11:13+00:00</updated-at>
      <user-id type="integer">46636</user-id>
      <user-name>Alex</user-name>
      <creator-name>John Hume</creator-name>
      <assigned-user-name>Michael Koziarski</assigned-user-name>
      <url>http://rails.lighthouseapp.com/projects/8994/tickets/319</url>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">141</assigned-user-id>
      <attachments-count type="integer">1</attachments-count>
      <body>b works by quoting the translation</body>
      <body-html>&lt;div&gt;&lt;p&gt;b works by quoting the translation&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">true</closed>
      <created-at type="datetime">2009-02-08T16:49:30+00:00</created-at>
      <creator-id type="integer">18585</creator-id>
      <diffable-attributes type="yaml">--- {}

</diffable-attributes>
      <milestone-id type="integer" nil="true"></milestone-id>
      <number type="integer">319</number>
      <permalink>validation-message-formatting-across-the-board</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">8994</project-id>
      <state>duplicate</state>
      <tag>activerecord enhancement patch</tag>
      <title>Validation message formatting across the board</title>
      <updated-at type="datetime">2009-02-08T16:49:31+00:00</updated-at>
      <user-id type="integer">46636</user-id>
      <user-name>Alex</user-name>
      <creator-name>John Hume</creator-name>
      <assigned-user-name>Michael Koziarski</assigned-user-name>
      <url>http://rails.lighthouseapp.com/projects/8994/tickets/319</url>
    </version>
  </versions>
  <attachments type="array">
    <attachment type="Attachment">
      <code>0c65816c77b454986773adfc056ba62b2ef23d9a</code>
      <content-type>text/plain</content-type>
      <created-at type="datetime">2008-06-03T17:19:19+01:00</created-at>
      <filename>consistent_documented_formatted_error_messages.diff</filename>
      <height type="integer" nil="true"></height>
      <id type="integer">25669</id>
      <size type="integer">13938</size>
      <uploader-id type="integer">18585</uploader-id>
      <width type="integer" nil="true"></width>
      <url>http://rails.lighthouseapp.com/attachments/25669/consistent_documented_formatted_error_messages.diff</url>
    </attachment>
  </attachments>
</ticket>
