Skip to content

Commit 1064c51

Browse files
committed
Fix typos [ci skip]
I wrote this shell script to find words from the Rails repo, so I can paste them into https://www.horsepaste.com/ for the [codenames game](https://en.m.wikipedia.org/wiki/Codenames_(board_game)). ```bash git grep -Il '' | \ grep -v -E "CHANGELOG|Gemfile|gemspec|package\.json|yarn\.lock" | \ xargs cat | \ sed '/[^ ]\{10,\}/d' | \ sed 's/\([A-Z]\)/ \1/g' | \ tr 'A-Z' 'a-z' | \ tr -c -s 'a-z' '\n' | \ sed '/^.\{0,3\}$/d' | \ sort | \ uniq | \ tr '\n' ',' | \ pbcopy ``` You can see the result in https://www.horsepaste.com/rails-fixed. Click "Next game" to cycle the words. Found some typos in the codebase from this 😂 This is how I generated the list of possible typos: ```bash git grep -Il '' | \ grep -v -E "CHANGELOG|Gemfile|gemspec|package\.json|yarn\.lock" | \ xargs cat | \ sed '/[^ ]\{10,\}/d' | \ sed 's/\([A-Z]\)/ \1/g' | \ tr 'A-Z' 'a-z' | \ tr -c -s 'a-z' '\n' | \ sed '/^.\{0,3\}$/d' | \ sort | \ uniq | \ aspell --ignore-case list ``` I manually reviewed the list and made the corrections in this commit. The rest on the list are either: * Bugs in my script: it split things like "doesn't" into "doesn" and "t", if find things like `#ffffff` and extracts "ffffff" as a word, etc * British spelling: honour, optimised * Foreign words: bonjour, espanol * Names: nginx, hanekawa * Technical words: mutex, xhtml * Portmanteau words: autosave, nodelist * Invented words: camelize, coachee * Shortened words: attrs, repo * Deliberate typos: hllo, hillo (used in code examples, etc) * Lorem ipsum words: arcu, euismod This is the [output](https://gist.github.com/chancancode/eb0b573d667dc31906f33f1fb0b22313) of the script *after* fixing the typos included in this commit. In theory, someone can run that command again in the future and compare the output to catch new typos (i.e. using my list to filter out known typos). Limitations: the aspell dictionary could be wrong, I could have miss things, and my script ignores words that are less than 3 characters or longer than 10 characters.
1 parent b69ac96 commit 1064c51

File tree

5 files changed

+5
-5
lines changed

5 files changed

+5
-5
lines changed

actionpack/lib/action_dispatch/middleware/templates/routes/_table.html.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@
9696
</table>
9797

9898
<script type='text/javascript'>
99-
// support forEarch iterator on NodeList
99+
// support forEach iterator on NodeList
100100
NodeList.prototype.forEach = Array.prototype.forEach;
101101

102102
// Enables path search functionality

actionview/test/ujs/public/test/data-remote.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ module('data-remote', {
3737
href: '/echo',
3838
'data-remote': 'true',
3939
disabled: 'disabled',
40-
text: 'Disabed link'
40+
text: 'Disabled link'
4141
}))
4242
.find('form').append($('<input type="text" name="user_name" value="john">'))
4343

activerecord/lib/active_record/relation/query_methods.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ def not(opts, *rest)
7070
@scope
7171
end
7272

73-
# Returns a new relation with left outer joins and where clause to idenitfy
73+
# Returns a new relation with left outer joins and where clause to identify
7474
# missing relations.
7575
#
7676
# For example, posts that are missing a related author:

activestorage/lib/active_storage/analyzer.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ def self.accept?(blob)
1313
end
1414

1515
# Implement this method in concrete subclasses. It will determine if blob analysis
16-
# should be done in a job or performed inine. By default, analysis is enqueued in a job.
16+
# should be done in a job or performed inline. By default, analysis is enqueued in a job.
1717
def self.analyze_later?
1818
true
1919
end

activesupport/test/core_ext/module_test.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ def test_delegation_with_allow_nil_and_nil_value
278278
assert_nil rails.name
279279
end
280280

281-
# Ensures with check for nil, not for a falseish target.
281+
# Ensures with check for nil, not for a falsy target.
282282
def test_delegation_with_allow_nil_and_false_value
283283
project = Project.new(false, false)
284284
assert_raise(NoMethodError) { project.name }

0 commit comments

Comments
 (0)