You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
it gem seems to expect that I18n just ignores missing interpolations and returns uninterpolated but translated string. Then, it interpolates everything on its own. This hovewer fails with recent i18n (0.7.0) which by default raises the MissingInterpolationArgument exception on every missing interpolation that matches traditional interpolation regex (like %{email}). It only happens in the helper version of t and as a result it only happens in helper version of it which calls t helper. Using I18n.it allows to bypass this problem.
In my case, fixing the it helper was possible by adding the following into app initializer:
Sorry, I can't reproduce this error. The view helper of it works fine in my Rails 4.1.9 app with I18n 0.7.0 on Ruby 2.2.2, also with traditional interpolations. The missing_interpolation_argument_handler is raising an exception when I explicitly call it, so I haven't changed anything there - but using it it isn't triggered. Also all specs are green.
I would be happy if you're able to investigate this issue further. I reopen the issue then.
I was getting MissingInterpolationArgument exceptions too, using it 0.8.0, i18n 0.7.0 and rails 3.2.22.
Things worked again when I used It.it instead of it in my views. Although using It.it requires you to specify the full key (e.g. projects.show.title instead of .title in app/views/projects/show.html.erb).
Hi @airblade! Thanks for the report. Again I tried to reproduce it, but failed (see here). All works as expected.
Could you provide me with an example that demonstrates the bug? Can be a fork of that repo or your own stuff. If you don't want to post it publicly, you can also send it via email to igel@igels.net.
it
gem seems to expect that I18n just ignores missing interpolations and returns uninterpolated but translated string. Then,it
interpolates everything on its own. This hovewer fails with recent i18n (0.7.0) which by default raises the MissingInterpolationArgument exception on every missing interpolation that matches traditional interpolation regex (like%{email}
). It only happens in the helper version oft
and as a result it only happens in helper version ofit
which callst
helper. UsingI18n.it
allows to bypass this problem.In my case, fixing the
it
helper was possible by adding the following into app initializer:But it's not always a good solution. I think
it
should handle this internally as it's a matter of communication between it andI18n
.The text was updated successfully, but these errors were encountered: