Misc. typos (#8694)

Found via `codespell -q 3 --skip="./app/javascript/mastodon/locales,./config/locales"`
th-downstream
luzpaz 6 years ago committed by Eugen Rochko
parent ea28c8f63b
commit 1bce70d3c7

@ -128,7 +128,7 @@ class Auth::SessionsController < Devise::SessionsController
def clear_site_data def clear_site_data
return if continue_after? 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 # https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Clear-Site-Data
response.headers['Clear-Site-Data'] = '"cache", "cookies", "storage"' response.headers['Clear-Site-Data'] = '"cache", "cookies", "storage"'
end end

@ -170,7 +170,7 @@ export const urlRegex = (function() {
')' + ')' +
'\\)', '\\)',
'i'); '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 // 1. Allow =&# for empty URL parameters and other URL-join artifacts
regexen.validUrlPathEndingChars = regexSupplant(/[^#{spaces_group}\(\)\?!\*';:=\,\.\$%\[\]#{pd}~&\|@]|(?:#{validUrlBalancedParens})/i); regexen.validUrlPathEndingChars = regexSupplant(/[^#{spaces_group}\(\)\?!\*';:=\,\.\$%\[\]#{pd}~&\|@]|(?:#{validUrlBalancedParens})/i);
// Allow @ in a url, but only in the middle. Catch things like http://example.com/@user/ // Allow @ in a url, but only in the middle. Catch things like http://example.com/@user/

@ -26,7 +26,7 @@ WrappedSwitch.propTypes = {
children: PropTypes.node, 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 // them to the rendered component, together with the content to
// be rendered inside (the children) // be rendered inside (the children)
export class WrappedRoute extends React.Component { export class WrappedRoute extends React.Component {

@ -241,7 +241,7 @@ class Status < ApplicationRecord
def as_direct_timeline(account, limit = 20, max_id = nil, since_id = nil, cache_ids = false) 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. # 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 # constant expression using arel_table is required for partial index
# _from_me part does not require any timeline filters # _from_me part does not require any timeline filters

@ -23,7 +23,7 @@ Rails.application.configure do
config.consider_all_requests_local = true config.consider_all_requests_local = true
config.action_controller.perform_caching = false 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. # and should not be used.
config.cache_store = :memory_store config.cache_store = :memory_store

@ -116,7 +116,7 @@ SimpleForm.setup do |config|
# You can define the class to use on all labels. Default is nil. # You can define the class to use on all labels. Default is nil.
# config.label_class = 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. # with `html: { :class }`. Defaulting to none.
# config.default_form_class = nil # config.default_form_class = nil

@ -28,7 +28,7 @@ module Twitter
)/iox )/iox
REGEXEN[:valid_url] = %r{ REGEXEN[:valid_url] = %r{
( # $1 total match ( # $1 total match
(#{REGEXEN[:valid_url_preceding_chars]}) # $2 Preceeding chracter (#{REGEXEN[:valid_url_preceding_chars]}) # $2 Preceding character
( # $3 URL ( # $3 URL
((https?|dat|dweb|ipfs|ipns|ssb|gopher):\/\/)? # $4 Protocol (optional) ((https?|dat|dweb|ipfs|ipns|ssb|gopher):\/\/)? # $4 Protocol (optional)
(#{REGEXEN[:valid_domain]}) # $5 Domain(s) (#{REGEXEN[:valid_domain]}) # $5 Domain(s)

@ -6,7 +6,7 @@ services:
image: postgres:9.6-alpine image: postgres:9.6-alpine
networks: networks:
- internal_network - internal_network
### Uncomment to enable DB persistance ### Uncomment to enable DB persistence
# volumes: # volumes:
# - ./postgres:/var/lib/postgresql/data # - ./postgres:/var/lib/postgresql/data
@ -15,7 +15,7 @@ services:
image: redis:4.0-alpine image: redis:4.0-alpine
networks: networks:
- internal_network - internal_network
### Uncomment to enable REDIS persistance ### Uncomment to enable REDIS persistence
# volumes: # volumes:
# - ./redis:/data # - ./redis:/data
@ -26,7 +26,7 @@ services:
# - "ES_JAVA_OPTS=-Xms512m -Xmx512m" # - "ES_JAVA_OPTS=-Xms512m -Xmx512m"
# networks: # networks:
# - internal_network # - internal_network
#### Uncomment to enable ES persistance #### Uncomment to enable ES persistence
## volumes: ## volumes:
## - ./elasticsearch:/usr/share/elasticsearch/data ## - ./elasticsearch:/usr/share/elasticsearch/data

@ -835,7 +835,7 @@ module Mastodon
columns(table).find { |column| column.name == name } columns(table).find { |column| column.name == name }
end 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 # the replacement
# On postgresql we can use `regexp_replace` for that. # On postgresql we can use `regexp_replace` for that.
# On mysql we find the location of the pattern, and overwrite it # On mysql we find the location of the pattern, and overwrite it

@ -28,7 +28,7 @@ describe ApplicationController, type: :controller do
expect(I18n.locale).to eq :fa expect(I18n.locale).to eq :fa
end 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' request.headers['Accept-Language'] = 'fa-IR'
get 'success' get 'success'
expect(I18n.locale).to eq :fa expect(I18n.locale).to eq :fa

@ -6,11 +6,11 @@ describe EmojisController do
let(:emoji) { Fabricate(:custom_emoji) } let(:emoji) { Fabricate(:custom_emoji) }
describe 'GET #show' do 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) } subject(:body) { JSON.parse(response.body, symbolize_names: true) }
it 'returns the right response' do 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:' expect(body[:name]).to eq ':coolcat:'
end end
end end

@ -4,7 +4,7 @@ RSpec.describe StreamEntriesController, type: :controller do
render_views render_views
shared_examples 'before_action' do |route| 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 it 'assigns instance variables' do
status = Fabricate(:status) status = Fabricate(:status)

@ -559,7 +559,7 @@ RSpec.describe Account, type: :model do
end end
context 'when is local' do 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_1 = Fabricate(:account, username: 'the_doctor')
account_2 = Fabricate.build(:account, username: 'the_Doctor') account_2 = Fabricate.build(:account, username: 'the_Doctor')
account_2.valid? account_2.valid?

@ -18,7 +18,7 @@ RSpec.describe Subscription, type: :model do
end end
describe 'lease_seconds' do 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 datetime = 1.day.from_now
subscription = Subscription.new(expires_at: datetime) subscription = Subscription.new(expires_at: datetime)
travel_to(datetime - 12.hours) do travel_to(datetime - 12.hours) do

@ -166,7 +166,7 @@ XML
expect(created_statuses.first.reblog.text).to eq 'Overwatch rocks' expect(created_statuses.first.reblog.text).to eq 'Overwatch rocks'
end 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) stub_request(:get, 'https://overwatch.com/users/tracer/updates/1').to_return(status: 404)
actor = Fabricate(:account, username: 'tracer', domain: 'overwatch.com') actor = Fabricate(:account, username: 'tracer', domain: 'overwatch.com')

Loading…
Cancel
Save