
i18n fails interpolation with %% in strings (ArgumentError: one hash required)
Reported by Tobias Lütke | February 10th, 2010 @ 07:55 PM
Steps to reproduce error:
[tobi@tobbook6:~]% irb
requree-1.8.7-2009.10 > require 'rubygems'
=> true
ree-1.8.7-2009.10 > "hello %d%% of world" % 100
=> "hello 100% of world"
ree-1.8.7-2009.10 > require 'i18n'
=> true
ree-1.8.7-2009.10 > "hello %d%% of world" % 100
ArgumentError: one hash required
from /Users/tobi/.rvm/gems/ree-1.8.7-2009.10/gems/i18n-0.3.3/lib/i18n/core_ext/string/interpolate.rb:88:in `%'
from (irb):4
Comments and changes to this ticket
-
Sven Fuchs February 25th, 2010 @ 02:54 PM
- State changed from new to resolved
Thanks for reporting, Tobias!
This is fixed in http://github.com/svenfuchs/i18n/commit/bd740600683ca2aae78e4abf898... which is contained in I18n 0.3.4 and available on Gemcutter.
This was also reported on http://github.com/svenfuchs/i18n/issues/closed#issue/9
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
Internationalization API for Ruby.
This library is used in Ruby on Rails but also suited for use in other contexts.