Skip to content

Commit

Permalink
Misc. typos (mastodon#8694)
Browse files Browse the repository at this point in the history
Found via `codespell -q 3 --skip="./app/javascript/mastodon/locales,./config/locales"`
  • Loading branch information
luzpaz authored and Gargron committed Sep 13, 2018
1 parent 4959ead commit 40dd19b
Show file tree
Hide file tree
Showing 15 changed files with 18 additions and 18 deletions.
2 changes: 1 addition & 1 deletion app/controllers/auth/sessions_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ def home_paths(resource)
def clear_site_data
return if continue_after?

# Should be '"*"' but that doen't work in Chrome (neither does '"executionContexts"')
# Should be '"*"' but that doesn't work in Chrome (neither does '"executionContexts"')
# https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Clear-Site-Data
response.headers['Clear-Site-Data'] = '"cache", "cookies", "storage"'
end
Expand Down
2 changes: 1 addition & 1 deletion app/javascript/mastodon/features/compose/util/url_regex.js
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ export const urlRegex = (function() {
')' +
'\\)',
'i');
// Valid end-of-path chracters (so /foo. does not gobble the period).
// Valid end-of-path characters (so /foo. does not gobble the period).
// 1. Allow =&# for empty URL parameters and other URL-join artifacts
regexen.validUrlPathEndingChars = regexSupplant(/[^#{spaces_group}\(\)\?!\*';:=\,\.\$%\[\]#{pd}~&\|@]|(?:#{validUrlBalancedParens})/i);
// Allow @ in a url, but only in the middle. Catch things like http://example.com/@user/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ WrappedSwitch.propTypes = {
children: PropTypes.node,
};

// Small Wraper to extract the params from the route and pass
// Small Wrapper to extract the params from the route and pass
// them to the rendered component, together with the content to
// be rendered inside (the children)
export class WrappedRoute extends React.Component {
Expand Down
2 changes: 1 addition & 1 deletion app/models/status.rb
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ def as_home_timeline(account)

def as_direct_timeline(account, limit = 20, max_id = nil, since_id = nil, cache_ids = false)
# direct timeline is mix of direct message from_me and to_me.
# 2 querys are executed with pagination.
# 2 queries are executed with pagination.
# constant expression using arel_table is required for partial index

# _from_me part does not require any timeline filters
Expand Down
2 changes: 1 addition & 1 deletion config/environments/test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
config.consider_all_requests_local = true
config.action_controller.perform_caching = false

# The default store, file_store is shared by processses parallely executed
# The default store, file_store is shared by processes parallelly executed
# and should not be used.
config.cache_store = :memory_store

Expand Down
2 changes: 1 addition & 1 deletion config/initializers/simple_form.rb
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@
# You can define the class to use on all labels. Default is nil.
# config.label_class = nil

# You can define the default class to be used on forms. Can be overriden
# You can define the default class to be used on forms. Can be overridden
# with `html: { :class }`. Defaulting to none.
# config.default_form_class = nil

Expand Down
2 changes: 1 addition & 1 deletion config/initializers/twitter_regex.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class Regex
)/iox
REGEXEN[:valid_url] = %r{
( # $1 total match
(#{REGEXEN[:valid_url_preceding_chars]}) # $2 Preceeding chracter
(#{REGEXEN[:valid_url_preceding_chars]}) # $2 Preceding character
( # $3 URL
((https?|dat|dweb|ipfs|ipns|ssb|gopher):\/\/)? # $4 Protocol (optional)
(#{REGEXEN[:valid_domain]}) # $5 Domain(s)
Expand Down
6 changes: 3 additions & 3 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ services:
image: postgres:9.6-alpine
networks:
- internal_network
### Uncomment to enable DB persistance
### Uncomment to enable DB persistence
# volumes:
# - ./postgres:/var/lib/postgresql/data

Expand All @@ -15,7 +15,7 @@ services:
image: redis:4.0-alpine
networks:
- internal_network
### Uncomment to enable REDIS persistance
### Uncomment to enable REDIS persistence
# volumes:
# - ./redis:/data

Expand All @@ -26,7 +26,7 @@ services:
# - "ES_JAVA_OPTS=-Xms512m -Xmx512m"
# networks:
# - internal_network
#### Uncomment to enable ES persistance
#### Uncomment to enable ES persistence
## volumes:
## - ./elasticsearch:/usr/share/elasticsearch/data

Expand Down
2 changes: 1 addition & 1 deletion lib/mastodon/migration_helpers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -835,7 +835,7 @@ def column_for(table, name)
columns(table).find { |column| column.name == name }
end

# This will replace the first occurance of a string in a column with
# This will replace the first occurrence of a string in a column with
# the replacement
# On postgresql we can use `regexp_replace` for that.
# On mysql we find the location of the pattern, and overwrite it
Expand Down
2 changes: 1 addition & 1 deletion spec/controllers/concerns/localized_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def success
expect(I18n.locale).to eq :fa
end

it 'sets available and compatible langauge if none of available languages are preferred' do
it 'sets available and compatible language if none of available languages are preferred' do
request.headers['Accept-Language'] = 'fa-IR'
get 'success'
expect(I18n.locale).to eq :fa
Expand Down
4 changes: 2 additions & 2 deletions spec/controllers/emojis_controller_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
let(:emoji) { Fabricate(:custom_emoji) }

describe 'GET #show' do
subject(:responce) { get :show, params: { id: emoji.id, format: :json } }
subject(:response) { get :show, params: { id: emoji.id, format: :json } }
subject(:body) { JSON.parse(response.body, symbolize_names: true) }

it 'returns the right response' do
expect(responce).to have_http_status 200
expect(response).to have_http_status 200
expect(body[:name]).to eq ':coolcat:'
end
end
Expand Down
2 changes: 1 addition & 1 deletion spec/controllers/stream_entries_controller_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
render_views

shared_examples 'before_action' do |route|
context 'when account is not suspended anbd stream_entry is available' do
context 'when account is not suspended and stream_entry is available' do
it 'assigns instance variables' do
status = Fabricate(:status)

Expand Down
2 changes: 1 addition & 1 deletion spec/models/account_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -559,7 +559,7 @@
end

context 'when is local' do
it 'is invalid if the username is not unique in case-insensitive comparsion among local accounts' do
it 'is invalid if the username is not unique in case-insensitive comparison among local accounts' do
account_1 = Fabricate(:account, username: 'the_doctor')
account_2 = Fabricate.build(:account, username: 'the_Doctor')
account_2.valid?
Expand Down
2 changes: 1 addition & 1 deletion spec/models/subscription_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
end

describe 'lease_seconds' do
it 'returns the time remaing until expiration' do
it 'returns the time remaining until expiration' do
datetime = 1.day.from_now
subscription = Subscription.new(expires_at: datetime)
travel_to(datetime - 12.hours) do
Expand Down
2 changes: 1 addition & 1 deletion spec/services/process_feed_service_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@
expect(created_statuses.first.reblog.text).to eq 'Overwatch rocks'
end

it 'ignores reblogs if it failed to retreive reblogged statuses' do
it 'ignores reblogs if it failed to retrieve reblogged statuses' do
stub_request(:get, 'https://overwatch.com/users/tracer/updates/1').to_return(status: 404)

actor = Fabricate(:account, username: 'tracer', domain: 'overwatch.com')
Expand Down

0 comments on commit 40dd19b

Please sign in to comment.