Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
@mislav
23 lines (20 sloc) 0.559 kb
module WillPaginate
module I18n
def self.locale_dir
File.expand_path('../locale', __FILE__)
end
def self.load_path
Dir["#{locale_dir}/*.{rb,yml}"]
end
def will_paginate_translate(keys, options = {})
if defined? ::I18n
defaults = Array(keys).dup
defaults << Proc.new if block_given?
::I18n.translate(defaults.shift, options.merge(:default => defaults, :scope => :will_paginate))
else
key = Array === keys ? keys.first : keys
yield key, options
end
end
end
end
Jump to Line
Something went wrong with that request. Please try again.