mirror of
https://github.com/discourse/discourse.git
synced 2025-06-04 11:11:13 +08:00
DEV: Correct typos and spelling mistakes (#12812)
Over the years we accrued many spelling mistakes in the code base. This PR attempts to fix spelling mistakes and typos in all areas of the code that are extremely safe to change - comments - test descriptions - other low risk areas
This commit is contained in:
@ -6,11 +6,11 @@ const { getProperties } = Ember;
|
||||
|
||||
- add(count unit) adds a COUNT of UNITS to a date
|
||||
- subtract(count unit) subtracts a COUNT of UNITS to a date
|
||||
- format(format) formats a date with zone in a consitent way, optional moment format
|
||||
- format(format) formats a date with zone in a consistent way, optional moment format
|
||||
- isDST() allows to know if a date in a specified timezone is currently under DST
|
||||
- datetimeWithZone(timezone) returns a new moment object with timezone applied
|
||||
- datetime returns the moment object
|
||||
- unitRepetitionsBetweenDates(duration, date) return the number of repertitions of
|
||||
- unitRepetitionsBetweenDates(duration, date) return the number of repetitions of
|
||||
duration between two dates, eg for duration: "1.weeks", "2.months"...
|
||||
*/
|
||||
export default class DateWithZoneHelper {
|
||||
|
@ -637,7 +637,7 @@ describe DiscourseNarrativeBot::NewUserNarrative do
|
||||
end
|
||||
end
|
||||
|
||||
describe 'fomatting tutorial' do
|
||||
describe 'formatting tutorial' do
|
||||
before do
|
||||
narrative.set_data(user, state: :tutorial_formatting, topic_id: topic.id)
|
||||
end
|
||||
|
@ -406,7 +406,7 @@ describe ::Presence::PresencesController do
|
||||
)
|
||||
end
|
||||
|
||||
it 'publises the right message when closing composer in public topic' do
|
||||
it 'publishes the right message when closing composer in public topic' do
|
||||
messages = MessageBus.track_publish do
|
||||
post '/presence/publish.json', params: {
|
||||
topic_id: public_topic.id,
|
||||
@ -424,7 +424,7 @@ describe ::Presence::PresencesController do
|
||||
expect(message.user_ids).to eq(nil)
|
||||
end
|
||||
|
||||
it 'publises the right message when closing composer in private topic' do
|
||||
it 'publishes the right message when closing composer in private topic' do
|
||||
messages = MessageBus.track_publish do
|
||||
post '/presence/publish.json', params: {
|
||||
topic_id: private_topic.id,
|
||||
@ -442,7 +442,7 @@ describe ::Presence::PresencesController do
|
||||
expect(message.user_ids).to eq(nil)
|
||||
end
|
||||
|
||||
it 'publises the right message when closing composer in private message' do
|
||||
it 'publishes the right message when closing composer in private message' do
|
||||
post = Fabricate(:post, topic: private_message, user: user)
|
||||
|
||||
messages = MessageBus.track_publish do
|
||||
|
@ -292,7 +292,7 @@ export function setup(helper) {
|
||||
|
||||
/*!
|
||||
* Joseph Myer's md5() algorithm wrapped in a self-invoked function to prevent
|
||||
* global namespace polution, modified to hash unicode characters as UTF-8.
|
||||
* global namespace pollution, modified to hash unicode characters as UTF-8.
|
||||
*
|
||||
* Copyright 1999-2010, Joseph Myers, Paul Johnston, Greg Holt, Will Bond <will@wbond.net>
|
||||
* http://www.myersdaily.org/joseph/javascript/md5-text.html
|
||||
|
@ -127,7 +127,7 @@ describe PostsController do
|
||||
expect(Poll.find_by(post_id: json["id"]).name).to eq("<script>alert('xss')</script>")
|
||||
end
|
||||
|
||||
it "also works whe there is a link starting with '[poll'" do
|
||||
it "also works when there is a link starting with '[poll'" do
|
||||
post :create, params: {
|
||||
title: title, raw: "[Polls are awesome](/foobar)\n[poll]\n- A\n- B\n[/poll]"
|
||||
}, format: :json
|
||||
@ -138,7 +138,7 @@ describe PostsController do
|
||||
expect(Poll.exists?(post_id: json["id"])).to eq(true)
|
||||
end
|
||||
|
||||
it "prevents pollception" do
|
||||
it "prevents poll-inception" do
|
||||
post :create, params: {
|
||||
title: title, raw: "[poll name=1]\n- A\n[poll name=2]\n- B\n- C\n[/poll]\n- D\n[/poll]"
|
||||
}, format: :json
|
||||
|
@ -56,7 +56,7 @@ describe ::DiscoursePoll::Poll do
|
||||
expect(poll.can_see_results?(user)).to eq(true)
|
||||
end
|
||||
|
||||
it "only staff memebers can see results when results setting is staff_only" do
|
||||
it "only staff members can see results when results setting is staff_only" do
|
||||
post = Fabricate(:post, raw: "[poll results=staff_only]\n- A\n- B\n[/poll]")
|
||||
user = Fabricate(:user)
|
||||
poll = post.polls.first
|
||||
|
@ -80,12 +80,12 @@
|
||||
|
||||
{{#styleguide-example title=".btn-flat - sizes"}}
|
||||
{{#each dummy.buttonSizes as |bs|}}
|
||||
{{flat-button icon="trash-alt" disabled=bs.disabled transaltedTitle=bs.title}}
|
||||
{{flat-button icon="trash-alt" disabled=bs.disabled translatedTitle=bs.title}}
|
||||
{{/each}}
|
||||
{{/styleguide-example}}
|
||||
|
||||
{{#styleguide-example title=".btn-flat - states"}}
|
||||
{{#each dummy.buttonStates as |bs|}}
|
||||
{{flat-button icon="trash-alt" disabled=bs.disabled transaltedTitle=bs.title}}
|
||||
{{flat-button icon="trash-alt" disabled=bs.disabled translatedTitle=bs.title}}
|
||||
{{/each}}
|
||||
{{/styleguide-example}}
|
||||
|
Reference in New Issue
Block a user