Skip to content

Commit

Permalink
Fix some spelling errors (part 7) (#12469)
Browse files Browse the repository at this point in the history
* spelling: additional

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>

* spelling: amendment

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>

* spelling: announcement

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>

* spelling: attachment

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>

* spelling: availability

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>

* spelling: comments

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>

* spelling: committee

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>

* spelling: conditioned

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>

* spelling: convert

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>

* spelling: dummies

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>

* spelling: identifier

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>

* spelling: initialized

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>

* spelling: length

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>

* spelling: organization

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>

* spelling: prefix

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>

* spelling: quacks

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>

* spelling: remove

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>

* spelling: repository

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>

* spelling: reset

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>

* spelling: resetting

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>

* spelling: shakapacker

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>

* spelling: siblings

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>

---------

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
  • Loading branch information
jsoref committed Feb 19, 2024
1 parent 4b47887 commit 6103823
Show file tree
Hide file tree
Showing 41 changed files with 71 additions and 71 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/Feature_request.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ We have disabled the feature request's issue creation on this repository. If you

* [Feature Request](https://meta.decidim.org/processes/roadmap)

We are doing this because we are trying to eat our own dog food. Once your proposal is collaboratively reviewed and accepted by the Product Comitee, we will create the new issue on GitHub and notify you through Metadecidim.
We are doing this because we are trying to eat our own dog food. Once your proposal is collaboratively reviewed and accepted by the Product Committee, we will create the new issue on GitHub and notify you through Metadecidim.

Thanks for contributing to Decidim!

Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<tr data-id="<%= status.id %>">
<td><%= status.key %><br></td>
<td><%= translated_attribute(status.name) %></td>
<td><%= truncate translated_attribute(status.description), lenght: 50 %></td>
<td><%= truncate translated_attribute(status.description), length: 50 %></td>
<td><%= status.progress %></td>
<td class="table-list__actions">
<% if allowed_to? :update, :status, status: status %>
Expand Down
2 changes: 1 addition & 1 deletion decidim-comments/app/models/decidim/comments/seed.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class Seed
class << self
# Adds a random amount of comments for a given resource.
#
# @param resource [Object] - the Decidim resource to add the coments to.
# @param resource [Object] - the Decidim resource to add the comments to.
# examples: Decidim::Proposals::CollaborativeDraft, Decidim::Proposals::Proposal,
#
# @return nil
Expand Down
2 changes: 1 addition & 1 deletion decidim-comments/spec/types/comment_type_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ module Comments

let(:query) { "{ comments { id } }" }

it "return comment's comments comments data" do
it "return comment's comments data" do
replies.each do |reply|
expect(response["comments"]).to include("id" => reply.id.to_s)
end
Expand Down
2 changes: 1 addition & 1 deletion decidim-core/app/cells/decidim/upload_modal_cell.rb
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ def file_name_for(attachment)
def determine_filename(attachment)
return attachment.filename.to_s if attachment.is_a? ActiveStorage::Blob
return blob(attachment).filename.to_s if blob(attachment).present?
return attachment.original_filename.to_s.presence || attachhment.path.split("/").last if attachment.is_a? ActionDispatch::Http::UploadedFile
return attachment.original_filename.to_s.presence || attachment.path.split("/").last if attachment.is_a? ActionDispatch::Http::UploadedFile

attachment.url.split("/").last
end
Expand Down
2 changes: 1 addition & 1 deletion decidim-core/app/helpers/decidim/modal_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ module Decidim
# you also can add your custom close button through data-dialog-close="<seed>"
#
# Options available:
# - id: String. Unique identificator for the dialog, if the page has distinct modal windows (default: "")
# - id: String. Unique identifier for the dialog, if the page has distinct modal windows (default: "")
# - class: String. CSS classes for the modal content.
# - closable: Boolean. Whether the modal can be closed or not (default: true)
module ModalHelper
Expand Down
2 changes: 1 addition & 1 deletion decidim-core/app/models/decidim/authorization.rb
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ def workflow_manifest
@workflow_manifest ||= Decidim::Verifications.find_workflow_manifest(name)
end

# Calculates when this authorization can be reseted, if desired.
# Calculates when this authorization can be reset, if desired.
#
# **time_between_renewals** is defined in `workflow_manifest.time_between_renewals`
# defaults to 1 day
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ const getMsoListStyle = (type, level, styleDefs) => {
return Object.assign(typeStyle, levelStyle);
};

const converMsoListStyleToHtml = (listStyle) => {
const convertMsoListStyleToHtml = (listStyle) => {
let tag = "ol",
type = null;
switch (listStyle["mso-level-number-format"]) {
Expand Down Expand Up @@ -108,7 +108,7 @@ export const transformMsDesktop = (html) => {
elements.forEach((paragraph) => {
const { type: msoType, level } = detectMsoList(paragraph);
const listStyle = getMsoListStyle(msoType, level, listStyles);
const { tag, type } = converMsoListStyleToHtml(listStyle);
const { tag, type } = convertMsoListStyleToHtml(listStyle);

const li = document.createElement("li");
const pa = document.createElement("p");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ export default class InputCharacterCounter {
} else if (this.maxCharacters - srLength === this.announceThreshold) {
return this.announcedAt || currentLength;
// The third branch checks that when deleting characters, we should
// announce the next threshold to get accurate annoucement. E.g. when we
// announce the next threshold to get accurate announcement. E.g. when we
// have 750 characters left and the user deletes 100 characters at once,
// we should announce "700 characters left" after that deletion.
} else if (srLength < currentLength) {
Expand Down
2 changes: 1 addition & 1 deletion decidim-core/app/validators/passthru_validator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ def validation_record(record)
def validation_record_context(dummy, record)
if dummy.is_a?(Decidim::Form)
dummy.with_context(
current_organization: record.try(:current_organization) || record.try(:ganization),
current_organization: record.try(:current_organization) || record.try(:organization),
current_participatory_space: record.try(:current_participatory_space) || record.try(:participatory_space),
current_component: record.try(:current_component) || record.try(:component)
)
Expand Down
2 changes: 1 addition & 1 deletion decidim-core/lib/tasks/decidim_webpacker_tasks.rake
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ namespace :decidim do
"tsconfig.json"
end

# Remnove the Webpacker config and deploy shakacpacker
# Remove the Webpacker config and deploy shakapacker
migrate_shakapacker

# Update JS dependencies
Expand Down
2 changes: 1 addition & 1 deletion decidim-core/spec/services/decidim/tokenizer_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
let(:string) { "Poems everybody!" }

describe "digest" do
it "returns the salt initilzed" do
it "returns the salt initialized" do
expect(subject.salt).to eq(secret)
end

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
<textarea spellcheck="false" rows="20">
&#60;%= decidim_modal id: "example" do %&#62;
<div data-dialog-container>
&#60;%= icon "icon_identificator" %&#62; // ... pick a desired icon
&#60;%= icon "icon_identifier" %&#62; // ... pick a desired icon
<h3 id="dialog-title-example" tabindex="-1" data-dialog-title>
Modal title
</h3>
Expand Down
4 changes: 2 additions & 2 deletions decidim-dev/lib/decidim/dev/component.rb
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
component.register_resource(:dummy_resource) do |resource|
resource.name = :dummy
resource.model_class_name = "Decidim::Dev::DummyResource"
resource.template = "decidim/dummy_resource/linked_dummys"
resource.template = "decidim/dummy_resource/linked_dummies"
resource.actions = %w(foo)
resource.searchable = true
end
Expand All @@ -53,7 +53,7 @@
component.register_resource(:coauthorable_dummy_resource) do |resource|
resource.name = :coauthorable_dummy
resource.model_class_name = "Decidim::Dev::CoauthorableDummyResource"
resource.template = "decidim/coauthorabledummy_resource/linked_dummys"
resource.template = "decidim/coauthorabledummy_resource/linked_dummies"
resource.actions = %w(foo-coauthorable)
resource.searchable = false
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,26 +34,26 @@ def status
end

def answers
sibilings.map { |answer| QuestionnaireAnswerPresenter.new(answer:) }
siblings.map { |answer| QuestionnaireAnswerPresenter.new(answer:) }
end

def first_short_answer
short = sibilings.where(decidim_forms_questions: { question_type: %w(short_answer) })
short = siblings.where(decidim_forms_questions: { question_type: %w(short_answer) })
short.first
end

def completion
with_body = sibilings.where(decidim_forms_questions: { question_type: %w(short_answer long_answer) })
.where.not(body: "").count
with_choices = sibilings.where.not("decidim_forms_questions.question_type in (?)", %w(short_answer long_answer))
.where("decidim_forms_answers.id IN (SELECT decidim_answer_id FROM decidim_forms_answer_choices)").count
with_body = siblings.where(decidim_forms_questions: { question_type: %w(short_answer long_answer) })
.where.not(body: "").count
with_choices = siblings.where.not("decidim_forms_questions.question_type in (?)", %w(short_answer long_answer))
.where("decidim_forms_answers.id IN (SELECT decidim_answer_id FROM decidim_forms_answer_choices)").count

(with_body + with_choices).to_f / questionnaire.questions.not_separator.not_title_and_description.count * 100
end

private

def sibilings
def siblings
Answer.not_separator
.not_title_and_description
.where(questionnaire:, session_token: participant.session_token)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ def tokenize(id)
end

context "when attachments are allowed" do
it "creates multiple atachments for the proposal" do
it "creates multiple attachments for the proposal" do
expect { command.call }.to change(Decidim::Attachment, :count).by(2)
last_attachment = Decidim::Attachment.last
expect(last_attachment.attached_to).to be_a(Decidim::Forms::Answer)
Expand All @@ -173,7 +173,7 @@ def tokenize(id)
]
end

it "does not create atachments for the proposal" do
it "does not create attachments for the proposal" do
expect { command.call }.not_to change(Decidim::Attachment, :count)
end

Expand All @@ -196,19 +196,19 @@ def tokenize(id)
end

context "when display_conditions are not mandatory on the same question but are fulfilled" do
let(:questionnaire_conditionned) { create(:questionnaire, questionnaire_for: participatory_process) }
let(:questionnaire_conditioned) { create(:questionnaire, questionnaire_for: participatory_process) }
let!(:option1) { create(:answer_option, question: condition_question) }
let!(:option2) { create(:answer_option, question: condition_question) }
let!(:option3) { create(:answer_option, question: condition_question) }
let!(:condition_question) do
create(
:questionnaire_question,
questionnaire: questionnaire_conditionned,
questionnaire: questionnaire_conditioned,
mandatory: false,
question_type: "single_option"
)
end
let!(:question) { create(:questionnaire_question, questionnaire: questionnaire_conditionned, question_type: "short_answer") }
let!(:question) { create(:questionnaire_question, questionnaire: questionnaire_conditioned, question_type: "short_answer") }
let!(:display_condition) { create(:display_condition, question:, condition_question:, condition_type: :equal, answer_option: option1, mandatory: false) }
let!(:display_condition2) { create(:display_condition, question:, condition_question:, condition_type: :equal, answer_option: option3, mandatory: false) }
let(:form_params) do
Expand All @@ -228,7 +228,7 @@ def tokenize(id)
"tos_agreement" => "1"
}
end
let(:command) { described_class.new(form, current_user, questionnaire_conditionned) }
let(:command) { described_class.new(form, current_user, questionnaire_conditioned) }

it "broadcasts ok" do
expect { command.call }.to broadcast(:ok)
Expand All @@ -238,7 +238,7 @@ def tokenize(id)
expect do
command.call
end.to change(Answer, :count).by(2)
expect(Answer.all.map(&:questionnaire)).to eq([questionnaire_conditionned, questionnaire_conditionned])
expect(Answer.all.map(&:questionnaire)).to eq([questionnaire_conditioned, questionnaire_conditioned])
end

it "creates answers with the correct information" do
Expand Down
2 changes: 1 addition & 1 deletion decidim-initiatives/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ In order to populate the database with example data proceed as usual in rails:
bundle exec rails db:seed
```

## Aditional considerations
## Additional considerations

### Cookies

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ def user_authorized_scope
# valid authorization.
#
# If the initiative is set with a global scope (meaning the scope is nil),
# all the scopes in the organizaton are valid.
# all the scopes in the organization are valid.
#
# Returns an array of Decidim::Scopes.
def authorized_scope_candidates
Expand Down
2 changes: 1 addition & 1 deletion decidim-initiatives/lib/decidim/api/initiative_api_type.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class InitiativeApiType < Decidim::Api::Types::BaseObject
field :minimum_committee_members, GraphQL::Types::Int, "Minimum of committee members", null: true
field :validate_sms_code_on_votes, GraphQL::Types::Boolean, "Add SMS code validation step to signature process", null: true
field :undo_online_signatures_enabled, GraphQL::Types::Boolean, "Enable participants to undo their online signatures", null: true
field :promoting_comittee_enabled, GraphQL::Types::Boolean, "If promoting committee is enabled", method: :promoting_committee_enabled, null: true
field :promoting_committee_enabled, GraphQL::Types::Boolean, "If promoting committee is enabled", method: :promoting_committee_enabled, null: true
field :signature_type, GraphQL::Types::String, "Signature type of the initiative", null: true

field :initiatives, [Decidim::Initiatives::InitiativeType, { null: true }], "The initiatives that have this type", null: false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ module Initiatives
]
end

it "creates multiple atachments for the initiative" do
it "creates multiple attachments for the initiative" do
expect { command.call }.to change(Decidim::Attachment, :count).by(2)
initiative.reload
last_attachment = Decidim::Attachment.last
Expand Down Expand Up @@ -169,7 +169,7 @@ module Initiatives
]
end

it "does not create atachments for the initiative" do
it "does not create attachments for the initiative" do
expect { command.call }.not_to change(Decidim::Attachment, :count)
end

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ module Initiatives
members = []
committee_members_count.times do
members << double(
"committe_member",
"committee_member",
user: create(:user, organization:)
)
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ module Initiatives
members = []
2.times do
members << double(
"committe_member",
"committee_member",
user: create(:user, organization:)
)
end
Expand All @@ -78,7 +78,7 @@ module Initiatives
members = []
2.times do
members << double(
"committe_member",
"committee_member",
user: create(:user, organization:)
)
end
Expand All @@ -100,7 +100,7 @@ module Initiatives
members = []
2.times do
members << double(
"committe_member",
"committee_member",
user: create(:user, organization:)
)
end
Expand All @@ -125,7 +125,7 @@ module Initiatives
members = []
2.times do
members << double(
"committe_member",
"committee_member",
user: create(:user, organization:)
)
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
}
end

it "creates an atachment for the proposal" do
it "creates an attachment for the proposal" do
expect { command.call }.to change(Decidim::Attachment, :count).by(1)
last_initiative = Decidim::Initiative.last
last_attachment = Decidim::Attachment.last
Expand Down
8 changes: 4 additions & 4 deletions decidim-initiatives/spec/types/initiative_api_type_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -98,11 +98,11 @@ module Initiatives
end
end

describe "promotingComitteeEnabled" do
let(:query) { "{ promotingComitteeEnabled }" }
describe "promotingCommitteeEnabled" do
let(:query) { "{ promotingCommitteeEnabled }" }

it "returns the promoting comittee enabled field" do
expect(response["promotingComitteeEnabled"]).to eq(model.promoting_committee_enabled)
it "returns the promoting committee enabled field" do
expect(response["promotingCommitteeEnabled"]).to eq(model.promoting_committee_enabled)
end
end

Expand Down
6 changes: 3 additions & 3 deletions decidim-initiatives/spec/types/integration_schema_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
"id" => initiative.type.id.to_s,
"initiatives" => initiative.type.initiatives.map { |i| { "id" => i.id.to_s } },
"minimumCommitteeMembers" => initiative.type.minimum_committee_members,
"promotingComitteeEnabled" => initiative.type.promoting_committee_enabled,
"promotingCommitteeEnabled" => initiative.type.promoting_committee_enabled,
"signatureType" => initiative.type.signature_type,
"title" => { "translation" => initiative.type.title[locale] },
"undoOnlineSignaturesEnabled" => initiative.type.undo_online_signatures_enabled,
Expand Down Expand Up @@ -98,7 +98,7 @@
id
initiatives{id}
minimumCommitteeMembers
promotingComitteeEnabled
promotingCommitteeEnabled
signatureType
title {
translation(locale: "#{locale}")
Expand Down Expand Up @@ -198,7 +198,7 @@
id
initiatives{id}
minimumCommitteeMembers
promotingComitteeEnabled
promotingCommitteeEnabled
signatureType
title {
translation(locale: "en")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class ApplicationController < Decidim::Components::BaseController

private

def add_addtional_csp_directives
def add_additional_csp_directives
return unless respond_to?(:meeting) || meeting.present?

embedded = MeetingIframeEmbedder.new(meeting.online_meeting_url).embed_transformed_url(request.host)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class LiveEventsController < Decidim::Meetings::ApplicationController
include Decidim::Meetings::PollsResources

helper_method :live_meeting_embed_code
before_action :add_addtional_csp_directives, only: :show
before_action :add_additional_csp_directives, only: :show

def show
raise ActionController::RoutingError, "Not Found" unless meeting
Expand Down
Loading

0 comments on commit 6103823

Please sign in to comment.