From 724eb9e6121b36e61f373ba4bdcce29f3d0c78da Mon Sep 17 00:00:00 2001 From: Henrik N Date: Thu, 12 Mar 2009 07:29:57 +0100 Subject: [PATCH] Fix some typos, including a global "seperator" -> "separator". --- actionpack/lib/action_view/helpers/date_helper.rb | 4 ++-- actionpack/lib/action_view/helpers/number_helper.rb | 2 +- actionpack/lib/action_view/helpers/text_helper.rb | 2 +- activesupport/lib/active_support/inflector.rb | 6 +++--- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/actionpack/lib/action_view/helpers/date_helper.rb b/actionpack/lib/action_view/helpers/date_helper.rb index b7ef1fb90d..c74909a360 100644 --- a/actionpack/lib/action_view/helpers/date_helper.rb +++ b/actionpack/lib/action_view/helpers/date_helper.rb @@ -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| diff --git a/actionpack/lib/action_view/helpers/number_helper.rb b/actionpack/lib/action_view/helpers/number_helper.rb index 539f43c6e3..dea958deaf 100644 --- a/actionpack/lib/action_view/helpers/number_helper.rb +++ b/actionpack/lib/action_view/helpers/number_helper.rb @@ -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 # diff --git a/actionpack/lib/action_view/helpers/text_helper.rb b/actionpack/lib/action_view/helpers/text_helper.rb index 63fe0c1c57..feeddba78d 100644 --- a/actionpack/lib/action_view/helpers/text_helper.rb +++ b/actionpack/lib/action_view/helpers/text_helper.rb @@ -538,7 +538,7 @@ def auto_link_urls(text, html_options = {}) punctuation = '' # detect already linked URLs if $` =~ /]*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 diff --git a/activesupport/lib/active_support/inflector.rb b/activesupport/lib/active_support/inflector.rb index 5ff6f50fb3..2e2a63c3e7 100644 --- a/activesupport/lib/active_support/inflector.rb +++ b/activesupport/lib/active_support/inflector.rb @@ -258,9 +258,9 @@ def demodulize(class_name_in_module) # # => Donald E. Knuth 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 -- GitLab