# How to have both {{ and %{ placeholders replaced?

**URL:** <https://www.ruby-forum.com/t/how-to-have-both-and-placeholders-replaced/210124>\
**Category:** Rails I18n\
**Created:** [July 31, 2011, 6:14pm UTC](https://www.ruby-forum.com/t/how-to-have-both-and-placeholders-replaced/210124 "2011-07-31T18:14:25Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![dubstep](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/cdc98d/32.png) [@dubstep](https://www.ruby-forum.com/u/dubstep)\
**Post date:** [July 31, 2011, 6:14pm UTC](https://www.ruby-forum.com/t/how-to-have-both-and-placeholders-replaced/210124/1 "2011-07-31T18:14:25Z")

</div>

Hi,

I’m working on a Rails app I didn’t touched since a year 😉 It’s a  
2.3.8 app, and my first surprise was to see things like

```
{{count}} errors prohibited this {{model}} from being saved
There were problems with the following fields:
{{attribute}} {{message}}

```

Apparently {{ aren’t replaced anymore since %{ is the newer syntax.  
Turns out I used %{ as well, probably because I red about having to  
use it as the “new standard”, but most of those {{ are from Rails  
itself. Is there an option to have both replaced or should I use an  
older gem, or, or or, …

---

<div class="post-metadata">

**Author:** ![StuFF\_mc\_S.com](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/53a042/32.png) [@StuFF\_mc\_S.com](https://www.ruby-forum.com/u/StuFF_mc_S.com)\
**Post date:** [July 31, 2011, 7:05pm UTC](https://www.ruby-forum.com/t/how-to-have-both-and-placeholders-replaced/210124/2 "2011-07-31T19:05:06Z")

</div>

Folks, FYI… Using 2.3.11 instead of 2.3.8 seems to solve the  
problem. What’s also totally unclear for me is _how_ the i18n gem is  
“required”. I removed it, and it still works. One of my idea was to  
use and old i18n gem, but I didn’t even have to do so, as using Rails  
2.3.11 seems to fix the problem.

I need to mention that it’s not a “production” app, it’s an app I have  
to have running in the state in which it was a year ago, so it’s  
really not a bad thing (actually a good one) if I’m running with an  
old i18n gem - or for that matter with rails 2

On Jul 31, 6:13pm, “StuFF mc (.com)” \<mc

---

<div class="post-metadata">

**Author:** ![StuFF\_mc\_S.com](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/53a042/32.png) [@StuFF\_mc\_S.com](https://www.ruby-forum.com/u/StuFF_mc_S.com)\
**Post date:** [July 31, 2011, 7:11pm UTC](https://www.ruby-forum.com/t/how-to-have-both-and-placeholders-replaced/210124/3 "2011-07-31T19:11:53Z")

</div>

As I understand it, i18n is bundled in Rails, but if you have a newer  
i18n gem outside Rails, it picks that one up instead.

On Sun, Jul 31, 2011 at 19:04, StuFF mc (.com)
