This project is archived and is in readonly mode.
Validation message formatting across the board
-
Michael Koziarski
- Assigned user set to Michael Koziarski
-
Michael Koziarski
- Tag set to activerecord, enhancement, patch
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.
-
John Hume
Will do.
-
John Hume
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:
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.
-
Pratik
- State changed from new to duplicate
-
Alex
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
-
Alex
b works by quoting the translation
