提交 724eb9e6 编写于 作者: H Henrik N

Fix some typos, including a global "seperator" -> "separator".

上级 aaacc999
......@@ -876,8 +876,8 @@ def input_id_from_type(type)
input_name_from_type(type).gsub(/([\[\(])|(\]\[)/, '_').gsub(/[\]\)]/, '')
end
# Given an ordering of datetime components, create the selection html
# and join them with their appropriate seperators
# Given an ordering of datetime components, create the selection HTML
# and join them with their appropriate separators.
def build_selects_from_types(order)
select = ''
order.reverse.each do |type|
......
......@@ -140,7 +140,7 @@ def number_to_percentage(number, options = {})
# number_with_delimiter(12345678) # => 12,345,678
# number_with_delimiter(12345678.05) # => 12,345,678.05
# number_with_delimiter(12345678, :delimiter => ".") # => 12.345.678
# number_with_delimiter(12345678, :seperator => ",") # => 12,345,678
# number_with_delimiter(12345678, :separator => ",") # => 12,345,678
# number_with_delimiter(98765432.98, :delimiter => " ", :separator => ",")
# # => 98 765 432,98
#
......
......@@ -538,7 +538,7 @@ def auto_link_urls(text, html_options = {})
punctuation = ''
# detect already linked URLs
if $` =~ /<a\s[^>]*href="$/
# do not change string; URL is alreay linked
# do not change string; URL is already linked
href
else
# don't include trailing punctuation character as part of the URL
......
......@@ -258,9 +258,9 @@ def demodulize(class_name_in_module)
# # => <a href="/person/1-donald-e-knuth">Donald E. Knuth</a>
def parameterize(string, sep = '-')
re_sep = Regexp.escape(sep)
# replace accented chars with ther ascii equivalents
# Replace accented chars with their ASCII equivalents.
parameterized_string = transliterate(string)
# Turn unwanted chars into the seperator
# Turn unwanted chars into the separator.
parameterized_string.gsub!(/[^a-z0-9\-_\+]+/i, sep)
# No more than one of the separator in a row.
parameterized_string.squeeze!(sep)
......@@ -270,7 +270,7 @@ def parameterize(string, sep = '-')
end
# Replaces accented characters with their ascii equivalents.
# Replaces accented characters with their ASCII equivalents.
def transliterate(string)
Iconv.iconv('ascii//ignore//translit', 'utf-8', string).to_s
end
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册