Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I18n.l Time.now raises I18n::MissingInterpolationArgument in 0.4.0 #20

Closed
apeiros opened this issue Jun 2, 2010 · 5 comments
Closed

Comments

@apeiros
Copy link

apeiros commented Jun 2, 2010

Doing I18n.l Time.now raises I18n::MissingInterpolationArgument: missing interpolation argument in "%{count}.%m.%Y %H:%M" ({:object=>"Wed Jun 02 10:25:27 +0200 2010"} given)
The translation string "%{count}.%m.%Y %H:%M" is in none of our locales, neither is it contained in I18n.backend.instance_variable_get(:@translations) from which I'd conclude that it is a hard-coded default.
Our localizations file (confirmed by retrieving it untranslated value from the I18n.backend) contains for en.time.formats.default: "%d.%m.%Y %H:%M" which doesn't match the one in the exception.

@knapo
Copy link
Collaborator

knapo commented Jun 2, 2010

which Rails version do you use? I18n 0.4.0 works with 2.3.6+

@josevalim
Copy link
Contributor

A quick search for %{count} inside the I18n library shows that nowhere inside the gem we have that translation stored. If you are using it inside Rails, try the following:

$ rails console
I18n.reload!
I18n.backend.send(:translations)

And see if it returns the guilty key! Thanks!

@knapo
Copy link
Collaborator

knapo commented Jun 2, 2010

It's probably due to AR's i18n_interpolation_deprecation.rb which has been removed in AR 2.3.6

@josevalim
Copy link
Contributor

Fixed.

@RajRoR
Copy link

RajRoR commented Nov 26, 2012

I know the issue is closed and fixed, but I have another solution which is explained on http://tech-brains.blogspot.in/2012/11/i18n-missing-interpolation-argument.html

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants