This project is archived and is in readonly mode.

#2885 ✓committed
Sven Fuchs

Deprecation of old AR error message interpolation vars too greedy

Reported by Sven Fuchs | July 8th, 2009 @ 06:03 PM | in 2.x

I18n::Backend::Simple#interpolate_with_deprecated_syntax (part of ActiveRecord) makes old error messages (pre 2.2) still work with current ActiveRecord I18n. It's a bit too greedy though resulting in problems with Strings that are supposed to contain %d placeholders, like date formats.

The attached patch fixes that and makes #interpolate_with_deprecated_syntax only kick in when the user passed interpolation values to #t at all.

This should go into all upcoming 2.x versions as it's really a bug :) Afaik it doesn't need to go into 3.0 as the deprecation already has been entirely removed from that branch.

Comments and changes to this ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>

People watching this ticket

Attachments

Referenced by

Pages