From f2339d2d5b590480bf09c3493bcceb9a2bd83977 Mon Sep 17 00:00:00 2001 From: Jarek Radosz Date: Thu, 18 May 2023 15:34:46 +0200 Subject: [PATCH] DEV: Fix random typos (#21638) --- plugins/chat/app/controllers/chat/chat_controller.rb | 2 +- .../discourse/components/chat-channel-metadata.hbs | 2 +- .../discourse/components/chat-channel-metadata.js | 2 +- .../discourse/components/chat-composer-dropdown.js | 2 +- .../javascripts/discourse/models/chat-direct-message.js | 2 +- .../discourse/pre-initializers/chat-plugin-api.js | 4 ++-- .../discourse/routes/chat-channel-near-message.js | 2 +- .../chat/assets/javascripts/discourse/services/chat-api.js | 2 +- .../javascripts/discourse/services/chat-channels-manager.js | 2 +- .../discourse/services/chat-subscriptions-manager.js | 2 +- plugins/chat/assets/stylesheets/common/base-common.scss | 6 +++--- .../assets/stylesheets/common/chat-composer-dropdown.scss | 2 +- .../assets/stylesheets/common/chat-message-left-gutter.scss | 2 +- plugins/chat/lib/chat/direct_message_channel_creator.rb | 4 ++-- plugins/chat/lib/chat/review_queue.rb | 2 +- .../spec/components/pretty_text_spec.rb | 4 ++-- 16 files changed, 21 insertions(+), 21 deletions(-) diff --git a/plugins/chat/app/controllers/chat/chat_controller.rb b/plugins/chat/app/controllers/chat/chat_controller.rb index df19c534fa3..3996b84ccae 100644 --- a/plugins/chat/app/controllers/chat/chat_controller.rb +++ b/plugins/chat/app/controllers/chat/chat_controller.rb @@ -120,7 +120,7 @@ module Chat if @chat_channel.direct_message_channel? # If any of the channel users is ignoring, muting, or preventing DMs from - # the current user then we shold not auto-follow the channel once again or + # the current user then we should not auto-follow the channel once again or # publish the new channel. user_ids_allowing_communication = UserCommScreener.new( diff --git a/plugins/chat/assets/javascripts/discourse/components/chat-channel-metadata.hbs b/plugins/chat/assets/javascripts/discourse/components/chat-channel-metadata.hbs index 7974d150628..64642ce753d 100644 --- a/plugins/chat/assets/javascripts/discourse/components/chat-channel-metadata.hbs +++ b/plugins/chat/assets/javascripts/discourse/components/chat-channel-metadata.hbs @@ -1,6 +1,6 @@
{{#if this.unreadIndicator}} diff --git a/plugins/chat/assets/javascripts/discourse/components/chat-channel-metadata.js b/plugins/chat/assets/javascripts/discourse/components/chat-channel-metadata.js index 898f6c7ac89..4c234fcd92e 100644 --- a/plugins/chat/assets/javascripts/discourse/components/chat-channel-metadata.js +++ b/plugins/chat/assets/javascripts/discourse/components/chat-channel-metadata.js @@ -5,7 +5,7 @@ export default class ChatChannelMetadata extends Component { return this.args.unreadIndicator ?? false; } - get lastMessageFormatedDate() { + get lastMessageFormattedDate() { return moment(this.args.channel.lastMessageSentAt).calendar(null, { sameDay: "LT", nextDay: "[Tomorrow]", diff --git a/plugins/chat/assets/javascripts/discourse/components/chat-composer-dropdown.js b/plugins/chat/assets/javascripts/discourse/components/chat-composer-dropdown.js index 987425ac25e..df826cb2ece 100644 --- a/plugins/chat/assets/javascripts/discourse/components/chat-composer-dropdown.js +++ b/plugins/chat/assets/javascripts/discourse/components/chat-composer-dropdown.js @@ -33,7 +33,7 @@ export default class ChatComposerDropdown extends Component { @action setupPanel(element) { this._tippyInstance = tippy(this.trigger, { - theme: "chat-composer-drodown", + theme: "chat-composer-dropdown", trigger: "click", zIndex: 1400, arrow: iconHTML("tippy-rounded-arrow"), diff --git a/plugins/chat/assets/javascripts/discourse/models/chat-direct-message.js b/plugins/chat/assets/javascripts/discourse/models/chat-direct-message.js index 3a1cf16211d..00f996180ec 100644 --- a/plugins/chat/assets/javascripts/discourse/models/chat-direct-message.js +++ b/plugins/chat/assets/javascripts/discourse/models/chat-direct-message.js @@ -10,7 +10,7 @@ export default class ChatDirectMessage { @tracked id; @tracked users = null; - type = CHATABLE_TYPES.drectMessageChannel; + type = CHATABLE_TYPES.directMessageChannel; constructor(args = {}) { this.id = args.id; diff --git a/plugins/chat/assets/javascripts/discourse/pre-initializers/chat-plugin-api.js b/plugins/chat/assets/javascripts/discourse/pre-initializers/chat-plugin-api.js index d562718727d..25c57175b58 100644 --- a/plugins/chat/assets/javascripts/discourse/pre-initializers/chat-plugin-api.js +++ b/plugins/chat/assets/javascripts/discourse/pre-initializers/chat-plugin-api.js @@ -23,7 +23,7 @@ import { addChatDrawerStateCallback } from "discourse/plugins/chat/discourse/ser /** * Callback used to decorate a chat message * - * @callback PluginApi~chatDrawerStateCallbak + * @callback PluginApi~chatDrawerStateCallback * @param {Object} state * @param {boolean} state.isDrawerActive - is the chat drawer active * @param {boolean} state.isDrawerExpanded - is the chat drawer expanded @@ -81,7 +81,7 @@ import { addChatDrawerStateCallback } from "discourse/plugins/chat/discourse/ser * @memberof PluginApi * @instance * @function addChatDrawerStateCallback - * @param {PluginApi~chatDrawerStateCallbak} callback + * @param {PluginApi~chatDrawerStateCallback} callback * @example * * api.addChatDrawerStateCallback(({isDrawerExpanded, isDrawerActive}) => { diff --git a/plugins/chat/assets/javascripts/discourse/routes/chat-channel-near-message.js b/plugins/chat/assets/javascripts/discourse/routes/chat-channel-near-message.js index 1b02c0ebcc4..a33cf8961b8 100644 --- a/plugins/chat/assets/javascripts/discourse/routes/chat-channel-near-message.js +++ b/plugins/chat/assets/javascripts/discourse/routes/chat-channel-near-message.js @@ -1,7 +1,7 @@ import DiscourseRoute from "discourse/routes/discourse"; import { inject as service } from "@ember/service"; -// This route is only here as a convience method for a clean `/c/:channelTitle/:channelId/:messageId` URL. +// This route is only here as a convenience method for a clean `/c/:channelTitle/:channelId/:messageId` URL. // It's not a real route, it just redirects to the real route after setting a param on the controller. export default class ChatChannelNearMessage extends DiscourseRoute { @service router; diff --git a/plugins/chat/assets/javascripts/discourse/services/chat-api.js b/plugins/chat/assets/javascripts/discourse/services/chat-api.js index 7b13d74b152..2ab25ca975f 100644 --- a/plugins/chat/assets/javascripts/discourse/services/chat-api.js +++ b/plugins/chat/assets/javascripts/discourse/services/chat-api.js @@ -257,7 +257,7 @@ export default class ChatApi extends Service { } /** - * Returns messages of a channel, from the last message or a specificed target. + * Returns messages of a channel, from the last message or a specified target. * @param {number} channelId - The ID of the channel. * @param {object} data - Params of the query. * @param {integer} data.targetMessageId - ID of the targeted message. diff --git a/plugins/chat/assets/javascripts/discourse/services/chat-channels-manager.js b/plugins/chat/assets/javascripts/discourse/services/chat-channels-manager.js index e6aab87124f..f2125d8a9f7 100644 --- a/plugins/chat/assets/javascripts/discourse/services/chat-channels-manager.js +++ b/plugins/chat/assets/javascripts/discourse/services/chat-channels-manager.js @@ -10,7 +10,7 @@ const DIRECT_MESSAGE_CHANNELS_LIMIT = 20; /* The ChatChannelsManager service is responsible for managing the loaded chat channels. - It provides helpers to facilitate using and managing laoded channels instead of constantly + It provides helpers to facilitate using and managing loaded channels instead of constantly fetching them from the server. */ diff --git a/plugins/chat/assets/javascripts/discourse/services/chat-subscriptions-manager.js b/plugins/chat/assets/javascripts/discourse/services/chat-subscriptions-manager.js index 154f4d5fac9..5f48c23f90f 100644 --- a/plugins/chat/assets/javascripts/discourse/services/chat-subscriptions-manager.js +++ b/plugins/chat/assets/javascripts/discourse/services/chat-subscriptions-manager.js @@ -276,7 +276,7 @@ export default class ChatSubscriptionsManager extends Service { @bind _onNewChannelSubscription(data) { this.chatChannelsManager.find(data.channel.id).then((channel) => { - // we need to refrehs here to have correct last message ids + // we need to refresh here to have correct last message ids channel.meta = data.channel.meta; if ( diff --git a/plugins/chat/assets/stylesheets/common/base-common.scss b/plugins/chat/assets/stylesheets/common/base-common.scss index 8635e61f10a..ba498a8dd26 100644 --- a/plugins/chat/assets/stylesheets/common/base-common.scss +++ b/plugins/chat/assets/stylesheets/common/base-common.scss @@ -9,7 +9,7 @@ $float-height: 530px; } // Very specific hack to ensure the contextual menu (copy/paste/...) is -// not completly over the textarea, the rules to position this menu are quite obscure +// not completely over the textarea, the rules to position this menu are quite obscure // and under DiscourseHUB the space between the textarea and the keyboard is so small that // it sometimes prefer to appear on top of the textarea, making any gesture very complicated html.ios-device.keyboard-visible body #main-outlet .full-page-chat { @@ -226,10 +226,10 @@ html.ios-device.keyboard-visible body #main-outlet .full-page-chat { .chat-user-avatar-container { position: relative; - padding: 1px; //for is-online boxshadow effect, preventing cutoff + padding: 1px; // for is-online box-shadow effect, preventing cutoff .avatar { - padding: 1px; ////for is-online boxshadow effect, preventing shift + padding: 1px; // for is-online box-shadow effect, preventing shift } .chat-user-presence-flair { diff --git a/plugins/chat/assets/stylesheets/common/chat-composer-dropdown.scss b/plugins/chat/assets/stylesheets/common/chat-composer-dropdown.scss index 122a4a63dee..a4d281330d6 100644 --- a/plugins/chat/assets/stylesheets/common/chat-composer-dropdown.scss +++ b/plugins/chat/assets/stylesheets/common/chat-composer-dropdown.scss @@ -1,4 +1,4 @@ -[data-theme="chat-composer-drodown"] { +[data-theme="chat-composer-dropdown"] { margin-left: 0.2rem; .tippy-content { diff --git a/plugins/chat/assets/stylesheets/common/chat-message-left-gutter.scss b/plugins/chat/assets/stylesheets/common/chat-message-left-gutter.scss index 00be06ab2e6..2a453f5b79e 100644 --- a/plugins/chat/assets/stylesheets/common/chat-message-left-gutter.scss +++ b/plugins/chat/assets/stylesheets/common/chat-message-left-gutter.scss @@ -8,7 +8,7 @@ .chat-message-container:hover .chat-message-left-gutter { .chat-time { - color: var(--secondary-mediumy); + color: var(--secondary-medium); } } diff --git a/plugins/chat/lib/chat/direct_message_channel_creator.rb b/plugins/chat/lib/chat/direct_message_channel_creator.rb index baad5d355d5..9da6f35d327 100644 --- a/plugins/chat/lib/chat/direct_message_channel_creator.rb +++ b/plugins/chat/lib/chat/direct_message_channel_creator.rb @@ -28,7 +28,7 @@ module Chat private def self.enforce_max_direct_message_users!(acting_user, target_users) - # We never want to prevent the actor from communicating with themself. + # We never want to prevent the actor from communicating with themselves target_users = target_users.reject { |user| user.id == acting_user.id } if !acting_user.staff? && target_users.size > SiteSetting.chat_max_direct_message_users @@ -83,7 +83,7 @@ module Chat end def self.ensure_actor_can_communicate!(acting_user, target_users) - # We never want to prevent the actor from communicating with themself. + # We never want to prevent the actor from communicating with themselves target_users = target_users.reject { |user| user.id == acting_user.id } screener = diff --git a/plugins/chat/lib/chat/review_queue.rb b/plugins/chat/lib/chat/review_queue.rb index c5dabebe06d..6b886dac4bd 100644 --- a/plugins/chat/lib/chat/review_queue.rb +++ b/plugins/chat/lib/chat/review_queue.rb @@ -5,7 +5,7 @@ # a separate PM. # - is_warning: Staff can send warnings when using the notify_user flag. # - take_action: Automatically approves the created reviewable and deletes the chat message. -# - queue_for_review: Adds a special reason to the reviwable score and creates the reviewable using +# - queue_for_review: Adds a special reason to the reviewable score and creates the reviewable using # the force_review option. module Chat diff --git a/plugins/discourse-lazy-videos/spec/components/pretty_text_spec.rb b/plugins/discourse-lazy-videos/spec/components/pretty_text_spec.rb index dd1c506770a..e01c2ca5154 100644 --- a/plugins/discourse-lazy-videos/spec/components/pretty_text_spec.rb +++ b/plugins/discourse-lazy-videos/spec/components/pretty_text_spec.rb @@ -22,11 +22,11 @@ RSpec.describe PrettyText do HTML - email_formated = <<~HTML + email_formatted = <<~HTML

15 Sorting Algorithms in 6 Minutes

Dear Rich

HTML - expect(PrettyText.format_for_email(cooked_html, post)).to match_html(email_formated) + expect(PrettyText.format_for_email(cooked_html, post)).to match_html(email_formatted) end end