Skip to content

Commit 8c147bc

Browse files
committed
Merge pull request rails#20918 from jonatack/fix-lookup-grammar
[skip ci] Lookup can be a noun but it is not a verb
2 parents 2c79122 + ea747f7 commit 8c147bc

File tree

7 files changed

+17
-14
lines changed

7 files changed

+17
-14
lines changed

actionpack/CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,8 @@
183183
*arthurnn*
184184

185185
* `ActionController#translate` supports symbols as shortcuts.
186-
When shortcut is given it also lookups without action name.
186+
When a shortcut is given it also performs the lookup without the action
187+
name.
187188

188189
*Max Melentiev*
189190

actionview/lib/action_view/helpers/date_helper.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ module DateHelper
7070
# distance_of_time_in_words(Time.now, Time.now) # => less than a minute
7171
#
7272
# With the <tt>scope</tt> option, you can define a custom scope for Rails
73-
# to lookup the translation.
73+
# to look up the translation.
7474
#
7575
# For example you can define the following in your locale (e.g. en.yml).
7676
#

actionview/lib/action_view/lookup_context.rb

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,11 @@
66
module ActionView
77
# = Action View Lookup Context
88
#
9-
# <tt>LookupContext</tt> is the object responsible to hold all information required to lookup
10-
# templates, i.e. view paths and details. The LookupContext is also responsible to
11-
# generate a key, given to view paths, used in the resolver cache lookup. Since
12-
# this key is generated just once during the request, it speeds up all cache accesses.
9+
# <tt>LookupContext</tt> is the object responsible for holding all information
10+
# required for looking up templates, i.e. view paths and details.
11+
# <tt>LookupContext</tt> is also responsible for generating a key, given to
12+
# view paths, used in the resolver cache lookup. Since this key is generated
13+
# only once during the request, it speeds up all cache accesses.
1314
class LookupContext #:nodoc:
1415
attr_accessor :prefixes, :rendered_format
1516

actionview/lib/action_view/rendering.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ def _render_template(options) #:nodoc:
103103
view_renderer.render(context, options)
104104
end
105105

106-
# Assign the rendered format to lookup context.
106+
# Assign the rendered format to look up context.
107107
def _process_format(format, options = {}) #:nodoc:
108108
super
109109
lookup_context.formats = [format.to_sym]

actionview/lib/action_view/view_paths.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,9 @@ def _prefixes # :nodoc:
3636
self.class._prefixes
3737
end
3838

39-
# <tt>LookupContext</tt> is the object responsible to hold all information required to lookup
40-
# templates, i.e. view paths and details. Check <tt>ActionView::LookupContext</tt> for more
41-
# information.
39+
# <tt>LookupContext</tt> is the object responsible for holding all
40+
# information required for looking up templates, i.e. view paths and
41+
# details. Check <tt>ActionView::LookupContext</tt> for more information.
4242
def lookup_context
4343
@_lookup_context ||=
4444
ActionView::LookupContext.new(self.class._view_paths, details_for_lookup, _prefixes)

activesupport/lib/active_support/core_ext/time/zones.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,8 @@ def find_zone!(time_zone)
6565
if !time_zone || time_zone.is_a?(ActiveSupport::TimeZone)
6666
time_zone
6767
else
68-
# lookup timezone based on identifier (unless we've been passed a TZInfo::Timezone)
68+
# Look up the timezone based on the identifier (unless we've been
69+
# passed a TZInfo::Timezone)
6970
unless time_zone.respond_to?(:period_for_local)
7071
time_zone = ActiveSupport::TimeZone[time_zone] || TZInfo::Timezone.get(time_zone)
7172
end

railties/lib/rails/generators/base.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,12 +103,12 @@ def self.hide!
103103
# hook_for :test_framework, as: :controller
104104
# end
105105
#
106-
# And now it will lookup at:
106+
# And now it will look up at:
107107
#
108108
# "test_unit:controller", "test_unit"
109109
#
110-
# Similarly, if you want it to also lookup in the rails namespace, you just
111-
# need to provide the :in value:
110+
# Similarly, if you want it to also look up in the rails namespace, you
111+
# just need to provide the :in value:
112112
#
113113
# class AwesomeGenerator < Rails::Generators::Base
114114
# hook_for :test_framework, in: :rails, as: :controller

0 commit comments

Comments
 (0)