A platform for community discussion. Free, open, simple.
DEV: Fix random typos (#16066)
Jarek Radosz6f6406ea0370
diff --git a/app/assets/javascripts/discourse/app/lib/discourse-location.js b/app/assets/javascripts/discourse/app/lib/discourse-location.jsindex f026de6b919..fdbe91410a4 100644--- a/app/assets/javascripts/discourse/app/lib/discourse-location.js+++ b/app/assets/javascripts/discourse/app/lib/discourse-location.js@@ -113,7 +113,7 @@ const DiscourseLocation = EmberObject.extend({Get the current `history.state`Polyfill checks for native browser support and falls back to retrieving- from a private _historyState constiable+ from a private _historyState variable@method getState*/diff --git a/app/assets/javascripts/discourse/app/lib/plugin-api.js b/app/assets/javascripts/discourse/app/lib/plugin-api.jsindex ed0ed57cc2e..22c95c38126 100644--- a/app/assets/javascripts/discourse/app/lib/plugin-api.js+++ b/app/assets/javascripts/discourse/app/lib/plugin-api.js@@ -831,7 +831,7 @@ class PluginApi {}/**- * Register a desktop notificaiton handler+ * Register a desktop notification handler** ```javascript* api.registerDesktopNotificationHandler((data, siteSettings, user) => {diff --git a/app/assets/javascripts/discourse/app/lib/register-topic-footer-dropdown.js b/app/assets/javascripts/discourse/app/lib/register-topic-footer-dropdown.jsindex a68920da44c..56cb2fd01b9 100644--- a/app/assets/javascripts/discourse/app/lib/register-topic-footer-dropdown.js+++ b/app/assets/javascripts/discourse/app/lib/register-topic-footer-dropdown.js@@ -40,7 +40,7 @@ export function registerTopicFooterDropdown(dropdown) {priority: 0,// an object used to display the state of the dropdown- // when no value is currectnly set, eg: { id: 1, name: "foo" }+ // when no value is currently set, eg: { id: 1, name: "foo" }noneItem: null,};diff --git a/app/assets/javascripts/discourse/app/lib/reports-loader.js b/app/assets/javascripts/discourse/app/lib/reports-loader.jsindex afd0b132ee6..fb774b323df 100644--- a/app/assets/javascripts/discourse/app/lib/reports-loader.js+++ b/app/assets/javascripts/discourse/app/lib/reports-loader.js@@ -19,7 +19,7 @@ const DEBOUNCING_DELAY = 50;export default {enqueue(type, params, callback) {- // makes sures the queue is not filling indefinitely+ // makes sure the queue is not filling indefinitelyif (_queue.length >= MAX_QUEUE_SIZE) {const removedJobs = _queue.splice(0, 1)[0];removedJobs.forEach((job) => {diff --git a/app/assets/javascripts/discourse/app/lib/user-presence.js b/app/assets/javascripts/discourse/app/lib/user-presence.jsindex 7fe1af6c6c7..fd062298378 100644--- a/app/assets/javascripts/discourse/app/lib/user-presence.js+++ b/app/assets/javascripts/discourse/app/lib/user-presence.js@@ -15,7 +15,7 @@ let testPresence = true;// Check whether the document is currently visible, and the user is actively using the site// Will return false if the browser went into the background more than `browserHiddenTime` milliseconds ago-// Will also return false if there has been no user activty for more than `userUnseenTime` milliseconds+// Will also return false if there has been no user activity for more than `userUnseenTime` milliseconds// Otherwise, will return trueexport default function userPresent({browserHiddenTime = DEFAULT_BROWSER_HIDDEN_MS,diff --git a/app/assets/javascripts/discourse/app/models/post-stream.js b/app/assets/javascripts/discourse/app/models/post-stream.jsindex d2d90649d4a..92d05871e4a 100644--- a/app/assets/javascripts/discourse/app/models/post-stream.js+++ b/app/assets/javascripts/discourse/app/models/post-stream.js@@ -680,8 +680,8 @@ export default RestModel.extend({});},- /* mainly for backwards compatability with plugins, used in quick messages plugin- * TODO: remove July 2021+ /* mainly for backwards compatibility with plugins, used in quick messages plugin+ * TODO: remove July 2022* */triggerNewPostInStream(postId, opts) {deprecated(diff --git a/app/assets/javascripts/discourse/app/models/topic-tracking-state.js b/app/assets/javascripts/discourse/app/models/topic-tracking-state.jsindex bbb9b058ef6..685750b52ef 100644--- a/app/assets/javascripts/discourse/app/models/topic-tracking-state.js+++ b/app/assets/javascripts/discourse/app/models/topic-tracking-state.js@@ -506,7 +506,7 @@ const TopicTrackingState = EmberObject.extend({},/**- * Calls the provided callback for each of the currenty tracked topics+ * Calls the provided callback for each of the currently tracked topics* we have in state.** @method forEachTrackeddiff --git a/app/assets/javascripts/discourse/app/models/user.js b/app/assets/javascripts/discourse/app/models/user.jsindex 4f9cca7a4d5..1e773db6489 100644--- a/app/assets/javascripts/discourse/app/models/user.js+++ b/app/assets/javascripts/discourse/app/models/user.js@@ -759,8 +759,8 @@ const User = RestModel.extend({},@discourseComputed("watched_first_post_category_ids")- watchedFirstPostCategories(wachedFirstPostCategoryIds) {- return Category.findByIds(wachedFirstPostCategoryIds);+ watchedFirstPostCategories(watchedFirstPostCategoryIds) {+ return Category.findByIds(watchedFirstPostCategoryIds);},@discourseComputed("can_delete_account")diff --git a/app/assets/javascripts/discourse/app/services/media-optimization-worker.js b/app/assets/javascripts/discourse/app/services/media-optimization-worker.jsindex 3699ffb5ae0..d60f5c5af4a 100644--- a/app/assets/javascripts/discourse/app/services/media-optimization-worker.js+++ b/app/assets/javascripts/discourse/app/services/media-optimization-worker.js@@ -44,7 +44,7 @@ export default class MediaOptimizationWorkerService extends Service {) {return Promise.resolve();}- await this.ensureAvailiableWorker();+ await this.ensureAvailableWorker();return new Promise(async (resolve) => {this.logIfDebug(`Transforming ${file.name}`);@@ -88,7 +88,7 @@ export default class MediaOptimizationWorkerService extends Service {});}- async ensureAvailiableWorker() {+ async ensureAvailableWorker() {if (this.worker && this.workerInstalled) {return Promise.resolve();}diff --git a/app/assets/javascripts/discourse/app/widgets/hooks.js b/app/assets/javascripts/discourse/app/widgets/hooks.jsindex 17c34d1519f..a95de1c1817 100644--- a/app/assets/javascripts/discourse/app/widgets/hooks.js+++ b/app/assets/javascripts/discourse/app/widgets/hooks.js@@ -43,7 +43,7 @@ function buildHook(attributeName, setAttr) {}// For the majority of events, we register a single listener on the `<body>`, and then-// notify the relavent widget (if any) when the event fires (see setupDocumentCallback() below)+// notify the relevant widget (if any) when the event fires (see setupDocumentCallback() below)export const WidgetClickHook = buildHook(CLICK_ATTRIBUTE_NAME);export const WidgetDoubleClickHook = buildHook(DOUBLE_CLICK_ATTRIBUTE_NAME);export const WidgetClickOutsideHook = buildHook(diff --git a/app/assets/javascripts/discourse/tests/acceptance/mobile-pan-test.js b/app/assets/javascripts/discourse/tests/acceptance/mobile-pan-test.jsindex cbde5320dc6..8ef7a1b70d5 100644--- a/app/assets/javascripts/discourse/tests/acceptance/mobile-pan-test.js+++ b/app/assets/javascripts/discourse/tests/acceptance/mobile-pan-test.js@@ -73,7 +73,7 @@ async function triggerSwipeEnd({ x, y, touchTarget }) {});}-// new Touch() isn't availiable in Firefox, so this is skipped there+// new Touch() isn't available in Firefox, so this is skipped thereacceptance("Mobile - menu swipes", function (needs) {needs.mobileView();needs.user();diff --git a/app/models/do_not_disturb_timing.rb b/app/models/do_not_disturb_timing.rbindex a9a4d2c51f1..62d7d65cbda 100644--- a/app/models/do_not_disturb_timing.rb+++ b/app/models/do_not_disturb_timing.rb@@ -3,9 +3,9 @@class DoNotDisturbTiming < ActiveRecord::Basebelongs_to :user- validate :ends_at_greater_thans_starts_at+ validate :ends_at_greater_than_starts_at- def ends_at_greater_thans_starts_at+ def ends_at_greater_than_starts_atif starts_at > ends_aterrors.add(:ends_at, :invalid)enddiff --git a/app/models/topic_user.rb b/app/models/topic_user.rbindex 4f6b7853dde..638fa4f891c 100644--- a/app/models/topic_user.rb+++ b/app/models/topic_user.rb@@ -405,8 +405,8 @@ class TopicUser < ActiveRecord::Base# The parameters can be used to shrink the scope, and make it faster.# user_id, post_id and topic_id can optionally be arrays of ids.#- # Providing post_id will automatically scope to the relavent user_id and topic_id.- # A provided `topic_id` value will always take presedence, which is+ # Providing post_id will automatically scope to the relevant user_id and topic_id.+ # A provided `topic_id` value will always take precedence, which is# useful when a post has been moved between topics.def self.update_post_action_cache(user_id: nil,diff --git a/app/services/inline_uploads.rb b/app/services/inline_uploads.rbindex 26907d47c87..598fdc9e360 100644--- a/app/services/inline_uploads.rb+++ b/app/services/inline_uploads.rb@@ -17,7 +17,7 @@ class InlineUploadsendcooked_fragment = Nokogiri::HTML5::fragment(PrettyText.cook(markdown, disable_emojis: true))- link_occurences = []+ link_occurrences = []cooked_fragment.traverse do |node|if node.name == "img"@@ -29,9 +29,9 @@ class InlineUploadsif seen_link = matched_uploads(node).firstif (actual_link = (node.attributes["href"]&.value || node.attributes["src"]&.value))- link_occurences << { link: actual_link, is_valid: true }+ link_occurrences << { link: actual_link, is_valid: true }elsif node.name != "p"- link_occurences << { link: seen_link, is_valid: false }+ link_occurrences << { link: seen_link, is_valid: false }endendend@@ -104,7 +104,7 @@ class InlineUploads.sort { |a, b| a[3] <=> b[3] }.each do |match, link, replace_with, _index|- node_info = link_occurences.shift+ node_info = link_occurrences.shiftnext unless node_info&.dig(:is_valid)if link.include?(node_info[:link])diff --git a/lib/presence_channel.rb b/lib/presence_channel.rbindex 82c9db540b6..83d6cd066ee 100644--- a/lib/presence_channel.rb+++ b/lib/presence_channel.rb@@ -220,7 +220,7 @@ class PresenceChannelend# Designed to be run periodically. Checks the channel list for channels with expired members,- # and runs auto_leave for each eligable channel+ # and runs auto_leave for each eligible channeldef self.auto_leave_allchannels_with_expiring_members = PresenceChannel.redis.zrangebyscore(redis_key_channel_list, '-inf', Time.zone.now.to_i)channels_with_expiring_members.each do |name|@@ -357,7 +357,7 @@ class PresenceChannel# are published in the same sequence that the PresenceChannel lua script are run.## The present/leave/auto_leave lua scripts will automatically acquire this mutex- # if needed. If their return value indicates a change has occured, the mutex+ # if needed. If their return value indicates a change has occurred, the mutex# should be released via #release_mutex after the messagebus message has been sent## If they need a change, and the mutex is not available, they will raise an errordiff --git a/plugins/discourse-presence/spec/integration/presence_spec.rb b/plugins/discourse-presence/spec/integration/presence_spec.rbindex a59c43b8377..a6d441e6a63 100644--- a/plugins/discourse-presence/spec/integration/presence_spec.rb+++ b/plugins/discourse-presence/spec/integration/presence_spec.rb@@ -98,7 +98,7 @@ describe "discourse-presence" doexpect(c.config.allowed_user_ids).to eq(nil)end- it 'handles permissions for private messsages' do+ it 'handles permissions for private messages' doc = PresenceChannel.new("/discourse-presence/reply/#{private_message.id}")expect(c.config.public).to eq(false)expect(c.config.allowed_group_ids).to contain_exactly(group.id, Group::AUTO_GROUPS[:staff])diff --git a/script/import_scripts/google_groups.rb b/script/import_scripts/google_groups.rbindex ab7bb303895..212702fc77d 100755--- a/script/import_scripts/google_groups.rb+++ b/script/import_scripts/google_groups.rb@@ -123,7 +123,7 @@ def crawl_topic(url)puts "Scraping #{url}"get(url)- messsages_crawled = false+ messages_crawled = falseextract(".subject a[href*='#{@groupname}']") do |a|[@@ -131,10 +131,10 @@ def crawl_topic(url)a["title"].empty?]end.each do |msg_url, might_be_deleted|- messsages_crawled |= crawl_message(msg_url, might_be_deleted)+ messages_crawled |= crawl_message(msg_url, might_be_deleted)end- @skipped_topic_count = skippable && messsages_crawled ? 0 : @skipped_topic_count + 1+ @skipped_topic_count = skippable && messages_crawled ? 0 : @skipped_topic_count + 1@scraped_topic_urls << urlrescueputs "Failed to scrape topic at #{url}".reddiff --git a/spec/requests/api/uploads_spec.rb b/spec/requests/api/uploads_spec.rbindex 540d350598a..61e13ac002f 100644--- a/spec/requests/api/uploads_spec.rb+++ b/spec/requests/api/uploads_spec.rb@@ -202,7 +202,7 @@ describe 'uploads' doconsumes 'application/json'description <<~HEREDOCMultipart uploads are uploaded in chunks or parts to individual presigned- URLs, similar to the one genreated by /generate-presigned-put. The part+ URLs, similar to the one generated by /generate-presigned-put. The partnumbers provided must be between 1 and 10000. The total number of partswill depend on the chunk size in bytes that you intend to use to uploadeach chunk. For example a 12MB file may have 2 5MB chunks and a final