A platform for community discussion. Free, open, simple.
DEV: Fix various typos (#17485)
Jarek Radoszabe9b41ddf1a
diff --git a/app/assets/javascripts/discourse/app/components/emoji-picker.js b/app/assets/javascripts/discourse/app/components/emoji-picker.jsindex dfe9f2dcb09..8b59b52d363 100644--- a/app/assets/javascripts/discourse/app/components/emoji-picker.js+++ b/app/assets/javascripts/discourse/app/components/emoji-picker.js@@ -186,7 +186,7 @@ export default Component.extend({}),@action- onClearRecents() {+ onClearRecent() {this.emojiStore.favorites = [];this.set("recentEmojis", []);},diff --git a/app/assets/javascripts/discourse/app/components/software-update-prompt.js b/app/assets/javascripts/discourse/app/components/software-update-prompt.jsindex b8a864f0db8..08b06eab02d 100644--- a/app/assets/javascripts/discourse/app/components/software-update-prompt.js+++ b/app/assets/javascripts/discourse/app/components/software-update-prompt.js@@ -18,7 +18,7 @@ export default Component.extend({},@on("init")- initSubscribtions() {+ initSubscriptions() {this.messageBus.subscribe("/refresh_client", () => {this.session.requiresRefresh = true;});diff --git a/app/assets/javascripts/discourse/app/controllers/about.js b/app/assets/javascripts/discourse/app/controllers/about.jsindex b22ce0d0cd5..c1fd19fa05a 100644--- a/app/assets/javascripts/discourse/app/controllers/about.js+++ b/app/assets/javascripts/discourse/app/controllers/about.js@@ -4,7 +4,7 @@ import discourseComputed from "discourse-common/utils/decorators";import { gt } from "@ember/object/computed";export default Controller.extend({- faqOverriden: gt("siteSettings.faq_url.length", 0),+ faqOverridden: gt("siteSettings.faq_url.length", 0),@discourseComputed("model.contact_url", "model.contact_email")contactInfo(url, email) {diff --git a/app/assets/javascripts/discourse/app/controllers/preferences/sidebar.js b/app/assets/javascripts/discourse/app/controllers/preferences/sidebar.jsindex ba396e12a39..73c840b008a 100644--- a/app/assets/javascripts/discourse/app/controllers/preferences/sidebar.js+++ b/app/assets/javascripts/discourse/app/controllers/preferences/sidebar.js@@ -6,7 +6,7 @@ import { popupAjaxError } from "discourse/lib/ajax-error";export default class extends Controller {@tracked saved = false;- @tracked selectedSiderbarCategories = [];+ @tracked selectedSidebarCategories = [];@tracked selectedSidebarTagNames = [];@action@@ -18,7 +18,7 @@ export default class extends Controller {this.model.set("sidebarCategoryIds",- this.selectedSiderbarCategories.mapBy("id")+ this.selectedSidebarCategories.mapBy("id"));this.modeldiff --git a/app/assets/javascripts/discourse/app/controllers/second-factor-auth.js b/app/assets/javascripts/discourse/app/controllers/second-factor-auth.jsindex 4de8d672c31..8e88afdf95d 100644--- a/app/assets/javascripts/discourse/app/controllers/second-factor-auth.js+++ b/app/assets/javascripts/discourse/app/controllers/second-factor-auth.js@@ -72,7 +72,7 @@ export default Controller.extend({} else if (backupCodesAvailable) {return BACKUP_CODE;} else {- throw new Error("unpexected state of user 2fa settings!");+ throw new Error("unexpected state of user 2fa settings!");}}},diff --git a/app/assets/javascripts/discourse/app/lib/lock-on.js b/app/assets/javascripts/discourse/app/lib/lock-on.jsindex 9c77de68d02..4f18588f3d6 100644--- a/app/assets/javascripts/discourse/app/lib/lock-on.js+++ b/app/assets/javascripts/discourse/app/lib/lock-on.js@@ -1,7 +1,7 @@import { bind } from "discourse-common/utils/decorators";import { headerOffset } from "discourse/lib/offset-calculator";-// Dear traveller, you are entering a zone where we are at war with the browser.+// Dear traveler, you are entering a zone where we are at war with the browser.// The browser is insisting on positioning scrollTop per the location it was in// the past, we are insisting on it being where we want it to be.// The hack is just to keep trying over and over to position the scrollbar (up to 1 second).diff --git a/app/assets/javascripts/discourse/app/lib/media-optimization-utils.js b/app/assets/javascripts/discourse/app/lib/media-optimization-utils.jsindex 361b589564c..7fd07768a63 100644--- a/app/assets/javascripts/discourse/app/lib/media-optimization-utils.js+++ b/app/assets/javascripts/discourse/app/lib/media-optimization-utils.js@@ -32,7 +32,7 @@ async function fileToDrawable(file) {}}-function drawableToimageData(drawable) {+function drawableToImageData(drawable) {const width = drawable.width,height = drawable.height,sx = 0,@@ -80,7 +80,7 @@ function jpegDecodeFailure(type, imageData) {export async function fileToImageData(file) {const drawable = await fileToDrawable(file);- const imageData = drawableToimageData(drawable);+ const imageData = drawableToImageData(drawable);if (isTransparent(file.type, imageData)) {throw "Image has transparent pixels, won't convert to JPEG!";diff --git a/app/assets/javascripts/discourse/app/lib/text.js b/app/assets/javascripts/discourse/app/lib/text.jsindex 24d97d6a942..3ee8baea18f 100644--- a/app/assets/javascripts/discourse/app/lib/text.js+++ b/app/assets/javascripts/discourse/app/lib/text.js@@ -43,7 +43,7 @@ export function cookAsync(text, options) {}// Warm up pretty text with a set of options and return a function-// which can be used to cook without rebuilding prettytext every time+// which can be used to cook without rebuilding pretty-text every timeexport function generateCookFunction(options) {return loadMarkdownIt().then(() => {const prettyText = createPrettyText(options);diff --git a/app/assets/javascripts/discourse/app/lib/url.js b/app/assets/javascripts/discourse/app/lib/url.jsindex 6c092a4f810..9d168964c59 100644--- a/app/assets/javascripts/discourse/app/lib/url.js+++ b/app/assets/javascripts/discourse/app/lib/url.js@@ -71,7 +71,7 @@ export function groupPath(subPath) {let _jumpScheduled = false;let _transitioning = false;-let lockon = null;+let lockOn = null;export function jumpToElement(elementId) {if (_jumpScheduled || isEmpty(elementId)) {@@ -82,17 +82,17 @@ export function jumpToElement(elementId) {_jumpScheduled = true;schedule("afterRender", function () {- if (lockon) {- lockon.clearLock();+ if (lockOn) {+ lockOn.clearLock();}- lockon = new LockOn(selector, {+ lockOn = new LockOn(selector, {finished() {_jumpScheduled = false;- lockon = null;+ lockOn = null;},});- lockon.lock();+ lockOn.lock();});}@@ -142,20 +142,20 @@ const DiscourseURL = EmberObject.extend({holder = document.querySelector(selector);}- if (lockon) {- lockon.clearLock();+ if (lockOn) {+ lockOn.clearLock();}- lockon = new LockOn(selector, {+ lockOn = new LockOn(selector, {originalTopOffset: opts.originalTopOffset,finished() {_transitioning = false;- lockon = null;+ lockOn = null;},});if (holder && opts.skipIfOnScreen) {- const elementTop = lockon.elementTop();+ const elementTop = lockOn.elementTop();const scrollTop = $(window).scrollTop();const windowHeight = $(window).height() - offsetCalculator();const height = $(holder).height();@@ -169,8 +169,8 @@ const DiscourseURL = EmberObject.extend({}}- lockon.lock();- if (lockon.elementTop() < 1) {+ lockOn.lock();+ if (lockOn.elementTop() < 1) {_transitioning = false;return;}diff --git a/app/assets/javascripts/discourse/app/lib/utilities.js b/app/assets/javascripts/discourse/app/lib/utilities.jsindex 2d9da305638..6865c17ce16 100644--- a/app/assets/javascripts/discourse/app/lib/utilities.js+++ b/app/assets/javascripts/discourse/app/lib/utilities.js@@ -527,7 +527,7 @@ export function clipboardCopy(text) {return clipboardCopyFallback(text);}-// Use this verison of clipboardCopy if you must use an AJAX call+// Use this version of clipboardCopy if you must use an AJAX call// to retrieve/generate server-side text to copy to the clipboard,// otherwise this write function will error in certain browsers, because// the time taken from the user event to the clipboard text being copieddiff --git a/app/assets/javascripts/discourse/app/mixins/mobile-scroll-direction.js b/app/assets/javascripts/discourse/app/mixins/mobile-scroll-direction.jsindex 467fea56d67..27a31a8c459 100644--- a/app/assets/javascripts/discourse/app/mixins/mobile-scroll-direction.js+++ b/app/assets/javascripts/discourse/app/mixins/mobile-scroll-direction.js@@ -46,7 +46,7 @@ export default Mixin.create({}// If the user reaches the very bottom of the topic, we only want to reset- // this scroll direction after a second scrolldown. This is a nicer event+ // this scroll direction after a second scroll down. This is a nicer event// similar to what Safari and Chrome do.discourseDebounce(this,diff --git a/app/assets/javascripts/discourse/app/mixins/textarea-text-manipulation.js b/app/assets/javascripts/discourse/app/mixins/textarea-text-manipulation.jsindex 4a790832441..46e4b7cc729 100644--- a/app/assets/javascripts/discourse/app/mixins/textarea-text-manipulation.js+++ b/app/assets/javascripts/discourse/app/mixins/textarea-text-manipulation.js@@ -533,10 +533,10 @@ export default Mixin.create({// * *const indentationRegexp = new RegExp(`^${indentationChar}+`);const lineStartsWithIndentationChar = lineVal.match(indentationRegexp);- const intentationCharsBeforeSelection = value.match(indentationRegexp);+ const indentationCharsBeforeSelection = value.match(indentationRegexp);if (lineStartsWithIndentationChar) {- const charsToSubtract = intentationCharsBeforeSelection- ? intentationCharsBeforeSelection[0]+ const charsToSubtract = indentationCharsBeforeSelection+ ? indentationCharsBeforeSelection[0]: "";value =lineStartsWithIndentationChar[0].replace(charsToSubtract, "") + value;diff --git a/app/assets/javascripts/discourse/app/mixins/uppy-upload.js b/app/assets/javascripts/discourse/app/mixins/uppy-upload.jsindex 320f151a4c1..95991d5b2f1 100644--- a/app/assets/javascripts/discourse/app/mixins/uppy-upload.js+++ b/app/assets/javascripts/discourse/app/mixins/uppy-upload.js@@ -147,7 +147,7 @@ export default Mixin.create(UppyS3Multipart, ExtendableUploader, {},});- // droptarget is a UI plugin, only preprocessors must call _useUploadPlugin+ // DropTarget is a UI plugin, only preprocessors must call _useUploadPluginthis._uppyInstance.use(DropTarget, this._uploadDropTargetOptions());this._uppyInstance.on("progress", (progress) => {diff --git a/app/assets/javascripts/discourse/app/models/post-stream.js b/app/assets/javascripts/discourse/app/models/post-stream.jsindex c03dbb6f45a..1e512afae19 100644--- a/app/assets/javascripts/discourse/app/models/post-stream.js+++ b/app/assets/javascripts/discourse/app/models/post-stream.js@@ -243,7 +243,7 @@ export default RestModel.extend({});},- refreshAndJumptoSecondVisible() {+ refreshAndJumpToSecondVisible() {return this.refresh({}).then(() => {if (this.posts && this.posts.length > 1) {DiscourseURL.jumpToPost(this.posts[1].get("post_number"));@@ -254,14 +254,14 @@ export default RestModel.extend({showSummary() {this.cancelFilter();this.set("filter", "summary");- return this.refreshAndJumptoSecondVisible();+ return this.refreshAndJumpToSecondVisible();},// Filter the stream to a particular user.filterParticipant(username) {this.cancelFilter();this.userFilters.addObject(username);- return this.refreshAndJumptoSecondVisible();+ return this.refreshAndJumpToSecondVisible();},filterReplies(postNumber, postId) {diff --git a/app/assets/javascripts/discourse/app/models/private-message-topic-tracking-state.js b/app/assets/javascripts/discourse/app/models/private-message-topic-tracking-state.jsindex 1c95bbfcaa8..c1ee74e6fee 100644--- a/app/assets/javascripts/discourse/app/models/private-message-topic-tracking-state.js+++ b/app/assets/javascripts/discourse/app/models/private-message-topic-tracking-state.js@@ -185,7 +185,7 @@ const PrivateMessageTopicTrackingState = EmberObject.extend({break;case "unread":- // Note: At some point we may want to make the same peformance optimisation+ // Note: At some point we may want to make the same performance optimisation// here as we did with the other topic tracking state, where we only send// one 'unread' update to all users, not a more accurate unread update to// each individual user with their own read state. In this case, we need todiff --git a/app/assets/javascripts/discourse/app/routes/preferences-sidebar.js b/app/assets/javascripts/discourse/app/routes/preferences-sidebar.jsindex b93e9b33d9a..26e50bf84bf 100644--- a/app/assets/javascripts/discourse/app/routes/preferences-sidebar.js+++ b/app/assets/javascripts/discourse/app/routes/preferences-sidebar.js@@ -6,7 +6,7 @@ export default RestrictedUserRoute.extend({setupController(controller, user) {const props = {model: user,- selectedSiderbarCategories: user.sidebarCategories,+ selectedSidebarCategories: user.sidebarCategories,};if (this.siteSettings.tagging_enabled) {diff --git a/app/assets/javascripts/discourse/app/templates/about.hbs b/app/assets/javascripts/discourse/app/templates/about.hbsindex 45acef09e24..99d9249d4dd 100644--- a/app/assets/javascripts/discourse/app/templates/about.hbs+++ b/app/assets/javascripts/discourse/app/templates/about.hbs@@ -4,7 +4,7 @@<ul class="nav-pills"><li class="nav-item-about"><LinkTo @route="about" class="active">{{i18n "about.simple_title"}}</LinkTo></li>- {{#if this.faqOverriden}}+ {{#if this.faqOverridden}}<li class="nav-item-guidelines"><LinkTo @route="guidelines">{{i18n "guidelines"}}</LinkTo></li><li class="nav-item-faq"><LinkTo @route="faq">{{i18n "faq"}}</LinkTo></li>{{else}}@@ -27,7 +27,6 @@<AboutPageUsers @users={{this.model.admins}} /><div class="clearfix"></div>-</section>{{/if}}diff --git a/app/assets/javascripts/discourse/app/templates/components/emoji-picker.hbs b/app/assets/javascripts/discourse/app/templates/components/emoji-picker.hbsindex 83b338bd7f2..d9c2156911a 100644--- a/app/assets/javascripts/discourse/app/templates/components/emoji-picker.hbs+++ b/app/assets/javascripts/discourse/app/templates/components/emoji-picker.hbs@@ -33,7 +33,7 @@<div class="section recent" data-section="recent"><div class="section-header"><span class="title">{{i18n "emoji_picker.recent"}}</span>- <DButton @icon="trash-alt" @action={{action "onClearRecents"}} @class="trash-recent" />+ <DButton @icon="trash-alt" @action={{action "onClearRecent"}} @class="trash-recent" /></div><div class="section-group">{{#each this.recentEmojis as |emoji|}}diff --git a/app/assets/javascripts/discourse/app/templates/preferences/sidebar.hbs b/app/assets/javascripts/discourse/app/templates/preferences/sidebar.hbsindex cd9a198cfe7..69a46586e09 100644--- a/app/assets/javascripts/discourse/app/templates/preferences/sidebar.hbs+++ b/app/assets/javascripts/discourse/app/templates/preferences/sidebar.hbs@@ -13,8 +13,8 @@<div class="controls"><CategorySelector- @categories={{this.selectedSiderbarCategories}}- @onChange={{action (mut this.selectedSiderbarCategories)}}+ @categories={{this.selectedSidebarCategories}}+ @onChange={{action (mut this.selectedSidebarCategories)}}@options={{hashallowUncategorized=(not this.siteSettings.suppress_uncategorized_badge)displayCategoryDescription=truediff --git a/app/assets/javascripts/discourse/app/widgets/header.js b/app/assets/javascripts/discourse/app/widgets/header.jsindex c131e2c6b9a..8055d2025c2 100644--- a/app/assets/javascripts/discourse/app/widgets/header.js+++ b/app/assets/javascripts/discourse/app/widgets/header.js@@ -515,7 +515,7 @@ export default createWidget("header", {},preventDefault(e) {- // prevent all scrollin on menu panels, except on overflow+ // prevent all scrolling on menu panels, except on overflowconst height = window.innerHeight ? window.innerHeight : $(window).height();if (!$(e.target).parents(".menu-panel").length ||diff --git a/app/assets/javascripts/discourse/tests/acceptance/sidebar-mobile-test.js b/app/assets/javascripts/discourse/tests/acceptance/sidebar-mobile-test.jsindex 738592bf05e..e6c216b5101 100644--- a/app/assets/javascripts/discourse/tests/acceptance/sidebar-mobile-test.js+++ b/app/assets/javascripts/discourse/tests/acceptance/sidebar-mobile-test.js@@ -44,7 +44,7 @@ acceptance("Sidebar - Mobile - User with sidebar enabled", function (needs) {);});- test("collpasing sidebar sections does not collapse sidebar", async function (assert) {+ test("collapsing sidebar sections does not collapse sidebar", async function (assert) {await visit("/");await click(".btn-sidebar-toggle");diff --git a/app/assets/stylesheets/vendor/normalize-ext.scss b/app/assets/stylesheets/vendor/normalize-ext.scssindex 1dff1665fdb..86916c3c23a 100644--- a/app/assets/stylesheets/vendor/normalize-ext.scss+++ b/app/assets/stylesheets/vendor/normalize-ext.scss@@ -1,4 +1,4 @@-/* Discourse custom changes for backward compatiblity+/* Discourse custom changes for backward compatibility========================================================================== */button,diff --git a/spec/requests/users_controller_spec.rb b/spec/requests/users_controller_spec.rbindex 03e157ef899..09194b705d8 100644--- a/spec/requests/users_controller_spec.rb+++ b/spec/requests/users_controller_spec.rb@@ -2340,13 +2340,13 @@ describe UsersController doit "should allow user to modify category sidebar section links" docategory = Fabricate(:category)restricted_category = Fabricate(:category, read_restricted: true)- category_siderbar_section_link = Fabricate(:category_sidebar_section_link, user: user)+ category_sidebar_section_link = Fabricate(:category_sidebar_section_link, user: user)put "/u/#{user.username}.json", params: { sidebar_category_ids: [category.id, restricted_category.id] }expect(response.status).to eq(200)expect(user.sidebar_section_links.count).to eq(1)- expect(SidebarSectionLink.exists?(id: category_siderbar_section_link.id)).to eq(false)+ expect(SidebarSectionLink.exists?(id: category_sidebar_section_link.id)).to eq(false)sidebar_section_link = user.sidebar_section_links.first