A platform for community discussion. Free, open, simple.
DEV: Fix random typos (#33839)
Jarek Radoszcfb1ea0c2ce2
diff --git a/app/assets/javascripts/discourse/app/lib/transformer.js b/app/assets/javascripts/discourse/app/lib/transformer.jsindex 1b536744ec9..bb3eff3ecc0 100644--- a/app/assets/javascripts/discourse/app/lib/transformer.js+++ b/app/assets/javascripts/discourse/app/lib/transformer.js@@ -138,7 +138,7 @@ export function _addTransformerName(name, transformerType) {console.warn(`${prefix()}: transformer "${name}" matches existing core transformer "${existingInfo.name- }" and shouldn't be re-registered using the the API.`+ }" and shouldn't be re-registered using the API.`);return;}diff --git a/app/assets/javascripts/discourse/tests/integration/components/async-content-test.gjs b/app/assets/javascripts/discourse/tests/integration/components/async-content-test.gjsindex e3917ac5296..a4a6d87241a 100644--- a/app/assets/javascripts/discourse/tests/integration/components/async-content-test.gjs+++ b/app/assets/javascripts/discourse/tests/integration/components/async-content-test.gjs@@ -286,7 +286,7 @@ module("Integration | Component | AsyncContent", function (hooks) {assert.dom(".empty").doesNotExist();});- test("it displays the content block if the the empty block is not provided", async function (assert) {+ test("it displays the content block if the empty block is not provided", async function (assert) {const promise = Promise.resolve(null);await render(diff --git a/app/assets/javascripts/discourse/tests/unit/lib/transformer-test.js b/app/assets/javascripts/discourse/tests/unit/lib/transformer-test.jsindex d38da282f7c..fb37764571f 100644--- a/app/assets/javascripts/discourse/tests/unit/lib/transformer-test.js+++ b/app/assets/javascripts/discourse/tests/unit/lib/transformer-test.js@@ -445,7 +445,7 @@ module("Unit | Utility | transformers", function (hooks) {assert.deepEqual([testObject1.value1, testObject2.value1],[0, 0],- "catches the exception and and keeps processing the queue when there are others transformers registered"+ "catches the exception and keeps processing the queue when there are others transformers registered");});@@ -1180,7 +1180,7 @@ module("Unit | Utility | transformers", function (hooks) {assert.deepEqual([testObject1.value, testObject2.value],[0, 0],- "catches the exception and and keeps processing the queue when there are others transformers registered"+ "catches the exception and keeps processing the queue when there are others transformers registered");});diff --git a/lib/site_setting_extension.rb b/lib/site_setting_extension.rbindex 3d1ce6253eb..a579189024b 100644--- a/lib/site_setting_extension.rb+++ b/lib/site_setting_extension.rb@@ -830,9 +830,9 @@ module SiteSettingExtension# If the theme hasn't overridden any theme site settings (or changed defaults)# then we will just fall back further down bellow to the current site setting value.- settings_overriden_for_theme = theme_site_settings[scoped_to[:theme_id]]- if settings_overriden_for_theme && settings_overriden_for_theme.key?(clean_name)- return settings_overriden_for_theme[clean_name]+ settings_overridden_for_theme = theme_site_settings[scoped_to[:theme_id]]+ if settings_overridden_for_theme && settings_overridden_for_theme.key?(clean_name)+ return settings_overridden_for_theme[clean_name]endenddiff --git a/lib/text_sentinel.rb b/lib/text_sentinel.rbindex 2c806733dbf..e467d97aa33 100644--- a/lib/text_sentinel.rb+++ b/lib/text_sentinel.rb@@ -46,7 +46,7 @@ class TextSentinelseems_quiet?end- # Ensure minumum entropy+ # Ensure minimum entropydef seems_meaningful?@opts[:min_entropy].nil? || entropy >= @opts[:min_entropy]enddiff --git a/lib/url_helper.rb b/lib/url_helper.rbindex be36948bdc4..a15da00b6bc 100644--- a/lib/url_helper.rb+++ b/lib/url_helper.rb@@ -98,7 +98,7 @@ class UrlHelper# Ideally we will jump straight to `Addressable::URI.normalized_encode`. However,# that implementation has some edge-case issues like https://github.com/sporkmonger/addressable/issues/472.- # To temporaily work around those issues for the majority of cases, we try parsing with `::URI`.+ # To temporarily work around those issues for the majority of cases, we try parsing with `::URI`.# If that fails (e.g. due to non-ascii characters) then we will fall back to addressable.# Hopefully we can simplify this back to `Addressable::URI.normalized_encode` in the future.diff --git a/plugins/chat/assets/javascripts/discourse/services/chat-api.js b/plugins/chat/assets/javascripts/discourse/services/chat-api.jsindex 574878a9e02..4b0544bc2f5 100644--- a/plugins/chat/assets/javascripts/discourse/services/chat-api.js+++ b/plugins/chat/assets/javascripts/discourse/services/chat-api.js@@ -275,7 +275,7 @@ export default class ChatApi extends Service {* Creates a message interaction.* @param {number} channelId - The ID of the channel.* @param {number} messageId - The ID of the message.- * @param {object} data - Params of the intereaction.+ * @param {object} data - Params of the interaction.* @param {string} data.action_id - The ID of the action.* @returns {Promise}*/diff --git a/plugins/discourse-ai/spec/db/migrate/20250127145305_clean_unused_embedding_search_indexes_spec.rb b/plugins/discourse-ai/spec/db/migrate/20250127145305_clean_unused_embedding_search_indexes_spec.rbindex 2e775d333fe..c2e657ba327 100644--- a/plugins/discourse-ai/spec/db/migrate/20250127145305_clean_unused_embedding_search_indexes_spec.rb+++ b/plugins/discourse-ai/spec/db/migrate/20250127145305_clean_unused_embedding_search_indexes_spec.rb@@ -45,13 +45,13 @@ RSpec.describe CleanUnusedEmbeddingSearchIndexes doit "removes all indexes" domigration.up- remaininig_idxs =+ remaining_idxs =DB.query_single("SELECT indexname FROM pg_indexes WHERE indexname IN (:names)",names: all_idx_names,)- expect(remaininig_idxs).to be_empty+ expect(remaining_idxs).to be_emptyendend@@ -66,19 +66,19 @@ RSpec.describe CleanUnusedEmbeddingSearchIndexes domigration.up- remaininig_idxs =+ remaining_idxs =DB.query_single("SELECT indexname FROM pg_indexes WHERE indexname IN (:names)",names: all_idx_names,)- expect(remaininig_idxs).to contain_exactly(*expected_model_idxs)+ expect(remaining_idxs).to contain_exactly(*expected_model_idxs)# This method checks dimensions are correct.expect(DiscourseAi::Embeddings::Schema.correctly_indexed?(embedding_def)).to eq(true)endend- context "when there is an embedding definition with different dimenstions" do+ context "when there is an embedding definition with different dimensions" dofab!(:embedding_def) { Fabricate(:embedding_definition, id: 2, dimensions: 1536) }fab!(:embedding_def_2) { Fabricate(:embedding_definition, id: 3, dimensions: 768) }@@ -91,13 +91,13 @@ RSpec.describe CleanUnusedEmbeddingSearchIndexes domigration.up- remaininig_idxs =+ remaining_idxs =DB.query_single("SELECT indexname FROM pg_indexes WHERE indexname IN (:names)",names: all_idx_names,)- expect(remaininig_idxs).to contain_exactly(*expected_model_idxs)+ expect(remaining_idxs).to contain_exactly(*expected_model_idxs)# This method checks dimensions are correct.expect(DiscourseAi::Embeddings::Schema.correctly_indexed?(embedding_def_2)).to eq(true)enddiff --git a/plugins/discourse-ai/spec/lib/modules/ai_moderation/spam_scanner_spec.rb b/plugins/discourse-ai/spec/lib/modules/ai_moderation/spam_scanner_spec.rbindex a4a126430b9..e1d8e77c5d3 100644--- a/plugins/discourse-ai/spec/lib/modules/ai_moderation/spam_scanner_spec.rb+++ b/plugins/discourse-ai/spec/lib/modules/ai_moderation/spam_scanner_spec.rb@@ -215,7 +215,7 @@ RSpec.describe DiscourseAi::AiModeration::SpamScanner doendend- it "unsilences flagging user if erronuously silenced" do+ it "unsilences flagging user if erroneously silenced" dodescribed_class.flagging_user.update!(silenced_till: 1.day.from_now)expect(described_class.flagging_user.silenced?).to eq(false)end@@ -225,7 +225,7 @@ RSpec.describe DiscourseAi::AiModeration::SpamScanner doexpect(described_class.flagging_user.trust_level).to eq(4)end- it "unsuspends user if it was erronuously suspended" do+ it "unsuspends user if it was erroneously suspended" dodescribed_class.flagging_user.update!(suspended_till: 1.day.from_now, suspended_at: 1.day.ago)expect(described_class.flagging_user.suspended?).to eq(false)enddiff --git a/plugins/discourse-ai/spec/requests/admin/ai_embeddings_controller_spec.rb b/plugins/discourse-ai/spec/requests/admin/ai_embeddings_controller_spec.rbindex 5c86ccd0252..a0da7a94823 100644--- a/plugins/discourse-ai/spec/requests/admin/ai_embeddings_controller_spec.rb+++ b/plugins/discourse-ai/spec/requests/admin/ai_embeddings_controller_spec.rb@@ -94,7 +94,7 @@ RSpec.describe DiscourseAi::Admin::AiEmbeddingsController doendcontext "with invalid attrs" do- it "doesn't create a new embedding defitinion" do+ it "doesn't create a new embedding definition" dopost "/admin/plugins/discourse-ai/ai-embeddings.json",params: {ai_embedding: valid_attrs.except(:provider),@@ -151,7 +151,7 @@ RSpec.describe DiscourseAi::Admin::AiEmbeddingsController doexpect(response.status).to eq(404)end- it "doesn't allow dimenstions to be updated" do+ it "doesn't allow dimensions to be updated" donew_dimensions = 200put "/admin/plugins/discourse-ai/ai-embeddings/#{embedding_definition.id}.json",@@ -183,7 +183,7 @@ RSpec.describe DiscourseAi::Admin::AiEmbeddingsController dodescribe "DELETE #destroy" dofab!(:embedding_definition)- it "destroys the embedding defitinion" do+ it "destroys the embedding definition" doexpect {delete "/admin/plugins/discourse-ai/ai-embeddings/#{embedding_definition.id}.json"diff --git a/plugins/discourse-assign/spec/integration/assign_spec.rb b/plugins/discourse-assign/spec/integration/assign_spec.rbindex 5d2f73134bb..e4b5784ed4d 100644--- a/plugins/discourse-assign/spec/integration/assign_spec.rb+++ b/plugins/discourse-assign/spec/integration/assign_spec.rb@@ -189,7 +189,7 @@ describe "integration tests" doexpect(assignment.target_id).to eq(new_topic.id)end- it "assigment is still post assignment when not first post" do+ it "assignment is still post assignment when not first post" dopost.update!(topic: new_topic, post_number: "3")DiscourseEvent.trigger(:post_moved, post, old_topic.id)assignment.reloaddiff --git a/plugins/discourse-assign/spec/jobs/scheduled/enqueue_reminders_spec.rb b/plugins/discourse-assign/spec/jobs/scheduled/enqueue_reminders_spec.rbindex aa8e2247b37..cf2fa2bb382 100644--- a/plugins/discourse-assign/spec/jobs/scheduled/enqueue_reminders_spec.rb+++ b/plugins/discourse-assign/spec/jobs/scheduled/enqueue_reminders_spec.rb@@ -35,7 +35,7 @@ RSpec.describe Jobs::EnqueueReminders doassert_reminders_enqueued(0)end- it "enqueues a reminder when the user has one assignement if `pending_assign_reminder_threshold` is set to one" do+ it "enqueues a reminder when the user has one assignment if `pending_assign_reminder_threshold` is set to one" doassign_one_task_to(user)SiteSetting.pending_assign_reminder_threshold = 1diff --git a/plugins/discourse-assign/spec/lib/assigner_spec.rb b/plugins/discourse-assign/spec/lib/assigner_spec.rbindex 4608b6770e6..9c291f33a3f 100644--- a/plugins/discourse-assign/spec/lib/assigner_spec.rb+++ b/plugins/discourse-assign/spec/lib/assigner_spec.rb@@ -41,7 +41,7 @@ RSpec.describe Assigner do)end- describe "when user watchs topic when assigned" do+ describe "when user watches topic when assigned" dobefore { moderator.user_option.watch_topic_when_assigned! }it "respects 'when assigned' user preference" dodiff --git a/plugins/discourse-chat-integration/spec/helpers/helper_spec.rb b/plugins/discourse-chat-integration/spec/helpers/helper_spec.rbindex 6cc4ec87d02..22f5adc7dbc 100644--- a/plugins/discourse-chat-integration/spec/helpers/helper_spec.rb+++ b/plugins/discourse-chat-integration/spec/helpers/helper_spec.rb@@ -23,7 +23,7 @@ RSpec.describe DiscourseChatIntegration::Manager dodescribe ".process_command" dodescribe "add new rule" do# Not testing how filters are merged here, that's done in .smart_create_rule- # We just want to make sure the commands are being interpretted correctly+ # We just want to make sure the commands are being interpreted correctlyit "should add a new rule correctly" doresponse = DiscourseChatIntegration::Helper.process_command(chan1, ["watch", category.slug])@@ -387,7 +387,7 @@ RSpec.describe DiscourseChatIntegration::Manager dottl = Discourse.redis.pttl("chat_integration:transcript:#{key}")- # Slight hack since freeze_time doens't work on redis+ # Slight hack since freeze_time doesn't work on redisexpect(Discourse.redis.pttl("chat_integration:transcript:#{key}")).to be <= (3601 * 1000)expect(Discourse.redis.pttl("chat_integration:transcript:#{key}")).to be >= (3599 * 1000)enddiff --git a/plugins/discourse-github/config/locales/server.en.yml b/plugins/discourse-github/config/locales/server.en.ymlindex 0f77725e283..cfe12d2607d 100644--- a/plugins/discourse-github/config/locales/server.en.yml+++ b/plugins/discourse-github/config/locales/server.en.yml@@ -9,8 +9,8 @@ en:github_permalinks_exclude: "Filename or directory that should be excluded from permalink overwrites. Provide only filename or full path: user/repository/optional-directory/filename"github_badges_enabled: "Enable GitHub badges"github_badges_repos: "URLs of the GitHub repos to scan for contributions and commits"- github_silver_badge_min_commits: "Minumum number of commits for silver badge"- github_gold_badge_min_commits: "Minumum number of commits for gold badge"+ github_silver_badge_min_commits: "Minimum number of commits for silver badge"+ github_gold_badge_min_commits: "Minimum number of commits for gold badge"errors:invalid_badge_repo: "You must provide a GitHub URL or the repository name in the format github_user/repository_name"diff --git a/plugins/discourse-github/spec/jobs/replace_github_non_permalinks_spec.rb b/plugins/discourse-github/spec/jobs/replace_github_non_permalinks_spec.rbindex 49907a5ffdb..d428835d023 100644--- a/plugins/discourse-github/spec/jobs/replace_github_non_permalinks_spec.rb+++ b/plugins/discourse-github/spec/jobs/replace_github_non_permalinks_spec.rb@@ -81,11 +81,11 @@ describe Jobs::ReplaceGithubNonPermalinks doit "works with multiple github urls in the post" dostub_request(:get, github_permanent_url).to_return(status: 200, body: "")stub_request(:get, github_permanent_url2.gsub(/#.+$/, "")).to_return(status: 200, body: "")- post = Fabricate(:post, raw: "#{github_url} #{github_url2} htts://github.com")+ post = Fabricate(:post, raw: "#{github_url} #{github_url2} https://github.com")job.execute(post_id: post.id)post.reload- updated_post = "#{github_permanent_url} #{github_permanent_url2} htts://github.com"+ updated_post = "#{github_permanent_url} #{github_permanent_url2} https://github.com"expect(post.raw).to eq(updated_post)endenddiff --git a/plugins/discourse-patreon/spec/lib/patron_spec.rb b/plugins/discourse-patreon/spec/lib/patron_spec.rbindex 714c68b7bdf..c10ea7a700d 100644--- a/plugins/discourse-patreon/spec/lib/patron_spec.rb+++ b/plugins/discourse-patreon/spec/lib/patron_spec.rb@@ -17,13 +17,13 @@ RSpec.describe ::Patreon::Patron doamount_cents: "0",},"4589" => {- title: "Sponsers",+ title: "Sponsors",amount_cents: "1000",},}endlet(:reward_users) { { "0" => %w[111111 111112], "4589" => ["111112"] } }- let(:titles) { { "111111" => "All Patrons", "111112" => "All Patrons, Sponsers" } }+ let(:titles) { { "111111" => "All Patrons", "111112" => "All Patrons, Sponsors" } }before doPatreon.set("users", patrons)@@ -57,7 +57,7 @@ RSpec.describe ::Patreon::Patron doenddescribe "sync groups" do- let(:ouser) { Fabricate(:patreon_user_info, provider_uid: "111112") }+ let(:patreon_user_info) { Fabricate(:patreon_user_info, provider_uid: "111112") }let(:group1) { Fabricate(:group) }let(:group2) { Fabricate(:group) }@@ -69,14 +69,14 @@ RSpec.describe ::Patreon::Patron doit "should sync all Patreon users" douser = Fabricate(:user, email: "[email protected]")described_class.sync_groups- expect(group1.users.to_a - [ouser.user, user]).to eq([])- expect(group2.users.to_a - [ouser.user]).to eq([])+ expect(group1.users.to_a - [patreon_user_info.user, user]).to eq([])+ expect(group2.users.to_a - [patreon_user_info.user]).to eq([])endit "should sync by Patreon id" do- described_class.sync_groups_by(patreon_id: ouser.provider_uid)- expect(group1.users.to_a).to eq([ouser.user])- expect(group2.users.to_a).to eq([ouser.user])+ described_class.sync_groups_by(patreon_id: patreon_user_info.provider_uid)+ expect(group1.users.to_a).to eq([patreon_user_info.user])+ expect(group2.users.to_a).to eq([patreon_user_info.user])endendenddiff --git a/plugins/discourse-post-voting/spec/serializers/post_voting/comment_serializer_spec.rb b/plugins/discourse-post-voting/spec/serializers/post_voting/comment_serializer_spec.rbindex 3d18217183a..8a77fb0697f 100644--- a/plugins/discourse-post-voting/spec/serializers/post_voting/comment_serializer_spec.rb+++ b/plugins/discourse-post-voting/spec/serializers/post_voting/comment_serializer_spec.rb@@ -14,27 +14,27 @@ describe PostVotingCommentSerializer docontext "with a comment user" doit "returns the right attributes for an anonymous user" doserializer = described_class.new(comment, scope: Guardian.new)- serilized_comment = serializer.as_json[:post_voting_comment]-- expect(serilized_comment[:id]).to eq(comment.id)- expect(serilized_comment[:created_at]).to eq_time(comment.created_at)- expect(serilized_comment[:post_voting_vote_count]).to eq(1)- expect(serilized_comment[:cooked]).to eq(comment.cooked)- expect(serilized_comment[:name]).to eq(comment.user.name)- expect(serilized_comment[:username]).to eq(comment.user.username)+ serialized_comment = serializer.as_json[:post_voting_comment]++ expect(serialized_comment[:id]).to eq(comment.id)+ expect(serialized_comment[:created_at]).to eq_time(comment.created_at)+ expect(serialized_comment[:post_voting_vote_count]).to eq(1)+ expect(serialized_comment[:cooked]).to eq(comment.cooked)+ expect(serialized_comment[:name]).to eq(comment.user.name)+ expect(serialized_comment[:username]).to eq(comment.user.username)endit "returns the right attributes for logged in user" doserializer = described_class.new(comment, scope: Guardian.new(post.user))- serilized_comment = serializer.as_json[:post_voting_comment]-- expect(serilized_comment[:id]).to eq(comment.id)- expect(serilized_comment[:created_at]).to eq_time(comment.created_at)- expect(serilized_comment[:post_voting_vote_count]).to eq(1)- expect(serilized_comment[:cooked]).to eq(comment.cooked)- expect(serilized_comment[:name]).to eq(comment.user.name)- expect(serilized_comment[:username]).to eq(comment.user.username)- expect(serilized_comment[:user_voted]).to eq(true)+ serialized_comment = serializer.as_json[:post_voting_comment]++ expect(serialized_comment[:id]).to eq(comment.id)+ expect(serialized_comment[:created_at]).to eq_time(comment.created_at)+ expect(serialized_comment[:post_voting_vote_count]).to eq(1)+ expect(serialized_comment[:cooked]).to eq(comment.cooked)+ expect(serialized_comment[:name]).to eq(comment.user.name)+ expect(serialized_comment[:username]).to eq(comment.user.username)+ expect(serialized_comment[:user_voted]).to eq(true)endend@@ -46,11 +46,11 @@ describe PostVotingCommentSerializer doit "does not fail to serialize" doserializer = described_class.new(comment, scope: Guardian.new(post.user))- serilized_comment = serializer.as_json[:post_voting_comment]+ serialized_comment = serializer.as_json[:post_voting_comment]- expect(serilized_comment[:id]).to eq(comment.id)- expect(serilized_comment[:name]).to be_nil- expect(serilized_comment[:username]).to be_nil+ expect(serialized_comment[:id]).to eq(comment.id)+ expect(serialized_comment[:name]).to be_nil+ expect(serialized_comment[:username]).to be_nilendendenddiff --git a/plugins/discourse-solved/spec/lib/guardian_extensions_spec.rb b/plugins/discourse-solved/spec/lib/guardian_extensions_spec.rbindex c8c33759abd..9a3d3ad0b1e 100644--- a/plugins/discourse-solved/spec/lib/guardian_extensions_spec.rb+++ b/plugins/discourse-solved/spec/lib/guardian_extensions_spec.rb@@ -63,7 +63,7 @@ describe DiscourseSolved::GuardianExtensions doexpect(guardian.can_accept_answer?(topic, post)).to eq(true)end- it "returns false if the user is trust level 4 but the trust level 4 group is not allowd to accept solutions" do+ it "returns false if the user is trust level 4 but the trust level 4 group is not allowed to accept solutions" doSiteSetting.accept_all_solutions_allowed_groups = Fabricate(:group).iduser.update!(trust_level: TrustLevel[4])expect(guardian.can_accept_answer?(topic, post)).to eq(false)diff --git a/spec/requests/users_controller_spec.rb b/spec/requests/users_controller_spec.rbindex 045f8e3c549..8d6c754df7b 100644--- a/spec/requests/users_controller_spec.rb+++ b/spec/requests/users_controller_spec.rb@@ -1181,7 +1181,7 @@ RSpec.describe UsersController docontext "with an admin api key" dofab!(:api_key, refind: false) { Fabricate(:api_key, user: admin) }- it "creates the user as active with a an admin key" do+ it "creates the user as active with an admin key" doSiteSetting.send_welcome_message = trueSiteSetting.must_approve_users = truediff --git a/themes/horizon/javascripts/discourse/components/sidebar-new-topic-button.gjs b/themes/horizon/javascripts/discourse/components/sidebar-new-topic-button.gjsindex bc7d635c60d..c168b64fe19 100644--- a/themes/horizon/javascripts/discourse/components/sidebar-new-topic-button.gjs+++ b/themes/horizon/javascripts/discourse/components/sidebar-new-topic-button.gjs@@ -71,7 +71,7 @@ export default class SidebarNewTopicButton extends Component {}@action- getCategoryandTag() {+ getCategoryAndTag() {this.category = this.router.currentRoute.attributes?.category || null;this.tag = this.router.currentRoute.attributes?.tag || null;}@@ -96,8 +96,8 @@ export default class SidebarNewTopicButton extends Component {{{#if this.shouldRender}}<divclass="sidebar-new-topic-button__wrapper"- {{didInsert this.getCategoryandTag}}- {{didUpdate this.getCategoryandTag this.router.currentRoute}}+ {{didInsert this.getCategoryAndTag}}+ {{didUpdate this.getCategoryAndTag this.router.currentRoute}}{{didInsert this.watchForComposer}}{{willDestroy this.stopWatchingForComposer}}>