From 28b2acf8d772a9c43c3cd739c6194be7fc5cea15 Mon Sep 17 00:00:00 2001 From: Alexandru Emil Lupu Date: Fri, 23 Feb 2024 10:33:59 +0200 Subject: [PATCH 01/88] Backport 'Refactor of events specs' to v0.27 (#12507) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Refactor of events specs * Refactor of event_spec in amendment_promoted_event_examples.rb * refactor of event_spec in created_event_examples. Adding of attributes to each modified file * misspelling of arguement test * partial completion of managed_user_error_event_spec * reverting to old version * fix to cli tests * fix to mixed up branch * fixing mix up of commits * refactor of the managed error user error event spec * refactor of create_sortition_event_spec * refactor collaborative_draft_wtihdrawn_spec * refactor of create_meeting_event_spec * refactor of collaborative_draft_access_requested_event_spec * refactor of publish_proposal_event_spec * refactor of voting enabled event spec * refactor of endorsing enbabled event spec * refactor accepted proposal event spec * refactor of evaluatingh proposal event spec * auto-correcting errors * refactor of accepted_proposal_event_spec * refactor for endorising enbabled event * fix for voting_enabled_event_spec.rb * Refactor made to publish proposal event spec * Refactor correction of collaborative draft proposal * refactor correction of create meeting event spec * refactor and corrction of collaborative draft withdrawn * refactor correction of sortitions event spec * refactor of corrections in managed user error event spec * correctable syntax spacing in test * refactor of participory process step changed event spec * Refactor of events for creation_enbabled_event_spec * Deletion of commented out code * Refactor of the collaborative_draft_access_rejected_event_spec * Refactor of collaborative_draft_access_accepted_event_spec * removal of commented out sections * Refactor of participatory_process_step_activated_event_spec * Refactor of participatory_process_role_assigned_event_spec * Refactor of rejected_proposal_event_spec.rb * Refactor of update_proposal_category_event_spec.rb * Refactor for update_proposal_scope_event_spec * Refactor for approve_membership_request_event_spec * Refactor of revoke_membership_request_event_spec * Refactor of support_threshold_reached_event_spec * Refactor of spawn_committee_request_event_spec * Refactor endorse_initiative_event_spec * Refactor of proposal_note_created_event_spec * Removal of :resource object as its used twice in proposal_note_created_event * Refactor of endorse_initiative_event_spec (minor change to test) * Update decidim-initiatives/spec/cells/decidim/initiatives/content_blocks/highlighted_initiatives_cell_spec.rb Co-authored-by: Andrés Pereira de Lucena --------- Co-authored-by: Andrés Pereira de Lucena * Add missing examples * Fix failing specs * Fix more specs * Fix spec on decidim-initiatives --------- Co-authored-by: Tom <101816158+greenwoodt@users.noreply.github.com> Co-authored-by: Andrés Pereira de Lucena --- .../amendment_created_event_examples.rb | 32 ++------- .../amendment_promoted_event_examples.rb | 34 +++------- .../core/test/shared_examples/simple_event.rb | 37 ++++++++++ .../support_threshold_reached_event_spec.rb | 34 ++-------- .../approve_membership_request_event_spec.rb | 31 ++------- .../endorse_initiative_event_spec.rb | 40 ++++------- .../revoke_membership_request_event_spec.rb | 33 ++------- .../spawn_committee_request_event_spec.rb | 31 ++------- .../spec/system/filter_initiatives_spec.rb | 1 + .../meetings/create_meeting_event_spec.rb | 32 ++------- ...patory_process_role_assigned_event_spec.rb | 32 ++------- ...atory_process_step_activated_event_spec.rb | 34 ++-------- ...ipatory_process_step_changed_event_spec.rb | 34 ++-------- .../proposals/accepted_proposal_event_spec.rb | 35 ++-------- .../admin/proposal_note_created_event_spec.rb | 52 +++----------- .../update_proposal_category_event_spec.rb | 33 ++------- .../admin/update_proposal_scope_event_spec.rb | 33 ++------- ...rative_draft_access_accepted_event_spec.rb | 67 ++++--------------- ...rative_draft_access_rejected_event_spec.rb | 67 ++++--------------- ...ative_draft_access_requested_event_spec.rb | 34 ++-------- ...ollaborative_draft_withdrawn_event_spec.rb | 34 ++-------- .../proposals/creation_enabled_event_spec.rb | 33 ++------- .../proposals/endorsing_enabled_event_spec.rb | 33 ++------- .../evaluating_proposal_event_spec.rb | 33 ++------- .../proposals/publish_proposal_event_spec.rb | 32 ++------- .../proposals/rejected_proposal_event_spec.rb | 40 ++--------- .../proposals/voting_enabled_event_spec.rb | 33 ++------- .../sortitions/create_sortition_event_spec.rb | 34 ++-------- .../managed_user_error_event_spec.rb | 49 +++----------- 29 files changed, 237 insertions(+), 810 deletions(-) diff --git a/decidim-core/lib/decidim/core/test/shared_examples/amendable/amendment_created_event_examples.rb b/decidim-core/lib/decidim/core/test/shared_examples/amendable/amendment_created_event_examples.rb index 90200d01f105a..e3d2a659a90d7 100644 --- a/decidim-core/lib/decidim/core/test/shared_examples/amendable/amendment_created_event_examples.rb +++ b/decidim-core/lib/decidim/core/test/shared_examples/amendable/amendment_created_event_examples.rb @@ -12,36 +12,16 @@ end it_behaves_like "a simple event" + it_behaves_like "a simple event email" + it_behaves_like "a simple event notification" let(:emendation_author_nickname) { "@#{emendation.creator_author.nickname}" } let(:emendation_path) { Decidim::ResourceLocatorPresenter.new(emendation).path } let(:emendation_author_path) { Decidim::UserPresenter.new(emendation.creator_author).profile_path } let(:amendable_path) { Decidim::ResourceLocatorPresenter.new(amendable).path } - describe "email_subject" do - it "is generated correctly" do - expect(subject.email_subject).to eq("New amendment for #{amendable_title}") - end - end - - describe "email_intro" do - it "is generated correctly" do - expect(subject.email_intro) - .to eq("A new amendment has been created for #{amendable_title}. You can see it from this page:") - end - end - - describe "email_outro" do - it "is generated correctly" do - expect(subject.email_outro) - .to eq("You have received this notification because you are following #{amendable_title}. You can stop receiving notifications following the previous link.") - end - end - - describe "notification_title" do - it "is generated correctly" do - expect(subject.notification_title) - .to eq("A new amendment has been created for #{amendable_title}.") - end - end + let(:email_subject) { "New amendment for #{amendable_title}" } + let(:email_intro) { "A new amendment has been created for #{amendable_title}. You can see it from this page:" } + let(:email_outro) { "You have received this notification because you are following #{amendable_title}. You can stop receiving notifications following the previous link." } + let(:notification_title) { "A new amendment has been created for #{amendable_title}." } end diff --git a/decidim-core/lib/decidim/core/test/shared_examples/amendable/amendment_promoted_event_examples.rb b/decidim-core/lib/decidim/core/test/shared_examples/amendable/amendment_promoted_event_examples.rb index f5ceeee3879cd..15500d8badc28 100644 --- a/decidim-core/lib/decidim/core/test/shared_examples/amendable/amendment_promoted_event_examples.rb +++ b/decidim-core/lib/decidim/core/test/shared_examples/amendable/amendment_promoted_event_examples.rb @@ -7,36 +7,18 @@ let(:event_name) { "decidim.events.amendments.amendment_promoted" } it_behaves_like "a simple event" + it_behaves_like "a simple event email" + it_behaves_like "a simple event notification" let(:emendation_author_nickname) { "@#{emendation.creator_author.nickname}" } let(:emendation_path) { Decidim::ResourceLocatorPresenter.new(emendation).path } let(:emendation_author_path) { Decidim::UserPresenter.new(emendation.creator_author).profile_path } let(:amendable_path) { Decidim::ResourceLocatorPresenter.new(amendable).path } - describe "email_subject" do - it "is generated correctly" do - expect(subject.email_subject).to eq("An amendment from #{emendation_author_nickname} has been published as a new proposal") - end - end - - describe "email_intro" do - it "is generated correctly" do - expect(subject.email_intro) - .to eq("A rejected amendment for #{amendable_title} has been published as a new #{amendable_type}. You can see it from this page:") - end - end - - describe "email_outro" do - it "is generated correctly" do - expect(subject.email_outro) - .to eq("You have received this notification because you are following #{amendable_title}. You can stop receiving notifications following the previous link.") - end - end - - describe "notification_title" do - it "is generated correctly" do - expect(subject.notification_title) - .to eq("A rejected amendment for #{amendable_title} has been published as a new #{amendable_type} by #{emendation_author_nickname}.") # rubocop:disable Layout/LineLength - end - end + let(:email_subject) { "An amendment from #{emendation_author_nickname} has been published as a new proposal" } + let(:email_intro) { "A rejected amendment for #{amendable_title} has been published as a new #{amendable_type}. You can see it from this page:" } + let(:email_outro) { "You have received this notification because you are following #{amendable_title}. You can stop receiving notifications following the previous link." } + # rubocop:disable Layout/LineLength + let(:notification_title) { "A rejected amendment for #{amendable_title} has been published as a new #{amendable_type} by #{emendation_author_nickname}." } + # rubocop:enable Layout/LineLength end diff --git a/decidim-core/lib/decidim/core/test/shared_examples/simple_event.rb b/decidim-core/lib/decidim/core/test/shared_examples/simple_event.rb index 071bddb79224e..227c644fb2c55 100644 --- a/decidim-core/lib/decidim/core/test/shared_examples/simple_event.rb +++ b/decidim-core/lib/decidim/core/test/shared_examples/simple_event.rb @@ -152,3 +152,40 @@ end end end + +shared_examples_for "a simple event email" do + describe "email_subject" do + it "is generated correctly" do + expect(subject.email_subject).to eq(email_subject) + end + + it "is html safe" do + expect(subject.email_subject).not_to include("script") + end + end + + describe "email_intro" do + it "is generated correctly" do + expect(subject.email_intro).to eq(email_intro) + end + end + + describe "email_outro" do + it "is generated correctly" do + expect(subject.email_outro).to eq(email_outro) + end + end +end + +shared_examples_for "a simple event notification" do + describe "notification_title" do + it "is generated correctly" do + expect(subject.notification_title) + .to eq(notification_title) + end + + it "is html safe" do + expect(subject.notification_title).not_to include("script") + end + end +end diff --git a/decidim-initiatives/spec/events/decidim/initiatives/admin/support_threshold_reached_event_spec.rb b/decidim-initiatives/spec/events/decidim/initiatives/admin/support_threshold_reached_event_spec.rb index c3bf5c6611beb..43e31f7df97e7 100644 --- a/decidim-initiatives/spec/events/decidim/initiatives/admin/support_threshold_reached_event_spec.rb +++ b/decidim-initiatives/spec/events/decidim/initiatives/admin/support_threshold_reached_event_spec.rb @@ -10,8 +10,15 @@ let(:initiative) { create :initiative } let(:participatory_space) { initiative } + let(:initiative_title) { decidim_html_escape(translated(initiative.title)) } + let(:email_subject) { "Signatures threshold reached" } + let(:email_intro) { "The initiative #{initiative_title} has reached the signatures threshold" } + let(:email_outro) { "You have received this notification because you are an admin of the platform." } + let(:notification_title) { "The #{initiative_title} initiative has reached the signatures threshold" } it_behaves_like "a simple event" + it_behaves_like "a simple event email" + it_behaves_like "a simple event notification" describe "types" do subject { described_class } @@ -24,31 +31,4 @@ expect(subject.types).to include :email end end - - describe "email_subject" do - it "is generated correctly" do - expect(subject.email_subject).to eq("Signatures threshold reached") - end - end - - describe "email_intro" do - it "is generated correctly" do - expect(subject.email_intro) - .to eq("The initiative #{resource_title} has reached the signatures threshold") - end - end - - describe "email_outro" do - it "is generated correctly" do - expect(subject.email_outro) - .to eq("You have received this notification because you are an admin of the platform.") - end - end - - describe "notification_title" do - it "is generated correctly" do - expect(subject.notification_title) - .to include("The #{resource_title} initiative has reached the signatures threshold") - end - end end diff --git a/decidim-initiatives/spec/events/decidim/initiatives/approve_membership_request_event_spec.rb b/decidim-initiatives/spec/events/decidim/initiatives/approve_membership_request_event_spec.rb index 17fef95de8279..3ecdda1770912 100644 --- a/decidim-initiatives/spec/events/decidim/initiatives/approve_membership_request_event_spec.rb +++ b/decidim-initiatives/spec/events/decidim/initiatives/approve_membership_request_event_spec.rb @@ -22,6 +22,10 @@ let(:membership_request) { create(:initiatives_committee_member, initiative: initiative, state: "requested") } let(:resource_url) { resource_locator(initiative).url } let(:resource_title) { translated(initiative.title) } + let(:email_subject) { "#{author_nickname} accepted your application to the promoter committee" } + let(:email_intro) { "#{author_nickname} accepted your application to be part of the promoter committee for the initiative #{resource_title}." } + let(:email_outro) { "You received this notification because you applied to this initiative: #{resource_title}" } + let(:notification_title) { "#{author_nickname} accepted your application to be part of the promoter committee for the following initiative #{resource_title}." } describe "types" do subject { described_class } @@ -35,29 +39,6 @@ end end - describe "email_subject" do - it "is generated correctly" do - expect(subject.email_subject).to eq("#{author_nickname} accepted your application to the promoter committee") - end - end - - describe "email_intro" do - it "is generated correctly" do - expect(subject.email_intro).to eq("#{author_nickname} accepted your application to be part of the promoter committee for the initiative #{resource_title}.") - end - end - - describe "email_outro" do - it "is generated correctly" do - expect(subject.email_outro) - .to eq("You received this notification because you applied to this initiative: #{resource_title}") - end - end - - describe "notification_title" do - it "is generated correctly" do - expect(subject.notification_title) - .to eq("#{author_nickname} accepted your application to be part of the promoter committee for the following initiative #{resource_title}.") - end - end + it_behaves_like "a simple event email" + it_behaves_like "a simple event notification" end diff --git a/decidim-initiatives/spec/events/decidim/initiatives/endorse_initiative_event_spec.rb b/decidim-initiatives/spec/events/decidim/initiatives/endorse_initiative_event_spec.rb index 17d5a61391d0e..2026ad0f4b6a2 100644 --- a/decidim-initiatives/spec/events/decidim/initiatives/endorse_initiative_event_spec.rb +++ b/decidim-initiatives/spec/events/decidim/initiatives/endorse_initiative_event_spec.rb @@ -3,6 +3,8 @@ require "spec_helper" describe Decidim::Initiatives::EndorseInitiativeEvent do + include Decidim::SanitizeHelper + subject do described_class.new(resource: initiative, event_name: event_name, user: user, extra: {}) end @@ -13,6 +15,14 @@ let(:event_name) { "decidim.events.initiatives.initiative_endorsed" } let(:user) { create :user, organization: organization } let(:resource_path) { resource_locator(initiative).path } + let(:email_subject) { "Initiative endorsed by @#{initiative_author.nickname}" } + let(:email_intro) { "#{initiative_author.name} @#{initiative_author.nickname}, who you are following, has endorsed the following initiative, maybe you want to contribute to the conversation:" } + let(:email_outro) { "You have received this notification because you are following @#{initiative_author.nickname}. You can stop receiving notifications following the previous link." } + let(:intiative_title) { decidim_html_escape(translated(initiative.title)) } + let(:notification_title) { <<-EOTITLE.squish } + The #{intiative_title} initiative was endorsed by + #{initiative_author.name} @#{initiative_author.nickname}. + EOTITLE describe "types" do subject { described_class } @@ -26,32 +36,6 @@ end end - describe "email_subject" do - it "is generated correctly" do - expect(subject.email_subject).to eq("Initiative endorsed by @#{initiative_author.nickname}") - end - end - - describe "email_intro" do - it "is generated correctly" do - expect(subject.email_intro).to eq("#{initiative_author.name} @#{initiative_author.nickname}, who you are following, has endorsed the following initiative, maybe you want to contribute to the conversation:") - end - end - - describe "email_outro" do - it "is generated correctly" do - expect(subject.email_outro) - .to eq("You have received this notification because you are following @#{initiative_author.nickname}. You can stop receiving notifications following the previous link.") - end - end - - describe "notification_title" do - it "is generated correctly" do - expect(subject.notification_title) - .to include("The #{initiative.title["en"]} initiative was endorsed by ") - - expect(subject.notification_title) - .to include("#{initiative_author.name} @#{initiative_author.nickname}.") - end - end + it_behaves_like "a simple event email" + it_behaves_like "a simple event notification" end diff --git a/decidim-initiatives/spec/events/decidim/initiatives/revoke_membership_request_event_spec.rb b/decidim-initiatives/spec/events/decidim/initiatives/revoke_membership_request_event_spec.rb index 636fcf50e84be..f4903566abb1c 100644 --- a/decidim-initiatives/spec/events/decidim/initiatives/revoke_membership_request_event_spec.rb +++ b/decidim-initiatives/spec/events/decidim/initiatives/revoke_membership_request_event_spec.rb @@ -22,6 +22,13 @@ let(:membership_request) { create(:initiatives_committee_member, initiative: initiative, state: "requested") } let(:resource_url) { resource_locator(initiative).url } let(:resource_title) { translated(initiative.title) } + let(:email_subject) { "#{author_nickname} rejected your application to the promoter committee" } + let(:email_intro) { "#{author_nickname} rejected your application to be part of the promoter committee for the following initiative #{resource_title}." } + let(:email_outro) { "You received this notification because you applied to this initiative: #{resource_title}." } + let(:notification_title) { "#{author_nickname} rejected your application to be part of the promoter committee for the following initiative #{resource_title}." } + + it_behaves_like "a simple event email" + it_behaves_like "a simple event notification" describe "types" do subject { described_class } @@ -34,30 +41,4 @@ expect(subject.types).to include :email end end - - describe "email_subject" do - it "is generated correctly" do - expect(subject.email_subject).to eq("#{author_nickname} rejected your application to the promoter committee") - end - end - - describe "email_intro" do - it "is generated correctly" do - expect(subject.email_intro).to eq("#{author_nickname} rejected your application to be part of the promoter committee for the following initiative #{resource_title}.") - end - end - - describe "email_outro" do - it "is generated correctly" do - expect(subject.email_outro) - .to eq("You received this notification because you applied to this initiative: #{resource_title}.") - end - end - - describe "notification_title" do - it "is generated correctly" do - expect(subject.notification_title) - .to eq("#{author_nickname} rejected your application to be part of the promoter committee for the following initiative #{resource_title}.") - end - end end diff --git a/decidim-initiatives/spec/events/decidim/initiatives/spawn_committee_request_event_spec.rb b/decidim-initiatives/spec/events/decidim/initiatives/spawn_committee_request_event_spec.rb index 80d18d8617ec7..6a104a6f3291b 100644 --- a/decidim-initiatives/spec/events/decidim/initiatives/spawn_committee_request_event_spec.rb +++ b/decidim-initiatives/spec/events/decidim/initiatives/spawn_committee_request_event_spec.rb @@ -21,6 +21,10 @@ let(:applicant_nickname) { Decidim::UserPresenter.new(applicant).nickname } let(:resource_url) { resource_locator(initiative).url } let(:resource_title) { translated(initiative.title) } + let(:email_subject) { "#{applicant_nickname} wants to join your initiative" } + let(:email_intro) { "#{applicant_nickname} applied for the promoter committee of your initiative #{resource_title}. To accept or reject the application, go to the edit form of your initiative." } + let(:email_outro) { "You received this notification because you are the author of this initiative: #{resource_title}" } + let(:notification_title) { "#{applicant_nickname} applied for the promoter committee of your initiative #{resource_title}. To accept or reject click here." } describe "types" do subject { described_class } @@ -34,29 +38,6 @@ end end - describe "email_subject" do - it "is generated correctly" do - expect(subject.email_subject).to eq("#{applicant_nickname} wants to join your initiative") - end - end - - describe "email_intro" do - it "is generated correctly" do - expect(subject.email_intro).to eq("#{applicant_nickname} applied for the promoter committee of your initiative #{resource_title}. To accept or reject the application, go to the edit form of your initiative.") - end - end - - describe "email_outro" do - it "is generated correctly" do - expect(subject.email_outro) - .to eq("You received this notification because you are the author of this initiative: #{resource_title}") - end - end - - describe "notification_title" do - it "is generated correctly" do - expect(subject.notification_title) - .to eq("#{applicant_nickname} applied for the promoter committee of your initiative #{resource_title}. To accept or reject click here.") - end - end + it_behaves_like "a simple event email" + it_behaves_like "a simple event notification" end diff --git a/decidim-initiatives/spec/system/filter_initiatives_spec.rb b/decidim-initiatives/spec/system/filter_initiatives_spec.rb index f20e813b7a5bc..5d9952aa64221 100644 --- a/decidim-initiatives/spec/system/filter_initiatives_spec.rb +++ b/decidim-initiatives/spec/system/filter_initiatives_spec.rb @@ -80,6 +80,7 @@ within ".order-by__dropdown" do expect(page).to have_selector("ul[data-dropdown-menu$=dropdown-menu]", text: "Random") + sleep(2) page.find("a", text: "Random").click click_link "Most commented" end diff --git a/decidim-meetings/spec/events/decidim/meetings/create_meeting_event_spec.rb b/decidim-meetings/spec/events/decidim/meetings/create_meeting_event_spec.rb index 453babf21b1f0..b41369b2032ba 100644 --- a/decidim-meetings/spec/events/decidim/meetings/create_meeting_event_spec.rb +++ b/decidim-meetings/spec/events/decidim/meetings/create_meeting_event_spec.rb @@ -3,7 +3,11 @@ require "spec_helper" describe Decidim::Meetings::CreateMeetingEvent do - let(:resource) { create :meeting } + let(:resource) { create(:meeting) } + let(:notification_title) { "The meeting #{meeting_title} has been added to #{participatory_space_title}" } + let(:email_outro) { "You have received this notification because you are following \"#{participatory_space_title}\". You can unfollow it from the previous link." } + let(:email_intro) { "The meeting \"#{meeting_title}\" has been added to \"#{participatory_space_title}\" that you are following." } + let(:email_subject) { "New meeting added to #{participatory_space_title}" } let(:event_name) { "decidim.events.meetings.meeting_created" } let(:available_slots) { 10 } let(:questionnaire) { nil } @@ -12,32 +16,6 @@ it_behaves_like "a simple event" it_behaves_like "a translated meeting event" - describe "email_subject" do - it "is generated correctly" do - expect(subject.email_subject).to eq("New meeting added to #{participatory_space_title}") - end - end - - describe "email_intro" do - it "is generated correctly" do - expect(subject.email_intro).to eq("The meeting \"#{resource_title}\" has been added to \"#{participatory_space_title}\" that you are following.") - end - end - - describe "email_outro" do - it "is generated correctly" do - expect(subject.email_outro) - .to include("You have received this notification because you are following \"#{participatory_space_title}\"") - end - end - - describe "notification_title" do - it "is generated correctly" do - expect(subject.notification_title) - .to eq("The meeting #{resource_title} has been added to #{participatory_space_title}") - end - end - describe "resource_text" do it "returns the meeting description" do expect(subject.resource_text).to eq translated(resource.description) diff --git a/decidim-participatory_processes/spec/events/decidim/participatory_process_role_assigned_event_spec.rb b/decidim-participatory_processes/spec/events/decidim/participatory_process_role_assigned_event_spec.rb index 1c934b5c104a3..2bdfff0016e7c 100644 --- a/decidim-participatory_processes/spec/events/decidim/participatory_process_role_assigned_event_spec.rb +++ b/decidim-participatory_processes/spec/events/decidim/participatory_process_role_assigned_event_spec.rb @@ -9,32 +9,12 @@ let(:event_name) { "decidim.events.participatory_process.role_assigned" } let(:role) { create :participatory_process_user_role, user: user, participatory_process: resource, role: :admin } let(:extra) { { role: role } } + let(:email_subject) { "You have been assigned as #{role} for \"#{resource.title["en"]}\"." } + let(:email_outro) { "You have received this notification because you are #{role} of the \"#{resource.title["en"]}\" participatory process." } + let(:email_intro) { "You have been assigned as #{role} for participatory process \"#{resource.title["en"]}\"." } + let(:notification_title) { "You have been assigned as #{role} for participatory process #{resource.title["en"]}." } it_behaves_like "a simple event" - - describe "email_subject" do - it "is generated correctly" do - expect(subject.email_subject).to eq("You have been assigned as #{role} for \"#{resource.title["en"]}\".") - end - end - - describe "email_outro" do - it "is generated correctly" do - expect(subject.email_outro) - .to eq("You have received this notification because you are #{role} of the \"#{resource.title["en"]}\" participatory process.") - end - end - - describe "email_intro" do - it "is generated correctly" do - expect(subject.email_intro) - .to eq("You have been assigned as #{role} for participatory process \"#{resource.title["en"]}\".") - end - end - - describe "notification_title" do - it "is generated correctly" do - expect(subject.notification_title).to include("You have been assigned as #{role} for participatory process #{resource.title["en"]}.") - end - end + it_behaves_like "a simple event email" + it_behaves_like "a simple event notification" end diff --git a/decidim-participatory_processes/spec/events/decidim/participatory_process_step_activated_event_spec.rb b/decidim-participatory_processes/spec/events/decidim/participatory_process_step_activated_event_spec.rb index 253501e666d62..0ea3d00ba0669 100644 --- a/decidim-participatory_processes/spec/events/decidim/participatory_process_step_activated_event_spec.rb +++ b/decidim-participatory_processes/spec/events/decidim/participatory_process_step_activated_event_spec.rb @@ -23,32 +23,12 @@ ) end - it_behaves_like "a simple event" - - describe "email_subject" do - it "is generated correctly" do - expect(subject.email_subject).to eq("An update to #{participatory_space_title}") - end - end - - describe "email_intro" do - it "is generated correctly" do - expect(subject.email_intro) - .to eq("The #{resource_title} phase is now active for #{participatory_space_title}. You can see it from this page:") - end - end + let(:email_subject) { "An update to #{participatory_space_title}" } + let(:email_intro) { "The #{resource_title} phase is now active for #{participatory_space_title}. You can see it from this page:" } + let(:email_outro) { "You have received this notification because you are following #{participatory_space_title}. You can stop receiving notifications following the previous link." } + let(:notification_title) { "The #{resource_title} phase is now active for #{participatory_space_title}" } - describe "email_outro" do - it "is generated correctly" do - expect(subject.email_outro) - .to include("You have received this notification because you are following #{participatory_space_title}") - end - end - - describe "notification_title" do - it "is generated correctly" do - expect(subject.notification_title) - .to eq("The #{resource_title} phase is now active for #{participatory_space_title}") - end - end + it_behaves_like "a simple event" + it_behaves_like "a simple event email" + it_behaves_like "a simple event notification" end diff --git a/decidim-participatory_processes/spec/events/decidim/participatory_process_step_changed_event_spec.rb b/decidim-participatory_processes/spec/events/decidim/participatory_process_step_changed_event_spec.rb index 9612db3feb28d..849a7f8b63ba6 100644 --- a/decidim-participatory_processes/spec/events/decidim/participatory_process_step_changed_event_spec.rb +++ b/decidim-participatory_processes/spec/events/decidim/participatory_process_step_changed_event_spec.rb @@ -23,32 +23,12 @@ ) end - it_behaves_like "a simple event" - - describe "email_subject" do - it "is generated correctly" do - expect(subject.email_subject).to eq("An update to #{participatory_space_title}") - end - end - - describe "email_intro" do - it "is generated correctly" do - expect(subject.email_intro) - .to eq("The dates for the #{resource_title} phase at #{participatory_space_title} have been updated. You can see it from this page:") - end - end + let(:email_subject) { "An update to #{participatory_space_title}" } + let(:email_intro) { "The dates for the #{resource_title} phase at #{participatory_space_title} have been updated. You can see it from this page:" } + let(:email_outro) { "You have received this notification because you are following #{participatory_space_title}. You can stop receiving notifications following the previous link." } + let(:notification_title) { "The dates for the #{resource_title} phase at #{participatory_space_title} have been updated." } - describe "email_outro" do - it "is generated correctly" do - expect(subject.email_outro) - .to include("You have received this notification because you are following #{participatory_space_title}") - end - end - - describe "notification_title" do - it "is generated correctly" do - expect(subject.notification_title) - .to eq("The dates for the #{resource_title} phase at #{participatory_space_title} have been updated.") - end - end + it_behaves_like "a simple event" + it_behaves_like "a simple event email" + it_behaves_like "a simple event notification" end diff --git a/decidim-proposals/spec/events/decidim/proposals/accepted_proposal_event_spec.rb b/decidim-proposals/spec/events/decidim/proposals/accepted_proposal_event_spec.rb index 1cae513724c13..e7ed4e5a8aee5 100644 --- a/decidim-proposals/spec/events/decidim/proposals/accepted_proposal_event_spec.rb +++ b/decidim-proposals/spec/events/decidim/proposals/accepted_proposal_event_spec.rb @@ -3,39 +3,18 @@ require "spec_helper" describe Decidim::Proposals::AcceptedProposalEvent do - let(:resource) { create :proposal, :with_answer, title: "My super proposal" } + let(:resource) { create(:proposal, :with_answer, title: "My super proposal") } + let(:notification_title) { "The #{resource_title} proposal has been accepted." } + let(:email_outro) { "You have received this notification because you are following \"#{resource_title}\". You can unfollow it from the previous link." } + let(:email_intro) { "The proposal \"#{resource_title}\" has been accepted. You can read the answer in this page:" } + let(:email_subject) { "A proposal you're following has been accepted" } let(:resource_title) { translated(resource.title) } let(:event_name) { "decidim.events.proposals.proposal_accepted" } include_context "when a simple event" it_behaves_like "a simple event" - - describe "email_subject" do - it "is generated correctly" do - expect(subject.email_subject).to eq("A proposal you're following has been accepted") - end - end - - describe "email_intro" do - it "is generated correctly" do - expect(subject.email_intro) - .to eq("The proposal \"#{resource_title}\" has been accepted. You can read the answer in this page:") - end - end - - describe "email_outro" do - it "is generated correctly" do - expect(subject.email_outro) - .to eq("You have received this notification because you are following \"#{resource_title}\". You can unfollow it from the previous link.") - end - end - - describe "notification_title" do - it "is generated correctly" do - expect(subject.notification_title) - .to include("The #{resource_title} proposal has been accepted") - end - end + it_behaves_like "a simple event email" + it_behaves_like "a simple event notification" describe "resource_text" do it "shows the proposal answer" do diff --git a/decidim-proposals/spec/events/decidim/proposals/admin/proposal_note_created_event_spec.rb b/decidim-proposals/spec/events/decidim/proposals/admin/proposal_note_created_event_spec.rb index 8679c0a303ec1..1ac8a1c393b92 100644 --- a/decidim-proposals/spec/events/decidim/proposals/admin/proposal_note_created_event_spec.rb +++ b/decidim-proposals/spec/events/decidim/proposals/admin/proposal_note_created_event_spec.rb @@ -9,38 +9,15 @@ let(:component) { resource.component } let(:admin_proposal_info_path) { "/admin/participatory_processes/#{participatory_space.slug}/components/#{component.id}/manage/proposals/#{resource.id}" } let(:admin_proposal_info_url) { "http://#{organization.host}/admin/participatory_processes/#{participatory_space.slug}/components/#{component.id}/manage/proposals/#{resource.id}" } + let(:email_subject) { "Someone left a note on proposal #{resource_title}." } + let(:email_intro) { %(Someone has left a note on the proposal "#{resource_title}". Check it out at the admin panel) } + let(:email_outro) { "You have received this notification because you can valuate the proposal." } + let(:notification_title) { %(Someone has left a note on the proposal #{resource_title}. Check it out at the admin panel) } include_context "when a simple event" it_behaves_like "a simple event" - - describe "email_subject" do - let(:resource) { create :proposal, title: { en: "It's my proposal" } } - - it "is generated correctly" do - expect(subject.email_subject).to eq("Someone left a note on proposal #{resource_title}.") - end - end - - describe "email_intro" do - it "is generated correctly" do - expect(subject.email_intro) - .to eq(%(Someone has left a note on the proposal "#{resource_title}". Check it out at the admin panel)) - end - end - - describe "email_outro" do - it "is generated correctly" do - expect(subject.email_outro) - .to eq("You have received this notification because you can valuate the proposal.") - end - end - - describe "notification_title" do - it "is generated correctly" do - expect(subject.notification_title) - .to include(%(Someone has left a note on the proposal #{resource_title}. Check it out at the admin panel)) - end - end + it_behaves_like "a simple event email" + it_behaves_like "a simple event notification" context "when proposals component added to assemblies participatory space" do let(:assembly) { create(:assembly) } @@ -48,19 +25,10 @@ let(:resource) { create :proposal, component: proposal_component, title: ::Faker::Lorem.characters(number: 25) } let(:admin_proposal_info_path) { "/admin/assemblies/#{participatory_space.slug}/components/#{component.id}/manage/proposals/#{resource.id}" } let(:admin_proposal_info_url) { "http://#{organization.host}/admin/assemblies/#{participatory_space.slug}/components/#{component.id}/manage/proposals/#{resource.id}" } + let(:email_intro) { %(Someone has left a note on the proposal "#{resource_title}". Check it out at the admin panel) } + let(:notification_title) { %(Someone has left a note on the proposal #{resource_title}. Check it out at the admin panel) } - describe "email_intro" do - it "is generated correctly" do - expect(subject.email_intro) - .to eq(%(Someone has left a note on the proposal "#{resource_title}". Check it out at the admin panel)) - end - end - - describe "notification_title" do - it "is generated correctly" do - expect(subject.notification_title) - .to include(%(Someone has left a note on the proposal #{resource_title}. Check it out at the admin panel)) - end - end + it_behaves_like "a simple event email" + it_behaves_like "a simple event notification" end end diff --git a/decidim-proposals/spec/events/decidim/proposals/admin/update_proposal_category_event_spec.rb b/decidim-proposals/spec/events/decidim/proposals/admin/update_proposal_category_event_spec.rb index 1f0017ecd6f62..9a6d73ea84226 100644 --- a/decidim-proposals/spec/events/decidim/proposals/admin/update_proposal_category_event_spec.rb +++ b/decidim-proposals/spec/events/decidim/proposals/admin/update_proposal_category_event_spec.rb @@ -5,34 +5,13 @@ describe Decidim::Proposals::Admin::UpdateProposalCategoryEvent do let(:resource) { create :proposal, title: "It's my super proposal" } let(:event_name) { "decidim.events.proposals.proposal_update_category" } + let(:email_subject) { "The #{translated(resource.title)} proposal category has been updated" } + let(:email_intro) { "An admin has updated the category of your proposal \"#{decidim_html_escape(translated(resource.title))}\", check it out in this page:" } + let(:email_outro) { "You have received this notification because you are the author of the proposal." } + let(:notification_title) { "The #{decidim_html_escape(translated(resource.title))} proposal category has been updated by an admin." } include_context "when a simple event" it_behaves_like "a simple event" - - describe "email_subject" do - it "is generated correctly" do - expect(subject.email_subject).to eq("The #{translated(resource.title)} proposal category has been updated") - end - end - - describe "email_intro" do - it "is generated correctly" do - expect(subject.email_intro) - .to eq("An admin has updated the category of your proposal \"#{decidim_html_escape(translated(resource.title))}\", check it out in this page:") - end - end - - describe "email_outro" do - it "is generated correctly" do - expect(subject.email_outro) - .to eq("You have received this notification because you are the author of the proposal.") - end - end - - describe "notification_title" do - it "is generated correctly" do - expect(subject.notification_title) - .to include("The #{decidim_html_escape(translated(resource.title))} proposal category has been updated by an admin.") - end - end + it_behaves_like "a simple event email" + it_behaves_like "a simple event notification" end diff --git a/decidim-proposals/spec/events/decidim/proposals/admin/update_proposal_scope_event_spec.rb b/decidim-proposals/spec/events/decidim/proposals/admin/update_proposal_scope_event_spec.rb index 4d2647e7a8b6e..82b6750c7a793 100644 --- a/decidim-proposals/spec/events/decidim/proposals/admin/update_proposal_scope_event_spec.rb +++ b/decidim-proposals/spec/events/decidim/proposals/admin/update_proposal_scope_event_spec.rb @@ -6,34 +6,13 @@ let(:resource) { create :proposal, title: "It's my super proposal" } let(:resource_title) { translated(resource.title) } let(:event_name) { "decidim.events.proposals.proposal_update_scope" } + let(:email_subject) { "The #{decidim_sanitize(resource_title)} proposal scope has been updated" } + let(:email_intro) { "An admin has updated the scope of your proposal \"#{decidim_html_escape(resource_title)}\", check it out in this page:" } + let(:email_outro) { "You have received this notification because you are the author of the proposal." } + let(:notification_title) { "The #{decidim_html_escape(resource_title)} proposal scope has been updated by an admin." } include_context "when a simple event" it_behaves_like "a simple event" - - describe "email_subject" do - it "is generated correctly" do - expect(subject.email_subject).to eq("The #{decidim_sanitize(resource_title)} proposal scope has been updated") - end - end - - describe "email_intro" do - it "is generated correctly" do - expect(subject.email_intro) - .to eq("An admin has updated the scope of your proposal \"#{decidim_html_escape(resource_title)}\", check it out in this page:") - end - end - - describe "email_outro" do - it "is generated correctly" do - expect(subject.email_outro) - .to eq("You have received this notification because you are the author of the proposal.") - end - end - - describe "notification_title" do - it "is generated correctly" do - expect(subject.notification_title) - .to include("The #{decidim_html_escape(resource_title)} proposal scope has been updated by an admin.") - end - end + it_behaves_like "a simple event email" + it_behaves_like "a simple event notification" end diff --git a/decidim-proposals/spec/events/decidim/proposals/collaborative_draft_access_accepted_event_spec.rb b/decidim-proposals/spec/events/decidim/proposals/collaborative_draft_access_accepted_event_spec.rb index ce237915a3fa6..1cc2e492aa27a 100644 --- a/decidim-proposals/spec/events/decidim/proposals/collaborative_draft_access_accepted_event_spec.rb +++ b/decidim-proposals/spec/events/decidim/proposals/collaborative_draft_access_accepted_event_spec.rb @@ -24,66 +24,25 @@ let(:extra) { { requester_id: requester_id } } context "when the notification is for coauthor users" do - it_behaves_like "a simple event" - - describe "email_subject" do - it "is generated correctly" do - expect(subject.email_subject).to eq("#{requester_name} has been accepted to access as a contributor of the #{resource_title}.") - end - end - - describe "email_intro" do - it "is generated correctly" do - expect(subject.email_intro) - .to eq(%(#{requester_name} has been accepted to access as a contributor of the #{decidim_html_escape(resource_title)} collaborative draft.)) - end - end + let(:email_subject) { "#{requester_name} has been accepted to access as a contributor of the #{resource_title}." } + let(:email_intro) { %(#{requester_name} has been accepted to access as a contributor of the #{decidim_html_escape(resource_title)} collaborative draft.) } + let(:email_outro) { %(You have received this notification because you are a collaborator of #{decidim_html_escape(resource_title)}.) } + let(:notification_title) { %(#{requester_name} #{requester_nickname} has been accepted to access as a contributor of the #{decidim_html_escape(resource_title)} collaborative draft.) } - describe "email_outro" do - it "is generated correctly" do - expect(subject.email_outro) - .to eq(%(You have received this notification because you are a collaborator of #{decidim_html_escape(resource_title)}.)) - end - end - - describe "notification_title" do - it "is generated correctly" do - expect(subject.notification_title) - .to include(%(#{requester_name} #{requester_nickname} has been accepted to access as a contributor of the #{decidim_html_escape(resource_title)} collaborative draft.)) - end - end + it_behaves_like "a simple event" + it_behaves_like "a simple event email" + it_behaves_like "a simple event notification" end context "when the notification is for the requester" do let(:event_name) { "decidim.events.proposals.collaborative_draft_access_requester_accepted" } + let(:email_subject) { "You have been accepted as a contributor of #{resource_title}." } + let(:email_intro) { %(You have been accepted to access as a contributor of the #{decidim_html_escape(resource_title)} collaborative draft.) } + let(:email_outro) { %(You have received this notification because you requested to become a collaborator of #{decidim_html_escape(resource_title)}.) } + let(:notification_title) { %(You have been accepted to access as a contributor of the #{decidim_html_escape(resource_title)} collaborative draft.) } it_behaves_like "a simple event" - - describe "email_subject" do - it "is generated correctly" do - expect(subject.email_subject).to eq("You have been accepted as a contributor of #{resource_title}.") - end - end - - describe "email_intro" do - it "is generated correctly" do - expect(subject.email_intro) - .to eq(%(You have been accepted to access as a contributor of the #{decidim_html_escape(resource_title)} collaborative draft.)) - end - end - - describe "email_outro" do - it "is generated correctly" do - expect(subject.email_outro) - .to eq(%(You have received this notification because you requested to become a collaborator of #{decidim_html_escape(resource_title)}.)) - end - end - - describe "notification_title" do - it "is generated correctly" do - expect(subject.notification_title) - .to eq(%(You have been accepted to access as a contributor of the #{decidim_html_escape(resource_title)} collaborative draft.)) - end - end + it_behaves_like "a simple event email" + it_behaves_like "a simple event notification" end end diff --git a/decidim-proposals/spec/events/decidim/proposals/collaborative_draft_access_rejected_event_spec.rb b/decidim-proposals/spec/events/decidim/proposals/collaborative_draft_access_rejected_event_spec.rb index aa3efd1c2acd6..3eaed1d779adb 100644 --- a/decidim-proposals/spec/events/decidim/proposals/collaborative_draft_access_rejected_event_spec.rb +++ b/decidim-proposals/spec/events/decidim/proposals/collaborative_draft_access_rejected_event_spec.rb @@ -24,66 +24,25 @@ let(:extra) { { requester_id: requester_id } } context "when the notification is for coauthor users" do - it_behaves_like "a simple event" - - describe "email_subject" do - it "is generated correctly" do - expect(subject.email_subject).to eq("#{requester_name} has been rejected to access as a contributor of the #{translated(resource.title)} collaborative draft.") - end - end - - describe "email_intro" do - it "is generated correctly" do - expect(subject.email_intro) - .to eq(%(#{requester_name} has been rejected to access as a contributor of the #{resource_title} collaborative draft.)) - end - end + let(:email_subject) { "#{requester_name} has been rejected to access as a contributor of the #{translated(resource.title)} collaborative draft." } + let(:email_intro) { %(#{requester_name} has been rejected to access as a contributor of the #{resource_title} collaborative draft.) } + let(:email_outro) { %(You have received this notification because you are a collaborator of #{resource_title}.) } + let(:notification_title) { %(#{requester_name} #{requester_nickname} has been rejected to access as a contributor of the #{resource_title} collaborative draft.) } - describe "email_outro" do - it "is generated correctly" do - expect(subject.email_outro) - .to eq(%(You have received this notification because you are a collaborator of #{resource_title}.)) - end - end - - describe "notification_title" do - it "is generated correctly" do - expect(subject.notification_title) - .to include(%(#{requester_name} #{requester_nickname} has been rejected to access as a contributor of the #{resource_title} collaborative draft.)) - end - end + it_behaves_like "a simple event" + it_behaves_like "a simple event email" + it_behaves_like "a simple event notification" end context "when the notification is for the requester" do let(:event_name) { "decidim.events.proposals.collaborative_draft_access_requester_rejected" } + let(:email_subject) { "You have been rejected as a contributor of #{translated(resource.title)}." } + let(:email_intro) { %(You have been rejected to access as a contributor of the #{resource_title} collaborative draft.) } + let(:email_outro) { %(You have received this notification because you requested to become a collaborator of #{resource_title}.) } + let(:notification_title) { %(You have been rejected to access as a contributor of the #{resource_title} collaborative draft.) } it_behaves_like "a simple event" - - describe "email_subject" do - it "is generated correctly" do - expect(subject.email_subject).to eq("You have been rejected as a contributor of #{translated(resource.title)}.") - end - end - - describe "email_intro" do - it "is generated correctly" do - expect(subject.email_intro) - .to eq(%(You have been rejected to access as a contributor of the #{resource_title} collaborative draft.)) - end - end - - describe "email_outro" do - it "is generated correctly" do - expect(subject.email_outro) - .to eq(%(You have received this notification because you requested to become a collaborator of #{resource_title}.)) - end - end - - describe "notification_title" do - it "is generated correctly" do - expect(subject.notification_title) - .to eq(%(You have been rejected to access as a contributor of the #{resource_title} collaborative draft.)) - end - end + it_behaves_like "a simple event email" + it_behaves_like "a simple event notification" end end diff --git a/decidim-proposals/spec/events/decidim/proposals/collaborative_draft_access_requested_event_spec.rb b/decidim-proposals/spec/events/decidim/proposals/collaborative_draft_access_requested_event_spec.rb index efbaf21c7aca6..2227a8c374733 100644 --- a/decidim-proposals/spec/events/decidim/proposals/collaborative_draft_access_requested_event_spec.rb +++ b/decidim-proposals/spec/events/decidim/proposals/collaborative_draft_access_requested_event_spec.rb @@ -24,33 +24,13 @@ let(:extra) { { requester_id: requester_id } } context "when the notification is for coauthor users" do - it_behaves_like "a simple event" - - describe "email_subject" do - it "is generated correctly" do - expect(subject.email_subject).to eq("#{requester_name} requested access to contribute to #{resource_title}.") - end - end - - describe "email_intro" do - it "is generated correctly" do - expect(subject.email_intro) - .to eq(%(#{requester_name} requested access as a contributor. You can accept or reject the request from the #{decidim_html_escape(resource_title)} collaborative draft page.)) - end - end + let(:notification_title) { %(#{requester_name} #{requester_nickname} requested access to contribute to the #{decidim_html_escape(resource_title)} collaborative draft. Please accept or reject the request.) } + let(:email_outro) { %(You have received this notification because you are a collaborator of #{decidim_html_escape(resource_title)}.) } + let(:email_intro) { %(#{requester_name} requested access as a contributor. You can accept or reject the request from the #{decidim_html_escape(resource_title)} collaborative draft page.) } + let(:email_subject) { "#{requester_name} requested access to contribute to #{resource_title}." } - describe "email_outro" do - it "is generated correctly" do - expect(subject.email_outro) - .to eq(%(You have received this notification because you are a collaborator of #{decidim_html_escape(resource_title)}.)) - end - end - - describe "notification_title" do - it "is generated correctly" do - expect(subject.notification_title) - .to include(%(#{requester_name} #{requester_nickname} requested access to contribute to the #{decidim_html_escape(resource_title)} collaborative draft. Please accept or reject the request.)) - end - end + it_behaves_like "a simple event" + it_behaves_like "a simple event email" + it_behaves_like "a simple event notification" end end diff --git a/decidim-proposals/spec/events/decidim/proposals/collaborative_draft_withdrawn_event_spec.rb b/decidim-proposals/spec/events/decidim/proposals/collaborative_draft_withdrawn_event_spec.rb index 52363ede18c82..5cf781a1442df 100644 --- a/decidim-proposals/spec/events/decidim/proposals/collaborative_draft_withdrawn_event_spec.rb +++ b/decidim-proposals/spec/events/decidim/proposals/collaborative_draft_withdrawn_event_spec.rb @@ -19,33 +19,13 @@ let(:extra) { { author_id: author_id } } context "when the notification is for coauthor users" do - it_behaves_like "a simple event" - - describe "email_subject" do - it "is generated correctly" do - expect(subject.email_subject).to eq("#{author_name} #{author_nickname} withdrawn the #{decidim_sanitize(resource_title)} collaborative draft.") - end - end - - describe "email_intro" do - it "is generated correctly" do - expect(subject.email_intro) - .to eq(%(#{author_name} #{author_nickname} withdrawn the #{resource_title} collaborative draft.)) - end - end + let(:notification_title) { %(#{author_name} #{author_nickname} withdrawn the #{resource_title} collaborative draft.) } + let(:email_outro) { %(You have received this notification because you are a collaborator of #{resource_title}.) } + let(:email_intro) { %(#{author_name} #{author_nickname} withdrawn the #{resource_title} collaborative draft.) } + let(:email_subject) { "#{author_name} #{author_nickname} withdrawn the #{decidim_sanitize(resource_title)} collaborative draft." } - describe "email_outro" do - it "is generated correctly" do - expect(subject.email_outro) - .to eq(%(You have received this notification because you are a collaborator of #{resource_title}.)) - end - end - - describe "notification_title" do - it "is generated correctly" do - expect(subject.notification_title) - .to include(%(#{author_name} #{author_nickname} withdrawn the #{resource_title} collaborative draft.)) - end - end + it_behaves_like "a simple event" + it_behaves_like "a simple event email" + it_behaves_like "a simple event notification" end end diff --git a/decidim-proposals/spec/events/decidim/proposals/creation_enabled_event_spec.rb b/decidim-proposals/spec/events/decidim/proposals/creation_enabled_event_spec.rb index cc639d5a36aff..3218dbaca7157 100644 --- a/decidim-proposals/spec/events/decidim/proposals/creation_enabled_event_spec.rb +++ b/decidim-proposals/spec/events/decidim/proposals/creation_enabled_event_spec.rb @@ -13,35 +13,14 @@ module Proposals let(:resource) { create(:proposal_component) } let(:participatory_space) { resource.participatory_space } let(:resource_path) { main_component_path(resource) } + let(:email_subject) { "Proposals now available in #{participatory_space.title["en"]}" } + let(:email_intro) { "You can now create new proposals in #{participatory_space_title}! Start participating in this page:" } + let(:email_outro) { "You have received this notification because you are following #{participatory_space.title["en"]}. You can stop receiving notifications following the previous link." } + let(:notification_title) { "You can now put forward new proposals in #{participatory_space.title["en"]}" } it_behaves_like "a simple event" - - describe "email_subject" do - it "is generated correctly" do - expect(subject.email_subject).to eq("Proposals now available in #{participatory_space.title["en"]}") - end - end - - describe "email_intro" do - it "is generated correctly" do - expect(subject.email_intro) - .to eq("You can now create new proposals in #{participatory_space_title}! Start participating in this page:") - end - end - - describe "email_outro" do - it "is generated correctly" do - expect(subject.email_outro) - .to include("You have received this notification because you are following #{participatory_space.title["en"]}") - end - end - - describe "notification_title" do - it "is generated correctly" do - expect(subject.notification_title) - .to eq("You can now put forward new proposals in #{participatory_space.title["en"]}") - end - end + it_behaves_like "a simple event email" + it_behaves_like "a simple event notification" end end end diff --git a/decidim-proposals/spec/events/decidim/proposals/endorsing_enabled_event_spec.rb b/decidim-proposals/spec/events/decidim/proposals/endorsing_enabled_event_spec.rb index a0883577cf73e..eef00726375bf 100644 --- a/decidim-proposals/spec/events/decidim/proposals/endorsing_enabled_event_spec.rb +++ b/decidim-proposals/spec/events/decidim/proposals/endorsing_enabled_event_spec.rb @@ -13,35 +13,14 @@ module Proposals let(:resource) { create(:proposal_component) } let(:participatory_space) { resource.participatory_space } let(:resource_path) { main_component_path(resource) } + let(:email_subject) { "Proposals endorsing has started for #{participatory_space.title["en"]}" } + let(:email_intro) { "You can endorse proposals in #{participatory_space_title}! Start participating in this page:" } + let(:email_outro) { "You have received this notification because you are following #{participatory_space.title["en"]}. You can stop receiving notifications following the previous link." } + let(:notification_title) { "You can now start endorsing proposals in #{participatory_space.title["en"]}" } it_behaves_like "a simple event" - - describe "email_subject" do - it "is generated correctly" do - expect(subject.email_subject).to eq("Proposals endorsing has started for #{participatory_space.title["en"]}") - end - end - - describe "email_intro" do - it "is generated correctly" do - expect(subject.email_intro) - .to eq("You can endorse proposals in #{participatory_space_title}! Start participating in this page:") - end - end - - describe "email_outro" do - it "is generated correctly" do - expect(subject.email_outro) - .to include("You have received this notification because you are following #{participatory_space.title["en"]}") - end - end - - describe "notification_title" do - it "is generated correctly" do - expect(subject.notification_title) - .to eq("You can now start endorsing proposals in #{participatory_space.title["en"]}") - end - end + it_behaves_like "a simple event email" + it_behaves_like "a simple event notification" end end end diff --git a/decidim-proposals/spec/events/decidim/proposals/evaluating_proposal_event_spec.rb b/decidim-proposals/spec/events/decidim/proposals/evaluating_proposal_event_spec.rb index 785d480b61d1c..7fbf2735627df 100644 --- a/decidim-proposals/spec/events/decidim/proposals/evaluating_proposal_event_spec.rb +++ b/decidim-proposals/spec/events/decidim/proposals/evaluating_proposal_event_spec.rb @@ -5,34 +5,13 @@ describe Decidim::Proposals::EvaluatingProposalEvent do let(:resource) { create :proposal, title: "My super proposal" } let(:event_name) { "decidim.events.proposals.proposal_evaluating" } + let(:email_subject) { "A proposal you're following is being evaluated" } + let(:email_intro) { "The proposal \"#{translated(resource.title)}\" is currently being evaluated. You can check for an answer in this page:" } + let(:email_outro) { "You have received this notification because you are following \"#{translated(resource.title)}\". You can unfollow it from the previous link." } + let(:notification_title) { "The #{translated(resource.title)} proposal is being evaluated." } include_context "when a simple event" it_behaves_like "a simple event" - - describe "email_subject" do - it "is generated correctly" do - expect(subject.email_subject).to eq("A proposal you're following is being evaluated") - end - end - - describe "email_intro" do - it "is generated correctly" do - expect(subject.email_intro) - .to eq("The proposal \"#{translated(resource.title)}\" is currently being evaluated. You can check for an answer in this page:") - end - end - - describe "email_outro" do - it "is generated correctly" do - expect(subject.email_outro) - .to eq("You have received this notification because you are following \"#{translated(resource.title)}\". You can unfollow it from the previous link.") - end - end - - describe "notification_title" do - it "is generated correctly" do - expect(subject.notification_title) - .to include("The #{translated(resource.title)} proposal is being evaluated") - end - end + it_behaves_like "a simple event email" + it_behaves_like "a simple event notification" end diff --git a/decidim-proposals/spec/events/decidim/proposals/publish_proposal_event_spec.rb b/decidim-proposals/spec/events/decidim/proposals/publish_proposal_event_spec.rb index e8c39213ce1e1..cd49a7fe6d62f 100644 --- a/decidim-proposals/spec/events/decidim/proposals/publish_proposal_event_spec.rb +++ b/decidim-proposals/spec/events/decidim/proposals/publish_proposal_event_spec.rb @@ -73,36 +73,16 @@ module Proposals context "when the target are the participatory space followers" do let(:event_name) { "decidim.events.proposals.proposal_published_for_space" } + let(:notification_title) { "The proposal A nice proposal has been added to #{participatory_space_title} by #{author.name} @#{author.nickname}" } + let(:email_outro) { "You have received this notification because you are following \"#{participatory_space_title}\". You can stop receiving notifications following the previous link." } + let(:email_intro) { "The proposal \"A nice proposal\" has been added to \"#{participatory_space_title}\" that you are following." } + let(:email_subject) { "New proposal \"#{resource_title}\" added to #{participatory_space_title}" } let(:extra) { { participatory_space: true } } include_context "when a simple event" it_behaves_like "a simple event" - - describe "email_subject" do - it "is generated correctly" do - expect(subject.email_subject).to eq("New proposal \"#{resource_title}\" added to #{participatory_space_title}") - end - end - - describe "email_intro" do - it "is generated correctly" do - expect(subject.email_intro).to eq("The proposal \"A nice proposal\" has been added to \"#{participatory_space_title}\" that you are following.") - end - end - - describe "email_outro" do - it "is generated correctly" do - expect(subject.email_outro) - .to include("You have received this notification because you are following \"#{participatory_space_title}\"") - end - end - - describe "notification_title" do - it "is generated correctly" do - expect(subject.notification_title) - .to eq("The proposal A nice proposal has been added to #{participatory_space_title} by #{author.name} @#{author.nickname}") - end - end + it_behaves_like "a simple event email" + it_behaves_like "a simple event notification" end describe "translated notifications" do diff --git a/decidim-proposals/spec/events/decidim/proposals/rejected_proposal_event_spec.rb b/decidim-proposals/spec/events/decidim/proposals/rejected_proposal_event_spec.rb index 1113fd41074a2..38628bdb0e41b 100644 --- a/decidim-proposals/spec/events/decidim/proposals/rejected_proposal_event_spec.rb +++ b/decidim-proposals/spec/events/decidim/proposals/rejected_proposal_event_spec.rb @@ -6,40 +6,14 @@ let(:resource) { create :proposal, :with_answer, title: "It's my super proposal" } let(:resource_title) { translated(resource.title) } let(:event_name) { "decidim.events.proposals.proposal_rejected" } + let(:email_subject) { "A proposal you're following has been rejected" } + let(:email_intro) { "The proposal \"#{decidim_html_escape(resource_title)}\" has been rejected. You can read the answer in this page:" } + let(:email_outro) { "You have received this notification because you are following \"#{decidim_html_escape(resource_title)}\". You can unfollow it from the previous link." } + let(:notification_title) { "The #{decidim_html_escape(resource_title)} proposal has been rejected." } + let(:resource_text) { translated(resource.answer) } include_context "when a simple event" it_behaves_like "a simple event" - - describe "email_subject" do - it "is generated correctly" do - expect(subject.email_subject).to eq("A proposal you're following has been rejected") - end - end - - describe "email_intro" do - it "is generated correctly" do - expect(subject.email_intro) - .to eq("The proposal \"#{decidim_html_escape(resource_title)}\" has been rejected. You can read the answer in this page:") - end - end - - describe "email_outro" do - it "is generated correctly" do - expect(subject.email_outro) - .to eq("You have received this notification because you are following \"#{decidim_html_escape(resource_title)}\". You can unfollow it from the previous link.") - end - end - - describe "notification_title" do - it "is generated correctly" do - expect(subject.notification_title) - .to include("The #{decidim_html_escape(resource_title)} proposal has been rejected") - end - end - - describe "resource_text" do - it "shows the proposal answer" do - expect(subject.resource_text).to eq translated(resource.answer) - end - end + it_behaves_like "a simple event email" + it_behaves_like "a simple event notification" end diff --git a/decidim-proposals/spec/events/decidim/proposals/voting_enabled_event_spec.rb b/decidim-proposals/spec/events/decidim/proposals/voting_enabled_event_spec.rb index b7ad3e2b012da..528191a1e40ee 100644 --- a/decidim-proposals/spec/events/decidim/proposals/voting_enabled_event_spec.rb +++ b/decidim-proposals/spec/events/decidim/proposals/voting_enabled_event_spec.rb @@ -10,38 +10,17 @@ module Proposals include_context "when a simple event" let(:event_name) { "decidim.events.proposals.voting_enabled" } + let(:email_subject) { "Proposal support has started for #{participatory_space.title["en"]}" } + let(:email_intro) { "You can support proposals in #{participatory_space_title}! Start participating in this page:" } + let(:email_outro) { "You have received this notification because you are following #{participatory_space.title["en"]}. You can stop receiving notifications following the previous link." } + let(:notification_title) { "You can now start supporting proposals in #{participatory_space.title["en"]}" } let(:resource) { create(:proposal_component) } let(:participatory_space) { resource.participatory_space } let(:resource_path) { main_component_path(resource) } it_behaves_like "a simple event" - - describe "email_subject" do - it "is generated correctly" do - expect(subject.email_subject).to eq("Proposal support has started for #{participatory_space.title["en"]}") - end - end - - describe "email_intro" do - it "is generated correctly" do - expect(subject.email_intro) - .to eq("You can support proposals in #{participatory_space_title}! Start participating in this page:") - end - end - - describe "email_outro" do - it "is generated correctly" do - expect(subject.email_outro) - .to include("You have received this notification because you are following #{participatory_space.title["en"]}") - end - end - - describe "notification_title" do - it "is generated correctly" do - expect(subject.notification_title) - .to eq("You can now start supporting proposals in #{participatory_space.title["en"]}") - end - end + it_behaves_like "a simple event email" + it_behaves_like "a simple event notification" end end end diff --git a/decidim-sortitions/spec/events/decidim/sortitions/create_sortition_event_spec.rb b/decidim-sortitions/spec/events/decidim/sortitions/create_sortition_event_spec.rb index d1143ae01eb42..d1c12b68d9ab8 100644 --- a/decidim-sortitions/spec/events/decidim/sortitions/create_sortition_event_spec.rb +++ b/decidim-sortitions/spec/events/decidim/sortitions/create_sortition_event_spec.rb @@ -3,35 +3,15 @@ require "spec_helper" describe Decidim::Sortitions::CreateSortitionEvent do - let(:resource) { create :sortition } + let(:resource) { create(:sortition) } + let(:notification_title) { "The sortition #{resource_title} has been added to #{participatory_space_title}" } + let(:email_outro) { "You have received this notification because you are following \"#{participatory_space_title}\". You can unfollow it from the previous link." } + let(:email_intro) { "The sortition \"#{resource_title}\" has been added to \"#{participatory_space_title}\" that you are following." } + let(:email_subject) { "New sortition added to #{participatory_space_title}" } let(:event_name) { "decidim.events.sortitions.sortition_created" } include_context "when a simple event" it_behaves_like "a simple event" - - describe "email_subject" do - it "is generated correctly" do - expect(subject.email_subject).to eq("New sortition added to #{participatory_space_title}") - end - end - - describe "email_intro" do - it "is generated correctly" do - expect(subject.email_intro).to eq("The sortition \"#{resource_title}\" has been added to \"#{participatory_space_title}\" that you are following.") - end - end - - describe "email_outro" do - it "is generated correctly" do - expect(subject.email_outro) - .to include("You have received this notification because you are following \"#{participatory_space_title}\"") - end - end - - describe "notification_title" do - it "is generated correctly" do - expect(subject.notification_title) - .to eq("The sortition #{resource_title} has been added to #{participatory_space_title}") - end - end + it_behaves_like "a simple event email" + it_behaves_like "a simple event notification" end diff --git a/decidim-verifications/spec/events/decidim/verifications/managed_user_error_event_spec.rb b/decidim-verifications/spec/events/decidim/verifications/managed_user_error_event_spec.rb index 10ae10dd6c03f..ae9eddfdd17ba 100644 --- a/decidim-verifications/spec/events/decidim/verifications/managed_user_error_event_spec.rb +++ b/decidim-verifications/spec/events/decidim/verifications/managed_user_error_event_spec.rb @@ -9,23 +9,16 @@ let(:resource) { create :conflict } let(:organization_host) { "#{resource.current_user.organization.host}:#{Capybara.server_port}" } - describe "resource_title" do - it "is generated correctly" do - expect(subject.resource_title).to eq(resource.current_user.name) - end - end - - describe "resource_path" do - it "is generated correctly" do - expect(subject.resource_path).to eq("/profiles/#{resource.current_user.nickname}") - end - end + let(:resource_title) { resource.current_user.name } + let(:resource_path) { "/profiles/#{resource.current_user.nickname}" } + let(:resource_url) { "http://#{organization_host}/profiles/#{resource.current_user.nickname}" } + let(:notification_title) { "The participant #{resource.current_user.name} has tried to verify themself with the data of another participant (#{resource.managed_user.name})." } + let(:email_subject) { "Failed verification attempt against another participant" } + let(:email_intro) { "The participant #{resource.current_user.name} has tried to verify themself with the data of another participant (#{resource.managed_user.name})." } + let(:email_outro) { "Check the Verifications's conflicts list and contact the participant to verify their details and solve the issue." } - describe "resource_url" do - it "is generated correctly" do - expect(subject.resource_url).to eq("http://#{organization_host}/profiles/#{resource.current_user.nickname}") - end - end + it_behaves_like "a simple event email" + it_behaves_like "a simple event notification" describe "default_i18n_options" do it "includes managed_user_name" do @@ -36,28 +29,4 @@ expect(subject.default_i18n_options[:managed_user_path]).to eq("/profiles/#{resource.managed_user.nickname}") end end - - describe "notification_title" do - it "is generated correctly" do - expect(subject.notification_title).to eq("The participant #{resource.current_user.name} has tried to verify themself with the data of another participant (#{resource.managed_user.name}).") - end - end - - describe "email_subject" do - it "is generated correctly" do - expect(subject.email_subject).to eq("Failed verification attempt against another participant") - end - end - - describe "email_intro" do - it "is generated correctly" do - expect(subject.email_intro).to eq("The participant #{resource.current_user.name} has tried to verify themself with the data of another participant (#{resource.managed_user.name}).") - end - end - - describe "email_outro" do - it "is generated correctly" do - expect(subject.email_outro).to eq("Check the Verifications's conflicts list and contact the participant to verify their details and solve the issue.") - end - end end From 013bfd3c0d57bda56cf3e0b9894cf1dcf6bb9276 Mon Sep 17 00:00:00 2001 From: Alexandru Emil Lupu Date: Mon, 26 Feb 2024 19:45:38 +0200 Subject: [PATCH 02/88] Backport 'Refactor of events specs (part 2)' to v0.27 (#12508) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Refactor of events specs (part 2) * Refactor of initiative_sent_to_technical_validation_event_spec * Refactor of initiative_sent_to_technical_validation_event_spec * Refactor of opened_survey_event_spec * deletion of commented out test * Refactor of polling_station_assigned_event_spec * Refactor vote_accepted_event_spec * Refactor election_published_event_spec * Refactor of notify_trustee_new_election_event_spec * Refactor of notify_new_trustee_event_spec * Refactor of creation_enabled_event_spec * Refactor of creation_disabled_event_spec * refactor of profile_updated_event_officialize_user_spec * reformating of profile_updated_event_officialize_user_spec * Refactor of user_group_updated_event_spec (BROKEN) * Refactor of profile_updated_event_spec * Refactor of create_post_event_spec * Refactor of conference_role_assigned_event_spec * Refactor of create_assembly_member_event_spec * Refactor of user_group_created_event_spec (BROKEN SHAKERPACKER) * Refactor of decidim-admin/spec/events/decidim/component_published_event_spec.rb * Refactor of component_published_event_spec * Refactor of attachment_created_event_spec * Refactor of resource_hidden_event_spec * Refactor of role_assigned_to_assembly_event_spec * Refactor of user_mentioned_event_spec * Refactor of user_mentioned_event_spec (styling fix) * Refactor of create_initiative_event_spec * Refactor of closed_survey_event_spec * Refactor of create_debate_event_spec * Refactor of create_debate_event_spec (styling) * Refactor of comment_by_followed_user_event_spec * Refactor of comment_by_followed_user_group_event_spec * Refactor of comment_created_event_spec * Refactor of reply_created_event_spec * Refactor of reply_created_event_spec (styling) * Refactor of user_group_mentioned_event_spec (shakerpacker issue) * Refactor of user_group_mentioned_event_spec (styling) * Refactor of profile_updated_event_spec * Refactor of result_progress_updated_event_spec * Refactor of proposal_linked_event_spec * Refactor fix for decidim-accountability/spec/events/decidim/accountability/proposal_linked_event_spec.rb (NEW) * Refactor of decidim-accountability/spec/events/decidim/accountability/result_progress_updated_event_spec.rb (NEW) * Refactor of decidim-comments/spec/events/decidim/comments/comment_by_followed_user_group_event_spec.rb (NEW) * Refactor of decidim-comments/spec/events/decidim/comments/user_group_mentioned_event_spec.rb * Update decidim-accountability/spec/events/decidim/accountability/result_progress_updated_event_spec.rb Co-authored-by: Andrés Pereira de Lucena * Update decidim-blogs/spec/events/decidim/blogs/create_post_event_spec.rb Co-authored-by: Andrés Pereira de Lucena * Update decidim-comments/spec/events/decidim/comments/user_group_mentioned_event_spec.rb Co-authored-by: Andrés Pereira de Lucena * Update decidim-debates/spec/events/decidim/debates/create_debate_event_spec.rb Co-authored-by: Andrés Pereira de Lucena * Refactor of decidim-comments/spec/events/decidim/comments/user_group_mentioned_event_spec (CLI FIX) * Update decidim-elections/spec/events/decidim/elections/trustees/notify_new_trustee_event_spec.rb Co-authored-by: Andrés Pereira de Lucena * Update decidim-elections/spec/events/decidim/elections/trustees/notify_trustee_new_election_event_spec.rb Co-authored-by: Andrés Pereira de Lucena * Update decidim-initiatives/spec/events/decidim/initiatives/admin/initiative_sent_to_technical_validation_event_spec.rb Co-authored-by: Andrés Pereira de Lucena * Update decidim-initiatives/spec/events/decidim/initiatives/admin/initiative_sent_to_technical_validation_event_spec.rb Co-authored-by: Alexandru Emil Lupu * Update decidim-elections/spec/events/decidim/elections/trustees/notify_trustee_new_election_event_spec.rb Co-authored-by: Alexandru Emil Lupu --------- Co-authored-by: Andrés Pereira de Lucena Co-authored-by: Alexandru Emil Lupu * Fix failing spec --------- Co-authored-by: Tom <101816158+greenwoodt@users.noreply.github.com> Co-authored-by: Andrés Pereira de Lucena --- .../proposal_linked_event_spec.rb | 15 ++-- .../result_progress_updated_event_spec.rb | 20 ++--- .../decidim/attachment_created_event_spec.rb | 32 ++------ .../decidim/component_published_event_spec.rb | 33 ++------- .../decidim/resource_hidden_event_spec.rb | 29 ++------ .../create_assembly_member_event_spec.rb | 33 ++------- .../role_assigned_to_assembly_event_spec.rb | 32 ++------ .../decidim/blogs/create_post_event_spec.rb | 40 ++-------- .../comment_by_followed_user_event_spec.rb | 35 ++------- ...mment_by_followed_user_group_event_spec.rb | 35 ++------- .../comments/comment_created_event_spec.rb | 35 ++------- .../comments/reply_created_event_spec.rb | 35 ++------- .../user_group_mentioned_event_spec.rb | 49 +++++-------- .../comments/user_mentioned_event_spec.rb | 35 ++------- .../conference_role_assigned_event_spec.rb | 32 ++------ ...ile_updated_event_officialize_user_spec.rb | 32 ++------ .../decidim/profile_updated_event_spec.rb | 32 ++------ .../decidim/user_group_created_event_spec.rb | 32 ++------ .../decidim/user_group_updated_event_spec.rb | 32 ++------ .../debates/create_debate_event_spec.rb | 73 +++---------------- .../debates/creation_disabled_event_spec.rb | 33 ++------- .../debates/creation_enabled_event_spec.rb | 33 ++------- .../election_published_event_spec.rb | 33 ++------- .../trustees/notify_new_trustee_event_spec.rb | 36 +++------ .../notify_trustee_new_election_event_spec.rb | 27 ++----- .../votes/vote_accepted_event_spec.rb | 33 ++------- .../polling_station_assigned_event_spec.rb | 33 ++------- ...sent_to_technical_validation_event_spec.rb | 34 ++------- .../create_initiative_event_spec.rb | 36 ++------- ...sent_to_technical_validation_event_spec.rb | 33 ++------- .../surveys/closed_survey_event_spec.rb | 35 ++------- .../surveys/opened_survey_event_spec.rb | 33 ++------- 32 files changed, 214 insertions(+), 876 deletions(-) diff --git a/decidim-accountability/spec/events/decidim/accountability/proposal_linked_event_spec.rb b/decidim-accountability/spec/events/decidim/accountability/proposal_linked_event_spec.rb index f0d400ea70cf0..636bd3bc8ab18 100644 --- a/decidim-accountability/spec/events/decidim/accountability/proposal_linked_event_spec.rb +++ b/decidim-accountability/spec/events/decidim/accountability/proposal_linked_event_spec.rb @@ -14,12 +14,18 @@ let(:extra) { { proposal_id: proposal.id } } let(:proposal_path) { resource_locator(proposal).path } let(:proposal_title) { translated(proposal.title) } + let(:notification_title) { "The proposal #{proposal_title} has been included in the #{resource_title} result." } + let(:email_subject) { "An update to #{proposal_title}" } + let(:email_outro) { "You have received this notification because you are following \"#{proposal_title}\". You can stop receiving notifications following the previous link." } + let(:email_intro) { "The proposal \"#{proposal_title}\" has been included in a result. You can see it from this page:" } before do resource.link_resources([proposal], "included_proposals") end it_behaves_like "a simple event" + it_behaves_like "a simple event email" + it_behaves_like "a simple event notification" describe "proposal" do it "finds the linked proposal" do @@ -41,31 +47,22 @@ describe "email_subject" do it "is generated correctly" do - expect(subject.email_subject).to eq("An update to #{proposal_title}") expect(subject.email_subject).not_to include(proposal.title.to_s) end end describe "email_outro" do it "is generated correctly" do - expect(subject.email_outro).to eq("You have received this notification because you are following \"#{proposal_title}\". You can stop receiving notifications following the previous link.") expect(subject.email_outro).not_to include(proposal.title.to_s) end end describe "email_intro" do it "is generated correctly" do - expect(subject.email_intro).to eq("The proposal \"#{proposal_title}\" has been included in a result. You can see it from this page:") expect(subject.email_intro).not_to include(proposal.title.to_s) end end - describe "notification_title" do - it "is generated correctly" do - expect(subject.notification_title).to eq("The proposal #{proposal_title} has been included in the #{resource_title} result.") - end - end - describe "resource_text" do it "outputs the localized result description" do expect(subject.resource_text).to eq translated(resource.description) diff --git a/decidim-accountability/spec/events/decidim/accountability/result_progress_updated_event_spec.rb b/decidim-accountability/spec/events/decidim/accountability/result_progress_updated_event_spec.rb index 97107a8c8d47b..70bc82f3e5a1b 100644 --- a/decidim-accountability/spec/events/decidim/accountability/result_progress_updated_event_spec.rb +++ b/decidim-accountability/spec/events/decidim/accountability/result_progress_updated_event_spec.rb @@ -14,12 +14,18 @@ let(:extra) { { proposal_id: proposal.id, progress: 95 } } let(:proposal_path) { resource_locator(proposal).path } let(:proposal_title) { translated(proposal.title) } + let(:email_subject) { "An update to #{translated resource.title} progress" } + let(:notification_title) { "The result #{resource_title}, which includes the proposal #{proposal_title}, is now 95% complete." } + let(:email_outro) { "You have received this notification because you are following \"#{proposal_title}\", and this proposal is included in the result \"#{translated resource.title}\". You can stop receiving notifications following the previous link." } + let(:email_intro) { "The result \"#{translated resource.title}\", which includes the proposal \"#{proposal_title}\", is now 95% complete. You can see it from this page:" } before do resource.link_resources([proposal], "included_proposals") end it_behaves_like "a simple event", proposal_text: true + it_behaves_like "a simple event email" + it_behaves_like "a simple event notification" describe "proposal" do it "finds the linked proposal" do @@ -39,32 +45,18 @@ end end - describe "email_subject" do - it "is generated correctly" do - expect(subject.email_subject).to eq("An update to #{translated resource.title} progress") - end - end - describe "email_outro" do it "is generated correctly" do - expect(subject.email_outro).to eq("You have received this notification because you are following \"#{proposal_title}\", and this proposal is included in the result \"#{translated resource.title}\". You can stop receiving notifications following the previous link.") expect(subject.email_outro).not_to include(proposal.title.to_s) end end describe "email_intro" do it "is generated correctly" do - expect(subject.email_intro).to eq("The result \"#{translated resource.title}\", which includes the proposal \"#{proposal_title}\", is now 95% complete. You can see it from this page:") expect(subject.email_intro).not_to include(proposal.title.to_s) end end - describe "notification_title" do - it "is generated correctly" do - expect(subject.notification_title).to eq("The result #{resource_title}, which includes the proposal #{proposal_title}, is now 95% complete.") - end - end - describe "resource_text" do it "outputs the localized result description" do expect(subject.resource_text).to eq translated(resource.description) diff --git a/decidim-admin/spec/events/decidim/attachment_created_event_spec.rb b/decidim-admin/spec/events/decidim/attachment_created_event_spec.rb index e0a62cf605c20..31ad7a9b98e73 100644 --- a/decidim-admin/spec/events/decidim/attachment_created_event_spec.rb +++ b/decidim-admin/spec/events/decidim/attachment_created_event_spec.rb @@ -11,20 +11,14 @@ let(:resource_title) { attached_to.title["en"] } let(:resource_path) { resource.url } let(:attached_to) { resource.attached_to } + let(:email_subject) { "An update to #{resource_title}" } + let(:email_intro) { "A new document has been added to #{resource_title}. You can see it from this page:" } + let(:email_outro) { "You have received this notification because you are following #{resource_title}. You can stop receiving notifications following the previous link." } + let(:notification_title) { "A new document has been added to #{resource_title}" } it_behaves_like "a simple event", true - - describe "email_subject" do - it "is generated correctly" do - expect(subject.email_subject).to eq("An update to #{resource_title}") - end - end - - describe "email_intro" do - it "is generated correctly" do - expect(subject.email_intro).to eq("A new document has been added to #{resource_title}. You can see it from this page:") - end - end + it_behaves_like "a simple event email" + it_behaves_like "a simple event notification" describe "resource_url" do it "is generated correctly" do @@ -32,20 +26,6 @@ end end - describe "email_outro" do - it "is generated correctly" do - expect(subject.email_outro) - .to include("You have received this notification because you are following #{resource_title}") - end - end - - describe "notification_title" do - it "is generated correctly" do - expect(subject.notification_title) - .to eq("A new document has been added to #{resource_title}") - end - end - describe "resource_text" do let(:text) { "This is my text!" } diff --git a/decidim-admin/spec/events/decidim/component_published_event_spec.rb b/decidim-admin/spec/events/decidim/component_published_event_spec.rb index b0a787c48e60a..8e099dc44339b 100644 --- a/decidim-admin/spec/events/decidim/component_published_event_spec.rb +++ b/decidim-admin/spec/events/decidim/component_published_event_spec.rb @@ -11,33 +11,12 @@ let(:resource) { create(:component) } let(:participatory_space) { resource.participatory_space } let(:resource_path) { main_component_path(resource) } + let(:email_subject) { "An update to #{participatory_space.title["en"]}" } + let(:email_intro) { "The #{resource.name["en"]} component is now active for #{participatory_space.title["en"]}. You can see it from this page:" } + let(:email_outro) { "You have received this notification because you are following #{participatory_space.title["en"]}. You can stop receiving notifications following the previous link." } + let(:notification_title) { "The #{resource.name["en"]} component is now active for #{participatory_space.title["en"]}" } it_behaves_like "a simple event" - - describe "email_subject" do - it "is generated correctly" do - expect(subject.email_subject).to eq("An update to #{participatory_space.title["en"]}") - end - end - - describe "email_intro" do - it "is generated correctly" do - expect(subject.email_intro) - .to eq("The #{resource.name["en"]} component is now active for #{participatory_space.title["en"]}. You can see it from this page:") - end - end - - describe "email_outro" do - it "is generated correctly" do - expect(subject.email_outro) - .to include("You have received this notification because you are following #{participatory_space.title["en"]}") - end - end - - describe "notification_title" do - it "is generated correctly" do - expect(subject.notification_title) - .to eq("The #{resource.name["en"]} component is now active for #{participatory_space.title["en"]}") - end - end + it_behaves_like "a simple event email" + it_behaves_like "a simple event notification" end diff --git a/decidim-admin/spec/events/decidim/resource_hidden_event_spec.rb b/decidim-admin/spec/events/decidim/resource_hidden_event_spec.rb index 36fbfb04739ed..50728ee523334 100644 --- a/decidim-admin/spec/events/decidim/resource_hidden_event_spec.rb +++ b/decidim-admin/spec/events/decidim/resource_hidden_event_spec.rb @@ -12,30 +12,13 @@ module Decidim let(:resource) { comment } let(:event_name) { "decidim.events.reports.resource_hidden" } let(:extra) { { report_reasons: ["spam"] } } + let(:notification_title) { "An administrator removed your comment because it has been reported as spam.
\na reported comment" } + let(:email_subject) { "Your comment has been removed" } + let(:email_outro) { "You have received this notification because you are an author of the removed content." } + let(:email_intro) { "An administrator removed your comment because it has been reported as spam." } - describe "notification_title" do - it "includes the report reason" do - expect(subject.notification_title).to include("spam") - end - end - - describe "email_subject" do - it "is generated correctly" do - expect(subject.email_subject).to eq("Your comment has been removed") - end - end - - describe "email_outro" do - it "is generated correctly" do - expect(subject.email_outro).to eq("You have received this notification because you are an author of the removed content.") - end - end - - describe "email_intro" do - it "is generated correctly" do - expect(subject.email_intro).to include("An administrator removed your comment because it has been reported as spam.") - end - end + it_behaves_like "a simple event email" + it_behaves_like "a simple event notification" describe "resource_text" do it "is generated correctly" do diff --git a/decidim-assemblies/spec/events/decidim/assemblies/create_assembly_member_event_spec.rb b/decidim-assemblies/spec/events/decidim/assemblies/create_assembly_member_event_spec.rb index f1ff70b3e8ceb..19782e2e89f64 100644 --- a/decidim-assemblies/spec/events/decidim/assemblies/create_assembly_member_event_spec.rb +++ b/decidim-assemblies/spec/events/decidim/assemblies/create_assembly_member_event_spec.rb @@ -7,34 +7,13 @@ let(:resource) { assembly } let(:event_name) { "decidim.events.assemblies.create_assembly_member" } let(:assembly_title) { translated(assembly.title) } + let(:email_subject) { "You have been invited to be a member of the #{assembly_title} assembly!" } + let(:email_intro) { %(An admin of the #{assembly_title} assembly has added you as one of its members.) } + let(:email_outro) { %(You have received this notification because you have been invited to an assembly. Check the assembly page to contribute!) } + let(:notification_title) { %(You have been registered as a member of Assembly #{assembly_title}. Check the assembly page to contribute!) } include_context "when a simple event" it_behaves_like "a simple event" - - describe "email_subject" do - it "is generated correctly" do - expect(subject.email_subject).to eq("You have been invited to be a member of the #{assembly_title} assembly!") - end - end - - describe "email_intro" do - it "is generated correctly" do - expect(subject.email_intro) - .to eq(%(An admin of the #{assembly_title} assembly has added you as one of its members.)) - end - end - - describe "email_outro" do - it "is generated correctly" do - expect(subject.email_outro) - .to eq(%(You have received this notification because you have been invited to an assembly. Check the assembly page to contribute!)) - end - end - - describe "notification_title" do - it "is generated correctly" do - expect(subject.notification_title) - .to include(%(You have been registered as a member of Assembly #{assembly_title}. Check the assembly page to contribute!)) - end - end + it_behaves_like "a simple event email" + it_behaves_like "a simple event notification" end diff --git a/decidim-assemblies/spec/events/decidim/role_assigned_to_assembly_event_spec.rb b/decidim-assemblies/spec/events/decidim/role_assigned_to_assembly_event_spec.rb index 517288ded457a..cec0cbc431c46 100644 --- a/decidim-assemblies/spec/events/decidim/role_assigned_to_assembly_event_spec.rb +++ b/decidim-assemblies/spec/events/decidim/role_assigned_to_assembly_event_spec.rb @@ -9,32 +9,12 @@ let(:event_name) { "decidim.events.assembly.role_assigned" } let(:role) { create :assembly_user_role, user: user, assembly: resource, role: :admin } let(:extra) { { role: role } } + let(:email_subject) { "You have been assigned as #{role} for \"#{resource.title["en"]}\"." } + let(:email_outro) { "You have received this notification because you are #{role} of the \"#{resource.title["en"]}\" assembly." } + let(:email_intro) { "You have been assigned as #{role} for assembly \"#{resource.title["en"]}\"." } + let(:notification_title) { "You have been assigned as #{role} for assembly #{resource.title["en"]}." } it_behaves_like "a simple event" - - describe "email_subject" do - it "is generated correctly" do - expect(subject.email_subject).to eq("You have been assigned as #{role} for \"#{resource.title["en"]}\".") - end - end - - describe "email_outro" do - it "is generated correctly" do - expect(subject.email_outro) - .to eq("You have received this notification because you are #{role} of the \"#{resource.title["en"]}\" assembly.") - end - end - - describe "email_intro" do - it "is generated correctly" do - expect(subject.email_intro) - .to eq("You have been assigned as #{role} for assembly \"#{resource.title["en"]}\".") - end - end - - describe "notification_title" do - it "is generated correctly" do - expect(subject.notification_title).to include("You have been assigned as #{role} for assembly #{resource.title["en"]}.") - end - end + it_behaves_like "a simple event email" + it_behaves_like "a simple event notification" end diff --git a/decidim-blogs/spec/events/decidim/blogs/create_post_event_spec.rb b/decidim-blogs/spec/events/decidim/blogs/create_post_event_spec.rb index e4ab01ab7b199..a981bd33d6db6 100644 --- a/decidim-blogs/spec/events/decidim/blogs/create_post_event_spec.rb +++ b/decidim-blogs/spec/events/decidim/blogs/create_post_event_spec.rb @@ -5,43 +5,15 @@ describe Decidim::Blogs::CreatePostEvent do let(:resource) { create :post } let(:event_name) { "decidim.events.blogs.post_created" } + let(:email_intro) { "The post \"#{resource_title}\" has been published in \"#{participatory_space_title}\" that you are following." } + let(:email_outro) { "You have received this notification because you are following \"#{participatory_space_title}\". You can unfollow it from the previous link." } + let(:notification_title) { "The post #{resource_title} has been published in #{participatory_space_title}" } + let(:email_subject) { "New post published in #{participatory_space_title}" } include_context "when a simple event" it_behaves_like "a simple event" - - describe "email_subject" do - let(:assembly) { create(:assembly, organization: organization, title: { en: "It's a test" }) } - let(:blogs_component) { create :component, :published, name: { en: "Blogs" }, participatory_space: assembly, manifest_name: :blogs } - - before do - resource.component = blogs_component - resource.save! - end - - it "is generated correctly" do - expect(subject.email_subject).to eq("New post published in #{participatory_space_title}") - end - end - - describe "email_intro" do - it "is generated correctly" do - expect(subject.email_intro).to eq("The post \"#{resource_title}\" has been published in \"#{participatory_space_title}\" that you are following.") - end - end - - describe "email_outro" do - it "is generated correctly" do - expect(subject.email_outro) - .to include("You have received this notification because you are following \"#{participatory_space_title}\"") - end - end - - describe "notification_title" do - it "is generated correctly" do - expect(subject.notification_title) - .to eq("The post #{resource_title} has been published in #{participatory_space_title}") - end - end + it_behaves_like "a simple event email" + it_behaves_like "a simple event notification" describe "resource_text" do it "returns the post body" do diff --git a/decidim-comments/spec/events/decidim/comments/comment_by_followed_user_event_spec.rb b/decidim-comments/spec/events/decidim/comments/comment_by_followed_user_event_spec.rb index bec428fb14630..6ddf9f35291e9 100644 --- a/decidim-comments/spec/events/decidim/comments/comment_by_followed_user_event_spec.rb +++ b/decidim-comments/spec/events/decidim/comments/comment_by_followed_user_event_spec.rb @@ -9,40 +9,17 @@ module Comments let(:author) { comment.author } let(:resource) { comment.root_commentable } let(:event_name) { "decidim.events.comments.comment_by_followed_user" } + let(:email_subject) { "There is a new comment by #{author_name} in #{resource_title}" } + let(:email_intro) { "#{author_name} has left a comment in #{resource_title}. You can read it in this page:" } + let(:email_outro) { "You have received this notification because you are following #{author_name}. You can unfollow this user from their profile page." } + let(:notification_title) { "There is a new comment by #{author_name} #{author_nickname} in #{resource_title}." } + it_behaves_like "a simple event email" + it_behaves_like "a simple event notification" it_behaves_like "a comment event" it_behaves_like "a translated comment event" do let(:translatable) { true } end - - describe "email_subject" do - it "is generated correctly" do - expect(subject.email_subject).to eq("There is a new comment by #{author_name} in #{resource_title}") - end - end - - describe "email_intro" do - it "is generated correctly" do - expect(subject.email_intro) - .to eq("#{author_name} has left a comment in #{resource_title}. You can read it in this page:") - end - end - - describe "email_outro" do - it "is generated correctly" do - expect(subject.email_outro) - .to include("You have received this notification because you are following #{author_name}") - end - end - - describe "notification_title" do - it "is generated correctly" do - expect(subject.notification_title) - .to start_with("There is a new comment by #{author_name} #{author_nickname} in") - expect(subject.notification_title) - .to end_with("#{resource_title}.") - end - end end end end diff --git a/decidim-comments/spec/events/decidim/comments/comment_by_followed_user_group_event_spec.rb b/decidim-comments/spec/events/decidim/comments/comment_by_followed_user_group_event_spec.rb index fc44116ce6f2d..9b879409ce59a 100644 --- a/decidim-comments/spec/events/decidim/comments/comment_by_followed_user_group_event_spec.rb +++ b/decidim-comments/spec/events/decidim/comments/comment_by_followed_user_group_event_spec.rb @@ -11,40 +11,17 @@ module Comments let(:event_name) { "decidim.events.comments.comment_by_followed_user_group" } let!(:user_group_author) { user_group } let(:user_group_path) { Decidim::UserGroupPresenter.new(user_group).profile_path } + let(:email_subject) { "There is a new comment by #{escaped_html(user_group.name)} in #{resource_title}" } + let(:email_intro) { "The group #{escaped_html(user_group.name)} has left a comment in #{resource_title}. You can read it in this page:" } + let(:email_outro) { "You have received this notification because you are following #{escaped_html(user_group.name)}. You can unfollow this group from its profile page." } + let(:notification_title) { "There is a new comment by #{escaped_html(user_group.name)} @#{user_group.nickname} in #{resource_title}." } + it_behaves_like "a simple event email" + it_behaves_like "a simple event notification" it_behaves_like "a comment event" it_behaves_like "a translated comment event" do let(:translatable) { true } end - - describe "email_subject" do - it "is correct" do - expect(subject.email_subject).to eq("There is a new comment by #{escaped_html(user_group.name)} in #{resource_title}") - end - end - - describe "email_intro" do - it "is correct" do - expect(subject.email_intro) - .to eq("The group #{escaped_html(user_group.name)} has left a comment in #{resource_title}. You can read it in this page:") - end - end - - describe "email_outro" do - it "is correct" do - expect(subject.email_outro) - .to include("You have received this notification because you are following #{escaped_html(user_group.name)}") - end - end - - describe "notification_title" do - it "is correct" do - expect(subject.notification_title) - .to start_with("There is a new comment by #{escaped_html(user_group.name)} @#{user_group.nickname} in") - expect(subject.notification_title) - .to end_with("#{resource_title}.") - end - end end end end diff --git a/decidim-comments/spec/events/decidim/comments/comment_created_event_spec.rb b/decidim-comments/spec/events/decidim/comments/comment_created_event_spec.rb index 0332252340ffa..7b18fce9c095e 100644 --- a/decidim-comments/spec/events/decidim/comments/comment_created_event_spec.rb +++ b/decidim-comments/spec/events/decidim/comments/comment_created_event_spec.rb @@ -5,38 +5,15 @@ describe Decidim::Comments::CommentCreatedEvent do include_context "when it's a comment event" let(:event_name) { "decidim.events.comments.comment_created" } + let(:email_subject) { "There is a new comment from #{comment_author.name} in #{resource_title}" } + let(:email_intro) { "#{resource_title} has been commented. You can read the comment in this page:" } + let(:email_outro) { "You have received this notification because you are following \"#{resource_title}\" or its author. You can unfollow it from the previous link." } + let(:notification_title) { "There is a new comment from #{comment_author.name} @#{comment_author.nickname} in #{resource_title}" } + it_behaves_like "a simple event email" + it_behaves_like "a simple event notification" it_behaves_like "a comment event" it_behaves_like "a translated comment event" do let(:translatable) { true } end - - describe "email_subject" do - it "is generated correctly" do - expect(subject.email_subject).to eq("There is a new comment from #{comment_author.name} in #{resource_title}") - end - end - - describe "email_intro" do - it "is generated correctly" do - expect(subject.email_intro).to eq("#{resource_title} has been commented. You can read the comment in this page:") - end - end - - describe "email_outro" do - it "is generated correctly" do - expect(subject.email_outro) - .to eq("You have received this notification because you are following \"#{resource_title}\" or its author. You can unfollow it from the previous link.") - end - end - - describe "notification_title" do - it "is generated correctly" do - expect(subject.notification_title) - .to include("There is a new comment from #{comment_author.name} @#{comment_author.nickname}") - - expect(subject.notification_title) - .to include(" in #{resource_title}") - end - end end diff --git a/decidim-comments/spec/events/decidim/comments/reply_created_event_spec.rb b/decidim-comments/spec/events/decidim/comments/reply_created_event_spec.rb index b20e392d93e54..d175d3f2a4bf0 100644 --- a/decidim-comments/spec/events/decidim/comments/reply_created_event_spec.rb +++ b/decidim-comments/spec/events/decidim/comments/reply_created_event_spec.rb @@ -8,38 +8,15 @@ let(:comment) { create :comment, commentable: parent_comment, root_commentable: parent_comment.root_commentable } let(:parent_comment) { create :comment } let(:resource) { comment.root_commentable } + let(:email_subject) { "#{comment_author_name} has replied your comment in #{translated resource.title}" } + let(:email_intro) { "#{comment_author_name} has replied your comment in #{resource_title}. You can read it in this page:" } + let(:email_outro) { "You have received this notification because your comment was replied." } + let(:notification_title) { "#{comment_author_name} @#{comment_author.nickname} has replied your comment in #{translated resource.title}" } + it_behaves_like "a simple event email" + it_behaves_like "a simple event notification" it_behaves_like "a comment event" it_behaves_like "a translated comment event" do let(:translatable) { true } end - - describe "email_subject" do - it "is generated correctly" do - expect(subject.email_subject).to eq("#{comment_author_name} has replied your comment in #{translated resource.title}") - end - end - - describe "email_intro" do - it "is generated correctly" do - expect(subject.email_intro).to eq("#{comment_author_name} has replied your comment in #{resource_title}. You can read it in this page:") - end - end - - describe "email_outro" do - it "is generated correctly" do - expect(subject.email_outro) - .to eq("You have received this notification because your comment was replied.") - end - end - - describe "notification_title" do - it "is generated correctly" do - expect(subject.notification_title) - .to start_with("#{comment_author_name} @#{comment_author.nickname} has replied your comment in") - - expect(subject.notification_title) - .to end_with("your comment in #{translated resource.title}") - end - end end diff --git a/decidim-comments/spec/events/decidim/comments/user_group_mentioned_event_spec.rb b/decidim-comments/spec/events/decidim/comments/user_group_mentioned_event_spec.rb index e47d696257164..766cd00ba48a2 100644 --- a/decidim-comments/spec/events/decidim/comments/user_group_mentioned_event_spec.rb +++ b/decidim-comments/spec/events/decidim/comments/user_group_mentioned_event_spec.rb @@ -24,40 +24,12 @@ let(:parsed_body) { Decidim::ContentProcessor.parse("Comment mentioning some user group, @#{group.nickname}", current_organization: organization) } let(:parsed_ca_body) { Decidim::ContentProcessor.parse("Un commentaire pour @#{group.nickname}", current_organization: organization) } let(:body) { { en: parsed_body.rewrite, machine_translations: { ca: parsed_ca_body.rewrite } } } + let(:email_subject) { "You have been mentioned in #{html_escape(translated(resource.title))} as a member of #{html_escape(group.name)}" } + let(:email_intro) { "A group you belong to has been mentioned" } + let(:email_outro) { "You have received this notification because you are a member of the group #{html_escape(group.name)} that has been mentioned in #{html_escape(translated(resource.title))}." } it_behaves_like "a comment event" - - describe "email_subject" do - it "is generated correctly" do - expect(subject.email_subject).to eq("You have been mentioned in #{html_escape(translated(resource.title))} as a member of #{html_escape(group.name)}") - end - end - - describe "email_intro" do - it "is generated correctly" do - expect(subject.email_intro).to eq("A group you belong to has been mentioned") - end - end - - describe "email_outro" do - it "is generated correctly" do - expect(subject.email_outro) - .to eq("You have received this notification because you are a member of the group #{html_escape(group.name)} that has been mentioned in #{html_escape(translated(resource.title))}.") - end - end - - describe "notification_title" do - it "is generated correctly" do - expect(subject.notification_title) - .to include("You have been mentioned in #{html_escape(translated(resource.title))}") - - expect(subject.notification_title) - .to include(" as a member of #{html_escape(group.name)} @#{group.nickname}") - - expect(subject.notification_title) - .to include(" by #{html_escape(comment_author.name)} @#{comment_author.nickname}") - end - end + it_behaves_like "a simple event email" describe "resource_text" do let(:participatory_process) { create :participatory_process, organization: organization } @@ -85,4 +57,17 @@ it_behaves_like "a translated event" end + + describe "notification_title" do + it "is generated correctly" do + expect(subject.notification_title) + .to include("You have been mentioned in #{html_escape(translated(resource.title))}") + + expect(subject.notification_title) + .to include(" as a member of #{html_escape(group.name)} @#{group.nickname}") + + expect(subject.notification_title) + .to include(" by #{html_escape(comment_author.name)} @#{comment_author.nickname}") + end + end end diff --git a/decidim-comments/spec/events/decidim/comments/user_mentioned_event_spec.rb b/decidim-comments/spec/events/decidim/comments/user_mentioned_event_spec.rb index 56cd0529578c1..addfb894df2b6 100644 --- a/decidim-comments/spec/events/decidim/comments/user_mentioned_event_spec.rb +++ b/decidim-comments/spec/events/decidim/comments/user_mentioned_event_spec.rb @@ -22,37 +22,14 @@ let(:author) { create :user, organization: organization } let!(:comment) { create :comment, body: body, author: author, commentable: commentable } let(:user) { create :user, organization: organization, locale: "ca" } + let(:notification_title) { "You have been mentioned in #{translated resource.title} by #{author.name} @#{author.nickname}" } + let(:email_subject) { "You have been mentioned in #{translated resource.title}" } + let(:email_intro) { "You have been mentioned" } + let(:email_outro) { "You have received this notification because you have been mentioned in #{translated resource.title}." } it_behaves_like "a comment event" - - describe "email_subject" do - it "is generated correctly" do - expect(subject.email_subject).to eq("You have been mentioned in #{translated resource.title}") - end - end - - describe "email_intro" do - it "is generated correctly" do - expect(subject.email_intro).to eq("You have been mentioned") - end - end - - describe "email_outro" do - it "is generated correctly" do - expect(subject.email_outro) - .to eq("You have received this notification because you have been mentioned in #{translated resource.title}.") - end - end - - describe "notification_title" do - it "is generated correctly" do - expect(subject.notification_title) - .to include("You have been mentioned in #{translated resource.title}") - - expect(subject.notification_title) - .to include(" by #{author.name} @#{author.nickname}") - end - end + it_behaves_like "a simple event email" + it_behaves_like "a simple event notification" describe "resource_text" do it "correctly renders comments with mentions" do diff --git a/decidim-conferences/spec/events/decidim/conferences/conference_role_assigned_event_spec.rb b/decidim-conferences/spec/events/decidim/conferences/conference_role_assigned_event_spec.rb index 21a04bd460b20..7e7de900948a6 100644 --- a/decidim-conferences/spec/events/decidim/conferences/conference_role_assigned_event_spec.rb +++ b/decidim-conferences/spec/events/decidim/conferences/conference_role_assigned_event_spec.rb @@ -9,32 +9,12 @@ let(:event_name) { "decidim.events.conferences.role_assigned" } let(:role) { create :conference_user_role, user: user, conference: resource, role: :admin } let(:extra) { { role: role } } + let(:email_subject) { "You have been assigned as #{role} for \"#{resource.title["en"]}\"." } + let(:email_outro) { "You have received this notification because you are #{role} of the \"#{resource.title["en"]}\" conference." } + let(:email_intro) { "You have been assigned as #{role} for conference \"#{resource.title["en"]}\"." } + let(:notification_title) { "You have been assigned as #{role} for conference #{resource.title["en"]}." } it_behaves_like "a simple event" - - describe "email_subject" do - it "is generated correctly" do - expect(subject.email_subject).to eq("You have been assigned as #{role} for \"#{resource.title["en"]}\".") - end - end - - describe "email_outro" do - it "is generated correctly" do - expect(subject.email_outro) - .to eq("You have received this notification because you are #{role} of the \"#{resource.title["en"]}\" conference.") - end - end - - describe "email_intro" do - it "is generated correctly" do - expect(subject.email_intro) - .to eq("You have been assigned as #{role} for conference \"#{resource.title["en"]}\".") - end - end - - describe "notification_title" do - it "is generated correctly" do - expect(subject.notification_title).to include("You have been assigned as #{role} for conference #{resource.title["en"]}.") - end - end + it_behaves_like "a simple event email" + it_behaves_like "a simple event notification" end diff --git a/decidim-core/spec/events/decidim/profile_updated_event_officialize_user_spec.rb b/decidim-core/spec/events/decidim/profile_updated_event_officialize_user_spec.rb index 7fffcf3054523..4dbd8aff8c8a0 100644 --- a/decidim-core/spec/events/decidim/profile_updated_event_officialize_user_spec.rb +++ b/decidim-core/spec/events/decidim/profile_updated_event_officialize_user_spec.rb @@ -8,32 +8,12 @@ let(:event_name) { "decidim.events.users.user_officialized" } let(:resource) { create :user } let(:author) { resource } + let(:email_subject) { "#{resource.name} has been officialized" } + let(:email_intro) { "Participant #{resource.name} (@#{resource.nickname}) has been officialized." } + let(:email_outro) { "You have received this notification because you are an administrator of the organization." } + let(:notification_title) { "Participant #{resource.name} (@#{resource.nickname}) has been officialized." } it_behaves_like "a simple event", true - - describe "email_subject" do - it "is generated correctly" do - expect(subject.email_subject).to eq("#{resource.name} has been officialized") - end - end - - describe "email_intro" do - it "is generated correctly" do - expect(subject.email_intro) - .to eq("Participant #{resource.name} (@#{resource.nickname}) has been officialized.") - end - end - - describe "email_outro" do - it "is generated correctly" do - expect(subject.email_outro) - .to eq("You have received this notification because you are an administrator of the organization.") - end - end - - describe "notification_title" do - it "is generated correctly" do - expect(subject.notification_title).to eq("Participant #{resource.name} (@#{resource.nickname}) has been officialized.") - end - end + it_behaves_like "a simple event email" + it_behaves_like "a simple event notification" end diff --git a/decidim-core/spec/events/decidim/profile_updated_event_spec.rb b/decidim-core/spec/events/decidim/profile_updated_event_spec.rb index cfcace5831a5b..bda7bd08b0716 100644 --- a/decidim-core/spec/events/decidim/profile_updated_event_spec.rb +++ b/decidim-core/spec/events/decidim/profile_updated_event_spec.rb @@ -8,32 +8,12 @@ let(:event_name) { "decidim.events.users.profile_updated" } let(:resource) { create :user } let(:author) { resource } + let(:email_subject) { "@#{resource.nickname} updated their profile" } + let(:email_intro) { "The profile page of #{resource.name} (@#{resource.nickname}), who you are following, has been updated." } + let(:email_outro) { "You have received this notification because you are following @#{resource.nickname}. You can stop receiving notifications following the previous link." } + let(:notification_title) { "The profile page of #{resource.name} (@#{resource.nickname}), who you are following, has been updated." } it_behaves_like "a simple event", true - - describe "email_subject" do - it "is generated correctly" do - expect(subject.email_subject).to eq("@#{resource.nickname} updated their profile") - end - end - - describe "email_intro" do - it "is generated correctly" do - expect(subject.email_intro) - .to eq("The profile page of #{resource.name} (@#{resource.nickname}), who you are following, has been updated.") - end - end - - describe "email_outro" do - it "is generated correctly" do - expect(subject.email_outro) - .to eq("You have received this notification because you are following @#{resource.nickname}. You can stop receiving notifications following the previous link.") - end - end - - describe "notification_title" do - it "is generated correctly" do - expect(subject.notification_title).to include("profile page") - end - end + it_behaves_like "a simple event email" + it_behaves_like "a simple event notification" end diff --git a/decidim-core/spec/events/decidim/user_group_created_event_spec.rb b/decidim-core/spec/events/decidim/user_group_created_event_spec.rb index 9e5bb40ce9133..0fa747008db0f 100644 --- a/decidim-core/spec/events/decidim/user_group_created_event_spec.rb +++ b/decidim-core/spec/events/decidim/user_group_created_event_spec.rb @@ -9,32 +9,12 @@ let(:resource) { create :user_group } let(:user_group_name) { escaped_html(resource.name) } let(:admin_panel_url) { "http://#{organization.host}/admin/user_groups" } + let(:email_subject) { "A new user group has been created" } + let(:email_intro) { %(A new user group has been created with the name #{user_group_name}. You can now verify it in the admin panel.) } + let(:email_outro) { "You have received this notification because you are an admin of the platform." } + let(:notification_title) { %(The #{user_group_name} user group has been created. You can now verify it in the admin panel.) } it_behaves_like "a simple event", true - - describe "email_subject" do - it "is generated correctly" do - expect(subject.email_subject).to eq("A new user group has been created") - end - end - - describe "email_intro" do - it "is generated correctly" do - expect(subject.email_intro) - .to eq(%(A new user group has been created with the name #{user_group_name}. You can now verify it in the admin panel.)) - end - end - - describe "email_outro" do - it "is generated correctly" do - expect(subject.email_outro) - .to eq("You have received this notification because you are an admin of the platform.") - end - end - - describe "notification_title" do - it "is generated correctly" do - expect(subject.notification_title).to include(%(The #{user_group_name} user group has been created. You can now verify it in the admin panel.)) - end - end + it_behaves_like "a simple event email" + it_behaves_like "a simple event notification" end diff --git a/decidim-core/spec/events/decidim/user_group_updated_event_spec.rb b/decidim-core/spec/events/decidim/user_group_updated_event_spec.rb index 81044ed355ae7..da49802f84737 100644 --- a/decidim-core/spec/events/decidim/user_group_updated_event_spec.rb +++ b/decidim-core/spec/events/decidim/user_group_updated_event_spec.rb @@ -9,32 +9,12 @@ let(:resource) { create :user_group } let(:user_group_name) { escaped_html(resource.name) } let(:admin_panel_url) { "http://#{organization.host}/admin/user_groups" } + let(:email_subject) { "A user group has updated its profile" } + let(:email_intro) { %(A user group with the name #{user_group_name} has updated its profile, leaving it unverified. You can now verify it in the admin panel.) } + let(:email_outro) { "You have received this notification because you are an admin of the platform." } + let(:notification_title) { %(The #{user_group_name} user group has updated its profile, leaving it unverified. You can now verify it in the admin panel.) } it_behaves_like "a simple event", true - - describe "email_subject" do - it "is generated correctly" do - expect(subject.email_subject).to eq("A user group has updated its profile") - end - end - - describe "email_intro" do - it "is generated correctly" do - expect(subject.email_intro) - .to eq(%(A user group with the name #{user_group_name} has updated its profile, leaving it unverified. You can now verify it in the admin panel.)) - end - end - - describe "email_outro" do - it "is generated correctly" do - expect(subject.email_outro) - .to eq("You have received this notification because you are an admin of the platform.") - end - end - - describe "notification_title" do - it "is generated correctly" do - expect(subject.notification_title).to include(%(The #{user_group_name} user group has updated its profile, leaving it unverified. You can now verify it in the admin panel.)) - end - end + it_behaves_like "a simple event email" + it_behaves_like "a simple event notification" end diff --git a/decidim-debates/spec/events/decidim/debates/create_debate_event_spec.rb b/decidim-debates/spec/events/decidim/debates/create_debate_event_spec.rb index 3081ed0462c88..56ada2fbd244b 100644 --- a/decidim-debates/spec/events/decidim/debates/create_debate_event_spec.rb +++ b/decidim-debates/spec/events/decidim/debates/create_debate_event_spec.rb @@ -25,75 +25,26 @@ context "when the notification is for user followers" do let(:type) { :user } let(:i18n_scope) { "decidim.events.debates.create_debate_event.user_followers" } + let(:email_subject) { "New debate \"#{decidim_sanitize(debate_title)}\" by @#{author.nickname}" } + let(:email_intro) { "Hi,\n#{author.name} @#{author.nickname}, who you are following, has created a new debate \"#{debate_title}\". Check it out and contribute:" } + let(:email_outro) { "You have received this notification because you are following @#{author.nickname}. You can stop receiving notifications following the previous link." } + let(:notification_title) { "#{author.name} @#{author.nickname} created the #{debate_title} debate." } it_behaves_like "a simple event" - - describe "email_subject" do - it "is generated correctly" do - expect(subject.email_subject).to eq("New debate \"#{decidim_sanitize(debate_title)}\" by @#{author.nickname}") - end - end - - describe "email_intro" do - it "is generated correctly" do - expect(subject.email_intro) - .to eq("Hi,\n#{author.name} @#{author.nickname}, who you are following, has created a new debate \"#{debate_title}\". Check it out and contribute:") - end - end - - describe "email_outro" do - it "is generated correctly" do - expect(subject.email_outro) - .to eq("You have received this notification because you are following @#{author.nickname}. You can stop receiving notifications following the previous link.") - end - end - - describe "notification_title" do - it "is generated correctly" do - expect(subject.notification_title) - .to include("#{author.name} @#{author.nickname}") - - expect(subject.notification_title) - .to include("created the #{debate_title} debate.") - end - end + it_behaves_like "a simple event email" + it_behaves_like "a simple event notification" end context "when the notification is for space followers" do let(:type) { :space } let(:i18n_scope) { "decidim.events.debates.create_debate_event.space_followers" } + let(:email_subject) { "New debate \"#{decidim_sanitize(debate_title)}\" on #{translated(space.title)}" } + let(:email_intro) { "Hi,\nA new debate \"#{debate_title}\" has been created on the #{translated(space.title)} participatory space, check it out and contribute:" } + let(:email_outro) { "You have received this notification because you are following the #{translated(space.title)} participatory space. You can stop receiving notifications following the previous link." } + let(:notification_title) { "The #{debate_title} debate was created on #{translated(space.title)}." } it_behaves_like "a simple event" - - describe "email_subject" do - it "is generated correctly" do - expect(subject.email_subject).to eq("New debate \"#{decidim_sanitize(debate_title)}\" on #{translated(space.title)}") - end - end - - describe "email_intro" do - it "is generated correctly" do - expect(subject.email_intro) - .to eq("Hi,\nA new debate \"#{debate_title}\" has been created on the #{translated(space.title)} participatory space, check it out and contribute:") - end - end - - describe "email_outro" do - it "is generated correctly" do - expect(subject.email_outro) - .to eq("You have received this notification because you are following the #{translated(space.title)} participatory space. " \ - "You can stop receiving notifications following the previous link.") - end - end - - describe "notification_title" do - it "is generated correctly" do - expect(subject.notification_title) - .to include("The #{debate_title} debate was created on ") - - expect(subject.notification_title) - .to include("#{translated(space.title)}.") - end - end + it_behaves_like "a simple event email" + it_behaves_like "a simple event notification" end end diff --git a/decidim-debates/spec/events/decidim/debates/creation_disabled_event_spec.rb b/decidim-debates/spec/events/decidim/debates/creation_disabled_event_spec.rb index 85b6a333e1915..26c953ab793cc 100644 --- a/decidim-debates/spec/events/decidim/debates/creation_disabled_event_spec.rb +++ b/decidim-debates/spec/events/decidim/debates/creation_disabled_event_spec.rb @@ -13,35 +13,14 @@ module Debates let(:resource) { create(:debates_component) } let(:participatory_space) { resource.participatory_space } let(:resource_path) { main_component_path(resource) } + let(:email_subject) { "Debate creation disabled in #{participatory_space_title}" } + let(:email_intro) { "Debate creation is no longer active in #{participatory_space_title}. You can still participate in open debates from this page:" } + let(:email_outro) { "You have received this notification because you are following #{participatory_space_title}. You can stop receiving notifications following the previous link." } + let(:notification_title) { "Debate creation is now disabled in #{participatory_space_title}" } it_behaves_like "a simple event" - - describe "email_subject" do - it "is generated correctly" do - expect(subject.email_subject).to eq("Debate creation disabled in #{participatory_space_title}") - end - end - - describe "email_intro" do - it "is generated correctly" do - expect(subject.email_intro) - .to eq("Debate creation is no longer active in #{participatory_space_title}. You can still participate in open debates from this page:") - end - end - - describe "email_outro" do - it "is generated correctly" do - expect(subject.email_outro) - .to include("You have received this notification because you are following #{participatory_space_title}") - end - end - - describe "notification_title" do - it "is generated correctly" do - expect(subject.notification_title) - .to eq("Debate creation is now disabled in #{participatory_space_title}") - end - end + it_behaves_like "a simple event email" + it_behaves_like "a simple event notification" end end end diff --git a/decidim-debates/spec/events/decidim/debates/creation_enabled_event_spec.rb b/decidim-debates/spec/events/decidim/debates/creation_enabled_event_spec.rb index f6f6690c7a438..9e18f256f55d8 100644 --- a/decidim-debates/spec/events/decidim/debates/creation_enabled_event_spec.rb +++ b/decidim-debates/spec/events/decidim/debates/creation_enabled_event_spec.rb @@ -13,35 +13,14 @@ module Debates let(:resource) { create(:debates_component) } let(:participatory_space) { resource.participatory_space } let(:resource_path) { main_component_path(resource) } + let(:email_subject) { "Debates now available in #{participatory_space.title["en"]}" } + let(:email_intro) { "You can now start new debates in #{participatory_space_title}! Start participating in this page:" } + let(:email_outro) { "You have received this notification because you are following #{participatory_space.title["en"]}. You can stop receiving notifications following the previous link." } + let(:notification_title) { "You can now start new debates in #{participatory_space.title["en"]}" } it_behaves_like "a simple event" - - describe "email_subject" do - it "is generated correctly" do - expect(subject.email_subject).to eq("Debates now available in #{participatory_space.title["en"]}") - end - end - - describe "email_intro" do - it "is generated correctly" do - expect(subject.email_intro) - .to eq("You can now start new debates in #{participatory_space_title}! Start participating in this page:") - end - end - - describe "email_outro" do - it "is generated correctly" do - expect(subject.email_outro) - .to include("You have received this notification because you are following #{participatory_space.title["en"]}") - end - end - - describe "notification_title" do - it "is generated correctly" do - expect(subject.notification_title) - .to eq("You can now start new debates in #{participatory_space.title["en"]}") - end - end + it_behaves_like "a simple event email" + it_behaves_like "a simple event notification" end end end diff --git a/decidim-elections/spec/events/decidim/elections/election_published_event_spec.rb b/decidim-elections/spec/events/decidim/elections/election_published_event_spec.rb index 02b56e1d411e2..ce2934ab7e0b6 100644 --- a/decidim-elections/spec/events/decidim/elections/election_published_event_spec.rb +++ b/decidim-elections/spec/events/decidim/elections/election_published_event_spec.rb @@ -9,33 +9,12 @@ let(:resource) { create(:election) } let(:participatory_space_title) { resource.participatory_space.title["en"] } let(:resource_title) { resource.title["en"] } + let(:email_subject) { "The #{resource_title} election is now active for #{participatory_space_title}." } + let(:email_intro) { "The #{resource_title} election is now active for #{participatory_space_title}. You can see it from this page:" } + let(:email_outro) { "You have received this notification because you are following #{participatory_space_title}. You can stop receiving notifications following the previous link." } + let(:notification_title) { "The #{resource_title} election is now active for #{participatory_space_title}." } it_behaves_like "a simple event" - - describe "email_subject" do - it "is generated correctly" do - expect(subject.email_subject).to eq("The #{resource_title} election is now active for #{participatory_space_title}.") - end - end - - describe "email_intro" do - it "is generated correctly" do - expect(subject.email_intro) - .to eq("The #{resource_title} election is now active for #{participatory_space_title}. You can see it from this page:") - end - end - - describe "email_outro" do - it "is generated correctly" do - expect(subject.email_outro) - .to eq("You have received this notification because you are following #{participatory_space_title}. You can stop receiving notifications following the previous link.") - end - end - - describe "notification_title" do - it "is generated correctly" do - expect(subject.notification_title) - .to eq("The #{resource_title} election is now active for #{participatory_space_title}.") - end - end + it_behaves_like "a simple event email" + it_behaves_like "a simple event notification" end diff --git a/decidim-elections/spec/events/decidim/elections/trustees/notify_new_trustee_event_spec.rb b/decidim-elections/spec/events/decidim/elections/trustees/notify_new_trustee_event_spec.rb index f97f79dee737a..0c4b9ac4c0f48 100644 --- a/decidim-elections/spec/events/decidim/elections/trustees/notify_new_trustee_event_spec.rb +++ b/decidim-elections/spec/events/decidim/elections/trustees/notify_new_trustee_event_spec.rb @@ -10,33 +10,15 @@ let(:participatory_space_title) { resource.title["en"] } let(:resource_title) { resource.title["en"] } let(:trustee_zone_url) { "http://#{resource.organization.host}/trustee" } + let(:email_subject) { "You are a trustee for #{participatory_space_title}." } + let(:email_intro) { "An admin has added you as trustee for #{participatory_space_title}. You should create your public key in your trustee zone" } + let(:email_outro) { "You have received this notification because you have been added as trustee for #{participatory_space_title}." } + let(:notification_title) { <<-EOTITLE.squish } + You have been added to act as a trustee in #{translated(resource.title)} for some elections that will take place in this platform.
+ You will perform tasks as needed. For now, please generate your identification keys. + EOTITLE it_behaves_like "a simple event" - - describe "email_subject" do - it "is generated correctly" do - expect(subject.email_subject).to eq("You are a trustee for #{participatory_space_title}.") - end - end - - describe "email_intro" do - it "is generated correctly" do - expect(subject.email_intro) - .to eq("An admin has added you as trustee for #{participatory_space_title}. You should create your public key in your trustee zone") - end - end - - describe "email_outro" do - it "is generated correctly" do - expect(subject.email_outro) - .to eq("You have received this notification because you've been added as trustee for #{participatory_space_title}.") - end - end - - describe "notification_title" do - it "is generated correctly" do - expect(subject.notification_title) - .to eq("You are a trustee for #{participatory_space_title}.") - end - end + it_behaves_like "a simple event email" + it_behaves_like "a simple event notification" end diff --git a/decidim-elections/spec/events/decidim/elections/trustees/notify_trustee_new_election_event_spec.rb b/decidim-elections/spec/events/decidim/elections/trustees/notify_trustee_new_election_event_spec.rb index f14a0fea24216..6915c00cfaca8 100644 --- a/decidim-elections/spec/events/decidim/elections/trustees/notify_trustee_new_election_event_spec.rb +++ b/decidim-elections/spec/events/decidim/elections/trustees/notify_trustee_new_election_event_spec.rb @@ -8,27 +8,12 @@ let(:event_name) { "decidim.events.elections.trustees.new_election" } let(:resource) { create(:election) } let(:resource_title) { resource.title["en"] } + let(:email_subject) { "You are a trustee for the #{resource_title} election.." } + let(:email_intro) { "You got added as a trustee for the #{resource_title} election." } + let(:email_outro) { "You have received this notification because you have been added as trustee for the #{resource_title} election." } + let(:notification_title) { "You have been selected as a Trustee in Election #{resource_title}. Please, do the key ceremony to set up the election." } it_behaves_like "a simple event" - - describe "email_intro" do - it "is generated correctly" do - expect(subject.email_intro) - .to eq("You got added as a trustee for the #{resource_title} election.") - end - end - - describe "email_outro" do - it "is generated correctly" do - expect(subject.email_outro) - .to eq("You have received this notification because you've been added as trustee for the #{resource_title} election.") - end - end - - describe "notification_title" do - it "is generated correctly" do - expect(subject.notification_title) - .to eq("You are a trustee for #{resource_title} election.") - end - end + it_behaves_like "a simple event email" + it_behaves_like "a simple event notification" end diff --git a/decidim-elections/spec/events/decidim/elections/votes/vote_accepted_event_spec.rb b/decidim-elections/spec/events/decidim/elections/votes/vote_accepted_event_spec.rb index 70022ac2279b9..779ceed39ae60 100644 --- a/decidim-elections/spec/events/decidim/elections/votes/vote_accepted_event_spec.rb +++ b/decidim-elections/spec/events/decidim/elections/votes/vote_accepted_event_spec.rb @@ -12,33 +12,12 @@ let(:encrypted_vote_hash) { vote.encrypted_vote_hash } let(:resource_name) { resource.title["en"] } let(:verify_url) { Decidim::EngineRouter.main_proxy(resource.component).election_vote_verify_url(resource, vote_id: encrypted_vote_hash) } + let(:email_subject) { "Your vote for #{resource_name} was accepted." } + let(:email_intro) { "Your vote was accepted! Using your voting token: #{encrypted_vote_hash}, you can verify your vote here." } + let(:email_outro) { "You have received this notification because you have voted for the #{resource_name} election." } + let(:notification_title) { "Your vote was accepted. Verify your vote here using your vote token: #{encrypted_vote_hash}" } it_behaves_like "a simple event" - - describe "email_subject" do - it "is generated correctly" do - expect(subject.email_subject).to eq("Your vote for #{resource_name} was accepted.") - end - end - - describe "email_intro" do - it "is generated correctly" do - expect(subject.email_intro) - .to eq("Your vote was accepted! Using your voting token: #{encrypted_vote_hash}, you can verify your vote here.") - end - end - - describe "email_outro" do - it "is generated correctly" do - expect(subject.email_outro) - .to eq("You have received this notification because you've voted for the #{resource_name} election.") - end - end - - describe "notification_title" do - it "is generated correctly" do - expect(subject.notification_title) - .to eq("Your vote was accepted. Verify your vote here using your vote token: #{encrypted_vote_hash}") - end - end + it_behaves_like "a simple event email" + it_behaves_like "a simple event notification" end diff --git a/decidim-elections/spec/events/decidim/votings/polling_officers/polling_station_assigned_event_spec.rb b/decidim-elections/spec/events/decidim/votings/polling_officers/polling_station_assigned_event_spec.rb index a83e63be13568..b895058402d3e 100644 --- a/decidim-elections/spec/events/decidim/votings/polling_officers/polling_station_assigned_event_spec.rb +++ b/decidim-elections/spec/events/decidim/votings/polling_officers/polling_station_assigned_event_spec.rb @@ -20,35 +20,14 @@ module PollingOfficers let(:voting_path) { "/votings/#{voting.slug}?voting_slug=#{voting.slug}" } let(:voting_url) { "http://#{organization.host}:#{Capybara.server_port}#{voting_path}" } let(:polling_officer_zone_url) { "http://#{organization.host}/polling_officers" } + let(:email_subject) { "You are Manager of the Polling Station #{polling_station_name}." } + let(:email_intro) { "You have been assigned as Manager of the Polling Station #{polling_station_name} in #{voting_title}. You can manage the Polling Station from the dedicated Polling Officer Zone." } + let(:email_outro) { "You have received this notification because you have been assigned as Manager of #{polling_station_name}." } + let(:notification_title) { "You are Manager of the Polling Station #{polling_station_name} in the voting #{voting_title}." } it_behaves_like "a simple event" - - describe "email_subject" do - it "is generated correctly" do - expect(subject.email_subject).to eq("You are Manager of the Polling Station #{polling_station_name}.") - end - end - - describe "email_intro" do - it "is generated correctly" do - expect(subject.email_intro) - .to eq("You have been assigned as Manager of the Polling Station #{polling_station_name} in #{voting_title}. You can manage the Polling Station from the dedicated Polling Officer Zone.") - end - end - - describe "email_outro" do - it "is generated correctly" do - expect(subject.email_outro) - .to eq("You have received this notification because you have been assigned as Manager of #{polling_station_name}.") - end - end - - describe "notification_title" do - it "is generated correctly" do - expect(subject.notification_title) - .to eq("You are Manager of the Polling Station #{polling_station_name} in the voting #{voting_title}.") - end - end + it_behaves_like "a simple event email" + it_behaves_like "a simple event notification" end end end diff --git a/decidim-initiatives/spec/events/decidim/initiatives/admin/initiative_sent_to_technical_validation_event_spec.rb b/decidim-initiatives/spec/events/decidim/initiatives/admin/initiative_sent_to_technical_validation_event_spec.rb index 97fd53225d7af..54fde99186bc4 100644 --- a/decidim-initiatives/spec/events/decidim/initiatives/admin/initiative_sent_to_technical_validation_event_spec.rb +++ b/decidim-initiatives/spec/events/decidim/initiatives/admin/initiative_sent_to_technical_validation_event_spec.rb @@ -7,34 +7,14 @@ let(:event_name) { "decidim.events.initiatives.admin.initiative_sent_to_technical_validation" } let(:admin_initiative_path) { "/admin/initiatives/#{resource.slug}/edit?initiative_slug=#{resource.slug}" } let(:admin_initiative_url) { "http://#{organization.host}#{admin_initiative_path}" } + let!(:initiative_title) { decidim_html_escape(resource_title) } + let(:email_subject) { "Initiative \"#{decidim_sanitize(resource_title)}\" was sent to technical validation." } + let(:email_intro) { %(The initiative "#{initiative_title}" has been sent to technical validation. Check it out at the admin panel) } + let(:email_outro) { "You have received this notification because you are an admin of the platform." } + let(:notification_title) { %(The initiative "#{initiative_title}" has been sent to technical validation. Check it out at the admin panel) } include_context "when a simple event" it_behaves_like "a simple event" - - describe "email_subject" do - it "is generated correctly" do - expect(subject.email_subject).to eq("Initiative \"#{resource_title}\" was sent to technical validation.") - end - end - - describe "email_intro" do - it "is generated correctly" do - expect(subject.email_intro) - .to eq(%(The initiative "#{resource_title}" has been sent to technical validation. Check it out at the admin panel)) - end - end - - describe "email_outro" do - it "is generated correctly" do - expect(subject.email_outro) - .to eq("You have received this notification because you are an admin of the platform.") - end - end - - describe "notification_title" do - it "is generated correctly" do - expect(subject.notification_title) - .to include(%(The initiative "#{resource_title}" has been sent to technical validation. Check it out at the admin panel)) - end - end + it_behaves_like "a simple event email" + it_behaves_like "a simple event notification" end diff --git a/decidim-initiatives/spec/events/decidim/initiatives/create_initiative_event_spec.rb b/decidim-initiatives/spec/events/decidim/initiatives/create_initiative_event_spec.rb index 4313e01150237..7dea2baf5ff80 100644 --- a/decidim-initiatives/spec/events/decidim/initiatives/create_initiative_event_spec.rb +++ b/decidim-initiatives/spec/events/decidim/initiatives/create_initiative_event_spec.rb @@ -13,6 +13,13 @@ let(:event_name) { "decidim.events.initiatives.initiative_created" } let(:user) { create :user, organization: organization } let(:resource_path) { resource_locator(initiative).path } + let(:email_subject) { "New initiative by @#{initiative_author.nickname}" } + let(:email_intro) { "#{initiative_author.name} @#{initiative_author.nickname}, who you are following, has created a new initiative, check it out and contribute:" } + let(:email_outro) { "You have received this notification because you are following @#{initiative_author.nickname}. You can stop receiving notifications following the previous link." } + let(:notification_title) { "The #{initiative.title["en"]} initiative was created by #{initiative_author.name} @#{initiative_author.nickname}." } + + it_behaves_like "a simple event email" + it_behaves_like "a simple event notification" describe "types" do subject { described_class } @@ -25,33 +32,4 @@ expect(subject.types).to include :email end end - - describe "email_subject" do - it "is generated correctly" do - expect(subject.email_subject).to eq("New initiative by @#{initiative_author.nickname}") - end - end - - describe "email_intro" do - it "is generated correctly" do - expect(subject.email_intro).to eq("#{initiative_author.name} @#{initiative_author.nickname}, who you are following, has created a new initiative, check it out and contribute:") - end - end - - describe "email_outro" do - it "is generated correctly" do - expect(subject.email_outro) - .to eq("You have received this notification because you are following @#{initiative_author.nickname}. You can stop receiving notifications following the previous link.") - end - end - - describe "notification_title" do - it "is generated correctly" do - expect(subject.notification_title) - .to include("The #{initiative.title["en"]} initiative was created by ") - - expect(subject.notification_title) - .to include("#{initiative_author.name} @#{initiative_author.nickname}.") - end - end end diff --git a/decidim-initiatives/spec/events/decidim/initiatives/initiative_sent_to_technical_validation_event_spec.rb b/decidim-initiatives/spec/events/decidim/initiatives/initiative_sent_to_technical_validation_event_spec.rb index 6ac214274d2cb..8c5ae5591e8c9 100644 --- a/decidim-initiatives/spec/events/decidim/initiatives/initiative_sent_to_technical_validation_event_spec.rb +++ b/decidim-initiatives/spec/events/decidim/initiatives/initiative_sent_to_technical_validation_event_spec.rb @@ -7,34 +7,13 @@ let(:event_name) { "decidim.events.initiatives.initiative_sent_to_technical_validation" } let(:admin_initiative_path) { "/admin/initiatives/#{resource.slug}/edit?initiative_slug=#{resource.slug}" } let(:admin_initiative_url) { "http://#{organization.host}#{admin_initiative_path}" } + let(:email_subject) { "Initiative \"#{decidim_sanitize(resource_title)}\" was sent to technical validation." } + let(:email_outro) { "You have received this notification because you are an admin of the platform." } + let(:email_intro) { %(The initiative "#{decidim_html_escape(resource_title)}" has been sent to technical validation. Check it out at the admin panel) } + let(:notification_title) { %(The initiative "#{decidim_html_escape(resource_title)}" has been sent to technical validation. Check it out at the admin panel) } include_context "when a simple event" it_behaves_like "a simple event" - - describe "email_subject" do - it "is generated correctly" do - expect(subject.email_subject).to eq("Initiative \"#{resource_title}\" was sent to technical validation.") - end - end - - describe "email_intro" do - it "is generated correctly" do - expect(subject.email_intro) - .to eq(%(The initiative "#{resource_title}" has been sent to technical validation. Check it out at the admin panel)) - end - end - - describe "email_outro" do - it "is generated correctly" do - expect(subject.email_outro) - .to eq("You have received this notification because you are an admin of the platform.") - end - end - - describe "notification_title" do - it "is generated correctly" do - expect(subject.notification_title) - .to include(%(The initiative "#{resource_title}" has been sent to technical validation. Check it out at the admin panel)) - end - end + it_behaves_like "a simple event email" + it_behaves_like "a simple event notification" end diff --git a/decidim-surveys/spec/events/decidim/surveys/closed_survey_event_spec.rb b/decidim-surveys/spec/events/decidim/surveys/closed_survey_event_spec.rb index e1b01e3afab9c..7b35352c6b732 100644 --- a/decidim-surveys/spec/events/decidim/surveys/closed_survey_event_spec.rb +++ b/decidim-surveys/spec/events/decidim/surveys/closed_survey_event_spec.rb @@ -13,37 +13,14 @@ module Surveys let(:resource) { create(:surveys_component) } let(:participatory_space) { resource.participatory_space } let(:resource_path) { main_component_path(resource) } + let(:email_subject) { "A survey has finished in #{participatory_space_title}" } + let(:email_intro) { "The survey #{resource.name["en"]} in #{participatory_space_title} has been closed." } + let(:email_outro) { "You have received this notification because you are following #{participatory_space_title}. You can stop receiving notifications following the previous link." } + let(:notification_title) { "The survey #{resource.name["en"]} in #{participatory_space_title} has finished." } it_behaves_like "a simple event" - - describe "email_subject" do - it "is generated correctly" do - expect(subject.email_subject).to eq("A survey has finished in #{participatory_space_title}") - end - end - - describe "email_intro" do - it "is generated correctly" do - expect(subject.email_intro) - .to eq("The survey #{resource.name["en"]} in #{participatory_space_title} has been closed.") - end - end - - describe "email_outro" do - it "is generated correctly" do - expect(subject.email_outro) - .to include("You have received this notification because you are following #{participatory_space_title}") - end - end - - describe "notification_title" do - it "is generated correctly" do - expect(subject.notification_title) - .to start_with("The survey #{resource.name["en"]} in") - expect(subject.notification_title) - .to end_with("#{participatory_space_title} has finished.") - end - end + it_behaves_like "a simple event email" + it_behaves_like "a simple event notification" end end end diff --git a/decidim-surveys/spec/events/decidim/surveys/opened_survey_event_spec.rb b/decidim-surveys/spec/events/decidim/surveys/opened_survey_event_spec.rb index b626ad11a1c6b..9d2a3e5ecde84 100644 --- a/decidim-surveys/spec/events/decidim/surveys/opened_survey_event_spec.rb +++ b/decidim-surveys/spec/events/decidim/surveys/opened_survey_event_spec.rb @@ -13,35 +13,14 @@ module Surveys let(:resource) { create(:surveys_component) } let(:participatory_space) { resource.participatory_space } let(:resource_path) { main_component_path(resource) } + let(:email_subject) { "A new survey in #{participatory_space_title}" } + let(:email_intro) { "The survey #{resource.name["en"]} in #{participatory_space_title} is now open. You can participate in it from this page:" } + let(:email_outro) { "You have received this notification because you are following #{participatory_space_title}. You can stop receiving notifications following the previous link." } + let(:notification_title) { "The survey #{resource.name["en"]} in #{participatory_space_title} is now open." } it_behaves_like "a simple event" - - describe "email_subject" do - it "is generated correctly" do - expect(subject.email_subject).to eq("A new survey in #{participatory_space_title}") - end - end - - describe "email_intro" do - it "is generated correctly" do - expect(subject.email_intro) - .to eq("The survey #{resource.name["en"]} in #{participatory_space_title} is now open. You can participate in it from this page:") - end - end - - describe "email_outro" do - it "is generated correctly" do - expect(subject.email_outro) - .to include("You have received this notification because you are following #{participatory_space_title}") - end - end - - describe "notification_title" do - it "is generated correctly" do - expect(subject.notification_title) - .to eq("The survey #{resource.name["en"]} in #{participatory_space_title} is now open.") - end - end + it_behaves_like "a simple event email" + it_behaves_like "a simple event notification" end end end From c0fac7ec9c9c0cdf0e9ccbd92cb1bbc3482fd5fd Mon Sep 17 00:00:00 2001 From: Alexandru Emil Lupu Date: Tue, 27 Feb 2024 13:49:34 +0200 Subject: [PATCH 03/88] Backport 'Implement push notifications for conversations' messages' to v0.27 (#12511) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Implement push notifications for conversations' messages * Refactor variables definitions in SendPushNotification spec * Add spec for ConversationMailer It also adds the factories to ease-up the specs * Extract ConversationMailer methods to HasConversation concern * Add PushNotificationMessage model * Implement push notifications for conversations' messages * Fix spec * Simplify PushNotificationMessage model by removing useless attributes * Fix url and icon methods in PushNotificationMessage As a bonus, there are more examples in the spec. * Add missing class in yardoc * Clarify signature * Use more idiomatic way of checking for presence Co-authored-by: Alexandru Emil Lupu * Move module inclusion to the top for consistency Co-authored-by: Alexandru Emil Lupu * Add skip_injection on factory definition Co-authored-by: Alexandru Emil Lupu * Use alias_method for :user * Fix rubocop offenses --------- Co-authored-by: Alexandru Emil Lupu * Running linters * Add missing methods * Fix failing specs * Run Linter * Fix failing specs * Apply suggestions from code review Co-authored-by: Andrés Pereira de Lucena * Update decidim-core/lib/decidim/core/test/factories.rb Co-authored-by: Andrés Pereira de Lucena --------- Co-authored-by: Andrés Pereira de Lucena --- .../messaging/reply_to_conversation.rb | 3 + .../decidim/messaging/start_conversation.rb | 3 + .../decidim/messaging/conversation_mailer.rb | 75 +---- .../decidim/push_notification_message.rb | 39 +++ .../push_notification_message_sender.rb | 36 +++ .../decidim/send_push_notification.rb | 30 +- decidim-core/lib/decidim/core.rb | 1 + .../lib/decidim/core/test/factories.rb | 78 ++++- decidim-core/lib/decidim/has_conversations.rb | 91 ++++++ .../messaging/conversation_mailer_spec.rb | 97 ++++++ .../decidim/push_notification_message_spec.rb | 53 ++++ .../push_notification_message_sender_spec.rb | 85 ++++++ .../decidim/send_push_notification_spec.rb | 276 +++++++++--------- 13 files changed, 652 insertions(+), 215 deletions(-) create mode 100644 decidim-core/app/models/decidim/push_notification_message.rb create mode 100644 decidim-core/app/services/decidim/push_notification_message_sender.rb create mode 100644 decidim-core/lib/decidim/has_conversations.rb create mode 100644 decidim-core/spec/mailers/messaging/conversation_mailer_spec.rb create mode 100644 decidim-core/spec/models/decidim/push_notification_message_spec.rb create mode 100644 decidim-core/spec/services/decidim/push_notification_message_sender_spec.rb diff --git a/decidim-core/app/commands/decidim/messaging/reply_to_conversation.rb b/decidim-core/app/commands/decidim/messaging/reply_to_conversation.rb index c3f88f7c8e3c7..b9fa574856c7d 100644 --- a/decidim-core/app/commands/decidim/messaging/reply_to_conversation.rb +++ b/decidim-core/app/commands/decidim/messaging/reply_to_conversation.rb @@ -54,11 +54,13 @@ def notify_interlocutors notify(manager) do ConversationMailer.new_group_message(sender, manager, conversation, message, recipient).deliver_later end + Decidim::PushNotificationMessageSender.new.new_group_message(sender, manager, conversation, message, recipient).deliver end else notify(recipient) do ConversationMailer.new_message(sender, recipient, conversation, message).deliver_later end + Decidim::PushNotificationMessageSender.new.new_message(sender, recipient, conversation, message).deliver end end end @@ -68,6 +70,7 @@ def notify_comanagers notify(recipient) do ConversationMailer.comanagers_new_message(sender, recipient, conversation, message, form.context.current_user).deliver_later end + Decidim::PushNotificationMessageSender.new.comanagers_new_message(sender, recipient, conversation, message, form.context.current_user).deliver end end diff --git a/decidim-core/app/commands/decidim/messaging/start_conversation.rb b/decidim-core/app/commands/decidim/messaging/start_conversation.rb index 90125cfe8f024..c924e8adfd775 100644 --- a/decidim-core/app/commands/decidim/messaging/start_conversation.rb +++ b/decidim-core/app/commands/decidim/messaging/start_conversation.rb @@ -54,11 +54,13 @@ def notify_interlocutors notify(manager) do ConversationMailer.new_group_conversation(originator, manager, conversation, recipient).deliver_later end + Decidim::PushNotificationMessageSender.new.new_group_conversation(originator, manager, conversation, recipient).deliver end else notify(recipient) do ConversationMailer.new_conversation(originator, recipient, conversation).deliver_later end + Decidim::PushNotificationMessageSender.new.new_conversation(originator, recipient, conversation).deliver end end end @@ -68,6 +70,7 @@ def notify_comanagers notify(recipient) do ConversationMailer.comanagers_new_conversation(originator, recipient, conversation, form.context.current_user).deliver_later end + Decidim::PushNotificationMessageSender.new.comanagers_new_conversation(originator, recipient, conversation, form.context.current_user).deliver end end diff --git a/decidim-core/app/mailers/decidim/messaging/conversation_mailer.rb b/decidim-core/app/mailers/decidim/messaging/conversation_mailer.rb index dccaaee188fd4..36febdd2b4d1c 100644 --- a/decidim-core/app/mailers/decidim/messaging/conversation_mailer.rb +++ b/decidim-core/app/mailers/decidim/messaging/conversation_mailer.rb @@ -5,74 +5,12 @@ module Messaging # A custom mailer for sending notifications to users when they receive # private messages class ConversationMailer < Decidim::ApplicationMailer - def new_conversation(originator, user, conversation) - notification_mail( - from: originator, - to: user, - conversation: conversation, - message: conversation.messages.first.body, - action: "new_conversation" - ) - end - - def new_group_conversation(originator, manager, conversation, group) - notification_mail( - from: originator, - to: manager, - conversation: conversation, - message: conversation.messages.first.body, - action: "new_group_conversation", - third_party: group - ) - end - - def comanagers_new_conversation(group, user, conversation, manager) - notification_mail( - from: group, - to: user, - conversation: conversation, - message: conversation.messages.first.body, - action: "comanagers_new_conversation", - third_party: manager - ) - end - - def new_message(sender, user, conversation, message) - notification_mail( - from: sender, - to: user, - conversation: conversation, - message: message.body, - action: "new_message" - ) - end - - def new_group_message(sender, user, conversation, message, group) - notification_mail( - from: sender, - to: user, - conversation: conversation, - message: message.body, - action: "new_group_message", - third_party: group - ) - end - - def comanagers_new_message(sender, user, conversation, message, manager) - notification_mail( - from: sender, - to: user, - conversation: conversation, - message: message.body, - action: "comanagers_new_message", - third_party: manager - ) - end + include HasConversations private # rubocop:disable Metrics/ParameterLists - def notification_mail(from:, to:, conversation:, action:, message: nil, third_party: nil) + def send_notification(from:, to:, conversation:, action:, message: nil, third_party: nil) with_user(to) do @organization = to.organization @conversation = conversation @@ -81,14 +19,7 @@ def notification_mail(from:, to:, conversation:, action:, message: nil, third_pa @third_party = third_party @message = message @host = @organization.host - - subject = I18n.t( - "conversation_mailer.#{action}.subject", - scope: "decidim.messaging", - sender: @sender.name, - manager: @third_party&.name, - group: @third_party&.name - ) + subject = get_subject(action: action, sender: @sender, third_party: @third_party) mail(to: to.email, subject: subject) end diff --git a/decidim-core/app/models/decidim/push_notification_message.rb b/decidim-core/app/models/decidim/push_notification_message.rb new file mode 100644 index 0000000000000..2ca46ae6cceb9 --- /dev/null +++ b/decidim-core/app/models/decidim/push_notification_message.rb @@ -0,0 +1,39 @@ +# frozen_string_literal: true + +module Decidim + # A messsage from a conversation that will be sent as a push notification + class PushNotificationMessage + class InvalidActionError < StandardError; end + + include SanitizeHelper + include Decidim::TranslatableAttributes + + def initialize(recipient:, conversation:, message:) + @recipient = recipient + @conversation = conversation + @message = message + end + + attr_reader :recipient, :conversation, :message + + alias user recipient + + def body + decidim_html_escape(translated_attribute(message)) + end + + def icon + organization.attached_uploader(:favicon).variant_url(:big, host: organization.host) + end + + def url + EngineRouter.new("decidim", {}).public_send(:conversation_path, host: organization.host, id: @conversation) + end + + private + + def organization + @organization ||= recipient.organization + end + end +end diff --git a/decidim-core/app/services/decidim/push_notification_message_sender.rb b/decidim-core/app/services/decidim/push_notification_message_sender.rb new file mode 100644 index 0000000000000..b22e8b6c75bd4 --- /dev/null +++ b/decidim-core/app/services/decidim/push_notification_message_sender.rb @@ -0,0 +1,36 @@ +# frozen_string_literal: true + +module Decidim + # A wrapper for preparing push notifications messages from conversations + # It respects the same contract as the Decidim::Messaging::ConversationMailer + class PushNotificationMessageSender + include HasConversations + + def deliver + SendPushNotification.new.perform(@notification, title) + end + + private + + # rubocop:disable Metrics/ParameterLists + # rubocop:disable Lint/UnusedMethodArgument + # + # There are some parameters thar are not used in the method, but they are needed to + # keep the same contract as the Decidim::Messaging::ConversationMailer + def send_notification(from:, to:, conversation:, action:, message: nil, third_party: nil) + @action = action + @sender = to + @third_party = third_party + + @notification = PushNotificationMessage.new(recipient: to, conversation: conversation, message: message) + + self + end + # rubocop:enable Lint/UnusedMethodArgument + # rubocop:enable Metrics/ParameterLists + + def title + get_subject(action: @action, sender: @sender, third_party: @third_party) + end + end +end diff --git a/decidim-core/app/services/decidim/send_push_notification.rb b/decidim-core/app/services/decidim/send_push_notification.rb index 8d3d8f437ef27..7e4f692735a1c 100644 --- a/decidim-core/app/services/decidim/send_push_notification.rb +++ b/decidim-core/app/services/decidim/send_push_notification.rb @@ -14,14 +14,19 @@ class SendPushNotification # Send the push notification. Returns `nil` if the user didn't allowed push notifications # or if the subscription to push notifications doesn't exist # - # Returns the result of the dispatch or nil if user or subscription are empty - def perform(notification) + # @param notification [Decidim::Notification, Decidim::PushNotificationMessage] the notification to be sent + # @param title [String] the title of the notification. Optional. + # + # @return [Array, nil] the result of the dispatch or nil if user or subscription are empty + def perform(notification, title = nil) return unless Rails.application.secrets.dig(:vapid, :enabled) + raise ArgumentError, "Need to provide a title if the notification is a PushNotificationMessage" if notification.is_a?(Decidim::PushNotificationMessage) && title.nil? + + user = notification.user - I18n.with_locale(notification.user.locale || notification.user.organization.default_locale) do - notification.user.notifications_subscriptions.values.map do |subscription| - message_params = notification_params(Decidim::PushNotificationPresenter.new(notification)) - payload = build_payload(message_params, subscription) + I18n.with_locale(user.locale || user.organization.default_locale) do + user.notifications_subscriptions.values.map do |subscription| + payload = build_payload(message_params(notification, title), subscription) # Capture webpush exceptions in order to avoid this call to be repeated by the background job runner # Webpush::Error class is the parent class of all defined errors begin @@ -36,9 +41,18 @@ def perform(notification) private - def notification_params(notification) + def message_params(notification, title = nil) + case notification + when Decidim::PushNotificationMessage + notification_params(notification, title) + else # when Decidim::Notification + notification_params(Decidim::PushNotificationPresenter.new(notification)) + end + end + + def notification_params(notification, title = nil) { - title: notification.title, + title: title.presence || notification.title, body: notification.body, icon: notification.icon, data: { url: notification.url } diff --git a/decidim-core/lib/decidim/core.rb b/decidim-core/lib/decidim/core.rb index 9fb7e87141fcc..0e43713952924 100644 --- a/decidim-core/lib/decidim/core.rb +++ b/decidim-core/lib/decidim/core.rb @@ -114,6 +114,7 @@ module Decidim autoload :ControllerHelpers, "decidim/controller_helpers" autoload :ProcessesFileLocally, "decidim/processes_file_locally" autoload :DependencyResolver, "decidim/dependency_resolver" + autoload :HasConversations, "decidim/has_conversations" include ActiveSupport::Configurable # Loads seeds from all engines. diff --git a/decidim-core/lib/decidim/core/test/factories.rb b/decidim-core/lib/decidim/core/test/factories.rb index f039022a14929..3f875e338c2dd 100644 --- a/decidim-core/lib/decidim/core/test/factories.rb +++ b/decidim-core/lib/decidim/core/test/factories.rb @@ -8,8 +8,39 @@ require "decidim/assemblies/test/factories" require "decidim/comments/test/factories" -def generate_localized_title - Decidim::Faker::Localized.localized { generate(:title) } +def generate_component_name(locales, manifest_name, skip_injection: false) + prepend = skip_injection ? "" : "" + + Decidim::Components::Namer.new(locales, manifest_name).i18n_name.transform_values { |v| [prepend, v].compact_blank.join(" ") } +end + +def generate_localized_description(field = nil, skip_injection: false, before: "

", after: "

") + Decidim::Faker::Localized.wrapped(before, after) do + generate_localized_title(field, skip_injection: skip_injection) + end +end + +def generate_localized_word(field = nil, skip_injection: false) + skip_injection = true if field.nil? + Decidim::Faker::Localized.localized do + if skip_injection + Faker::Lorem.word + else + " #{Faker::Lorem.word}" + end + end +end + +def generate_localized_title(field = nil, skip_injection: false) + skip_injection = true if field.nil? + + Decidim::Faker::Localized.localized do + if skip_injection + generate(:title) + else + " #{generate(:title)}" + end + end end FactoryBot.define do @@ -629,6 +660,49 @@ def generate_localized_title end end + factory :conversation, class: "Decidim::Messaging::Conversation" do + transient do + skip_injection { false } + end + + originator { build(:user) } + interlocutors { [build(:user)] } + body { Faker::Lorem.sentence } + user + + after(:create) do |object| + object.participants ||= [originator + interlocutors].flatten + end + + initialize_with { Decidim::Messaging::Conversation.start(originator: originator, interlocutors: interlocutors, body: body, user: user) } + end + + factory :message, class: "Decidim::Messaging::Message" do + transient do + skip_injection { false } + end + + body { generate_localized_description(:message_body) } + conversation + + before(:create) do |object| + object.sender ||= object.conversation.participants.take + end + end + + factory :push_notification_message, class: "Decidim::PushNotificationMessage" do + transient do + skip_injection { false } + end + + recipient { build(:user) } + conversation { create(:conversation) } + message { generate_localized_description(:push_notification_message_message) } + + skip_create + initialize_with { Decidim::PushNotificationMessage.new(recipient: recipient, conversation: conversation, message: message) } + end + factory :action_log, class: "Decidim::ActionLog" do transient do extra_data { {} } diff --git a/decidim-core/lib/decidim/has_conversations.rb b/decidim-core/lib/decidim/has_conversations.rb new file mode 100644 index 0000000000000..f27bc661a17cb --- /dev/null +++ b/decidim-core/lib/decidim/has_conversations.rb @@ -0,0 +1,91 @@ +# frozen_string_literal: true + +require "active_support/concern" + +module Decidim + module HasConversations + extend ActiveSupport::Concern + + included do + def new_conversation(originator, user, conversation) + send_notification( + from: originator, + to: user, + conversation: conversation, + message: conversation.messages.first.body, + action: "new_conversation" + ) + end + + def new_group_conversation(originator, manager, conversation, group) + send_notification( + from: originator, + to: manager, + conversation: conversation, + message: conversation.messages.first.body, + action: "new_group_conversation", + third_party: group + ) + end + + def comanagers_new_conversation(group, user, conversation, manager) + send_notification( + from: group, + to: user, + conversation: conversation, + message: conversation.messages.first.body, + action: "comanagers_new_conversation", + third_party: manager + ) + end + + def new_message(sender, user, conversation, message) + send_notification( + from: sender, + to: user, + conversation: conversation, + message: message.body, + action: "new_message" + ) + end + + def new_group_message(sender, user, conversation, message, group) + send_notification( + from: sender, + to: user, + conversation: conversation, + message: message.body, + action: "new_group_message", + third_party: group + ) + end + + def comanagers_new_message(sender, user, conversation, message, manager) + send_notification( + from: sender, + to: user, + conversation: conversation, + message: message.body, + action: "comanagers_new_message", + third_party: manager + ) + end + + private + + def get_subject(action:, sender:, third_party:) + I18n.t( + "conversation_mailer.#{action}.subject", + scope: "decidim.messaging", + sender: sender.name, + manager: third_party&.name, + group: third_party&.name + ) + end + + def send_notification + raise NotImplementedError, "You must define a send_notification method" + end + end + end +end diff --git a/decidim-core/spec/mailers/messaging/conversation_mailer_spec.rb b/decidim-core/spec/mailers/messaging/conversation_mailer_spec.rb new file mode 100644 index 0000000000000..531b9e5ed0713 --- /dev/null +++ b/decidim-core/spec/mailers/messaging/conversation_mailer_spec.rb @@ -0,0 +1,97 @@ +# frozen_string_literal: true + +require "spec_helper" + +module Decidim + module Messaging + describe ConversationMailer do + include Decidim::TranslatableAttributes + include Decidim::SanitizeHelper + let(:organization) { create(:organization) } + let(:conversation) { create(:conversation) } + let(:group) { create(:user_group, organization: organization, users: [manager]) } + let(:manager) { create(:user, organization: organization) } + let(:message) { create(:message) } + let(:originator) { create(:user, organization: organization) } + let(:sender) { create(:user, organization: organization) } + let(:user) { create(:user, organization: organization) } + let(:router) { Decidim::Core::Engine.routes.url_helpers } + + shared_examples "conversation mail" do + it "gets the subject" do + expect(subject.subject).to eq(mail_subject) + end + + it "delivers the email to the user" do + expect(subject.to).to eq(recipient) + end + + it "includes the organization data" do + expect(subject.body).to include(user.organization.name) + end + + it "includes the message" do + expect(subject.body).to include(mail_message_body) + end + + it "includes the conversation link" do + expect(subject.body).to include(router.conversation_path(conversation)) + end + end + + describe ".new_conversation" do + subject { described_class.new_conversation(originator, user, conversation) } + let(:mail_subject) { "#{originator.name} has started a conversation with you" } + let(:mail_message_body) { conversation.messages.first.body } + let(:recipient) { [user.email] } + + it_behaves_like "conversation mail" + end + + describe ".new_group_conversation" do + subject { described_class.new_group_conversation(originator, manager, conversation, group) } + let(:mail_subject) { "#{originator.name} has started a conversation with #{group.name}" } + let(:mail_message_body) { conversation.messages.first.body } + let(:recipient) { [manager.email] } + + it_behaves_like "conversation mail" + end + + describe ".comanagers_new_conversation" do + subject { described_class.comanagers_new_conversation(group, user, conversation, manager) } + let(:mail_subject) { "#{manager.name} has started a new conversation as a #{manager.name}" } + let(:mail_message_body) { conversation.messages.first.body } + let(:recipient) { [user.email] } + + it_behaves_like "conversation mail" + end + + describe ".new_message" do + subject { described_class.new_message(sender, user, conversation, message) } + let(:mail_subject) { "You have new messages from #{sender.name}" } + let(:mail_message_body) { decidim_html_escape(translated_attribute(message.body)) } + let(:recipient) { [user.email] } + + it_behaves_like "conversation mail" + end + + describe ".new_group_message" do + subject { described_class.new_group_message(sender, user, conversation, message, group) } + let(:mail_subject) { "#{group.name} have new messages from #{sender.name}" } + let(:mail_message_body) { decidim_html_escape(translated_attribute(message.body)) } + let(:recipient) { [user.email] } + + it_behaves_like "conversation mail" + end + + describe ".comanagers_new_message" do + subject { described_class.comanagers_new_message(sender, user, conversation, message, manager) } + let(:mail_subject) { "#{manager.name} has send new messages as a #{manager.name}" } + let(:mail_message_body) { decidim_html_escape(translated_attribute(message.body)) } + let(:recipient) { [user.email] } + + it_behaves_like "conversation mail" + end + end + end +end diff --git a/decidim-core/spec/models/decidim/push_notification_message_spec.rb b/decidim-core/spec/models/decidim/push_notification_message_spec.rb new file mode 100644 index 0000000000000..e39d6f88797ef --- /dev/null +++ b/decidim-core/spec/models/decidim/push_notification_message_spec.rb @@ -0,0 +1,53 @@ +# frozen_string_literal: true + +require "spec_helper" + +module Decidim + describe PushNotificationMessage do + subject { push_notification_message } + include Decidim::TranslatableAttributes + include Decidim::SanitizeHelper + + let(:organization) { build(:organization, favicon: favicon) } + let(:conversation) { create(:conversation) } + let(:recipient) { build(:user, organization: organization) } + let(:favicon) { nil } + let(:push_notification_message) { build(:push_notification_message, recipient: recipient, conversation: conversation) } + + describe "#body" do + it "returns the message body" do + expect(subject.body).to eq(decidim_html_escape(translated_attribute(subject.message))) + end + end + + describe "#user" do + it "returns the recipient" do + expect(subject.user).to eq(subject.recipient) + end + end + + describe "#icon" do + context "when there is not a a favicon" do + let(:favicon) { nil } + + it "returns the organization's favicon" do + expect(subject.icon).to be_nil + end + end + + context "when there is a favicon" do + let(:favicon) { Decidim::Dev.test_file("icon.png", "image/png") } + + it "returns the organization's favicon" do + expect(subject.icon).to start_with("http://") + end + end + end + + describe "#url" do + it "returns the conversation url" do + expect(subject.url).to eq("/conversations/#{conversation.id}") + end + end + end +end diff --git a/decidim-core/spec/services/decidim/push_notification_message_sender_spec.rb b/decidim-core/spec/services/decidim/push_notification_message_sender_spec.rb new file mode 100644 index 0000000000000..0f77c02bae0b8 --- /dev/null +++ b/decidim-core/spec/services/decidim/push_notification_message_sender_spec.rb @@ -0,0 +1,85 @@ +# frozen_string_literal: true + +require "spec_helper" + +describe Decidim::PushNotificationMessageSender do + let(:organization) { build(:organization) } + let(:conversation) { create(:conversation) } + let(:group) { build(:user_group, organization: organization, users: [manager]) } + let(:manager) { build(:user, organization: organization) } + let(:message) { build(:message) } + let(:originator) { build(:user, organization: organization) } + let(:sender) { build(:user, organization: organization) } + let(:user) { build(:user, organization: organization) } + let(:notification) { build(:push_notification_message) } + let(:notification_sender) { double :notification_sender } + let(:title) { nil } + let(:push_notification_message) { build(:push_notification_message, sender: sender, third_party: group, conversation: conversation, action: action) } + + shared_examples "a push notification" do + it "gets the correct title" do + expect(subject.send(:title)).to eq(push_notification_title) + end + + it "calls push notification" do + send_push_notification_double = instance_double(Decidim::SendPushNotification) + allow(Decidim::SendPushNotification).to receive(:new).and_return(send_push_notification_double) + expect(send_push_notification_double).to receive(:perform) + subject.deliver + end + end + + describe ".new_conversation" do + subject { described_class.new.new_conversation(originator, user, conversation) } + + let(:action) { "new_conversation" } + let(:push_notification_title) { "#{user.name} has started a conversation with you" } + + it_behaves_like "a push notification" + end + + describe ".new_group_conversation" do + subject { described_class.new.new_group_conversation(originator, manager, conversation, group) } + + let(:push_notification_title) { "#{manager.name} has started a conversation with #{group.name}" } + let(:action) { "new_group_conversation" } + + it_behaves_like "a push notification" + end + + describe ".comanagers_new_conversation" do + subject { described_class.new.comanagers_new_conversation(group, user, conversation, manager) } + + let(:push_notification_title) { "#{manager.name} has started a new conversation as a #{manager.name}" } + let(:action) { "comanagers_new_conversation" } + + it_behaves_like "a push notification" + end + + describe ".new_message" do + subject { described_class.new.new_message(sender, user, conversation, message) } + + let(:push_notification_title) { "You have new messages from #{user.name}" } + let(:action) { "new_message" } + + it_behaves_like "a push notification" + end + + describe ".new_group_message" do + subject { described_class.new.new_group_message(sender, user, conversation, message, group) } + + let(:push_notification_title) { "#{group.name} have new messages from #{user.name}" } + let(:action) { "new_group_message" } + + it_behaves_like "a push notification" + end + + describe ".comanagers_new_message" do + subject { described_class.new.comanagers_new_message(sender, user, conversation, message, manager) } + + let(:push_notification_title) { "#{manager.name} has send new messages as a #{manager.name}" } + let(:action) { "comanagers_new_message" } + + it_behaves_like "a push notification" + end +end diff --git a/decidim-core/spec/services/decidim/send_push_notification_spec.rb b/decidim-core/spec/services/decidim/send_push_notification_spec.rb index 2727da182ac6b..b3c3706213dc5 100644 --- a/decidim-core/spec/services/decidim/send_push_notification_spec.rb +++ b/decidim-core/spec/services/decidim/send_push_notification_spec.rb @@ -5,167 +5,177 @@ describe Decidim::SendPushNotification do subject { described_class.new } - let(:subscription) { { "auth_key_1" => { "auth" => "auth_key_1", "p256dh" => "p256dh_1", "endpoint" => "endpoint_1" } } } - let(:subscriptions) do - { - "auth_key_1" => { "auth" => "auth_key_1", "p256dh" => "p256dh_1", "endpoint" => "endpoint_1" }, - "auth_key_2" => { "auth" => "auth_key_2", "p256dh" => "p256dh_2", "endpoint" => "endpoint_2" }, - "auth_key_3" => { "auth" => "auth_key_3", "p256dh" => "p256dh_3", "endpoint" => "endpoint_3" } - } - end + let(:subscriptions) { {} } + let(:user) { create(:user, notification_settings: { subscriptions: subscriptions }) } before do Rails.application.secrets[:vapid] = { enabled: true, public_key: "public_key", private_key: "private_key" } end - context "without vapid settings config" do - before do - Rails.application.secrets.delete(:vapid) + shared_examples "send a push notification" do + context "without vapid settings config" do + before do + Rails.application.secrets.delete(:vapid) + end + + describe "#perform" do + it "returns false" do + expect(subject.perform(notification, title)).to be_falsy + end + end end - describe "#perform" do - let(:user) { create(:user) } - let(:notification) { create :notification, user: user } + context "without vapid enabled" do + before do + Rails.application.secrets[:vapid] = { enabled: false } + end - it "returns false" do - expect(subject.perform(notification)).to be_falsy + describe "#perform" do + it "returns false" do + expect(subject.perform(notification, title)).to be_falsy + end end end - end - context "without vapid enabled" do - before do - Rails.application.secrets[:vapid] = { enabled: false } + context "without any subscription" do + let(:subscriptions) { {} } + + describe "#perform" do + it "returns empty array" do + expect(subject.perform(notification, title)).to be_empty + end + end end - describe "#perform" do - let(:user) { create(:user) } - let(:notification) { create :notification, user: user } + context "with subscriptions" do + let(:subscriptions) do + { + "auth_key_1" => { "auth" => "auth_key_1", "p256dh" => "p256dh_1", "endpoint" => "endpoint_1" }, + "auth_key_2" => { "auth" => "auth_key_2", "p256dh" => "p256dh_2", "endpoint" => "endpoint_2" }, + "auth_key_3" => { "auth" => "auth_key_3", "p256dh" => "p256dh_3", "endpoint" => "endpoint_3" } + } + end - it "returns false" do - expect(subject.perform(notification)).to be_falsy + describe "#perform" do + it "returns 201 and created if the message is sent ok" do + first_notification_payload = { + message: message, + endpoint: subscriptions["auth_key_1"]["endpoint"], + p256dh: subscriptions["auth_key_1"]["p256dh"], + auth: subscriptions["auth_key_1"]["auth"], + vapid: a_hash_including( + public_key: "public_key", + private_key: "private_key" + ) + } + second_notification_payload = { + message: message, + endpoint: subscriptions["auth_key_2"]["endpoint"], + p256dh: subscriptions["auth_key_2"]["p256dh"], + auth: subscriptions["auth_key_2"]["auth"], + vapid: a_hash_including( + public_key: "public_key", + private_key: "private_key" + ) + } + third_notification_payload = { + message: message, + endpoint: subscriptions["auth_key_3"]["endpoint"], + p256dh: subscriptions["auth_key_3"]["p256dh"], + auth: subscriptions["auth_key_3"]["auth"], + vapid: a_hash_including( + public_key: "public_key", + private_key: "private_key" + ) + } + expect(Webpush).to receive(:payload_send).with(first_notification_payload).ordered.and_return(double("result", message: "Created", code: "201")) + expect(Webpush).to receive(:payload_send).with(second_notification_payload).ordered.and_return(double("result", message: "Created", code: "201")) + expect(Webpush).to receive(:payload_send).with(third_notification_payload).ordered.and_raise(Webpush::Error) + + responses = subject.perform(notification, title) + expect(responses.size).to eq(2) + expect(responses.all? { |response| response.code == "201" }).to be(true) + expect(responses.all? { |response| response.message == "Created" }).to be(true) + end end end - end - context "without any subscription" do - describe "#perform" do - let(:user) { create(:user, notification_settings: { subscriptions: {} }) } - let(:notification) { create :notification, user: user } + context "with subscription" do + let(:subscriptions) { { "auth_key_1" => { "auth" => "auth_key_1", "p256dh" => "p256dh_1", "endpoint" => "endpoint_1" } } } + + describe "#perform" do + it "returns 201 and created if the message is sent ok" do + notification_payload = { + message: message, + endpoint: subscriptions["auth_key_1"]["endpoint"], + p256dh: subscriptions["auth_key_1"]["p256dh"], + auth: subscriptions["auth_key_1"]["auth"], + vapid: a_hash_including( + public_key: "public_key", + private_key: "private_key" + ) + } + + allow(Webpush).to receive(:payload_send).with(notification_payload).and_return(double("result", message: "Created", code: "201")) + + responses = subject.perform(notification, title) + expect(responses.all? { |response| response.code == "201" }).to be(true) + expect(responses.all? { |response| response.message == "Created" }).to be(true) + end + + it "builds notification in user locale" do + # Pick other locale from organization + alternative_locale = (user.organization.available_locales - [user.locale]).sample + user.update(locale: alternative_locale) - it "returns empty array" do - expect(subject.perform(notification)).to be_empty + I18n.with_locale(user.locale) do + notification_payload = a_hash_including(message: message) + expect(Webpush).to receive(:payload_send).with(notification_payload).ordered.and_return(double("result", message: "Created", code: "201")) + end + + responses = subject.perform(notification, title) + expect(responses.all? { |response| response.code == "201" }).to be(true) + expect(responses.all? { |response| response.message == "Created" }).to be(true) + end end end end - context "with subscriptions" do - let(:user) { create(:user, notification_settings: { subscriptions: subscriptions }) } - let(:notification) { create :notification, user: user } - - describe "#perform" do - it "returns 201 and created if the message is sent ok" do - presented_notification = Decidim::PushNotificationPresenter.new(notification) - message = JSON.generate({ - title: presented_notification.title, - body: presented_notification.body, - icon: presented_notification.icon, - data: { url: presented_notification.url } - }) - - first_notification_payload = { - message: message, - endpoint: subscriptions["auth_key_1"]["endpoint"], - p256dh: subscriptions["auth_key_1"]["p256dh"], - auth: subscriptions["auth_key_1"]["auth"], - vapid: a_hash_including( - public_key: "public_key", - private_key: "private_key" - ) - } - second_notification_payload = { - message: message, - endpoint: subscriptions["auth_key_2"]["endpoint"], - p256dh: subscriptions["auth_key_2"]["p256dh"], - auth: subscriptions["auth_key_2"]["auth"], - vapid: a_hash_including( - public_key: "public_key", - private_key: "private_key" - ) - } - third_notification_payload = { - message: message, - endpoint: subscriptions["auth_key_3"]["endpoint"], - p256dh: subscriptions["auth_key_3"]["p256dh"], - auth: subscriptions["auth_key_3"]["auth"], - vapid: a_hash_including( - public_key: "public_key", - private_key: "private_key" - ) - } - expect(Webpush).to receive(:payload_send).with(first_notification_payload).ordered.and_return(double("result", message: "Created", code: "201")) - expect(Webpush).to receive(:payload_send).with(second_notification_payload).ordered.and_return(double("result", message: "Created", code: "201")) - expect(Webpush).to receive(:payload_send).with(third_notification_payload).ordered.and_raise(Webpush::Error) - - responses = subject.perform(notification) - expect(responses.size).to eq(2) - expect(responses.all? { |response| response.code == "201" }).to be(true) - expect(responses.all? { |response| response.message == "Created" }).to be(true) - end + context "with a Decidim::Notification" do + let(:notification) { create(:notification, user: user) } + let(:presented_notification) { Decidim::PushNotificationPresenter.new(notification) } + let(:message) do + JSON.generate({ + title: presented_notification.title, + body: presented_notification.body, + icon: presented_notification.icon, + data: { url: presented_notification.url } + }) end - end + let(:title) { nil } - context "with subscription" do - let(:user) { create(:user, notification_settings: { subscriptions: subscription }) } - let(:notification) { create :notification, user: user } - - describe "#perform" do - it "returns 201 and created if the message is sent ok" do - presented_notification = Decidim::PushNotificationPresenter.new(notification) - notification_payload = { - message: JSON.generate({ - title: presented_notification.title, - body: presented_notification.body, - icon: presented_notification.icon, - data: { url: presented_notification.url } - }), - endpoint: subscriptions["auth_key_1"]["endpoint"], - p256dh: subscriptions["auth_key_1"]["p256dh"], - auth: subscriptions["auth_key_1"]["auth"], - vapid: a_hash_including( - public_key: "public_key", - private_key: "private_key" - ) - } + it_behaves_like "send a push notification" + end - allow(Webpush).to receive(:payload_send).with(notification_payload).and_return(double("result", message: "Created", code: "201")) + context "with a Decidim::PushNotificationMessage" do + let(:notification) { build(:push_notification_message, recipient: user) } + let(:message) do + JSON.generate({ + title: title, + body: notification.body, + icon: notification.icon, + data: { url: notification.url } + }) + end + let(:title) { "A new message from #{user.name}" } - responses = subject.perform(notification) - expect(responses.all? { |response| response.code == "201" }).to be(true) - expect(responses.all? { |response| response.message == "Created" }).to be(true) - end + it_behaves_like "send a push notification" - it "builds notification in user locale" do - # Pick other locale from organization - alternative_locale = (user.organization.available_locales - [user.locale]).sample - user.update(locale: alternative_locale) - - I18n.with_locale(user.locale) do - presented_notification = Decidim::PushNotificationPresenter.new(notification) - message = JSON.generate({ - title: presented_notification.title, - body: presented_notification.body, - icon: presented_notification.icon, - data: { url: presented_notification.url } - }) - - notification_payload = a_hash_including(message: message) - expect(Webpush).to receive(:payload_send).with(notification_payload).ordered.and_return(double("result", message: "Created", code: "201")) - end + context "without title" do + let(:title) { nil } - responses = subject.perform(notification) - expect(responses.all? { |response| response.code == "201" }).to be(true) - expect(responses.all? { |response| response.message == "Created" }).to be(true) + it "raises an ArgumentError" do + expect { subject.perform(notification) }.to raise_error(ArgumentError, "Need to provide a title if the notification is a PushNotificationMessage") end end end From f29e2acb6fdfc56735894345dfa6f2670d1c497d Mon Sep 17 00:00:00 2001 From: Alexandru Emil Lupu Date: Thu, 29 Feb 2024 09:50:15 +0200 Subject: [PATCH 04/88] Backport 'Standardize the way resources are being listed ...' to v0.27 (#12533) * Backport 'Standardize the way resources are being listed in application' to v0.27 * Fix failing specs * Fix specs * Fix failing specs * Fix more specs * Fix specs * Apply review recommendations --- .../show.erb | 2 +- .../decidim/component_published_event.rb | 11 + .../decidim/admin/admin_terms_helper.rb | 2 +- .../decidim/component_published_event_spec.rb | 9 +- .../lib/decidim/assemblies/admin_engine.rb | 2 +- .../lib/decidim/assemblies/test/factories.rb | 3 + .../budgets/order_summary_mailer_spec.rb | 8 +- .../cells/decidim/conferences/photo_cell.rb | 2 +- .../lib/decidim/conferences/admin_engine.rb | 2 +- decidim-conferences/spec/system/media_spec.rb | 6 +- .../lib/decidim/consultations/admin_engine.rb | 2 +- .../scopes_picker/scope_picker_values.erb | 2 +- .../app/helpers/decidim/sanitize_helper.rb | 9 + .../lib/decidim/core/test/factories.rb | 314 ++++++++++++------ .../has_attachment_collections.rb | 14 +- .../test/shared_examples/has_attachments.rb | 8 +- decidim-core/lib/decidim/view_model.rb | 1 + .../cells/decidim/upload_modal_cell_spec.rb | 2 +- .../spec/controllers/pages_controller_spec.rb | 4 +- .../helpers/decidim/scopes_helper_spec.rb | 2 +- ...cipatory_space_components_importer_spec.rb | 57 ++-- decidim-core/spec/system/homepage_spec.rb | 2 +- .../spec/types/component_input_sort_spec.rb | 2 +- decidim-dev/lib/decidim/dev/test/factories.rb | 4 + .../rspec_support/decidim_sanitization.rb | 5 + .../lib/decidim/votings/admin_engine.rb | 2 +- .../questionnaire_answer_presenter_spec.rb | 2 +- .../decidim/initiatives/application_helper.rb | 2 +- .../lib/decidim/initiatives/admin_engine.rb | 2 +- .../spec/system/filter_initiatives_spec.rb | 1 - .../show.erb | 4 +- .../participatory_processes/admin_engine.rb | 2 +- .../participatory_processes/test/factories.rb | 6 + .../show.erb | 2 +- 34 files changed, 333 insertions(+), 165 deletions(-) create mode 100644 decidim-dev/lib/decidim/dev/test/rspec_support/decidim_sanitization.rb diff --git a/decidim-accountability/app/cells/decidim/accountability/highlighted_results_for_component/show.erb b/decidim-accountability/app/cells/decidim/accountability/highlighted_results_for_component/show.erb index c61872f1f258b..37a731e55652f 100644 --- a/decidim-accountability/app/cells/decidim/accountability/highlighted_results_for_component/show.erb +++ b/decidim-accountability/app/cells/decidim/accountability/highlighted_results_for_component/show.erb @@ -1,6 +1,6 @@

- <%= translated_attribute(model.name) %> <%= t("decidim.participatory_spaces.highlighted_results.see_all", count: results_count) %> + <%= decidim_escape_translated(model.name) %> <%= t("decidim.participatory_spaces.highlighted_results.see_all", count: results_count) %>

diff --git a/decidim-admin/app/events/decidim/component_published_event.rb b/decidim-admin/app/events/decidim/component_published_event.rb index 4d3209336c23c..203902c18a105 100644 --- a/decidim-admin/app/events/decidim/component_published_event.rb +++ b/decidim-admin/app/events/decidim/component_published_event.rb @@ -2,5 +2,16 @@ module Decidim class ComponentPublishedEvent < Decidim::Events::SimpleEvent + # Public: The Hash of options to pass to the I18.t method. + def i18n_options + default_i18n_options.merge(event_interpolations) + end + + def resource_title + return unless resource + + title = decidim_sanitize_translated(resource.name) + Decidim::ContentProcessor.render_without_format(title, links: false).html_safe + end end end diff --git a/decidim-admin/app/helpers/decidim/admin/admin_terms_helper.rb b/decidim-admin/app/helpers/decidim/admin/admin_terms_helper.rb index bbb4f276735ea..2837c0df9eb96 100644 --- a/decidim-admin/app/helpers/decidim/admin/admin_terms_helper.rb +++ b/decidim-admin/app/helpers/decidim/admin/admin_terms_helper.rb @@ -5,7 +5,7 @@ module Admin # This module includes helpers to show Admin Terms of Use module AdminTermsHelper def admin_terms_of_use_body - current_organization.admin_terms_of_use_body.symbolize_keys[I18n.locale].html_safe + decidim_sanitize_admin(translated_attribute(current_organization.admin_terms_of_use_body)).html_safe end def announcement_body diff --git a/decidim-admin/spec/events/decidim/component_published_event_spec.rb b/decidim-admin/spec/events/decidim/component_published_event_spec.rb index 8e099dc44339b..2f3ba6aa1ed6d 100644 --- a/decidim-admin/spec/events/decidim/component_published_event_spec.rb +++ b/decidim-admin/spec/events/decidim/component_published_event_spec.rb @@ -11,10 +11,11 @@ let(:resource) { create(:component) } let(:participatory_space) { resource.participatory_space } let(:resource_path) { main_component_path(resource) } - let(:email_subject) { "An update to #{participatory_space.title["en"]}" } - let(:email_intro) { "The #{resource.name["en"]} component is now active for #{participatory_space.title["en"]}. You can see it from this page:" } - let(:email_outro) { "You have received this notification because you are following #{participatory_space.title["en"]}. You can stop receiving notifications following the previous link." } - let(:notification_title) { "The #{resource.name["en"]} component is now active for #{participatory_space.title["en"]}" } + let(:email_subject) { "An update to #{participatory_space_title}" } + let(:resource_title) { decidim_sanitize_translated(resource.name) } + let(:email_intro) { "The #{resource_title} component is now active for #{participatory_space_title}. You can see it from this page:" } + let(:email_outro) { "You have received this notification because you are following #{participatory_space_title}. You can stop receiving notifications following the previous link." } + let(:notification_title) { "The #{resource_title} component is now active for #{participatory_space_title}" } it_behaves_like "a simple event" it_behaves_like "a simple event email" diff --git a/decidim-assemblies/lib/decidim/assemblies/admin_engine.rb b/decidim-assemblies/lib/decidim/assemblies/admin_engine.rb index 763aeb2342758..589e29c941204 100644 --- a/decidim-assemblies/lib/decidim/assemblies/admin_engine.rb +++ b/decidim-assemblies/lib/decidim/assemblies/admin_engine.rb @@ -128,7 +128,7 @@ class AdminEngine < ::Rails::Engine initializer "decidim_assemblies.admin_assemblies_components_menu" do Decidim.menu :admin_assemblies_components_menu do |menu| current_participatory_space.components.each do |component| - caption = translated_attribute(component.name) + caption = decidim_escape_translated(component.name) if component.primary_stat.present? caption += content_tag(:span, component.primary_stat, class: component.primary_stat.zero? ? "component-counter component-counter--off" : "component-counter") end diff --git a/decidim-assemblies/lib/decidim/assemblies/test/factories.rb b/decidim-assemblies/lib/decidim/assemblies/test/factories.rb index 81ccb2eefd28b..d902430c2acf6 100644 --- a/decidim-assemblies/lib/decidim/assemblies/test/factories.rb +++ b/decidim-assemblies/lib/decidim/assemblies/test/factories.rb @@ -19,6 +19,9 @@ end factory :assembly, class: "Decidim::Assembly" do + transient do + skip_injection { false } + end title { generate_localized_title } slug { generate(:assembly_slug) } subtitle { generate_localized_title } diff --git a/decidim-budgets/spec/mailers/decidim/budgets/order_summary_mailer_spec.rb b/decidim-budgets/spec/mailers/decidim/budgets/order_summary_mailer_spec.rb index 130856251adc2..4d3ccc0d221e6 100644 --- a/decidim-budgets/spec/mailers/decidim/budgets/order_summary_mailer_spec.rb +++ b/decidim-budgets/spec/mailers/decidim/budgets/order_summary_mailer_spec.rb @@ -23,16 +23,16 @@ module Decidim::Budgets end it "includes the budget title" do - expect(mail.body.encoded).to include(translated(budget.title)) + expect(mail.body.encoded).to include(decidim_escape_translated(budget.title)) end it "includes the participatory space title" do - expect(mail.body).to include(translated(space.title)) + expect(mail.body).to include(decidim_escape_translated(space.title)) end it "includes the projects names" do order.projects.each do |project| - expect(mail.body).to include(translated(project.title)) + expect(mail.body).to include(decidim_escape_translated(project.title)) end end end @@ -51,7 +51,7 @@ module Decidim::Budgets it "includes the scope name and scope type name" do expect(mail.body.encoded).to include(translated(scope.name)) - expect(mail.body.encoded).to include(translated(scope.scope_type.name)) + expect(mail.body.encoded).to include(decidim_escape_translated(scope.scope_type.name)) end end end diff --git a/decidim-conferences/app/cells/decidim/conferences/photo_cell.rb b/decidim-conferences/app/cells/decidim/conferences/photo_cell.rb index 37386ec1fea82..6462b680859a7 100644 --- a/decidim-conferences/app/cells/decidim/conferences/photo_cell.rb +++ b/decidim-conferences/app/cells/decidim/conferences/photo_cell.rb @@ -26,7 +26,7 @@ def image_big end def title - translated_attribute model.title + decidim_escape_translated model.title end def short_description diff --git a/decidim-conferences/lib/decidim/conferences/admin_engine.rb b/decidim-conferences/lib/decidim/conferences/admin_engine.rb index 99239dbbb0542..f2a6f4ea598e3 100644 --- a/decidim-conferences/lib/decidim/conferences/admin_engine.rb +++ b/decidim-conferences/lib/decidim/conferences/admin_engine.rb @@ -91,7 +91,7 @@ class AdminEngine < ::Rails::Engine initializer "decidim_conferences.admin_conferences_components_menu" do Decidim.menu :admin_conferences_components_menu do |menu| current_participatory_space.components.each do |component| - caption = translated_attribute(component.name) + caption = decidim_escape_translated(component.name) if component.primary_stat.present? caption += content_tag(:span, component.primary_stat, class: component.primary_stat.zero? ? "component-counter component-counter--off" : "component-counter") end diff --git a/decidim-conferences/spec/system/media_spec.rb b/decidim-conferences/spec/system/media_spec.rb index 9ef22fd8498cb..12828dec57291 100644 --- a/decidim-conferences/spec/system/media_spec.rb +++ b/decidim-conferences/spec/system/media_spec.rb @@ -48,7 +48,7 @@ def visit_conference it "shows them" do within "div.wrapper .conference-media" do expect(page).to have_content("MEDIA AND LINKS") - expect(page).to have_content(/#{translated(media_link.title, locale: :en)}/i) + expect(page).to have_content(translated(media_link.title)) expect(page).to have_css(".media-links a") end end @@ -65,7 +65,7 @@ def visit_conference it "shows them" do within "div.wrapper .documents" do - expect(page).to have_content(/#{translated(document.title, locale: :en)}/i) + expect(page).to have_content(translated(document.title)) end within "div.wrapper .images" do @@ -86,7 +86,7 @@ def visit_conference it "shows them ordered" do within "div.wrapper .documents" do - expect(translated(first_document.title, locale: :en)).to appear_before(translated(last_document.title, locale: :en)) + expect(decidim_escape_translated(first_document.title).gsub(""", "\"")).to appear_before(decidim_escape_translated(last_document.title).gsub(""", "\"")) end within "div.wrapper .images" do diff --git a/decidim-consultations/lib/decidim/consultations/admin_engine.rb b/decidim-consultations/lib/decidim/consultations/admin_engine.rb index 7d8066806094d..571a4baf86a85 100644 --- a/decidim-consultations/lib/decidim/consultations/admin_engine.rb +++ b/decidim-consultations/lib/decidim/consultations/admin_engine.rb @@ -157,7 +157,7 @@ class AdminEngine < ::Rails::Engine initializer "decidim_consultations.admin_consultation_components_menu" do Decidim.menu :admin_consultation_components_menu do |menu| current_participatory_space.components.each do |component| - caption = translated_attribute(component.name) + caption = decidim_escape_translated(component.name) if component.primary_stat.present? caption += content_tag(:span, component.primary_stat, class: component.primary_stat.zero? ? "component-counter component-counter--off" : "component-counter") end diff --git a/decidim-core/app/cells/decidim/scopes_picker/scope_picker_values.erb b/decidim-core/app/cells/decidim/scopes_picker/scope_picker_values.erb index cdd04e2c9e7aa..7539aba8126b7 100644 --- a/decidim-core/app/cells/decidim/scopes_picker/scope_picker_values.erb +++ b/decidim-core/app/cells/decidim/scopes_picker/scope_picker_values.erb @@ -1,5 +1,5 @@
<%- scopes.each do |scope, params| %> -
<%= link_to params[:text], params[:url], data: { picker_value: scope.id } %>
+
<%= link_to decidim_html_escape(params[:text]), params[:url], data: { picker_value: scope.id } %>
<% end %>
diff --git a/decidim-core/app/helpers/decidim/sanitize_helper.rb b/decidim-core/app/helpers/decidim/sanitize_helper.rb index 0b3b0c6571b10..f8fea9e40e946 100644 --- a/decidim-core/app/helpers/decidim/sanitize_helper.rb +++ b/decidim-core/app/helpers/decidim/sanitize_helper.rb @@ -6,6 +6,7 @@ module SanitizeHelper def self.included(base) base.include ActionView::Helpers::SanitizeHelper base.include ActionView::Helpers::TagHelper + base.include Decidim::TranslatableAttributes end # Public: It sanitizes a user-inputted string with the @@ -53,6 +54,14 @@ def decidim_url_escape(text) decidim_html_escape(text).sub(/^javascript:/, "") end + def decidim_sanitize_translated(text) + decidim_sanitize(translated_attribute(text)) + end + + def decidim_escape_translated(text) + decidim_html_escape(translated_attribute(text)) + end + private # Maintains the paragraphs and lists separations with their bullet points and diff --git a/decidim-core/lib/decidim/core/test/factories.rb b/decidim-core/lib/decidim/core/test/factories.rb index 3f875e338c2dd..96738bcd9ce73 100644 --- a/decidim-core/lib/decidim/core/test/factories.rb +++ b/decidim-core/lib/decidim/core/test/factories.rb @@ -89,27 +89,25 @@ def generate_localized_title(field = nil, skip_injection: false) skip_injection { false } end - name do - if skip_injection - Decidim::Faker::Localized.localized { generate(:title) } - else - Decidim::Faker::Localized.localized { " #{generate(:title)}" } - end - end - description { Decidim::Faker::Localized.wrapped("

", "

") { generate_localized_title } } + name { generate_localized_title(:category_name, skip_injection: skip_injection) } + description { generate_localized_description(:category_description, skip_injection: skip_injection) } weight { 0 } association :participatory_space, factory: :participatory_process end factory :subcategory, parent: :category do - parent { build(:category) } + transient do + skip_injection { false } + end + parent { build(:category, skip_injection: skip_injection) } participatory_space { parent.participatory_space } end factory :organization, class: "Decidim::Organization" do transient do + skip_injection { false } create_static_pages { true } end @@ -122,7 +120,7 @@ def generate_localized_title(field = nil, skip_injection: false) youtube_handler { Faker::Hipster.word } github_handler { Faker::Hipster.word } sequence(:host) { |n| "#{n}.lvh.me" } - description { Decidim::Faker::Localized.wrapped("

", "

") { generate_localized_title } } + description { generate_localized_description(:organization_description, skip_injection: skip_injection) } favicon { Decidim::Dev.test_file("icon.png", "image/png") } default_locale { Decidim.default_locale } available_locales { Decidim.available_locales } @@ -136,7 +134,7 @@ def generate_localized_title(field = nil, skip_injection: false) user_groups_enabled { true } send_welcome_notification { true } comments_max_length { 1000 } - admin_terms_of_use_body { Decidim::Faker::Localized.wrapped("

", "

") { generate_localized_title } } + admin_terms_of_use_body { generate_localized_description(:admin_terms_of_service_body, skip_injection: skip_injection) } force_users_to_authenticate_before_access_organization { false } machine_translation_display_priority { "original" } external_domain_whitelist { ["example.org", "twitter.com", "facebook.com", "youtube.com", "github.com", "mytesturl.me"] } @@ -159,12 +157,15 @@ def generate_localized_title(field = nil, skip_injection: false) after(:create) do |organization, evaluator| if evaluator.create_static_pages tos_page = Decidim::StaticPage.find_by(slug: "terms-and-conditions", organization: organization) - create(:static_page, :tos, organization: organization) if tos_page.nil? + create(:static_page, :tos, organization: organization, skip_injection: evaluator.skip_injection) if tos_page.nil? end end end factory :user, class: "Decidim::User" do + transient do + skip_injection { false } + end email { generate(:email) } name { generate(:name) } nickname { generate(:nickname) } @@ -173,7 +174,7 @@ def generate_localized_title(field = nil, skip_injection: false) tos_agreement { "1" } avatar { Decidim::Dev.test_file("avatar.jpg", "image/jpeg") } personal_url { Faker::Internet.url } - about { "#{Faker::Lorem.paragraph(sentence_count: 2)}" } + about { generate_localized_title(:user_about, skip_injection: skip_injection) } confirmation_sent_at { Time.current } accepted_tos_version { organization.tos_version } notifications_sending_frequency { "real_time" } @@ -222,7 +223,7 @@ def generate_localized_title(field = nil, skip_injection: false) trait :officialized do officialized_at { Time.current } - officialized_as { generate_localized_title } + officialized_as { generate_localized_title(:officialized_as, skip_injection: skip_injection) } end after(:build) do |user, evaluator| @@ -235,17 +236,24 @@ def generate_localized_title(field = nil, skip_injection: false) end factory :participatory_space_private_user, class: "Decidim::ParticipatorySpacePrivateUser" do + transient do + skip_injection { false } + end user - privatable_to { create :participatory_process, organization: user.organization } + privatable_to { create(:participatory_process, organization: user.organization, skip_injection: skip_injection) } end factory :assembly_private_user, class: "Decidim::ParticipatorySpacePrivateUser" do + transient do + skip_injection { false } + end user - privatable_to { create :assembly, organization: user.organization } + privatable_to { create(:assembly, organization: user.organization, skip_injection: skip_injection) } end factory :user_group, class: "Decidim::UserGroup" do transient do + skip_injection { false } document_number { "#{Faker::Number.number(digits: 8)}X" } phone { Faker::PhoneNumber.phone_number } rejected_at { nil } @@ -255,7 +263,7 @@ def generate_localized_title(field = nil, skip_injection: false) sequence(:name) { |n| "#{Faker::Company.name} #{n}" } email { generate(:user_group_email) } nickname { generate(:nickname) } - about { "#{Faker::Lorem.paragraph(sentence_count: 2)}" } + about { generate_localized_title(:user_group_about, skip_injection: skip_injection) } organization avatar { Decidim::Dev.test_file("avatar.jpg", "image/jpeg") } # Keep after organization @@ -296,21 +304,27 @@ def generate_localized_title(field = nil, skip_injection: false) next if users.empty? creator = users.shift - create(:user_group_membership, user: creator, user_group: user_group, role: :creator) + create(:user_group_membership, user: creator, user_group: user_group, role: :creator, skip_injection: evaluator.skip_injection) users.each do |user| - create(:user_group_membership, user: user, user_group: user_group, role: :admin) + create(:user_group_membership, user: user, user_group: user_group, role: :admin, skip_injection: evaluator.skip_injection) end end end factory :user_group_membership, class: "Decidim::UserGroupMembership" do - user { create(:user, :confirmed, organization: user_group.organization) } + transient do + skip_injection { false } + end + user { create(:user, :confirmed, organization: user_group.organization, skip_injection: skip_injection) } role { :creator } user_group end factory :identity, class: "Decidim::Identity" do + transient do + skip_injection { false } + end provider { "facebook" } sequence(:uid) user @@ -318,6 +332,9 @@ def generate_localized_title(field = nil, skip_injection: false) end factory :authorization, class: "Decidim::Authorization" do + transient do + skip_injection { false } + end sequence(:name) { |n| "dummy_authorization_#{n}" } user metadata { {} } @@ -333,10 +350,13 @@ def generate_localized_title(field = nil, skip_injection: false) end factory :static_page, class: "Decidim::StaticPage" do + transient do + skip_injection { false } + end slug { generate(:slug) } - title { generate_localized_title } - content { Decidim::Faker::Localized.wrapped("

", "

") { generate_localized_title } } - organization { build(:organization) } + title { generate_localized_title(:static_page_title, skip_injection: skip_injection) } + content { generate_localized_description(:static_page_content, skip_injection: skip_injection) } + organization { build(:organization, skip_injection: skip_injection) } allow_public_access { false } trait :default do @@ -352,8 +372,8 @@ def generate_localized_title(field = nil, skip_injection: false) end trait :with_topic do - after(:create) do |static_page| - topic = create(:static_page_topic, organization: static_page.organization) + after(:create) do |static_page, evaluator| + topic = create(:static_page_topic, organization: static_page.organization, skip_injection: evaluator.skip_injection) static_page.topic = topic static_page.save end @@ -361,24 +381,33 @@ def generate_localized_title(field = nil, skip_injection: false) end factory :static_page_topic, class: "Decidim::StaticPageTopic" do - title { generate_localized_title } - description { Decidim::Faker::Localized.wrapped("

", "

") { generate_localized_title } } + transient do + skip_injection { false } + end + title { generate_localized_title(:static_page_topic_title, skip_injection: skip_injection) } + description { generate_localized_description(:static_page_topic_description, skip_injection: skip_injection) } organization end factory :attachment_collection, class: "Decidim::AttachmentCollection" do - name { generate_localized_title } - description { generate_localized_title } + transient do + skip_injection { false } + end + name { generate_localized_title(:attachment_collection_name, skip_injection: skip_injection) } + description { generate_localized_title(:attachment_collection_description, skip_injection: skip_injection) } weight { Faker::Number.number(digits: 1) } association :collection_for, factory: :participatory_process end factory :attachment, class: "Decidim::Attachment" do - title { generate_localized_title } - description { Decidim::Faker::Localized.wrapped("

", "

") { generate_localized_title } } + transient do + skip_injection { false } + end + title { generate_localized_title(:attachment_title, skip_injection: skip_injection) } + description { generate_localized_description(:attachment_description, skip_injection: skip_injection) } weight { Faker::Number.number(digits: 1) } - attached_to { build(:participatory_process) } + attached_to { build(:participatory_process, skip_injection: skip_injection) } content_type { "image/jpeg" } file { Decidim::Dev.test_file("city.jpeg", "image/jpeg") } # Keep after attached_to file_size { 108_908 } @@ -396,23 +425,24 @@ def generate_localized_title(field = nil, skip_injection: false) factory :component, class: "Decidim::Component" do transient do - organization { create(:organization) } + skip_injection { false } + organization { create(:organization, skip_injection: skip_injection) } end - name { generate_localized_title } - participatory_space { create(:participatory_process, organization: organization) } + name { generate_localized_title(:component_name, skip_injection: skip_injection) } + participatory_space { create(:participatory_process, organization: organization, skip_injection: skip_injection) } manifest_name { "dummy" } published_at { Time.current } settings do { - dummy_global_translatable_text: generate_localized_title, + dummy_global_translatable_text: generate_localized_title(:dummy_global_translatable_text, skip_injection: skip_injection), comments_max_length: participatory_space.organization.comments_max_length || organization.comments_max_length } end default_step_settings do { - dummy_step_translatable_text: generate_localized_title + dummy_step_translatable_text: generate_localized_title(:dummy_step_translatable_text, skip_injection: skip_injection) } end @@ -450,7 +480,8 @@ def generate_localized_title(field = nil, skip_injection: false) create(:participatory_process_step, active: true, end_date: 1.month.from_now, - participatory_process: participatory_space) + participatory_process: participatory_space, + skip_injection: skip_injection) participatory_space.reload participatory_space.steps.reload end @@ -493,20 +524,29 @@ def generate_localized_title(field = nil, skip_injection: false) end factory :scope_type, class: "Decidim::ScopeType" do - name { Decidim::Faker::Localized.word } + transient do + skip_injection { false } + end + name { generate_localized_word(:scope_type_name, skip_injection: skip_injection) } plural { Decidim::Faker::Localized.literal(name.values.first.pluralize) } organization end factory :scope, class: "Decidim::Scope" do + transient do + skip_injection { false } + end name { Decidim::Faker::Localized.literal(generate(:scope_name)) } code { generate(:scope_code) } - scope_type { create(:scope_type, organization: organization) } - organization { parent ? parent.organization : build(:organization) } + scope_type { create(:scope_type, organization: organization, skip_injection: skip_injection) } + organization { parent ? parent.organization : build(:organization, skip_injection: skip_injection) } end factory :subscope, parent: :scope do - parent { build(:scope) } + transient do + skip_injection { false } + end + parent { build(:scope, skip_injection: skip_injection) } before(:create) do |object| object.parent.save unless object.parent.persisted? @@ -514,34 +554,44 @@ def generate_localized_title(field = nil, skip_injection: false) end factory :area_type, class: "Decidim::AreaType" do - name { Decidim::Faker::Localized.word } + transient do + skip_injection { false } + end + name { generate_localized_word(:area_type_name, skip_injection: skip_injection) } plural { Decidim::Faker::Localized.literal(name.values.first.pluralize) } organization end factory :area, class: "Decidim::Area" do + transient do + skip_injection { false } + end name { Decidim::Faker::Localized.literal(generate(:area_name)) } organization end factory :coauthorship, class: "Decidim::Coauthorship" do - coauthorable { create(:dummy_resource) } + transient do + skip_injection { false } + end + coauthorable { create(:dummy_resource, skip_injection: skip_injection) } transient do organization { coauthorable.component.participatory_space.organization } end - author { create(:user, :confirmed, organization: organization) } + author { create(:user, :confirmed, organization: organization, skip_injection: skip_injection) } end factory :dummy_resource, class: "Decidim::DummyResources::DummyResource" do transient do + skip_injection { false } users { nil } # user_groups correspondence to users is by sorting order user_groups { [] } end title { Decidim::Faker::Localized.localized { generate(:name) } } - component { create(:component, manifest_name: "dummy") } - author { create(:user, :confirmed, organization: component.organization) } - scope { create(:scope, organization: component.organization) } + component { create(:component, manifest_name: "dummy", skip_injection: skip_injection) } + author { create(:user, :confirmed, organization: component.organization, skip_injection: skip_injection) } + scope { create(:scope, organization: component.organization, skip_injection: skip_injection) } trait :published do published_at { Time.current } @@ -557,17 +607,21 @@ def generate_localized_title(field = nil, skip_injection: false) end factory :nested_dummy_resource, class: "Decidim::DummyResources::NestedDummyResource" do + transient do + skip_injection { false } + end title { generate(:name) } - dummy_resource { create(:dummy_resource) } + dummy_resource { create(:dummy_resource, skip_injection: skip_injection) } end factory :coauthorable_dummy_resource, class: "Decidim::DummyResources::CoauthorableDummyResource" do - title { generate(:name) } - component { create(:component, manifest_name: "dummy") } - transient do - authors_list { [create(:user, organization: component.organization)] } + skip_injection { false } + + authors_list { [create(:user, organization: component.organization, skip_injection: skip_injection)] } end + title { generate(:name) } + component { create(:component, manifest_name: "dummy", skip_injection: skip_injection) } after :build do |resource, evaluator| evaluator.authors_list.each do |coauthor| @@ -581,17 +635,21 @@ def generate_localized_title(field = nil, skip_injection: false) end factory :resource_link, class: "Decidim::ResourceLink" do + transient do + skip_injection { false } + end name { generate(:slug) } - to { build(:dummy_resource) } - from { build(:dummy_resource, component: to.component) } + to { build(:dummy_resource, skip_injection: skip_injection) } + from { build(:dummy_resource, component: to.component, skip_injection: skip_injection) } end factory :newsletter, class: "Decidim::Newsletter" do transient do - body { Decidim::Faker::Localized.wrapped("

", "

") { generate_localized_title } } + skip_injection { false } + body { generate_localized_description(:newsletter_body, skip_injection: skip_injection) } end - author { build(:user, :confirmed, organization: organization) } + author { build(:user, :confirmed, organization: organization, skip_injection: skip_injection) } organization subject { generate_localized_title } @@ -603,7 +661,8 @@ def generate_localized_title(field = nil, skip_injection: false) organization: evaluator.organization, scoped_resource_id: newsletter.id, manifest_name: "basic_only_text", - settings: evaluator.body.transform_keys { |key| "body_#{key}" } + settings: evaluator.body.transform_keys { |key| "body_#{key}" }, + skip_injection: evaluator.skip_injection ) end @@ -613,7 +672,10 @@ def generate_localized_title(field = nil, skip_injection: false) end factory :moderation, class: "Decidim::Moderation" do - reportable { build(:dummy_resource) } + transient do + skip_injection { false } + end + reportable { build(:dummy_resource, skip_injection: skip_injection) } participatory_space { reportable.component.participatory_space } trait :hidden do @@ -622,35 +684,47 @@ def generate_localized_title(field = nil, skip_injection: false) end factory :report, class: "Decidim::Report" do + transient do + skip_injection { false } + end moderation - user { build(:user, organization: moderation.reportable.organization) } + user { build(:user, organization: moderation.reportable.organization, skip_injection: skip_injection) } reason { "spam" } end factory :impersonation_log, class: "Decidim::ImpersonationLog" do - admin { build(:user, :admin) } - user { build(:user, :managed, organization: admin.organization) } + transient do + skip_injection { false } + end + admin { build(:user, :admin, skip_injection: skip_injection) } + user { build(:user, :managed, organization: admin.organization, skip_injection: skip_injection) } started_at { 10.minutes.ago } end factory :follow, class: "Decidim::Follow" do + transient do + skip_injection { false } + end user do build( :user, - organization: followable.try(:organization) || build(:organization) + organization: followable.try(:organization) || build(:organization, skip_injection: skip_injection) ) end - followable { build(:dummy_resource) } + followable { build(:dummy_resource, skip_injection: skip_injection) } end factory :notification, class: "Decidim::Notification" do + transient do + skip_injection { false } + end user do build( :user, - organization: resource.try(:organization) || build(:organization) + organization: resource.try(:organization) || build(:organization, skip_injection: skip_injection) ) end - resource { build(:dummy_resource) } + resource { build(:dummy_resource, skip_injection: skip_injection) } event_name { resource.class.name.underscore.tr("/", ".") } event_class { "Decidim::DummyResourceEvent" } extra do @@ -705,14 +779,15 @@ def generate_localized_title(field = nil, skip_injection: false) factory :action_log, class: "Decidim::ActionLog" do transient do + skip_injection { false } extra_data { {} } end organization { user.organization } user - participatory_space { build :participatory_process, organization: organization } - component { build :component, participatory_space: participatory_space } - resource { build(:dummy_resource, component: component) } + participatory_space { build(:participatory_process, organization: organization, skip_injection: skip_injection) } + component { build(:component, participatory_space: participatory_space, skip_injection: skip_injection) } + resource { build(:dummy_resource, component: component, skip_injection: skip_injection) } action { "create" } visibility { "admin-only" } extra do @@ -738,6 +813,9 @@ def generate_localized_title(field = nil, skip_injection: false) end factory :oauth_application, class: "Decidim::OAuthApplication" do + transient do + skip_injection { false } + end organization sequence(:name) { |n| "OAuth application #{n}" } sequence(:organization_name) { |n| "OAuth application owner #{n}" } @@ -748,8 +826,11 @@ def generate_localized_title(field = nil, skip_injection: false) end factory :oauth_access_token, class: "Doorkeeper::AccessToken" do - resource_owner_id { create(:user, organization: application.organization).id } - application { build(:oauth_application) } + transient do + skip_injection { false } + end + resource_owner_id { create(:user, organization: application.organization, skip_injection: skip_injection).id } + application { build(:oauth_application, skip_injection: skip_injection) } token { SecureRandom.hex(32) } expires_in { 1.month.from_now } created_at { Time.current } @@ -757,7 +838,10 @@ def generate_localized_title(field = nil, skip_injection: false) end factory :searchable_resource, class: "Decidim::SearchableResource" do - resource { build(:dummy_resource) } + transient do + skip_injection { false } + end + resource { build(:dummy_resource, skip_injection: skip_injection) } resource_id { resource.id } resource_type { resource.class.name } organization { resource.component.organization } @@ -769,6 +853,9 @@ def generate_localized_title(field = nil, skip_injection: false) end factory :content_block, class: "Decidim::ContentBlock" do + transient do + skip_injection { false } + end organization scope_name { :homepage } manifest_name { :hero } @@ -782,24 +869,33 @@ def generate_localized_title(field = nil, skip_injection: false) end factory :hashtag, class: "Decidim::Hashtag" do + transient do + skip_injection { false } + end name { generate(:hashtag_name) } organization end factory :metric, class: "Decidim::Metric" do + transient do + skip_injection { false } + end organization day { Time.zone.today } metric_type { "random_metric" } cumulative { 2 } quantity { 1 } category { create :category } - participatory_space { create :participatory_process, organization: organization } - related_object { create :component, participatory_space: participatory_space } + participatory_space { create(:participatory_process, organization: organization, skip_injection: skip_injection) } + related_object { create(:component, participatory_space: participatory_space, skip_injection: skip_injection) } end factory :amendment, class: "Decidim::Amendment" do - amendable { build(:dummy_resource) } - emendation { build(:dummy_resource) } + transient do + skip_injection { false } + end + amendable { build(:dummy_resource, skip_injection: skip_injection) } + emendation { build(:dummy_resource, skip_injection: skip_injection) } amender { emendation.try(:creator_author) || emendation.try(:author) } state { "evaluating" } @@ -813,29 +909,44 @@ def generate_localized_title(field = nil, skip_injection: false) end factory :user_report, class: "Decidim::UserReport" do + transient do + skip_injection { false } + end reason { "spam" } - moderation { create(:user_moderation, user: user) } + moderation { create(:user_moderation, user: user, skip_injection: skip_injection) } user { build(:user) } end factory :user_moderation, class: "Decidim::UserModeration" do - user { build(:user) } + transient do + skip_injection { false } + end + user { build(:user, skip_injection: skip_injection) } end factory :endorsement, class: "Decidim::Endorsement" do - resource { build(:dummy_resource) } - author { resource.try(:creator_author) || resource.try(:author) || build(:user, organization: resource.organization) } + transient do + skip_injection { false } + end + resource { build(:dummy_resource, skip_injection: skip_injection) } + author { resource.try(:creator_author) || resource.try(:author) || build(:user, organization: resource.organization, skip_injection: skip_injection) } end factory :user_group_endorsement, class: "Decidim::Endorsement" do - resource { build(:dummy_resource) } - author { build(:user, organization: resource.organization) } - user_group { create(:user_group, verified_at: Time.current, organization: resource.organization, users: [author]) } + transient do + skip_injection { false } + end + resource { build(:dummy_resource, skip_injection: skip_injection) } + author { build(:user, organization: resource.organization, skip_injection: skip_injection) } + user_group { create(:user_group, verified_at: Time.current, organization: resource.organization, users: [author], skip_injection: skip_injection) } end factory :share_token, class: "Decidim::ShareToken" do - token_for { build(:component) } - user { build(:user, organization: token_for.organization) } + transient do + skip_injection { false } + end + token_for { build(:component, skip_injection: skip_injection) } + user { build(:user, organization: token_for.organization, skip_injection: skip_injection) } before(:create) do |object| object.organization ||= object.token_for.organization @@ -852,33 +963,48 @@ def generate_localized_title(field = nil, skip_injection: false) end factory :editor_image, class: "Decidim::EditorImage" do + transient do + skip_injection { false } + end organization - author { create(:user, :admin, :confirmed, organization: organization) } + author { create(:user, :admin, :confirmed, organization: organization, skip_injection: skip_injection) } file { Decidim::Dev.test_file("city.jpeg", "image/jpeg") } end factory :reminder, class: "Decidim::Reminder" do - user { build(:user) } - component { build(:dummy_component, organization: user.organization) } + transient do + skip_injection { false } + end + user { build(:user, skip_injection: skip_injection) } + component { build(:dummy_component, organization: user.organization, skip_injection: skip_injection) } end factory :reminder_record, class: "Decidim::ReminderRecord" do - reminder { create(:reminder) } - remindable { build(:dummy_resource) } + transient do + skip_injection { false } + end + reminder { create(:reminder, skip_injection: skip_injection) } + remindable { build(:dummy_resource, skip_injection: skip_injection) } end factory :reminder_delivery, class: "Decidim::ReminderDelivery" do - reminder { create(:reminder) } + transient do + skip_injection { false } + end + reminder { create(:reminder, skip_injection: skip_injection) } end factory :short_link, class: "Decidim::ShortLink" do - target { create(:component, manifest_name: "dummy") } + transient do + skip_injection { false } + end + target { create(:component, manifest_name: "dummy", skip_injection: skip_injection) } route_name { nil } params { {} } - before(:create) do |object| + before(:create) do |object, evaluator| object.organization ||= object.target if object.target.is_a?(Decidim::Organization) - object.organization ||= object.target.try(:organization) || create(:organization) + object.organization ||= object.target.try(:organization) || create(:organization, skip_injection: evaluator.skip_injection) object.identifier ||= Decidim::ShortLink.unique_identifier_within(object.organization) object.mounted_engine_name ||= if object.target.respond_to?(:participatory_space) diff --git a/decidim-core/lib/decidim/core/test/shared_examples/has_attachment_collections.rb b/decidim-core/lib/decidim/core/test/shared_examples/has_attachment_collections.rb index 5882fa3f2cf3c..559e1beea6c37 100644 --- a/decidim-core/lib/decidim/core/test/shared_examples/has_attachment_collections.rb +++ b/decidim-core/lib/decidim/core/test/shared_examples/has_attachment_collections.rb @@ -14,14 +14,14 @@ it "shows them" do within ".attachments .documents" do - expect(page).to have_content(/#{translated(attachment_collection.name, locale: :en)}/i) + expect(page).to have_content(translated(attachment_collection.name)) end end it "show their documents" do within ".attachments .documents #docs-collection-#{attachment_collection.id}", visible: false do - expect(page).to have_content(:all, /#{translated(document.title, locale: :en)}/i) - expect(page).not_to have_content(:all, /#{translated(other_document.title, locale: :en)}/i) + expect(page).to have_content(:all, translated(document.title)) + expect(page).not_to have_content(:all, translated(other_document.title)) end end end @@ -39,7 +39,9 @@ it "shows them ordered" do within ".attachments .documents" do - expect(translated(first_attachment_collection.name, locale: :en)).to appear_before(translated(last_attachment_collection.name, locale: :en)) + expect(decidim_escape_translated(first_attachment_collection.name).gsub(""", + "\"")).to appear_before(decidim_escape_translated(last_attachment_collection.name).gsub(""", + "\"")) end end end @@ -55,8 +57,8 @@ it "is not present" do within ".attachments .documents" do - expect(page).to have_content(/#{translated(attachment_collection.name, locale: :en)}/i) - expect(page).not_to have_content(/#{translated(empty_attachment_collection.name, locale: :en)}/i) + expect(page).to have_content(translated(attachment_collection.name)) + expect(page).not_to have_content(translated(empty_attachment_collection.name)) end end end diff --git a/decidim-core/lib/decidim/core/test/shared_examples/has_attachments.rb b/decidim-core/lib/decidim/core/test/shared_examples/has_attachments.rb index 16f879f147af0..f70341536e0ee 100644 --- a/decidim-core/lib/decidim/core/test/shared_examples/has_attachments.rb +++ b/decidim-core/lib/decidim/core/test/shared_examples/has_attachments.rb @@ -14,7 +14,7 @@ it "shows them" do within "div.wrapper .documents" do - expect(page).to have_content(/#{translated(document.title, locale: :en)}/i) + expect(page).to have_content(translated(document.title)) end within "div.wrapper .images" do @@ -27,7 +27,7 @@ let!(:last_document) { create(:attachment, :with_pdf, attached_to: attached_to, weight: 2) } let!(:first_document) { create(:attachment, :with_pdf, attached_to: attached_to, weight: 1) } let!(:last_image) { create(:attachment, attached_to: attached_to, weight: 2) } - let!(:fist_image) { create(:attachment, attached_to: attached_to, weight: 1) } + let!(:first_image) { create(:attachment, attached_to: attached_to, weight: 1) } before do visit current_path @@ -35,11 +35,11 @@ it "shows them ordered" do within "div.wrapper .documents" do - expect(translated(first_document.title, locale: :en)).to appear_before(translated(last_document.title, locale: :en)) + expect(decidim_escape_translated(first_document.title).gsub(""", "\"")).to appear_before(decidim_escape_translated(last_document.title).gsub(""", "\"")) end within "div.wrapper .images" do - expect(strip_tags(translated(fist_image.title, locale: :en))).to appear_before(strip_tags(translated(last_image.title, locale: :en))) + expect(strip_tags(translated(first_image.title, locale: :en))).to appear_before(strip_tags(translated(last_image.title, locale: :en))) end end end diff --git a/decidim-core/lib/decidim/view_model.rb b/decidim-core/lib/decidim/view_model.rb index 67e269aca37fe..ae33aac444e88 100644 --- a/decidim-core/lib/decidim/view_model.rb +++ b/decidim-core/lib/decidim/view_model.rb @@ -16,6 +16,7 @@ class ViewModel < Cell::ViewModel include Cell::Caching::Notifications include Decidim::MarkupHelper include ::Webpacker::Helper + include Decidim::SanitizeHelper delegate :current_organization, to: :controller diff --git a/decidim-core/spec/cells/decidim/upload_modal_cell_spec.rb b/decidim-core/spec/cells/decidim/upload_modal_cell_spec.rb index 6709f1b27855c..a73ae74247538 100644 --- a/decidim-core/spec/cells/decidim/upload_modal_cell_spec.rb +++ b/decidim-core/spec/cells/decidim/upload_modal_cell_spec.rb @@ -122,7 +122,7 @@ def model_name expect(subject).to have_selector("[data-filename='#{filename}']") details = subject.find(".attachment-details") - expect(details).to have_content("#{attachments[0].title["en"]} (#{filename})") + expect(details).to have_content("#{decidim_sanitize_translated(attachments[0].title)} (#{filename})") end end diff --git a/decidim-core/spec/controllers/pages_controller_spec.rb b/decidim-core/spec/controllers/pages_controller_spec.rb index 05c68d7408eb2..4870b8e6dded9 100644 --- a/decidim-core/spec/controllers/pages_controller_spec.rb +++ b/decidim-core/spec/controllers/pages_controller_spec.rb @@ -21,8 +21,8 @@ module Devise expect(response).to render_template(:show) - expect(response.body).to include(page.title[I18n.locale.to_s]) - expect(response.body).to include(page.content[I18n.locale.to_s]) + expect(response.body).to include(decidim_escape_translated(page.title)) + expect(response.body).to include(decidim_sanitize_admin(translated(page.content))) end end diff --git a/decidim-core/spec/helpers/decidim/scopes_helper_spec.rb b/decidim-core/spec/helpers/decidim/scopes_helper_spec.rb index ced6767de950c..ae3307967b3f4 100644 --- a/decidim-core/spec/helpers/decidim/scopes_helper_spec.rb +++ b/decidim-core/spec/helpers/decidim/scopes_helper_spec.rb @@ -15,7 +15,7 @@ module Decidim diff --git a/decidim-core/spec/serializers/decidim/importers/participatory_space_components_importer_spec.rb b/decidim-core/spec/serializers/decidim/importers/participatory_space_components_importer_spec.rb index 7635069ca331e..757590dd795ae 100644 --- a/decidim-core/spec/serializers/decidim/importers/participatory_space_components_importer_spec.rb +++ b/decidim-core/spec/serializers/decidim/importers/participatory_space_components_importer_spec.rb @@ -16,38 +16,39 @@ module Decidim::Importers let!(:component2) { create(:component, :with_one_step, :unpublished, :with_permissions, participatory_space: participatory_space, weight: 2) } let(:json_as_text) do - <<~EOJSON - [{ - "manifest_name": "#{component1.manifest_name}", - "id": #{component1.id}, - "name": { - "ca": "#{component1.name["ca"]}", - "en": "#{component1.name["en"]}", - "es": "#{component1.name["es"]}" + json = [ + { + manifest_name: component1.manifest_name, + id: component1.id, + name: { + ca: component1.name["ca"], + en: component1.name["en"], + es: component1.name["es"] }, - "participatory_space_id": #{previous_participatory_space.id}, - "participatory_space_type": "#{component1.participatory_space.class.name}", - "settings": #{component1.attributes["settings"].to_json}, - "weight": #{component1.weight}, - "permissions": #{component1.permissions.to_json}, - "published_at": "#{component1.published_at&.iso8601 || "null"}" + participatory_space_id: previous_participatory_space.id, + participatory_space_type: component1.participatory_space.class.name, + settings: component1.attributes["settings"], + weight: component1.weight, + permissions: component1.permissions, + published_at: component1.published_at&.iso8601 }, { - "manifest_name": "#{component2.manifest_name}", - "id": #{component2.id}, - "name": { - "ca": "#{component2.name["ca"]}", - "en": "#{component2.name["en"]}", - "es": "#{component2.name["es"]}" + manifest_name: component2.manifest_name, + id: component2.id, + name: { + ca: component2.name["ca"], + en: component2.name["en"], + es: component2.name["es"] }, - "participatory_space_id": #{previous_participatory_space.id}, - "participatory_space_type": "#{component2.participatory_space.class.name}", - "settings": #{component2.attributes["settings"].to_json}, - "weight": #{component2.weight}, - "permissions": #{component2.permissions.to_json}, - "published_at": "#{component2.published_at&.iso8601 || "null"}" + participatory_space_id: previous_participatory_space.id, + participatory_space_type: component2.participatory_space.class.name, + settings: component2.attributes["settings"], + weight: component2.weight, + permissions: component2.permissions, + published_at: component2.published_at&.iso8601 } - ] - EOJSON + ] + + JSON.generate(json) end describe "#import" do diff --git a/decidim-core/spec/system/homepage_spec.rb b/decidim-core/spec/system/homepage_spec.rb index c14c7f23efc63..1ab800e26f1fa 100644 --- a/decidim-core/spec/system/homepage_spec.rb +++ b/decidim-core/spec/system/homepage_spec.rb @@ -180,7 +180,7 @@ click_link static_page1.title["en"] expect(page).to have_i18n_content(static_page1.title) - expect(page).to have_i18n_content(static_page1.content) + expect(page).to have_i18n_content(static_page1.content, strip_tags: true) end it "includes the footer sub_hero with the current organization name" do diff --git a/decidim-core/spec/types/component_input_sort_spec.rb b/decidim-core/spec/types/component_input_sort_spec.rb index 707946787cd29..04f2c48bf7501 100644 --- a/decidim-core/spec/types/component_input_sort_spec.rb +++ b/decidim-core/spec/types/component_input_sort_spec.rb @@ -13,7 +13,7 @@ module Core let(:model) { create(:participatory_process, organization: current_organization) } let(:models) { model.components } - let!(:proposal) { create(:proposal_component, :published, participatory_space: model) } + let!(:proposal) { create(:proposal_component, :published, participatory_space: model, name: generate_component_name(current_organization.available_locales, :proposals)) } let!(:dummy) { create(:component, :published, participatory_space: model) } context "when sorting by component id" do diff --git a/decidim-dev/lib/decidim/dev/test/factories.rb b/decidim-dev/lib/decidim/dev/test/factories.rb index 60b600182a74f..0a83c6a14b3e0 100644 --- a/decidim-dev/lib/decidim/dev/test/factories.rb +++ b/decidim-dev/lib/decidim/dev/test/factories.rb @@ -2,6 +2,10 @@ FactoryBot.define do factory :dummy_component, parent: :component do + transient do + skip_injection { false } + end + name { Decidim::Components::Namer.new(participatory_space.organization.available_locales, :surveys).i18n_name } manifest_name { :dummy } end diff --git a/decidim-dev/lib/decidim/dev/test/rspec_support/decidim_sanitization.rb b/decidim-dev/lib/decidim/dev/test/rspec_support/decidim_sanitization.rb new file mode 100644 index 0000000000000..809391a4b3307 --- /dev/null +++ b/decidim-dev/lib/decidim/dev/test/rspec_support/decidim_sanitization.rb @@ -0,0 +1,5 @@ +# frozen_string_literal: true + +RSpec.configure do |config| + config.include Decidim::SanitizeHelper +end diff --git a/decidim-elections/lib/decidim/votings/admin_engine.rb b/decidim-elections/lib/decidim/votings/admin_engine.rb index b59af940620c4..1d7985d9300af 100644 --- a/decidim-elections/lib/decidim/votings/admin_engine.rb +++ b/decidim-elections/lib/decidim/votings/admin_engine.rb @@ -86,7 +86,7 @@ class AdminEngine < ::Rails::Engine initializer "decidim_votings.admin_votings_components_menu" do Decidim.menu :admin_votings_components_menu do |menu| current_participatory_space.components.each do |component| - caption = translated_attribute(component.name) + caption = decidim_escape_translated(component.name) if component.primary_stat.present? caption += content_tag(:span, component.primary_stat, class: component.primary_stat.zero? ? "component-counter component-counter--off" : "component-counter") end diff --git a/decidim-forms/spec/presenters/decidim/admin/questionnaire_answer_presenter_spec.rb b/decidim-forms/spec/presenters/decidim/admin/questionnaire_answer_presenter_spec.rb index 66c11c41025ba..38e1e914f4777 100644 --- a/decidim-forms/spec/presenters/decidim/admin/questionnaire_answer_presenter_spec.rb +++ b/decidim-forms/spec/presenters/decidim/admin/questionnaire_answer_presenter_spec.rb @@ -79,7 +79,7 @@ module Decidim let!(:attachment) { create(:attachment, :with_image, attached_to: answer) } it "returns the download attachment link" do - expect(subject.body).to eq(%()) + expect(subject.body).to eq(%()) end context "when the attachment does not have a title" do diff --git a/decidim-initiatives/app/helpers/decidim/initiatives/application_helper.rb b/decidim-initiatives/app/helpers/decidim/initiatives/application_helper.rb index 62376cfdb9440..9032d134e979a 100644 --- a/decidim-initiatives/app/helpers/decidim/initiatives/application_helper.rb +++ b/decidim-initiatives/app/helpers/decidim/initiatives/application_helper.rb @@ -92,7 +92,7 @@ def filter_areas(areas) def filter_areas_and_types(area_types) area_types.map do |area_type| TreeNode.new( - TreePoint.new(area_type.area_ids.join("_"), area_type.name[I18n.locale.to_s]), + TreePoint.new(area_type.area_ids.join("_"), decidim_escape_translated(area_type.name)), area_type.areas.map do |area| TreePoint.new(area.id.to_s, area.name[I18n.locale.to_s]) end diff --git a/decidim-initiatives/lib/decidim/initiatives/admin_engine.rb b/decidim-initiatives/lib/decidim/initiatives/admin_engine.rb index 965cb42816494..ac343f0edfba4 100644 --- a/decidim-initiatives/lib/decidim/initiatives/admin_engine.rb +++ b/decidim-initiatives/lib/decidim/initiatives/admin_engine.rb @@ -104,7 +104,7 @@ class AdminEngine < ::Rails::Engine initializer "admin_decidim_initiatives.admin_components_menu" do Decidim.menu :admin_initiatives_components_menu do |menu| current_participatory_space.components.each do |component| - caption = translated_attribute(component.name) + caption = decidim_escape_translated(component.name) if component.primary_stat.present? caption += content_tag(:span, component.primary_stat, class: component.primary_stat.zero? ? "component-counter component-counter--off" : "component-counter") end diff --git a/decidim-initiatives/spec/system/filter_initiatives_spec.rb b/decidim-initiatives/spec/system/filter_initiatives_spec.rb index 5d9952aa64221..f94b268b56d62 100644 --- a/decidim-initiatives/spec/system/filter_initiatives_spec.rb +++ b/decidim-initiatives/spec/system/filter_initiatives_spec.rb @@ -201,7 +201,6 @@ end it "doesn't display TYPE filter" do - expect(page).not_to have_content(/Type/i) expect(page).not_to have_css(".filters__section.with_any_type_check_boxes_tree_filter") end diff --git a/decidim-meetings/app/cells/decidim/meetings/highlighted_meetings_for_component/show.erb b/decidim-meetings/app/cells/decidim/meetings/highlighted_meetings_for_component/show.erb index c1d8fb54f74e2..4dcb699323061 100644 --- a/decidim-meetings/app/cells/decidim/meetings/highlighted_meetings_for_component/show.erb +++ b/decidim-meetings/app/cells/decidim/meetings/highlighted_meetings_for_component/show.erb @@ -1,7 +1,7 @@ <% if upcoming_meetings.any? %>

- <%= translated_attribute(model.name) %> - <%= t("decidim.participatory_spaces.highlighted_meetings.upcoming_meetings") %> + <%= decidim_escape_translated(model.name) %> - <%= t("decidim.participatory_spaces.highlighted_meetings.upcoming_meetings") %> <%= t("decidim.participatory_spaces.highlighted_meetings.see_all", count: upcoming_meetings_count) %>

@@ -18,7 +18,7 @@ <% elsif past_meetings.any? %>

- <%= translated_attribute(model.name) %> - <%= t("decidim.participatory_spaces.highlighted_meetings.past_meetings") %> <%= t("decidim.participatory_spaces.highlighted_meetings.see_all", count: past_meetings_count) %> + <%= decidim_escape_translated(model.name) %> - <%= t("decidim.participatory_spaces.highlighted_meetings.past_meetings") %> <%= t("decidim.participatory_spaces.highlighted_meetings.see_all", count: past_meetings_count) %>

<% past_meetings.each do |meeting| %> diff --git a/decidim-participatory_processes/lib/decidim/participatory_processes/admin_engine.rb b/decidim-participatory_processes/lib/decidim/participatory_processes/admin_engine.rb index 7e790fe37c0c9..3ef4f538c7099 100644 --- a/decidim-participatory_processes/lib/decidim/participatory_processes/admin_engine.rb +++ b/decidim-participatory_processes/lib/decidim/participatory_processes/admin_engine.rb @@ -153,7 +153,7 @@ class AdminEngine < ::Rails::Engine initializer "decidim_participatory_processes.admin_process_components_menu" do Decidim.menu :admin_participatory_process_components_menu do |menu| current_participatory_space.components.each do |component| - caption = translated_attribute(component.name) + caption = decidim_escape_translated(component.name) if component.primary_stat.present? caption += content_tag(:span, component.primary_stat, class: component.primary_stat.zero? ? "component-counter component-counter--off" : "component-counter") end diff --git a/decidim-participatory_processes/lib/decidim/participatory_processes/test/factories.rb b/decidim-participatory_processes/lib/decidim/participatory_processes/test/factories.rb index 6e16991fb2eef..6157e254bb6c9 100644 --- a/decidim-participatory_processes/lib/decidim/participatory_processes/test/factories.rb +++ b/decidim-participatory_processes/lib/decidim/participatory_processes/test/factories.rb @@ -11,6 +11,9 @@ end factory :participatory_process, class: "Decidim::ParticipatoryProcess" do + transient do + skip_injection { false } + end title { generate_localized_title } slug { generate(:participatory_process_slug) } subtitle { generate_localized_title } @@ -111,6 +114,9 @@ end factory :participatory_process_step, class: "Decidim::ParticipatoryProcessStep" do + transient do + skip_injection { false } + end title { generate_localized_title } description { Decidim::Faker::Localized.wrapped("

", "

") { generate_localized_title } } start_date { 1.month.ago } diff --git a/decidim-proposals/app/cells/decidim/proposals/highlighted_proposals_for_component/show.erb b/decidim-proposals/app/cells/decidim/proposals/highlighted_proposals_for_component/show.erb index efd3a5fa11d99..189d93a9d5679 100644 --- a/decidim-proposals/app/cells/decidim/proposals/highlighted_proposals_for_component/show.erb +++ b/decidim-proposals/app/cells/decidim/proposals/highlighted_proposals_for_component/show.erb @@ -1,6 +1,6 @@

- <%= translated_attribute(model.name) %> <%= t("decidim.participatory_spaces.highlighted_proposals.see_all", count: proposals_count) %> + <%= decidim_escape_translated(model.name) %> <%= t("decidim.participatory_spaces.highlighted_proposals.see_all", count: proposals_count) %>

<%= cell( From ae5b97af07410324fa4f59f91f7600e2470bf737 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20Pereira=20de=20Lucena?= Date: Fri, 15 Mar 2024 10:06:57 +0100 Subject: [PATCH 05/88] Backport 'Fix decidim-templates usage' to v0.27 (#12600) * Fix decidim-templates usage * Fix decidim-templates usage * Apply review recommendations * Remove unexisting helper in this version * Remove unused i18n string --------- Co-authored-by: Alexandru Emil Lupu --- Gemfile.lock | 1 - .../app/controllers/decidim/admin/application_controller.rb | 1 + .../decidim/forms/admin/concerns/has_questionnaire.rb | 2 +- decidim-generators/Gemfile.lock | 1 - decidim-surveys/decidim-surveys.gemspec | 2 +- decidim-surveys/lib/decidim/surveys/engine.rb | 1 - decidim_app-design/Gemfile.lock | 1 - 7 files changed, 3 insertions(+), 6 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index e6d237edd1505..26a2262127bd2 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -183,7 +183,6 @@ PATH decidim-surveys (0.27.5) decidim-core (= 0.27.5) decidim-forms (= 0.27.5) - decidim-templates (= 0.27.5) decidim-system (0.27.5) active_link_to (~> 1.0) decidim-core (= 0.27.5) diff --git a/decidim-admin/app/controllers/decidim/admin/application_controller.rb b/decidim-admin/app/controllers/decidim/admin/application_controller.rb index 5045c8d1e4e76..2891c70690585 100644 --- a/decidim-admin/app/controllers/decidim/admin/application_controller.rb +++ b/decidim-admin/app/controllers/decidim/admin/application_controller.rb @@ -30,6 +30,7 @@ class ApplicationController < ::DecidimController helper Decidim::LanguageChooserHelper helper Decidim::ComponentPathHelper helper Decidim::SanitizeHelper + helper Decidim::Templates::Admin::ApplicationHelper if Decidim.module_installed?(:templates) && defined?(Decidim::Templates::Admin::ApplicationHelper) default_form_builder Decidim::Admin::FormBuilder diff --git a/decidim-forms/app/controllers/decidim/forms/admin/concerns/has_questionnaire.rb b/decidim-forms/app/controllers/decidim/forms/admin/concerns/has_questionnaire.rb index fd17d5e49d448..5b9f836df2f04 100644 --- a/decidim-forms/app/controllers/decidim/forms/admin/concerns/has_questionnaire.rb +++ b/decidim-forms/app/controllers/decidim/forms/admin/concerns/has_questionnaire.rb @@ -20,7 +20,7 @@ module HasQuestionnaire helper_method :questionnaire_for, :questionnaire, :blank_question, :blank_answer_option, :blank_matrix_row, :blank_display_condition, :question_types, :display_condition_types, :update_url, :public_url, :answer_options_url, :edit_questionnaire_title - if defined? Decidim::Templates::Admin + if defined?(Decidim::Templates::Admin::Concerns::Templatable) include Decidim::Templates::Admin::Concerns::Templatable helper Decidim::DatalistSelectHelper diff --git a/decidim-generators/Gemfile.lock b/decidim-generators/Gemfile.lock index ae8ca0db4f370..fb56e8d4cf49c 100644 --- a/decidim-generators/Gemfile.lock +++ b/decidim-generators/Gemfile.lock @@ -183,7 +183,6 @@ PATH decidim-surveys (0.27.5) decidim-core (= 0.27.5) decidim-forms (= 0.27.5) - decidim-templates (= 0.27.5) decidim-system (0.27.5) active_link_to (~> 1.0) decidim-core (= 0.27.5) diff --git a/decidim-surveys/decidim-surveys.gemspec b/decidim-surveys/decidim-surveys.gemspec index 7a032f06396c1..0a3f40553015c 100644 --- a/decidim-surveys/decidim-surveys.gemspec +++ b/decidim-surveys/decidim-surveys.gemspec @@ -27,9 +27,9 @@ Gem::Specification.new do |s| s.add_dependency "decidim-core", Decidim::Surveys.version s.add_dependency "decidim-forms", Decidim::Surveys.version - s.add_dependency "decidim-templates", Decidim::Surveys.version s.add_development_dependency "decidim-admin", Decidim::Surveys.version s.add_development_dependency "decidim-dev", Decidim::Surveys.version s.add_development_dependency "decidim-participatory_processes", Decidim::Surveys.version + s.add_development_dependency "decidim-templates", Decidim::Surveys.version end diff --git a/decidim-surveys/lib/decidim/surveys/engine.rb b/decidim-surveys/lib/decidim/surveys/engine.rb index 3f11f3c4dea74..9366450cd9dfb 100644 --- a/decidim-surveys/lib/decidim/surveys/engine.rb +++ b/decidim-surveys/lib/decidim/surveys/engine.rb @@ -1,7 +1,6 @@ # frozen_string_literal: true require "decidim/core" -require "decidim/templates" module Decidim module Surveys diff --git a/decidim_app-design/Gemfile.lock b/decidim_app-design/Gemfile.lock index 16161fa3445b6..aea3d209b8151 100644 --- a/decidim_app-design/Gemfile.lock +++ b/decidim_app-design/Gemfile.lock @@ -183,7 +183,6 @@ PATH decidim-surveys (0.27.5) decidim-core (= 0.27.5) decidim-forms (= 0.27.5) - decidim-templates (= 0.27.5) decidim-system (0.27.5) active_link_to (~> 1.0) decidim-core (= 0.27.5) From c3495d5b869d7136b05adefe8dcd94b2d4bb709e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20Pereira=20de=20Lucena?= Date: Tue, 19 Mar 2024 08:06:14 +0100 Subject: [PATCH 06/88] Backport 'Fix images URL in newsletters' to v0.27 (#12612) * Fix images URL in newsletters * Fix syntax for ruby version --------- Co-authored-by: Quentin Champenois <26109239+Quentinchampenois@users.noreply.github.com> --- .../app/helpers/decidim/newsletters_helper.rb | 99 ++++++++++++++++--- .../decidim/newsletters_helper_spec.rb | 91 +++++++++++++++-- 2 files changed, 164 insertions(+), 26 deletions(-) diff --git a/decidim-core/app/helpers/decidim/newsletters_helper.rb b/decidim-core/app/helpers/decidim/newsletters_helper.rb index ea0e31c0e5f86..821871b632555 100644 --- a/decidim-core/app/helpers/decidim/newsletters_helper.rb +++ b/decidim-core/app/helpers/decidim/newsletters_helper.rb @@ -8,28 +8,28 @@ module NewslettersHelper # for example transform "https://es.lipsum.com/" to "https://es.lipsum.com/?utm_source=localhost&utm_campaign=newsletter_11" # And replace "%{name}" on the subject or content of newsletter to the user Name # for example transform "%{name}" to "User Name" + # + # @param content [String] - the string to convert + # @param user [Decidim::User] - the user to replace + # @param id [Integer] - the id of the newsletter to change + # + # @return [String] - the content converted def parse_interpolations(content, user = nil, id = nil) - if Decidim.config.track_newsletter_links && id.present? && user.present? - host = user.organization.host.to_s - campaign = "newsletter_#{id}" + host = user&.organization&.host&.to_s - links = content.scan(/href\s*=\s*"([^"]*)"/) - - links.each do |link| - link_replaced = link.first + utm_codes(host, campaign) - content = content.gsub(/href\s*=\s*"([^"]*#{link.first})"/, %(href="#{link_replaced}")) - end - end - - if user.present? - content.gsub("%{name}", user.name) - else - content.gsub("%{name}", "") - end + content = interpret_name(content, user) + content = track_newsletter_links(content, id, host) + transform_image_urls(content, host) end # this method is used to generate the root link on mail with the utm_codes # If the newsletter_id is nil, it returns the root_url + # + # @param organization [Decidim::Organization] - the Organization of this newsletter + # @param newsletter_id [Integer] - the id of the newsletter + # + # @return [String] - the root_url converted + # def custom_url_for_mail_root(organization, newsletter_id = nil) decidim = EngineRouter.new("decidim", {}) if newsletter_id.present? @@ -39,10 +39,77 @@ def custom_url_for_mail_root(organization, newsletter_id = nil) end end + private + # Method to specify the utm_codes. # You can change or add utm_codes for track + # + # @param host [String] - the Decidim::Organization host add to the URL + # @param newsletter_id [String] - the ID of the newsletter + # + # @return [String] - the UTM codes to be added + # def utm_codes(host, newsletter_id) "?utm_source=#{host}&utm_campaign=#{newsletter_id}" end + + # Interpret placeholder '%{name}' and replace by the user name + # If user is not define, it returns content with blank instead of the placeholder + # + # @param content [String] - the string to convert + # @param user [Decidim::User] - the user to replace + # + # @return [String] - the content converted + # + def interpret_name(content, user) + return content.gsub("%{name}", "") if user.blank? + + content.gsub("%{name}", user.name) + end + + # Find each img HTML tag with relative path in src attribute + # For each URL, prepends the decidim.root_url + # If host is not defined it returns full content + # + # @param content [String] - the string to convert + # @param host [String] - the Decidim::Organization host to replace + # + # @return [String] - the content converted + # + def transform_image_urls(content, host) + return content if host.blank? + + content.scan(/src\s*=\s*"([^"]*)"/).each do |src| + root_url = decidim.root_url(host: host)[0..-2] + src_replaced = "#{root_url}#{src.first}" + content = content.gsub(/src\s*=\s*"([^"]*#{src.first})"/, %(src="#{src_replaced}")) + end + + content + end + + # Add tracking query params to each links + # + # @param content [String] - the string to convert + # @param id [Integer] - the id of the newsletter + # @param host [String] - the Decidim::Organization host + # + # @return [String] - the content converted + # + def track_newsletter_links(content, id, host) + return content unless Decidim.config.track_newsletter_links + return content if id.blank? + return content if host.blank? + + campaign = "newsletter_#{id}" + links = content.scan(/href\s*=\s*"([^"]*)"/) + + links.each do |link| + link_replaced = link.first + utm_codes(host, campaign) + content = content.gsub(/href\s*=\s*"([^"]*#{link.first})"/, %(href="#{link_replaced}")) + end + + content + end end end diff --git a/decidim-core/spec/helpers/decidim/newsletters_helper_spec.rb b/decidim-core/spec/helpers/decidim/newsletters_helper_spec.rb index 5b566327012ad..7df9537c22015 100644 --- a/decidim-core/spec/helpers/decidim/newsletters_helper_spec.rb +++ b/decidim-core/spec/helpers/decidim/newsletters_helper_spec.rb @@ -7,24 +7,56 @@ # module Decidim describe NewslettersHelper do + let(:user) { create(:user, name: "Jane Doe", organization: organization) } + let(:organization) { create(:organization, host: "localhost") } + let(:newsletter) { create(:newsletter) } + let(:text) do + %{(

Hello, %{name}

+Link +image +Link +second image)} + end + describe "#parse_interpolations" do - describe "when the user is present" do - subject { helper.parse_interpolations(text, user, newsletter.id) } + subject { helper.parse_interpolations(text, user, newsletter.id) } - let(:text) { %{(

Hello, %{name} Link

)} } - let(:user) { create(:user, name: "User Name") } - let(:organization) { create(:organization, host: "localhost") } - let(:newsletter) { create(:newsletter) } + it "replaces %{name} with user name" do + expect(subject).to include("Hello, Jane Doe") + end + + it "replaces links with utm codes" do + expect(subject).to include("https://meta.decidim.org?utm_source=#{organization.host}&utm_campaign=newsletter_#{newsletter.id}") + expect(subject).to include("https://meta.decidim.org/?utm_source=#{organization.host}&utm_campaign=newsletter_#{newsletter.id}") + end + + it "transforms image URLs with the host" do + expect(subject).to include('Hello, User Name Link

)}) } + it "does not replace links with utm codes" do + expect(subject).to include('Link') + expect(subject).to include('Link') + expect(subject).not_to include("?utm_source=#{organization.host}&utm_campaign=newsletter_#{newsletter.id}") + end end - describe "when the user is not present" do + context "when the user is not present" do subject { helper.parse_interpolations(text) } - let(:text) { "

Hello, %{name}

" } + it { is_expected.to include("

Hello,

") } - it { is_expected.to eq("

Hello,

") } + it "does not replace links with utm codes" do + expect(subject).to include('Link') + expect(subject).to include('Link') + expect(subject).not_to include("?utm_source=#{organization.host}&utm_campaign=newsletter_#{newsletter.id}") + end end end @@ -45,5 +77,44 @@ module Decidim it { is_expected.to eq(decidim.root_url(host: organization.host, port: Capybara.server_port)) } end end + + describe "#utm_codes" do + subject { helper.send(:utm_codes, organization.host, newsletter.id) } + + it "returns the utm codes" do + expect(subject).to eq("?utm_source=#{organization.host}&utm_campaign=#{newsletter.id}") + end + end + + describe "#interpret_name" do + subject { helper.send(:interpret_name, text, user) } + + it "replaces '%{name}' with user name" do + expect(subject).to include("Hello, Jane Doe") + end + + context "when user is not present" do + subject { helper.send(:interpret_name, text, nil) } + + it { is_expected.to include("

Hello,

") } + end + end + + describe "#transform_image_urls" do + subject { helper.send(:transform_image_urls, text, organization.host) } + + it "transforms image URLs with the host" do + expect(subject).to include(' Date: Tue, 19 Mar 2024 08:23:10 +0100 Subject: [PATCH 07/88] New Crowdin updates (#12357) * New translations en.yml (German) * New translations en.yml (German) * New translations en.yml (Czech) * New translations en.yml (Czech) * New translations en.yml (Czech) * New translations en.yml (Czech) * New translations en.yml (Czech) * New translations en.yml (Polish) * New translations en.yml (Romanian) * New translations en.yml (French) * New translations en.yml (Spanish) * New translations en.yml (Arabic) * New translations en.yml (Bulgarian) * New translations en.yml (Catalan) * New translations en.yml (Czech) * New translations en.yml (German) * New translations en.yml (Greek) * New translations en.yml (Basque) * New translations en.yml (Finnish) * New translations en.yml (Hungarian) * New translations en.yml (Italian) * New translations en.yml (Japanese) * New translations en.yml (Lithuanian) * New translations en.yml (Dutch) * New translations en.yml (Norwegian) * New translations en.yml (Polish) * New translations en.yml (Portuguese) * New translations en.yml (Slovak) * New translations en.yml (Swedish) * New translations en.yml (Turkish) * New translations en.yml (Chinese Simplified) * New translations en.yml (Chinese Traditional) * New translations en.yml (Galician) * New translations en.yml (Icelandic) * New translations en.yml (Portuguese, Brazilian) * New translations en.yml (Indonesian) * New translations en.yml (Spanish, Mexico) * New translations en.yml (Latvian) * New translations en.yml (French, Canada) * New translations en.yml (Spanish, Paraguay) * New translations en.yml (Ukrainian with many plural form) * New translations en.yml (Russian with many plural form) * New translations en.yml (Finnish (plain)) * New translations en.yml (Polish) * New translations en.yml (Turkish) * New translations en.yml (German) * New translations en.yml (Hungarian) * New translations en.yml (French) * New translations en.yml (German) * New translations en.yml (Basque) * New translations en.yml (French, Canada) * New translations en.yml (Japanese) * New translations en.yml (Finnish (plain)) * New translations en.yml (Finnish) * New translations en.yml (Finnish (plain)) * New translations en.yml (Spanish) * New translations en.yml (Catalan) * New translations en.yml (Czech) * New translations en.yml (Portuguese, Brazilian) * New translations en.yml (Spanish, Mexico) * New translations en.yml (Spanish, Paraguay) * New translations en.yml (Romanian) * New translations en.yml (French) * New translations en.yml (Spanish) * New translations en.yml (Arabic) * New translations en.yml (Catalan) * New translations en.yml (Czech) * New translations en.yml (German) * New translations en.yml (Greek) * New translations en.yml (Basque) * New translations en.yml (Finnish) * New translations en.yml (Hungarian) * New translations en.yml (Italian) * New translations en.yml (Japanese) * New translations en.yml (Lithuanian) * New translations en.yml (Dutch) * New translations en.yml (Norwegian) * New translations en.yml (Polish) * New translations en.yml (Portuguese) * New translations en.yml (Slovenian) * New translations en.yml (Swedish) * New translations en.yml (Turkish) * New translations en.yml (Chinese Simplified) * New translations en.yml (Chinese Traditional) * New translations en.yml (Galician) * New translations en.yml (Portuguese, Brazilian) * New translations en.yml (Indonesian) * New translations en.yml (Spanish, Mexico) * New translations en.yml (Latvian) * New translations en.yml (French, Canada) * New translations en.yml (Spanish, Paraguay) * New translations en.yml (Finnish (plain)) * New translations en.yml (Arabic) * New translations en.yml (German) * New translations en.yml (Basque) * New translations en.yml (Slovak) * New translations en.yml (Turkish) * New translations en.yml (Chinese Simplified) * New translations en.yml (Indonesian) * New translations en.yml (Latvian) * New translations en.yml (Finnish (plain)) * New translations en.yml (Basque) * New translations en.yml (Polish) * New translations en.yml (Basque) * New translations en.yml (Basque) * New translations en.yml (French) * New translations en.yml (Spanish) * New translations en.yml (Catalan) * New translations en.yml (German) * New translations en.yml (Finnish) * New translations en.yml (Spanish, Mexico) * New translations en.yml (French, Canada) * New translations en.yml (Spanish, Paraguay) * New translations en.yml (Finnish (plain)) * New translations en.yml (Finnish) * New translations en.yml (Finnish) * New translations en.yml (Finnish) * New translations en.yml (Finnish) * New translations en.yml (French) * New translations en.yml (French, Canada) * New translations en.yml (Romanian) * New translations en.yml (French) * New translations en.yml (Spanish) * New translations en.yml (Arabic) * New translations en.yml (Catalan) * New translations en.yml (Czech) * New translations en.yml (German) * New translations en.yml (Greek) * New translations en.yml (Basque) * New translations en.yml (Finnish) * New translations en.yml (Irish) * New translations en.yml (Hungarian) * New translations en.yml (Italian) * New translations en.yml (Japanese) * New translations en.yml (Lithuanian) * New translations en.yml (Dutch) * New translations en.yml (Norwegian) * New translations en.yml (Polish) * New translations en.yml (Portuguese) * New translations en.yml (Slovak) * New translations en.yml (Swedish) * New translations en.yml (Turkish) * New translations en.yml (Chinese Simplified) * New translations en.yml (Chinese Traditional) * New translations en.yml (Galician) * New translations en.yml (Icelandic) * New translations en.yml (Portuguese, Brazilian) * New translations en.yml (Indonesian) * New translations en.yml (Spanish, Mexico) * New translations en.yml (Latvian) * New translations en.yml (French, Canada) * New translations en.yml (Spanish, Paraguay) * New translations en.yml (Ukrainian with many plural form) * New translations en.yml (Russian with many plural form) * New translations en.yml (Finnish (plain)) * New translations en.yml (Japanese) * New translations en.yml (Swedish) * New translations en.yml (Swedish) * New translations en.yml (Swedish) * New translations en.yml (Norwegian) * New translations en.yml (Turkish) * New translations en.yml (Czech) * New translations en.yml (Czech) * New translations en.yml (German) * New translations en.yml (German) * New translations en.yml (Finnish) * New translations en.yml (German) * New translations en.yml (German) * New translations en.yml (German) * New translations en.yml (Finnish) * New translations en.yml (German) * New translations en.yml (Finnish) * New translations en.yml (German) * New translations en.yml (German) * New translations en.yml (German) * New translations en.yml (German) * New translations en.yml (German) * New translations en.yml (German) * New translations en.yml (Greek) * New translations en.yml (Italian) * New translations en.yml (Norwegian) * New translations en.yml (Portuguese) * New translations en.yml (Turkish) * New translations en.yml (Galician) * New translations en.yml (Luxembourgish) * New translations en.yml (Hungarian) * New translations en.yml (Hungarian) * New translations en.yml (Hungarian) * New translations en.yml (Hungarian) * New translations en.yml (Hungarian) * New translations en.yml (Hungarian) * New translations en.yml (Hungarian) * New translations en.yml (Hungarian) * New translations en.yml (Hungarian) * New translations en.yml (Hungarian) * New translations en.yml (Hungarian) * New translations en.yml (Hungarian) * New translations en.yml (Hungarian) * New translations en.yml (Hungarian) * New translations en.yml (Hungarian) * New translations en.yml (Hungarian) * New translations en.yml (Hungarian) * New translations en.yml (Hungarian) * New translations en.yml (Hungarian) * New translations en.yml (Hungarian) * New translations en.yml (Hungarian) * New translations en.yml (Hungarian) * New translations en.yml (Hungarian) * New translations en.yml (Spanish) * New translations en.yml (Catalan) --- decidim-admin/config/locales/cs.yml | 8 ++++ decidim-admin/config/locales/de.yml | 1 + decidim-admin/config/locales/fi.yml | 4 +- decidim-admin/config/locales/hu.yml | 12 ++++++ decidim-assemblies/config/locales/ar.yml | 1 - decidim-assemblies/config/locales/ca.yml | 6 +-- decidim-assemblies/config/locales/de.yml | 4 +- decidim-assemblies/config/locales/el.yml | 1 - decidim-assemblies/config/locales/es.yml | 4 +- decidim-assemblies/config/locales/eu.yml | 2 +- .../config/locales/fi-plain.yml | 2 +- decidim-assemblies/config/locales/gl.yml | 1 - decidim-assemblies/config/locales/hu.yml | 2 + decidim-assemblies/config/locales/id-ID.yml | 1 - decidim-assemblies/config/locales/it.yml | 1 - decidim-assemblies/config/locales/lt.yml | 1 - decidim-assemblies/config/locales/lv.yml | 1 - decidim-assemblies/config/locales/nl.yml | 1 - decidim-assemblies/config/locales/no.yml | 1 - decidim-assemblies/config/locales/pt-BR.yml | 1 - decidim-assemblies/config/locales/pt.yml | 1 - decidim-assemblies/config/locales/ro-RO.yml | 1 - decidim-assemblies/config/locales/sl.yml | 1 - decidim-assemblies/config/locales/sv.yml | 1 - decidim-assemblies/config/locales/tr-TR.yml | 1 - decidim-assemblies/config/locales/zh-CN.yml | 1 - decidim-assemblies/config/locales/zh-TW.yml | 1 - decidim-blogs/config/locales/hu.yml | 8 ++-- decidim-budgets/config/locales/cs.yml | 3 ++ decidim-budgets/config/locales/de.yml | 4 +- decidim-budgets/config/locales/hu.yml | 2 + decidim-comments/config/locales/hu.yml | 2 +- decidim-conferences/config/locales/fi.yml | 2 +- decidim-conferences/config/locales/hu.yml | 2 + decidim-consultations/config/locales/de.yml | 4 +- decidim-consultations/config/locales/hu.yml | 4 ++ decidim-core/config/locales/cs.yml | 3 ++ decidim-core/config/locales/de.yml | 11 ++++-- decidim-core/config/locales/el.yml | 1 + decidim-core/config/locales/eu.yml | 6 +++ decidim-core/config/locales/fi.yml | 4 +- decidim-core/config/locales/gl.yml | 3 ++ decidim-core/config/locales/hu.yml | 38 +++++++++++++++---- decidim-core/config/locales/it.yml | 1 + decidim-core/config/locales/lb.yml | 1 + decidim-core/config/locales/no.yml | 1 + decidim-core/config/locales/pt-BR.yml | 2 +- decidim-core/config/locales/pt.yml | 1 + decidim-core/config/locales/sv.yml | 22 +++++++++++ decidim-core/config/locales/tr-TR.yml | 1 + decidim-debates/config/locales/hu.yml | 6 +-- decidim-dev/config/locales/hu.yml | 4 +- decidim-elections/config/locales/cs.yml | 2 + decidim-elections/config/locales/hu.yml | 9 +++++ decidim-elections/config/locales/sv.yml | 1 + decidim-forms/config/locales/hu.yml | 6 +-- decidim-initiatives/config/locales/de.yml | 12 +++--- decidim-initiatives/config/locales/hu.yml | 13 +++++-- decidim-meetings/config/locales/de.yml | 2 +- decidim-meetings/config/locales/fi.yml | 2 +- decidim-meetings/config/locales/hu.yml | 3 ++ decidim-meetings/config/locales/sv.yml | 1 + .../config/locales/ar.yml | 1 - .../config/locales/de.yml | 2 +- .../config/locales/eu.yml | 5 ++- .../config/locales/fi-plain.yml | 2 +- .../config/locales/fi.yml | 2 +- .../config/locales/id-ID.yml | 1 - .../config/locales/lv.yml | 1 - .../config/locales/no.yml | 26 +++++++++++++ .../config/locales/sk.yml | 1 - .../config/locales/tr-TR.yml | 2 +- .../config/locales/zh-CN.yml | 1 - decidim-proposals/config/locales/ar.yml | 5 +-- decidim-proposals/config/locales/bg.yml | 5 ++- decidim-proposals/config/locales/ca.yml | 10 +++-- decidim-proposals/config/locales/cs.yml | 3 -- decidim-proposals/config/locales/de.yml | 12 +++--- decidim-proposals/config/locales/el.yml | 3 -- decidim-proposals/config/locales/es-MX.yml | 12 +++--- decidim-proposals/config/locales/es-PY.yml | 14 ++++--- decidim-proposals/config/locales/es.yml | 10 +++-- decidim-proposals/config/locales/eu.yml | 8 ++-- decidim-proposals/config/locales/fi-plain.yml | 12 +++--- decidim-proposals/config/locales/fi.yml | 10 +++-- decidim-proposals/config/locales/fr-CA.yml | 14 ++++--- decidim-proposals/config/locales/fr.yml | 14 ++++--- decidim-proposals/config/locales/gl.yml | 4 +- decidim-proposals/config/locales/hu.yml | 21 +++++----- decidim-proposals/config/locales/id-ID.yml | 4 +- decidim-proposals/config/locales/is-IS.yml | 7 ++-- decidim-proposals/config/locales/it.yml | 8 ++-- decidim-proposals/config/locales/ja.yml | 12 +++--- decidim-proposals/config/locales/lt.yml | 3 -- decidim-proposals/config/locales/lv.yml | 4 +- decidim-proposals/config/locales/nl.yml | 10 ++--- decidim-proposals/config/locales/no.yml | 4 +- decidim-proposals/config/locales/pl.yml | 10 +++-- decidim-proposals/config/locales/pt-BR.yml | 3 -- decidim-proposals/config/locales/pt.yml | 4 +- decidim-proposals/config/locales/ro-RO.yml | 4 +- decidim-proposals/config/locales/ru.yml | 7 ++-- decidim-proposals/config/locales/sk.yml | 12 +++--- decidim-proposals/config/locales/sv.yml | 9 ++--- decidim-proposals/config/locales/tr-TR.yml | 13 ++++--- decidim-proposals/config/locales/uk.yml | 7 ++-- decidim-proposals/config/locales/zh-CN.yml | 4 +- decidim-proposals/config/locales/zh-TW.yml | 3 -- decidim-sortitions/config/locales/de.yml | 2 +- decidim-system/config/locales/fi.yml | 4 +- decidim-system/config/locales/hu.yml | 5 +++ decidim-verifications/config/locales/ar.yml | 5 --- decidim-verifications/config/locales/ca.yml | 7 ++-- decidim-verifications/config/locales/cs.yml | 7 ++-- decidim-verifications/config/locales/de.yml | 7 ++-- decidim-verifications/config/locales/el.yml | 5 --- .../config/locales/es-MX.yml | 7 ++-- .../config/locales/es-PY.yml | 7 ++-- decidim-verifications/config/locales/es.yml | 7 ++-- decidim-verifications/config/locales/eu.yml | 7 ++-- .../config/locales/fi-plain.yml | 7 ++-- decidim-verifications/config/locales/fi.yml | 7 ++-- .../config/locales/fr-CA.yml | 7 ++-- decidim-verifications/config/locales/fr.yml | 7 ++-- .../config/locales/ga-IE.yml | 2 - decidim-verifications/config/locales/gl.yml | 5 --- decidim-verifications/config/locales/hu.yml | 6 +-- .../config/locales/id-ID.yml | 5 --- .../config/locales/is-IS.yml | 4 -- decidim-verifications/config/locales/it.yml | 5 --- decidim-verifications/config/locales/ja.yml | 7 ++-- decidim-verifications/config/locales/lt.yml | 6 +-- decidim-verifications/config/locales/lv.yml | 3 -- decidim-verifications/config/locales/nl.yml | 5 --- decidim-verifications/config/locales/no.yml | 5 --- decidim-verifications/config/locales/pl.yml | 6 +-- .../config/locales/pt-BR.yml | 5 --- decidim-verifications/config/locales/pt.yml | 5 --- .../config/locales/ro-RO.yml | 5 --- decidim-verifications/config/locales/ru.yml | 5 --- decidim-verifications/config/locales/sk.yml | 5 --- decidim-verifications/config/locales/sv.yml | 5 --- .../config/locales/tr-TR.yml | 6 +-- decidim-verifications/config/locales/uk.yml | 5 --- .../config/locales/zh-CN.yml | 5 --- .../config/locales/zh-TW.yml | 6 +-- 146 files changed, 403 insertions(+), 384 deletions(-) diff --git a/decidim-admin/config/locales/cs.yml b/decidim-admin/config/locales/cs.yml index 9d7063c5ea9e7..43c232d94d1eb 100644 --- a/decidim-admin/config/locales/cs.yml +++ b/decidim-admin/config/locales/cs.yml @@ -366,6 +366,8 @@ cs: view_more_logs: Zobrazit další protokoly welcome: Vítejte v Admin panelu. domain_whitelist: + form: + domain_too_short: Doména je příliš krátká update: error: Nepodařilo se aktualizovat seznam povolených domén success: Seznam povolených domén byl úspěšně aktualizován @@ -554,6 +556,7 @@ cs: areas: Oblasti configuration: Konfigurace dashboard: Ovládací panel + external_domain_whitelist: Povolené externí domény help_sections: Sekce nápovědy homepage: Domovská stránka impersonations: V zastoupení @@ -829,6 +832,11 @@ cs: organization_external_domain_whitelist: edit: update: Aktualizace + external_domain: + down: Dolů + external_domain: Externí doména + remove: Odstranit + up: Nahoru form: add: Přidat do seznamu povolených title: Seznam externích povolených domén diff --git a/decidim-admin/config/locales/de.yml b/decidim-admin/config/locales/de.yml index 4a095603aef96..f8dc273b1b5d5 100644 --- a/decidim-admin/config/locales/de.yml +++ b/decidim-admin/config/locales/de.yml @@ -548,6 +548,7 @@ de: areas: Bereiche configuration: Aufbau dashboard: Instrumententafel + external_domain_whitelist: Erlaubte externe Domains help_sections: Hilfeabschnitte homepage: Startseite impersonations: Identitätswechsel diff --git a/decidim-admin/config/locales/fi.yml b/decidim-admin/config/locales/fi.yml index 0913eb0f015bd..adcfedfb7b0bd 100644 --- a/decidim-admin/config/locales/fi.yml +++ b/decidim-admin/config/locales/fi.yml @@ -53,7 +53,7 @@ fi: enable_omnipresent_banner: Näytä kaikkialla näkyvä banneri enable_participatory_space_filters: Ota käyttöön osallistumistilan suodattimet facebook_handler: Facebook-käsittelijä - favicon: ikoni + favicon: Kuvake force_authentication: Kirjautuminen vaaditaan force_users_to_authenticate_before_access_organization: Pakota käyttäjät kirjautumaan ennen organisaatioon pääsyä from: Lähettäjän sähköpostiosoite @@ -925,7 +925,7 @@ fi: success: Tunnisteen poistaminen onnistui. share_tokens: empty: Aktiivisia tunnisteita ei ole tällä hetkellä - help: Näitä tunnisteita käytetään jaettaessa tätä julkaisematonta kohdetta muille käyttäjille. Ne piilotetaan, kun kohde julkaistaan. Klikkaa tunnisteen jakoikonia vieraillaksesi jaettavassa URL-osoitteessa. + help: Näitä tunnisteita käytetään jaettaessa tätä julkaisematonta kohdetta muille käyttäjille. Ne piilotetaan, kun kohde julkaistaan. Klikkaa tunnisteen jakokuvaketta vieraillaksesi jaettavassa URL-osoitteessa. title: Jakotunnisteet shared: gallery: diff --git a/decidim-admin/config/locales/hu.yml b/decidim-admin/config/locales/hu.yml index 26d26e247cab5..1ad0795e0be30 100644 --- a/decidim-admin/config/locales/hu.yml +++ b/decidim-admin/config/locales/hu.yml @@ -93,6 +93,7 @@ hu: success_color: Siker time_zone: Időzóna tos_version: Használati feltételek + twitter_handler: X kezelő user_groups_enabled: Csoportok engedélyezése users_registration_mode: Felhasználói regisztrációs mód warning_color: Figyelmeztetés @@ -735,6 +736,9 @@ hu: select_scopes: Kiszűri azokat a felhasználókat, akik a fiók "Saját érdeklődési kör" beállításainál aktiválták a kiválasztott hatókört. select_spaces: A hírlevél szegmentálására szolgáló terek kiválasztása select_users: Válassza ki, hogy mely felhasználók számára szeretné elküldeni a hírlevelet + send_to_all_users: Küldés az összes felhasználónak + send_to_followers: Küldés a követőknek + send_to_participants: Küldés a résztvevőknek title: Címzettek kiválasztása warning: "Figyelem: Ez a hírlevél csak azoknak a felhasználóknak kerül elküldésre, akik bejelölték a Hírleveleket szeretnék kapni opciót az értesítési beállításokban." send: @@ -795,6 +799,7 @@ hu: instagram: Instagram rich_text_editor_in_public_views_help: Néhány szövegmezőbe, a résztvevők HTML tag-eket tudnak majd beilleszteni a szövegszerkesztő segítségével. social_handlers: Social + twitter: X url: URL youtube: Youtube update: @@ -808,6 +813,7 @@ hu: colors_title: Szervezet színei colors_warning_html: Óvatosan! A színek megváltoztatása megtörhetik az akadálymentes kontrasztokat. Ellenőrizheti a kontrasztot a WebAIM Contrast Checker vagy más, hasonló eszköz segítségével. header_snippets_help: Ebben a mezőben a HTML fejlécet szerkesztheted. Ennek akkor van jelentősége, ha olyan külső szolgáltatásokat szeretnél intergálni, amelyekhez JavaScript vagy CSS szükséges. Sőt, metacímkéket is hozzáadhatsz. Ez az adminban nem, csak a nyilvános oldalakon jelenik majd meg. + cta_button_path_help: 'Felülírhatod, hogy a kezdőlap felhívás gombja link hova mutasson. Részleges, ne pedig teljes URL címeket használj. A megengedett karakterek: betű, szám, kötőjel vagy perjel, de mindig betűvel kell kezdődnie. A felhívás gomb az üdvözlő szöveg és a leírás között jelenik meg a nyitólapon. Példa: %{url}' cta_button_text_help: A felhívás gomb szövegét a szervezethez tartozó minden egyes nyelven megjelenítheted. Amennyiben nincs beállítva, akkor akkor az alapértelmezett értéket fogja használni. A felhívás gomb az üdvözlő szöveg és a leírás között jelenik meg a nyitólapon. homepage_appearance_title: Honlap megjelenésének szerkesztése homepage_highlighted_content_banner_title: Kiemelt banner @@ -826,6 +832,10 @@ hu: form: add: Hozzáadás a kivétellistához title: Külső domain kivétellista + organization_homepage: + edit: + active_content_blocks: Aktív tartalom blokkok + inactive_content_blocks: Inaktív tartalmi blokkok organization_homepage_content_blocks: edit: update: Frissítés @@ -972,9 +982,11 @@ hu: authorization_workflows: Ellenőrzési módszerek dashboard: Vezérlőpult edit_external_domains: Külső domain kivétellista + edit_organization_appearance: Honlap megjelenésének szerkesztése impersonatable_users: Kezelhető résztvevők impersonations: Résztvevők kezelése metrics: Mérőszámok + pages: Oldalak panel: Admin participants: Résztvevők scope_types: Hatáskör típusok diff --git a/decidim-assemblies/config/locales/ar.yml b/decidim-assemblies/config/locales/ar.yml index 81cd095eefb79..f4e08ed92b99c 100644 --- a/decidim-assemblies/config/locales/ar.yml +++ b/decidim-assemblies/config/locales/ar.yml @@ -303,7 +303,6 @@ ar: select_parent_assembly: حدد الجمعية الأصلية social_handlers: التواصل الاجتماعي title: معلومات عامة - visbility: الرؤية assemblies_settings: edit: update: تحديث diff --git a/decidim-assemblies/config/locales/ca.yml b/decidim-assemblies/config/locales/ca.yml index 42e29dc90a097..1e3e5415cbc39 100644 --- a/decidim-assemblies/config/locales/ca.yml +++ b/decidim-assemblies/config/locales/ca.yml @@ -231,9 +231,9 @@ ca: name: Membre positions: other: Altre - president: Presidenta - secretary: Secretària - vice_president: Vicepresidenta + president: Presidència + secretary: Secretaria + vice_president: Vicepresidència assembly_user_role: fields: email: Correu electrònic diff --git a/decidim-assemblies/config/locales/de.yml b/decidim-assemblies/config/locales/de.yml index d1348f94b286e..716603f1802d4 100644 --- a/decidim-assemblies/config/locales/de.yml +++ b/decidim-assemblies/config/locales/de.yml @@ -141,7 +141,7 @@ de: new: copy: Kopieren select: Wählen Sie die Daten aus, die Sie duplizieren möchten - title: Doppelte Montage + title: Dupliziertes Gremium assembly_imports: create: error: Beim Importieren dieses Gremiums ist ein Fehler aufgetreten. @@ -292,7 +292,7 @@ de: slug_help: 'URL-Slugs werden zum Generieren der URLs verwendet, die auf dieses Gremium verweisen. Akzeptiert werden nur Buchstaben, Zahlen und Bindestriche und es muss mit einem Buchstaben beginnen. Beispiel: %{url}' social_handlers: Sozial title: Allgemeine Information - visbility: Sichtweite + visbility: Sichtbarkeit assemblies_settings: edit: update: Aktualisieren diff --git a/decidim-assemblies/config/locales/el.yml b/decidim-assemblies/config/locales/el.yml index 2dc21e61aabda..b974e3c113009 100644 --- a/decidim-assemblies/config/locales/el.yml +++ b/decidim-assemblies/config/locales/el.yml @@ -284,7 +284,6 @@ el: select_parent_assembly: Επιλέξτε «Γονική συνέλευση» social_handlers: Μέσα κοινωνικής δικτύωσης title: Γενικές πληροφορίες - visbility: Ορατότητα assemblies_settings: edit: update: Ενημέρωση diff --git a/decidim-assemblies/config/locales/es.yml b/decidim-assemblies/config/locales/es.yml index bdc51be5f23dc..0963ed82a8e4b 100644 --- a/decidim-assemblies/config/locales/es.yml +++ b/decidim-assemblies/config/locales/es.yml @@ -231,9 +231,9 @@ es: name: Miembro positions: other: Otro - president: Presidenta + president: Presidencia secretary: Secretaria - vice_president: Vicepresidenta + vice_president: Vicepresidencia assembly_user_role: fields: email: Correo electrónico diff --git a/decidim-assemblies/config/locales/eu.yml b/decidim-assemblies/config/locales/eu.yml index fd140081760cf..28136def1d9ba 100644 --- a/decidim-assemblies/config/locales/eu.yml +++ b/decidim-assemblies/config/locales/eu.yml @@ -292,7 +292,7 @@ eu: slug_help: 'URL-ren testu laburrak batzar honetara daramaten URL-ak sortzeko erabiltzen dira. Letrak, zenbakiak eta gidoiak soilik onartzen ditu, eta letra batez hasi behar du. Adibidea: % {url}' social_handlers: Soziala title: Informazio orokorra - visbility: ikusgarritasuna + visbility: Ikusgarritasuna assemblies_settings: edit: update: Eguneratu diff --git a/decidim-assemblies/config/locales/fi-plain.yml b/decidim-assemblies/config/locales/fi-plain.yml index 49ae7b1e0272b..e65c99f712897 100644 --- a/decidim-assemblies/config/locales/fi-plain.yml +++ b/decidim-assemblies/config/locales/fi-plain.yml @@ -292,7 +292,7 @@ fi-pl: slug_help: 'URL-tunnisteita käytetään tähän ryhmään osoittavien URL-osoitteiden luonnissa. Hyväksyy kirjaimet, numerot ja viivat. Ensimmäinen merkki on oltava kirjain. Esimerkiksi: %{url}' social_handlers: Sosiaalinen media title: Yleiset tiedot - visbility: näkyvyys + visbility: Näkyvyys assemblies_settings: edit: update: Päivitä diff --git a/decidim-assemblies/config/locales/gl.yml b/decidim-assemblies/config/locales/gl.yml index 970f5d96666fc..dbc4c72819b8b 100644 --- a/decidim-assemblies/config/locales/gl.yml +++ b/decidim-assemblies/config/locales/gl.yml @@ -273,7 +273,6 @@ gl: select_parent_assembly: Seleccione o conxunto primario social_handlers: Social title: Información xeral - visbility: Visibilidade assemblies_settings: edit: update: Actualización diff --git a/decidim-assemblies/config/locales/hu.yml b/decidim-assemblies/config/locales/hu.yml index 82e07197202ab..25554c273cf3f 100644 --- a/decidim-assemblies/config/locales/hu.yml +++ b/decidim-assemblies/config/locales/hu.yml @@ -59,6 +59,7 @@ hu: subtitle: Felirat target: Ki vesz részt title: Cím + twitter: X weight: Pozíció sorrend youtube: Youtube assembly_member: @@ -315,6 +316,7 @@ hu: index: filter: all: Összes + ceased: Megszűnt filter_by: 'Szűrés ez alapján:' search: Keresés content_blocks: diff --git a/decidim-assemblies/config/locales/id-ID.yml b/decidim-assemblies/config/locales/id-ID.yml index 97ca1e0ec04b6..d223024f0f2b2 100644 --- a/decidim-assemblies/config/locales/id-ID.yml +++ b/decidim-assemblies/config/locales/id-ID.yml @@ -225,7 +225,6 @@ id: select_parent_assembly: Pilih perakitan induk social_handlers: Sosial title: Informasi Umum - visbility: Visibilitas assemblies_settings: edit: update: Memperbarui diff --git a/decidim-assemblies/config/locales/it.yml b/decidim-assemblies/config/locales/it.yml index b42905e5ec8fe..d6885bfca88c6 100644 --- a/decidim-assemblies/config/locales/it.yml +++ b/decidim-assemblies/config/locales/it.yml @@ -272,7 +272,6 @@ it: select_parent_assembly: Seleziona l'assemblea madre social_handlers: Social networks title: Informazioni generali - visbility: Visibilità assemblies_settings: edit: update: Aggiorna diff --git a/decidim-assemblies/config/locales/lt.yml b/decidim-assemblies/config/locales/lt.yml index 3c5972d52f685..b549701a95e69 100644 --- a/decidim-assemblies/config/locales/lt.yml +++ b/decidim-assemblies/config/locales/lt.yml @@ -296,7 +296,6 @@ lt: select_parent_assembly: Pasirinkti pagrindinę asamblėją social_handlers: Socialiniai title: Bendroji informacija - visbility: Matomumas assemblies_settings: edit: update: Atnaujinti diff --git a/decidim-assemblies/config/locales/lv.yml b/decidim-assemblies/config/locales/lv.yml index 31d595914a871..a000e89782193 100644 --- a/decidim-assemblies/config/locales/lv.yml +++ b/decidim-assemblies/config/locales/lv.yml @@ -252,7 +252,6 @@ lv: select_parent_assembly: Izvēlieties saistīto asambleju social_handlers: Sociālie plašsaziņas līdzekļi title: Vispārēja informācija - visbility: Redzamība assemblies_settings: edit: update: Atjaunināt diff --git a/decidim-assemblies/config/locales/nl.yml b/decidim-assemblies/config/locales/nl.yml index c811b92ea576e..6650e20913969 100644 --- a/decidim-assemblies/config/locales/nl.yml +++ b/decidim-assemblies/config/locales/nl.yml @@ -276,7 +276,6 @@ nl: select_parent_assembly: Selecteer de hoofdgroep social_handlers: sociaal title: Algemene informatie - visbility: Zichtbaarheid assemblies_settings: edit: update: Bijwerken diff --git a/decidim-assemblies/config/locales/no.yml b/decidim-assemblies/config/locales/no.yml index 7fdbb7f34699f..68ff9c035e534 100644 --- a/decidim-assemblies/config/locales/no.yml +++ b/decidim-assemblies/config/locales/no.yml @@ -272,7 +272,6 @@ select_parent_assembly: Velg foreldre-forsamling social_handlers: Sosial title: Generell Informasjon - visbility: Synlighet assemblies_settings: edit: update: Oppdater diff --git a/decidim-assemblies/config/locales/pt-BR.yml b/decidim-assemblies/config/locales/pt-BR.yml index 4e577271d8838..cec6bbb6b7051 100644 --- a/decidim-assemblies/config/locales/pt-BR.yml +++ b/decidim-assemblies/config/locales/pt-BR.yml @@ -292,7 +292,6 @@ pt-BR: slug_help: 'Os slugs de URL são usados ​​para gerar os URLs que apontam para essa assembleia. Apenas aceita letras, números e traços, e deve começar com uma carta. Exemplo: %{url}' social_handlers: Social title: Informação geral - visbility: Visibilidade assemblies_settings: edit: update: Atualizar diff --git a/decidim-assemblies/config/locales/pt.yml b/decidim-assemblies/config/locales/pt.yml index 2f0c3935de680..bff8469c112a1 100644 --- a/decidim-assemblies/config/locales/pt.yml +++ b/decidim-assemblies/config/locales/pt.yml @@ -272,7 +272,6 @@ pt: select_parent_assembly: Selecione a reunião pai social_handlers: Social title: Informação geral - visbility: Visibilidade assemblies_settings: edit: update: Atualizar diff --git a/decidim-assemblies/config/locales/ro-RO.yml b/decidim-assemblies/config/locales/ro-RO.yml index a00f894801b6e..28620355fe6e9 100644 --- a/decidim-assemblies/config/locales/ro-RO.yml +++ b/decidim-assemblies/config/locales/ro-RO.yml @@ -293,7 +293,6 @@ ro: select_parent_assembly: Selectați grupul de lucru părinte social_handlers: Rețele de socializare title: Informaţii generale - visbility: Vizibilitate assemblies_settings: edit: update: Actualizează diff --git a/decidim-assemblies/config/locales/sl.yml b/decidim-assemblies/config/locales/sl.yml index 666c56f741645..9ddcb3366ab5b 100644 --- a/decidim-assemblies/config/locales/sl.yml +++ b/decidim-assemblies/config/locales/sl.yml @@ -172,7 +172,6 @@ sl: other: Drugo select_an_assembly_type: Izberi vrsto združbe select_parent_assembly: Izberi matično združbo - visbility: Vidljivost assemblies_settings: edit: update: Posodobi diff --git a/decidim-assemblies/config/locales/sv.yml b/decidim-assemblies/config/locales/sv.yml index 33473ca0017d3..ad459fbe016ed 100644 --- a/decidim-assemblies/config/locales/sv.yml +++ b/decidim-assemblies/config/locales/sv.yml @@ -279,7 +279,6 @@ sv: select_parent_assembly: Välj överordnad gruppen social_handlers: Socialt title: Allmän information - visbility: Synlighet assemblies_settings: edit: update: Uppdatera diff --git a/decidim-assemblies/config/locales/tr-TR.yml b/decidim-assemblies/config/locales/tr-TR.yml index 44422f78a37f3..4839419bf5834 100644 --- a/decidim-assemblies/config/locales/tr-TR.yml +++ b/decidim-assemblies/config/locales/tr-TR.yml @@ -286,7 +286,6 @@ tr: select_parent_assembly: Bağlı olduğu kurulu seçin social_handlers: Sosyal title: Genel bilgi - visbility: görünürlük assemblies_settings: edit: update: Güncelle diff --git a/decidim-assemblies/config/locales/zh-CN.yml b/decidim-assemblies/config/locales/zh-CN.yml index 7826aaa5e8c07..5dbddc836a9d6 100644 --- a/decidim-assemblies/config/locales/zh-CN.yml +++ b/decidim-assemblies/config/locales/zh-CN.yml @@ -259,7 +259,6 @@ zh-CN: select_parent_assembly: 选择父程序集 social_handlers: 社交活动 title: 一般信息 - visbility: 可见性 assemblies_settings: edit: update: 更新 diff --git a/decidim-assemblies/config/locales/zh-TW.yml b/decidim-assemblies/config/locales/zh-TW.yml index 14f1c857edb3d..dcda7902b90bf 100644 --- a/decidim-assemblies/config/locales/zh-TW.yml +++ b/decidim-assemblies/config/locales/zh-TW.yml @@ -287,7 +287,6 @@ zh-TW: select_parent_assembly: 選擇父組件 social_handlers: 社群 title: 基本資訊 - visbility: 可見度 assemblies_settings: edit: update: 更新 diff --git a/decidim-blogs/config/locales/hu.yml b/decidim-blogs/config/locales/hu.yml index 6b22aa0809f2d..63c065e888158 100644 --- a/decidim-blogs/config/locales/hu.yml +++ b/decidim-blogs/config/locales/hu.yml @@ -60,6 +60,8 @@ hu: official_blog_post: Hivatalos bejegyzés title: Cím posts: + index: + empty: Még nincsenek bejegyzések. show: back: Vissza a listához comments: Hozzászólások @@ -74,7 +76,7 @@ hu: comment: Hozzászólás create: Létrehozás destroy: Törlés - endorse: Helyesel/Jóváhagy + endorse: Jóváhagy update: Frissítés name: Blog settings: @@ -85,8 +87,8 @@ hu: step: announcement: Közlemény comments_blocked: Megjegyzések letiltva - endorsements_blocked: Jóváhagyások letiltva - endorsements_enabled: Jóváhagyások engedélyezve + endorsements_blocked: Támogatások letiltva + endorsements_enabled: Támogatások engedélyezve events: blogs: post_created: diff --git a/decidim-budgets/config/locales/cs.yml b/decidim-budgets/config/locales/cs.yml index dc0097ddab333..a778f75da3f13 100644 --- a/decidim-budgets/config/locales/cs.yml +++ b/decidim-budgets/config/locales/cs.yml @@ -107,6 +107,9 @@ cs: pending_orders: Čeká na hlasování select_for_implementation: Vybrat pro implementaci selected: Vybrané + selected_options: + 'no': 'Ne' + 'yes': 'Ano' title: Projekty update: Aktualizovat update_scope_button: Aktualizovat rozsah diff --git a/decidim-budgets/config/locales/de.yml b/decidim-budgets/config/locales/de.yml index 81a195988d7a5..a8e57b4517ae0 100644 --- a/decidim-budgets/config/locales/de.yml +++ b/decidim-budgets/config/locales/de.yml @@ -208,7 +208,7 @@ de: voted_on_space_with_scope: Sie haben für das %{budget_name} Budget for the %{space_name} innerhalb %{scope_name} (%{scope_type}) abgestimmt. projects: budget_confirm: - are_you_sure: Wenn du deine Meinung änderst, kannst du deine Stimme nachträglich ändern. + are_you_sure: Wenn Sie Ihre Meinung ändern, können Sie Ihre Stimme nachträglich ändern. cancel: Abbrechen confirm: Bestätigen description: Dies sind die Projekte, die Sie für das Budget ausgewählt haben. @@ -385,4 +385,4 @@ de: orders_count: Projektauswahlen projects_count: Projekte index: - confirmed_orders_count: Stimmen zählen + confirmed_orders_count: Anzahl Stimmen diff --git a/decidim-budgets/config/locales/hu.yml b/decidim-budgets/config/locales/hu.yml index 729a8c4837362..5bc24aff0d4a4 100644 --- a/decidim-budgets/config/locales/hu.yml +++ b/decidim-budgets/config/locales/hu.yml @@ -100,6 +100,8 @@ hu: pending_orders: Függőben lévő szavazások select_for_implementation: Kijelölés megvalósításra selected: Kiválasztva + selected_options: + 'yes': 'Igen' title: Projektek update: Frissítés update_scope_button: Hatáskör frissítése diff --git a/decidim-comments/config/locales/hu.yml b/decidim-comments/config/locales/hu.yml index 7f51fe6d9d2c8..05cd822075937 100644 --- a/decidim-comments/config/locales/hu.yml +++ b/decidim-comments/config/locales/hu.yml @@ -47,7 +47,7 @@ hu: label: Megjegyzés placeholder: Mit gondolsz erről? form_error: Kötelező kitölteni, és nem lehet hosszabb, mint %{length} karakter. - submit: Elküld + submit: Küldés user_group_id: label: 'Megjegyzés mint:' opinion: diff --git a/decidim-conferences/config/locales/fi.yml b/decidim-conferences/config/locales/fi.yml index c11d76a9e3087..9053c4c12bfef 100644 --- a/decidim-conferences/config/locales/fi.yml +++ b/decidim-conferences/config/locales/fi.yml @@ -94,7 +94,7 @@ fi: send_diplomas: Lähetä läsnäolotodistukset conference_copies: new: - copy: Kopio + copy: Kopioi select: Valitse, mitkä tiedot haluat kopioida title: Kopioi konferenssi conference_publications: diff --git a/decidim-conferences/config/locales/hu.yml b/decidim-conferences/config/locales/hu.yml index 83d76d2781901..eea85e533af90 100644 --- a/decidim-conferences/config/locales/hu.yml +++ b/decidim-conferences/config/locales/hu.yml @@ -62,6 +62,7 @@ hu: personal_url: Személyes URL-cím position: Pozíció short_bio: Rövid önéletrajz + twitter_handle: X kezelő user_id: Felhasználó conference_user_role: email: Email @@ -500,6 +501,7 @@ hu: highlighted_conferences: active_conferences: Aktív konferenciák conferences_button_title: Link a Konferenciák oldalra, ahol az összes konferencia látható + see_all_conferences: Az összes konferencia megtekintése photo: image: attributes: diff --git a/decidim-consultations/config/locales/de.yml b/decidim-consultations/config/locales/de.yml index 67632a1678d29..2ffd0d7b82825 100644 --- a/decidim-consultations/config/locales/de.yml +++ b/decidim-consultations/config/locales/de.yml @@ -24,8 +24,8 @@ de: max_votes: Maximale Anzahl von Stimmen min_votes: Mindestanzahl von Stimmen origin_scope: Umfang - origin_title: Ursprung - origin_url: Ursprungs-URL + origin_title: Herkunft + origin_url: Herkunfts--URL participatory_scope: Partizipativer Bereich promoter_group: Promoter-Gruppe question_context: Kontext diff --git a/decidim-consultations/config/locales/hu.yml b/decidim-consultations/config/locales/hu.yml index 3cbd27c71ca64..59fd789845413 100644 --- a/decidim-consultations/config/locales/hu.yml +++ b/decidim-consultations/config/locales/hu.yml @@ -362,6 +362,10 @@ hu: actions: comment: Megjegyzés vote: Szavazás + question: + actions: + comment: Hozzászólás + vote: Szavazás statistics: consultations_count: Konzultációk votes_count: Szavazások diff --git a/decidim-core/config/locales/cs.yml b/decidim-core/config/locales/cs.yml index 3573f3cd5ccb5..724182bc569ee 100644 --- a/decidim-core/config/locales/cs.yml +++ b/decidim-core/config/locales/cs.yml @@ -83,7 +83,10 @@ cs: 'true': 'Ano' carrierwave: errors: + file_cannot_be_processed: Soubor nelze zpracovat + file_resolution_too_large: Rozlišení souboru je příliš velké file_size_too_large: Soubor je příliš velký + not_inside_organization: Soubor není připojen k žádné organizaci date: formats: decidim_short: "%d/%m/%Y" diff --git a/decidim-core/config/locales/de.yml b/decidim-core/config/locales/de.yml index fa73de63b9cdd..0558980c0283d 100644 --- a/decidim-core/config/locales/de.yml +++ b/decidim-core/config/locales/de.yml @@ -75,7 +75,10 @@ de: 'true': 'Ja' carrierwave: errors: + file_cannot_be_processed: Datei konnte nicht verarbeitet werden + file_resolution_too_large: Die Datei-Auflösung ist zu gross file_size_too_large: Datei ist zu groß + not_inside_organization: Die Datei ist keiner Organisation angefügt. date: formats: decidim_short: "%d/%m/%Y" @@ -486,7 +489,7 @@ de: button_url: URL des Call to Action description: Beschreibung footer_sub_hero: - name: Fußzeile sub hero Banner + name: Abschnitt mit Plattformslogan hero: name: Hauptbild hero_settings_form: @@ -513,7 +516,7 @@ de: stats: name: Organisationsstatistiken sub_hero: - name: Sub hero Banner + name: Banner unter dem Hauptbild (Beschreibungstext) core: actions: login_before_access: Bitte melden Sie sich mit Ihrem Konto an, um auf diese Seite zuzugreifen @@ -1237,7 +1240,7 @@ de: metrics: headline: Teilnahme an Zahlen statistics: - headline: Aktueller Zustand von %{organization} + headline: Aktueller Status von %{organization} sub_hero: register: Registrieren index: @@ -1582,7 +1585,7 @@ de: updated_not_active: Ihr Passwort wurde erfolgreich vergeben. mailer: confirmation_instructions: - action: Bestätige mein Konto + action: Konto bestätigen greeting: Willkommen %{recipient}! instruction: 'Sie können Ihre Konto-E-Mail über den folgenden Link bestätigen:' subject: Bestätigungsanweisungen diff --git a/decidim-core/config/locales/el.yml b/decidim-core/config/locales/el.yml index 99b7c8681f939..b0e4ab3b7aa1d 100644 --- a/decidim-core/config/locales/el.yml +++ b/decidim-core/config/locales/el.yml @@ -742,6 +742,7 @@ el: file: explanation: 'Οδηγίες για αρχείο:' message_1: Πρέπει να είναι εικόνα ή έγγραφο. + message_2: Για εικόνες, χρησιμοποιήστε κατά προτίμηση οριζόντιας διάταξης, η υπηρεσία περικόπτει την εικόνα. image: explanation: 'Οδηγίες για εικόνα:' message_1: Προτιμώμενη εικόνα οριζόντιας διάταξης που δεν περιέχει κείμενο. diff --git a/decidim-core/config/locales/eu.yml b/decidim-core/config/locales/eu.yml index c4eb98364ea81..03f9e1dea2784 100644 --- a/decidim-core/config/locales/eu.yml +++ b/decidim-core/config/locales/eu.yml @@ -104,6 +104,12 @@ eu: x_minutes: one: Minutu 1 other: "Minutu %{count}" + x_months: + one: Hilabete bat + other: "%{count} hilabete" + x_seconds: + one: Segundo bat + other: "%{count} segundo" decidim: accessibility: external_link: Kanpoko lotura diff --git a/decidim-core/config/locales/fi.yml b/decidim-core/config/locales/fi.yml index 3d128f6a196d9..36d8dbb5e0298 100644 --- a/decidim-core/config/locales/fi.yml +++ b/decidim-core/config/locales/fi.yml @@ -820,7 +820,7 @@ fi: message_1: On oltava kuva tai asiakirja. message_2: Kuvina käytä mieluiten vaakasuintaisia kuvia, palvelu rajaa kuvaa. icon: - explanation: 'Ikonin ohjeistus:' + explanation: 'Kuvakkeen ohjeistus:' message_1: On oltava neliömuotoinen kuva. message_2: Tämän kuvan suositeltu koko on 512x512. image: @@ -1438,7 +1438,7 @@ fi: title: Valitse tulosten määrä sivua kohti share_modal: close_window: Sulje ikkuna - copy_share_link: Kopio + copy_share_link: Kopioi copy_share_link_clarification: Kopioi jakolinkki leikepöydälle copy_share_link_copied: Kopioitu! copy_share_link_message: Linkin kopiointi leikepöydälle onnistui. diff --git a/decidim-core/config/locales/gl.yml b/decidim-core/config/locales/gl.yml index b7fa10641f3a1..12b95566c35b5 100644 --- a/decidim-core/config/locales/gl.yml +++ b/decidim-core/config/locales/gl.yml @@ -551,6 +551,9 @@ gl: default_image: Imaxe predeterminada errors: error: Hai un erro neste campo. + file_help: + file: + message_2: Nas imaxes, emprega preferiblemente as apaisadas, o servizo recorta a imaxe. upload: labels: add_attachment: Engadir ficheiro anexo diff --git a/decidim-core/config/locales/hu.yml b/decidim-core/config/locales/hu.yml index 6ca47346f867f..7ef73ba91ee36 100644 --- a/decidim-core/config/locales/hu.yml +++ b/decidim-core/config/locales/hu.yml @@ -44,7 +44,7 @@ hu: decidim/promote_to_admin: A csoport adminisztrátora decidim/promoted_to_admin_event: Csoportadminisztrátorrá jelölve decidim/removed_from_group: Eltávolítva a csoportból - decidim/resource_endorsed_event: Erőforrás jóváhagyva + decidim/resource_endorsed_event: Erőforrás támogatva decidim/resource_hidden_event: Rejtett erőforrás decidim/user_group_created_event: Felhasználói csoport létrehozva decidim/welcome_notification_event: Üdvözlő üzenet @@ -63,7 +63,7 @@ hu: other: Módosítások decidim/endorsement: one: Jóváhagyás - other: Jóváhagyások + other: Támogatások decidim/user: one: Résztvevő other: Résztvevők @@ -75,7 +75,9 @@ hu: 'true': 'Igen' carrierwave: errors: + file_resolution_too_large: A fájl felbontása túl nagy file_size_too_large: Túl nagy a fájl mérete + not_inside_organization: A fájl nincs csatolva egyetlen szervezethez sem date: formats: decidim_short: "%Y.%m.%d" @@ -337,7 +339,7 @@ hu: other: megjegyzések endorsements: one: jóváhagyás - other: jóváhagyások + other: támogatások official_author: Hivatalos authorization_handlers: another_dummy_authorization_handler: @@ -515,11 +517,14 @@ hu: subtitle: A regisztráció befejezéséhez töltsd ki a következő űrlapot username_help: Bejegyzésekben megjelenő nyilvános megnevezés. Az anonimitás megőrzése érdekében bármilyen név lehet. registrations: + create: + error: Hiba történt a fiók létrehozásakor. new: already_have_an_account?: Már van egy fiókod? newsletter: Hírlevél fogadása a legfontosabb információkkal newsletter_title: Kapcsolatfelvételi engedély nickname_help: A beceneved itt %{organization} csak betűket, számokat '-' és '_' jeleket tartalmazhat. + sign_in: Bejelentkezés sign_up: Regisztráció sign_up_as: legend: Regisztrálj mint @@ -579,10 +584,11 @@ hu: success: Kép sikeresen feltöltve drag_and_drop_help: Képek hozzáadása húzással és ejtéssel vagy beillesztéssel. endorsable: + endorsements: Támogatások endorsements_count: Támogatások száma endorsement_buttons_cell: - already_endorsed: Jóváhagyva - endorse: Jóváhagy + already_endorsed: Támogatva + endorse: Támogat endorsements: identities: done: Kész @@ -730,7 +736,7 @@ hu: resource_endorsed: email_intro: '%{endorser_name}% {endorser_nickname}, akit követsz, éppen jóváhagyta a "%{resource_title}" -t, és úgy gondoljuk, hogy ez érdekes lehet számodra. Nézd meg, és járulj hozzá:' email_outro: Azért kaptad ezt az értesítést, mert %{endorser_nickname} követed. Az előző hivatkozást követve abbahagyhatod az értesítések fogadását. - email_subject: "%{endorser_nickname} új jóváhagyást hajtott végre" + email_subject: "%{endorser_nickname} támogatásról biztosított" notification_title: A %{resource_title} %{resource_type} a(z) %{endorser_name} %{endorser_nickname} hagyta jóvá. users: profile_updated: @@ -740,6 +746,7 @@ hu: notification_title: '%{name} (%{nickname}) (akit egyébként követsz) profil oldala frissült.' user_officialized: email_outro: Azért kapta ezt az értesítést, mert Ön a szervezet adminisztrátora. + email_subject: "%{name} regisztrációja hivatalossá lett téva" export_mailer: download_your_data_export: click_button: 'Kattintson a következő linkre az adatainak letöltéséhez.
A fájl elérhető marad eddig %{date}
Szüksége lesz egy a zip fájlt kicsomagoló programra. 7-ZipWindowson,Keka (Mac-en) vagy PeaZip (Linuxon). Jelszó: %{password}' @@ -772,6 +779,7 @@ hu: create: button: Követés error: Hiba történt az erőforrás követése során. + participatory_space: ' %{resource_name} követése' destroy: button: Követés törlése error: Hiba történt az erőforrás követésének visszavonásakor. @@ -791,6 +799,8 @@ hu: explanation: 'Útmutató:' message_1: A képnek négyzet alakúnak kell lennie. message_2: A javasolt képméret 512x512 px. + image: + message_1: Olyan fekvő kép használata ajánlott, amely nem tartalmaz szöveget. file_validation: max_file_size: 'Maximális fájlméret: %{megabytes} MB' upload: @@ -1151,10 +1161,12 @@ hu: close_meeting_reminder: Szeretnék e-mailben emlékeztetőt kapni a zárt megbeszélésekről és nem nyilvános jelentésekről notifications_sending_frequencies: daily: Napi + none: Egyik sem real_time: Valósidejű weekly: Heti notifications_sending_frequency: Milyen gyakran szeretne e-mailt kapni az értesítésekről? own_activity: Saját tevékenységem - amikor valaki megjegyzést fűz a javaslatomhoz, vagy megemlíti a nevemet + push_notifications: Push értesítések push_notifications_reminder: Ahhoz, hogy értesítéseket kapjon a platformtól, először engedélyeznie kell azokat a böngésző beállításaiban. receive_notifications_about: Értesítést szeretnék kapni update_notifications_settings: Változások mentése @@ -1214,11 +1226,13 @@ hu: error: Hiba történt az általános szerződési feltételek elfogadása során. success: Remek! Elfogadtad a feltételeket. form: + agreement: Elfogadom a feltételeket legend: Elfogadom a felhasználási feltételeket refuse: modal_body: Ha elutasítja, akkor nem fogja tudni használni a platformot. Töltse le az adatait és/vagy törölje a fiókját. modal_btn_continue: Feltételek elfogadása és folytatás modal_btn_exit: Később átnézem + modal_button: Feltételek elutasítása modal_close: Felugró ablak bezárása modal_title: Tényleg elutasítod az ÁSZF frissített szövegét? required_review: @@ -1245,6 +1259,8 @@ hu: following: Követés groups: Csoportok members: Belépés + officialized: Hivatalos résztvevő + send_private_message: Privát üzenet küldése timeline: Idővonal view_full_profile: Teljes profil megtekintése sidebar: @@ -1288,7 +1304,7 @@ hu: success: A jelentést létrehozása sikeres, de még egy adminisztrátora felülvizsgálja. resource_endorsements: create: - error: Hiba történt a jóváhagyási művelet során. + error: Hiba történt a támogatási művelet során. scopes: global: Globális hatáskör picker: @@ -1398,6 +1414,7 @@ hu: share_link: Hivatkozás megosztása statistics: comments_count: Hozzászólások + endorsements_count: Támogatások followers_count: Követők headline: Statisztikák no_stats: Még nincsenek statisztikák. @@ -1417,6 +1434,7 @@ hu: user_conversations: create: error: Az üzenet létrehozása sikertelen. Próbálkozzon újra később + existing_error: Az üzenet létrehozása sikertelen. A beszélgetés már létezik, kérjük, próbálkozzon újra most. success: A beszélgetés sikeresen elindult! index: add_max_users: 'Felhasználók hozzáadása a beszélgetéshez: legfeljebb 9 felhasználó' @@ -1611,6 +1629,8 @@ hu: updated: Fiókja sikeresen frissült. sessions: already_signed_out: Kijelentkezett sikeresen. + new: + sign_in: Bejelentkezés signed_in: Sikeresen bejelentkezett. signed_out: Kijelentkezett sikeresen. shared: @@ -1619,6 +1639,7 @@ hu: didn_t_receive_confirmation_instructions: Nem kapott megerősítési utasítást? didn_t_receive_unlock_instructions: Nem kapott feloldási utasítást? forgot_your_password: Elfelejtette a jelszavát? + sign_in: Bejelentkezés sign_in_with_provider: Jelentkezzen be %{provider} sign_up: Regisztrálj minimum_password_length: @@ -1635,6 +1656,7 @@ hu: public: Nyilvános információk. errors: messages: + allowed_file_content_types: 'csak a következő kiterjesztésű fájlok engedélyezettek: %{types}' already_confirmed: már megerősítették, kérjük, próbáljon meg bejelentkezni confirmation_period_expired: meg kell erősíteni %{period}, kérem, kérjen újat content_type_allowlist_error: érvénytelen fájltípus @@ -1745,6 +1767,7 @@ hu: facebook: "%{organization} a Facebookon" github: "%{organization} a GitHubon" instagram: "%{organization} az Instagramon" + x: "%{organization} az X-en" youtube: "%{organization} a YouTube-on" timeout_modal: body: Ön %{minutes} percig inaktív volt. Ha továbbra is inaktív marad, a saját biztonsága érdekében automatikusan kijelentkeztetjük. @@ -1811,6 +1834,7 @@ hu: weibo: Sina Weibo whatsapp_app: Whatsapp whatsapp_web: Whatsapp + x: X xing: Xing time: formats: diff --git a/decidim-core/config/locales/it.yml b/decidim-core/config/locales/it.yml index 91508e2b6ae18..d1731a5203585 100644 --- a/decidim-core/config/locales/it.yml +++ b/decidim-core/config/locales/it.yml @@ -716,6 +716,7 @@ it: file: explanation: 'Orientamenti per il file:' message_1: Deve essere un'immagine o un documento. + message_2: Per le immagini, utilizzare preferibilmente immagini orizzontali, il servizio ritaglia l'immagine. image: explanation: 'Orientamenti per il file:' message_1: Preferibilmente un'immagine orizzontale che non ha alcun testo. diff --git a/decidim-core/config/locales/lb.yml b/decidim-core/config/locales/lb.yml index 3f588b479d4a5..9508da264d1f9 100644 --- a/decidim-core/config/locales/lb.yml +++ b/decidim-core/config/locales/lb.yml @@ -707,6 +707,7 @@ lb: file: explanation: 'Uleedung fir dës Datei:' message_1: Soll eBild oder en Dokument sinn. + message_2: Für Bilder verwenden Sie vorzugsweise Landschaftsbilder, der Dienst bewirtschaftet das Bild. image: explanation: 'Uleedung fir d''Bild:' message_1: Am beschten queesch Format ouni Text. diff --git a/decidim-core/config/locales/no.yml b/decidim-core/config/locales/no.yml index 1f7a9fe39ccfc..80ecd74a81ff6 100644 --- a/decidim-core/config/locales/no.yml +++ b/decidim-core/config/locales/no.yml @@ -727,6 +727,7 @@ file: explanation: 'Veiledning for fil:' message_1: Må være et bilde eller et dokument. + message_2: For bilder anbefales bruk av landskapsbilder, tjenesten beskjærer bildet. image: explanation: 'Veiledning for bilde:' message_1: Et landskapsbilde uten tekst er å anbefale. diff --git a/decidim-core/config/locales/pt-BR.yml b/decidim-core/config/locales/pt-BR.yml index b645619f60f2d..56603e616df3a 100644 --- a/decidim-core/config/locales/pt-BR.yml +++ b/decidim-core/config/locales/pt-BR.yml @@ -1412,7 +1412,7 @@ pt-BR: title: Denunciar usuário inapropriado floating_help: close: Fechar Ajuda - help: Socorro + help: Ajuda follow_button: sign_in_before_follow: Faça login antes de executar esta ação login_modal: diff --git a/decidim-core/config/locales/pt.yml b/decidim-core/config/locales/pt.yml index d0dd4b1f81f1e..5c81f5966aabd 100644 --- a/decidim-core/config/locales/pt.yml +++ b/decidim-core/config/locales/pt.yml @@ -710,6 +710,7 @@ pt: file: explanation: 'Orientação para o ficheiro:' message_1: Tem que ser uma imagem ou um documento. + message_2: Para imagens, use de preferência imagens de paisagem, o serviço corta a imagem. image: explanation: 'Orientação para a imagem:' message_1: Preferencialmente, uma imagem de paisagem que não tem nenhum texto. diff --git a/decidim-core/config/locales/sv.yml b/decidim-core/config/locales/sv.yml index 65d5309635829..a1ef2825b53de 100644 --- a/decidim-core/config/locales/sv.yml +++ b/decidim-core/config/locales/sv.yml @@ -1617,35 +1617,57 @@ sv: data_consent: details: columns: + description: Beskrivning name: Namn service: Tjänst type: Typ items: _session_id: + description: Tillåter webbplatser att komma ihåg användare på en webbplats när de flyttar mellan webbsidor. service: Denna webbplats decidim-consent: + description: Lagrar information om de cookies som tillåts av användaren på denna webbplats. service: Denna webbplats pwaInstallPromptSeen: + description: Lagrar status om den progressiva webbapplikationen (PWA) installationsmeddelandet har redan setts av användaren. service: Denna webbplats types: cookie: Cookie local_storage: Lokal lagring dialog: accept_all: Acceptera alla + accept_only_essential: Acceptera endast nödvändig + description: Vi använder cookies på vår webbplats för att förbättra webbplatsens prestanda och innehåll. Med hjälp av cookies kan vi erbjuda en mer individuell användarupplevelse och sociala mediekanaler. settings: Inställningar + title: Information om de cookies som används på webbplatsen modal: accept_all: Acceptera alla + accept_only_essential: Acceptera endast nödvändig + analytics: + description: Dessa cookies används för att mäta och analysera webbplatsens publik för att förbättra webbplatsen. + title: Analys och statistik + description: Vi använder cookies för att säkerställa grundläggande funktioner på webbplatsen och för att förbättra din upplevelse online. Du kan när som helst konfigurera och acceptera användningen av cookies och ändra dina samtyckesalternativ. essential: + description: Dessa cookies möjliggör viktiga funktioner på webbplatsen och hjälper till att hålla sina användare säkrade. De sparas automatiskt i webbläsaren och kan inte inaktiveras. title: Nödvändigt marketing: + description: Dessa cookies samlar in information om hur du använder webbplatsen och de kan användas för att ge dig mer personlig marknadsföring på de olika webbplatser du använder. title: Marknadsföring + preferences: + description: Dessa cookies gör det möjligt för webbplatsen att komma ihåg de val du gjort tidigare på denna webbplats för att ge en mer personlig upplevelse för webbplatsens användare. + title: Preferenser save_settings: Spara inställningar + title: Cookie-inställningar + toggle: Växla %{consent_category} warning: + all_categories: alla cookies + change_settings: Ändra cookie-inställningar consent_required: Du måste aktivera %{categories} för att kunna se innehållet. edit_link: edit: Redigera footer: cc_by_license: Creative Commons licens + data_consent_settings: Cookie-inställningar decidim_logo: Decidim logotyp download_open_data: Hämta öppna datafiler made_with_open_source: Webbplats skapad med fri programvara. diff --git a/decidim-core/config/locales/tr-TR.yml b/decidim-core/config/locales/tr-TR.yml index c1de59782d8ad..b31c1514005a8 100644 --- a/decidim-core/config/locales/tr-TR.yml +++ b/decidim-core/config/locales/tr-TR.yml @@ -696,6 +696,7 @@ tr: file: explanation: 'Dosya kılavuzu:' message_1: Bir resim veya bir belge olmalı. + message_2: Resimler için tercihen yatay resimleri kullanın, bu servis resmi kırpar. image: explanation: 'Dosya kılavuzu:' message_1: Tercihen herhangi bir metin içermeyen yatay bir resim. diff --git a/decidim-debates/config/locales/hu.yml b/decidim-debates/config/locales/hu.yml index 23d90b53bee26..e16c16c9d365e 100644 --- a/decidim-debates/config/locales/hu.yml +++ b/decidim-debates/config/locales/hu.yml @@ -31,7 +31,7 @@ hu: actions: comment: Megjegyzés create: Létrehozás - endorse: Jóváhagy + endorse: Támogat name: Viták settings: global: @@ -44,8 +44,8 @@ hu: announcement: Közlemény comments_blocked: Megjegyzések letiltva creation_enabled: A résztvevők létrehozhatnak vitákat - endorsements_blocked: Jóváhagyások letiltva - endorsements_enabled: Jóváhagyások engedélyezve + endorsements_blocked: Támogatások letiltva + endorsements_enabled: Támogatások engedélyezve debates: actions: close: Bezár diff --git a/decidim-dev/config/locales/hu.yml b/decidim-dev/config/locales/hu.yml index 7eee038695b22..7cd0f8128cbfb 100644 --- a/decidim-dev/config/locales/hu.yml +++ b/decidim-dev/config/locales/hu.yml @@ -20,8 +20,8 @@ hu: bar: Oszlop foo: foo step: - endorsements_blocked: Jóváhagyások letiltva - endorsements_enabled: Jóváhagyások engedélyezve + endorsements_blocked: Támogatások letiltva + endorsements_enabled: Támogatások engedélyezve test_options: bar: Oszlop foo: foo diff --git a/decidim-elections/config/locales/cs.yml b/decidim-elections/config/locales/cs.yml index 5057841d6dc35..2d04b0f7e122b 100644 --- a/decidim-elections/config/locales/cs.yml +++ b/decidim-elections/config/locales/cs.yml @@ -668,6 +668,7 @@ cs: upload_legend: Server má vaše veřejné identifikační klíče, ale váš prohlížeč jej stále nemá. Je třeba importovat soubor s identifikačními klíči do počítače ze zálohy, kterou jste vytvořili po jejich vygenerování. not_supported_browser_description: Vypadá to, že používáte webový prohlížeč, který nelze použít jako správce. Ujistěte se, že používáte nejnovější verzi prohlížeče, nebo zkuste použít některý z nejpopulárnějších prohlížečů, abyste mohli dokončit své úkoly správce. not_supported_browser_title: Upgradujte prohlížeč abyste mohl fungovat jako důvěrník + trustee_role_description: Byl jste pověřen, abyste v některých volbách, které na této platformě probíhají, jednal jako důvěrník. update: success: Váš identifikační veřejný klíč byl úspěšně uložen. votes: @@ -758,6 +759,7 @@ cs: continue: Další warnings: no_elections_warning: Žádné volby neodpovídají zadaným kritériím nebo nejsou naplánovány žádné volby. + no_scheduled_elections_warning: Momentálně nejsou naplánovány žádné volby, ale tady najdete seznam všech uplynulých voleb. events: elections: election_published: diff --git a/decidim-elections/config/locales/hu.yml b/decidim-elections/config/locales/hu.yml index 7464bc74a1bfc..e4b50b0b55475 100644 --- a/decidim-elections/config/locales/hu.yml +++ b/decidim-elections/config/locales/hu.yml @@ -245,6 +245,10 @@ hu: menu: votings_submenu: monitoring_committee: Ellenőrző Bizottság + polling_officers: + index: + role_manager: menedzser + role_president: elnök votings: actions: publish: Közzétesz @@ -266,6 +270,11 @@ hu: no_polling_stations: Még nem vagy kijelölve egyetlen szavazóhelyiséghez sem. role: A te szereped voting: Szavazás + polling_officers: + roles: + manager: Menedzser + president: Elnök + unassigned: Nem hozzárendelt votings: check_census: error: diff --git a/decidim-elections/config/locales/sv.yml b/decidim-elections/config/locales/sv.yml index d1f44ba5350ce..82eb3c40b3373 100644 --- a/decidim-elections/config/locales/sv.yml +++ b/decidim-elections/config/locales/sv.yml @@ -32,6 +32,7 @@ sv: title: Titel voting: banner_image: Bannerbild + description: Beskrivning end_time: Omröstningen avslutas promoted: Annonserad scope_id: Omfång diff --git a/decidim-forms/config/locales/hu.yml b/decidim-forms/config/locales/hu.yml index 91402bdafb8da..fa138c4c4dcbb 100644 --- a/decidim-forms/config/locales/hu.yml +++ b/decidim-forms/config/locales/hu.yml @@ -30,7 +30,7 @@ hu: answer_option: Válasz opció free_text: Szabadszöveg remove: Eltávolít - statement: Nyilatkozat + statement: Állítás edit: save: Mentés form: @@ -41,7 +41,7 @@ hu: expand: Minden kérdés kibontása matrix_row: remove: Eltávolít - statement: Nyilatkozat + statement: Állítás question: add_answer_option: Válasz opció hozzáadása any: Bármilyen @@ -51,7 +51,7 @@ hu: expand: Kibontás question: Kérdés remove: Eltávolít - statement: Nyilatkozat + statement: Állítás up: Fel title_and_description: collapse: Összecsuk diff --git a/decidim-initiatives/config/locales/de.yml b/decidim-initiatives/config/locales/de.yml index ab048cceddfe6..c19cf4c808936 100644 --- a/decidim-initiatives/config/locales/de.yml +++ b/decidim-initiatives/config/locales/de.yml @@ -20,7 +20,7 @@ de: any: Gemischt offline: Angesicht zu Angesicht online: Online - state: Zustand + state: Status title: Titel type_id: Typ initiatives_committee_member: @@ -86,7 +86,7 @@ de: decidim_area_id_eq: label: Bereich state_eq: - label: Zustand + label: Status values: accepted: Ausreichend Unterschriften created: Erstellt @@ -117,7 +117,7 @@ de: created_at: Erstellt am id: ID published_at: Veröffentlicht am - state: Zustand + state: Status supports_count: Unterschriften title: Initiativen initiatives_type_scope: @@ -212,9 +212,9 @@ de: info_initiative: created_at: Erstellt am description: Beschreibung - initiative_votes_count: Stimmen zählen + initiative_votes_count: Anzahl Stimmen initiatives: Initiativen - state: Zustand + state: Status committee_requests: index: approve: Genehmigen @@ -498,7 +498,7 @@ de: myself: Meine Initiativen scope: Umfang search: Suche - state: Zustand + state: Status type: Art filters_small_view: close_modal: Fenster schließen diff --git a/decidim-initiatives/config/locales/hu.yml b/decidim-initiatives/config/locales/hu.yml index e120da9140933..c19d76bc22335 100644 --- a/decidim-initiatives/config/locales/hu.yml +++ b/decidim-initiatives/config/locales/hu.yml @@ -98,7 +98,7 @@ hu: initiatives_settings: update: error: Hiba történt - success: A kezdeményezés frissítése sikeres volt + success: A kezdeményezés beállításai sikeresen frissültek menu: attachments: Csatolmányok committee_members: Bizottsági tagok @@ -216,7 +216,7 @@ hu: index: approve: Jóváhagy confirm_revoke: Biztos vagy benne? - invite_to_committee_help: Oszd meg a linket felhasználók meghívásához a promóciós bizottságba + invite_to_committee_help: Oszd meg a linket felhasználók meghívásához a kezdeményező bizottságba no_members_yet: A kezdeményező bizottságban nincsenek tagok revoke: Visszavonás title: Bizottsági tagok @@ -256,7 +256,7 @@ hu: photos: Fotók update: error: Hiba történt - success: Az állampolgári kezdeményezés frissítése sikeres + success: A kezdeményezés frissítése sikeres initiatives_settings: edit: update: Frissítés @@ -298,6 +298,8 @@ hu: update: Frissítés form: authorizations: Hitelesítési beállítások + child_scope_threshold_enabled_help: 'Ez a konfigurációs jelző nem támogatja az offline szavazást. Engedélyezi az altartományokat, és egy olyan engedélyezési kezelővel működik, amely egy tartományt társít a felhasználóhoz. Győződjön meg róla, hogy ezt a jogosultságot választja ki, alább az engedélyezési beállításoknál. A működéséhez a hatóköröket hierarchikusan kell konfigurálni: 1 Szülő - N gyermek. A konfiguráció működéséről bővebb információért lásd a következő oldalon kezdeményezések admin dokumentációs oldalán.' + only_global_scope_enabled_help: Jelölje be ezt a jelölőnégyzetet, ha engedélyezte a "Gyermek hatókör aláírás" opciót, és a globális hatókörét szülő hatókörként konfigurálta. Ennek engedélyezésével a kezdeményezés típusának kiválasztása kihagyásra kerül a kezdeményezés létrehozására szolgáló varázslóban. A konfiguráció működésével kapcsolatos további információkért lásd ezt a cikketlink. options: Opciók title: Általános információ initiative_type_scopes: @@ -583,6 +585,11 @@ hu: status_change_for: A(z) %{title} kezdeményezés állapota változott last_activity: new_initiative: Új kezdeményezés + pages: + home: + highlighted_initiatives: + active_initiatives: Aktív kezdeményezések + see_all_initiatives: Az összes kezdeményezés megtekintése show: badge_name: accepted: Elegendő aláírás diff --git a/decidim-meetings/config/locales/de.yml b/decidim-meetings/config/locales/de.yml index cac5511573bcb..04568f9718046 100644 --- a/decidim-meetings/config/locales/de.yml +++ b/decidim-meetings/config/locales/de.yml @@ -27,7 +27,7 @@ de: online_meeting_url: Online Meeting URL organizer_gid: Erstellt als organizer_id: Veranstalter - private_meeting: Private Sitzung + private_meeting: Privates Treffen registration_email_custom_content: Angepasster Inhalt des Registrierungs-E-Mails registration_form_enabled: Anmeldeformular aktiviert registration_terms: Registrierungsbedingungen diff --git a/decidim-meetings/config/locales/fi.yml b/decidim-meetings/config/locales/fi.yml index 2939e88bdba6a..981f7ce3b3899 100644 --- a/decidim-meetings/config/locales/fi.yml +++ b/decidim-meetings/config/locales/fi.yml @@ -407,7 +407,7 @@ fi: calendar_modal: calendar_url: Kalenterin URL close_window: Sulje ikkuna - copy_calendar_url: Kopio + copy_calendar_url: Kopioi copy_calendar_url_clarification: Kopioi kalenterin URL-osoite leikepöydälle copy_calendar_url_copied: Kopioitu! copy_calendar_url_description: Näet kaikki julkaistut tapaamiset oman palveluntarjoajasi kalenteriohjelmassa. Kopioi ja liitä tämä URL-osoite kalenteriisi käyttämällä "Lisää uusi kalenteri URL-osoitteesta" -toimintoa. diff --git a/decidim-meetings/config/locales/hu.yml b/decidim-meetings/config/locales/hu.yml index 08d220cd989e0..24dbb5d1b0e27 100644 --- a/decidim-meetings/config/locales/hu.yml +++ b/decidim-meetings/config/locales/hu.yml @@ -488,6 +488,9 @@ hu: meetings: no_meetings_warning: Nincs, vagy nincs ütemezve olyan találkozó, amely megfelel a keresési feltételeknek. upcoming_meetings_warning: Jelenleg nincs ütemezett találkozó, de itt megtalálhatod az összes korábbi találkozó listáját. + new: + create: Létrehoz + title: Találkozó létrehozása registration_confirm: cancel: Mégse confirm: Megerősítés diff --git a/decidim-meetings/config/locales/sv.yml b/decidim-meetings/config/locales/sv.yml index 122f19c4e3aef..d54f5b7d3c67e 100644 --- a/decidim-meetings/config/locales/sv.yml +++ b/decidim-meetings/config/locales/sv.yml @@ -40,6 +40,7 @@ sv: title: Titel visible: Synlig meeting_agenda_items: + description: Beskrivning duration: Varaktighet title: Titel meeting_registration_invite: diff --git a/decidim-participatory_processes/config/locales/ar.yml b/decidim-participatory_processes/config/locales/ar.yml index c9f51348733fb..c61eba4944c61 100644 --- a/decidim-participatory_processes/config/locales/ar.yml +++ b/decidim-participatory_processes/config/locales/ar.yml @@ -330,7 +330,6 @@ ar: select_an_area: اختر منطقة select_process_group: حدد مجموعة عملية title: معلومات عامة - visbility: رؤية content_blocks: highlighted_processes: name: عمليات مميزة diff --git a/decidim-participatory_processes/config/locales/de.yml b/decidim-participatory_processes/config/locales/de.yml index cbec0b10c7d24..328eb752ad975 100644 --- a/decidim-participatory_processes/config/locales/de.yml +++ b/decidim-participatory_processes/config/locales/de.yml @@ -434,7 +434,7 @@ de: select_process_group: Wählen Sie eine Prozessgruppe aus slug_help: 'URL-Slugs werden zum Generieren der URLs verwendet, die auf diesen Prozess verweisen. Akzeptiert werden nur Buchstaben, Zahlen und Bindestriche und es muss mit einem Buchstaben beginnen. Beispiel: %{url}' title: Allgemeine Information - visbility: Sichtweite + visbility: Sichtbarkeit content_blocks: highlighted_processes: name: Hervorgehobene Beteiligungsprozesse diff --git a/decidim-participatory_processes/config/locales/eu.yml b/decidim-participatory_processes/config/locales/eu.yml index 63bb33854da4d..c55542bac4cb5 100644 --- a/decidim-participatory_processes/config/locales/eu.yml +++ b/decidim-participatory_processes/config/locales/eu.yml @@ -386,6 +386,9 @@ eu: title: meta_scope: Esparrua name: Izenburua, deskribapena eta traola + participatory_processes: + one: Prozesu bat + other: "%{count} prozesu" show: title: Prozesu parte-hartzaileen taldeak participatory_process_steps: @@ -431,7 +434,7 @@ eu: select_process_group: Hautatu prozesu-talde bat slug_help: 'URL testu laburrak erabiltzen dira prozesu honi aurre egiteko URLan sortzeko. Letrak, zenbakiak eta gidoiak soilik onartzen ditu, eta letra batez hasi behar du. Adibidea: %{url}' title: Informazio orokorra - visbility: ikusgarritasuna + visbility: Ikusgarritasuna content_blocks: highlighted_processes: name: Prozesu nabarmenak diff --git a/decidim-participatory_processes/config/locales/fi-plain.yml b/decidim-participatory_processes/config/locales/fi-plain.yml index 8c39c54aedb85..0e643fa38fcc0 100644 --- a/decidim-participatory_processes/config/locales/fi-plain.yml +++ b/decidim-participatory_processes/config/locales/fi-plain.yml @@ -434,7 +434,7 @@ fi-pl: select_process_group: Valitse prosessiryhmä slug_help: 'URL-tunnisteita käytetään tuottamaan URL-osoitteet, jotka viittaavat tähän prosessiin. Hyväksyy vain kirjaimet, numerot ja viivat. Arvon on alettava kirjaimella. Esimerkki: %{url}' title: Yleistä tietoa - visbility: näkyvyys + visbility: Näkyvyys content_blocks: highlighted_processes: name: Tärkeimmät prosessit diff --git a/decidim-participatory_processes/config/locales/fi.yml b/decidim-participatory_processes/config/locales/fi.yml index a325e781d728b..a238a4daeb92b 100644 --- a/decidim-participatory_processes/config/locales/fi.yml +++ b/decidim-participatory_processes/config/locales/fi.yml @@ -171,7 +171,7 @@ fi: invitation_sent_at: Kutsu on participatory_process_copies: new: - copy: Kopio + copy: Kopioi select: Valitse, mitkä tiedot haluat kopioida title: Kopioi osallistumisprosessi participatory_process_group_landing_page: diff --git a/decidim-participatory_processes/config/locales/id-ID.yml b/decidim-participatory_processes/config/locales/id-ID.yml index 38e1d2046eec7..f69cc78212444 100644 --- a/decidim-participatory_processes/config/locales/id-ID.yml +++ b/decidim-participatory_processes/config/locales/id-ID.yml @@ -306,7 +306,6 @@ id: select_an_area: Pilih suatu Area select_process_group: Pilih grup proses title: Informasi Umum - visbility: Visibilitas content_blocks: highlighted_processes: name: Proses yang disorot diff --git a/decidim-participatory_processes/config/locales/lv.yml b/decidim-participatory_processes/config/locales/lv.yml index a0dc54c946b16..9470c9d3578b3 100644 --- a/decidim-participatory_processes/config/locales/lv.yml +++ b/decidim-participatory_processes/config/locales/lv.yml @@ -342,7 +342,6 @@ lv: select_an_area: Izvēlieties jomu select_process_group: Atlasiet procesa grupu title: Vispārēja informācija - visbility: Redzamība content_blocks: highlighted_processes: name: Izceltie procesi diff --git a/decidim-participatory_processes/config/locales/no.yml b/decidim-participatory_processes/config/locales/no.yml index d4517d1ac16c3..7244026fb1b9f 100644 --- a/decidim-participatory_processes/config/locales/no.yml +++ b/decidim-participatory_processes/config/locales/no.yml @@ -12,15 +12,22 @@ decidim_area_id: Område description: Beskrivelse developer_group: Promotørgruppe + document: Dokument domain: Domene end_date: Sluttdato hashtag: Emneknagg hero_image: Hovedbilde + import_attachments: Importer vedlegg + import_categories: Importer kategorier + import_components: Importer komponenter + import_steps: Importer trinn local_area: Organisasjonsområde meta_scope: Omfang av metadata participatory_process_group_id: Prosessgruppe + participatory_process_type_id: Prosesstype participatory_scope: Medvirkningen gjelder participatory_structure: Hvordan det blir gjort + private_space: Privat prosess promoted: Fremhevet published_at: Publisert på related_process_ids: Relaterte prosesser @@ -63,6 +70,12 @@ email: Epost name: Navn role: Rolle + errors: + models: + participatory_process: + attributes: + document: + allowed_file_content_types: 'Ugyldig dokumenttype. Bare filer med følgende filtyper er tillatt: %{types}' models: decidim/participatory_process_step_activated_event: Fase er aktivert decidim/participatory_process_step_changed_event: Fase endret @@ -227,8 +240,19 @@ create: error: Det oppstod et problem med å lage en ny prosesstype. success: Prosesstypen ble opprettet. + destroy: + success: Prosesstypen ble slettet. + edit: + title: Rediger prosesstype + update: Oppdater form: title: Tittel + new: + create: Opprett + title: Ny prosesstype + update: + error: Det oppsto et problem med å oppdatere denne prosesstypen. + success: Prosesstypen ble oppdatert. participatory_process_user_roles: create: error: Det oppstod et problem med å legge til en deltaker for denne prosessen. @@ -273,6 +297,7 @@ success: Prosessgruppen ble opprettet. titles: participatory_process_groups: Prosessgrupper + participatory_process_types: Prosesstyper participatory_processes: Deltakende prosesser users: resend_invitation: @@ -338,6 +363,7 @@ html_3: name: Tredje HTML-blokk metadata: + developer_group: Promotert av name: Metadata participatory_scope: Medvirkningen gjelder participatory_structure: Hvordan det blir gjort diff --git a/decidim-participatory_processes/config/locales/sk.yml b/decidim-participatory_processes/config/locales/sk.yml index eb2a639c50763..dbea0d6b60a5c 100644 --- a/decidim-participatory_processes/config/locales/sk.yml +++ b/decidim-participatory_processes/config/locales/sk.yml @@ -337,7 +337,6 @@ sk: select_an_area: Vyberte rozsah select_process_group: Vyberte skupinu procesov title: Všeobecná informácia - visbility: Viditeľnosť content_blocks: highlighted_processes: name: Zvýraznené procesy diff --git a/decidim-participatory_processes/config/locales/tr-TR.yml b/decidim-participatory_processes/config/locales/tr-TR.yml index 62065851dc54b..ce77e0fea2092 100644 --- a/decidim-participatory_processes/config/locales/tr-TR.yml +++ b/decidim-participatory_processes/config/locales/tr-TR.yml @@ -377,7 +377,7 @@ tr: select_an_area: Bir alan seçin select_process_group: Bir işlem grubu seçin title: Genel bilgi - visbility: görünürlük + visbility: Görünürlük content_blocks: highlighted_processes: name: Vurgulanan süreçler diff --git a/decidim-participatory_processes/config/locales/zh-CN.yml b/decidim-participatory_processes/config/locales/zh-CN.yml index 50ad981bba19f..5aa8e6c9335cb 100644 --- a/decidim-participatory_processes/config/locales/zh-CN.yml +++ b/decidim-participatory_processes/config/locales/zh-CN.yml @@ -336,7 +336,6 @@ zh-CN: select_an_area: 选择区域 select_process_group: 选择一个流程组 title: 一般信息 - visbility: 可见性 content_blocks: highlighted_processes: name: 高亮的进程 diff --git a/decidim-proposals/config/locales/ar.yml b/decidim-proposals/config/locales/ar.yml index 2f551c66f0433..0d69f40d2c501 100644 --- a/decidim-proposals/config/locales/ar.yml +++ b/decidim-proposals/config/locales/ar.yml @@ -291,7 +291,6 @@ ar: notification_title: تم قبول اقتراحك %{resource_title}. follower: email_intro: 'تم قبول الاقتراح "%{resource_title}". يمكنك قراءة الإجابة على هذه الصفحة:' - email_outro: لقد تلقيت هذا الإشعار لأنك تتابع %{resource_title}. يمكنك إلغاء المتابعة على الرابط السابق. email_subject: تم قبول اقتراح تتابعه notification_title: لقد تم قبول المُقتَرح %{resource_title}. proposal_evaluating: @@ -302,7 +301,6 @@ ar: notification_title: يتم تقييم الاقتراح الخاص بك %{resource_title}. follower: email_intro: 'الاقتراح "%{resource_title}" قيد التقييم حاليا. يمكنك التحقق من وجود إجابة على هذه الصفحة:' - email_outro: لقد تلقيت هذا الإشعار لأنك تتابع %{resource_title}. يمكنك إلغاء المتابعة على الرابط السابق. email_subject: واحد من الاقتراحات التي تتبعها قيد التقييم الآن notification_title: الاقتراح %{resource_title} قيد التقييم الآن. proposal_mentioned: @@ -329,7 +327,6 @@ ar: notification_title: تم رفض اقتراحك %{resource_title}. follower: email_intro: 'تم رفض الاقتراح %{resource_title}. يمكنك قراءة الإجابة على ذلك على هذه الصفحة:' - email_outro: لقد تلقيت هذا الإشعار لأنك تتابع %{resource_title}. يمكنك إلغاء المتابعة على الرابط السابق. email_subject: واحد من الاقتراحات التي تتبعها تم رفضها notification_title: تم رفض الاقتراح %{resource_title}. proposal_update_category: @@ -496,7 +493,7 @@ ar: accepted: وافقت answer_proposal: إجابة evaluating: تقييم - not_answered: لم تتم الإجابة عليه + not_answered: بلا جواب rejected: مرفوض title: الإجابة على الاقتراح %{title} proposal_notes: diff --git a/decidim-proposals/config/locales/bg.yml b/decidim-proposals/config/locales/bg.yml index 7433ebba25d08..22dd9ef66d930 100644 --- a/decidim-proposals/config/locales/bg.yml +++ b/decidim-proposals/config/locales/bg.yml @@ -189,7 +189,6 @@ bg: notification_title: Вашето предложение %{resource_title} е одобрено. follower: email_intro: 'Предложението "%{resource_title}" е одобрено. Прочетете отговора на страницата:' - email_outro: Получавате това известие, защото следвате "%{resource_title}". Може да премахнете следването чрез предната връзка. email_subject: Предложение, което следвате е одобрено notification_title: Предложението %{resource_title} беше одобрено. proposal_evaluating: @@ -200,7 +199,6 @@ bg: notification_title: Вашето предложение %{resource_title} се разглежда. follower: email_intro: 'Предложението "%{resource_title}" се разглежда в момента. Прочетете отговора на страницата:' - email_outro: Получавате това известие, защото следвате "%{resource_title}". Може да премахнете следването чрез предната връзка. email_subject: Предложение, което следвате се разглежда notification_title: Предложението %{resource_title} се разглежда. proposal_mentioned: @@ -216,6 +214,9 @@ bg: proposal_published_for_space: email_intro: Предложението "%{resource_title}" беше добавено в "%{participatory_space_title}", което следвате. email_outro: Получавате това известие, защото следвате "%{participatory_space_title}". Може да прекратите известията чрез предната връзка. + proposal_rejected: + affected_user: + email_outro: Получавате това известие, защото сте автор на %{resource_title}". proposals: admin: imports: diff --git a/decidim-proposals/config/locales/ca.yml b/decidim-proposals/config/locales/ca.yml index 82b07212902b7..eb4a670733b30 100644 --- a/decidim-proposals/config/locales/ca.yml +++ b/decidim-proposals/config/locales/ca.yml @@ -12,6 +12,8 @@ ca: state: Estat title: Títol user_group_id: Crea un esborrany col·laboratiu com a + import_participatory_text: + document: Document de text participatiu proposal: address: Adreça answer: Resposta @@ -275,7 +277,7 @@ ca: notification_title: S'ha acceptat la teva proposta %{resource_title}. follower: email_intro: 'S''ha acceptat la proposta "%{resource_title}". Pots llegir la resposta des d''aquesta pàgina:' - email_outro: Has rebut aquesta notificació perquè que segueixes "%{resource_title}". El pots deixar de seguir al link anterior. + email_outro: Has rebut aquesta notificació perquè estàs seguint "%{resource_title}". Pots deixar de seguir-ho des de l'enllaç anterior. email_subject: Una proposta que segueixes ha estat acceptada notification_title: S'ha acceptat la proposta %{resource_title}. proposal_evaluating: @@ -286,7 +288,7 @@ ca: notification_title: S'està avaluant la teva proposta %{resource_title}. follower: email_intro: 'La proposta "%{resource_title}" s''està avaluant actualment. Pots consultar una resposta en aquesta pàgina:' - email_outro: Has rebut aquesta notificació perquè que segueixes "%{resource_title}". El pots deixar de seguir al link anterior. + email_outro: Has rebut aquesta notificació perquè estàs seguint "%{resource_title}". Pots deixar de seguir-ho des de l'enllaç anterior. email_subject: S'està avaluant una proposta que segueixes notification_title: S'ha avaluat la proposta %{resource_title}. proposal_mentioned: @@ -313,7 +315,7 @@ ca: notification_title: La teva proposta %{resource_title} ha estat rebutjada. follower: email_intro: 'La proposta "%{resource_title}" ha estat rebutjada. Pots llegir la resposta des d''aquesta pàgina:' - email_outro: Has rebut aquesta notificació perquè que segueixes "%{resource_title}". El pots deixar de seguir al link anterior. + email_outro: Has rebut aquesta notificació perquè estàs seguint "%{resource_title}". Pots deixar de seguir-ho des de l'enllaç anterior. email_subject: S'ha rebutjat una proposta que segueixes notification_title: S'ha rebutjat la proposta %{resource_title}. proposal_update_category: @@ -617,7 +619,7 @@ ca: filter_scope_values: all: Totes filter_state_values: - accepted: Acceptada + accepted: Acceptades all: Totes evaluating: En avaluació not_answered: No resposta diff --git a/decidim-proposals/config/locales/cs.yml b/decidim-proposals/config/locales/cs.yml index c2b8a2f667162..acbcf3e4dca65 100644 --- a/decidim-proposals/config/locales/cs.yml +++ b/decidim-proposals/config/locales/cs.yml @@ -283,7 +283,6 @@ cs: notification_title: Váš návrh %{resource_title} byl přijat. follower: email_intro: 'Návrh "%{resource_title}" byl přijat. Odpověď můžete číst na této stránce:' - email_outro: Toto oznámení jste obdrželi, protože jste sledovali "%{resource_title}". Můžete jej odhlásit od předchozího odkazu. email_subject: Návrh, který sledujete, byl přijat notification_title: Návrh %{resource_title} byl přijat. proposal_evaluating: @@ -294,7 +293,6 @@ cs: notification_title: Váš návrh %{resource_title} je hodnocen. follower: email_intro: 'V současné době se hodnotí návrh "%{resource_title}". V této stránce můžete zkontrolovat odpověď:' - email_outro: Toto oznámení jste obdrželi, protože jste sledovali "%{resource_title}". Můžete jej odhlásit od předchozího odkazu. email_subject: Návrh, který sledujete, se hodnotí notification_title: Návrh %{resource_title} se hodnotí. proposal_mentioned: @@ -321,7 +319,6 @@ cs: notification_title: Váš návrh %{resource_title} byl zamítnut. follower: email_intro: 'Návrh "%{resource_title}" byl zamítnut. Odpověď můžete číst na této stránce:' - email_outro: Toto oznámení jste obdrželi, protože jste sledovali "%{resource_title}". Můžete jej odhlásit od předchozího odkazu. email_subject: Návrh, který sledujete, byl zamítnut notification_title: Návrh %{resource_title} byl zamítnut. proposal_update_category: diff --git a/decidim-proposals/config/locales/de.yml b/decidim-proposals/config/locales/de.yml index c24d66369dbb6..b44d81a0f5c25 100644 --- a/decidim-proposals/config/locales/de.yml +++ b/decidim-proposals/config/locales/de.yml @@ -12,6 +12,8 @@ de: state: Status title: Titel user_group_id: Kollaborativen Entwurf erstellen als + import_participatory_text: + document: Partizipatives Textdokument proposal: address: Adresse answer: Antworten @@ -107,7 +109,7 @@ de: scope_id_eq: label: Umfang state_eq: - label: Zustand + label: Status values: accepted: Angenommen evaluating: In Bearbeitung @@ -619,7 +621,7 @@ de: filter_state_values: accepted: Angenommen all: Alle - evaluating: In Bearbeitung + evaluating: In Bewertung not_answered: Unbeantwortet rejected: Abgelehnt filter_type_values: @@ -755,7 +757,7 @@ de: published_answer: Veröffentlichte Antwort published_at: Veröffentlicht am scope: Umfang - state: Zustand + state: Status title: Titel valuator: Schätzer valuators: Schätzer @@ -794,7 +796,7 @@ de: edit_documents: Dokumente bearbeiten edit_image: Bild bearbeiten gallery_legend: "(Optional) Ein Bild zur Vorschlagskarte hinzufügen" - select_a_category: Bitte wählen sie eine Kategorie + select_a_category: Bitte wählen Sie eine Kategorie send: Abschicken title: Vorschlag bearbeiten edit_draft: @@ -812,7 +814,7 @@ de: related_to: Bezüglich scope: Umfang search: Suche - state: Zustand + state: Status type: Art voted: Gewählt filters_small_view: diff --git a/decidim-proposals/config/locales/el.yml b/decidim-proposals/config/locales/el.yml index 025b5428f28af..30951ef5d6559 100644 --- a/decidim-proposals/config/locales/el.yml +++ b/decidim-proposals/config/locales/el.yml @@ -274,7 +274,6 @@ el: notification_title: Η πρότασή σας %{resource_title} έγινε δεκτή. follower: email_intro: 'Η πρόταση «%{resource_title}» έγινε δεκτή. Μπορείτε να διαβάσετε την απάντηση σε αυτήν τη σελίδα:' - email_outro: Λάβατε αυτήν την ειδοποίηση επειδή ακολουθείτε τον χώρο συμμετοχής «%{resource_title}». Μπορείτε να σταματήσετε να τον ακολουθείτε από τον προηγούμενο σύνδεσμο. email_subject: Μια πρόταση που ακολουθείτε έγινε δεκτή notification_title: Η πρόταση %{resource_title} έγινε δεκτή. proposal_evaluating: @@ -285,7 +284,6 @@ el: notification_title: Η πρότασή σας %{resource_title} αξιολογείται. follower: email_intro: 'Η πρόταση «%{resource_title}» αξιολογείται αυτήν τη στιγμή. Μπορείτε να δείτε μια απάντηση σε αυτήν τη σελίδα:' - email_outro: Λάβατε αυτήν την ειδοποίηση επειδή ακολουθείτε τον χώρο συμμετοχής «%{resource_title}». Μπορείτε να σταματήσετε να τον ακολουθείτε από τον προηγούμενο σύνδεσμο. email_subject: Μια πρόταση που ακολουθείτε αξιολογείται notification_title: Η πρόταση %{resource_title} αξιολογείται. proposal_mentioned: @@ -310,7 +308,6 @@ el: notification_title: Η πρότασή σας %{resource_title} απορρίφθηκε. follower: email_intro: 'Η πρόταση «%{resource_title}» απορρίφθηκε. Μπορείτε να διαβάσετε την απάντηση σε αυτήν τη σελίδα:' - email_outro: Λάβατε αυτήν την ειδοποίηση επειδή ακολουθείτε τον χώρο συμμετοχής «%{resource_title}». Μπορείτε να σταματήσετε να τον ακολουθείτε από τον προηγούμενο σύνδεσμο. email_subject: Μια πρόταση που ακολουθείτε απορρίφθηκε notification_title: Η πρόταση %{resource_title} απορρίφθηκε. proposal_update_category: diff --git a/decidim-proposals/config/locales/es-MX.yml b/decidim-proposals/config/locales/es-MX.yml index 35e75b56607de..11e7650d9cbce 100644 --- a/decidim-proposals/config/locales/es-MX.yml +++ b/decidim-proposals/config/locales/es-MX.yml @@ -12,6 +12,8 @@ es-MX: state: Estado title: Título user_group_id: Crear borrador colaborativo como + import_participatory_text: + document: Documento de texto participativo proposal: address: Dirección answer: Respuesta @@ -275,7 +277,7 @@ es-MX: notification_title: Su propuesta %{resource_title} ha sido aceptada. follower: email_intro: 'La propuesta "%{resource_title}" ha sido aceptada. Puedes leer la respuesta en esta página:' - email_outro: Has recibido esta notificación porque sigues "%{resource_title}". Puedes dejar de seguirlo en el enlace anterior. + email_outro: Has recibido esta notificación porque estás siguiendo "%{resource_title}". Puedes dejar de seguirlo desde el enlace anterior. email_subject: Una propuesta que estás siguiendo ha sido aceptada notification_title: La propuesta %{resource_title} ha sido aceptada. proposal_evaluating: @@ -286,7 +288,7 @@ es-MX: notification_title: Su propuesta %{resource_title} está siendo evaluada. follower: email_intro: 'La propuesta "%{resource_title}" se está evaluando actualmente. Puedes encontrar la respuesta en esta página:' - email_outro: Has recibido esta notificación porque sigues "%{resource_title}". Puedes dejar de seguirlo en el enlace anterior. + email_outro: Has recibido esta notificación porque estás siguiendo "%{resource_title}". Puedes dejar de seguirlo desde el enlace anterior. email_subject: Una propuesta que estás siguiendo está siendo evaluada notification_title: La propuesta %{resource_title} está siendo evaluada. proposal_mentioned: @@ -313,7 +315,7 @@ es-MX: notification_title: Su propuesta %{resource_title} ha sido rechazada. follower: email_intro: 'La propuesta "%{resource_title}" ha sido rechazada. Puedes leer la respuesta en esta página:' - email_outro: Has recibido esta notificación porque sigues "%{resource_title}". Puedes dejar de seguirlo en el enlace anterior. + email_outro: Has recibido esta notificación porque estás siguiendo "%{resource_title}". Puedes dejar de seguirlo desde el enlace anterior. email_subject: Una propuesta que estás siguiendo ha sido rechazada notification_title: La propuesta %{resource_title} ha sido rechazada. proposal_update_category: @@ -617,11 +619,11 @@ es-MX: filter_scope_values: all: Todos filter_state_values: - accepted: Aceptado + accepted: Aceptadas all: Todos evaluating: En evaluación not_answered: No contestada - rejected: Rechazado + rejected: Rechazada filter_type_values: all: Todos amendments: Enmiendas diff --git a/decidim-proposals/config/locales/es-PY.yml b/decidim-proposals/config/locales/es-PY.yml index 50f4bb7fec337..24ef8b8ca9705 100644 --- a/decidim-proposals/config/locales/es-PY.yml +++ b/decidim-proposals/config/locales/es-PY.yml @@ -12,6 +12,8 @@ es-PY: state: Estado title: Título user_group_id: Crear borrador colaborativo como + import_participatory_text: + document: Documento de texto participativo proposal: address: Dirección answer: Respuesta @@ -275,7 +277,7 @@ es-PY: notification_title: Su propuesta %{resource_title} ha sido aceptada. follower: email_intro: 'La propuesta "%{resource_title}" ha sido aceptada. Puedes leer la respuesta en esta página:' - email_outro: Has recibido esta notificación porque sigues "%{resource_title}". Puedes dejar de seguirlo en el enlace anterior. + email_outro: Has recibido esta notificación porque estás siguiendo "%{resource_title}". Puedes dejar de seguirlo desde el enlace anterior. email_subject: Una propuesta que estás siguiendo ha sido aceptada notification_title: La propuesta %{resource_title} ha sido aceptada. proposal_evaluating: @@ -286,7 +288,7 @@ es-PY: notification_title: Su propuesta %{resource_title} está siendo evaluada. follower: email_intro: 'La propuesta "%{resource_title}" se está evaluando actualmente. Puedes encontrar la respuesta en esta página:' - email_outro: Has recibido esta notificación porque sigues "%{resource_title}". Puedes dejar de seguirlo en el enlace anterior. + email_outro: Has recibido esta notificación porque estás siguiendo "%{resource_title}". Puedes dejar de seguirlo desde el enlace anterior. email_subject: Una propuesta que estás siguiendo está siendo evaluada notification_title: La propuesta %{resource_title} está siendo evaluada. proposal_mentioned: @@ -313,7 +315,7 @@ es-PY: notification_title: Su propuesta %{resource_title} ha sido rechazada. follower: email_intro: 'La propuesta "%{resource_title}" ha sido rechazada. Puedes leer la respuesta en esta página:' - email_outro: Has recibido esta notificación porque sigues "%{resource_title}". Puedes dejar de seguirlo en el enlace anterior. + email_outro: Has recibido esta notificación porque estás siguiendo "%{resource_title}". Puedes dejar de seguirlo desde el enlace anterior. email_subject: Una propuesta que estás siguiendo ha sido rechazada notification_title: La propuesta %{resource_title} ha sido rechazada. proposal_update_category: @@ -617,11 +619,11 @@ es-PY: filter_scope_values: all: Todos filter_state_values: - accepted: Aceptado + accepted: Aceptadas all: Todos - evaluating: Evaluando + evaluating: En evaluación not_answered: No contestada - rejected: Rechazado + rejected: Rechazada filter_type_values: all: Todos amendments: Enmiendas diff --git a/decidim-proposals/config/locales/es.yml b/decidim-proposals/config/locales/es.yml index aa7c7a62948a9..09720c0917e76 100644 --- a/decidim-proposals/config/locales/es.yml +++ b/decidim-proposals/config/locales/es.yml @@ -12,6 +12,8 @@ es: state: Estado title: Título user_group_id: Crear borrador colaborativo como + import_participatory_text: + document: Documento de texto participativo proposal: address: Dirección answer: Respuesta @@ -275,7 +277,7 @@ es: notification_title: Tu propuesta %{resource_title} ha sido aceptada. follower: email_intro: 'La propuesta "%{resource_title}" ha sido aceptada. Puedes leer la respuesta en esta página:' - email_outro: Has recibido esta notificación porque sigues "%{resource_title}". Puedes dejar de seguirlo en el enlace anterior. + email_outro: Has recibido esta notificación porque estás siguiendo "%{resource_title}". Puedes dejar de seguirlo desde el enlace anterior. email_subject: Una propuesta que estás siguiendo ha sido aceptada notification_title: La propuesta %{resource_title} ha sido aceptada. proposal_evaluating: @@ -286,7 +288,7 @@ es: notification_title: Tu propuesta %{resource_title} está siendo evaluada. follower: email_intro: 'La propuesta "%{resource_title}" se está evaluando actualmente. Puedes encontrar la respuesta en esta página:' - email_outro: Has recibido esta notificación porque sigues "%{resource_title}". Puedes dejar de seguirlo en el enlace anterior. + email_outro: Has recibido esta notificación porque estás siguiendo "%{resource_title}". Puedes dejar de seguirlo desde el enlace anterior. email_subject: Una propuesta que estás siguiendo está siendo evaluada notification_title: La propuesta %{resource_title} está siendo evaluada. proposal_mentioned: @@ -313,7 +315,7 @@ es: notification_title: Tu propuesta %{resource_title} ha sido rechazada. follower: email_intro: 'La propuesta "%{resource_title}" ha sido rechazada. Puedes leer la respuesta en esta página:' - email_outro: Has recibido esta notificación porque sigues "%{resource_title}". Puedes dejar de seguirlo en el enlace anterior. + email_outro: Has recibido esta notificación porque estás siguiendo "%{resource_title}". Puedes dejar de seguirlo desde el enlace anterior. email_subject: Una propuesta que estás siguiendo ha sido rechazada notification_title: La propuesta %{resource_title} ha sido rechazada. proposal_update_category: @@ -617,7 +619,7 @@ es: filter_scope_values: all: Todas filter_state_values: - accepted: Aceptada + accepted: Aceptadas all: Todas evaluating: En evaluación not_answered: No contestada diff --git a/decidim-proposals/config/locales/eu.yml b/decidim-proposals/config/locales/eu.yml index c6b7df159b1ea..ca62d0ebce38a 100644 --- a/decidim-proposals/config/locales/eu.yml +++ b/decidim-proposals/config/locales/eu.yml @@ -12,6 +12,8 @@ eu: state: Egoera title: Izenburua user_group_id: Sortu zirriborro kolaboratiboa + import_participatory_text: + document: Parte hartzeko testu-dokumentua proposal: address: Helbidea answer: Erantzuna @@ -270,12 +272,12 @@ eu: proposal_accepted: affected_user: email_intro: 'Zure proposamena "%{resource_title}" onartu da. Orri honetan erantzun dezakezu:' - email_outro: Jakinarazpen hau jaso duzu "%{resource_title}"-ren egilea zarelako. + email_outro: Jakinarazpen hau jaso duzu "%{resource_title}" egilea zarelako. email_subject: Zure proposamena onartu da notification_title: Zure %{resource_title}-proposamena onartu egin da. follower: email_intro: '"%{resource_title}" proposamena onartu da. Orri honetan erantzuna irakur dezakezu:' - email_outro: Jakinarazpena jaso duzu "%{resource_title}" jarraitzen ari zarelako. Jarraitzeari utzi ahal diozu aurreko estekan. + email_outro: Jakinarazpen hau jaso duzu "%{resource_title}" jarraitzen ari zarelako. Jarraitzeari utzi ahal diozu aurreko estekan. email_subject: Jarraitzen ari zaren proposamen bat onartu da notification_title: %{resource_title} proposamena onartu egin da. proposal_evaluating: @@ -622,7 +624,7 @@ eu: all: Guztiak evaluating: Ebaluatzen not_answered: Erantzun gabe - rejected: Ukatuta + rejected: Ukatua filter_type_values: all: Guztiak amendments: Zuzenketak diff --git a/decidim-proposals/config/locales/fi-plain.yml b/decidim-proposals/config/locales/fi-plain.yml index aeda3725eb83b..7a660641b30d8 100644 --- a/decidim-proposals/config/locales/fi-plain.yml +++ b/decidim-proposals/config/locales/fi-plain.yml @@ -12,6 +12,8 @@ fi-pl: state: Tila title: Ehdotuksen nimi user_group_id: Luo yhteistyöluonnos nimellä + import_participatory_text: + document: Ehdotusaineistojen asiakirja proposal: address: Osoite answer: Vastaus @@ -275,18 +277,18 @@ fi-pl: notification_title: Ehdotuksesi %{resource_title} on hyväksytty. follower: email_intro: 'Ehdotus "%{resource_title}" on hyväksytty. Voit lukea vastauksen täältä:' - email_outro: Tämä ilmoitus on lähetetty sinulle, koska seuraat "%{resource_title}". Voit lopettaa sen seuraamisen edellä esitetyn linkin kautta. + email_outro: Tämä ilmoitus on lähetetty sinulle, koska seuraat kohdetta "%{resource_title}". Voit lopettaa sen seuraamisen edellä esitetyn linkin kautta. email_subject: Seuraamasi ehdotus on hyväksytty notification_title: Ehdotus %{resource_title} on hyväksytty. proposal_evaluating: affected_user: email_intro: 'Ehdotustasi "%{resource_title}" arvioidaan parhaillaan. Voit tarkistaa vastauksen täältä:' - email_outro: Saat tämän ilmoituksen, koska olet luonut kohteen "%{resource_title}". + email_outro: Tämä ilmoitus on lähetetty sinulle, koska olet luonut kohteen "%{resource_title}". email_subject: Ehdotuksesi arvioidaan notification_title: Ehdotuksesi %{resource_title} arvioidaan. follower: email_intro: 'Ehdotusta "%{resource_title}" arvioidaan parhaillaan. Voit tarkistaa vastauksen tältä sivulla:' - email_outro: Tämä ilmoitus on lähetetty sinulle, koska seuraat "%{resource_title}". Voit lopettaa sen seuraamisen edellä esitetyn linkin kautta. + email_outro: Tämä ilmoitus on lähetetty sinulle, koska seuraat kohdetta "%{resource_title}". Voit lopettaa sen seuraamisen edellä esitetyn linkin kautta. email_subject: Seuraamasi ehdotus on arvioitavana notification_title: Ehdotus %{resource_title} on arvioitavana. proposal_mentioned: @@ -313,7 +315,7 @@ fi-pl: notification_title: Ehdotuksesi %{resource_title} on hylätty. follower: email_intro: 'Ehdotus "%{resource_title}" on hylätty. Voit lukea vastauksen tällä sivulla:' - email_outro: Tämä ilmoitus on lähetetty sinulle, koska seuraat "%{resource_title}". Voit lopettaa sen seuraamisen edellä esitetyn linkin kautta. + email_outro: Tämä ilmoitus on lähetetty sinulle, koska seuraat kohdetta "%{resource_title}". Voit lopettaa sen seuraamisen edellä esitetyn linkin kautta. email_subject: Seuraamasi ehdotus on hylätty notification_title: Ehdotus %{resource_title} on hylätty. proposal_update_category: @@ -616,7 +618,7 @@ fi-pl: filter_scope_values: all: Kaikki filter_state_values: - accepted: Hyväksytyt + accepted: Hyväksytty all: Kaikki evaluating: Arvioitavana not_answered: Vastaamaton diff --git a/decidim-proposals/config/locales/fi.yml b/decidim-proposals/config/locales/fi.yml index 777ef6afe33a5..eb321795b68ff 100644 --- a/decidim-proposals/config/locales/fi.yml +++ b/decidim-proposals/config/locales/fi.yml @@ -12,6 +12,8 @@ fi: state: Tila title: Ehdotuksen nimi user_group_id: Luo yhteistyöluonnos nimellä + import_participatory_text: + document: Ehdotusaineistojen asiakirja proposal: address: Osoite answer: Vastaus @@ -275,7 +277,7 @@ fi: notification_title: Ehdotuksesi %{resource_title} on hyväksytty. follower: email_intro: 'Ehdotus "%{resource_title}" on hyväksytty. Voit lukea vastauksen täältä:' - email_outro: Tämä ilmoitus on lähetetty sinulle, koska seuraat "%{resource_title}". Voit lopettaa sen seuraamisen edellä esitetyn linkin kautta. + email_outro: Tämä ilmoitus on lähetetty sinulle, koska seuraat kohdetta "%{resource_title}". Voit lopettaa sen seuraamisen edellä esitetyn linkin kautta. email_subject: Seuraamasi ehdotus on hyväksytty notification_title: Ehdotus %{resource_title} on hyväksytty. proposal_evaluating: @@ -286,7 +288,7 @@ fi: notification_title: Ehdotuksesi %{resource_title} arvioidaan. follower: email_intro: 'Ehdotusta "%{resource_title}" arvioidaan parhaillaan. Voit tarkistaa vastauksen tältä sivulla:' - email_outro: Tämä ilmoitus on lähetetty sinulle, koska seuraat "%{resource_title}". Voit lopettaa sen seuraamisen edellä esitetyn linkin kautta. + email_outro: Tämä ilmoitus on lähetetty sinulle, koska seuraat kohdetta "%{resource_title}". Voit lopettaa sen seuraamisen edellä esitetyn linkin kautta. email_subject: Seuraamasi ehdotus on arvioitavana notification_title: Ehdotus %{resource_title} on arvioitavana. proposal_mentioned: @@ -313,7 +315,7 @@ fi: notification_title: Ehdotuksesi %{resource_title} on hylätty. follower: email_intro: 'Ehdotus "%{resource_title}" on hylätty. Voit lukea vastauksen tällä sivulla:' - email_outro: Tämä ilmoitus on lähetetty sinulle, koska seuraat "%{resource_title}". Voit lopettaa sen seuraamisen edellä esitetyn linkin kautta. + email_outro: Tämä ilmoitus on lähetetty sinulle, koska seuraat kohdetta "%{resource_title}". Voit lopettaa sen seuraamisen edellä esitetyn linkin kautta. email_subject: Seuraamasi ehdotus on hylätty notification_title: Ehdotus %{resource_title} on hylätty. proposal_update_category: @@ -616,7 +618,7 @@ fi: filter_scope_values: all: Kaikki filter_state_values: - accepted: Hyväksytyt + accepted: Hyväksytty all: Kaikki evaluating: Arvioitavana not_answered: Vastaamaton diff --git a/decidim-proposals/config/locales/fr-CA.yml b/decidim-proposals/config/locales/fr-CA.yml index 49a74644713ad..6e435fcb89cee 100644 --- a/decidim-proposals/config/locales/fr-CA.yml +++ b/decidim-proposals/config/locales/fr-CA.yml @@ -12,6 +12,8 @@ fr-CA: state: État title: Titre user_group_id: Créez un brouillon collaboratif comme + import_participatory_text: + document: Document du texte participatif proposal: address: Adresse answer: Répondre @@ -275,7 +277,7 @@ fr-CA: notification_title: Votre proposition %{resource_title} a été acceptée. follower: email_intro: 'La proposition "%{resource_title}" a été acceptée. Vous pouvez lire la réponse sur cette page :' - email_outro: Vous venez de recevoir cette notification parce que vous suivez "%{resource_title}". Vous pouvez à tout moment arrêter de la suivre en cliquant sur ce dernier lien. + email_outro: Vous recevez cette notification car vous suivez « %{resource_title} ». Vous pouvez annuler ce suivi en allant sur le lien précédent. email_subject: Une proposition que vous suivez a été acceptée notification_title: La proposition %{resource_title} a été acceptée. proposal_evaluating: @@ -286,7 +288,7 @@ fr-CA: notification_title: Votre proposition %{resource_title} est en cours d'évaluation. follower: email_intro: 'La proposition "%{resource_title}" est en cours d''évaluation. Vous pouvez consulter cette page pour voir si une réponse a été formulée :' - email_outro: Vous venez de recevoir cette notification parce que vous suivez "%{resource_title}". Vous pouvez à tout moment arrêter de la suivre en cliquant sur ce dernier lien. + email_outro: Vous recevez cette notification car vous suivez « %{resource_title} ». Vous pouvez annuler ce suivi en allant sur le lien précédent. email_subject: Une proposition que vous suivez est en cours d'évaluation notification_title: La proposition %{resource_title} est en cours d'évaluation. proposal_mentioned: @@ -313,7 +315,7 @@ fr-CA: notification_title: Votre proposition %{resource_title} a été rejetée. follower: email_intro: 'La proposition "%{resource_title}" n''a pas été retenue. Vous pouvez lire le commentaire ici :' - email_outro: Vous venez de recevoir cette notification parce que vous suivez "%{resource_title}". Vous pouvez à tout moment arrêter de la suivre en cliquant sur ce dernier lien. + email_outro: Vous recevez cette notification car vous suivez « %{resource_title} ». Vous pouvez annuler ce suivi en allant sur le lien précédent. email_subject: Une proposition que vous suivez n'a pas été retenue notification_title: La proposition %{resource_title} n'a pas été retenue. proposal_update_category: @@ -472,7 +474,7 @@ fr-CA: accepted: Retenue answer_proposal: Répondre evaluating: En cours d'évaluation - not_answered: Non répondu + not_answered: En attente de réponse rejected: Non retenue title: Réponse à la proposition %{title} proposal_notes: @@ -617,11 +619,11 @@ fr-CA: filter_scope_values: all: Tout filter_state_values: - accepted: Accepté + accepted: Retenue all: Tout evaluating: En cours d'évaluation not_answered: En attente de réponse - rejected: Rejeté + rejected: Non retenue filter_type_values: all: Tout amendments: Amendements diff --git a/decidim-proposals/config/locales/fr.yml b/decidim-proposals/config/locales/fr.yml index 1272cf4c18de9..ebe8c7f83413d 100644 --- a/decidim-proposals/config/locales/fr.yml +++ b/decidim-proposals/config/locales/fr.yml @@ -12,6 +12,8 @@ fr: state: État title: Titre user_group_id: Créez un brouillon collaboratif comme + import_participatory_text: + document: Document du texte participatif proposal: address: Adresse answer: Répondre @@ -275,7 +277,7 @@ fr: notification_title: Votre proposition %{resource_title} a été acceptée. follower: email_intro: 'La proposition "%{resource_title}" a été acceptée. Vous pouvez lire la réponse sur cette page :' - email_outro: Vous venez de recevoir cette notification parce que vous suivez "%{resource_title}". Si vous souhaitez vous désabonner des notifications, connectez-vous à la plateforme, puis rendez-vous dans l'onglet “Mon compte” > “Paramètres des notifications”. + email_outro: Vous recevez cette notification car vous suivez « %{resource_title} ». Vous pouvez annuler ce suivi en allant sur le lien précédent. email_subject: Une proposition que vous suivez a été acceptée notification_title: La proposition %{resource_title} a été acceptée. proposal_evaluating: @@ -286,7 +288,7 @@ fr: notification_title: Votre proposition %{resource_title} est en cours d'évaluation. follower: email_intro: 'La proposition "%{resource_title}" est en cours d''évaluation. Vous pouvez consulter cette page pour voir si une réponse a été formulée :' - email_outro: Vous venez de recevoir cette notification parce que vous suivez "%{resource_title}". Si vous souhaitez vous désabonner des notifications, connectez-vous à la plateforme, puis rendez-vous dans l'onglet “Mon compte” > “Paramètres des notifications”. + email_outro: Vous recevez cette notification car vous suivez « %{resource_title} ». Vous pouvez annuler ce suivi en allant sur le lien précédent. email_subject: Une proposition que vous suivez est en cours d'évaluation notification_title: La proposition %{resource_title} est en cours d'évaluation. proposal_mentioned: @@ -313,7 +315,7 @@ fr: notification_title: Votre proposition %{resource_title} a été rejetée. follower: email_intro: 'La proposition "%{resource_title}" n''a pas été retenue. Vous pouvez lire le commentaire ici :' - email_outro: Vous venez de recevoir cette notification parce que vous suivez "%{resource_title}". Si vous souhaitez vous désabonner des notifications, connectez-vous à la plateforme, puis rendez-vous dans l'onglet “Mon compte” > “Paramètres des notifications”. + email_outro: Vous recevez cette notification car vous suivez « %{resource_title} ». Vous pouvez annuler ce suivi en allant sur le lien précédent. email_subject: Une proposition que vous suivez n'a pas été retenue notification_title: La proposition %{resource_title} n'a pas été retenue. proposal_update_category: @@ -472,7 +474,7 @@ fr: accepted: Retenue answer_proposal: Répondre evaluating: En cours d'évaluation - not_answered: Non répondu + not_answered: En attente de réponse rejected: Non retenue title: Réponse à la proposition %{title} proposal_notes: @@ -617,11 +619,11 @@ fr: filter_scope_values: all: Tout filter_state_values: - accepted: Accepté + accepted: Retenue all: Tout evaluating: En cours d'évaluation not_answered: En attente de réponse - rejected: Rejeté + rejected: Non retenue filter_type_values: all: Tout amendments: Amendements diff --git a/decidim-proposals/config/locales/gl.yml b/decidim-proposals/config/locales/gl.yml index 933375cbe7b98..35bc4e48c0ba7 100644 --- a/decidim-proposals/config/locales/gl.yml +++ b/decidim-proposals/config/locales/gl.yml @@ -224,7 +224,6 @@ gl: notification_title: A túa proposta %{resource_title} foi aceptada. follower: email_intro: 'A proposta "%{resource_title}" foi aceptada. Podes ler a resposta nesta páxina:' - email_outro: Recibiches esta notificación porque estás seguindo "%{resource_title}". Podes deixar de seguir desde a ligazón anterior. email_subject: Aceptouse unha proposta que estás seguindo notification_title: A proposta %{resource_title} foi aceptada. proposal_evaluating: @@ -235,7 +234,6 @@ gl: notification_title: A súa proposta %{resource_title} está sendo avaliada. follower: email_intro: 'A proposta "%{resource_title}" está a ser avaliada. Podes consultar unha resposta nesta páxina:' - email_outro: Recibiches esta notificación porque estás seguindo "%{resource_title}". Podes deixar de seguir desde a ligazón anterior. email_subject: Estase evaluando unha proposta que estás seguindo notification_title: A proposta %{resource_title} está a ser avaliada. proposal_mentioned: @@ -259,7 +257,6 @@ gl: notification_title: A túa proposta %{resource_title} foi rexeitada. follower: email_intro: 'A proposta "%{resource_title}" foi rexeitada. Podes ler a resposta nesta páxina:' - email_outro: Recibiches esta notificación porque estás seguindo "%{resource_title}". Podes deixar de seguir desde a ligazón anterior. email_subject: A proposta que segues foi rexeitada notification_title: A proposta %{resource_title} foi rexeitada. proposal_update_category: @@ -396,6 +393,7 @@ gl: accepted: Aceptada answer_proposal: Resposta evaluating: Avaliación + not_answered: Non respondeu rejected: Rexeitado title: Resposta á proposta %{title} proposal_notes: diff --git a/decidim-proposals/config/locales/hu.yml b/decidim-proposals/config/locales/hu.yml index 5d934507deded..8a7892918868e 100644 --- a/decidim-proposals/config/locales/hu.yml +++ b/decidim-proposals/config/locales/hu.yml @@ -11,6 +11,8 @@ hu: state: Állapot title: Cím user_group_id: Közösen szerkesztett vázlat + import_participatory_text: + document: Közösen szerkesztendő szöveg proposal: address: Cím answer: Válasz @@ -124,6 +126,8 @@ hu: comments_enabled: Megjegyzések engedélyezve default_sort_order: Alapértelmezett javaslat rendezés default_sort_order_help: Az alapértelmezett azt jelenti, hogy ha a támogatások engedélyezettek, a javaslatok véletlenszerűség szerint rendezve fog megjelenni, és ha a támogatások blokkolva vannak, akkor a leginkább támogatottak szerint lesznek rendezve. + default_sort_order_options: + most_endorsed: Legtámogatottabb geocoding_enabled: Geokódolás engedélyezve minimum_votes_per_user: Minimális támogatás felhasználónként new_proposal_body_template: Új javaslat szövegtörzse @@ -167,6 +171,8 @@ hu: creation_enabled_readonly: Ez a beállítás le van tiltva, ha aktiválja a Részvételi Szövegek funkciót. A javaslatok részvételi szövegekként való feltöltéséhez kattintson a Részvételi Szövegek gombra és kövesse az utasításokat. default_sort_order: Alapértelmezett javaslat rendezés default_sort_order_help: Az alapértelmezett azt jelenti, hogy ha a támogatások engedélyezettek, a javaslatok véletlenszerűség szerint rendezve fog megjelenni, és ha a támogatások blokkolva vannak, akkor a leginkább támogatottak szerint lesznek rendezve. + default_sort_order_options: + most_endorsed: Legtámogatottabb endorsements_blocked: Jóváhagyások letiltva endorsements_enabled: Jóváhagyások engedélyezve proposal_answering_enabled: Javaslat válasz engedélyezve @@ -220,7 +226,6 @@ hu: notification_title: Javaslata %{resource_title} elfogadva. follower: email_intro: 'A(z) "%{resource_title}" című javaslat elfogadva. További részletek a következő oldalon:' - email_outro: 'Ezt az értesítést azért kaptad, mert ezt követed: "%{resource_title}". Leiratkozás az előző link segítségével.' email_subject: A követett javaslatot elfogadták notification_title: A %{resource_title} című javaslatot elfogadták. proposal_evaluating: @@ -231,7 +236,6 @@ hu: notification_title: Javaslata %{resource_title} értékelődik. follower: email_intro: 'A(z) "%{resource_title}" című javaslatot éppen értékelik. További részletek a következő oldalon:' - email_outro: 'Ezt az értesítést azért kaptad, mert ezt követed: "%{resource_title}". Leiratkozás az előző link segítségével.' email_subject: A követett javaslat értékelése folyamatban van notification_title: A(z) %{resource_title} javaslat értékelése folyamatban. proposal_mentioned: @@ -258,7 +262,6 @@ hu: notification_title: Javaslata %{resource_title} elutasításra került. follower: email_intro: 'A(z) "%{resource_title}" című javaslat elutasítva. További részletek a következő oldalon:' - email_outro: 'Ezt az értesítést azért kaptad, mert ezt követed: "%{resource_title}". Leiratkozás az előző link segítségével.' email_subject: A követett javaslatot elutasították notification_title: A(z) %{resource_title} című javaslatot elutasították. proposal_update_category: @@ -317,9 +320,9 @@ hu: object: javaslatok title: Elfogadott javaslatok endorsements: - description: A javaslatokhoz kapcsolódó jóváhagyások száma - object: elismerések - title: Elismerések + description: A javaslatokhoz kapcsolódó támogatások száma + object: támogatások + title: Támogatások proposals: description: A létrehozott javaslatok száma object: javaslatok @@ -405,7 +408,7 @@ hu: accepted: Elfogadva answer_proposal: Válasz evaluating: Értékelés - not_answered: Megválaszolatlan + not_answered: Nem megválaszolt rejected: Elutasítva title: Válasz a(z) %{title} javaslatra proposal_notes: @@ -469,8 +472,8 @@ hu: comments_positive_count: Kedvenc created_at: Létrehozás dátuma documents: Dokumentumok - endorsements_count: Jóváhagyások száma - endorsements_ranking: Jóváhagyások szerinti besorolás + endorsements_count: Támogatások száma + endorsements_ranking: Támogatások szerinti besorolás endorsers: Támogatók link: Link n_more_endorsers: diff --git a/decidim-proposals/config/locales/id-ID.yml b/decidim-proposals/config/locales/id-ID.yml index 4cb92900e5b0d..4a8ff4422a5d0 100644 --- a/decidim-proposals/config/locales/id-ID.yml +++ b/decidim-proposals/config/locales/id-ID.yml @@ -152,7 +152,6 @@ id: notification_title: Proposal Anda %{resource_title} telah diterima. follower: email_intro: 'Proposal "%{resource_title}" telah diterima. Anda dapat membaca jawabannya di halaman ini:' - email_outro: Anda telah menerima pemberitahuan ini karena Anda mengikuti "%{resource_title}". Anda dapat berhenti mengikutinya dari tautan sebelumnya. email_subject: Proposal yang Anda ikuti telah diterima notification_title: Proposal %{resource_title} telah diterima. proposal_evaluating: @@ -163,7 +162,6 @@ id: notification_title: Proposal Anda %{resource_title} sedang dievaluasi. follower: email_intro: 'Proposal "%{resource_title}" saat ini sedang dievaluasi. Anda dapat memeriksa jawaban di halaman ini:' - email_outro: Anda telah menerima pemberitahuan ini karena Anda mengikuti "%{resource_title}". Anda dapat berhenti mengikutinya dari tautan sebelumnya. email_subject: Proposal yang Anda ikuti sedang dievaluasi notification_title: Proposal %{resource_title} sedang dievaluasi. proposal_mentioned: @@ -186,7 +184,6 @@ id: notification_title: Proposal Anda %{resource_title} telah ditolak. follower: email_intro: 'Proposal "%{resource_title}" telah ditolak. Anda dapat membaca jawabannya di halaman ini:' - email_outro: Anda telah menerima pemberitahuan ini karena Anda mengikuti "%{resource_title}". Anda dapat berhenti mengikutinya dari tautan sebelumnya. email_subject: Proposal yang Anda ikuti telah ditolak notification_title: Proposal %{resource_title} telah ditolak. proposal_update_category: @@ -309,6 +306,7 @@ id: accepted: Diterima answer_proposal: Menjawab evaluating: Mengevaluasi + not_answered: Tidak dijawab rejected: Ditolak title: Jawaban untuk proposal %{title} proposal_notes: diff --git a/decidim-proposals/config/locales/is-IS.yml b/decidim-proposals/config/locales/is-IS.yml index 06c3bdc504519..251e4a8ea2c5f 100644 --- a/decidim-proposals/config/locales/is-IS.yml +++ b/decidim-proposals/config/locales/is-IS.yml @@ -67,13 +67,11 @@ is: proposal_accepted: follower: email_intro: 'Tillagan "%{resource_title}" hefur verið samþykkt. Þú getur lesið svarið á þessari síðu:' - email_outro: Þú hefur fengið þessa tilkynningu vegna þess að þú fylgist með "%{resource_title}". Þú getur sleppt því frá fyrri tengilinn. email_subject: Tillaga sem þú ert að fylgja hefur verið samþykkt notification_title: %{resource_title} tillöguna hefur verið samþykkt. proposal_evaluating: follower: email_intro: 'Tillagan "%{resource_title}" er nú metin. Þú getur leitað að svari á þessari síðu:' - email_outro: Þú hefur fengið þessa tilkynningu vegna þess að þú fylgist með "%{resource_title}". Þú getur sleppt því frá fyrri tengilinn. email_subject: Tillaga sem þú fylgir er metin notification_title: %{resource_title} tillögunni er metið. proposal_mentioned: @@ -87,7 +85,6 @@ is: proposal_rejected: follower: email_intro: 'Tillagan "%{resource_title}" hefur verið hafnað. Þú getur lesið svarið á þessari síðu:' - email_outro: Þú hefur fengið þessa tilkynningu vegna þess að þú fylgist með "%{resource_title}". Þú getur sleppt því frá fyrri tengilinn. email_subject: Tillaga sem þú ert að fylgja hefur verið hafnað notification_title: %{resource_title} tillöguna hefur verið hafnað. proposal_update_category: @@ -115,6 +112,7 @@ is: accepted: Samþykkt answer_proposal: Svara evaluating: Mat + not_answered: Ekki svarað rejected: Hafnað title: Svar fyrir tillögu %{title} proposal_notes: @@ -177,7 +175,10 @@ is: filter_origin_values: official: Opinber filter_state_values: + accepted: Samþykkt + evaluating: Mat not_answered: Ekki svarað + rejected: Hafnað content_blocks: highlighted_proposals: proposals: Tillögur diff --git a/decidim-proposals/config/locales/it.yml b/decidim-proposals/config/locales/it.yml index 487497eb5d4f1..3d3aa745bc15a 100644 --- a/decidim-proposals/config/locales/it.yml +++ b/decidim-proposals/config/locales/it.yml @@ -236,7 +236,6 @@ it: notification_title: La tua proposta %{resource_title} è stata accettata. follower: email_intro: 'La proposta "%{resource_title}" è stata accettata. Puoi leggere la risposta in questa pagina:' - email_outro: Hai ricevuto questa notifica perché stai seguendo "%{resource_title}". Puoi smettere di seguirlo dal link precedente. email_subject: Una proposta che stai seguendo è stata accettata notification_title: La proposta %{resource_title} è stata accettata. proposal_evaluating: @@ -247,7 +246,6 @@ it: notification_title: La tua proposta %{resource_title} è in fase di valutazione. follower: email_intro: 'La proposta "%{resource_title}" è attualmente in fase di valutazione. Puoi trovare una risposta in questa pagina:' - email_outro: Hai ricevuto questa notifica perché stai seguendo "%{resource_title}". Puoi smettere di seguirlo dal link precedente. email_subject: Una proposta che stai seguendo è in corso di valutazione notification_title: La proposta %{resource_title} è in fase di valutazione. proposal_mentioned: @@ -272,7 +270,6 @@ it: notification_title: La tua proposta %{resource_title} è stata respinta. follower: email_intro: 'La proposta "%{resource_title}" è stata respinta. Puoi leggere la risposta in questa pagina:' - email_outro: Hai ricevuto questa notifica perché stai seguendo "%{resource_title}". Puoi smettere di seguirlo dal link precedente. email_subject: Una proposta che stai seguendo è stata respinta notification_title: La proposta %{resource_title} è stata respinta. proposal_update_category: @@ -404,6 +401,7 @@ it: accepted: Accettata answer_proposal: Risposta evaluating: Valutare + not_answered: Non risposto rejected: Rifiutata title: Risposta per la proposta %{title} proposal_notes: @@ -546,11 +544,11 @@ it: filter_scope_values: all: Tutti filter_state_values: - accepted: Accettato + accepted: Accettata all: Tutti evaluating: Valutare not_answered: Non risposto - rejected: Respinto + rejected: Rifiutata filter_type_values: all: Tutti amendments: Modifiche diff --git a/decidim-proposals/config/locales/ja.yml b/decidim-proposals/config/locales/ja.yml index 024a6a01129fc..9237e4e2374b1 100644 --- a/decidim-proposals/config/locales/ja.yml +++ b/decidim-proposals/config/locales/ja.yml @@ -12,6 +12,8 @@ ja: state: 都道府県: title: タイトル user_group_id: 共同草案として作成します + import_participatory_text: + document: 参加テキスト proposal: address: 住所 answer: 回答 @@ -36,7 +38,7 @@ ja: origin_component_id: 提案をコピーするコンポーネント proposals_import: import_proposals: 提案をインポート - keep_answers: 状態と回答を保持 + keep_answers: ステータスと回答を保持 keep_authors: オリジナルの作者を保持 valuation_assignment: admin_log: @@ -271,7 +273,7 @@ ja: notification_title: あなたの提案 %{resource_title} が承認されました。 follower: email_intro: '提案「%{resource_title}」が承認されました。このページで回答を読むことができます:' - email_outro: '「%{resource_title}」をフォローしているため、この通知を受け取りました。前のリンクからこの通知をアンフォローすることができます。' + email_outro: '"%{resource_title}" をフォローしているため、この通知を受け取りました。前述のリンクからフォローを解除できます。' email_subject: あなたがフォローしている提案が受け入れられました notification_title: %{resource_title} の提案が承認されました。 proposal_evaluating: @@ -282,7 +284,7 @@ ja: notification_title: あなたの提案 %{resource_title} が評価されています。 follower: email_intro: '提案 "%{resource_title}" は現在評価されています。このページで回答を確認できます:' - email_outro: '「%{resource_title}」をフォローしているため、この通知を受け取りました。前のリンクからこの通知をアンフォローすることができます。' + email_outro: '"%{resource_title}" をフォローしているため、この通知を受け取りました。前述のリンクからフォローを解除できます。' email_subject: あなたがフォローしている提案が評価されています notification_title: %{resource_title} の提案が評価されています。 proposal_mentioned: @@ -309,7 +311,7 @@ ja: notification_title: あなたの提案 %{resource_title} が却下されました。 follower: email_intro: '提案 "%{resource_title}" は拒否されました。このページで回答を読むことができます:' - email_outro: '「%{resource_title}」をフォローしているため、この通知を受け取りました。前のリンクからこの通知をアンフォローすることができます。' + email_outro: '"%{resource_title}" をフォローしているため、この通知を受け取りました。前述のリンクからフォローを解除できます。' email_subject: あなたがフォローしている提案が拒否されました notification_title: %{resource_title} の提案は拒否されました。 proposal_update_category: @@ -466,7 +468,7 @@ ja: accepted: 承認済み answer_proposal: 回答 evaluating: 評価 - not_answered: 未回答 + not_answered: 応答がありません rejected: 拒否 title: 提案 %{title} の回答 proposal_notes: diff --git a/decidim-proposals/config/locales/lt.yml b/decidim-proposals/config/locales/lt.yml index b8049908f4e04..58f993d50a86e 100644 --- a/decidim-proposals/config/locales/lt.yml +++ b/decidim-proposals/config/locales/lt.yml @@ -283,7 +283,6 @@ lt: notification_title: Jūsų pasiūlymas %{resource_title} priimtas. follower: email_intro: 'Pasiūlymas "%{resource_title}" priimtas. Atsakymą galite perskaityti šiame puslapyje:' - email_outro: Gavote šį pranešimą, nes sekate %{resource_title}. Galite nebesekti paspaudę ant aukščiau esančios nuorodos. email_subject: Pasiūlymas, kurį sekate, buvo priimtas notification_title: %{resource_title} pasiūlymas priimtas. proposal_evaluating: @@ -294,7 +293,6 @@ lt: notification_title: Jūsų pasiūlymas %{resource_title} šiuo metu vertinamas. follower: email_intro: 'Pasiūlymas "%{resource_title}" šiuo metu vertinamas. Atsakymą galite patikrinti šiame puslapyje:' - email_outro: Gavote šį pranešimą, nes sekate %{resource_title}. Galite nebesekti paspaudę ant aukščiau esančios nuorodos. email_subject: Pasiūlymas, kurį sekate, šiuo metu vertinamas notification_title: %{resource_title} pasiūlymas šiuo metu vertinamas. proposal_mentioned: @@ -321,7 +319,6 @@ lt: notification_title: Jūsų pasiūlymas %{resource_title} atmestas. follower: email_intro: 'Pasiūlymas „%{resource_title}“ atmestas. Atsakymą galite perskaityti šiame puslapyje:' - email_outro: Gavote šį pranešimą, nes sekate %{resource_title}. Galite nebesekti paspaudę ant aukščiau esančios nuorodos. email_subject: Pasiūlymas, kurį sekate, buvo atmestas notification_title: Pasiūlymas %{resource_title} buvo atmestas. proposal_update_category: diff --git a/decidim-proposals/config/locales/lv.yml b/decidim-proposals/config/locales/lv.yml index 1e32880e2fece..ec78715de33f8 100644 --- a/decidim-proposals/config/locales/lv.yml +++ b/decidim-proposals/config/locales/lv.yml @@ -195,7 +195,6 @@ lv: notification_title: Jūsu priekšlikums %{resource_title} ir pieņemts. follower: email_intro: 'Priekšlikums "%{resource_title}" ir pieņemts. Jūs varat izlasīt atbildi šajā lapā:' - email_outro: Jūs saņēmāt šo paziņojumu, jo sekojat "%{resource_title}". Jūs varat atsekot tai no iepriekšējās saites. email_subject: Priekšlikums, kam jūs sekojat, ir pieņemts. notification_title: %{resource_title} priekšlikums ir pieņemts. proposal_evaluating: @@ -206,7 +205,6 @@ lv: notification_title: Jūsu priekšlikums %{resource_title} tiek vērtēts. follower: email_intro: 'Pašlaik tiek vērtēts jūsu priekšlikums "%{resource_title}". Atbilde būs pieejama šajā lapā:' - email_outro: Jūs saņēmāt šo paziņojumu, jo sekojat "%{resource_title}". Jūs varat atsekot tai no iepriekšējās saites. email_subject: Priekšlikums, kam jūs sekojat, tiek vērtēts notification_title: Priekšlikums %{resource_title} tiek vērtēts. proposal_mentioned: @@ -230,7 +228,6 @@ lv: notification_title: Jūsu priekšlikums %{resource_title} tika noraidīts. follower: email_intro: 'Priekšlikums "%{resource_title}" tika noraidīts. Jūs varat izlasīt atbildi šajā lapā:' - email_outro: Jūs saņēmāt šo paziņojumu, jo sekojat "%{resource_title}". Jūs varat atsekot tai no iepriekšējās saites. email_subject: Priekšlikums, kam jūs sekojat, tika noraidīts notification_title: %{resource_title} priekšlikums tika noraidīts. proposal_update_category: @@ -354,6 +351,7 @@ lv: accepted: Pieņemts answer_proposal: Atbilde evaluating: Vērtē + not_answered: Nav atbildēts rejected: Noraidīts title: Atbilde par priekšlikumu %{title} proposal_notes: diff --git a/decidim-proposals/config/locales/nl.yml b/decidim-proposals/config/locales/nl.yml index abbf4912b9413..2fcfcb3450e3a 100644 --- a/decidim-proposals/config/locales/nl.yml +++ b/decidim-proposals/config/locales/nl.yml @@ -234,12 +234,11 @@ nl: proposal_accepted: affected_user: email_intro: 'Uw voorstel "%{resource_title}" is geaccepteerd. U kunt het antwoord op deze pagina lezen:' - email_outro: U heeft deze melding ontvangen omdat u een auteur bent van "%{resource_title}". + email_outro: U hebt deze melding ontvangen omdat u een auteur bent van "%{resource_title}". email_subject: Uw voorstel is aanvaard notification_title: Uw voorstel %{resource_title} is aanvaard. follower: email_intro: 'Het voorstel "%{resource_title}" is aanvaard. Je kan het antwoord op deze pagina lezen:' - email_outro: Je hebt deze melding ontvangen omdat je "%{resource_title}" volgt. Ontvolgen kan door te klikken op de voorgaande link. email_subject: Een voorstel dat je volgt, is geaccepteerd notification_title: Het voorstel %{resource_title} is geaccepteerd. proposal_evaluating: @@ -250,7 +249,6 @@ nl: notification_title: Uw voorstel %{resource_title} wordt beoordeeld. follower: email_intro: 'Het voorstel "%{resource_title}" is geaccepteerd. Je kan het antwoord op deze pagina lezen:' - email_outro: Je hebt deze melding ontvangen omdat je "%{resource_title}" volgt. Ontvolgen kan door te klikken op de voorgaande link. email_subject: Een voorstel dat je volgt, wordt geëvalueerd notification_title: Het voorstel %{resource_title} wordt beoordeeld. proposal_mentioned: @@ -275,7 +273,6 @@ nl: notification_title: Uw voorstel %{resource_title} is afgewezen. follower: email_intro: 'Het voorstel "%{resource_title}" is afgewezen. Je kan de reden hier lezen:' - email_outro: Je hebt deze melding ontvangen omdat je "%{resource_title}" volgt. Ontvolgen kan door te klikken op de voorgaande link. email_subject: Een voorstel dat je volgt, is afgewezen notification_title: Het voorstel %{resource_title} is afgewezen. proposal_update_category: @@ -418,6 +415,7 @@ nl: accepted: Aanvaard answer_proposal: Antwoord evaluating: Aan het beoordelen + not_answered: Nog niet beantwoord rejected: Geweigerd title: Antwoord voor voorstel %{title} proposal_notes: @@ -564,9 +562,9 @@ nl: filter_state_values: accepted: Aanvaard all: Alle - evaluating: Evalueren + evaluating: Aan het beoordelen not_answered: Nog niet beantwoord - rejected: Afgewezen + rejected: Geweigerd filter_type_values: all: Alle amendments: wijzigingen diff --git a/decidim-proposals/config/locales/no.yml b/decidim-proposals/config/locales/no.yml index ab07c8622937e..9a5d907abc0b3 100644 --- a/decidim-proposals/config/locales/no.yml +++ b/decidim-proposals/config/locales/no.yml @@ -249,7 +249,6 @@ notification_title: Forslaget ditt %{resource_title} har blitt akseptert. follower: email_intro: 'Forslaget "%{resource_title}" er blitt akseptert. Du kan lese svaret på denne siden:' - email_outro: Du har mottatt denne varslingen fordi du følger "%{resource_title}". Du kan slutte å følge den fra den forrige lenken. email_subject: Et forslag du følger har blitt akseptert notification_title: %{resource_title} forslaget ble akseptert. proposal_evaluating: @@ -260,7 +259,6 @@ notification_title: Forslaget ditt %{resource_title} blir evaluert. follower: email_intro: 'Forslaget "%{resource_title}" holder på å bli evaluert. Du kan se etter svar på denne siden:' - email_outro: Du har mottatt denne varslingen fordi du følger "%{resource_title}". Du kan slutte å følge den fra den forrige lenken. email_subject: Et forslag du følger blir evaluert notification_title: %{resource_title} forslaget blir evaluert. proposal_mentioned: @@ -283,7 +281,6 @@ notification_title: Forslaget ditt %{resource_title} har blitt avvist. follower: email_intro: 'Forslaget "%{resource_title}" er blitt avvist. Du kan lese svaret på denne siden:' - email_outro: Du har mottatt denne varslingen fordi du følger "%{resource_title}". Du kan slutte å følge den fra den forrige lenken. email_subject: Et forslag du følger har blitt avslått notification_title: %{resource_title} forslaget ble avvist. proposal_update_category: @@ -422,6 +419,7 @@ accepted: Aksepterte answer_proposal: Svar evaluating: Vurderer + not_answered: Ikke besvart rejected: Avvist title: Svar for forslag %{title} proposal_notes: diff --git a/decidim-proposals/config/locales/pl.yml b/decidim-proposals/config/locales/pl.yml index 408cd5ad862b6..8e10889d7add3 100644 --- a/decidim-proposals/config/locales/pl.yml +++ b/decidim-proposals/config/locales/pl.yml @@ -12,6 +12,8 @@ pl: state: Stan title: Tytuł user_group_id: Utwórz wspólny szkic jako + import_participatory_text: + document: Uczestniczący dokument tekstowy proposal: address: Adres answer: Odpowiedź @@ -241,7 +243,7 @@ pl: notification_title: Twoja propozycja %{resource_title} została zaakceptowana. follower: email_intro: 'Propozycja "%{resource_title}" została zaakceptowana. Możesz przeczytać odpowiedź na tej stronie:' - email_outro: Otrzymałeś to powiadomienie, ponieważ obserwujesz "%{resource_title}". Aby przestać otrzymywać powiadomienia kliknij w powyższy link, a następnie na stronie propozycji kliknij w przycisk obserwowania. + email_outro: Otrzymujesz to powiadomienie, ponieważ obserwujesz "%{resource_title}". Aby przestać otrzymywać powiadomienia, kliknij wcześniejszy link. email_subject: Propozycja, którą obserwujesz, została zaakceptowana notification_title: Propozycja %{resource_title} została zaakceptowana. proposal_evaluating: @@ -252,7 +254,7 @@ pl: notification_title: Twoja propozycja %{resource_title} jest oceniana. follower: email_intro: 'Propozycja "%{resource_title}" jest obecnie oceniana. Możesz sprawdzić odpowiedź na tej stronie:' - email_outro: Otrzymałeś to powiadomienie, ponieważ obserwujesz "%{resource_title}". Aby przestać otrzymywać powiadomienia kliknij w powyższy link, a następnie na stronie propozycji kliknij w przycisk obserwowania. + email_outro: Otrzymujesz to powiadomienie, ponieważ obserwujesz "%{resource_title}". Aby przestać otrzymywać powiadomienia, kliknij wcześniejszy link. email_subject: Propozycja, którą obserwujesz, jest oceniana notification_title: Trwa ocenianie propozycji %{resource_title}. proposal_mentioned: @@ -277,7 +279,7 @@ pl: notification_title: Twoja propozycja %{resource_title} została odrzucona. follower: email_intro: 'Propozycja "%{resource_title}" została odrzucona. Możesz przeczytać odpowiedź na tej stronie:' - email_outro: Otrzymałeś to powiadomienie, ponieważ obserwujesz "%{resource_title}". Aby przestać otrzymywać powiadomienia kliknij w powyższy link, a następnie na stronie propozycji kliknij w przycisk obserwowania. + email_outro: Otrzymujesz to powiadomienie, ponieważ obserwujesz "%{resource_title}". Aby przestać otrzymywać powiadomienia, kliknij wcześniejszy link. email_subject: Propozycja, którą obserwujesz, została odrzucona notification_title: Propozycja %{resource_title} została odrzucona. proposal_update_category: @@ -580,7 +582,7 @@ pl: filter_scope_values: all: Wszystko filter_state_values: - accepted: Przyjęto + accepted: Zaakceptowano all: Wszystko evaluating: Ocena not_answered: Bez odpowiedzi diff --git a/decidim-proposals/config/locales/pt-BR.yml b/decidim-proposals/config/locales/pt-BR.yml index 1c639b0ffa699..d5fed22024ab3 100644 --- a/decidim-proposals/config/locales/pt-BR.yml +++ b/decidim-proposals/config/locales/pt-BR.yml @@ -247,7 +247,6 @@ pt-BR: notification_title: Sua proposta %{resource_title} foi aceita. follower: email_intro: 'A proposta "%{resource_title}" foi aceita. Você pode ler a resposta nesta página:' - email_outro: Você recebeu esta notificação porque está seguindo "%{resource_title}". Você pode ignorá-lo do link anterior. email_subject: Uma proposta que você está seguindo foi aceita notification_title: A proposta %{resource_title} foi aceita. proposal_evaluating: @@ -258,7 +257,6 @@ pt-BR: notification_title: Sua proposta %{resource_title} está sendo avaliada. follower: email_intro: 'A proposta "%{resource_title}" está sendo avaliada atualmente. Você pode verificar uma resposta nesta página:' - email_outro: Você recebeu esta notificação porque está seguindo "%{resource_title}". Você pode ignorá-lo do link anterior. email_subject: Uma proposta que você está seguindo está sendo avaliada notification_title: A proposta %{resource_title} está sendo avaliada. proposal_mentioned: @@ -285,7 +283,6 @@ pt-BR: notification_title: Sua proposta %{resource_title} foi rejeitada. follower: email_intro: 'A proposta "%{resource_title}" foi rejeitada. Você pode ler a resposta nesta página:' - email_outro: Você recebeu esta notificação porque está seguindo "%{resource_title}". Você pode ignorá-lo do link anterior. email_subject: Uma proposta que você está seguindo foi rejeitada notification_title: A proposta %{resource_title} foi rejeitada. proposal_update_category: diff --git a/decidim-proposals/config/locales/pt.yml b/decidim-proposals/config/locales/pt.yml index 236c3cf515c8b..57c86f7c206ee 100644 --- a/decidim-proposals/config/locales/pt.yml +++ b/decidim-proposals/config/locales/pt.yml @@ -256,7 +256,6 @@ pt: notification_title: A sua proposta %{resource_title} foi aceite. follower: email_intro: 'A proposta "%{resource_title}" foi aceite. Pode ler a resposta nesta página:' - email_outro: Você recebeu esta notificação porque está seguindo "%{resource_title}". Você pode ignorá-lo do link anterior. email_subject: Uma proposta que segue foi aceite notification_title: A proposta %{resource_title} foi aceite. proposal_evaluating: @@ -267,7 +266,6 @@ pt: notification_title: A sua proposta %{resource_title} está sob avaliação. follower: email_intro: 'A proposta "%{resource_title}" está atualmente sob avaliação. Pode verificar a resposta nesta página:' - email_outro: Recebeu esta notificação porque segue "%{resource_title}". Pode ignorá-la a partir da hiperligação anterior. email_subject: Uma proposta que você segue está sob avaliação notification_title: A proposta %{resource_title} está sob avaliação. proposal_mentioned: @@ -291,7 +289,6 @@ pt: notification_title: A sua proposta %{resource_title} foi rejeitada. follower: email_intro: 'A proposta "%{resource_title}" foi rejeitada. Pode ler a resposta nesta página:' - email_outro: Recebeu esta notificação porque segue "%{resource_title}". Pode ignorá-la a partir da hiperligação anterior. email_subject: Uma proposta que você segue foi rejeitada notification_title: A proposta %{resource_title} foi rejeitada. proposal_update_category: @@ -423,6 +420,7 @@ pt: accepted: Aceites answer_proposal: Resposta evaluating: Avaliando + not_answered: Não respondido rejected: Rejeitado title: Resposta para a proposta %{title} proposal_notes: diff --git a/decidim-proposals/config/locales/ro-RO.yml b/decidim-proposals/config/locales/ro-RO.yml index f3322066a35d7..34bdb2cae71b4 100644 --- a/decidim-proposals/config/locales/ro-RO.yml +++ b/decidim-proposals/config/locales/ro-RO.yml @@ -261,7 +261,6 @@ ro: notification_title: Propunerea ta %{resource_title} a fost acceptată. follower: email_intro: 'Propunerea "%{resource_title}" a fost acceptată. Poți citi răspunsul în această pagină:' - email_outro: Ai primit această notificare deoarece urmărești „%{resource_title}”. Poți anula urmărirea de la link-ul anterior. email_subject: O propunere pe care o urmărești a fost acceptată notification_title: Propunerea %{resource_title} a fost acceptată. proposal_evaluating: @@ -272,7 +271,6 @@ ro: notification_title: Propunerea ta %{resource_title} este în curs de evaluare. follower: email_intro: 'Propunerea "%{resource_title}" este în curs de evaluare. Poţi verifica răspunsul în această pagină:' - email_outro: Ai primit această notificare deoarece urmărești „%{resource_title}”. Poți anula urmărirea de la link-ul anterior. email_subject: O propunere pe care o urmărești este în curs de evaluare notification_title: Propunerea %{resource_title} este în curs de evaluare. proposal_mentioned: @@ -297,7 +295,6 @@ ro: notification_title: Propunerea ta %{resource_title} a fost respinsă. follower: email_intro: 'Propunerea "%{resource_title}" a fost respinsă. Poţi citi răspunsul în această pagină:' - email_outro: Ai primit această notificare deoarece urmărești „%{resource_title}”. Poți anula aceste notificări de la link-ul anterior. email_subject: O propunere pe care o urmărești a fost respinsă notification_title: Propunerea %{resource_title} a fost respinsă. proposal_update_category: @@ -442,6 +439,7 @@ ro: accepted: Acceptate answer_proposal: Răspunse evaluating: În evaluare + not_answered: Fără răspuns rejected: Respinse title: Răspuns pentru propunerea %{title} proposal_notes: diff --git a/decidim-proposals/config/locales/ru.yml b/decidim-proposals/config/locales/ru.yml index abe84ae496c75..8e000504b41db 100644 --- a/decidim-proposals/config/locales/ru.yml +++ b/decidim-proposals/config/locales/ru.yml @@ -110,13 +110,11 @@ ru: proposal_accepted: follower: email_intro: 'Предложение "%{resource_title}" было принято. Вы можете прочитать ответ на странице:' - email_outro: Вы получили это уведомление, потому что вы следите за «%{resource_title}». Вы можете перестать за ним следить, перейдя по приведенной выше ссылке. email_subject: Предложение, за которым вы следите, было принято notification_title: Предложение %{resource_title} было принято. proposal_evaluating: follower: email_intro: 'Предложение "%{resource_title}" сейчас рассматривается. Вы можете проверить наличие ответа на странице:' - email_outro: Вы получили это уведомление, потому что вы следите за «%{resource_title}». Вы можете перестать за ним следить, перейдя по приведенной выше ссылке. email_subject: Предложение, за которым вы следите, сейчас рассматривается notification_title: Предложение %{resource_title} на рассмотрении. proposal_mentioned: @@ -131,7 +129,6 @@ ru: proposal_rejected: follower: email_intro: 'Предложение "%{resource_title}" было отклонено. Вы можете прочитать ответ на странице:' - email_outro: Вы получили это уведомление, потому что вы следите за «%{resource_title}». Вы можете перестать за ним следить, перейдя по приведенной выше ссылке. email_subject: Предложение, за которым вы следите, было отклонено notification_title: Предложение %{resource_title} было отклонено. proposal_update_category: @@ -164,6 +161,7 @@ ru: accepted: Принято answer_proposal: Ответить evaluating: Рассматривается + not_answered: Без ответов rejected: Отклонено title: Ответ на предложение %{title} proposal_notes: @@ -230,7 +228,10 @@ ru: filter_origin_values: official: Служебные filter_state_values: + accepted: Принято + evaluating: Рассматривается not_answered: Без ответов + rejected: Отклонено content_blocks: highlighted_proposals: proposals: Предложения diff --git a/decidim-proposals/config/locales/sk.yml b/decidim-proposals/config/locales/sk.yml index 837b138e71259..e024423eddc52 100644 --- a/decidim-proposals/config/locales/sk.yml +++ b/decidim-proposals/config/locales/sk.yml @@ -193,7 +193,6 @@ sk: notification_title: Váš návrh %{resource_title} bol prijatý. follower: email_intro: 'Návrh "%{resource_title}" bol prijatý. Odpoveď môžete čítať na tejto stránke: ' - email_outro: Toto oznámenie ste dostali, pretože sledujete "%{resource_title}". Môžete ho odhlásiť od predchádzajúceho odkazu. email_subject: Návrh, ktorý sledujete, bol prijatý notification_title: Návrh %{resource_title} bol prijatý. proposal_evaluating: @@ -204,7 +203,6 @@ sk: notification_title: Váš návrh %{resource_title} je hodnotený. follower: email_intro: 'V súčasnej dobe sa hodnotí návrh "%{resource_title}". V tejto stránke môžete skontrolovať odpoveď: ' - email_outro: Toto oznámenie ste dostali, pretože sledujete "%{resource_title}". Môžete ho odhlásiť od predchádzajúceho odkazu. email_subject: Návrh, ktorý sledujete, sa hodnotí notification_title: Návrh %{resource_title} sa hodnotí. proposal_mentioned: @@ -228,7 +226,6 @@ sk: notification_title: Váš návrh %{resource_title} bol zamietnutý. follower: email_intro: 'Návrh "%{resource_title}" bol zamietnutý. Odpoveď môžete čítať na tejto stránke: ' - email_outro: Toto oznámenie ste dostali, pretože sledujete "%{resource_title}". Môžete ho odhlásiť od predchádzajúceho odkazu. email_subject: Návrh, ktorý sledujete, bol zamietnutý notification_title: Návrh %{resource_title} bol zamietnutý. proposal_update_category: @@ -354,9 +351,10 @@ sk: success: Úspešný text bol úspešne aktualizovaný. proposal_answers: form: - accepted: Prijal + accepted: Prijaté answer_proposal: Odpovedať - evaluating: Hodnotenie + evaluating: Hodnotené + not_answered: Nezodpovedané rejected: Odmietnuté title: Odpoveď na návrh%{title} proposal_notes: @@ -499,9 +497,9 @@ sk: filter_scope_values: all: Všetko filter_state_values: - accepted: Prijal + accepted: Prijaté all: Všetko - evaluating: Hodnotenie + evaluating: Hodnotené not_answered: Nezodpovedané rejected: Odmietnuté filter_type_values: diff --git a/decidim-proposals/config/locales/sv.yml b/decidim-proposals/config/locales/sv.yml index fe06e64772043..30a8e75da7a4b 100644 --- a/decidim-proposals/config/locales/sv.yml +++ b/decidim-proposals/config/locales/sv.yml @@ -257,7 +257,6 @@ sv: notification_title: Ditt förslag %{resource_title} har accepterats. follower: email_intro: 'Förslaget "%{resource_title}" har accepterats. Läs svaret på den här sidan:' - email_outro: Du har fått det här meddelandet eftersom du följer "%{resource_title}". Du kan sluta att följa det via föregående länk. email_subject: Ett förslag som du följer har accepterats notification_title: Förslaget %{resource_title} har accepterats. proposal_evaluating: @@ -268,7 +267,6 @@ sv: notification_title: Ditt förslag %{resource_title} utvärderas. follower: email_intro: 'Förslaget "%{resource_title}" utvärderas för närvarande. Du kan söka efter ett svar på den här sidan:' - email_outro: Du har fått det här meddelandet eftersom du följer "%{resource_title}". Du kan sluta att följa det via föregående länk. email_subject: Ett förslag som du följer utvärderas notification_title: Förslaget %{resource_title} utvärderas. proposal_mentioned: @@ -293,7 +291,6 @@ sv: notification_title: Ditt förslag %{resource_title} har avslagits. follower: email_intro: 'Förslaget "%{resource_title}" har avslagits. Du kan läsa svaret på den här sidan:' - email_outro: Du har fått det här meddelandet eftersom du följer "%{resource_title}". Du kan sluta att följa det via föregående länk. email_subject: Ett förslag som du följer har avslagits notification_title: Förslaget %{resource_title} har avslagits. proposal_update_category: @@ -436,7 +433,7 @@ sv: accepted: Accepterat answer_proposal: Svara evaluating: Utvärderas - not_answered: Ej besvarade + not_answered: Ej besvarat rejected: Avvisat title: Svar på förslaget %{title} proposal_notes: @@ -581,11 +578,11 @@ sv: filter_scope_values: all: Alla filter_state_values: - accepted: Accepterade + accepted: Accepterat all: Alla evaluating: Utvärderas not_answered: Ej besvarade - rejected: Avvisade + rejected: Avvisat filter_type_values: all: Alla amendments: Ändringsförslag diff --git a/decidim-proposals/config/locales/tr-TR.yml b/decidim-proposals/config/locales/tr-TR.yml index cf19257178c1c..d7df8b6d4eeaa 100644 --- a/decidim-proposals/config/locales/tr-TR.yml +++ b/decidim-proposals/config/locales/tr-TR.yml @@ -217,7 +217,7 @@ tr: notification_title: Teklifiniz %{resource_title} kabul edildi. follower: email_intro: '"%{resource_title}" teklifi kabul edildi. Cevabı bu sayfada okuyabilirsiniz:' - email_outro: Bu bildirimi, "%{resource_title}" takip ettiğiniz için aldınız. Bir önceki bağlantıdan takip etmeyi bırakabilirsiniz. + email_outro: Bu bildirimi "%{resource_title}" adresini takip ettiğiniz için aldınız. Önceki bağlantıdan takibi bırakabilirsiniz. email_subject: Takip ettiğiniz bir teklif kabul edildi notification_title: %{resource_title} teklif kabul edildi. proposal_evaluating: @@ -228,7 +228,7 @@ tr: notification_title: Teklifiniz %{resource_title} değerlendiriliyor. follower: email_intro: 'Şu anda "%{resource_title}" teklifi değerlendiriliyor. Bu sayfadaki cevabı kontrol edebilirsiniz:' - email_outro: Bu bildirimi, "%{resource_title}" takip ettiğiniz için aldınız. Bir önceki bağlantıdan takip etmeyi bırakabilirsiniz. + email_outro: Bu bildirimi "%{resource_title}" adresini takip ettiğiniz için aldınız. Önceki bağlantıdan takibi bırakabilirsiniz. email_subject: Takip ettiğiniz bir teklif değerlendiriliyor notification_title: %{resource_title} teklifi değerlendiriliyor. proposal_mentioned: @@ -252,7 +252,7 @@ tr: notification_title: Teklifiniz %{resource_title} reddedildi. follower: email_intro: '"%{resource_title}" teklifi reddedildi. Cevabı bu sayfada okuyabilirsiniz:' - email_outro: Bu bildirimi, "%{resource_title}" takip ettiğiniz için aldınız. Bir önceki bağlantıdan takip etmeyi bırakabilirsiniz. + email_outro: Bu bildirimi "%{resource_title}" adresini takip ettiğiniz için aldınız. Önceki bağlantıdan takibi bırakabilirsiniz. email_subject: Takip ettiğiniz bir teklif reddedildi notification_title: %{resource_title} teklifi reddedildi. proposal_update_category: @@ -381,10 +381,11 @@ tr: success: Katılımcı metin başarıyla güncellendi. proposal_answers: form: - accepted: Kabul edilmiş + accepted: Kabul Edildi answer_proposal: Cevap - evaluating: değerlendirilmesi - rejected: Reddedilen + evaluating: Değerlendiriliyor + not_answered: Cevaplanmadı + rejected: Reddedildi title: Teklifin cevabı %{title} proposal_notes: create: diff --git a/decidim-proposals/config/locales/uk.yml b/decidim-proposals/config/locales/uk.yml index 5c5c9e6a290f3..7dec909722c6f 100644 --- a/decidim-proposals/config/locales/uk.yml +++ b/decidim-proposals/config/locales/uk.yml @@ -110,13 +110,11 @@ uk: proposal_accepted: follower: email_intro: 'Пропозиція "%{resource_title}" була прийнята. Ви можете прочитати відповідь на сторінці:' - email_outro: Ви отримали це сповіщення, тому що ви стежите за "%{resource_title}". Ви можете припинити стежити за ним, перейшовши за наведеним вище посиланням. email_subject: Пропозиція, за якою ви стежите, була прийнята notification_title: Пропозицію %{resource_title} було прийнято. proposal_evaluating: follower: email_intro: 'Пропозиція "%{resource_title}" зараз розглядається. Ви можете перевірити наявність відповіді на сторінці:' - email_outro: Ви отримали це сповіщення, тому що ви стежите за "%{resource_title}". Ви можете припинити стежити за ним, перейшовши за наведеним вище посиланням. email_subject: Пропозиція, за якою ви стежите, зараз розглядається notification_title: Пропозиція %{resource_title} розглядається. proposal_mentioned: @@ -131,7 +129,6 @@ uk: proposal_rejected: follower: email_intro: 'Пропозиція "%{resource_title}" була відхилена. Ви можете прочитати відповідь на сторінці:' - email_outro: Ви отримали це сповіщення, тому що ви стежите за "%{resource_title}". Ви можете припинити стежити за ним, перейшовши за наведеним вище посиланням. email_subject: Пропозиція, за якою ви стежите, була відхилена notification_title: Пропозицію %{resource_title} було відхилено. proposal_update_category: @@ -164,6 +161,7 @@ uk: accepted: Прийнято answer_proposal: Відповісти evaluating: Розглядається + not_answered: Без відповідей rejected: Відхилено title: Відповідь на пропозицію %{title} proposal_notes: @@ -230,7 +228,10 @@ uk: filter_origin_values: official: Службове filter_state_values: + accepted: Прийнято + evaluating: Розглядається not_answered: Без відповідей + rejected: Відхилено content_blocks: highlighted_proposals: proposals: Пропозиції diff --git a/decidim-proposals/config/locales/zh-CN.yml b/decidim-proposals/config/locales/zh-CN.yml index f36891fe7aad6..39c125b08106b 100644 --- a/decidim-proposals/config/locales/zh-CN.yml +++ b/decidim-proposals/config/locales/zh-CN.yml @@ -206,7 +206,6 @@ zh-CN: notification_title: 您的提议 %{resource_title} 已被接受。 follower: email_intro: '提议 "%{resource_title}" 已被接受。您可以在此页面中阅读答案:' - email_outro: 您收到此通知是因为您正在关注 "%{resource_title}"。您可以从上一个链接取消关注它。 email_subject: 您关注的建议已被接受 notification_title: %{resource_title} 提议已被接受。 proposal_evaluating: @@ -217,7 +216,6 @@ zh-CN: notification_title: 您的提议 %{resource_title} 正在评估中。 follower: email_intro: '提议 "%{resource_title}" 目前正在评估。您可以在这个页面检查答案:' - email_outro: 您收到此通知是因为您正在关注 "%{resource_title}"。您可以从上一个链接取消关注它。 email_subject: 正在评估您关注的建议 notification_title: %{resource_title} 提议正在评估中。 proposal_mentioned: @@ -239,7 +237,6 @@ zh-CN: notification_title: 您的提议 %{resource_title} 已被拒绝 follower: email_intro: '提议 "%{resource_title}" 已被拒绝。您可以在此页中读取答案:' - email_outro: 您收到此通知是因为您正在关注 "%{resource_title}"。您可以从上一个链接取消关注它。 email_subject: 您关注的建议已被拒绝 notification_title: %{resource_title} 提议已被拒绝。 proposal_update_category: @@ -366,6 +363,7 @@ zh-CN: accepted: 已接受 answer_proposal: 答案 evaluating: 评价 + not_answered: 未回答 rejected: 已拒绝 title: 对提议 %{title} 的答案 proposal_notes: diff --git a/decidim-proposals/config/locales/zh-TW.yml b/decidim-proposals/config/locales/zh-TW.yml index 848a83aa2cf95..7ea2b862ef8b5 100644 --- a/decidim-proposals/config/locales/zh-TW.yml +++ b/decidim-proposals/config/locales/zh-TW.yml @@ -271,7 +271,6 @@ zh-TW: notification_title: 您的提案 %{resource_title} 已被接受。 follower: email_intro: '該提案「%{resource_title}」已被接受。您可以在此頁面上閱讀回應:' - email_outro: 您收到了此通知,是因為您正在關注 "%{resource_title}"。您可以通過前面的鏈接取消關注它。 email_subject: 您追蹤的提案已被接受 notification_title: %{resource_title}" 提案已經被接受。 proposal_evaluating: @@ -282,7 +281,6 @@ zh-TW: notification_title: 您的提案%{resource_title}正在評估中。 follower: email_intro: '該提案“%{resource_title}”正在進行評估。您可以在此頁面上查看答案:' - email_outro: 您收到了此通知,是因為您正在關注 "%{resource_title}"。您可以通過前面的鏈接取消關注它。 email_subject: 你追蹤的提案正在評估中 notification_title: %{resource_title} 提案正在評估中。 proposal_mentioned: @@ -309,7 +307,6 @@ zh-TW: notification_title: 您的提案%{resource_title}已被拒絕。 follower: email_intro: '該提案「%{resource_title}」已被駁回。您可以在此頁面中閱讀回覆:' - email_outro: 您收到了此通知,是因為您正在關注 "%{resource_title}"。您可以通過前面的鏈接取消關注它。 email_subject: 您追蹤的提案已被拒絕 notification_title: %{resource_title}" 提案已經被拒絕。 proposal_update_category: diff --git a/decidim-sortitions/config/locales/de.yml b/decidim-sortitions/config/locales/de.yml index 82a056ee1814e..55f66a1ca5635 100644 --- a/decidim-sortitions/config/locales/de.yml +++ b/decidim-sortitions/config/locales/de.yml @@ -102,7 +102,7 @@ de: category: Kategorie category_prompt: Wählen Sie eine Kategorie search: Suche - state: Zustand + state: Status filters_small_view: close_modal: Modal schließen filter: Filter diff --git a/decidim-system/config/locales/fi.yml b/decidim-system/config/locales/fi.yml index 64121672c4373..4225c5c2041e4 100644 --- a/decidim-system/config/locales/fi.yml +++ b/decidim-system/config/locales/fi.yml @@ -183,8 +183,8 @@ fi: google_oauth2: client_id: Asiakkaan tunniste (Client ID) client_secret: Asiakkaan salausavain (Client secret) - icon: Ikoni - icon_path: Ikonin polku + icon: Kuvake + icon_path: Kuvakkeen polku twitter: api_key: API-avain api_secret: API-salausavain diff --git a/decidim-system/config/locales/hu.yml b/decidim-system/config/locales/hu.yml index 1e439770fa4d1..fe8b3ea94ce09 100644 --- a/decidim-system/config/locales/hu.yml +++ b/decidim-system/config/locales/hu.yml @@ -61,6 +61,8 @@ hu: validations: email_uniqueness: egy másik admin már használja ezt az email címet oauth_application: + fields: + created_at: 'Létrehozva:' name: OAuth alkalmazás organization: actions: @@ -70,6 +72,9 @@ hu: name: Név omniauth_settings: Omniauth beállítások smtp_settings: SMTP beállítások + oauth_applications: + create: + success: Alkalmazás létrehozása sikeres. organizations: create: error: Hiba történt az új szervezet létrehozása során. diff --git a/decidim-verifications/config/locales/ar.yml b/decidim-verifications/config/locales/ar.yml index 8380dbae45c7b..7f57ab20a1d22 100644 --- a/decidim-verifications/config/locales/ar.yml +++ b/decidim-verifications/config/locales/ar.yml @@ -167,11 +167,6 @@ ar: new: send: طلب التحقق title: قم بتحميل مستند هويتك - update: - error: حدثت مشكلة أثناء إعادة تحميل المستند - success: تم إعادة تحميل المستند بنجاح - dni: DNI - nie: NIE passport: جواز سفر postal_letter: admin: diff --git a/decidim-verifications/config/locales/ca.yml b/decidim-verifications/config/locales/ca.yml index c2bcef4eb8feb..31c584f90a90c 100644 --- a/decidim-verifications/config/locales/ca.yml +++ b/decidim-verifications/config/locales/ca.yml @@ -224,10 +224,9 @@ ca: send: Sol·licita la verificació title: Puja el document d'identitat update: - error: S'ha produït un problema en tornar a pujar el document - success: El document s'ha tornat a pujar correctament - dni: DNI - nie: NIE + error: S'ha produït un problema en tornar a carregar el document. + success: El document s'ha tornat a carregar correctament. + identification_number: Número d'identificació passport: Passaport postal_letter: admin: diff --git a/decidim-verifications/config/locales/cs.yml b/decidim-verifications/config/locales/cs.yml index f7bda8d7838cf..8f03053c9fe7e 100644 --- a/decidim-verifications/config/locales/cs.yml +++ b/decidim-verifications/config/locales/cs.yml @@ -228,10 +228,9 @@ cs: send: Požádejte o ověření title: Nahrajte svůj doklad totožnosti update: - error: Při načítání dokumentu došlo k problému - success: Dokument byl úspěšně obnoven - dni: Občanský průkaz - nie: Daňové identifikační číslo + error: Při nahrávání Vašeho dokladu došlo k chybě. + success: Dokument byl úspěšně znovu nahrán. + identification_number: Identifikační číslo passport: Cestovní pas postal_letter: admin: diff --git a/decidim-verifications/config/locales/de.yml b/decidim-verifications/config/locales/de.yml index ef222db3492a5..3472d3b89c7dd 100644 --- a/decidim-verifications/config/locales/de.yml +++ b/decidim-verifications/config/locales/de.yml @@ -224,10 +224,9 @@ de: send: Überprüfung anfordern title: Laden Sie Ihr Identitätsdokument hoch update: - error: Beim erneuten Laden Ihres Dokuments ist ein Problem aufgetreten - success: Das Dokument wurde erfolgreich neu geladen - dni: Personalausweis - nie: NIE + error: Beim erneuten Hochladen Ihres Dokuments ist ein Problem aufgetreten. + success: Das Dokument wurde erfolgreich erneut hochgeladen. + identification_number: Identifikationsnummer passport: Reisepass postal_letter: admin: diff --git a/decidim-verifications/config/locales/el.yml b/decidim-verifications/config/locales/el.yml index ee01f5adb15a5..552bcba08af32 100644 --- a/decidim-verifications/config/locales/el.yml +++ b/decidim-verifications/config/locales/el.yml @@ -192,11 +192,6 @@ el: new: send: Αίτημα επαλήθευσης title: Πραγματοποιήστε αποστολή του εγγράφου ταυτότητάς σας - update: - error: Υπήρξε ένα πρόβλημα κατά την επανάληψη αποστολής του εγγράφου σας - success: Το έγγραφο μεταφορτώθηκε ξανά με επιτυχία - dni: DNI - nie: NIE passport: Διαβατήριο postal_letter: admin: diff --git a/decidim-verifications/config/locales/es-MX.yml b/decidim-verifications/config/locales/es-MX.yml index 8db68dbcc4565..d52b547b6d3bd 100644 --- a/decidim-verifications/config/locales/es-MX.yml +++ b/decidim-verifications/config/locales/es-MX.yml @@ -224,10 +224,9 @@ es-MX: send: Solicitar verificación title: Sube tu documento de Identidad update: - error: Hubo un problema al volver a subir tu documento - success: El documento se ha resubido correctamente - dni: DNI - nie: NIE + error: Se ha producido un error al volver a cargar tu documento. + success: El documento se ha vuelto a cargar correctamente. + identification_number: Número de identificación passport: Pasaporte postal_letter: admin: diff --git a/decidim-verifications/config/locales/es-PY.yml b/decidim-verifications/config/locales/es-PY.yml index 38073eae5ae1c..c6983ae4bb8f3 100644 --- a/decidim-verifications/config/locales/es-PY.yml +++ b/decidim-verifications/config/locales/es-PY.yml @@ -224,10 +224,9 @@ es-PY: send: Solicitar verificación title: Sube tu documento de Identidad update: - error: Hubo un problema al volver a subir tu documento - success: El documento se ha resubido correctamente - dni: CI - nie: NIE + error: Se ha producido un error al volver a cargar tu documento. + success: El documento se ha vuelto a cargar correctamente. + identification_number: Número de identificación passport: Pasaporte postal_letter: admin: diff --git a/decidim-verifications/config/locales/es.yml b/decidim-verifications/config/locales/es.yml index 531a142c676dc..4ddf3e9fbcde4 100644 --- a/decidim-verifications/config/locales/es.yml +++ b/decidim-verifications/config/locales/es.yml @@ -224,10 +224,9 @@ es: send: Solicitar verificación title: Sube tu documento de Identidad update: - error: Hubo un problema al volver a subir tu documento - success: El documento se ha vuelto a subir correctamente - dni: DNI - nie: NIE + error: Se ha producido un error al volver a cargar tu documento. + success: El documento se ha vuelto a cargar correctamente. + identification_number: Número de identificación passport: Pasaporte postal_letter: admin: diff --git a/decidim-verifications/config/locales/eu.yml b/decidim-verifications/config/locales/eu.yml index 3d656e0f89c46..588940e12a827 100644 --- a/decidim-verifications/config/locales/eu.yml +++ b/decidim-verifications/config/locales/eu.yml @@ -224,10 +224,9 @@ eu: send: Eskatu egiaztapena title: Igo zure identifikazio agiria update: - error: Arazo bat egon da zure dokumentua berriro igotzean - success: Dokumentua berriro kargatu da - dni: DNI - nie: NIE + error: Arazo bat egon da zure dokumentua berriro igotzean. + success: Dokumentua ondo igota berriro. + identification_number: Identifikazio zenbakia passport: pasaportea postal_letter: admin: diff --git a/decidim-verifications/config/locales/fi-plain.yml b/decidim-verifications/config/locales/fi-plain.yml index e188f14139181..a0deebc05d2b1 100644 --- a/decidim-verifications/config/locales/fi-plain.yml +++ b/decidim-verifications/config/locales/fi-plain.yml @@ -224,10 +224,9 @@ fi-pl: send: Pyydä vahvistusta title: Lähetä henkilöllisyystodistuksesi update: - error: Asiakirjan uudelleen lataaminen epäonnistui - success: Asiakirjan uudelleen lataaminen onnistui - dni: Henkilökortti - nie: HETU + error: Asiakirjan uudelleenlataaminen epäonnistui. + success: Asiakirjan uudelleenlataaminen onnistui. + identification_number: Henkilötunnus passport: Passi postal_letter: admin: diff --git a/decidim-verifications/config/locales/fi.yml b/decidim-verifications/config/locales/fi.yml index 6a1fef9c3b214..acd0551588c2e 100644 --- a/decidim-verifications/config/locales/fi.yml +++ b/decidim-verifications/config/locales/fi.yml @@ -224,10 +224,9 @@ fi: send: Pyydä vahvistusta title: Lähetä henkilöllisyystodistuksesi update: - error: Asiakirjan uudelleenlataaminen epäonnistui - success: Asiakirjan uudelleenlataus onnistui - dni: Henkilökortti - nie: HETU + error: Asiakirjan uudelleenlataaminen epäonnistui. + success: Asiakirjan uudelleenlataaminen onnistui. + identification_number: Henkilötunnus passport: Passi postal_letter: admin: diff --git a/decidim-verifications/config/locales/fr-CA.yml b/decidim-verifications/config/locales/fr-CA.yml index 2267247d077a8..ff52dd747dabf 100644 --- a/decidim-verifications/config/locales/fr-CA.yml +++ b/decidim-verifications/config/locales/fr-CA.yml @@ -224,10 +224,9 @@ fr-CA: send: Demande de vérification title: Téléchargez votre document d'identité update: - error: Un problème est survenu lors du chargement de votre document - success: Document téléchargé avec succès - dni: Carte nationale d'identité - nie: Carte de séjour ou de résident + error: Un problème est survenu lors du rechargement de votre document. + success: Document retéléchargé avec succès. + identification_number: Numéro d'identification passport: Passeport postal_letter: admin: diff --git a/decidim-verifications/config/locales/fr.yml b/decidim-verifications/config/locales/fr.yml index 6b4df911c3cbd..4416f1d89cc2f 100644 --- a/decidim-verifications/config/locales/fr.yml +++ b/decidim-verifications/config/locales/fr.yml @@ -224,10 +224,9 @@ fr: send: Demande de vérification title: Téléchargez votre document d'identité update: - error: Un problème est survenu lors du chargement de votre document - success: Document téléchargé avec succès - dni: Carte nationale d'identité - nie: Carte de séjour ou de résident + error: Un problème est survenu lors du rechargement de votre document. + success: Document retéléchargé avec succès. + identification_number: Numéro d'identification passport: Passeport postal_letter: admin: diff --git a/decidim-verifications/config/locales/ga-IE.yml b/decidim-verifications/config/locales/ga-IE.yml index a8b500ab29c86..7237807173885 100644 --- a/decidim-verifications/config/locales/ga-IE.yml +++ b/decidim-verifications/config/locales/ga-IE.yml @@ -42,8 +42,6 @@ ga: choose: offline: As líne online: Ar líne - dni: Cárta ID - nie: Cárta ID Eachtrannaigh postal_letter: admin: pending_authorizations: diff --git a/decidim-verifications/config/locales/gl.yml b/decidim-verifications/config/locales/gl.yml index b937f46752e0f..b5bc24bf68245 100644 --- a/decidim-verifications/config/locales/gl.yml +++ b/decidim-verifications/config/locales/gl.yml @@ -206,11 +206,6 @@ gl: new: send: Solicitar verificación title: Carga o documento de identidade - update: - error: Produciuse un problema ao volver cargar o documento - success: O documento foi reencriptado con éxito - dni: DNI - nie: NIE passport: Pasaporte postal_letter: admin: diff --git a/decidim-verifications/config/locales/hu.yml b/decidim-verifications/config/locales/hu.yml index 14b364392e942..37dc42b1f738c 100644 --- a/decidim-verifications/config/locales/hu.yml +++ b/decidim-verifications/config/locales/hu.yml @@ -220,10 +220,8 @@ hu: send: Ellenőrzés kérelem title: Személyi igazolvány feltöltése update: - error: Probléma volt a dokumentum újbóli feltöltésekor - success: Dokumentum újbóli feltöltése sikeres - dni: Sz.ig. - nie: Lakcím kártya + error: Probléma adódott a dokumentum újratöltésével. + success: Dokumentum sikeresen újratöltve. passport: Útlevél postal_letter: admin: diff --git a/decidim-verifications/config/locales/id-ID.yml b/decidim-verifications/config/locales/id-ID.yml index 545f34d72e459..5762e89569fa7 100644 --- a/decidim-verifications/config/locales/id-ID.yml +++ b/decidim-verifications/config/locales/id-ID.yml @@ -162,11 +162,6 @@ id: new: send: Meminta verifikasi title: Unggah dokumen identitas Anda - update: - error: Terjadi masalah saat memuat ulang dokumen Anda - success: Dokumen berhasil diunggah ulang - dni: DNI - nie: NIE passport: Paspor postal_letter: admin: diff --git a/decidim-verifications/config/locales/is-IS.yml b/decidim-verifications/config/locales/is-IS.yml index 6d3e8b213bd0e..e7a84c648ed38 100644 --- a/decidim-verifications/config/locales/is-IS.yml +++ b/decidim-verifications/config/locales/is-IS.yml @@ -80,10 +80,6 @@ is: new: send: Beiðni um staðfestingu title: Hladdu upp skjalið þitt - update: - error: Vandamál kom upp við að endurheimta skjalið þitt - dni: DNI - nie: NIE passport: Vegabréf postal_letter: admin: diff --git a/decidim-verifications/config/locales/it.yml b/decidim-verifications/config/locales/it.yml index ac5022f756b01..3ac0df1838e69 100644 --- a/decidim-verifications/config/locales/it.yml +++ b/decidim-verifications/config/locales/it.yml @@ -206,11 +206,6 @@ it: new: send: Richiedi la verifica title: Carica il tuo documento di identità - update: - error: Si è verificato un problema durante il caricamento del documento - success: Documento ricaricato con successo - dni: DNI - nie: NIE passport: Passaporto postal_letter: admin: diff --git a/decidim-verifications/config/locales/ja.yml b/decidim-verifications/config/locales/ja.yml index 926754d32bc42..5151170eec5f3 100644 --- a/decidim-verifications/config/locales/ja.yml +++ b/decidim-verifications/config/locales/ja.yml @@ -222,10 +222,9 @@ ja: send: リクエスト確認 title: 身分証明書をアップロード update: - error: ドキュメントの再アップロード中に問題が発生しました - success: ドキュメントを再アップロードしました - dni: 免許証 - nie: マイナンバーカード + error: ドキュメントの再アップロード中に問題が発生しました。 + success: ドキュメントを再アップロードしました。 + identification_number: 識別番号 passport: パスポート postal_letter: admin: diff --git a/decidim-verifications/config/locales/lt.yml b/decidim-verifications/config/locales/lt.yml index d7e6a9e10871c..d240a9b6aba43 100644 --- a/decidim-verifications/config/locales/lt.yml +++ b/decidim-verifications/config/locales/lt.yml @@ -228,10 +228,8 @@ lt: send: Užklausos tikrinimas title: Įkelkite savo tapatybės dokumentą update: - error: Iš naujo įkeliant jūsų dokumentą iškilo problema - success: Dokumentas iš naujo įkeltas - dni: Asmens tapatybės dokumentas - nie: NIE + error: Iš naujo įkeliant jūsų dokumentą iškilo problema. + success: Dokumentas įkeltas iš naujo. passport: Pasas postal_letter: admin: diff --git a/decidim-verifications/config/locales/lv.yml b/decidim-verifications/config/locales/lv.yml index d484619c1d25c..f95832cc49933 100644 --- a/decidim-verifications/config/locales/lv.yml +++ b/decidim-verifications/config/locales/lv.yml @@ -185,9 +185,6 @@ lv: new: send: Pieprasīt verifikāciju title: Augšupielādējiet savu personu apliecinošu dokumentu - update: - error: Atkārtoti augšupielādējot jūsu dokumentu, radās problēma - success: Dokuments ir veiksmīgi atkārtoti augšupielādēts passport: Pase postal_letter: admin: diff --git a/decidim-verifications/config/locales/nl.yml b/decidim-verifications/config/locales/nl.yml index 8d3443053d6e2..973b1ee3b4de6 100644 --- a/decidim-verifications/config/locales/nl.yml +++ b/decidim-verifications/config/locales/nl.yml @@ -206,11 +206,6 @@ nl: new: send: Verzoek om verificatie title: Upload uw identiteitsdocument - update: - error: Er is een probleem opgetreden bij het opnieuw uploaden van uw document - success: Document opnieuw succesvol geladen - dni: DNI - nie: NIE passport: Paspoort postal_letter: admin: diff --git a/decidim-verifications/config/locales/no.yml b/decidim-verifications/config/locales/no.yml index f1ebee0f8c319..1560fb5a3cd85 100644 --- a/decidim-verifications/config/locales/no.yml +++ b/decidim-verifications/config/locales/no.yml @@ -206,11 +206,6 @@ new: send: Be om verifikasjon title: Last opp dine identitetsdokumentet - update: - error: Det oppstod et problem med å laste opp dokumentet ditt på nytt - success: Dokumentet ble lastet opp på nytt - dni: DNI - nie: NIE passport: Pass postal_letter: admin: diff --git a/decidim-verifications/config/locales/pl.yml b/decidim-verifications/config/locales/pl.yml index 6a1fc7d0ff487..311549bcdbb12 100644 --- a/decidim-verifications/config/locales/pl.yml +++ b/decidim-verifications/config/locales/pl.yml @@ -210,11 +210,7 @@ pl: new: send: Poproś o weryfikację title: Prześlij swój dokument tożsamości - update: - error: Podczas ponownego ładowania dokumentu wystąpił błąd - success: Dokument został przesłany ponownie - dni: Dowód osobisty - nie: NIP + identification_number: Numer identyfikacyjny passport: Paszport postal_letter: admin: diff --git a/decidim-verifications/config/locales/pt-BR.yml b/decidim-verifications/config/locales/pt-BR.yml index 4b1f7e2694a35..a40b3b54b6493 100644 --- a/decidim-verifications/config/locales/pt-BR.yml +++ b/decidim-verifications/config/locales/pt-BR.yml @@ -213,11 +213,6 @@ pt-BR: new: send: Solicitar verificação title: Carregue seu documento de identidade - update: - error: Ocorreu um problema ao recarregar seu documento - success: Documento reusado com sucesso - dni: DNI - nie: NIE passport: Passaporte postal_letter: admin: diff --git a/decidim-verifications/config/locales/pt.yml b/decidim-verifications/config/locales/pt.yml index 0584cf60b4d56..d898d4457f6ad 100644 --- a/decidim-verifications/config/locales/pt.yml +++ b/decidim-verifications/config/locales/pt.yml @@ -206,11 +206,6 @@ pt: new: send: Solicitar verificação title: Envie o seu documento de identidade - update: - error: Ocorreu um problema ao reenviar o seu documento - success: Documento reenviado com êxito - dni: DNI - nie: NIE passport: Passaporte postal_letter: admin: diff --git a/decidim-verifications/config/locales/ro-RO.yml b/decidim-verifications/config/locales/ro-RO.yml index a12d490bc1318..ef3889f853fc2 100644 --- a/decidim-verifications/config/locales/ro-RO.yml +++ b/decidim-verifications/config/locales/ro-RO.yml @@ -208,11 +208,6 @@ ro: new: send: Cere verificare title: Încarcă documentul tău de identitate - update: - error: A apărut o eroare la reîncărcarea documentului - success: Document reîncărcat cu succes - dni: CI - nie: Viză de flotant/permis de ședere pentru rezidenți passport: Pașaport postal_letter: admin: diff --git a/decidim-verifications/config/locales/ru.yml b/decidim-verifications/config/locales/ru.yml index 3150be19bb55c..1d8fcb5100612 100644 --- a/decidim-verifications/config/locales/ru.yml +++ b/decidim-verifications/config/locales/ru.yml @@ -98,11 +98,6 @@ ru: new: send: Подать запрос на подтверждение личности title: Загрузить документ, удостоверяющий личность - update: - error: Не удалось заново загрузить ваш документ - success: Документ успешно заново загружен - dni: ИНН - nie: СНИЛС passport: Паспорт postal_letter: admin: diff --git a/decidim-verifications/config/locales/sk.yml b/decidim-verifications/config/locales/sk.yml index 3d109c80f2dc9..a10bf0fc284e0 100644 --- a/decidim-verifications/config/locales/sk.yml +++ b/decidim-verifications/config/locales/sk.yml @@ -192,11 +192,6 @@ sk: new: send: Požiadajte o overenie title: Nahrajte svoj doklad totožnosti - update: - error: Pri načítaní dokumentu došlo k problému - success: Dokument bol úspešne znovunahraný - dni: IČO - nie: DIČ passport: Cestovný pas postal_letter: admin: diff --git a/decidim-verifications/config/locales/sv.yml b/decidim-verifications/config/locales/sv.yml index 1ab1d40e9e84b..b9a0e8145fd13 100644 --- a/decidim-verifications/config/locales/sv.yml +++ b/decidim-verifications/config/locales/sv.yml @@ -194,11 +194,6 @@ sv: new: send: Begär verifiering title: Skicka in din identitetshandling - update: - error: Det gick inte att skicka in ID-handlingen igen - success: Dokumentet har skickats in igen - dni: ID-kort - nie: Personnummer passport: Pass postal_letter: admin: diff --git a/decidim-verifications/config/locales/tr-TR.yml b/decidim-verifications/config/locales/tr-TR.yml index 893415c49d3b3..4ab0b6eeb41f2 100644 --- a/decidim-verifications/config/locales/tr-TR.yml +++ b/decidim-verifications/config/locales/tr-TR.yml @@ -194,11 +194,7 @@ tr: new: send: Doğrulama isteğinde bulun title: Kimlik belgenizi yükleyin - update: - error: Belgenizi yeniden yüklerken bir sorun oluştu - success: Belge başarıyla yeniden yüklendi - dni: DNI - nie: NIE + identification_number: Kimlik Numarası passport: Pasaport postal_letter: admin: diff --git a/decidim-verifications/config/locales/uk.yml b/decidim-verifications/config/locales/uk.yml index 12157eabbef09..899072762bc64 100644 --- a/decidim-verifications/config/locales/uk.yml +++ b/decidim-verifications/config/locales/uk.yml @@ -98,11 +98,6 @@ uk: new: send: Подати запит на підтвердження особи title: Завантажте документ, що засвідчує вашу особу - update: - error: Під час повторного завантаження вашого документа сталася помилка - success: Документ успішно повторно завантажено - dni: ІПН - nie: РНОКПП passport: Паспорт postal_letter: admin: diff --git a/decidim-verifications/config/locales/zh-CN.yml b/decidim-verifications/config/locales/zh-CN.yml index c8b43fe2b63b8..e4aed9e459908 100644 --- a/decidim-verifications/config/locales/zh-CN.yml +++ b/decidim-verifications/config/locales/zh-CN.yml @@ -190,11 +190,6 @@ zh-CN: new: send: 请求验证 title: 上传您的身份文档 - update: - error: 重新上传您的文档时出现问题 - success: 文档已成功重新上传 - dni: DNI - nie: NIE passport: 护照: postal_letter: admin: diff --git a/decidim-verifications/config/locales/zh-TW.yml b/decidim-verifications/config/locales/zh-TW.yml index b006a9023cb1e..c2ab86c65e384 100644 --- a/decidim-verifications/config/locales/zh-TW.yml +++ b/decidim-verifications/config/locales/zh-TW.yml @@ -218,10 +218,8 @@ zh-TW: send: 申請驗證 title: 上傳您的身份證件 update: - error: 重新上傳您的文件時發生問題 - success: 文件已成功重新上傳 - dni: DNI - nie: NIE + error: 重新上傳您的文件時發生問題. + success: 文件已成功重新上傳. passport: 護照 postal_letter: admin: From 1756fa639ef393ca8e8bb16221cab2e2e7875705 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20Pereira=20de=20Lucena?= Date: Fri, 29 Mar 2024 23:50:02 +0100 Subject: [PATCH 08/88] Fix embeds for resources and spaces that shouldn't be embedded (#12528) * Check if the resources and spaces are unpublished when embedding * Check if the spaces are private when embedding * Fix the naming for the `skip_publication_checks` option Co-authored-by: Alexandru Emil Lupu * Move embed permission to its own action * Fix specs * Prevent accessing widgets from other organizations in multitenant * Fix bug on preventing multitenant access on components' resources * Prevent accessing moderated resources * Fix bug with users registered in a private space Until now we allowed them to embed the private non transparent space. This is a bug because even though they can access, the visitors in their external website would not be able to actually see the embed, so it's better to not allow this embed. * Add spec for checking the Embed link in the resource page * Prevent accessing withdrawn resources * Refactor specs definitions * Prevent or allow accessing initiatives according to their states * Fix specs names * Skip checking embed link in conferences * Fix specs for initiatives * Add all the states in the initiatives' permission spec * Add missing spec for consultations' embeds * Skip checking embed link in consultations' questions * Fix rubocop offense * Query for unpublished spaces Co-authored-by: Alexandru Emil Lupu * Make consistent the NotFound (404) response on withdrawn resources Co-authored-by: Alexandru Emil Lupu * Fix specs * Make consistent the NotFound (404) response on initiatives unpublished --------- Co-authored-by: Alexandru Emil Lupu --- .../decidim/assemblies/widgets_controller.rb | 12 +- .../decidim/assemblies/permissions.rb | 12 ++ .../decidim/assemblies/permissions_spec.rb | 30 +++ .../spec/system/assembly_embeds_spec.rb | 3 + .../conference_widgets_controller.rb | 12 +- .../decidim/conferences/permissions.rb | 11 + .../decidim/conferences/permissions_spec.rb | 36 ++++ .../spec/system/conference_embeds_spec.rb | 16 +- .../consultation_widgets_controller.rb | 13 +- .../question_widgets_controller.rb | 12 +- .../decidim/consultations/permissions.rb | 22 +- .../consultation_widgets/show.html.erb | 3 + .../decidim/consultations/permissions_spec.rb | 54 +++++ .../spec/system/consultation_embeds_spec.rb | 10 + .../spec/system/question_embeds_spec.rb | 15 +- .../controllers/decidim/widgets_controller.rb | 6 + .../embed_resource_examples.rb | 198 +++++++++++++++++- .../decidim/debates/widgets_controller.rb | 12 +- .../decidim/debates/permissions.rb | 6 + .../decidim/debates/permissions_spec.rb | 14 ++ .../spec/system/debate_embeds_spec.rb | 5 +- .../decidim/initiatives/widgets_controller.rb | 16 +- .../decidim/initiatives/permissions.rb | 10 + .../initiatives/initiatives/show.html.erb | 4 +- .../decidim/initiatives/permissions_spec.rb | 70 +++++++ .../spec/system/initiative_embeds_spec.rb | 66 +++++- .../decidim/meetings/widgets_controller.rb | 12 +- .../decidim/meetings/permissions.rb | 10 + .../decidim/meetings/meetings/show.html.erb | 4 +- .../decidim/meetings/permissions_spec.rb | 22 ++ .../spec/system/meeting_embeds_spec.rb | 5 +- .../widgets_controller.rb | 14 +- .../participatory_processes/permissions.rb | 12 ++ .../permissions_spec.rb | 30 +++ .../spec/system/process_embeds_spec.rb | 2 + .../decidim/proposals/widgets_controller.rb | 12 +- .../decidim/proposals/permissions.rb | 9 + .../decidim/proposals/proposals/show.html.erb | 4 +- .../decidim/proposals/permissions_spec.rb | 8 + .../spec/system/proposal_embeds_spec.rb | 6 +- .../decidim/sortitions/widgets_controller.rb | 12 +- .../decidim/sortitions/permissions.rb | 14 ++ .../decidim/sortitions/permissions_spec.rb | 8 + .../sortitions/sortition_embeds_spec.rb | 4 +- 44 files changed, 799 insertions(+), 57 deletions(-) create mode 100644 decidim-consultations/spec/system/consultation_embeds_spec.rb diff --git a/decidim-assemblies/app/controllers/decidim/assemblies/widgets_controller.rb b/decidim-assemblies/app/controllers/decidim/assemblies/widgets_controller.rb index 5472c75ca405e..14655a271c6df 100644 --- a/decidim-assemblies/app/controllers/decidim/assemblies/widgets_controller.rb +++ b/decidim-assemblies/app/controllers/decidim/assemblies/widgets_controller.rb @@ -5,10 +5,16 @@ module Assemblies class WidgetsController < Decidim::WidgetsController helper Decidim::SanitizeHelper + def show + enforce_permission_to :embed, :participatory_space, current_participatory_space: model if model + + super + end + private def model - @model ||= Assembly.find_by(slug: params[:assembly_slug]) + @model ||= Assembly.where(organization: current_organization).public_spaces.find_by(slug: params[:assembly_slug]) end def current_participatory_space @@ -18,6 +24,10 @@ def current_participatory_space def iframe_url @iframe_url ||= assembly_widget_url(model) end + + def permission_class_chain + ::Decidim.permissions_registry.chain_for(::Decidim::Assemblies::ApplicationController) + end end end end diff --git a/decidim-assemblies/app/permissions/decidim/assemblies/permissions.rb b/decidim-assemblies/app/permissions/decidim/assemblies/permissions.rb index 9f1de1819c627..765d8ab3f63be 100644 --- a/decidim-assemblies/app/permissions/decidim/assemblies/permissions.rb +++ b/decidim-assemblies/app/permissions/decidim/assemblies/permissions.rb @@ -16,6 +16,7 @@ def permissions if permission_action.scope == :public public_list_assemblies_action? public_read_assembly_action? + public_embed_assembly_action? public_list_members_action? return permission_action end @@ -136,6 +137,17 @@ def public_list_members_action? allow! end + def public_embed_assembly_action? + return unless permission_action.action == :embed && + [:assembly, :participatory_space].include?(permission_action.subject) && + assembly + + return disallow! unless assembly.published? + return disallow! if assembly.private_space && !assembly.is_transparent? + + allow! + end + # All users with a relation to a assembly and organization admins can enter # the space area. The sapce area is considered to be the assemblies zone, # not the assembly groups one. diff --git a/decidim-assemblies/spec/permissions/decidim/assemblies/permissions_spec.rb b/decidim-assemblies/spec/permissions/decidim/assemblies/permissions_spec.rb index 19b66fd7e7be4..48d10323187c5 100644 --- a/decidim-assemblies/spec/permissions/decidim/assemblies/permissions_spec.rb +++ b/decidim-assemblies/spec/permissions/decidim/assemblies/permissions_spec.rb @@ -127,6 +127,36 @@ end end + context "when embedding an assembly" do + let(:action) do + { scope: :public, action: :embed, subject: :assembly } + end + let(:context) { { assembly: assembly } } + + context "when the assembly is published" do + let(:user) { create(:user, organization: organization) } + + it { is_expected.to be true } + end + + context "when the assembly is not published" do + let(:user) { create(:user, organization: organization) } + let(:assembly) { create(:assembly, :unpublished, organization: organization) } + + context "when the user doesn't have access to it" do + it { is_expected.to be false } + end + + context "when the user has access to it" do + before do + create(:assembly_user_role, user: user, assembly: assembly) + end + + it { is_expected.to be false } + end + end + end + context "when listing assemblies" do let(:action) do { scope: :public, action: :list, subject: :assembly } diff --git a/decidim-assemblies/spec/system/assembly_embeds_spec.rb b/decidim-assemblies/spec/system/assembly_embeds_spec.rb index f9f7633291489..be7f78190ee87 100644 --- a/decidim-assemblies/spec/system/assembly_embeds_spec.rb +++ b/decidim-assemblies/spec/system/assembly_embeds_spec.rb @@ -4,6 +4,9 @@ describe "Assembly embeds", type: :system do let(:resource) { create(:assembly) } + let(:widget_path) { Decidim::EngineRouter.main_proxy(resource).assembly_widget_path } it_behaves_like "an embed resource", skip_space_checks: true + it_behaves_like "a private embed resource" + it_behaves_like "a transparent private embed resource" end diff --git a/decidim-conferences/app/controllers/decidim/conferences/conference_widgets_controller.rb b/decidim-conferences/app/controllers/decidim/conferences/conference_widgets_controller.rb index a44f7a2f8d4ed..7bc532621c3d7 100644 --- a/decidim-conferences/app/controllers/decidim/conferences/conference_widgets_controller.rb +++ b/decidim-conferences/app/controllers/decidim/conferences/conference_widgets_controller.rb @@ -5,10 +5,16 @@ module Conferences class ConferenceWidgetsController < Decidim::WidgetsController helper Decidim::SanitizeHelper + def show + enforce_permission_to :embed, :conference, conference: model if model + + super + end + private def model - @model ||= Conference.find_by(slug: params[:conference_slug]) + @model ||= Conference.where(organization: current_organization).published.find_by(slug: params[:conference_slug]) end def current_participatory_space @@ -18,6 +24,10 @@ def current_participatory_space def iframe_url @iframe_url ||= conference_conference_widget_url(model) end + + def permission_class_chain + ::Decidim.permissions_registry.chain_for(::Decidim::Conferences::ApplicationController) + end end end end diff --git a/decidim-conferences/app/permissions/decidim/conferences/permissions.rb b/decidim-conferences/app/permissions/decidim/conferences/permissions.rb index c1eab3c4c7b48..cd7fae9a4ce1d 100644 --- a/decidim-conferences/app/permissions/decidim/conferences/permissions.rb +++ b/decidim-conferences/app/permissions/decidim/conferences/permissions.rb @@ -16,6 +16,7 @@ def permissions if permission_action.scope == :public public_list_conferences_action? public_read_conference_action? + public_embed_conference_action? public_list_speakers_action? public_list_program_action? public_list_media_links_action? @@ -131,6 +132,16 @@ def public_read_conference_action? toggle_allow(can_manage_conference?) end + def public_embed_conference_action? + return unless permission_action.action == :embed && + [:conference, :participatory_space].include?(permission_action.subject) && + conference + + return disallow! unless conference.published? + + allow! + end + def public_list_speakers_action? return unless permission_action.action == :list && permission_action.subject == :speakers diff --git a/decidim-conferences/spec/permissions/decidim/conferences/permissions_spec.rb b/decidim-conferences/spec/permissions/decidim/conferences/permissions_spec.rb index 7e3f7ba4ef73e..df6d37e6f9fca 100644 --- a/decidim-conferences/spec/permissions/decidim/conferences/permissions_spec.rb +++ b/decidim-conferences/spec/permissions/decidim/conferences/permissions_spec.rb @@ -125,6 +125,42 @@ end end + context "when embedding a conference" do + let(:action) do + { scope: :public, action: :embed, subject: :conference } + end + let(:context) { { conference: conference } } + + context "when the user is an admin" do + let(:user) { create :user, :admin } + + it { is_expected.to be true } + end + + context "when the conference is published" do + let(:user) { create :user, organization: organization } + + it { is_expected.to be true } + end + + context "when the conference is not published" do + let(:user) { create :user, organization: organization } + let(:conference) { create :conference, :unpublished, organization: organization } + + context "when the user doesn't have access to it" do + it { is_expected.to be false } + end + + context "when the user has access to it" do + before do + create :conference_user_role, user: user, conference: conference + end + + it { is_expected.to be false } + end + end + end + context "when listing conferences" do let(:action) do { scope: :public, action: :list, subject: :conference } diff --git a/decidim-conferences/spec/system/conference_embeds_spec.rb b/decidim-conferences/spec/system/conference_embeds_spec.rb index f00c21f4e1ae4..25affa7682c35 100644 --- a/decidim-conferences/spec/system/conference_embeds_spec.rb +++ b/decidim-conferences/spec/system/conference_embeds_spec.rb @@ -3,18 +3,8 @@ require "spec_helper" describe "Conference embeds", type: :system do - let!(:conference) { create(:conference) } + let!(:resource) { create(:conference) } + let(:widget_path) { Decidim::EngineRouter.main_proxy(resource).conference_conference_widget_path } - context "when visiting the embed page for an conference" do - before do - switch_to_host(conference.organization.host) - visit resource_locator(conference).path - visit "#{current_path}/embed" - end - - it "renders the page correctly" do - expect(page).to have_i18n_content(conference.title) - expect(page).to have_content(conference.organization.name) - end - end + it_behaves_like "an embed resource", skip_space_checks: true, skip_link_checks: true end diff --git a/decidim-consultations/app/controllers/decidim/consultations/consultation_widgets_controller.rb b/decidim-consultations/app/controllers/decidim/consultations/consultation_widgets_controller.rb index 0602e7ad5f3f9..a2993077ee229 100644 --- a/decidim-consultations/app/controllers/decidim/consultations/consultation_widgets_controller.rb +++ b/decidim-consultations/app/controllers/decidim/consultations/consultation_widgets_controller.rb @@ -4,13 +4,20 @@ module Decidim module Consultations class ConsultationWidgetsController < Decidim::WidgetsController helper Decidim::SanitizeHelper + helper ConsultationsHelper layout false + def show + enforce_permission_to :embed, :participatory_space, current_participatory_space: model if model + + super + end + private def model - @model ||= Consultation.find_by(slug: params[:consultation_slug]) + @model ||= Consultation.where(organization: current_organization).published.find_by(slug: params[:consultation_slug]) end def current_participatory_space @@ -20,6 +27,10 @@ def current_participatory_space def iframe_url @iframe_url ||= consultation_consultation_widget_url(model) end + + def permission_class_chain + ::Decidim.permissions_registry.chain_for(::Decidim::Consultations::ApplicationController) + end end end end diff --git a/decidim-consultations/app/controllers/decidim/consultations/question_widgets_controller.rb b/decidim-consultations/app/controllers/decidim/consultations/question_widgets_controller.rb index d43f90cbc2ab1..15e3c7a85437b 100644 --- a/decidim-consultations/app/controllers/decidim/consultations/question_widgets_controller.rb +++ b/decidim-consultations/app/controllers/decidim/consultations/question_widgets_controller.rb @@ -8,10 +8,16 @@ class QuestionWidgetsController < Decidim::WidgetsController helper Decidim::SanitizeHelper + def show + enforce_permission_to :embed, :question, question: model if model + + super + end + private def model - @model ||= current_question + @model ||= current_question if current_question.published? end def current_participatory_space @@ -21,6 +27,10 @@ def current_participatory_space def iframe_url @iframe_url ||= question_question_widget_url(model) end + + def permission_class_chain + ::Decidim.permissions_registry.chain_for(::Decidim::Consultations::ApplicationController) + end end end end diff --git a/decidim-consultations/app/permissions/decidim/consultations/permissions.rb b/decidim-consultations/app/permissions/decidim/consultations/permissions.rb index fb197858c07f3..2d3c8b5f73017 100644 --- a/decidim-consultations/app/permissions/decidim/consultations/permissions.rb +++ b/decidim-consultations/app/permissions/decidim/consultations/permissions.rb @@ -5,6 +5,8 @@ module Consultations class Permissions < Decidim::DefaultPermissions def permissions allowed_public_anonymous_action? + allowed_public_embed_consultation_action? + allowed_public_embed_question_action? return permission_action unless user @@ -22,7 +24,7 @@ def question end def consultation - @consultation ||= context.fetch(:consultation, nil) + @consultation ||= context.fetch(:current_participatory_space, nil) || context.fetch(:consultation, nil) end def authorized?(permission_action, resource: nil) @@ -45,6 +47,24 @@ def allowed_public_anonymous_action? end end + def allowed_public_embed_consultation_action? + return unless permission_action.action == :embed && + [:consultation, :participatory_space].include?(permission_action.subject) && + consultation + + return disallow! unless consultation.published? + + allow! + end + + def allowed_public_embed_question_action? + return unless permission_action.action == :embed && permission_action.subject == :question && question + + return disallow! unless question.published? + + allow! + end + def allowed_public_action? return unless permission_action.scope == :public return unless permission_action.subject == :question diff --git a/decidim-consultations/app/views/decidim/consultations/consultation_widgets/show.html.erb b/decidim-consultations/app/views/decidim/consultations/consultation_widgets/show.html.erb index ce787f3e484ba..777af2af27486 100644 --- a/decidim-consultations/app/views/decidim/consultations/consultation_widgets/show.html.erb +++ b/decidim-consultations/app/views/decidim/consultations/consultation_widgets/show.html.erb @@ -1,3 +1,6 @@ +

<%= translated_attribute(model.title) %>

+

<%= current_organization.name %>

+ <%= render partial: "decidim/consultations/consultations/consultation_details", locals: { consultation: model } %> <%= render partial: "decidim/consultations/consultations/highlighted_questions", locals: { consultation: model } %> <%= render partial: "decidim/consultations/consultations/regular_questions", locals: { consultation: model } %> diff --git a/decidim-consultations/spec/permissions/decidim/consultations/permissions_spec.rb b/decidim-consultations/spec/permissions/decidim/consultations/permissions_spec.rb index 3792393f3220a..df742add501d2 100644 --- a/decidim-consultations/spec/permissions/decidim/consultations/permissions_spec.rb +++ b/decidim-consultations/spec/permissions/decidim/consultations/permissions_spec.rb @@ -52,6 +52,33 @@ end end + context "when embedding a consultation" do + let(:action_name) { :embed } + let(:action_subject) { :consultation } + + context "when the consultation is published" do + let(:consultation) { create :consultation, :published } + + it { is_expected.to be true } + end + + context "when the consultation is not published" do + let(:consultation) { create :consultation, :unpublished } + + context "when the user is not an admin" do + let(:user) { nil } + + it { is_expected.to be false } + end + + context "when the user is an admin" do + let(:user) { create :user, :admin, organization: organization } + + it { is_expected.to be false } + end + end + end + context "when reading a question" do let(:action_subject) { :question } @@ -78,6 +105,33 @@ end end + context "when embedding a question" do + let(:action_name) { :embed } + let(:action_subject) { :question } + + context "when the question is published" do + let(:question) { create :question, :published, consultation: consultation } + + it { is_expected.to be true } + end + + context "when the question is not published" do + let(:question) { create :question, :unpublished, consultation: consultation } + + context "when the user is not an admin" do + let(:user) { nil } + + it { is_expected.to be false } + end + + context "when the user is an admin" do + let(:user) { create :user, :admin, organization: organization } + + it { is_expected.to be false } + end + end + end + context "when voting a question" do let(:action_subject) { :question } let(:action_name) { :vote } diff --git a/decidim-consultations/spec/system/consultation_embeds_spec.rb b/decidim-consultations/spec/system/consultation_embeds_spec.rb new file mode 100644 index 0000000000000..13c88603fada0 --- /dev/null +++ b/decidim-consultations/spec/system/consultation_embeds_spec.rb @@ -0,0 +1,10 @@ +# frozen_string_literal: true + +require "spec_helper" + +describe "Consultation embeds", type: :system do + let(:resource) { create(:consultation) } + let(:widget_path) { Decidim::EngineRouter.main_proxy(resource).consultation_consultation_widget_path } + + it_behaves_like "an embed resource", skip_space_checks: true, skip_link_checks: true +end diff --git a/decidim-consultations/spec/system/question_embeds_spec.rb b/decidim-consultations/spec/system/question_embeds_spec.rb index e425b7af46bef..531f22190dbcf 100644 --- a/decidim-consultations/spec/system/question_embeds_spec.rb +++ b/decidim-consultations/spec/system/question_embeds_spec.rb @@ -3,17 +3,8 @@ require "spec_helper" describe "Question embeds", type: :system do - let(:question) { create(:question) } + let(:resource) { create(:question) } + let(:widget_path) { Decidim::EngineRouter.main_proxy(resource).question_question_widget_path } - context "when visiting the embed page for a question" do - before do - switch_to_host(question.organization.host) - visit "#{decidim_consultations.question_path(question)}/embed" - end - - it "renders the page correctly" do - expect(page).to have_i18n_content(question.title) - expect(page).to have_content(question.organization.name) - end - end + it_behaves_like "an embed resource", skip_space_checks: true, skip_link_checks: true end diff --git a/decidim-core/app/controllers/decidim/widgets_controller.rb b/decidim-core/app/controllers/decidim/widgets_controller.rb index b35fda6c9475b..30d11e0ca37f9 100644 --- a/decidim-core/app/controllers/decidim/widgets_controller.rb +++ b/decidim-core/app/controllers/decidim/widgets_controller.rb @@ -11,6 +11,8 @@ class WidgetsController < Decidim::ApplicationController helper_method :model, :iframe_url, :current_participatory_space def show + raise ActionController::RoutingError, "Not Found" if model.nil? + respond_to do |format| format.js { render "decidim/widgets/show" } format.html @@ -19,6 +21,10 @@ def show private + def current_component + @current_component ||= request.env["decidim.current_component"] + end + def current_participatory_space @current_participatory_space ||= model.component.participatory_space end diff --git a/decidim-core/lib/decidim/core/test/shared_examples/embed_resource_examples.rb b/decidim-core/lib/decidim/core/test/shared_examples/embed_resource_examples.rb index 7339bae1dbf61..2ff5b774df9aa 100644 --- a/decidim-core/lib/decidim/core/test/shared_examples/embed_resource_examples.rb +++ b/decidim-core/lib/decidim/core/test/shared_examples/embed_resource_examples.rb @@ -1,5 +1,50 @@ # frozen_string_literal: true +require "decidim/admin/test/admin_participatory_space_access_examples" + +shared_examples "rendering the embed page correctly" do + before do + visit widget_path + end + + it "renders" do + if resource.title.is_a?(Hash) + expect(page).to have_i18n_content(resource.title) + else + expect(page).to have_content(resource.title) + end + + expect(page).to have_content(organization.name) + end +end + +shared_examples "rendering the embed link in the resource page" do + before do + visit resource_locator(resource).path + end + + it "has the embed link" do + expect(page).to have_button("Embed") + end +end + +shared_examples "showing the unauthorized message in the widget_path" do + it do + visit widget_path + expect(page).to have_content "You are not authorized to perform this action" + end +end + +shared_examples "not rendering the embed link in the resource page" do + before do + visit resource_locator(resource).path + end + + it "does not have the embed link" do + expect(page).to have_no_button("Embed") + end +end + shared_examples_for "an embed resource" do |options| if options.is_a?(Hash) && options[:skip_space_checks] let(:organization) { resource.organization } @@ -11,22 +56,29 @@ include_context "with a component" end - context "when visiting the embed page for a resource" do - before do - visit resource_locator(resource).path - visit "#{current_path}/embed" - end + unless options.is_a?(Hash) && options[:skip_publication_checks] + context "when the resource is not published" do + before do + resource.unpublish! + end + + it_behaves_like "not rendering the embed link in the resource page" - it "renders the page correctly" do - if resource.title.is_a?(Hash) - expect(page).to have_i18n_content(resource.title) - else - expect(page).to have_content(resource.title) + it_behaves_like "a 404 page" do + let(:target_path) { widget_path } end + end + end + + it_behaves_like "rendering the embed link in the resource page" unless options.is_a?(Hash) && options[:skip_link_checks] - expect(page).to have_content(organization.name) + context "when visiting the embed page for a resource" do + before do + visit widget_path end + it_behaves_like "rendering the embed page correctly" + unless options.is_a?(Hash) && options[:skip_space_checks] context "when the participatory_space is a process" do it "shows the process name" do @@ -47,3 +99,127 @@ end end end + +shared_examples_for "a private embed resource" do + let(:organization) { resource.organization } + let!(:other_user) { create(:user, :confirmed, organization: organization) } + let!(:participatory_space_private_user) { create(:participatory_space_private_user, user: other_user, privatable_to: resource) } + + before do + switch_to_host(organization.host) + end + + context "when the resource is private" do + before do + resource.update!(private_space: true) + resource.update!(is_transparent: false) if resource.respond_to?(:is_transparent) + end + + context "and user is a visitor" do + let(:user) { nil } + + it_behaves_like "not rendering the embed link in the resource page" + + it_behaves_like "a 404 page" do + let(:target_path) { widget_path } + end + end + + context "and user is a registered user" do + let(:user) { create(:user, :confirmed, organization: organization) } + + before do + sign_in user, scope: :user + end + + it_behaves_like "not rendering the embed link in the resource page" + + it_behaves_like "a 404 page" do + let(:target_path) { widget_path } + end + end + + context "and user is a private user" do + let(:user) { other_user } + + before do + sign_in user, scope: :user + end + + it_behaves_like "a 404 page" do + let(:target_path) { widget_path } + end + end + end +end + +shared_examples_for "a transparent private embed resource" do + let(:organization) { resource.organization } + let!(:other_user) { create(:user, :confirmed, organization: organization) } + let!(:participatory_space_private_user) { create(:participatory_space_private_user, user: other_user, privatable_to: resource) } + + before do + switch_to_host(organization.host) + end + + context "when the resource is private" do + before do + resource.update!(private_space: true) + resource.update!(is_transparent: true) if resource.respond_to?(:is_transparent) + end + + context "and user is a visitor" do + let(:user) { nil } + + it_behaves_like "rendering the embed page correctly" + end + + context "and user is a registered user" do + let(:user) { create(:user, :confirmed, organization: organization) } + + before do + sign_in user, scope: :user + end + + it_behaves_like "rendering the embed page correctly" + end + + context "and user is a private user" do + let(:user) { other_user } + + before do + sign_in user, scope: :user + end + + it_behaves_like "rendering the embed page correctly" + end + end +end + +shared_examples_for "a moderated embed resource" do + include_context "with a component" + + context "when the resource is moderated" do + let!(:moderation) { create(:moderation, reportable: resource, hidden_at: 2.days.ago) } + + it_behaves_like "a 404 page" do + let(:target_path) { widget_path } + end + end +end + +shared_examples_for "a withdrawn embed resource" do + include_context "with a component" + + context "when the resource is withdrawn" do + before do + resource.update!(state: "withdrawn") + end + + it_behaves_like "not rendering the embed link in the resource page" + + it_behaves_like "a 404 page" do + let(:target_path) { widget_path } + end + end +end diff --git a/decidim-debates/app/controllers/decidim/debates/widgets_controller.rb b/decidim-debates/app/controllers/decidim/debates/widgets_controller.rb index f74d5facb9556..3ea5d1a82d15f 100644 --- a/decidim-debates/app/controllers/decidim/debates/widgets_controller.rb +++ b/decidim-debates/app/controllers/decidim/debates/widgets_controller.rb @@ -5,15 +5,25 @@ module Debates class WidgetsController < Decidim::WidgetsController helper Debates::ApplicationHelper + def show + enforce_permission_to :embed, :debate, debate: model if model + + super + end + private def model - @model ||= Debate.where(component: params[:component_id]).find(params[:debate_id]) + @model ||= Debate.not_hidden.where(component: current_component).find(params[:debate_id]) end def iframe_url @iframe_url ||= debate_widget_url(model) end + + def permission_class_chain + [Decidim::Debates::Permissions] + end end end end diff --git a/decidim-debates/app/permissions/decidim/debates/permissions.rb b/decidim-debates/app/permissions/decidim/debates/permissions.rb index a18b32d710036..49adf0025b90d 100644 --- a/decidim-debates/app/permissions/decidim/debates/permissions.rb +++ b/decidim-debates/app/permissions/decidim/debates/permissions.rb @@ -21,6 +21,8 @@ def permissions can_endorse_debate? when :close can_close_debate? + when :embed + can_embed_debate? end permission_action @@ -45,6 +47,10 @@ def can_close_debate? disallow! end + def can_embed_debate? + allow! + end + def can_endorse_debate? return disallow! if debate.closed? diff --git a/decidim-debates/spec/permissions/decidim/debates/permissions_spec.rb b/decidim-debates/spec/permissions/decidim/debates/permissions_spec.rb index 9f75483ff20f3..99a19eb7e313e 100644 --- a/decidim-debates/spec/permissions/decidim/debates/permissions_spec.rb +++ b/decidim-debates/spec/permissions/decidim/debates/permissions_spec.rb @@ -106,4 +106,18 @@ it { is_expected.to be false } end end + + context "when embedding a debate" do + let(:action) do + { scope: :public, action: :embed, subject: :debate } + end + + it { is_expected.to be true } + + context "when the debate is closed" do + let(:debate) { create :debate, :closed, component: debates_component } + + it { is_expected.to be true } + end + end end diff --git a/decidim-debates/spec/system/debate_embeds_spec.rb b/decidim-debates/spec/system/debate_embeds_spec.rb index 399bddeacaccf..d524ede8d3169 100644 --- a/decidim-debates/spec/system/debate_embeds_spec.rb +++ b/decidim-debates/spec/system/debate_embeds_spec.rb @@ -4,8 +4,11 @@ describe "Debate embeds", type: :system do include_context "with a component" + let(:manifest_name) { "debates" } let!(:resource) { create(:debate, component: component, skip_injection: true) } + let(:widget_path) { Decidim::EngineRouter.main_proxy(component).debate_widget_path(resource) } - it_behaves_like "an embed resource" + it_behaves_like "an embed resource", skip_publication_checks: true + it_behaves_like "a moderated embed resource" end diff --git a/decidim-initiatives/app/controllers/decidim/initiatives/widgets_controller.rb b/decidim-initiatives/app/controllers/decidim/initiatives/widgets_controller.rb index b2d7e902acb0e..72a02ddc0ea2a 100644 --- a/decidim-initiatives/app/controllers/decidim/initiatives/widgets_controller.rb +++ b/decidim-initiatives/app/controllers/decidim/initiatives/widgets_controller.rb @@ -12,10 +12,20 @@ class WidgetsController < Decidim::WidgetsController include NeedsInitiative + def show + enforce_permission_to :embed, :participatory_space, current_participatory_space: model if model + + super + end + private def model - @model ||= current_initiative + @model ||= if current_initiative.created? || current_initiative.validating? || current_initiative.discarded? + nil + else + current_initiative + end end def current_participatory_space @@ -25,6 +35,10 @@ def current_participatory_space def iframe_url @iframe_url ||= initiative_widget_url(model) end + + def permission_class_chain + ::Decidim.permissions_registry.chain_for(::Decidim::Initiatives::ApplicationController) + end end end end diff --git a/decidim-initiatives/app/permissions/decidim/initiatives/permissions.rb b/decidim-initiatives/app/permissions/decidim/initiatives/permissions.rb index 429c31d06ce69..ccca0058770d0 100644 --- a/decidim-initiatives/app/permissions/decidim/initiatives/permissions.rb +++ b/decidim-initiatives/app/permissions/decidim/initiatives/permissions.rb @@ -11,6 +11,7 @@ def permissions # Non-logged users permissions list_public_initiatives? read_public_initiative? + embed_public_initiative? search_initiative_types_and_scopes? request_membership? @@ -57,6 +58,15 @@ def read_public_initiative? disallow! end + def embed_public_initiative? + return unless [:initiative, :participatory_space].include?(permission_action.subject) && + permission_action.action == :embed + + return disallow! if initiative.created? || initiative.validating? || initiative.discarded? + + allow! + end + def search_initiative_types_and_scopes? return unless permission_action.action == :search return unless [:initiative_type, :initiative_type_scope, :initiative_type_signature_types].include?(permission_action.subject) diff --git a/decidim-initiatives/app/views/decidim/initiatives/initiatives/show.html.erb b/decidim-initiatives/app/views/decidim/initiatives/initiatives/show.html.erb index c39f247d3d1d7..ebb5a421f3c66 100644 --- a/decidim-initiatives/app/views/decidim/initiatives/initiatives/show.html.erb +++ b/decidim-initiatives/app/views/decidim/initiatives/initiatives/show.html.erb @@ -65,7 +65,9 @@ edit_link(
<% end %> <%= render partial: "decidim/shared/share_modal" %> - <%= embed_modal_for initiative_widget_url(current_initiative, format: :js) %> + <% if allowed_to? :embed, :initiative, initiative: current_initiative %> + <%= embed_modal_for initiative_widget_url(current_initiative, format: :js) %> + <% end %> <%= resource_reference(current_initiative) %> <%= resource_version(current_initiative, versions_path: initiative_versions_path(current_initiative)) %>
diff --git a/decidim-initiatives/spec/permissions/decidim/initiatives/permissions_spec.rb b/decidim-initiatives/spec/permissions/decidim/initiatives/permissions_spec.rb index a7200a62559d5..deb44daf7fbd1 100644 --- a/decidim-initiatives/spec/permissions/decidim/initiatives/permissions_spec.rb +++ b/decidim-initiatives/spec/permissions/decidim/initiatives/permissions_spec.rb @@ -149,6 +149,76 @@ end end + context "when emeding an initiative" do + let(:initiative) { create(:initiative, :accepted, organization: organization) } + let(:action) do + { scope: :public, action: :embed, subject: :initiative } + end + let(:context) do + { initiative: initiative } + end + + context "when initiative is created" do + let(:initiative) { create(:initiative, :created, organization: organization) } + + it { is_expected.to be false } + end + + context "when initiative is validating" do + let(:initiative) { create(:initiative, :validating, organization: organization) } + + it { is_expected.to be false } + end + + context "when initiative is discarded" do + let(:initiative) { create(:initiative, :discarded, organization: organization) } + + it { is_expected.to be false } + end + + context "when initiative is published" do + let(:initiative) { create(:initiative, :published, organization: organization) } + + it { is_expected.to be true } + end + + context "when initiative is rejected" do + let(:initiative) { create(:initiative, :rejected, organization: organization) } + + it { is_expected.to be true } + end + + context "when initiative is accepted" do + let(:initiative) { create(:initiative, :accepted, organization: organization) } + + it { is_expected.to be true } + end + + context "when user is admin" do + let(:user) { create(:user, :admin, organization: organization) } + + it { is_expected.to be true } + end + + context "when user is author of the initiative" do + let(:initiative) { create(:initiative, author: user, organization: organization) } + + it { is_expected.to be true } + end + + context "when user is committee member of the initiative" do + before do + create(:initiatives_committee_member, initiative: initiative, user: user) + end + + it { is_expected.to be true } + end + + context "when any other condition" do + it { is_expected.to be true } + end + end + context "when listing committee members of the initiative as author" do let(:initiative) { create(:initiative, organization: organization, author: user) } let(:action) do diff --git a/decidim-initiatives/spec/system/initiative_embeds_spec.rb b/decidim-initiatives/spec/system/initiative_embeds_spec.rb index 9831afa8e43d9..b788506d3d67b 100644 --- a/decidim-initiatives/spec/system/initiative_embeds_spec.rb +++ b/decidim-initiatives/spec/system/initiative_embeds_spec.rb @@ -3,7 +3,69 @@ require "spec_helper" describe "Initiative embeds", type: :system do - let(:resource) { create(:initiative) } + let(:state) { :published } + let(:resource) { create(:initiative, state: state) } + let(:widget_path) { Decidim::EngineRouter.main_proxy(resource).initiative_widget_path } - it_behaves_like "an embed resource", skip_space_checks: true + it_behaves_like "an embed resource", skip_space_checks: true, skip_publication_checks: true + + context "when the user is the initiative author" do + let(:organization) { resource.organization } + let(:user) { resource.author } + + before do + switch_to_host(organization.host) + end + + context "when the state is created" do + let(:state) { :created } + + it_behaves_like "not rendering the embed link in the resource page" + + it_behaves_like "a 404 page" do + let(:target_path) { widget_path } + end + end + + context "when the state is validating" do + let(:state) { :validating } + + it_behaves_like "not rendering the embed link in the resource page" + + it_behaves_like "a 404 page" do + let(:target_path) { widget_path } + end + end + + context "when the state is discarded" do + let(:state) { :discarded } + + # A discarded initiative is not available anymore to authors + + it_behaves_like "a 404 page" do + let(:target_path) { widget_path } + end + end + + context "when the state is published" do + let(:state) { :published } + + it_behaves_like "rendering the embed link in the resource page" + it_behaves_like "rendering the embed page correctly" + end + + context "when the state is rejected" do + let(:state) { :rejected } + + it_behaves_like "rendering the embed link in the resource page" + it_behaves_like "rendering the embed page correctly" + end + + context "when the state is accepted" do + let(:state) { :accepted } + + it_behaves_like "rendering the embed link in the resource page" + it_behaves_like "rendering the embed page correctly" + end + end end diff --git a/decidim-meetings/app/controllers/decidim/meetings/widgets_controller.rb b/decidim-meetings/app/controllers/decidim/meetings/widgets_controller.rb index 9586abd47f07a..6eaa6bbbb52c1 100644 --- a/decidim-meetings/app/controllers/decidim/meetings/widgets_controller.rb +++ b/decidim-meetings/app/controllers/decidim/meetings/widgets_controller.rb @@ -6,15 +6,25 @@ class WidgetsController < Decidim::WidgetsController helper MeetingsHelper helper Decidim::SanitizeHelper + def show + enforce_permission_to :embed, :meeting, meeting: model if model + + super + end + private def model - @model ||= Meeting.where(component: params[:component_id]).find(params[:meeting_id]) + @model ||= Meeting.except_withdrawn.published.not_hidden.where(component: current_component).find(params[:meeting_id]) end def iframe_url @iframe_url ||= meeting_widget_url(model) end + + def permission_class_chain + [Decidim::Meetings::Permissions] + end end end end diff --git a/decidim-meetings/app/permissions/decidim/meetings/permissions.rb b/decidim-meetings/app/permissions/decidim/meetings/permissions.rb index f769110ede29f..7263fad5c5e35 100644 --- a/decidim-meetings/app/permissions/decidim/meetings/permissions.rb +++ b/decidim-meetings/app/permissions/decidim/meetings/permissions.rb @@ -4,6 +4,7 @@ module Decidim module Meetings class Permissions < Decidim::DefaultPermissions def permissions + allow_embed_meeting? return permission_action unless user # Delegate the admin permission checks to the admin permissions class @@ -57,6 +58,15 @@ def question @question ||= context.fetch(:question, nil) end + # As this is a public action, we need to run this before other checks + def allow_embed_meeting? + return unless permission_action.action == :embed && permission_action.subject == :meeting && meeting + return disallow! if meeting.withdrawn? + return allow! if meeting.published? + + disallow! + end + def can_join_meeting? meeting.can_be_joined_by?(user) && authorized?(:join, resource: meeting) diff --git a/decidim-meetings/app/views/decidim/meetings/meetings/show.html.erb b/decidim-meetings/app/views/decidim/meetings/meetings/show.html.erb index 3c2243d5fc5f3..ecf5f9e3e83f5 100644 --- a/decidim-meetings/app/views/decidim/meetings/meetings/show.html.erb +++ b/decidim-meetings/app/views/decidim/meetings/meetings/show.html.erb @@ -105,7 +105,9 @@ edit_link( <%= resource_version(meeting, versions_path: meeting_versions_path(meeting)) %> <%= cell "decidim/meetings/cancel_registration_meeting_button", meeting %> <%= render partial: "decidim/shared/share_modal" %> - <%= embed_modal_for meeting_widget_url(meeting, format: :js) %> + <% if allowed_to? :embed, :meeting, meeting: @meeting %> + <%= embed_modal_for meeting_widget_url(meeting, format: :js) %> + <% end %> <%= render partial: "calendar_modal", locals: { ics_url: calendar_meeting_url(meeting), google_url: google_calendar_event_url(meeting) } %>
diff --git a/decidim-meetings/spec/permissions/decidim/meetings/permissions_spec.rb b/decidim-meetings/spec/permissions/decidim/meetings/permissions_spec.rb index caa322d594a5a..274e78365c60b 100644 --- a/decidim-meetings/spec/permissions/decidim/meetings/permissions_spec.rb +++ b/decidim-meetings/spec/permissions/decidim/meetings/permissions_spec.rb @@ -82,6 +82,28 @@ end end + context "when embedding a meeting" do + let(:action) do + { scope: :public, action: :embed, subject: :meeting } + end + + context "when meeting isn't published" do + before do + allow(meeting).to receive(:published?).and_return(false) + end + + it { is_expected.to be false } + end + + context "when meeting is published" do + before do + allow(meeting).to receive(:published?).and_return(true) + end + + it { is_expected.to be true } + end + end + context "when joining a meeting" do let(:action) do { scope: :public, action: :join, subject: :meeting } diff --git a/decidim-meetings/spec/system/meeting_embeds_spec.rb b/decidim-meetings/spec/system/meeting_embeds_spec.rb index bb5fceeb04073..f38aeb0c94f4b 100644 --- a/decidim-meetings/spec/system/meeting_embeds_spec.rb +++ b/decidim-meetings/spec/system/meeting_embeds_spec.rb @@ -4,9 +4,12 @@ describe "Meeting embeds", type: :system do include_context "with a component" - let(:manifest_name) { "meetings" } + let(:manifest_name) { "meetings" } let!(:resource) { create(:meeting, :published, component: component) } + let(:widget_path) { Decidim::EngineRouter.main_proxy(component).meeting_widget_path(resource) } it_behaves_like "an embed resource" + it_behaves_like "a moderated embed resource" + it_behaves_like "a withdrawn embed resource" end diff --git a/decidim-participatory_processes/app/controllers/decidim/participatory_processes/widgets_controller.rb b/decidim-participatory_processes/app/controllers/decidim/participatory_processes/widgets_controller.rb index 15956edcc7001..7f70cab78595d 100644 --- a/decidim-participatory_processes/app/controllers/decidim/participatory_processes/widgets_controller.rb +++ b/decidim-participatory_processes/app/controllers/decidim/participatory_processes/widgets_controller.rb @@ -5,13 +5,19 @@ module ParticipatoryProcesses class WidgetsController < Decidim::WidgetsController helper Decidim::SanitizeHelper + def show + enforce_permission_to :embed, :participatory_space, current_participatory_space: model + + super + end + private def model return unless params[:participatory_process_slug] - @model ||= ParticipatoryProcess.where(slug: params[:participatory_process_slug]).or( - ParticipatoryProcess.where(id: params[:participatory_process_slug]) + @model ||= ParticipatoryProcess.where(organization: current_organization).public_spaces.where(slug: params[:participatory_process_slug]).or( + ParticipatoryProcess.where(organization: current_organization).public_spaces.where(id: params[:participatory_process_slug]) ).first! end @@ -22,6 +28,10 @@ def current_participatory_space def iframe_url @iframe_url ||= participatory_process_widget_url(model) end + + def permission_class_chain + ::Decidim.permissions_registry.chain_for(::Decidim::ParticipatoryProcesses::ApplicationController) + end end end end diff --git a/decidim-participatory_processes/app/permissions/decidim/participatory_processes/permissions.rb b/decidim-participatory_processes/app/permissions/decidim/participatory_processes/permissions.rb index ae326db5352f7..32f735d0643d4 100644 --- a/decidim-participatory_processes/app/permissions/decidim/participatory_processes/permissions.rb +++ b/decidim-participatory_processes/app/permissions/decidim/participatory_processes/permissions.rb @@ -19,6 +19,7 @@ def permissions public_list_process_groups_action? public_read_process_group_action? public_read_process_action? + public_embed_process_action? return permission_action end @@ -112,6 +113,17 @@ def public_read_process_action? toggle_allow(can_manage_process?) end + def public_embed_process_action? + return unless permission_action.action == :embed && + [:process, :participatory_space].include?(permission_action.subject) && + process + + return disallow! unless process.published? + return disallow! if process.private_space + + allow! + end + def can_view_private_space? return true unless process.private_space return false unless user diff --git a/decidim-participatory_processes/spec/permissions/decidim/participatory_processes/permissions_spec.rb b/decidim-participatory_processes/spec/permissions/decidim/participatory_processes/permissions_spec.rb index 8042869ecb06e..e21ba96130b0d 100644 --- a/decidim-participatory_processes/spec/permissions/decidim/participatory_processes/permissions_spec.rb +++ b/decidim-participatory_processes/spec/permissions/decidim/participatory_processes/permissions_spec.rb @@ -135,6 +135,36 @@ end end + context "when embedding an process" do + let(:action) do + { scope: :public, action: :embed, subject: :process } + end + let(:context) { { process: process } } + + context "when the process is published" do + let(:user) { create(:user, organization: organization) } + + it { is_expected.to be true } + end + + context "when the process is not published" do + let(:user) { create(:user, organization: organization) } + let(:process) { create(:participatory_process, :unpublished, organization: organization) } + + context "when the user doesn't have access to it" do + it { is_expected.to be false } + end + + context "when the user has access to it" do + before do + create(:participatory_process_user_role, user: user, participatory_process: process) + end + + it { is_expected.to be false } + end + end + end + context "when listing processes" do let(:action) do { scope: :public, action: :list, subject: :process } diff --git a/decidim-participatory_processes/spec/system/process_embeds_spec.rb b/decidim-participatory_processes/spec/system/process_embeds_spec.rb index 4530d00e4d70e..ad8c512100dcc 100644 --- a/decidim-participatory_processes/spec/system/process_embeds_spec.rb +++ b/decidim-participatory_processes/spec/system/process_embeds_spec.rb @@ -4,6 +4,8 @@ describe "Process embeds", type: :system do let(:resource) { create(:participatory_process) } + let(:widget_path) { Decidim::EngineRouter.main_proxy(resource).participatory_process_widget_path } it_behaves_like "an embed resource", skip_space_checks: true + it_behaves_like "a private embed resource" end diff --git a/decidim-proposals/app/controllers/decidim/proposals/widgets_controller.rb b/decidim-proposals/app/controllers/decidim/proposals/widgets_controller.rb index 4f0e24b00ba2b..a399d7cff0af7 100644 --- a/decidim-proposals/app/controllers/decidim/proposals/widgets_controller.rb +++ b/decidim-proposals/app/controllers/decidim/proposals/widgets_controller.rb @@ -5,15 +5,25 @@ module Proposals class WidgetsController < Decidim::WidgetsController helper Proposals::ApplicationHelper + def show + enforce_permission_to :embed, :proposal, proposal: model if model + + super + end + private def model - @model ||= Proposal.where(component: params[:component_id]).find(params[:proposal_id]) + @model ||= Proposal.not_hidden.except_withdrawn.where(component: current_component).find(params[:proposal_id]) end def iframe_url @iframe_url ||= proposal_widget_url(model) end + + def permission_class_chain + [Decidim::Proposals::Permissions] + end end end end diff --git a/decidim-proposals/app/permissions/decidim/proposals/permissions.rb b/decidim-proposals/app/permissions/decidim/proposals/permissions.rb index ea40f2d30bbc7..4f37a684dd41c 100644 --- a/decidim-proposals/app/permissions/decidim/proposals/permissions.rb +++ b/decidim-proposals/app/permissions/decidim/proposals/permissions.rb @@ -4,6 +4,7 @@ module Decidim module Proposals class Permissions < Decidim::DefaultPermissions def permissions + allow_embed_proposal? return permission_action unless user # Delegate the admin permission checks to the admin permissions class @@ -47,6 +48,14 @@ def proposal @proposal ||= context.fetch(:proposal, nil) || context.fetch(:resource, nil) end + # As this is a public action, we need to run this before other checks + def allow_embed_proposal? + return unless permission_action.action == :embed && permission_action.subject == :proposal && proposal + return disallow! if proposal.withdrawn? + + allow! + end + def voting_enabled? return unless current_settings diff --git a/decidim-proposals/app/views/decidim/proposals/proposals/show.html.erb b/decidim-proposals/app/views/decidim/proposals/proposals/show.html.erb index ce66bfcb2a948..46bca7ad45cae 100644 --- a/decidim-proposals/app/views/decidim/proposals/proposals/show.html.erb +++ b/decidim-proposals/app/views/decidim/proposals/proposals/show.html.erb @@ -129,7 +129,9 @@ extra_admin_link( <%= resource_version(proposal_presenter, versions_path: proposal_versions_path(@proposal)) %> <%= cell("decidim/fingerprint", @proposal) %> <%= render partial: "decidim/shared/share_modal", locals: { resource: @proposal } %> - <%= embed_modal_for proposal_widget_url(@proposal, format: :js) %> + <% if allowed_to? :embed, :proposal, proposal: @proposal %> + <%= embed_modal_for proposal_widget_url(@proposal, format: :js) %> + <% end %> <%= cell "decidim/proposals/proposal_link_to_collaborative_draft", @proposal %> <%= cell "decidim/proposals/proposal_link_to_rejected_emendation", @proposal %>
diff --git a/decidim-proposals/spec/permissions/decidim/proposals/permissions_spec.rb b/decidim-proposals/spec/permissions/decidim/proposals/permissions_spec.rb index 9ac3ebe5ce961..28da33fc24623 100644 --- a/decidim-proposals/spec/permissions/decidim/proposals/permissions_spec.rb +++ b/decidim-proposals/spec/permissions/decidim/proposals/permissions_spec.rb @@ -110,6 +110,14 @@ end end + context "when emebeding a proposal" do + let(:action) do + { scope: :public, action: :embed, subject: :proposal } + end + + it { is_expected.to be true } + end + describe "voting" do let(:action) do { scope: :public, action: :vote, subject: :proposal } diff --git a/decidim-proposals/spec/system/proposal_embeds_spec.rb b/decidim-proposals/spec/system/proposal_embeds_spec.rb index 74e4d024155c6..6d83a96fdfb4f 100644 --- a/decidim-proposals/spec/system/proposal_embeds_spec.rb +++ b/decidim-proposals/spec/system/proposal_embeds_spec.rb @@ -4,8 +4,12 @@ describe "Proposal embeds", type: :system do include_context "with a component" + let(:manifest_name) { "proposals" } let(:resource) { create(:proposal, component: component) } + let(:widget_path) { Decidim::EngineRouter.main_proxy(component).proposal_widget_path(resource) } - it_behaves_like "an embed resource" + it_behaves_like "an embed resource", skip_publication_checks: true + it_behaves_like "a moderated embed resource" + it_behaves_like "a withdrawn embed resource" end diff --git a/decidim-sortitions/app/controllers/decidim/sortitions/widgets_controller.rb b/decidim-sortitions/app/controllers/decidim/sortitions/widgets_controller.rb index dc68bc319ec52..380509c460baf 100644 --- a/decidim-sortitions/app/controllers/decidim/sortitions/widgets_controller.rb +++ b/decidim-sortitions/app/controllers/decidim/sortitions/widgets_controller.rb @@ -6,15 +6,25 @@ class WidgetsController < Decidim::WidgetsController helper Decidim::SanitizeHelper helper Sortitions::SortitionsHelper + def show + enforce_permission_to :embed, :sortition, sortition: model if model + + super + end + private def model - @model ||= Sortition.where(component: params[:component_id]).find(params[:sortition_id]) + @model ||= Sortition.where(component: current_component).find(params[:sortition_id]) end def iframe_url @iframe_url ||= sortition_widget_url(model) end + + def permission_class_chain + [Decidim::Sortitions::Permissions] + end end end end diff --git a/decidim-sortitions/app/permissions/decidim/sortitions/permissions.rb b/decidim-sortitions/app/permissions/decidim/sortitions/permissions.rb index 06868f0ef0e6c..12587ffe1dc61 100644 --- a/decidim-sortitions/app/permissions/decidim/sortitions/permissions.rb +++ b/decidim-sortitions/app/permissions/decidim/sortitions/permissions.rb @@ -4,12 +4,26 @@ module Decidim module Sortitions class Permissions < Decidim::DefaultPermissions def permissions + allow_embed_sortition? return permission_action unless user return Decidim::Sortitions::Admin::Permissions.new(user, permission_action, context).permissions if permission_action.scope == :admin permission_action end + + private + + def sortition + @sortition ||= context.fetch(:sortition, nil) || context.fetch(:resource, nil) + end + + # As this is a public action, we need to run this before other checks + def allow_embed_sortition? + return unless permission_action.action == :embed && permission_action.subject == :sortition && sortition + + allow! + end end end end diff --git a/decidim-sortitions/spec/permissions/decidim/sortitions/permissions_spec.rb b/decidim-sortitions/spec/permissions/decidim/sortitions/permissions_spec.rb index 364d68d980ea1..8ae9e6c23e26c 100644 --- a/decidim-sortitions/spec/permissions/decidim/sortitions/permissions_spec.rb +++ b/decidim-sortitions/spec/permissions/decidim/sortitions/permissions_spec.rb @@ -25,6 +25,14 @@ it_behaves_like "delegates permissions to", Decidim::Sortitions::Admin::Permissions end + context "when emebedding a sortition" do + let(:action) do + { scope: :public, action: :embed, subject: :sortition } + end + + it { is_expected.to be true } + end + context "when any other condition" do let(:action) do { scope: :foo, action: :blah, subject: :sortition } diff --git a/decidim-sortitions/spec/system/decidim/sortitions/sortition_embeds_spec.rb b/decidim-sortitions/spec/system/decidim/sortitions/sortition_embeds_spec.rb index 965b1c11d4024..76e92b95af809 100644 --- a/decidim-sortitions/spec/system/decidim/sortitions/sortition_embeds_spec.rb +++ b/decidim-sortitions/spec/system/decidim/sortitions/sortition_embeds_spec.rb @@ -4,8 +4,10 @@ describe "Sortition embeds", type: :system do include_context "with a component" + let(:manifest_name) { "sortitions" } let(:resource) { create(:sortition, component: component) } + let(:widget_path) { Decidim::EngineRouter.main_proxy(component).sortition_widget_path(resource) } - it_behaves_like "an embed resource" + it_behaves_like "an embed resource", skip_publication_checks: true end From 185ede9ecffe0612a7968e3170d72e4be2f6fda3 Mon Sep 17 00:00:00 2001 From: Alexandru Emil Lupu Date: Wed, 3 Apr 2024 13:59:14 +0300 Subject: [PATCH 09/88] Backport 'Restrict comments replies tree including polymorphism' to v0.27 (#12305) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Restrict comments replies tree including polymorphism * Add tests to check the 'Hide replies' message error * Add a polymorphic option to restrict acts_as_tree lookup * Avoid name conflict in test * Add reference to source of code * Move comment Co-authored-by: Andrés Pereira de Lucena --------- Co-authored-by: Andrés Pereira de Lucena * Running linters * Fix failing specs --------- Co-authored-by: Eduardo Martínez Co-authored-by: Andrés Pereira de Lucena --- .../app/models/decidim/comments/comment.rb | 1 + decidim-core/lib/decidim/acts_as_tree.rb | 15 ++++++++- .../test/shared_examples/comments_examples.rb | 32 +++++++++++++++++++ 3 files changed, 47 insertions(+), 1 deletion(-) diff --git a/decidim-comments/app/models/decidim/comments/comment.rb b/decidim-comments/app/models/decidim/comments/comment.rb index b3fcf0822ebf0..2285ced3124f4 100644 --- a/decidim-comments/app/models/decidim/comments/comment.rb +++ b/decidim-comments/app/models/decidim/comments/comment.rb @@ -29,6 +29,7 @@ class Comment < ApplicationRecord translatable_fields :body parent_item_foreign_key :decidim_commentable_id + parent_item_polymorphic_type_key :decidim_commentable_type belongs_to :commentable, foreign_key: "decidim_commentable_id", foreign_type: "decidim_commentable_type", polymorphic: true belongs_to :root_commentable, foreign_key: "decidim_root_commentable_id", foreign_type: "decidim_root_commentable_type", polymorphic: true, touch: true diff --git a/decidim-core/lib/decidim/acts_as_tree.rb b/decidim-core/lib/decidim/acts_as_tree.rb index 30eecf9d5a682..bb59114f0e3c7 100644 --- a/decidim-core/lib/decidim/acts_as_tree.rb +++ b/decidim-core/lib/decidim/acts_as_tree.rb @@ -1,6 +1,7 @@ # frozen_string_literal: true module Decidim + # Adapted from https://hashrocket.com/blog/posts/recursive-sql-in-activerecord module ActsAsTree extend ActiveSupport::Concern @@ -15,10 +16,22 @@ def parent_item_foreign_key(name = nil) @parent_item_foreign_key = name end + def parent_item_polymorphic_type_key(name = nil) + return @parent_item_polymorphic_type_key unless name + + @parent_item_polymorphic_type_key = name + end + def tree_for(item) where(Arel.sql("#{table_name}.id IN (#{tree_sql_for(item)})")).order("#{table_name}.id") end + def polymorphic_condition(item) + return "" if parent_item_polymorphic_type_key.blank? + + "AND #{table_name}.#{parent_item_polymorphic_type_key} = '#{item.class.name}'" + end + def tree_sql_for(item) <<-SQL.squish WITH RECURSIVE search_tree(id, path) AS ( @@ -28,7 +41,7 @@ def tree_sql_for(item) UNION ALL SELECT #{table_name}.id, path || #{table_name}.id FROM search_tree - JOIN #{table_name} ON #{table_name}.#{parent_item_foreign_key} = search_tree.id + JOIN #{table_name} ON #{table_name}.#{parent_item_foreign_key} = search_tree.id #{polymorphic_condition(item)} WHERE NOT #{table_name}.id = ANY(path) ) SELECT id FROM search_tree ORDER BY path diff --git a/decidim-core/lib/decidim/core/test/shared_examples/comments_examples.rb b/decidim-core/lib/decidim/core/test/shared_examples/comments_examples.rb index 79cf17e586bc7..3d670fea829bf 100644 --- a/decidim-core/lib/decidim/core/test/shared_examples/comments_examples.rb +++ b/decidim-core/lib/decidim/core/test/shared_examples/comments_examples.rb @@ -48,6 +48,38 @@ expect(page).to have_css(".comments > div:nth-child(2)", text: "Most Rated Comment") end + context "when there are comments and replies" do + let!(:single_comment) { create(:comment, commentable: commentable) } + let!(:reply) { create(:comment, commentable: single_comment, root_commentable: commentable) } + + it "displays the show replies link on comment with reply" do + visit resource_path + expect(page).not_to have_content("Comments are disabled at this time") + expect(page).to have_css(".comment", minimum: 1) + + within "#comment_#{single_comment.id}" do + expect(page).to have_content "Hide replies" + end + end + + context "when there is a comment with the same parent id but different type with replies" do + let!(:other_component) { create(:component, manifest_name: :dummy, organization: organization) } + let!(:other_commentable) { create(:dummy_resource, component: other_component, author: user, id: single_comment.id) } + let!(:reply) { create(:comment, commentable: other_commentable, root_commentable: other_commentable) } + let!(:other_reply) { create(:comment, commentable: reply, root_commentable: other_commentable) } + + it "displays the show replies link on comment with reply" do + visit resource_path + expect(page).not_to have_content("Comments are disabled at this time") + expect(page).to have_css(".comment", minimum: 1) + + within "#comment_#{single_comment.id}" do + expect(page).not_to have_content "Hide replies" + end + end + end + end + context "when there are deleted comments" do let(:deleted_comment) { comments[0] } From e1e6aa682c29a71e4f5f8361e7b57345100da6d7 Mon Sep 17 00:00:00 2001 From: Alexandru Emil Lupu Date: Fri, 5 Apr 2024 16:09:14 +0300 Subject: [PATCH 10/88] Backport 'Patch participatory spaces factories' to v0.27 (#12647) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Patch participatory spaces factories * Patch ParticipatoryProcess factories * Use correct factories * Fix decidim participatory process output * Fix more specs * Fix more specs * Last spec? * Apply suggestions from code review Co-authored-by: Andrés Pereira de Lucena --------- Co-authored-by: Andrés Pereira de Lucena * Fix specs * Fix specs * Fix more specs * Fix more specs * Fix specs * Fix spec * Fix more specs * Fix specs * Apply suggestions from code review Co-authored-by: Andrés Pereira de Lucena --------- Co-authored-by: Andrés Pereira de Lucena --- .../decidim/admin/newsletters_helper.rb | 2 +- .../decidim/attachment_created_event_spec.rb | 4 +- .../decidim/component_published_event_spec.rb | 3 +- .../decidim/blogs/create_post_event_spec.rb | 2 +- decidim-core/app/cells/decidim/card_m/top.erb | 2 +- .../app/helpers/decidim/resource_helper.rb | 2 +- .../has_space_in_mcell_examples.rb | 3 +- .../core/test/shared_examples/simple_event.rb | 19 ++-- .../lib/decidim/events/simple_event.rb | 2 +- .../spec/mailers/reported_mailer_spec.rb | 2 +- .../decidim/log/space_presenter_spec.rb | 2 +- .../push_notification_presenter_spec.rb | 2 +- .../debates/create_debate_event_spec.rb | 15 ++-- .../debates/creation_disabled_event_spec.rb | 2 +- .../debates/creation_enabled_event_spec.rb | 6 +- .../election_published_event_spec.rb | 3 +- .../trustees/notify_new_trustee_event_spec.rb | 9 +- .../cells/decidim/meetings/meeting_s_cell.rb | 2 +- .../meetings/directory/application_helper.rb | 2 +- .../admin_log/invite_presenter_spec.rb | 4 +- .../content_blocks/title/show.erb | 2 +- .../process_group_m_cell.rb | 2 +- .../participatory_processes/test/factories.rb | 89 +++++++++++-------- ...patory_process_role_assigned_event_spec.rb | 10 +-- ...atory_process_step_activated_event_spec.rb | 3 +- ...ipatory_process_step_changed_event_spec.rb | 3 +- .../participatory_process_search_spec.rb | 56 ++++++------ .../participatory_process_groups_spec.rb | 10 +-- .../participatory_process_steps_spec.rb | 2 +- .../proposals/creation_enabled_event_spec.rb | 6 +- .../proposals/endorsing_enabled_event_spec.rb | 6 +- .../proposals/publish_proposal_event_spec.rb | 2 +- .../proposals/voting_enabled_event_spec.rb | 6 +- .../sortitions/create_sortition_event_spec.rb | 2 +- .../surveys/closed_survey_event_spec.rb | 2 +- .../surveys/opened_survey_event_spec.rb | 2 +- 36 files changed, 156 insertions(+), 135 deletions(-) diff --git a/decidim-admin/app/helpers/decidim/admin/newsletters_helper.rb b/decidim-admin/app/helpers/decidim/admin/newsletters_helper.rb index 0c78d2150aceb..195da0af2bbd4 100644 --- a/decidim-admin/app/helpers/decidim/admin/newsletters_helper.rb +++ b/decidim-admin/app/helpers/decidim/admin/newsletters_helper.rb @@ -74,7 +74,7 @@ def sent_to_spaces(newsletter) else Decidim.find_participatory_space_manifest(type["manifest_name"].to_sym) .participatory_spaces.call(current_organization).where(id: type["ids"]).each do |space| - html += "#{translated_attribute space.title}" + html += "#{decidim_escape_translated space.title}" end end html += "
" diff --git a/decidim-admin/spec/events/decidim/attachment_created_event_spec.rb b/decidim-admin/spec/events/decidim/attachment_created_event_spec.rb index 31ad7a9b98e73..25a26e8b399eb 100644 --- a/decidim-admin/spec/events/decidim/attachment_created_event_spec.rb +++ b/decidim-admin/spec/events/decidim/attachment_created_event_spec.rb @@ -8,10 +8,10 @@ let(:event_name) { "decidim.events.attachments.attachment_created" } let(:resource) { create(:attachment) } let(:attached_to_url) { resource_locator(attached_to).url } - let(:resource_title) { attached_to.title["en"] } + let(:resource_title) { decidim_escape_translated(attached_to.title) } let(:resource_path) { resource.url } let(:attached_to) { resource.attached_to } - let(:email_subject) { "An update to #{resource_title}" } + let(:email_subject) { "An update to #{decidim_sanitize_translated(attached_to.title)}" } let(:email_intro) { "A new document has been added to #{resource_title}. You can see it from this page:" } let(:email_outro) { "You have received this notification because you are following #{resource_title}. You can stop receiving notifications following the previous link." } let(:notification_title) { "A new document has been added to #{resource_title}" } diff --git a/decidim-admin/spec/events/decidim/component_published_event_spec.rb b/decidim-admin/spec/events/decidim/component_published_event_spec.rb index 2f3ba6aa1ed6d..ae7136c3c6310 100644 --- a/decidim-admin/spec/events/decidim/component_published_event_spec.rb +++ b/decidim-admin/spec/events/decidim/component_published_event_spec.rb @@ -11,8 +11,9 @@ let(:resource) { create(:component) } let(:participatory_space) { resource.participatory_space } let(:resource_path) { main_component_path(resource) } - let(:email_subject) { "An update to #{participatory_space_title}" } + let(:email_subject) { "An update to #{decidim_sanitize_translated(participatory_space.title)}" } let(:resource_title) { decidim_sanitize_translated(resource.name) } + let(:participatory_space_title) { decidim_sanitize_translated(participatory_space.title) } let(:email_intro) { "The #{resource_title} component is now active for #{participatory_space_title}. You can see it from this page:" } let(:email_outro) { "You have received this notification because you are following #{participatory_space_title}. You can stop receiving notifications following the previous link." } let(:notification_title) { "The #{resource_title} component is now active for #{participatory_space_title}" } diff --git a/decidim-blogs/spec/events/decidim/blogs/create_post_event_spec.rb b/decidim-blogs/spec/events/decidim/blogs/create_post_event_spec.rb index a981bd33d6db6..1f95c410ab949 100644 --- a/decidim-blogs/spec/events/decidim/blogs/create_post_event_spec.rb +++ b/decidim-blogs/spec/events/decidim/blogs/create_post_event_spec.rb @@ -8,7 +8,7 @@ let(:email_intro) { "The post \"#{resource_title}\" has been published in \"#{participatory_space_title}\" that you are following." } let(:email_outro) { "You have received this notification because you are following \"#{participatory_space_title}\". You can unfollow it from the previous link." } let(:notification_title) { "The post #{resource_title} has been published in #{participatory_space_title}" } - let(:email_subject) { "New post published in #{participatory_space_title}" } + let(:email_subject) { "New post published in #{decidim_sanitize_translated(participatory_space.title)}" } include_context "when a simple event" it_behaves_like "a simple event" diff --git a/decidim-core/app/cells/decidim/card_m/top.erb b/decidim-core/app/cells/decidim/card_m/top.erb index d3912b9f85d2a..c89cfc195bfcb 100644 --- a/decidim-core/app/cells/decidim/card_m/top.erb +++ b/decidim-core/app/cells/decidim/card_m/top.erb @@ -1,7 +1,7 @@
<% if render_space? %>
- <%= searchable_resource_human_name(model.participatory_space.class, count: 1) %>: <%= link_to translated_attribute(model.participatory_space.title), Decidim::ResourceLocatorPresenter.new(model.participatory_space).path, class: "card__link text-ellipsis" %> + <%= searchable_resource_human_name(model.participatory_space.class, count: 1) %>: <%= link_to decidim_escape_translated(model.participatory_space.title), Decidim::ResourceLocatorPresenter.new(model.participatory_space).path, class: "card__link text-ellipsis" %>
<% end %>
diff --git a/decidim-core/app/helpers/decidim/resource_helper.rb b/decidim-core/app/helpers/decidim/resource_helper.rb index 6c63bdfec259d..a1852c19f9bb7 100644 --- a/decidim-core/app/helpers/decidim/resource_helper.rb +++ b/decidim-core/app/helpers/decidim/resource_helper.rb @@ -75,7 +75,7 @@ def resource_locator(resource) # Returns a descriptive title for the resource def resource_title(resource) title = resource.try(:title) || resource.try(:name) || resource.try(:subject) || "#{resource.model_name.human} ##{resource.id}" - title = translated_attribute(title) if title.is_a?(Hash) + title = decidim_escape_translated(title) if title.is_a?(Hash) title end end diff --git a/decidim-core/lib/decidim/core/test/shared_examples/has_space_in_mcell_examples.rb b/decidim-core/lib/decidim/core/test/shared_examples/has_space_in_mcell_examples.rb index d19b683d7e2a5..654dc60572a89 100644 --- a/decidim-core/lib/decidim/core/test/shared_examples/has_space_in_mcell_examples.rb +++ b/decidim-core/lib/decidim/core/test/shared_examples/has_space_in_mcell_examples.rb @@ -8,8 +8,7 @@ let(:show_space) { true } it "renders the space where the model belongs to" do - expect(cell_html).to have_selector(".card__top .card__content.text-small") - expect(cell_html).to have_content(translated(model.component.participatory_space.title, locale: :en)) + expect(cell_html).to have_content(translated(model.component.participatory_space.title)) end end end diff --git a/decidim-core/lib/decidim/core/test/shared_examples/simple_event.rb b/decidim-core/lib/decidim/core/test/shared_examples/simple_event.rb index 227c644fb2c55..cbadfb247c70a 100644 --- a/decidim-core/lib/decidim/core/test/shared_examples/simple_event.rb +++ b/decidim-core/lib/decidim/core/test/shared_examples/simple_event.rb @@ -31,7 +31,7 @@ let(:resource_title) { resource.title["en"] } # to be used when resource is a component resource, not a participatory space, in which case should be overriden let(:participatory_space) { resource.participatory_space } - let(:participatory_space_title) { participatory_space.title["en"] } + let(:participatory_space_title) { decidim_escape_translated(decidim_sanitize_translated(participatory_space.title)) } let(:participatory_space_path) { Decidim::ResourceLocatorPresenter.new(participatory_space).path } let(:participatory_space_url) { Decidim::ResourceLocatorPresenter.new(participatory_space).url } let(:author) do @@ -159,9 +159,10 @@ expect(subject.email_subject).to eq(email_subject) end - it "is html safe" do - expect(subject.email_subject).not_to include("script") - end + # it "is html safe" do + # # pending "Enable after #12547 is merged" + # expect(subject.email_subject).not_to include("script") + # end end describe "email_intro" do @@ -183,9 +184,11 @@ expect(subject.notification_title) .to eq(notification_title) end - - it "is html safe" do - expect(subject.notification_title).not_to include("script") - end + # + # it "is html safe" do + # pp subject.notification_title + # pending "Enable after #12547 is merged" + # expect(subject.notification_title).not_to include("script") + # end end end diff --git a/decidim-core/lib/decidim/events/simple_event.rb b/decidim-core/lib/decidim/events/simple_event.rb index 0974ab393e103..ff110645fac92 100644 --- a/decidim-core/lib/decidim/events/simple_event.rb +++ b/decidim-core/lib/decidim/events/simple_event.rb @@ -136,7 +136,7 @@ def default_i18n_options end def participatory_space_title - translated_attribute(participatory_space.try(:title)) + decidim_sanitize_translated(participatory_space.try(:title)) end end end diff --git a/decidim-core/spec/mailers/reported_mailer_spec.rb b/decidim-core/spec/mailers/reported_mailer_spec.rb index 66d5b953cc658..1f34691a0c0d8 100644 --- a/decidim-core/spec/mailers/reported_mailer_spec.rb +++ b/decidim-core/spec/mailers/reported_mailer_spec.rb @@ -28,7 +28,7 @@ module Decidim describe "email body" do it "includes the participatory space name" do - expect(email_body(mail)).to match(moderation.participatory_space.title["en"]) + expect(email_body(mail)).to include(decidim_escape_translated(moderation.participatory_space.title)) end it "includes the report's reason" do diff --git a/decidim-core/spec/presenters/decidim/log/space_presenter_spec.rb b/decidim-core/spec/presenters/decidim/log/space_presenter_spec.rb index 6c998cda3df66..712ae932b2e9c 100644 --- a/decidim-core/spec/presenters/decidim/log/space_presenter_spec.rb +++ b/decidim-core/spec/presenters/decidim/log/space_presenter_spec.rb @@ -21,7 +21,7 @@ context "when the space exists" do it "links to its public page" do - expect(subject).to have_link(title, href: space_path) + expect(subject).to have_link(translated(space.title), href: space_path) end end diff --git a/decidim-core/spec/presenters/decidim/push_notification_presenter_spec.rb b/decidim-core/spec/presenters/decidim/push_notification_presenter_spec.rb index c1e835a89ca7d..1a066a2b78509 100644 --- a/decidim-core/spec/presenters/decidim/push_notification_presenter_spec.rb +++ b/decidim-core/spec/presenters/decidim/push_notification_presenter_spec.rb @@ -42,7 +42,7 @@ module Decidim describe "#body" do it "returns text without links and with HTML entities unescaped" do - expect(subject.body).to eq("The post #{translated(resource.title)} has been published in #{translated(resource.component.participatory_space.title)}") + expect(subject.body).to eq("The post #{translated(resource.title)} has been published in #{decidim_sanitize_translated(resource.component.participatory_space.title)}") end end diff --git a/decidim-debates/spec/events/decidim/debates/create_debate_event_spec.rb b/decidim-debates/spec/events/decidim/debates/create_debate_event_spec.rb index 56ada2fbd244b..2a2841cc51bb8 100644 --- a/decidim-debates/spec/events/decidim/debates/create_debate_event_spec.rb +++ b/decidim-debates/spec/events/decidim/debates/create_debate_event_spec.rb @@ -12,7 +12,6 @@ let(:event_name) { "decidim.events.debates.debate_created" } let(:space_path) { resource_locator(space).path } let(:extra) { { type: type.to_s } } - let(:debate_title) { decidim_html_escape(translated(resource.title)) } describe "resource_text" do let(:type) { "" } @@ -25,10 +24,10 @@ context "when the notification is for user followers" do let(:type) { :user } let(:i18n_scope) { "decidim.events.debates.create_debate_event.user_followers" } - let(:email_subject) { "New debate \"#{decidim_sanitize(debate_title)}\" by @#{author.nickname}" } - let(:email_intro) { "Hi,\n#{author.name} @#{author.nickname}, who you are following, has created a new debate \"#{debate_title}\". Check it out and contribute:" } + let(:email_subject) { "New debate \"#{resource_title}\" by @#{author.nickname}" } + let(:email_intro) { "Hi,\n#{author.name} @#{author.nickname}, who you are following, has created a new debate \"#{decidim_escape_translated(resource_title)}\". Check it out and contribute:" } let(:email_outro) { "You have received this notification because you are following @#{author.nickname}. You can stop receiving notifications following the previous link." } - let(:notification_title) { "#{author.name} @#{author.nickname} created the #{debate_title} debate." } + let(:notification_title) { "#{author.name} @#{author.nickname} created the #{decidim_escape_translated(resource_title)} debate." } it_behaves_like "a simple event" it_behaves_like "a simple event email" @@ -38,10 +37,10 @@ context "when the notification is for space followers" do let(:type) { :space } let(:i18n_scope) { "decidim.events.debates.create_debate_event.space_followers" } - let(:email_subject) { "New debate \"#{decidim_sanitize(debate_title)}\" on #{translated(space.title)}" } - let(:email_intro) { "Hi,\nA new debate \"#{debate_title}\" has been created on the #{translated(space.title)} participatory space, check it out and contribute:" } - let(:email_outro) { "You have received this notification because you are following the #{translated(space.title)} participatory space. You can stop receiving notifications following the previous link." } - let(:notification_title) { "The #{debate_title} debate was created on #{translated(space.title)}." } + let(:email_subject) { "New debate \"#{resource_title}\" on #{decidim_escape_translated(participatory_space.title)}" } + let(:email_intro) { "Hi,\nA new debate \"#{decidim_escape_translated(resource_title)}\" has been created on the #{decidim_escape_translated(participatory_space.title)} participatory space, check it out and contribute:" } + let(:email_outro) { "You have received this notification because you are following the #{decidim_escape_translated(participatory_space.title)} participatory space. You can stop receiving notifications following the previous link." } + let(:notification_title) { "The #{decidim_escape_translated(resource_title)} debate was created on #{decidim_escape_translated(participatory_space.title)}." } it_behaves_like "a simple event" it_behaves_like "a simple event email" diff --git a/decidim-debates/spec/events/decidim/debates/creation_disabled_event_spec.rb b/decidim-debates/spec/events/decidim/debates/creation_disabled_event_spec.rb index 26c953ab793cc..f3326c1899e8f 100644 --- a/decidim-debates/spec/events/decidim/debates/creation_disabled_event_spec.rb +++ b/decidim-debates/spec/events/decidim/debates/creation_disabled_event_spec.rb @@ -13,7 +13,7 @@ module Debates let(:resource) { create(:debates_component) } let(:participatory_space) { resource.participatory_space } let(:resource_path) { main_component_path(resource) } - let(:email_subject) { "Debate creation disabled in #{participatory_space_title}" } + let(:email_subject) { "Debate creation disabled in #{decidim_sanitize_translated(participatory_space.title)}" } let(:email_intro) { "Debate creation is no longer active in #{participatory_space_title}. You can still participate in open debates from this page:" } let(:email_outro) { "You have received this notification because you are following #{participatory_space_title}. You can stop receiving notifications following the previous link." } let(:notification_title) { "Debate creation is now disabled in #{participatory_space_title}" } diff --git a/decidim-debates/spec/events/decidim/debates/creation_enabled_event_spec.rb b/decidim-debates/spec/events/decidim/debates/creation_enabled_event_spec.rb index 9e18f256f55d8..9af2c60c2305a 100644 --- a/decidim-debates/spec/events/decidim/debates/creation_enabled_event_spec.rb +++ b/decidim-debates/spec/events/decidim/debates/creation_enabled_event_spec.rb @@ -13,10 +13,10 @@ module Debates let(:resource) { create(:debates_component) } let(:participatory_space) { resource.participatory_space } let(:resource_path) { main_component_path(resource) } - let(:email_subject) { "Debates now available in #{participatory_space.title["en"]}" } + let(:email_subject) { "Debates now available in #{decidim_sanitize_translated(participatory_space.title)}" } let(:email_intro) { "You can now start new debates in #{participatory_space_title}! Start participating in this page:" } - let(:email_outro) { "You have received this notification because you are following #{participatory_space.title["en"]}. You can stop receiving notifications following the previous link." } - let(:notification_title) { "You can now start new debates in #{participatory_space.title["en"]}" } + let(:email_outro) { "You have received this notification because you are following #{participatory_space_title}. You can stop receiving notifications following the previous link." } + let(:notification_title) { "You can now start new debates in #{participatory_space_title}" } it_behaves_like "a simple event" it_behaves_like "a simple event email" diff --git a/decidim-elections/spec/events/decidim/elections/election_published_event_spec.rb b/decidim-elections/spec/events/decidim/elections/election_published_event_spec.rb index ce2934ab7e0b6..723126ab14481 100644 --- a/decidim-elections/spec/events/decidim/elections/election_published_event_spec.rb +++ b/decidim-elections/spec/events/decidim/elections/election_published_event_spec.rb @@ -7,9 +7,8 @@ let(:event_name) { "decidim.events.elections.election_published" } let(:resource) { create(:election) } - let(:participatory_space_title) { resource.participatory_space.title["en"] } let(:resource_title) { resource.title["en"] } - let(:email_subject) { "The #{resource_title} election is now active for #{participatory_space_title}." } + let(:email_subject) { "The #{resource_title} election is now active for #{decidim_sanitize_translated(participatory_space.title)}." } let(:email_intro) { "The #{resource_title} election is now active for #{participatory_space_title}. You can see it from this page:" } let(:email_outro) { "You have received this notification because you are following #{participatory_space_title}. You can stop receiving notifications following the previous link." } let(:notification_title) { "The #{resource_title} election is now active for #{participatory_space_title}." } diff --git a/decidim-elections/spec/events/decidim/elections/trustees/notify_new_trustee_event_spec.rb b/decidim-elections/spec/events/decidim/elections/trustees/notify_new_trustee_event_spec.rb index 0c4b9ac4c0f48..d36030efc4d4f 100644 --- a/decidim-elections/spec/events/decidim/elections/trustees/notify_new_trustee_event_spec.rb +++ b/decidim-elections/spec/events/decidim/elections/trustees/notify_new_trustee_event_spec.rb @@ -7,14 +7,15 @@ let(:event_name) { "decidim.events.elections.trustees.new_trustee" } let(:resource) { create(:participatory_process) } - let(:participatory_space_title) { resource.title["en"] } - let(:resource_title) { resource.title["en"] } + let(:participatory_space) { resource } + let(:resource_title) { decidim_escape_translated(resource.title) } + let(:trustee_zone_url) { "http://#{resource.organization.host}/trustee" } - let(:email_subject) { "You are a trustee for #{participatory_space_title}." } + let(:email_subject) { "You are a trustee for #{resource_title}." } let(:email_intro) { "An admin has added you as trustee for #{participatory_space_title}. You should create your public key in your trustee zone" } let(:email_outro) { "You have received this notification because you have been added as trustee for #{participatory_space_title}." } let(:notification_title) { <<-EOTITLE.squish } - You have been added to act as a trustee in #{translated(resource.title)} for some elections that will take place in this platform.
+ You have been added to act as a trustee in #{resource_title} for some elections that will take place in this platform.
You will perform tasks as needed. For now, please generate your identification keys. EOTITLE diff --git a/decidim-meetings/app/cells/decidim/meetings/meeting_s_cell.rb b/decidim-meetings/app/cells/decidim/meetings/meeting_s_cell.rb index 409c3793866c7..682cc8ab44a0a 100644 --- a/decidim-meetings/app/cells/decidim/meetings/meeting_s_cell.rb +++ b/decidim-meetings/app/cells/decidim/meetings/meeting_s_cell.rb @@ -14,7 +14,7 @@ def participatory_space_class_name end def participatory_space_title - translated_attribute model.component.participatory_space.title + decidim_escape_translated model.component.participatory_space.title end def participatory_space_path diff --git a/decidim-meetings/app/helpers/decidim/meetings/directory/application_helper.rb b/decidim-meetings/app/helpers/decidim/meetings/directory/application_helper.rb index f4cdd42a25492..78bb132d28936 100644 --- a/decidim-meetings/app/helpers/decidim/meetings/directory/application_helper.rb +++ b/decidim-meetings/app/helpers/decidim/meetings/directory/application_helper.rb @@ -92,7 +92,7 @@ def directory_filter_categories_values key_point = current_participatory_space.class.name.gsub("::", "__") + current_participatory_space.id.to_s TreeNode.new( - TreePoint.new(key_point, translated_attribute(current_participatory_space.title, current_organization)), + TreePoint.new(key_point, decidim_escape_translated(current_participatory_space.title)), categories_values ) end diff --git a/decidim-meetings/spec/presenters/decidim/meetings/admin_log/invite_presenter_spec.rb b/decidim-meetings/spec/presenters/decidim/meetings/admin_log/invite_presenter_spec.rb index 33357a2ba34b8..3d1e2b224d211 100644 --- a/decidim-meetings/spec/presenters/decidim/meetings/admin_log/invite_presenter_spec.rb +++ b/decidim-meetings/spec/presenters/decidim/meetings/admin_log/invite_presenter_spec.rb @@ -20,13 +20,13 @@ module Decidim::Meetings::AdminLog it "renders the invite information" do user = action_log.user inviter = "#{user.name}" - space = "#{translated(participatory_space.title)}" + space = "#{decidim_escape_translated(participatory_space.title)}" action_string = "#{inviter} invited #{invite.user.name} to join meeting on the #{space} space" expect(subject).to include action_string end end - context "when invite doesn't exist anymore" do + context "when invite does not exist anymore" do before do invite.destroy action_log.reload diff --git a/decidim-participatory_processes/app/cells/decidim/participatory_process_groups/content_blocks/title/show.erb b/decidim-participatory_processes/app/cells/decidim/participatory_process_groups/content_blocks/title/show.erb index 44f6ef6555c4b..c66838a80e8ef 100644 --- a/decidim-participatory_processes/app/cells/decidim/participatory_process_groups/content_blocks/title/show.erb +++ b/decidim-participatory_processes/app/cells/decidim/participatory_process_groups/content_blocks/title/show.erb @@ -1,5 +1,5 @@
-

<%= translated_attribute(participatory_process_group.title) %>

+

<%= decidim_escape_translated(participatory_process_group.title) %>

<%= decidim_sanitize_editor_admin translated_attribute(participatory_process_group.description) %> diff --git a/decidim-participatory_processes/app/cells/decidim/participatory_processes/process_group_m_cell.rb b/decidim-participatory_processes/app/cells/decidim/participatory_processes/process_group_m_cell.rb index a7371c82723aa..88c1f98cb3a60 100644 --- a/decidim-participatory_processes/app/cells/decidim/participatory_processes/process_group_m_cell.rb +++ b/decidim-participatory_processes/app/cells/decidim/participatory_processes/process_group_m_cell.rb @@ -16,7 +16,7 @@ def resource_image_path end def title - translated_attribute model.title + decidim_escape_translated model.title end def resource_path diff --git a/decidim-participatory_processes/lib/decidim/participatory_processes/test/factories.rb b/decidim-participatory_processes/lib/decidim/participatory_processes/test/factories.rb index 6157e254bb6c9..f273c0b1c6a57 100644 --- a/decidim-participatory_processes/lib/decidim/participatory_processes/test/factories.rb +++ b/decidim-participatory_processes/lib/decidim/participatory_processes/test/factories.rb @@ -14,23 +14,23 @@ transient do skip_injection { false } end - title { generate_localized_title } + title { generate_localized_title(:participatory_process_title, skip_injection: skip_injection) } slug { generate(:participatory_process_slug) } - subtitle { generate_localized_title } + subtitle { generate_localized_title(:participatory_process_subtitle, skip_injection: skip_injection) } weight { 1 } - short_description { Decidim::Faker::Localized.wrapped("

", "

") { generate_localized_title } } - description { Decidim::Faker::Localized.wrapped("

", "

") { generate_localized_title } } + short_description { generate_localized_description(:participatory_process_short_description, skip_injection: skip_injection) } + description { generate_localized_description(:participatory_process_description, skip_injection: skip_injection) } organization hero_image { Decidim::Dev.test_file("city.jpeg", "image/jpeg") } # Keep after organization banner_image { Decidim::Dev.test_file("city2.jpeg", "image/jpeg") } # Keep after organization published_at { Time.current } - meta_scope { Decidim::Faker::Localized.word } - developer_group { generate_localized_title } - local_area { generate_localized_title } - target { generate_localized_title } - participatory_scope { generate_localized_title } - participatory_structure { generate_localized_title } - announcement { generate_localized_title } + meta_scope { generate_localized_word(:participatory_process_meta_scope, skip_injection: skip_injection) } + developer_group { generate_localized_title(:participatory_process_developer_group, skip_injection: skip_injection) } + local_area { generate_localized_title(:participatory_process_local_area, skip_injection: skip_injection) } + target { generate_localized_title(:participatory_process_target, skip_injection: skip_injection) } + participatory_scope { generate_localized_title(:participatory_process_participatory_scope, skip_injection: skip_injection) } + participatory_structure { generate_localized_title(:participatory_process_participatory_structure, skip_injection: skip_injection) } + announcement { generate_localized_title(:participatory_process_announcement, skip_injection: skip_injection) } show_metrics { true } show_statistics { true } private_space { false } @@ -61,6 +61,7 @@ create(:participatory_process_step, active: true, end_date: evaluator.current_step_ends, + skip_injection: evaluator.skip_injection, participatory_process: participatory_process) participatory_process.reload participatory_process.steps.reload @@ -89,26 +90,30 @@ end factory :participatory_process_group, class: "Decidim::ParticipatoryProcessGroup" do - title { generate_localized_title } - description { Decidim::Faker::Localized.wrapped("

", "

") { generate_localized_title } } + transient do + skip_injection { false } + end + title { generate_localized_title(:participatory_process_group_title, skip_injection: skip_injection) } + description { generate_localized_description(:participatory_process_group_description, skip_injection: skip_injection) } hero_image { Decidim::Dev.test_file("city.jpeg", "image/jpeg") } organization hashtag { Faker::Internet.slug } group_url { Faker::Internet.url } - developer_group { generate_localized_title } - local_area { generate_localized_title } + developer_group { generate_localized_title(:participatory_process_group_developer_group, skip_injection: skip_injection) } + local_area { generate_localized_title(:participatory_process_group_local_area, skip_injection: skip_injection) } meta_scope { Decidim::Faker::Localized.word } - target { generate_localized_title } - participatory_scope { generate_localized_title } - participatory_structure { generate_localized_title } + target { generate_localized_title(:participatory_process_group_target, skip_injection: skip_injection) } + participatory_scope { generate_localized_title(:participatory_process_group_participatory_scope, skip_injection: skip_injection) } + participatory_structure { generate_localized_title(:participatory_process_group_participatory_structure, skip_injection: skip_injection) } trait :promoted do promoted { true } end trait :with_participatory_processes do - after(:create) do |participatory_process_group| - create_list(:participatory_process, 2, :published, organization: participatory_process_group.organization, participatory_process_group: participatory_process_group) + after(:create) do |participatory_process_group, evaluator| + create_list(:participatory_process, 2, :published, organization: participatory_process_group.organization, participatory_process_group: participatory_process_group, + skip_injection: evaluator.skip_injection) end end end @@ -117,8 +122,8 @@ transient do skip_injection { false } end - title { generate_localized_title } - description { Decidim::Faker::Localized.wrapped("

", "

") { generate_localized_title } } + title { generate_localized_title(:participatory_process_step_title, skip_injection: skip_injection) } + description { generate_localized_description(:participatory_process_step_description, skip_injection: skip_injection) } start_date { 1.month.ago } end_date { 2.months.from_now } position { nil } @@ -135,25 +140,31 @@ end factory :participatory_process_type, class: "Decidim::ParticipatoryProcessType" do - title { generate_localized_title } + transient do + skip_injection { false } + end + title { generate_localized_title(:participatory_process_type_title, skip_injection: skip_injection) } organization trait :with_active_participatory_processes do - after(:create) do |participatory_process_type| - create_list(:participatory_process, 2, :active, :published, organization: participatory_process_type.organization, participatory_process_type: participatory_process_type) + after(:create) do |participatory_process_type, evaluator| + create_list(:participatory_process, 2, :active, :published, organization: participatory_process_type.organization, participatory_process_type: participatory_process_type, + skip_injection: evaluator.skip_injection) end end trait :with_past_participatory_processes do - after(:create) do |participatory_process_type| - create_list(:participatory_process, 2, :past, :published, organization: participatory_process_type.organization, participatory_process_type: participatory_process_type) + after(:create) do |participatory_process_type, evaluator| + create_list(:participatory_process, 2, :past, :published, organization: participatory_process_type.organization, participatory_process_type: participatory_process_type, + skip_injection: evaluator.skip_injection) end end end factory :process_admin, parent: :user, class: "Decidim::User" do transient do - participatory_process { create(:participatory_process) } + skip_injection { false } + participatory_process { create(:participatory_process, skip_injection: skip_injection) } end organization { participatory_process.organization } @@ -163,13 +174,14 @@ create :participatory_process_user_role, user: user, participatory_process: evaluator.participatory_process, - role: :admin + role: :admin, skip_injection: evaluator.skip_injection end end factory :process_collaborator, parent: :user, class: "Decidim::User" do transient do - participatory_process { create(:participatory_process) } + skip_injection { false } + participatory_process { create(:participatory_process, skip_injection: skip_injection) } end organization { participatory_process.organization } @@ -179,13 +191,14 @@ create :participatory_process_user_role, user: user, participatory_process: evaluator.participatory_process, - role: :collaborator + role: :collaborator, skip_injection: evaluator.skip_injection end end factory :process_moderator, parent: :user, class: "Decidim::User" do transient do - participatory_process { create(:participatory_process) } + skip_injection { false } + participatory_process { create(:participatory_process, skip_injection: skip_injection) } end organization { participatory_process.organization } @@ -195,13 +208,14 @@ create :participatory_process_user_role, user: user, participatory_process: evaluator.participatory_process, - role: :moderator + role: :moderator, skip_injection: evaluator.skip_injection end end factory :process_valuator, parent: :user, class: "Decidim::User" do transient do - participatory_process { create(:participatory_process) } + skip_injection { false } + participatory_process { create(:participatory_process, skip_injection: skip_injection) } end organization { participatory_process.organization } @@ -211,13 +225,16 @@ create :participatory_process_user_role, user: user, participatory_process: evaluator.participatory_process, - role: :valuator + role: :valuator, skip_injection: evaluator.skip_injection end end factory :participatory_process_user_role, class: "Decidim::ParticipatoryProcessUserRole" do + transient do + skip_injection { false } + end user - participatory_process { create :participatory_process, organization: user.organization } + participatory_process { create :participatory_process, organization: user.organization, skip_injection: skip_injection } role { "admin" } end end diff --git a/decidim-participatory_processes/spec/events/decidim/participatory_process_role_assigned_event_spec.rb b/decidim-participatory_processes/spec/events/decidim/participatory_process_role_assigned_event_spec.rb index 2bdfff0016e7c..98019746c95b2 100644 --- a/decidim-participatory_processes/spec/events/decidim/participatory_process_role_assigned_event_spec.rb +++ b/decidim-participatory_processes/spec/events/decidim/participatory_process_role_assigned_event_spec.rb @@ -7,12 +7,12 @@ let(:resource) { create :participatory_process } let(:event_name) { "decidim.events.participatory_process.role_assigned" } - let(:role) { create :participatory_process_user_role, user: user, participatory_process: resource, role: :admin } + let(:role) { create(:participatory_process_user_role, user: user, participatory_process: resource, role: :admin) } let(:extra) { { role: role } } - let(:email_subject) { "You have been assigned as #{role} for \"#{resource.title["en"]}\"." } - let(:email_outro) { "You have received this notification because you are #{role} of the \"#{resource.title["en"]}\" participatory process." } - let(:email_intro) { "You have been assigned as #{role} for participatory process \"#{resource.title["en"]}\"." } - let(:notification_title) { "You have been assigned as #{role} for participatory process #{resource.title["en"]}." } + let(:email_subject) { "You have been assigned as #{role} for \"#{decidim_sanitize_translated(resource.title)}\"." } + let(:email_outro) { "You have received this notification because you are #{role} of the \"#{resource_title}\" participatory process." } + let(:email_intro) { "You have been assigned as #{role} for participatory process \"#{resource_title}\"." } + let(:notification_title) { "You have been assigned as #{role} for participatory process #{resource_title}." } it_behaves_like "a simple event" it_behaves_like "a simple event email" diff --git a/decidim-participatory_processes/spec/events/decidim/participatory_process_step_activated_event_spec.rb b/decidim-participatory_processes/spec/events/decidim/participatory_process_step_activated_event_spec.rb index 0ea3d00ba0669..0418657f1f81f 100644 --- a/decidim-participatory_processes/spec/events/decidim/participatory_process_step_activated_event_spec.rb +++ b/decidim-participatory_processes/spec/events/decidim/participatory_process_step_activated_event_spec.rb @@ -23,7 +23,8 @@ ) end - let(:email_subject) { "An update to #{participatory_space_title}" } + let(:resource_title) { decidim_escape_translated(resource.title) } + let(:email_subject) { "An update to #{decidim_sanitize_translated(participatory_space.title)}" } let(:email_intro) { "The #{resource_title} phase is now active for #{participatory_space_title}. You can see it from this page:" } let(:email_outro) { "You have received this notification because you are following #{participatory_space_title}. You can stop receiving notifications following the previous link." } let(:notification_title) { "The #{resource_title} phase is now active for #{participatory_space_title}" } diff --git a/decidim-participatory_processes/spec/events/decidim/participatory_process_step_changed_event_spec.rb b/decidim-participatory_processes/spec/events/decidim/participatory_process_step_changed_event_spec.rb index 849a7f8b63ba6..9599e51ed8654 100644 --- a/decidim-participatory_processes/spec/events/decidim/participatory_process_step_changed_event_spec.rb +++ b/decidim-participatory_processes/spec/events/decidim/participatory_process_step_changed_event_spec.rb @@ -23,7 +23,8 @@ ) end - let(:email_subject) { "An update to #{participatory_space_title}" } + let(:resource_title) { decidim_escape_translated(resource.title) } + let(:email_subject) { "An update to #{decidim_sanitize_translated(participatory_space.title)}" } let(:email_intro) { "The dates for the #{resource_title} phase at #{participatory_space_title} have been updated. You can see it from this page:" } let(:email_outro) { "You have received this notification because you are following #{participatory_space_title}. You can stop receiving notifications following the previous link." } let(:notification_title) { "The dates for the #{resource_title} phase at #{participatory_space_title} have been updated." } diff --git a/decidim-participatory_processes/spec/requests/participatory_process_search_spec.rb b/decidim-participatory_processes/spec/requests/participatory_process_search_spec.rb index 69f4943b03393..fcc5eb0115170 100644 --- a/decidim-participatory_processes/spec/requests/participatory_process_search_spec.rb +++ b/decidim-participatory_processes/spec/requests/participatory_process_search_spec.rb @@ -47,18 +47,18 @@ end it "displays all public active processes by default" do - expect(subject).to include(translated(process1.title)) - expect(subject).to include(translated(process2.title)) - expect(subject).not_to include(translated(past_process.title)) - expect(subject).not_to include(translated(upcoming_process.title)) + expect(subject).to include(decidim_escape_translated(process1.title)) + expect(subject).to include(decidim_escape_translated(process2.title)) + expect(subject).not_to include(decidim_escape_translated(past_process.title)) + expect(subject).not_to include(decidim_escape_translated(upcoming_process.title)) end context "when filtering by area" do let(:filter_params) { { with_area: process1.area.id } } it "displays matching assemblies" do - expect(subject).to include(translated(process1.title)) - expect(subject).not_to include(translated(process2.title)) + expect(subject).to include(decidim_escape_translated(process1.title)) + expect(subject).not_to include(decidim_escape_translated(process2.title)) end end @@ -66,8 +66,8 @@ let(:filter_params) { { with_any_scope: [process1.scope.id] } } it "displays matching assemblies" do - expect(subject).to include(translated(process1.title)) - expect(subject).not_to include(translated(process2.title)) + expect(subject).to include(decidim_escape_translated(process1.title)) + expect(subject).not_to include(decidim_escape_translated(process2.title)) end end @@ -78,10 +78,10 @@ let(:date) { "active" } it "displays all active processes" do - expect(subject).to include(translated(process1.title)) - expect(subject).to include(translated(process2.title)) - expect(subject).not_to include(translated(past_process.title)) - expect(subject).not_to include(translated(upcoming_process.title)) + expect(subject).to include(decidim_escape_translated(process1.title)) + expect(subject).to include(decidim_escape_translated(process2.title)) + expect(subject).not_to include(decidim_escape_translated(past_process.title)) + expect(subject).not_to include(decidim_escape_translated(upcoming_process.title)) end end @@ -89,10 +89,10 @@ let(:date) { "past" } it "displays the past process" do - expect(subject).not_to include(translated(process1.title)) - expect(subject).not_to include(translated(process2.title)) - expect(subject).to include(translated(past_process.title)) - expect(subject).not_to include(translated(upcoming_process.title)) + expect(subject).not_to include(decidim_escape_translated(process1.title)) + expect(subject).not_to include(decidim_escape_translated(process2.title)) + expect(subject).to include(decidim_escape_translated(past_process.title)) + expect(subject).not_to include(decidim_escape_translated(upcoming_process.title)) end end @@ -100,10 +100,10 @@ let(:date) { "upcoming" } it "displays the upcoming process" do - expect(subject).not_to include(translated(process1.title)) - expect(subject).not_to include(translated(process2.title)) - expect(subject).not_to include(translated(past_process.title)) - expect(subject).to include(translated(upcoming_process.title)) + expect(subject).not_to include(decidim_escape_translated(process1.title)) + expect(subject).not_to include(decidim_escape_translated(process2.title)) + expect(subject).not_to include(decidim_escape_translated(past_process.title)) + expect(subject).to include(decidim_escape_translated(upcoming_process.title)) end end @@ -111,10 +111,10 @@ let(:date) { "all" } it "displays all public processes" do - expect(subject).to include(translated(process1.title)) - expect(subject).to include(translated(process2.title)) - expect(subject).to include(translated(past_process.title)) - expect(subject).to include(translated(upcoming_process.title)) + expect(subject).to include(decidim_escape_translated(process1.title)) + expect(subject).to include(decidim_escape_translated(process2.title)) + expect(subject).to include(decidim_escape_translated(past_process.title)) + expect(subject).to include(decidim_escape_translated(upcoming_process.title)) end end @@ -123,10 +123,10 @@ let(:dom) { Nokogiri::HTML(subject) } it "displays all public processes" do - expect(subject).to include(translated(process1.title)) - expect(subject).to include(translated(process2.title)) - expect(subject).to include(translated(past_process.title)) - expect(subject).to include(translated(upcoming_process.title)) + expect(subject).to include(decidim_escape_translated(process1.title)) + expect(subject).to include(decidim_escape_translated(process2.title)) + expect(subject).to include(decidim_escape_translated(past_process.title)) + expect(subject).to include(decidim_escape_translated(upcoming_process.title)) end it "does not cause any display issues" do diff --git a/decidim-participatory_processes/spec/system/participatory_process_groups_spec.rb b/decidim-participatory_processes/spec/system/participatory_process_groups_spec.rb index 2802d754cf5e5..44d7f55e8091b 100644 --- a/decidim-participatory_processes/spec/system/participatory_process_groups_spec.rb +++ b/decidim-participatory_processes/spec/system/participatory_process_groups_spec.rb @@ -83,7 +83,7 @@ end it "shows the description" do - expect(page).to have_i18n_content(participatory_process_group.description) + expect(page).to have_i18n_content(participatory_process_group.description, strip_tags: true) end it "shows the meta scope name" do @@ -120,10 +120,10 @@ it "shows metadata attributes" do within "#participatory_process_group-metadata" do - expect(page).to have_i18n_content(participatory_process_group.developer_group) - expect(page).to have_i18n_content(participatory_process_group.target) - expect(page).to have_i18n_content(participatory_process_group.participatory_scope) - expect(page).to have_i18n_content(participatory_process_group.participatory_structure) + expect(page).to have_i18n_content(participatory_process_group.developer_group, strip_tags: true) + expect(page).to have_i18n_content(participatory_process_group.target, strip_tags: true) + expect(page).to have_i18n_content(participatory_process_group.participatory_scope, strip_tags: true) + expect(page).to have_i18n_content(participatory_process_group.participatory_structure, strip_tags: true) end end end diff --git a/decidim-participatory_processes/spec/system/participatory_process_steps_spec.rb b/decidim-participatory_processes/spec/system/participatory_process_steps_spec.rb index 31fff91640c0f..8526cf9c93c9c 100644 --- a/decidim-participatory_processes/spec/system/participatory_process_steps_spec.rb +++ b/decidim-participatory_processes/spec/system/participatory_process_steps_spec.rb @@ -37,7 +37,7 @@ expect(page).to have_css(".timeline__item", count: 3) steps.each do |step| - expect(page).to have_content(/#{translated(step.title)}/i) + expect(page).to have_content(translated(step.title)) end end diff --git a/decidim-proposals/spec/events/decidim/proposals/creation_enabled_event_spec.rb b/decidim-proposals/spec/events/decidim/proposals/creation_enabled_event_spec.rb index 3218dbaca7157..0858da265e5dc 100644 --- a/decidim-proposals/spec/events/decidim/proposals/creation_enabled_event_spec.rb +++ b/decidim-proposals/spec/events/decidim/proposals/creation_enabled_event_spec.rb @@ -13,10 +13,10 @@ module Proposals let(:resource) { create(:proposal_component) } let(:participatory_space) { resource.participatory_space } let(:resource_path) { main_component_path(resource) } - let(:email_subject) { "Proposals now available in #{participatory_space.title["en"]}" } + let(:email_subject) { "Proposals now available in #{decidim_sanitize_translated(participatory_space.title)}" } let(:email_intro) { "You can now create new proposals in #{participatory_space_title}! Start participating in this page:" } - let(:email_outro) { "You have received this notification because you are following #{participatory_space.title["en"]}. You can stop receiving notifications following the previous link." } - let(:notification_title) { "You can now put forward new proposals in #{participatory_space.title["en"]}" } + let(:email_outro) { "You have received this notification because you are following #{participatory_space_title}. You can stop receiving notifications following the previous link." } + let(:notification_title) { "You can now put forward new proposals in #{participatory_space_title}" } it_behaves_like "a simple event" it_behaves_like "a simple event email" diff --git a/decidim-proposals/spec/events/decidim/proposals/endorsing_enabled_event_spec.rb b/decidim-proposals/spec/events/decidim/proposals/endorsing_enabled_event_spec.rb index eef00726375bf..adedc6713d88f 100644 --- a/decidim-proposals/spec/events/decidim/proposals/endorsing_enabled_event_spec.rb +++ b/decidim-proposals/spec/events/decidim/proposals/endorsing_enabled_event_spec.rb @@ -13,10 +13,10 @@ module Proposals let(:resource) { create(:proposal_component) } let(:participatory_space) { resource.participatory_space } let(:resource_path) { main_component_path(resource) } - let(:email_subject) { "Proposals endorsing has started for #{participatory_space.title["en"]}" } + let(:email_subject) { "Proposals endorsing has started for #{decidim_sanitize_translated(participatory_space.title)}" } let(:email_intro) { "You can endorse proposals in #{participatory_space_title}! Start participating in this page:" } - let(:email_outro) { "You have received this notification because you are following #{participatory_space.title["en"]}. You can stop receiving notifications following the previous link." } - let(:notification_title) { "You can now start endorsing proposals in #{participatory_space.title["en"]}" } + let(:email_outro) { "You have received this notification because you are following #{participatory_space_title}. You can stop receiving notifications following the previous link." } + let(:notification_title) { "You can now start endorsing proposals in #{participatory_space_title}" } it_behaves_like "a simple event" it_behaves_like "a simple event email" diff --git a/decidim-proposals/spec/events/decidim/proposals/publish_proposal_event_spec.rb b/decidim-proposals/spec/events/decidim/proposals/publish_proposal_event_spec.rb index cd49a7fe6d62f..d1c7cd257c2d0 100644 --- a/decidim-proposals/spec/events/decidim/proposals/publish_proposal_event_spec.rb +++ b/decidim-proposals/spec/events/decidim/proposals/publish_proposal_event_spec.rb @@ -76,7 +76,7 @@ module Proposals let(:notification_title) { "The proposal A nice proposal has been added to #{participatory_space_title} by #{author.name} @#{author.nickname}" } let(:email_outro) { "You have received this notification because you are following \"#{participatory_space_title}\". You can stop receiving notifications following the previous link." } let(:email_intro) { "The proposal \"A nice proposal\" has been added to \"#{participatory_space_title}\" that you are following." } - let(:email_subject) { "New proposal \"#{resource_title}\" added to #{participatory_space_title}" } + let(:email_subject) { "New proposal \"#{resource_title}\" added to #{decidim_sanitize_translated(participatory_space.title)}" } let(:extra) { { participatory_space: true } } include_context "when a simple event" diff --git a/decidim-proposals/spec/events/decidim/proposals/voting_enabled_event_spec.rb b/decidim-proposals/spec/events/decidim/proposals/voting_enabled_event_spec.rb index 528191a1e40ee..4629d847f446d 100644 --- a/decidim-proposals/spec/events/decidim/proposals/voting_enabled_event_spec.rb +++ b/decidim-proposals/spec/events/decidim/proposals/voting_enabled_event_spec.rb @@ -10,10 +10,10 @@ module Proposals include_context "when a simple event" let(:event_name) { "decidim.events.proposals.voting_enabled" } - let(:email_subject) { "Proposal support has started for #{participatory_space.title["en"]}" } + let(:email_subject) { "Proposal support has started for #{decidim_sanitize_translated(participatory_space.title)}" } let(:email_intro) { "You can support proposals in #{participatory_space_title}! Start participating in this page:" } - let(:email_outro) { "You have received this notification because you are following #{participatory_space.title["en"]}. You can stop receiving notifications following the previous link." } - let(:notification_title) { "You can now start supporting proposals in #{participatory_space.title["en"]}" } + let(:email_outro) { "You have received this notification because you are following #{participatory_space_title}. You can stop receiving notifications following the previous link." } + let(:notification_title) { "You can now start supporting proposals in #{participatory_space_title}" } let(:resource) { create(:proposal_component) } let(:participatory_space) { resource.participatory_space } let(:resource_path) { main_component_path(resource) } diff --git a/decidim-sortitions/spec/events/decidim/sortitions/create_sortition_event_spec.rb b/decidim-sortitions/spec/events/decidim/sortitions/create_sortition_event_spec.rb index d1c12b68d9ab8..baaf06426e70b 100644 --- a/decidim-sortitions/spec/events/decidim/sortitions/create_sortition_event_spec.rb +++ b/decidim-sortitions/spec/events/decidim/sortitions/create_sortition_event_spec.rb @@ -7,7 +7,7 @@ let(:notification_title) { "The sortition #{resource_title} has been added to #{participatory_space_title}" } let(:email_outro) { "You have received this notification because you are following \"#{participatory_space_title}\". You can unfollow it from the previous link." } let(:email_intro) { "The sortition \"#{resource_title}\" has been added to \"#{participatory_space_title}\" that you are following." } - let(:email_subject) { "New sortition added to #{participatory_space_title}" } + let(:email_subject) { "New sortition added to #{decidim_sanitize_translated(participatory_space.title)}" } let(:event_name) { "decidim.events.sortitions.sortition_created" } include_context "when a simple event" diff --git a/decidim-surveys/spec/events/decidim/surveys/closed_survey_event_spec.rb b/decidim-surveys/spec/events/decidim/surveys/closed_survey_event_spec.rb index 7b35352c6b732..2d5f89ff58d94 100644 --- a/decidim-surveys/spec/events/decidim/surveys/closed_survey_event_spec.rb +++ b/decidim-surveys/spec/events/decidim/surveys/closed_survey_event_spec.rb @@ -13,7 +13,7 @@ module Surveys let(:resource) { create(:surveys_component) } let(:participatory_space) { resource.participatory_space } let(:resource_path) { main_component_path(resource) } - let(:email_subject) { "A survey has finished in #{participatory_space_title}" } + let(:email_subject) { "A survey has finished in #{decidim_sanitize_translated(participatory_space.title)}" } let(:email_intro) { "The survey #{resource.name["en"]} in #{participatory_space_title} has been closed." } let(:email_outro) { "You have received this notification because you are following #{participatory_space_title}. You can stop receiving notifications following the previous link." } let(:notification_title) { "The survey #{resource.name["en"]} in #{participatory_space_title} has finished." } diff --git a/decidim-surveys/spec/events/decidim/surveys/opened_survey_event_spec.rb b/decidim-surveys/spec/events/decidim/surveys/opened_survey_event_spec.rb index 9d2a3e5ecde84..681817472d74c 100644 --- a/decidim-surveys/spec/events/decidim/surveys/opened_survey_event_spec.rb +++ b/decidim-surveys/spec/events/decidim/surveys/opened_survey_event_spec.rb @@ -13,7 +13,7 @@ module Surveys let(:resource) { create(:surveys_component) } let(:participatory_space) { resource.participatory_space } let(:resource_path) { main_component_path(resource) } - let(:email_subject) { "A new survey in #{participatory_space_title}" } + let(:email_subject) { "A new survey in #{decidim_sanitize_translated(participatory_space.title)}" } let(:email_intro) { "The survey #{resource.name["en"]} in #{participatory_space_title} is now open. You can participate in it from this page:" } let(:email_outro) { "You have received this notification because you are following #{participatory_space_title}. You can stop receiving notifications following the previous link." } let(:notification_title) { "The survey #{resource.name["en"]} in #{participatory_space_title} is now open." } From 0f28b1caa71373151088b3a026a445b1b9cb1b39 Mon Sep 17 00:00:00 2001 From: Alexandru Emil Lupu Date: Mon, 8 Apr 2024 13:27:04 +0300 Subject: [PATCH 11/88] Backport 'Patch events on the new format' to v0.27 (#12648) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Patch participatory spaces factories * Patch ParticipatoryProcess factories * Use correct factories * Fix decidim participatory process output * Fix more specs * Fix more specs * Last spec? * Apply suggestions from code review Co-authored-by: Andrés Pereira de Lucena --------- Co-authored-by: Andrés Pereira de Lucena * Patch events on the new format * Patch events on the new format * Some refactor * Fix more specs * Fix specs * Running linters * Patch the specs * RUnning linters * Fix admin spec * Fixing more specs * patch test * Apply review recommendations * Fix failing specs * Fix failing specs on conferences * Update decidim-core/spec/lib/events/simple_event_spec.rb Co-authored-by: Andrés Pereira de Lucena --------- Co-authored-by: Andrés Pereira de Lucena * Remove wrong sanitize_helper location * Fix specs * Fix specs * Fix more specs * Fix more specs * Fix specs * Fix lint errors * Fix specs * Fix spec * Fix more specs * Fix specs * Fix specs * Fix specs * Fix spec * Apply suggestions from code review Co-authored-by: Andrés Pereira de Lucena * Remove obsolete code * Revert some applied changes * One more revert --------- Co-authored-by: Andrés Pereira de Lucena --- .../accountability/base_result_event.rb | 25 ++++++++++++++++ .../accountability/proposal_linked_event.rb | 19 +----------- .../result_progress_updated_event.rb | 20 ++----------- .../proposal_linked_event_spec.rb | 9 ++++-- .../result_progress_updated_event_spec.rb | 14 +++++---- .../events/decidim/resource_hidden_event.rb | 6 +++- .../decidim/attachment_created_event_spec.rb | 4 +-- .../decidim/resource_hidden_event_spec.rb | 11 +++---- .../create_assembly_member_event.rb | 2 +- .../role_assigned_to_assembly_event.rb | 5 ---- .../create_assembly_member_event_spec.rb | 14 ++++----- .../role_assigned_to_assembly_event_spec.rb | 11 +++---- .../decidim/blogs/create_post_event_spec.rb | 2 +- .../decidim/resource_endorsed_event_spec.rb | 2 +- ...ference_registration_notification_event.rb | 10 +++++++ ...ce_registration_notification_event_spec.rb | 19 ++++++++++++ ...erence_registrations_enabled_event_spec.rb | 6 ++-- ...egistrations_over_percentage_event_spec.rb | 3 +- .../conference_role_assigned_event_spec.rb | 11 +++---- .../upcoming_conference_event_spec.rb | 6 ++-- .../update_conference_event_spec.rb | 6 ++-- .../lib/decidim/core/test/factories.rb | 2 +- .../resource_endorsed_event_examples.rb | 9 ++++-- .../core/test/shared_examples/simple_event.rb | 12 ++++++-- .../lib/decidim/events/simple_event.rb | 29 +++++++++---------- .../spec/lib/events/simple_event_spec.rb | 4 +-- .../push_notification_presenter_spec.rb | 4 ++- .../decidim/debates/create_debate_event.rb | 14 --------- decidim-debates/config/locales/en.yml | 8 ++--- .../debates/close_debate_event_spec.rb | 14 ++++++--- .../debates/create_debate_event_spec.rb | 15 +++++----- .../debates/creation_disabled_event_spec.rb | 1 - .../debates/creation_enabled_event_spec.rb | 2 +- .../decidim/resource_endorsed_event_spec.rb | 2 +- .../approve_membership_request_event.rb | 5 +--- .../initiatives/create_initiative_event.rb | 5 +--- .../revoke_membership_request_event.rb | 5 +--- .../spawn_committee_request_event.rb | 5 +--- ...sent_to_technical_validation_event_spec.rb | 13 +++++---- .../support_threshold_reached_event_spec.rb | 11 +++---- .../approve_membership_request_event_spec.rb | 25 +++++++--------- .../create_initiative_event_spec.rb | 14 +++++---- .../endorse_initiative_event_spec.rb | 17 ++++++----- .../extend_initiative_event_spec.rb | 6 ++-- ...sent_to_technical_validation_event_spec.rb | 12 ++++---- .../milestone_completed_event_spec.rb | 6 ++-- .../revoke_membership_request_event_spec.rb | 21 +++++--------- .../spawn_committee_request_event_spec.rb | 20 +++++-------- ...patory_process_role_assigned_event_spec.rb | 1 + ...atory_process_step_activated_event_spec.rb | 2 +- ...ipatory_process_step_changed_event_spec.rb | 1 - .../update_proposal_category_event_spec.rb | 4 +-- .../admin/update_proposal_scope_event_spec.rb | 7 ++--- ...rative_draft_access_accepted_event_spec.rb | 12 ++++---- ...rative_draft_access_rejected_event_spec.rb | 5 ++-- ...ative_draft_access_requested_event_spec.rb | 6 ++-- ...ollaborative_draft_withdrawn_event_spec.rb | 3 +- .../proposal_mentioned_event_spec.rb | 4 +-- .../proposals/rejected_proposal_event_spec.rb | 6 ++-- 59 files changed, 271 insertions(+), 266 deletions(-) create mode 100644 decidim-accountability/app/events/decidim/accountability/base_result_event.rb create mode 100644 decidim-conferences/spec/events/decidim/conferences/conference_registration_notification_event_spec.rb diff --git a/decidim-accountability/app/events/decidim/accountability/base_result_event.rb b/decidim-accountability/app/events/decidim/accountability/base_result_event.rb new file mode 100644 index 0000000000000..3f14f856b3e0d --- /dev/null +++ b/decidim-accountability/app/events/decidim/accountability/base_result_event.rb @@ -0,0 +1,25 @@ +# frozen_string_literal: true + +module Decidim + module Accountability + class BaseResultEvent < Decidim::Events::SimpleEvent + i18n_attributes :proposal_title, :proposal_path + + def resource_text + translated_attribute(resource.description) + end + + def proposal_title + @proposal_title ||= decidim_sanitize_translated(proposal.title) + end + + def proposal_path + @proposal_path ||= Decidim::ResourceLocatorPresenter.new(proposal).path + end + + def proposal + @proposal ||= resource.linked_resources(:proposals, "included_proposals").find_by(id: extra[:proposal_id]) + end + end + end +end diff --git a/decidim-accountability/app/events/decidim/accountability/proposal_linked_event.rb b/decidim-accountability/app/events/decidim/accountability/proposal_linked_event.rb index c4fe40bd24c46..604db909621c9 100644 --- a/decidim-accountability/app/events/decidim/accountability/proposal_linked_event.rb +++ b/decidim-accountability/app/events/decidim/accountability/proposal_linked_event.rb @@ -2,24 +2,7 @@ module Decidim module Accountability - class ProposalLinkedEvent < Decidim::Events::SimpleEvent - i18n_attributes :proposal_title, :proposal_path - - def proposal_path - @proposal_path ||= Decidim::ResourceLocatorPresenter.new(proposal).path - end - - def proposal_title - @proposal_title ||= translated_attribute(proposal.title) - end - - def proposal - @proposal ||= resource.linked_resources(:proposals, "included_proposals").find_by(id: extra[:proposal_id]) - end - - def resource_text - translated_attribute(resource.description) - end + class ProposalLinkedEvent < BaseResultEvent end end end diff --git a/decidim-accountability/app/events/decidim/accountability/result_progress_updated_event.rb b/decidim-accountability/app/events/decidim/accountability/result_progress_updated_event.rb index 3c37a4f0510cb..496cbca93def5 100644 --- a/decidim-accountability/app/events/decidim/accountability/result_progress_updated_event.rb +++ b/decidim-accountability/app/events/decidim/accountability/result_progress_updated_event.rb @@ -2,28 +2,12 @@ module Decidim module Accountability - class ResultProgressUpdatedEvent < Decidim::Events::SimpleEvent - i18n_attributes :proposal_title, :proposal_path, :progress - - def proposal_path - @proposal_path ||= Decidim::ResourceLocatorPresenter.new(proposal).path - end - - def proposal_title - @proposal_title ||= translated_attribute(proposal.title) - end - - def proposal - @proposal ||= resource.linked_resources(:proposals, "included_proposals").find_by(id: extra[:proposal_id]) - end + class ResultProgressUpdatedEvent < BaseResultEvent + i18n_attributes :progress def progress extra[:progress] end - - def resource_text - translated_attribute(resource.description) - end end end end diff --git a/decidim-accountability/spec/events/decidim/accountability/proposal_linked_event_spec.rb b/decidim-accountability/spec/events/decidim/accountability/proposal_linked_event_spec.rb index 636bd3bc8ab18..16c52d8baaba8 100644 --- a/decidim-accountability/spec/events/decidim/accountability/proposal_linked_event_spec.rb +++ b/decidim-accountability/spec/events/decidim/accountability/proposal_linked_event_spec.rb @@ -6,14 +6,14 @@ include_context "when a simple event" let(:event_name) { "decidim.events.accountability.proposal_linked" } - let(:resource) { create(:result) } + let(:resource) { create(:result, title: generate_localized_title(:result_title)) } let(:proposal_component) do create(:component, manifest_name: "proposals", participatory_space: resource.component.participatory_space) end - let(:proposal) { create :proposal, component: proposal_component, title: { en: "My super proposal" } } + let(:proposal) { create(:proposal, component: proposal_component, title: generate_localized_title(:proposal_title)) } let(:extra) { { proposal_id: proposal.id } } let(:proposal_path) { resource_locator(proposal).path } - let(:proposal_title) { translated(proposal.title) } + let(:proposal_title) { decidim_sanitize_translated(proposal.title) } let(:notification_title) { "The proposal #{proposal_title} has been included in the #{resource_title} result." } let(:email_subject) { "An update to #{proposal_title}" } let(:email_outro) { "You have received this notification because you are following \"#{proposal_title}\". You can stop receiving notifications following the previous link." } @@ -48,18 +48,21 @@ describe "email_subject" do it "is generated correctly" do expect(subject.email_subject).not_to include(proposal.title.to_s) + expect(subject.email_subject).to include(proposal_title) end end describe "email_outro" do it "is generated correctly" do expect(subject.email_outro).not_to include(proposal.title.to_s) + expect(subject.email_outro).to include(proposal_title) end end describe "email_intro" do it "is generated correctly" do expect(subject.email_intro).not_to include(proposal.title.to_s) + expect(subject.email_intro).to include(proposal_title) end end diff --git a/decidim-accountability/spec/events/decidim/accountability/result_progress_updated_event_spec.rb b/decidim-accountability/spec/events/decidim/accountability/result_progress_updated_event_spec.rb index 70bc82f3e5a1b..17fe1d937aba1 100644 --- a/decidim-accountability/spec/events/decidim/accountability/result_progress_updated_event_spec.rb +++ b/decidim-accountability/spec/events/decidim/accountability/result_progress_updated_event_spec.rb @@ -6,18 +6,18 @@ include_context "when a simple event" let(:event_name) { "decidim.events.accountability.result_progress_updated" } - let(:resource) { create(:result) } + let(:resource) { create(:result, title: generate_localized_title(:result_title)) } let(:proposal_component) do create(:component, manifest_name: "proposals", participatory_space: resource.component.participatory_space) end - let(:proposal) { create :proposal, component: proposal_component, title: { en: "My super proposal" } } + let(:proposal) { create(:proposal, component: proposal_component, title: generate_localized_title(:proposal_title)) } let(:extra) { { proposal_id: proposal.id, progress: 95 } } let(:proposal_path) { resource_locator(proposal).path } - let(:proposal_title) { translated(proposal.title) } - let(:email_subject) { "An update to #{translated resource.title} progress" } + let(:proposal_title) { decidim_sanitize_translated(proposal.title) } + let(:email_subject) { "An update to #{resource_title} progress" } let(:notification_title) { "The result #{resource_title}, which includes the proposal #{proposal_title}, is now 95% complete." } - let(:email_outro) { "You have received this notification because you are following \"#{proposal_title}\", and this proposal is included in the result \"#{translated resource.title}\". You can stop receiving notifications following the previous link." } - let(:email_intro) { "The result \"#{translated resource.title}\", which includes the proposal \"#{proposal_title}\", is now 95% complete. You can see it from this page:" } + let(:email_outro) { "You have received this notification because you are following \"#{proposal_title}\", and this proposal is included in the result \"#{resource_title}\". You can stop receiving notifications following the previous link." } + let(:email_intro) { "The result \"#{resource_title}\", which includes the proposal \"#{proposal_title}\", is now 95% complete. You can see it from this page:" } before do resource.link_resources([proposal], "included_proposals") @@ -48,12 +48,14 @@ describe "email_outro" do it "is generated correctly" do expect(subject.email_outro).not_to include(proposal.title.to_s) + expect(subject.email_outro).to include(proposal_title) end end describe "email_intro" do it "is generated correctly" do expect(subject.email_intro).not_to include(proposal.title.to_s) + expect(subject.email_intro).to include(proposal_title) end end diff --git a/decidim-admin/app/events/decidim/resource_hidden_event.rb b/decidim-admin/app/events/decidim/resource_hidden_event.rb index 63a22ad1d6d1c..01260ea9d53fc 100644 --- a/decidim-admin/app/events/decidim/resource_hidden_event.rb +++ b/decidim-admin/app/events/decidim/resource_hidden_event.rb @@ -2,6 +2,8 @@ module Decidim class ResourceHiddenEvent < Decidim::Events::SimpleEvent + include Decidim::ApplicationHelper + i18n_attributes :resource_path, :report_reasons, :resource_type, :resource_content def resource_path @@ -23,7 +25,9 @@ def resource_title end def resource_content - translated_attribute(@resource[@resource.reported_attributes.first]).truncate(100, separator: " ") + text = translated_attribute(@resource[@resource.reported_attributes.first]) + + decidim_sanitize(html_truncate(text, length: 100), strip_tags: true) end def resource_text diff --git a/decidim-admin/spec/events/decidim/attachment_created_event_spec.rb b/decidim-admin/spec/events/decidim/attachment_created_event_spec.rb index 25a26e8b399eb..93d8efd353a09 100644 --- a/decidim-admin/spec/events/decidim/attachment_created_event_spec.rb +++ b/decidim-admin/spec/events/decidim/attachment_created_event_spec.rb @@ -8,10 +8,10 @@ let(:event_name) { "decidim.events.attachments.attachment_created" } let(:resource) { create(:attachment) } let(:attached_to_url) { resource_locator(attached_to).url } - let(:resource_title) { decidim_escape_translated(attached_to.title) } + let(:resource_title) { decidim_sanitize_translated(attached_to.title) } let(:resource_path) { resource.url } let(:attached_to) { resource.attached_to } - let(:email_subject) { "An update to #{decidim_sanitize_translated(attached_to.title)}" } + let(:email_subject) { "An update to #{resource_title}" } let(:email_intro) { "A new document has been added to #{resource_title}. You can see it from this page:" } let(:email_outro) { "You have received this notification because you are following #{resource_title}. You can stop receiving notifications following the previous link." } let(:notification_title) { "A new document has been added to #{resource_title}" } diff --git a/decidim-admin/spec/events/decidim/resource_hidden_event_spec.rb b/decidim-admin/spec/events/decidim/resource_hidden_event_spec.rb index 50728ee523334..7d68456d32dfa 100644 --- a/decidim-admin/spec/events/decidim/resource_hidden_event_spec.rb +++ b/decidim-admin/spec/events/decidim/resource_hidden_event_spec.rb @@ -6,13 +6,14 @@ module Decidim describe ResourceHiddenEvent do include_context "when a simple event" - let(:comment) { create :comment, body: { "en" => "a reported comment" } } - let(:moderation) { create :moderation, reportable: comment } - let(:report) { create :report, moderation: moderation } + let(:comment) { create(:comment, body: generate_localized_description(:comment_body)) } + let(:moderation) { create(:moderation, reportable: comment) } + let(:report) { create(:report, moderation: moderation) } let(:resource) { comment } + let(:resource_text) { "#{decidim_sanitize(translated(resource.body), strip_tags: true)}" } let(:event_name) { "decidim.events.reports.resource_hidden" } let(:extra) { { report_reasons: ["spam"] } } - let(:notification_title) { "An administrator removed your comment because it has been reported as spam.
\na reported comment" } + let(:notification_title) { "An administrator removed your comment because it has been reported as spam.
\n#{resource_text}" } let(:email_subject) { "Your comment has been removed" } let(:email_outro) { "You have received this notification because you are an author of the removed content." } let(:email_intro) { "An administrator removed your comment because it has been reported as spam." } @@ -22,7 +23,7 @@ module Decidim describe "resource_text" do it "is generated correctly" do - expect(subject.resource_text).to include("#{comment.body["en"]}") + expect(subject.resource_text).to include(resource_text) end end end diff --git a/decidim-assemblies/app/events/decidim/assemblies/create_assembly_member_event.rb b/decidim-assemblies/app/events/decidim/assemblies/create_assembly_member_event.rb index 1c717bb54f635..bfa320ad335c2 100644 --- a/decidim-assemblies/app/events/decidim/assemblies/create_assembly_member_event.rb +++ b/decidim-assemblies/app/events/decidim/assemblies/create_assembly_member_event.rb @@ -6,7 +6,7 @@ class CreateAssemblyMemberEvent < Decidim::Events::SimpleEvent i18n_attributes :resource_name def resource_name - @resource_name ||= translated_attribute(assembly.title) + @resource_name ||= decidim_sanitize_translated(assembly.title) end def assembly diff --git a/decidim-assemblies/app/events/decidim/role_assigned_to_assembly_event.rb b/decidim-assemblies/app/events/decidim/role_assigned_to_assembly_event.rb index 065b2e705f3d3..3920681579d90 100644 --- a/decidim-assemblies/app/events/decidim/role_assigned_to_assembly_event.rb +++ b/decidim-assemblies/app/events/decidim/role_assigned_to_assembly_event.rb @@ -2,13 +2,8 @@ module Decidim class RoleAssignedToAssemblyEvent < Decidim::Events::SimpleEvent - include Decidim::Events::NotificationEvent include Decidim::Events::AuthorEvent - def notification_title - I18n.t("notification_title", **i18n_options).html_safe - end - def i18n_role I18n.t(extra["role"], scope: "decidim.admin.models.assembly_user_role.roles", default: extra["role"]) end diff --git a/decidim-assemblies/spec/events/decidim/assemblies/create_assembly_member_event_spec.rb b/decidim-assemblies/spec/events/decidim/assemblies/create_assembly_member_event_spec.rb index 19782e2e89f64..7b259bb5f9f25 100644 --- a/decidim-assemblies/spec/events/decidim/assemblies/create_assembly_member_event_spec.rb +++ b/decidim-assemblies/spec/events/decidim/assemblies/create_assembly_member_event_spec.rb @@ -3,16 +3,16 @@ require "spec_helper" describe Decidim::Assemblies::CreateAssemblyMemberEvent do - let(:assembly) { create :assembly } - let(:resource) { assembly } + include_context "when a simple event" + + let(:resource) { create(:assembly, title: generate_localized_title(:assembly_title)) } + let(:participatory_space) { resource } let(:event_name) { "decidim.events.assemblies.create_assembly_member" } - let(:assembly_title) { translated(assembly.title) } - let(:email_subject) { "You have been invited to be a member of the #{assembly_title} assembly!" } - let(:email_intro) { %(An admin of the #{assembly_title} assembly has added you as one of its members.) } + let(:email_subject) { "You have been invited to be a member of the #{resource_title} assembly!" } + let(:email_intro) { %(An admin of the #{resource_title} assembly has added you as one of its members.) } let(:email_outro) { %(You have received this notification because you have been invited to an assembly. Check the assembly page to contribute!) } - let(:notification_title) { %(You have been registered as a member of Assembly #{assembly_title}. Check the assembly page to contribute!) } + let(:notification_title) { %(You have been registered as a member of Assembly #{resource_title}. Check the assembly page to contribute!) } - include_context "when a simple event" it_behaves_like "a simple event" it_behaves_like "a simple event email" it_behaves_like "a simple event notification" diff --git a/decidim-assemblies/spec/events/decidim/role_assigned_to_assembly_event_spec.rb b/decidim-assemblies/spec/events/decidim/role_assigned_to_assembly_event_spec.rb index cec0cbc431c46..bdfe4604e7a67 100644 --- a/decidim-assemblies/spec/events/decidim/role_assigned_to_assembly_event_spec.rb +++ b/decidim-assemblies/spec/events/decidim/role_assigned_to_assembly_event_spec.rb @@ -5,14 +5,15 @@ describe Decidim::RoleAssignedToAssemblyEvent do include_context "when a simple event" - let(:resource) { create :assembly, title: { en: "It's my assembly" } } + let(:resource) { create(:assembly, title: generate_localized_title(:assembly_title)) } + let(:participatory_space) { resource } let(:event_name) { "decidim.events.assembly.role_assigned" } let(:role) { create :assembly_user_role, user: user, assembly: resource, role: :admin } let(:extra) { { role: role } } - let(:email_subject) { "You have been assigned as #{role} for \"#{resource.title["en"]}\"." } - let(:email_outro) { "You have received this notification because you are #{role} of the \"#{resource.title["en"]}\" assembly." } - let(:email_intro) { "You have been assigned as #{role} for assembly \"#{resource.title["en"]}\"." } - let(:notification_title) { "You have been assigned as #{role} for assembly #{resource.title["en"]}." } + let(:email_subject) { "You have been assigned as #{role} for \"#{resource_title}\"." } + let(:email_outro) { "You have received this notification because you are #{role} of the \"#{resource_title}\" assembly." } + let(:email_intro) { "You have been assigned as #{role} for assembly \"#{resource_title}\"." } + let(:notification_title) { "You have been assigned as #{role} for assembly #{resource_title}." } it_behaves_like "a simple event" it_behaves_like "a simple event email" diff --git a/decidim-blogs/spec/events/decidim/blogs/create_post_event_spec.rb b/decidim-blogs/spec/events/decidim/blogs/create_post_event_spec.rb index 1f95c410ab949..a9cea06792f65 100644 --- a/decidim-blogs/spec/events/decidim/blogs/create_post_event_spec.rb +++ b/decidim-blogs/spec/events/decidim/blogs/create_post_event_spec.rb @@ -3,7 +3,7 @@ require "spec_helper" describe Decidim::Blogs::CreatePostEvent do - let(:resource) { create :post } + let(:resource) { create(:post, title: generate_localized_title(:blog_title)) } let(:event_name) { "decidim.events.blogs.post_created" } let(:email_intro) { "The post \"#{resource_title}\" has been published in \"#{participatory_space_title}\" that you are following." } let(:email_outro) { "You have received this notification because you are following \"#{participatory_space_title}\". You can unfollow it from the previous link." } diff --git a/decidim-blogs/spec/events/decidim/resource_endorsed_event_spec.rb b/decidim-blogs/spec/events/decidim/resource_endorsed_event_spec.rb index 2d978f92779ab..adb7feccc428e 100644 --- a/decidim-blogs/spec/events/decidim/resource_endorsed_event_spec.rb +++ b/decidim-blogs/spec/events/decidim/resource_endorsed_event_spec.rb @@ -3,7 +3,7 @@ require "spec_helper" describe Decidim::ResourceEndorsedEvent do - let(:resource) { create :post, title: { en: "My blog post" } } + let(:resource) { create(:post, title: generate_localized_title(:blog_title)) } let(:resource_type) { "Post" } let(:resource_text) { resource.body } diff --git a/decidim-conferences/app/events/decidim/conferences/conference_registration_notification_event.rb b/decidim-conferences/app/events/decidim/conferences/conference_registration_notification_event.rb index 78f645c322752..5e53d34a6f3f7 100644 --- a/decidim-conferences/app/events/decidim/conferences/conference_registration_notification_event.rb +++ b/decidim-conferences/app/events/decidim/conferences/conference_registration_notification_event.rb @@ -4,6 +4,7 @@ module Decidim module Conferences class ConferenceRegistrationNotificationEvent < Decidim::Events::BaseEvent include Decidim::Events::NotificationEvent + include Decidim::SanitizeHelper def notification_title I18n.t("notification_title", **i18n_options).html_safe @@ -12,10 +13,19 @@ def notification_title def i18n_options { resource_title: resource_title, + resource_path: resource_path, resource_url: resource_url, scope: event_name } end + + def resource_title + return unless resource + + title = decidim_sanitize_translated(resource.title) + + Decidim::ContentProcessor.render_without_format(title, links: false).html_safe + end end end end diff --git a/decidim-conferences/spec/events/decidim/conferences/conference_registration_notification_event_spec.rb b/decidim-conferences/spec/events/decidim/conferences/conference_registration_notification_event_spec.rb new file mode 100644 index 0000000000000..6665ce6c10a82 --- /dev/null +++ b/decidim-conferences/spec/events/decidim/conferences/conference_registration_notification_event_spec.rb @@ -0,0 +1,19 @@ +# frozen_string_literal: true + +require "spec_helper" + +describe Decidim::Conferences::ConferenceRegistrationNotificationEvent do + let(:resource) { create(:conference) } + let(:event_name) { "decidim.events.conferences.conference_registration_validation_pending" } + let(:user) { create(:user, organization: organization) } + + include_context "when a simple event" do + let(:participatory_space) { resource } + end + + describe "notification_title" do + it "includes the subject" do + expect(subject.notification_title).to include("Your registration for the conference #{participatory_space_title} is pending to be confirmed.") + end + end +end diff --git a/decidim-conferences/spec/events/decidim/conferences/conference_registrations_enabled_event_spec.rb b/decidim-conferences/spec/events/decidim/conferences/conference_registrations_enabled_event_spec.rb index 146b9136d92aa..6cb8eca3340bd 100644 --- a/decidim-conferences/spec/events/decidim/conferences/conference_registrations_enabled_event_spec.rb +++ b/decidim-conferences/spec/events/decidim/conferences/conference_registrations_enabled_event_spec.rb @@ -3,9 +3,11 @@ require "spec_helper" describe Decidim::Conferences::ConferenceRegistrationsEnabledEvent do - let(:resource) { create :conference } + include_context "when a simple event" + + let(:resource) { create(:conference, title: generate_localized_title(:conference_title)) } + let(:participatory_space) { resource } let(:event_name) { "decidim.events.conferences.registrations_enabled" } - include_context "when a simple event" it_behaves_like "a simple event" end diff --git a/decidim-conferences/spec/events/decidim/conferences/conference_registrations_over_percentage_event_spec.rb b/decidim-conferences/spec/events/decidim/conferences/conference_registrations_over_percentage_event_spec.rb index 84cae96bd2fa4..1c764a9783891 100644 --- a/decidim-conferences/spec/events/decidim/conferences/conference_registrations_over_percentage_event_spec.rb +++ b/decidim-conferences/spec/events/decidim/conferences/conference_registrations_over_percentage_event_spec.rb @@ -5,7 +5,8 @@ describe Decidim::Conferences::ConferenceRegistrationsOverPercentageEvent do include_context "when a simple event" - let(:resource) { create :conference } + let(:resource) { create(:conference, title: generate_localized_title(:conference_title)) } + let(:participatory_space) { resource } let(:event_name) { "decidim.events.conferences.conference_registrations_over_percentage" } let(:extra) { { percentage: 1.1 } } diff --git a/decidim-conferences/spec/events/decidim/conferences/conference_role_assigned_event_spec.rb b/decidim-conferences/spec/events/decidim/conferences/conference_role_assigned_event_spec.rb index 7e7de900948a6..ffd92f6498843 100644 --- a/decidim-conferences/spec/events/decidim/conferences/conference_role_assigned_event_spec.rb +++ b/decidim-conferences/spec/events/decidim/conferences/conference_role_assigned_event_spec.rb @@ -5,14 +5,15 @@ describe Decidim::Conferences::ConferenceRoleAssignedEvent do include_context "when a simple event" - let(:resource) { create :conference, title: { en: "It's my conference" } } + let(:resource) { create(:conference, title: generate_localized_title(:conference_title)) } + let(:participatory_space) { resource } let(:event_name) { "decidim.events.conferences.role_assigned" } let(:role) { create :conference_user_role, user: user, conference: resource, role: :admin } let(:extra) { { role: role } } - let(:email_subject) { "You have been assigned as #{role} for \"#{resource.title["en"]}\"." } - let(:email_outro) { "You have received this notification because you are #{role} of the \"#{resource.title["en"]}\" conference." } - let(:email_intro) { "You have been assigned as #{role} for conference \"#{resource.title["en"]}\"." } - let(:notification_title) { "You have been assigned as #{role} for conference #{resource.title["en"]}." } + let(:email_subject) { "You have been assigned as #{role} for \"#{resource_title}\"." } + let(:email_outro) { "You have received this notification because you are #{role} of the \"#{resource_title}\" conference." } + let(:email_intro) { "You have been assigned as #{role} for conference \"#{resource_title}\"." } + let(:notification_title) { "You have been assigned as #{role} for conference #{resource_title}." } it_behaves_like "a simple event" it_behaves_like "a simple event email" diff --git a/decidim-conferences/spec/events/decidim/conferences/upcoming_conference_event_spec.rb b/decidim-conferences/spec/events/decidim/conferences/upcoming_conference_event_spec.rb index cd7145bcc919d..576de05e1e5ef 100644 --- a/decidim-conferences/spec/events/decidim/conferences/upcoming_conference_event_spec.rb +++ b/decidim-conferences/spec/events/decidim/conferences/upcoming_conference_event_spec.rb @@ -3,9 +3,11 @@ require "spec_helper" describe Decidim::Conferences::UpcomingConferenceEvent do - let(:resource) { create :conference } + include_context "when a simple event" + + let(:resource) { create(:conference, title: generate_localized_title(:conference_title)) } + let(:participatory_space) { resource } let(:event_name) { "decidim.events.conferences.upcoming_conference" } - include_context "when a simple event" it_behaves_like "a simple event" end diff --git a/decidim-conferences/spec/events/decidim/conferences/update_conference_event_spec.rb b/decidim-conferences/spec/events/decidim/conferences/update_conference_event_spec.rb index f15d6eed2d28a..72dad15105677 100644 --- a/decidim-conferences/spec/events/decidim/conferences/update_conference_event_spec.rb +++ b/decidim-conferences/spec/events/decidim/conferences/update_conference_event_spec.rb @@ -3,9 +3,11 @@ require "spec_helper" describe Decidim::Conferences::UpdateConferenceEvent do - let(:resource) { create :conference } + include_context "when a simple event" + + let(:resource) { create(:conference, title: generate_localized_title(:conference_title)) } + let(:participatory_space) { resource } let(:event_name) { "decidim.events.conferences.conference_updated" } - include_context "when a simple event" it_behaves_like "a simple event" end diff --git a/decidim-core/lib/decidim/core/test/factories.rb b/decidim-core/lib/decidim/core/test/factories.rb index 96738bcd9ce73..d18652bb31b71 100644 --- a/decidim-core/lib/decidim/core/test/factories.rb +++ b/decidim-core/lib/decidim/core/test/factories.rb @@ -405,7 +405,7 @@ def generate_localized_title(field = nil, skip_injection: false) skip_injection { false } end title { generate_localized_title(:attachment_title, skip_injection: skip_injection) } - description { generate_localized_description(:attachment_description, skip_injection: skip_injection) } + description { generate_localized_title(:attachment_description, skip_injection: skip_injection) } weight { Faker::Number.number(digits: 1) } attached_to { build(:participatory_process, skip_injection: skip_injection) } content_type { "image/jpeg" } diff --git a/decidim-core/lib/decidim/core/test/shared_examples/resource_endorsed_event_examples.rb b/decidim-core/lib/decidim/core/test/shared_examples/resource_endorsed_event_examples.rb index 9bf6fd0d306f7..f12817c60b9a5 100644 --- a/decidim-core/lib/decidim/core/test/shared_examples/resource_endorsed_event_examples.rb +++ b/decidim-core/lib/decidim/core/test/shared_examples/resource_endorsed_event_examples.rb @@ -35,17 +35,20 @@ end describe "email_intro" do + let(:resource_title) { decidim_sanitize_translated(resource.title) } it "is generated correctly" do expect(subject.email_intro) - .to eq("#{author.name} #{author_presenter.nickname}, who you are following," \ - " has just endorsed \"#{translated resource.title}\" and we think it may be interesting to you. Check it out and contribute:") + .to eq("#{author.name} #{author_presenter.nickname}, who you are following, " \ + "has just endorsed \"#{resource_title}\" and we think it may be interesting to you. Check it out and contribute:") end end describe "notification_title" do + let(:resource_title) { decidim_sanitize_translated(resource.title) } + it "is generated correctly" do expect(subject.notification_title) - .to include("The #{translated resource.title} #{resource_type} has been endorsed by ") + .to include("The #{resource_title} #{resource_type} has been endorsed by ") expect(subject.notification_title) .to include("#{author.name} #{author_presenter.nickname}.") diff --git a/decidim-core/lib/decidim/core/test/shared_examples/simple_event.rb b/decidim-core/lib/decidim/core/test/shared_examples/simple_event.rb index cbadfb247c70a..4e8b9805270cc 100644 --- a/decidim-core/lib/decidim/core/test/shared_examples/simple_event.rb +++ b/decidim-core/lib/decidim/core/test/shared_examples/simple_event.rb @@ -28,10 +28,10 @@ let(:extra) { {} } let(:resource_path) { resource_locator(resource).path } let(:resource_url) { resource_locator(resource).url } - let(:resource_title) { resource.title["en"] } + let(:resource_title) { decidim_sanitize_translated(resource.title) } # to be used when resource is a component resource, not a participatory space, in which case should be overriden let(:participatory_space) { resource.participatory_space } - let(:participatory_space_title) { decidim_escape_translated(decidim_sanitize_translated(participatory_space.title)) } + let(:participatory_space_title) { decidim_sanitize_translated(participatory_space.title) } let(:participatory_space_path) { Decidim::ResourceLocatorPresenter.new(participatory_space).path } let(:participatory_space_url) { Decidim::ResourceLocatorPresenter.new(participatory_space).url } let(:author) do @@ -65,6 +65,7 @@ it "is generated correctly" do expect(subject.email_subject).to be_kind_of(String) expect(subject.email_subject).not_to include("translation missing") + expect(subject.email_subject).not_to include("script") end end @@ -100,6 +101,7 @@ it "is generated correctly" do expect(subject.notification_title).to be_kind_of(String) expect(subject.notification_title).not_to include("translation missing") + expect(subject.notification_title).not_to include("script") end end @@ -129,6 +131,12 @@ expect(subject.participatory_space_url).to start_with("http") end end + + describe "participatory_space_title" do + it "is generated correctly" do + expect(translated(participatory_space.title)).to include("script") + end + end end describe "i18n_options" do diff --git a/decidim-core/lib/decidim/events/simple_event.rb b/decidim-core/lib/decidim/events/simple_event.rb index ff110645fac92..39e29aab7db1f 100644 --- a/decidim-core/lib/decidim/events/simple_event.rb +++ b/decidim-core/lib/decidim/events/simple_event.rb @@ -34,14 +34,7 @@ def self.i18n_attributes(*attributes) end def email_subject - I18n.t("email_subject", **email_subject_i18n_options).html_safe - end - - def email_subject_i18n_options - sanitized_values = { resource_title: decidim_sanitize(resource_title) } - sanitized_values[:mentioned_proposal_title] = decidim_sanitize(mentioned_proposal_title) if i18n_options.has_key?(:mentioned_proposal_title) - sanitized_values[:participatory_space_title] = decidim_sanitize(participatory_space_title) if i18n_options.has_key?(:participatory_space_title) - i18n_options.merge(sanitized_values) + I18n.t("email_subject", **i18n_options).html_safe end def email_intro @@ -77,13 +70,7 @@ def event_has_roles? # Public: The Hash of options to pass to the I18.t method. def i18n_options - default_i18n_options.merge(event_interpolations).transform_values do |value| - if value.is_a?(String) - decidim_html_escape(value) - else - value - end - end + default_i18n_options.merge(event_interpolations) end # Caches the path for the given resource when it's a Decidim::Component. @@ -116,6 +103,18 @@ def resource_text nil end + def resource_title + return unless resource + + title = if resource.respond_to?(:title) + decidim_sanitize_translated(resource.title) + elsif resource.respond_to?(:name) + decidim_sanitize_translated(resource.name) + end + + Decidim::ContentProcessor.render_without_format(title, links: false).html_safe + end + private def event_interpolations diff --git a/decidim-core/spec/lib/events/simple_event_spec.rb b/decidim-core/spec/lib/events/simple_event_spec.rb index 3097a58073946..c77a37ae0011b 100644 --- a/decidim-core/spec/lib/events/simple_event_spec.rb +++ b/decidim-core/spec/lib/events/simple_event_spec.rb @@ -18,9 +18,9 @@ module Decidim let(:resource) { create(:dummy_resource, title: { en: "" }) } - it "escapes the HTML tags from the i18n options" do + it "sanitizes the HTML tags from the i18n options" do expect(subject.i18n_options[:resource_title]) - .to eq "<script>alert('Hey');</script>" + .to eq "alert('Hey');" end end end diff --git a/decidim-core/spec/presenters/decidim/push_notification_presenter_spec.rb b/decidim-core/spec/presenters/decidim/push_notification_presenter_spec.rb index 1a066a2b78509..cc49d0c27691c 100644 --- a/decidim-core/spec/presenters/decidim/push_notification_presenter_spec.rb +++ b/decidim-core/spec/presenters/decidim/push_notification_presenter_spec.rb @@ -39,10 +39,12 @@ module Decidim let(:event_name) { "decidim.events.blogs.post_created" } let(:resource) { create(:post) } let(:notification) { create(:notification, event_class: event_class, event_name: event_name, resource: resource) } + let(:resource_title) { decidim_sanitize_translated(resource.title) } + let(:participatory_space_title) { decidim_sanitize_translated(resource.component.participatory_space.title) } describe "#body" do it "returns text without links and with HTML entities unescaped" do - expect(subject.body).to eq("The post #{translated(resource.title)} has been published in #{decidim_sanitize_translated(resource.component.participatory_space.title)}") + expect(subject.body).to eq("The post #{resource_title} has been published in #{participatory_space_title}") end end diff --git a/decidim-debates/app/events/decidim/debates/create_debate_event.rb b/decidim-debates/app/events/decidim/debates/create_debate_event.rb index 180db80cec830..797936efb55a2 100644 --- a/decidim-debates/app/events/decidim/debates/create_debate_event.rb +++ b/decidim-debates/app/events/decidim/debates/create_debate_event.rb @@ -12,26 +12,12 @@ module Debates class CreateDebateEvent < Decidim::Events::SimpleEvent include Decidim::Events::AuthorEvent - i18n_attributes :space_title, :space_path - def resource_text translated_attribute(resource.description) end private - def space - @space ||= resource.participatory_space - end - - def space_path - Decidim::ResourceLocatorPresenter.new(space).path - end - - def space_title - space.title.is_a?(Hash) ? space.title[I18n.locale.to_s] : space.title - end - def i18n_scope @i18n_scope ||= if extra[:type].to_s == "user" "decidim.events.debates.create_debate_event.user_followers" diff --git a/decidim-debates/config/locales/en.yml b/decidim-debates/config/locales/en.yml index 81bdc4996ae0c..6671572174188 100644 --- a/decidim-debates/config/locales/en.yml +++ b/decidim-debates/config/locales/en.yml @@ -192,10 +192,10 @@ en: space_followers: email_intro: |- Hi, - A new debate "%{resource_title}" has been created on the %{space_title} participatory space, check it out and contribute: - email_outro: You have received this notification because you are following the %{space_title} participatory space. You can stop receiving notifications following the previous link. - email_subject: New debate "%{resource_title}" on %{space_title} - notification_title: The %{resource_title} debate was created on %{space_title}. + A new debate "%{resource_title}" has been created on the %{participatory_space_title} participatory space, check it out and contribute: + email_outro: You have received this notification because you are following the %{participatory_space_title} participatory space. You can stop receiving notifications following the previous link. + email_subject: New debate "%{resource_title}" on %{participatory_space_title} + notification_title: The %{resource_title} debate was created on %{participatory_space_title}. user_followers: email_intro: |- Hi, diff --git a/decidim-debates/spec/events/decidim/debates/close_debate_event_spec.rb b/decidim-debates/spec/events/decidim/debates/close_debate_event_spec.rb index 8fbf5478e3cc2..6bedee0b53b85 100644 --- a/decidim-debates/spec/events/decidim/debates/close_debate_event_spec.rb +++ b/decidim-debates/spec/events/decidim/debates/close_debate_event_spec.rb @@ -6,7 +6,13 @@ module Decidim module Debates describe CloseDebateEvent do describe "notification digest mail" do - let!(:component) { create(:debates_component, organization: organization, participatory_space: participatory_space) } + let!(:component) do + create(:debates_component, + organization: organization, + participatory_space: participatory_space, + name: generate_component_name(participatory_space.organization.available_locales, :debates)) + end + let(:admin) { create(:user, :admin, organization: organization) } let!(:follow) { create(:follow, followable: record, user: user) } let(:params) do @@ -20,9 +26,9 @@ module Debates create( :debate, component: component, - title: { en: "Event notifier" }, - description: { en: "This debate is for testing purposes" }, - instructions: { en: "Use this debate for testing" } + title: generate_localized_title(:debate_title), + description: generate_localized_description(:debate_description), + instructions: generate_localized_description(:debate_instructions) ) end diff --git a/decidim-debates/spec/events/decidim/debates/create_debate_event_spec.rb b/decidim-debates/spec/events/decidim/debates/create_debate_event_spec.rb index 2a2841cc51bb8..517c4c5af17a3 100644 --- a/decidim-debates/spec/events/decidim/debates/create_debate_event_spec.rb +++ b/decidim-debates/spec/events/decidim/debates/create_debate_event_spec.rb @@ -7,10 +7,9 @@ include_context "when a simple event" - let(:resource) { create :debate, :participant_author, title: { en: "It's my debate" } } + let(:resource) { create(:debate, :participant_author, title: generate_localized_title(:debate_title)) } let(:space) { resource.participatory_space } let(:event_name) { "decidim.events.debates.debate_created" } - let(:space_path) { resource_locator(space).path } let(:extra) { { type: type.to_s } } describe "resource_text" do @@ -25,9 +24,9 @@ let(:type) { :user } let(:i18n_scope) { "decidim.events.debates.create_debate_event.user_followers" } let(:email_subject) { "New debate \"#{resource_title}\" by @#{author.nickname}" } - let(:email_intro) { "Hi,\n#{author.name} @#{author.nickname}, who you are following, has created a new debate \"#{decidim_escape_translated(resource_title)}\". Check it out and contribute:" } + let(:email_intro) { "Hi,\n#{author.name} @#{author.nickname}, who you are following, has created a new debate \"#{resource_title}\". Check it out and contribute:" } let(:email_outro) { "You have received this notification because you are following @#{author.nickname}. You can stop receiving notifications following the previous link." } - let(:notification_title) { "#{author.name} @#{author.nickname} created the #{decidim_escape_translated(resource_title)} debate." } + let(:notification_title) { "#{author.name} @#{author.nickname} created the #{resource_title} debate." } it_behaves_like "a simple event" it_behaves_like "a simple event email" @@ -37,10 +36,10 @@ context "when the notification is for space followers" do let(:type) { :space } let(:i18n_scope) { "decidim.events.debates.create_debate_event.space_followers" } - let(:email_subject) { "New debate \"#{resource_title}\" on #{decidim_escape_translated(participatory_space.title)}" } - let(:email_intro) { "Hi,\nA new debate \"#{decidim_escape_translated(resource_title)}\" has been created on the #{decidim_escape_translated(participatory_space.title)} participatory space, check it out and contribute:" } - let(:email_outro) { "You have received this notification because you are following the #{decidim_escape_translated(participatory_space.title)} participatory space. You can stop receiving notifications following the previous link." } - let(:notification_title) { "The #{decidim_escape_translated(resource_title)} debate was created on #{decidim_escape_translated(participatory_space.title)}." } + let(:email_subject) { "New debate \"#{resource_title}\" on #{participatory_space_title}" } + let(:email_intro) { "Hi,\nA new debate \"#{resource_title}\" has been created on the #{participatory_space_title} participatory space, check it out and contribute:" } + let(:email_outro) { "You have received this notification because you are following the #{participatory_space_title} participatory space. You can stop receiving notifications following the previous link." } + let(:notification_title) { "The #{resource_title} debate was created on #{participatory_space_title}." } it_behaves_like "a simple event" it_behaves_like "a simple event email" diff --git a/decidim-debates/spec/events/decidim/debates/creation_disabled_event_spec.rb b/decidim-debates/spec/events/decidim/debates/creation_disabled_event_spec.rb index f3326c1899e8f..3eb27f9abe5b8 100644 --- a/decidim-debates/spec/events/decidim/debates/creation_disabled_event_spec.rb +++ b/decidim-debates/spec/events/decidim/debates/creation_disabled_event_spec.rb @@ -11,7 +11,6 @@ module Debates let(:event_name) { "decidim.events.debates.creation_disabled" } let(:resource) { create(:debates_component) } - let(:participatory_space) { resource.participatory_space } let(:resource_path) { main_component_path(resource) } let(:email_subject) { "Debate creation disabled in #{decidim_sanitize_translated(participatory_space.title)}" } let(:email_intro) { "Debate creation is no longer active in #{participatory_space_title}. You can still participate in open debates from this page:" } diff --git a/decidim-debates/spec/events/decidim/debates/creation_enabled_event_spec.rb b/decidim-debates/spec/events/decidim/debates/creation_enabled_event_spec.rb index 9af2c60c2305a..fa63add611636 100644 --- a/decidim-debates/spec/events/decidim/debates/creation_enabled_event_spec.rb +++ b/decidim-debates/spec/events/decidim/debates/creation_enabled_event_spec.rb @@ -13,7 +13,7 @@ module Debates let(:resource) { create(:debates_component) } let(:participatory_space) { resource.participatory_space } let(:resource_path) { main_component_path(resource) } - let(:email_subject) { "Debates now available in #{decidim_sanitize_translated(participatory_space.title)}" } + let(:email_subject) { "Debates now available in #{participatory_space_title}" } let(:email_intro) { "You can now start new debates in #{participatory_space_title}! Start participating in this page:" } let(:email_outro) { "You have received this notification because you are following #{participatory_space_title}. You can stop receiving notifications following the previous link." } let(:notification_title) { "You can now start new debates in #{participatory_space_title}" } diff --git a/decidim-debates/spec/events/decidim/resource_endorsed_event_spec.rb b/decidim-debates/spec/events/decidim/resource_endorsed_event_spec.rb index 7e77e5474ee9f..2a9527f2b3848 100644 --- a/decidim-debates/spec/events/decidim/resource_endorsed_event_spec.rb +++ b/decidim-debates/spec/events/decidim/resource_endorsed_event_spec.rb @@ -3,7 +3,7 @@ require "spec_helper" describe Decidim::ResourceEndorsedEvent do - let(:resource) { create :debate, title: { en: "My debate" } } + let(:resource) { create(:debate, title: generate_localized_title(:debate_title)) } let(:resource_type) { "Debate" } let(:resource_text) { resource.description } diff --git a/decidim-initiatives/app/events/decidim/initiatives/approve_membership_request_event.rb b/decidim-initiatives/app/events/decidim/initiatives/approve_membership_request_event.rb index 933614f89a099..99ea618d18fc9 100644 --- a/decidim-initiatives/app/events/decidim/initiatives/approve_membership_request_event.rb +++ b/decidim-initiatives/app/events/decidim/initiatives/approve_membership_request_event.rb @@ -2,10 +2,7 @@ module Decidim module Initiatives - class ApproveMembershipRequestEvent < Decidim::Events::BaseEvent - include Decidim::Events::EmailEvent - include Decidim::Events::NotificationEvent - + class ApproveMembershipRequestEvent < Decidim::Events::SimpleEvent def email_subject I18n.t( "decidim.initiatives.events.approve_membership_request.email_subject", diff --git a/decidim-initiatives/app/events/decidim/initiatives/create_initiative_event.rb b/decidim-initiatives/app/events/decidim/initiatives/create_initiative_event.rb index 13adcf98f6295..9ac5185ca3c8c 100644 --- a/decidim-initiatives/app/events/decidim/initiatives/create_initiative_event.rb +++ b/decidim-initiatives/app/events/decidim/initiatives/create_initiative_event.rb @@ -2,10 +2,7 @@ module Decidim module Initiatives - class CreateInitiativeEvent < Decidim::Events::BaseEvent - include Decidim::Events::EmailEvent - include Decidim::Events::NotificationEvent - + class CreateInitiativeEvent < Decidim::Events::SimpleEvent def email_subject I18n.t( "decidim.initiatives.events.create_initiative_event.email_subject", diff --git a/decidim-initiatives/app/events/decidim/initiatives/revoke_membership_request_event.rb b/decidim-initiatives/app/events/decidim/initiatives/revoke_membership_request_event.rb index 68d36ef297ff1..2e4272939eb40 100644 --- a/decidim-initiatives/app/events/decidim/initiatives/revoke_membership_request_event.rb +++ b/decidim-initiatives/app/events/decidim/initiatives/revoke_membership_request_event.rb @@ -2,10 +2,7 @@ module Decidim module Initiatives - class RevokeMembershipRequestEvent < Decidim::Events::BaseEvent - include Decidim::Events::EmailEvent - include Decidim::Events::NotificationEvent - + class RevokeMembershipRequestEvent < Decidim::Events::SimpleEvent def email_subject I18n.t( "decidim.initiatives.events.revoke_membership_request.email_subject", diff --git a/decidim-initiatives/app/events/decidim/initiatives/spawn_committee_request_event.rb b/decidim-initiatives/app/events/decidim/initiatives/spawn_committee_request_event.rb index e82fddf6e6415..68ccc2560a51f 100644 --- a/decidim-initiatives/app/events/decidim/initiatives/spawn_committee_request_event.rb +++ b/decidim-initiatives/app/events/decidim/initiatives/spawn_committee_request_event.rb @@ -2,10 +2,7 @@ module Decidim module Initiatives - class SpawnCommitteeRequestEvent < Decidim::Events::BaseEvent - include Decidim::Events::EmailEvent - include Decidim::Events::NotificationEvent - + class SpawnCommitteeRequestEvent < Decidim::Events::SimpleEvent def email_subject I18n.t( "decidim.initiatives.events.spawn_committee_request_event.email_subject", diff --git a/decidim-initiatives/spec/events/decidim/initiatives/admin/initiative_sent_to_technical_validation_event_spec.rb b/decidim-initiatives/spec/events/decidim/initiatives/admin/initiative_sent_to_technical_validation_event_spec.rb index 54fde99186bc4..d737f2db1c796 100644 --- a/decidim-initiatives/spec/events/decidim/initiatives/admin/initiative_sent_to_technical_validation_event_spec.rb +++ b/decidim-initiatives/spec/events/decidim/initiatives/admin/initiative_sent_to_technical_validation_event_spec.rb @@ -3,17 +3,18 @@ require "spec_helper" describe Decidim::Initiatives::Admin::InitiativeSentToTechnicalValidationEvent do - let(:resource) { create :initiative } + include_context "when a simple event" + + let(:resource) { create :initiative, title: generate_localized_title(:initiative_title) } + let(:participatory_space) { resource } let(:event_name) { "decidim.events.initiatives.admin.initiative_sent_to_technical_validation" } let(:admin_initiative_path) { "/admin/initiatives/#{resource.slug}/edit?initiative_slug=#{resource.slug}" } let(:admin_initiative_url) { "http://#{organization.host}#{admin_initiative_path}" } - let!(:initiative_title) { decidim_html_escape(resource_title) } - let(:email_subject) { "Initiative \"#{decidim_sanitize(resource_title)}\" was sent to technical validation." } - let(:email_intro) { %(The initiative "#{initiative_title}" has been sent to technical validation. Check it out at the admin panel) } + let(:email_subject) { "Initiative \"#{resource_title}\" was sent to technical validation." } + let(:email_intro) { %(The initiative "#{resource_title}" has been sent to technical validation. Check it out at the admin panel) } let(:email_outro) { "You have received this notification because you are an admin of the platform." } - let(:notification_title) { %(The initiative "#{initiative_title}" has been sent to technical validation. Check it out at the admin panel) } + let(:notification_title) { %(The initiative "#{resource_title}" has been sent to technical validation. Check it out at the admin panel) } - include_context "when a simple event" it_behaves_like "a simple event" it_behaves_like "a simple event email" it_behaves_like "a simple event notification" diff --git a/decidim-initiatives/spec/events/decidim/initiatives/admin/support_threshold_reached_event_spec.rb b/decidim-initiatives/spec/events/decidim/initiatives/admin/support_threshold_reached_event_spec.rb index 43e31f7df97e7..817160268ad99 100644 --- a/decidim-initiatives/spec/events/decidim/initiatives/admin/support_threshold_reached_event_spec.rb +++ b/decidim-initiatives/spec/events/decidim/initiatives/admin/support_threshold_reached_event_spec.rb @@ -6,15 +6,12 @@ include_context "when a simple event" let(:event_name) { "decidim.events.initiatives.support_threshold_reached" } - let(:resource) { initiative } - - let(:initiative) { create :initiative } - let(:participatory_space) { initiative } - let(:initiative_title) { decidim_html_escape(translated(initiative.title)) } + let(:resource) { create :initiative, title: generate_localized_title(:initiative_title) } + let(:participatory_space) { resource } let(:email_subject) { "Signatures threshold reached" } - let(:email_intro) { "The initiative #{initiative_title} has reached the signatures threshold" } + let(:email_intro) { "The initiative #{resource_title} has reached the signatures threshold" } let(:email_outro) { "You have received this notification because you are an admin of the platform." } - let(:notification_title) { "The #{initiative_title} initiative has reached the signatures threshold" } + let(:notification_title) { "The #{resource_title} initiative has reached the signatures threshold" } it_behaves_like "a simple event" it_behaves_like "a simple event email" diff --git a/decidim-initiatives/spec/events/decidim/initiatives/approve_membership_request_event_spec.rb b/decidim-initiatives/spec/events/decidim/initiatives/approve_membership_request_event_spec.rb index 3ecdda1770912..c01ea388d763f 100644 --- a/decidim-initiatives/spec/events/decidim/initiatives/approve_membership_request_event_spec.rb +++ b/decidim-initiatives/spec/events/decidim/initiatives/approve_membership_request_event_spec.rb @@ -3,25 +3,19 @@ require "spec_helper" describe Decidim::Initiatives::ApproveMembershipRequestEvent do - subject do - described_class.new( - resource: initiative, - event_name: event_name, - user: [membership_request.user], - user_role: :affected_user, - extra: { author: author } - ) - end + include_context "when a simple event" + let(:user_role) { :affected_user } + let(:extra) { { author: author } } let(:event_name) { "decidim.events.initiatives.approve_membership_request" } - let(:organization) { create(:organization) } - let!(:initiative) { create(:initiative, :created, organization: organization) } - let(:author) { initiative.author } + let!(:resource) { create(:initiative, :created, title: generate_localized_title(:initiative_title)) } + let(:participatory_space) { resource } + + let(:author) { resource.author } let(:author_profile_url) { Decidim::UserPresenter.new(author).profile_url } let(:author_nickname) { Decidim::UserPresenter.new(author).nickname } - let(:membership_request) { create(:initiatives_committee_member, initiative: initiative, state: "requested") } - let(:resource_url) { resource_locator(initiative).url } - let(:resource_title) { translated(initiative.title) } + let(:user) { create(:initiatives_committee_member, initiative: resource, state: "requested").user } + let(:resource_url) { resource_locator(resource).url } let(:email_subject) { "#{author_nickname} accepted your application to the promoter committee" } let(:email_intro) { "#{author_nickname} accepted your application to be part of the promoter committee for the initiative #{resource_title}." } let(:email_outro) { "You received this notification because you applied to this initiative: #{resource_title}" } @@ -39,6 +33,7 @@ end end + it_behaves_like "a simple event" it_behaves_like "a simple event email" it_behaves_like "a simple event notification" end diff --git a/decidim-initiatives/spec/events/decidim/initiatives/create_initiative_event_spec.rb b/decidim-initiatives/spec/events/decidim/initiatives/create_initiative_event_spec.rb index 7dea2baf5ff80..7ebeb87a7b5db 100644 --- a/decidim-initiatives/spec/events/decidim/initiatives/create_initiative_event_spec.rb +++ b/decidim-initiatives/spec/events/decidim/initiatives/create_initiative_event_spec.rb @@ -4,19 +4,21 @@ describe Decidim::Initiatives::CreateInitiativeEvent do subject do - described_class.new(resource: initiative, event_name: event_name, user: user, extra: {}) + described_class.new(resource: resource, event_name: event_name, user: user, extra: {}) end - let(:organization) { initiative.organization } - let(:initiative) { create :initiative } - let(:initiative_author) { initiative.author } + include_context "when a simple event" + + let(:organization) { resource.organization } + let(:resource) { create :initiative, title: generate_localized_title(:initiative_title) } + let(:initiative_author) { resource.author } let(:event_name) { "decidim.events.initiatives.initiative_created" } let(:user) { create :user, organization: organization } - let(:resource_path) { resource_locator(initiative).path } + let(:resource_path) { resource_locator(resource).path } let(:email_subject) { "New initiative by @#{initiative_author.nickname}" } let(:email_intro) { "#{initiative_author.name} @#{initiative_author.nickname}, who you are following, has created a new initiative, check it out and contribute:" } let(:email_outro) { "You have received this notification because you are following @#{initiative_author.nickname}. You can stop receiving notifications following the previous link." } - let(:notification_title) { "The #{initiative.title["en"]} initiative was created by #{initiative_author.name} @#{initiative_author.nickname}." } + let(:notification_title) { "The #{resource_title} initiative was created by #{initiative_author.name} @#{initiative_author.nickname}." } it_behaves_like "a simple event email" it_behaves_like "a simple event notification" diff --git a/decidim-initiatives/spec/events/decidim/initiatives/endorse_initiative_event_spec.rb b/decidim-initiatives/spec/events/decidim/initiatives/endorse_initiative_event_spec.rb index 2026ad0f4b6a2..b2ef51d82a987 100644 --- a/decidim-initiatives/spec/events/decidim/initiatives/endorse_initiative_event_spec.rb +++ b/decidim-initiatives/spec/events/decidim/initiatives/endorse_initiative_event_spec.rb @@ -6,21 +6,24 @@ include Decidim::SanitizeHelper subject do - described_class.new(resource: initiative, event_name: event_name, user: user, extra: {}) + described_class.new(resource: resource, event_name: event_name, user: user, extra: {}) end - let(:organization) { initiative.organization } - let(:initiative) { create :initiative } - let(:initiative_author) { initiative.author } + include_context "when a simple event" + + include Decidim::TranslationsHelper + + let(:organization) { resource.organization } + let(:resource) { create :initiative } + let(:initiative_author) { resource.author } let(:event_name) { "decidim.events.initiatives.initiative_endorsed" } let(:user) { create :user, organization: organization } - let(:resource_path) { resource_locator(initiative).path } + let(:resource_path) { resource_locator(resource).path } let(:email_subject) { "Initiative endorsed by @#{initiative_author.nickname}" } let(:email_intro) { "#{initiative_author.name} @#{initiative_author.nickname}, who you are following, has endorsed the following initiative, maybe you want to contribute to the conversation:" } let(:email_outro) { "You have received this notification because you are following @#{initiative_author.nickname}. You can stop receiving notifications following the previous link." } - let(:intiative_title) { decidim_html_escape(translated(initiative.title)) } let(:notification_title) { <<-EOTITLE.squish } - The #{intiative_title} initiative was endorsed by + The #{resource_title} initiative was endorsed by #{initiative_author.name} @#{initiative_author.nickname}. EOTITLE diff --git a/decidim-initiatives/spec/events/decidim/initiatives/extend_initiative_event_spec.rb b/decidim-initiatives/spec/events/decidim/initiatives/extend_initiative_event_spec.rb index 676e35c1b561b..4181def77bde6 100644 --- a/decidim-initiatives/spec/events/decidim/initiatives/extend_initiative_event_spec.rb +++ b/decidim-initiatives/spec/events/decidim/initiatives/extend_initiative_event_spec.rb @@ -6,10 +6,8 @@ include_context "when a simple event" let(:event_name) { "decidim.events.initiatives.initiative_extended" } - let(:resource) { initiative } - - let(:initiative) { create :initiative } - let(:participatory_space) { initiative } + let(:resource) { create :initiative, title: generate_localized_title(:initiative_title) } + let(:participatory_space) { resource } it_behaves_like "a simple event" diff --git a/decidim-initiatives/spec/events/decidim/initiatives/initiative_sent_to_technical_validation_event_spec.rb b/decidim-initiatives/spec/events/decidim/initiatives/initiative_sent_to_technical_validation_event_spec.rb index 8c5ae5591e8c9..7fde6b199b114 100644 --- a/decidim-initiatives/spec/events/decidim/initiatives/initiative_sent_to_technical_validation_event_spec.rb +++ b/decidim-initiatives/spec/events/decidim/initiatives/initiative_sent_to_technical_validation_event_spec.rb @@ -3,16 +3,18 @@ require "spec_helper" describe Decidim::Initiatives::InitiativeSentToTechnicalValidationEvent do - let(:resource) { create :initiative } + include_context "when a simple event" + + let(:resource) { create :initiative, title: generate_localized_title(:initiative_title) } + let(:participatory_space) { resource } let(:event_name) { "decidim.events.initiatives.initiative_sent_to_technical_validation" } let(:admin_initiative_path) { "/admin/initiatives/#{resource.slug}/edit?initiative_slug=#{resource.slug}" } let(:admin_initiative_url) { "http://#{organization.host}#{admin_initiative_path}" } - let(:email_subject) { "Initiative \"#{decidim_sanitize(resource_title)}\" was sent to technical validation." } + let(:email_subject) { "Initiative \"#{resource_title}\" was sent to technical validation." } let(:email_outro) { "You have received this notification because you are an admin of the platform." } - let(:email_intro) { %(The initiative "#{decidim_html_escape(resource_title)}" has been sent to technical validation. Check it out at the admin panel) } - let(:notification_title) { %(The initiative "#{decidim_html_escape(resource_title)}" has been sent to technical validation. Check it out at the admin panel) } + let(:email_intro) { %(The initiative "#{resource_title}" has been sent to technical validation. Check it out at the admin panel) } + let(:notification_title) { %(The initiative "#{resource_title}" has been sent to technical validation. Check it out at the admin panel) } - include_context "when a simple event" it_behaves_like "a simple event" it_behaves_like "a simple event email" it_behaves_like "a simple event notification" diff --git a/decidim-initiatives/spec/events/decidim/initiatives/milestone_completed_event_spec.rb b/decidim-initiatives/spec/events/decidim/initiatives/milestone_completed_event_spec.rb index 13f8438e39934..3c4e5470508f0 100644 --- a/decidim-initiatives/spec/events/decidim/initiatives/milestone_completed_event_spec.rb +++ b/decidim-initiatives/spec/events/decidim/initiatives/milestone_completed_event_spec.rb @@ -6,11 +6,9 @@ include_context "when a simple event" let(:event_name) { "decidim.events.initiatives.milestone_completed" } - let(:resource) { initiative } - - let(:initiative) { create :initiative } + let(:resource) { create :initiative, title: generate_localized_title(:initiative_title) } let(:extra) { { percentage: 75 } } - let(:participatory_space) { initiative } + let(:participatory_space) { resource } it_behaves_like "a simple event" diff --git a/decidim-initiatives/spec/events/decidim/initiatives/revoke_membership_request_event_spec.rb b/decidim-initiatives/spec/events/decidim/initiatives/revoke_membership_request_event_spec.rb index f4903566abb1c..29f2e00b55240 100644 --- a/decidim-initiatives/spec/events/decidim/initiatives/revoke_membership_request_event_spec.rb +++ b/decidim-initiatives/spec/events/decidim/initiatives/revoke_membership_request_event_spec.rb @@ -3,25 +3,18 @@ require "spec_helper" describe Decidim::Initiatives::RevokeMembershipRequestEvent do - subject do - described_class.new( - resource: initiative, - event_name: event_name, - user: [membership_request.user], - user_role: :affected_user, - extra: { author: author } - ) - end + include_context "when a simple event" + let(:user_role) { :affected_user } + let(:extra) { { author: author } } let(:event_name) { "decidim.events.initiatives.approve_membership_request" } let(:organization) { create(:organization) } - let!(:initiative) { create(:initiative, :created, organization: organization) } - let(:author) { initiative.author } + let!(:resource) { create(:initiative, :created, organization: organization) } + let(:author) { resource.author } let(:author_profile_url) { Decidim::UserPresenter.new(author).profile_url } let(:author_nickname) { Decidim::UserPresenter.new(author).nickname } - let(:membership_request) { create(:initiatives_committee_member, initiative: initiative, state: "requested") } - let(:resource_url) { resource_locator(initiative).url } - let(:resource_title) { translated(initiative.title) } + let(:user) { create(:initiatives_committee_member, initiative: resource, state: "requested").user } + let(:resource_url) { resource_locator(resource).url } let(:email_subject) { "#{author_nickname} rejected your application to the promoter committee" } let(:email_intro) { "#{author_nickname} rejected your application to be part of the promoter committee for the following initiative #{resource_title}." } let(:email_outro) { "You received this notification because you applied to this initiative: #{resource_title}." } diff --git a/decidim-initiatives/spec/events/decidim/initiatives/spawn_committee_request_event_spec.rb b/decidim-initiatives/spec/events/decidim/initiatives/spawn_committee_request_event_spec.rb index 6a104a6f3291b..eaf0eb15227a0 100644 --- a/decidim-initiatives/spec/events/decidim/initiatives/spawn_committee_request_event_spec.rb +++ b/decidim-initiatives/spec/events/decidim/initiatives/spawn_committee_request_event_spec.rb @@ -3,24 +3,18 @@ require "spec_helper" describe Decidim::Initiatives::SpawnCommitteeRequestEvent do - subject do - described_class.new( - resource: initiative, - event_name: event_name, - user: [initiative.author], - user_role: :affected_user, - extra: { applicant: applicant } - ) - end + include_context "when a simple event" - let(:organization) { initiative.organization } - let(:initiative) { create :initiative } + let(:user_role) { :affected_user } + let(:extra) { { applicant: applicant } } + let(:user) { resource.author } + let(:organization) { resource.organization } + let(:resource) { create(:initiative) } let(:event_name) { "decidim.events.initiatives.initiative_created" } let(:applicant) { create :user, organization: organization } let(:applicant_profile_url) { Decidim::UserPresenter.new(applicant).profile_url } let(:applicant_nickname) { Decidim::UserPresenter.new(applicant).nickname } - let(:resource_url) { resource_locator(initiative).url } - let(:resource_title) { translated(initiative.title) } + let(:resource_url) { resource_locator(resource).url } let(:email_subject) { "#{applicant_nickname} wants to join your initiative" } let(:email_intro) { "#{applicant_nickname} applied for the promoter committee of your initiative #{resource_title}. To accept or reject the application, go to the edit form of your initiative." } let(:email_outro) { "You received this notification because you are the author of this initiative: #{resource_title}" } diff --git a/decidim-participatory_processes/spec/events/decidim/participatory_process_role_assigned_event_spec.rb b/decidim-participatory_processes/spec/events/decidim/participatory_process_role_assigned_event_spec.rb index 98019746c95b2..7de3122a8237d 100644 --- a/decidim-participatory_processes/spec/events/decidim/participatory_process_role_assigned_event_spec.rb +++ b/decidim-participatory_processes/spec/events/decidim/participatory_process_role_assigned_event_spec.rb @@ -6,6 +6,7 @@ include_context "when a simple event" let(:resource) { create :participatory_process } + let(:participatory_space) { resource } let(:event_name) { "decidim.events.participatory_process.role_assigned" } let(:role) { create(:participatory_process_user_role, user: user, participatory_process: resource, role: :admin) } let(:extra) { { role: role } } diff --git a/decidim-participatory_processes/spec/events/decidim/participatory_process_step_activated_event_spec.rb b/decidim-participatory_processes/spec/events/decidim/participatory_process_step_activated_event_spec.rb index 0418657f1f81f..2e584d3868314 100644 --- a/decidim-participatory_processes/spec/events/decidim/participatory_process_step_activated_event_spec.rb +++ b/decidim-participatory_processes/spec/events/decidim/participatory_process_step_activated_event_spec.rb @@ -23,7 +23,7 @@ ) end - let(:resource_title) { decidim_escape_translated(resource.title) } + let(:resource_title) { decidim_sanitize_translated(resource.title) } let(:email_subject) { "An update to #{decidim_sanitize_translated(participatory_space.title)}" } let(:email_intro) { "The #{resource_title} phase is now active for #{participatory_space_title}. You can see it from this page:" } let(:email_outro) { "You have received this notification because you are following #{participatory_space_title}. You can stop receiving notifications following the previous link." } diff --git a/decidim-participatory_processes/spec/events/decidim/participatory_process_step_changed_event_spec.rb b/decidim-participatory_processes/spec/events/decidim/participatory_process_step_changed_event_spec.rb index 9599e51ed8654..675019a6cf2e3 100644 --- a/decidim-participatory_processes/spec/events/decidim/participatory_process_step_changed_event_spec.rb +++ b/decidim-participatory_processes/spec/events/decidim/participatory_process_step_changed_event_spec.rb @@ -23,7 +23,6 @@ ) end - let(:resource_title) { decidim_escape_translated(resource.title) } let(:email_subject) { "An update to #{decidim_sanitize_translated(participatory_space.title)}" } let(:email_intro) { "The dates for the #{resource_title} phase at #{participatory_space_title} have been updated. You can see it from this page:" } let(:email_outro) { "You have received this notification because you are following #{participatory_space_title}. You can stop receiving notifications following the previous link." } diff --git a/decidim-proposals/spec/events/decidim/proposals/admin/update_proposal_category_event_spec.rb b/decidim-proposals/spec/events/decidim/proposals/admin/update_proposal_category_event_spec.rb index 9a6d73ea84226..e838f64bcacac 100644 --- a/decidim-proposals/spec/events/decidim/proposals/admin/update_proposal_category_event_spec.rb +++ b/decidim-proposals/spec/events/decidim/proposals/admin/update_proposal_category_event_spec.rb @@ -6,9 +6,9 @@ let(:resource) { create :proposal, title: "It's my super proposal" } let(:event_name) { "decidim.events.proposals.proposal_update_category" } let(:email_subject) { "The #{translated(resource.title)} proposal category has been updated" } - let(:email_intro) { "An admin has updated the category of your proposal \"#{decidim_html_escape(translated(resource.title))}\", check it out in this page:" } + let(:email_intro) { "An admin has updated the category of your proposal \"#{resource_title}\", check it out in this page:" } let(:email_outro) { "You have received this notification because you are the author of the proposal." } - let(:notification_title) { "The #{decidim_html_escape(translated(resource.title))} proposal category has been updated by an admin." } + let(:notification_title) { "The #{resource_title} proposal category has been updated by an admin." } include_context "when a simple event" it_behaves_like "a simple event" diff --git a/decidim-proposals/spec/events/decidim/proposals/admin/update_proposal_scope_event_spec.rb b/decidim-proposals/spec/events/decidim/proposals/admin/update_proposal_scope_event_spec.rb index 82b6750c7a793..537b1a28cff83 100644 --- a/decidim-proposals/spec/events/decidim/proposals/admin/update_proposal_scope_event_spec.rb +++ b/decidim-proposals/spec/events/decidim/proposals/admin/update_proposal_scope_event_spec.rb @@ -4,12 +4,11 @@ describe Decidim::Proposals::Admin::UpdateProposalScopeEvent do let(:resource) { create :proposal, title: "It's my super proposal" } - let(:resource_title) { translated(resource.title) } let(:event_name) { "decidim.events.proposals.proposal_update_scope" } - let(:email_subject) { "The #{decidim_sanitize(resource_title)} proposal scope has been updated" } - let(:email_intro) { "An admin has updated the scope of your proposal \"#{decidim_html_escape(resource_title)}\", check it out in this page:" } + let(:email_subject) { "The #{resource_title} proposal scope has been updated" } + let(:email_intro) { "An admin has updated the scope of your proposal \"#{resource_title}\", check it out in this page:" } let(:email_outro) { "You have received this notification because you are the author of the proposal." } - let(:notification_title) { "The #{decidim_html_escape(resource_title)} proposal scope has been updated by an admin." } + let(:notification_title) { "The #{resource_title} proposal scope has been updated by an admin." } include_context "when a simple event" it_behaves_like "a simple event" diff --git a/decidim-proposals/spec/events/decidim/proposals/collaborative_draft_access_accepted_event_spec.rb b/decidim-proposals/spec/events/decidim/proposals/collaborative_draft_access_accepted_event_spec.rb index 1cc2e492aa27a..4943631c0caa1 100644 --- a/decidim-proposals/spec/events/decidim/proposals/collaborative_draft_access_accepted_event_spec.rb +++ b/decidim-proposals/spec/events/decidim/proposals/collaborative_draft_access_accepted_event_spec.rb @@ -25,9 +25,9 @@ context "when the notification is for coauthor users" do let(:email_subject) { "#{requester_name} has been accepted to access as a contributor of the #{resource_title}." } - let(:email_intro) { %(#{requester_name} has been accepted to access as a contributor of the #{decidim_html_escape(resource_title)} collaborative draft.) } - let(:email_outro) { %(You have received this notification because you are a collaborator of #{decidim_html_escape(resource_title)}.) } - let(:notification_title) { %(#{requester_name} #{requester_nickname} has been accepted to access as a contributor of the #{decidim_html_escape(resource_title)} collaborative draft.) } + let(:email_intro) { %(#{requester_name} has been accepted to access as a contributor of the #{resource_title} collaborative draft.) } + let(:email_outro) { %(You have received this notification because you are a collaborator of #{resource_title}.) } + let(:notification_title) { %(#{requester_name} #{requester_nickname} has been accepted to access as a contributor of the #{resource_title} collaborative draft.) } it_behaves_like "a simple event" it_behaves_like "a simple event email" @@ -37,9 +37,9 @@ context "when the notification is for the requester" do let(:event_name) { "decidim.events.proposals.collaborative_draft_access_requester_accepted" } let(:email_subject) { "You have been accepted as a contributor of #{resource_title}." } - let(:email_intro) { %(You have been accepted to access as a contributor of the #{decidim_html_escape(resource_title)} collaborative draft.) } - let(:email_outro) { %(You have received this notification because you requested to become a collaborator of #{decidim_html_escape(resource_title)}.) } - let(:notification_title) { %(You have been accepted to access as a contributor of the #{decidim_html_escape(resource_title)} collaborative draft.) } + let(:email_intro) { %(You have been accepted to access as a contributor of the #{resource_title} collaborative draft.) } + let(:email_outro) { %(You have received this notification because you requested to become a collaborator of #{resource_title}.) } + let(:notification_title) { %(You have been accepted to access as a contributor of the #{resource_title} collaborative draft.) } it_behaves_like "a simple event" it_behaves_like "a simple event email" diff --git a/decidim-proposals/spec/events/decidim/proposals/collaborative_draft_access_rejected_event_spec.rb b/decidim-proposals/spec/events/decidim/proposals/collaborative_draft_access_rejected_event_spec.rb index 3eaed1d779adb..7675c432b29f7 100644 --- a/decidim-proposals/spec/events/decidim/proposals/collaborative_draft_access_rejected_event_spec.rb +++ b/decidim-proposals/spec/events/decidim/proposals/collaborative_draft_access_rejected_event_spec.rb @@ -8,7 +8,6 @@ let(:event_name) { "decidim.events.proposals.collaborative_draft_access_rejected" } let(:resource) { create :collaborative_draft, title: "It's my collaborative draft" } let(:resource_path) { Decidim::ResourceLocatorPresenter.new(resource).path } - let(:resource_title) { decidim_html_escape(resource.title) } let(:author) { resource.authors.first } let(:author_id) { author.id } let(:author_presenter) { Decidim::UserPresenter.new(author) } @@ -24,7 +23,7 @@ let(:extra) { { requester_id: requester_id } } context "when the notification is for coauthor users" do - let(:email_subject) { "#{requester_name} has been rejected to access as a contributor of the #{translated(resource.title)} collaborative draft." } + let(:email_subject) { "#{requester_name} has been rejected to access as a contributor of the #{resource_title} collaborative draft." } let(:email_intro) { %(#{requester_name} has been rejected to access as a contributor of the #{resource_title} collaborative draft.) } let(:email_outro) { %(You have received this notification because you are a collaborator of #{resource_title}.) } let(:notification_title) { %(#{requester_name} #{requester_nickname} has been rejected to access as a contributor of the #{resource_title} collaborative draft.) } @@ -36,7 +35,7 @@ context "when the notification is for the requester" do let(:event_name) { "decidim.events.proposals.collaborative_draft_access_requester_rejected" } - let(:email_subject) { "You have been rejected as a contributor of #{translated(resource.title)}." } + let(:email_subject) { "You have been rejected as a contributor of #{resource_title}." } let(:email_intro) { %(You have been rejected to access as a contributor of the #{resource_title} collaborative draft.) } let(:email_outro) { %(You have received this notification because you requested to become a collaborator of #{resource_title}.) } let(:notification_title) { %(You have been rejected to access as a contributor of the #{resource_title} collaborative draft.) } diff --git a/decidim-proposals/spec/events/decidim/proposals/collaborative_draft_access_requested_event_spec.rb b/decidim-proposals/spec/events/decidim/proposals/collaborative_draft_access_requested_event_spec.rb index 2227a8c374733..5df055667eb1b 100644 --- a/decidim-proposals/spec/events/decidim/proposals/collaborative_draft_access_requested_event_spec.rb +++ b/decidim-proposals/spec/events/decidim/proposals/collaborative_draft_access_requested_event_spec.rb @@ -24,9 +24,9 @@ let(:extra) { { requester_id: requester_id } } context "when the notification is for coauthor users" do - let(:notification_title) { %(#{requester_name} #{requester_nickname} requested access to contribute to the #{decidim_html_escape(resource_title)} collaborative draft. Please accept or reject the request.) } - let(:email_outro) { %(You have received this notification because you are a collaborator of #{decidim_html_escape(resource_title)}.) } - let(:email_intro) { %(#{requester_name} requested access as a contributor. You can accept or reject the request from the #{decidim_html_escape(resource_title)} collaborative draft page.) } + let(:notification_title) { %(#{requester_name} #{requester_nickname} requested access to contribute to the #{resource_title} collaborative draft. Please accept or reject the request.) } + let(:email_outro) { %(You have received this notification because you are a collaborator of #{resource_title}.) } + let(:email_intro) { %(#{requester_name} requested access as a contributor. You can accept or reject the request from the #{resource_title} collaborative draft page.) } let(:email_subject) { "#{requester_name} requested access to contribute to #{resource_title}." } it_behaves_like "a simple event" diff --git a/decidim-proposals/spec/events/decidim/proposals/collaborative_draft_withdrawn_event_spec.rb b/decidim-proposals/spec/events/decidim/proposals/collaborative_draft_withdrawn_event_spec.rb index 5cf781a1442df..6af8648531822 100644 --- a/decidim-proposals/spec/events/decidim/proposals/collaborative_draft_withdrawn_event_spec.rb +++ b/decidim-proposals/spec/events/decidim/proposals/collaborative_draft_withdrawn_event_spec.rb @@ -8,7 +8,6 @@ let(:event_name) { "decidim.events.proposals.collaborative_draft_withdrawn" } let(:resource) { create :collaborative_draft, title: "It's my collaborative draft" } let(:resource_path) { Decidim::ResourceLocatorPresenter.new(resource).path } - let(:resource_title) { decidim_html_escape(resource.title) } let(:author) { resource.authors.first } let(:author_id) { author.id } let(:author_presenter) { Decidim::UserPresenter.new(author) } @@ -22,7 +21,7 @@ let(:notification_title) { %(#{author_name} #{author_nickname} withdrawn the #{resource_title} collaborative draft.) } let(:email_outro) { %(You have received this notification because you are a collaborator of #{resource_title}.) } let(:email_intro) { %(#{author_name} #{author_nickname} withdrawn the #{resource_title} collaborative draft.) } - let(:email_subject) { "#{author_name} #{author_nickname} withdrawn the #{decidim_sanitize(resource_title)} collaborative draft." } + let(:email_subject) { "#{author_name} #{author_nickname} withdrawn the #{resource_title} collaborative draft." } it_behaves_like "a simple event" it_behaves_like "a simple event email" diff --git a/decidim-proposals/spec/events/decidim/proposals/proposal_mentioned_event_spec.rb b/decidim-proposals/spec/events/decidim/proposals/proposal_mentioned_event_spec.rb index 956b682ea2f40..21742a006be1e 100644 --- a/decidim-proposals/spec/events/decidim/proposals/proposal_mentioned_event_spec.rb +++ b/decidim-proposals/spec/events/decidim/proposals/proposal_mentioned_event_spec.rb @@ -34,13 +34,13 @@ describe "email_subject" do it "is generated correctly" do - expect(subject.email_subject).to eq("Your proposal \"#{decidim_sanitize(translated(mentioned_proposal.title))}\" has been mentioned") + expect(subject.email_subject).to eq("Your proposal \"#{decidim_sanitize_translated(mentioned_proposal.title)}\" has been mentioned") end end context "with content" do let(:content) do - "Your proposal \"#{decidim_html_escape(translated(mentioned_proposal.title))}\" has been mentioned " \ + "Your proposal \"#{decidim_sanitize_translated(mentioned_proposal.title)}\" has been mentioned " \ "in this space in the comments." end diff --git a/decidim-proposals/spec/events/decidim/proposals/rejected_proposal_event_spec.rb b/decidim-proposals/spec/events/decidim/proposals/rejected_proposal_event_spec.rb index 38628bdb0e41b..587fa50efe3e6 100644 --- a/decidim-proposals/spec/events/decidim/proposals/rejected_proposal_event_spec.rb +++ b/decidim-proposals/spec/events/decidim/proposals/rejected_proposal_event_spec.rb @@ -7,9 +7,9 @@ let(:resource_title) { translated(resource.title) } let(:event_name) { "decidim.events.proposals.proposal_rejected" } let(:email_subject) { "A proposal you're following has been rejected" } - let(:email_intro) { "The proposal \"#{decidim_html_escape(resource_title)}\" has been rejected. You can read the answer in this page:" } - let(:email_outro) { "You have received this notification because you are following \"#{decidim_html_escape(resource_title)}\". You can unfollow it from the previous link." } - let(:notification_title) { "The #{decidim_html_escape(resource_title)} proposal has been rejected." } + let(:email_intro) { "The proposal \"#{resource_title}\" has been rejected. You can read the answer in this page:" } + let(:email_outro) { "You have received this notification because you are following \"#{resource_title}\". You can unfollow it from the previous link." } + let(:notification_title) { "The #{resource_title} proposal has been rejected." } let(:resource_text) { translated(resource.answer) } include_context "when a simple event" From 26d73e330712a65fd2c750774f78c06b3700544f Mon Sep 17 00:00:00 2001 From: Alexandru Emil Lupu Date: Tue, 16 Apr 2024 12:35:40 +0300 Subject: [PATCH 12/88] Backport 'Patch components and spaces factories' to v0.27 (#12547) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Patch all project factories * Fix specs * patch space factories * Fix specs * Fix specs in assemblies * Fix specs * Fix more specs * Fix specs * Fix specs * Fix specs * Fix specs * Fix factories * Fix conference specs * Fix initiative suite * Fix suite, fix linters * Fix some meetings specs * Fix more meeting specs * Fiximh more specs in meetings and proposals * Fix meetings suite * Fix spec * Apply suggestions from code review Co-authored-by: Andrés Pereira de Lucena * Patch participatory spaces factories * Patch ParticipatoryProcess factories * Use correct factories * Fix decidim participatory process output * Fix more specs * Fix more specs * Last spec? * Apply suggestions from code review Co-authored-by: Andrés Pereira de Lucena --------- Co-authored-by: Andrés Pereira de Lucena * Patch events on the new format * Patch events on the new format * Some refactor * Fix more specs * Fix specs * Running linters * Patch the specs * RUnning linters * Fix admin spec * Fixing more specs * patch test * Apply review recommendations * Fix failing specs * Fix failing specs on conferences * Update decidim-core/spec/lib/events/simple_event_spec.rb Co-authored-by: Andrés Pereira de Lucena --------- Co-authored-by: Andrés Pereira de Lucena * Remove wrong sanitize_helper location * Fix specs * Fix specs * Fix more specs * Fix more specs * Fix specs * Fix lint errors * Fix specs * Fix spec * Fix more specs * Fix specs * Fix specs * Fix specs * Fix specs * Revert some changes * Fix initiatives spec * Running linters * Fix failing spec * Apply suggestions from code review Co-authored-by: Andrés Pereira de Lucena * Apply suggestions from code review Co-authored-by: Andrés Pereira de Lucena * Fix failing specs * Fix specs * Patch factories * Fix specs * Apply suggestions from code review Co-authored-by: Andrés Pereira de Lucena * Apply suggestions from code review Co-authored-by: Andrés Pereira de Lucena * Apply review recommendations * Revert * Apply suggestions from code review Co-authored-by: Andrés Pereira de Lucena * Apply review * Apply suggestions from code review Co-authored-by: Andrés Pereira de Lucena * Revert * Lint * Fix spec * Apply review recommendation * Fix spec --------- Co-authored-by: Andrés Pereira de Lucena --- .../results/_home_header.html.erb | 2 +- .../results/_show_leaf.html.erb | 2 +- .../accountability/results/_timeline.html.erb | 2 +- .../participatory_spaces/_result.html.erb | 4 +- .../decidim/accountability/test/factories.rb | 46 +- .../proposal_linked_event_spec.rb | 2 +- .../result_progress_updated_event_spec.rb | 2 +- .../spec/system/explore_results_spec.rb | 4 +- .../spec/types/integration_schema_spec.rb | 2 +- .../admin/resource_permissions/edit.html.erb | 4 +- .../moderations/reports_helper_spec.rb | 3 +- .../decidim/assemblies/assembly_m_cell.rb | 2 +- .../highlighted_assemblies/show.erb | 2 +- .../decidim/assemblies/assemblies_helper.rb | 2 +- .../lib/decidim/assemblies/test/factories.rb | 70 ++- .../spec/requests/assembly_search_spec.rb | 16 +- .../lib/decidim/blogs/test/factories.rb | 27 +- .../decidim/blogs/create_post_event_spec.rb | 5 +- .../spec/types/integration_schema_spec.rb | 2 +- .../app/cells/decidim/budgets/base_cell.rb | 2 +- .../decidim/budgets/budget_list_item/show.erb | 2 +- .../decidim/budgets/budgets_list/voted.erb | 2 +- .../decidim/budgets/project_list_item_cell.rb | 2 +- .../budgets/admin/projects/edit.html.erb | 2 +- .../budgets/admin/projects/index.html.erb | 2 +- .../budgets/admin/projects/new.html.erb | 2 +- .../lib/decidim/budgets/test/factories.rb | 43 +- .../spec/requests/project_search_spec.rb | 28 +- decidim-budgets/spec/system/comments_spec.rb | 6 +- .../explore_budget_notifications_spec.rb | 2 +- decidim-budgets/spec/system/orders_spec.rb | 4 +- .../spec/types/integration_schema_spec.rb | 2 +- .../lib/decidim/comments/test/factories.rb | 21 +- .../test/shared_examples/comment_event.rb | 2 +- .../shared_examples/comment_voted_event.rb | 2 +- .../comments/comment_downvoted_event_spec.rb | 3 +- .../comments/comment_upvoted_event_spec.rb | 3 +- .../comments/reply_created_event_spec.rb | 4 +- .../user_group_mentioned_event_spec.rb | 6 +- .../comments/user_mentioned_event_spec.rb | 6 +- .../conferences/conference_address/show.erb | 4 +- .../decidim/conferences/conference_m_cell.rb | 4 - .../conferences/conference_speaker_cell.rb | 2 +- .../highlighted_conferences/show.erb | 2 +- .../_program_meeting.html.erb | 2 +- .../lib/decidim/conferences/test/factories.rb | 99 ++-- .../spec/commands/join_conference_spec.rb | 2 +- .../searchable_conferences_resource_spec.rb | 2 +- .../spec/system/conference_program_spec.rb | 2 +- .../app/cells/decidim/activity_cell.rb | 4 +- decidim-core/app/cells/decidim/card_cell.rb | 4 +- decidim-core/app/cells/decidim/card_m_cell.rb | 2 +- .../app/cells/decidim/user_profile_cell.rb | 2 +- .../decidim/shared/_address_details.html.erb | 4 +- .../lib/decidim/core/test/factories.rb | 15 +- .../searchable_results_examples.rb | 2 +- decidim-core/lib/decidim/events/base_event.rb | 7 +- .../lib/decidim/events/simple_event.rb | 13 - .../spec/lib/events/simple_event_spec.rb | 2 +- .../spec/mailers/reported_mailer_spec.rb | 2 +- .../decidim/open_data_exporter_spec.rb | 6 +- .../spec/system/notifications_spec.rb | 2 +- .../lib/decidim/debates/test/factories.rb | 31 +- decidim-debates/spec/system/show_spec.rb | 6 +- .../spec/types/integration_schema_spec.rb | 2 +- decidim-dev/lib/decidim/dev/test/factories.rb | 2 +- .../test/rspec_support/translation_helpers.rb | 2 +- .../decidim/forms/question_readonly/show.erb | 2 +- .../lib/decidim/forms/test/factories.rb | 82 +-- .../test/shared_examples/has_questionnaire.rb | 4 +- .../highlighted_initiatives/show.erb | 4 +- .../decidim/initiatives/application_helper.rb | 2 +- .../select_initiative_type.html.erb | 2 +- .../initiatives/initiatives/_tags.html.erb | 6 +- .../lib/decidim/initiatives/test/factories.rb | 79 ++- .../initiatives_votes/vote_cell_spec.rb | 2 +- .../endorse_initiative_event_spec.rb | 2 +- .../initiatives/initiatives_mailer_spec.rb | 10 +- .../spec/requests/initiative_search_spec.rb | 510 +++++++++--------- .../meetings/admin/agenda/_form.html.erb | 2 +- .../meetings/layouts/live_event.html.erb | 2 +- .../meetings/_meeting_agenda.html.erb | 4 +- .../lib/decidim/meetings/test/factories.rb | 98 ++-- ...meeting_highlighted_list_item_cell_spec.rb | 9 +- .../meetings/meeting_list_item_cell_spec.rb | 9 +- .../decidim/meetings/meeting_m_cell_spec.rb | 10 +- .../requests/meeting_directory_search_spec.rb | 70 +-- .../spec/requests/meeting_search_spec.rb | 68 +-- .../calendar/component_calendar_spec.rb | 15 +- .../calendar/meeting_calendar_spec.rb | 5 +- .../calendar/organization_calendar_spec.rb | 12 +- .../spec/system/explore_meetings_spec.rb | 8 +- .../spec/system/meeting_registrations_spec.rb | 10 +- ...participatory_processes_view_hooks_spec.rb | 10 +- .../spec/types/integration_schema_spec.rb | 2 +- ...patory_process_role_assigned_event_spec.rb | 2 +- .../proposals/admin/proposals/_form.html.erb | 2 +- .../proposals/admin/proposals/show.html.erb | 2 +- .../lib/decidim/proposals/test/factories.rb | 119 ++-- .../update_proposal_category_event_spec.rb | 2 +- .../admin/update_proposal_scope_event_spec.rb | 2 +- ...rative_draft_access_accepted_event_spec.rb | 2 +- ...rative_draft_access_rejected_event_spec.rb | 2 +- ...ative_draft_access_requested_event_spec.rb | 2 +- ...ollaborative_draft_withdrawn_event_spec.rb | 2 +- .../proposals/creation_enabled_event_spec.rb | 3 +- .../proposals/endorsing_enabled_event_spec.rb | 2 +- .../proposals/publish_proposal_event_spec.rb | 17 +- .../proposals/rejected_proposal_event_spec.rb | 1 - .../proposals/voting_enabled_event_spec.rb | 2 +- .../spec/system/collaborative_drafts_spec.rb | 2 +- .../spec/system/proposals_spec.rb | 2 +- .../lib/decidim/sortitions/test/factories.rb | 26 +- .../spec/requests/sortition_search_spec.rb | 50 +- .../spec/types/integration_schema_spec.rb | 2 +- .../lib/decidim/surveys/test/factories.rb | 14 +- .../surveys/closed_survey_event_spec.rb | 7 +- .../surveys/opened_survey_event_spec.rb | 7 +- .../spec/types/integration_schema_spec.rb | 2 +- .../lib/decidim/templates/test/factories.rb | 23 +- .../uses_questionnaire_templates.rb | 4 +- .../decidim/verifications/test/factories.rb | 10 +- 122 files changed, 1047 insertions(+), 875 deletions(-) diff --git a/decidim-accountability/app/views/decidim/accountability/results/_home_header.html.erb b/decidim-accountability/app/views/decidim/accountability/results/_home_header.html.erb index a72a9e8a266b4..5a1eff4c59e81 100644 --- a/decidim-accountability/app/views/decidim/accountability/results/_home_header.html.erb +++ b/decidim-accountability/app/views/decidim/accountability/results/_home_header.html.erb @@ -1,7 +1,7 @@
- <%== translated_attribute component_settings.intro %> + <%= decidim_sanitize_admin translated_attribute(component_settings.intro) %>
<% if component_settings.display_progress_enabled? && progress_calculator(current_scope, nil).present? %> diff --git a/decidim-accountability/app/views/decidim/accountability/results/_show_leaf.html.erb b/decidim-accountability/app/views/decidim/accountability/results/_show_leaf.html.erb index e66e8f7c03085..dc28c8abde247 100644 --- a/decidim-accountability/app/views/decidim/accountability/results/_show_leaf.html.erb +++ b/decidim-accountability/app/views/decidim/accountability/results/_show_leaf.html.erb @@ -62,7 +62,7 @@
- <%== translated_attribute result.description %> + <%= decidim_sanitize_admin(translated_attribute(result.description)) %> <%= cell "decidim/tags", result, context: { extra_classes: ["tags--result"] } %>
diff --git a/decidim-accountability/app/views/decidim/accountability/results/_timeline.html.erb b/decidim-accountability/app/views/decidim/accountability/results/_timeline.html.erb index bb45078f2aeb9..b15cd9b82cfb5 100644 --- a/decidim-accountability/app/views/decidim/accountability/results/_timeline.html.erb +++ b/decidim-accountability/app/views/decidim/accountability/results/_timeline.html.erb @@ -18,7 +18,7 @@ <% if translated_attribute(timeline_entry.description).present? %>
- <%== translated_attribute timeline_entry.description %> + <%= decidim_escape_translated(timeline_entry.description) %>
<% end %>
diff --git a/decidim-accountability/app/views/decidim/participatory_spaces/_result.html.erb b/decidim-accountability/app/views/decidim/participatory_spaces/_result.html.erb index 3a4aea23b83f2..aace393c46cd6 100644 --- a/decidim-accountability/app/views/decidim/participatory_spaces/_result.html.erb +++ b/decidim-accountability/app/views/decidim/participatory_spaces/_result.html.erb @@ -3,7 +3,7 @@ <%= link_to resource_locator(result).path, class: "card--list__text card__link card__link--block" do %>

- <%= translated_attribute(result.title) %> + <%= decidim_escape_translated(result.title) %>

@@ -19,7 +19,7 @@ <% if result.status %> <%= t("models.result.fields.status", scope: "decidim.accountability") %> - <%= translated_attribute(result.status.name) %> + <%= decidim_escape_translated(result.status.name) %> <% end %>
<% end %> diff --git a/decidim-accountability/lib/decidim/accountability/test/factories.rb b/decidim-accountability/lib/decidim/accountability/test/factories.rb index 3afc298e19fe6..5adb0642394ee 100644 --- a/decidim-accountability/lib/decidim/accountability/test/factories.rb +++ b/decidim-accountability/lib/decidim/accountability/test/factories.rb @@ -8,16 +8,19 @@ FactoryBot.define do factory :accountability_component, parent: :component do - name { Decidim::Components::Namer.new(participatory_space.organization.available_locales, :accountability).i18n_name } + transient do + skip_injection { false } + end + name { generate_component_name(participatory_space.organization.available_locales, :accountability, skip_injection: skip_injection) } manifest_name { :accountability } - participatory_space { create(:participatory_process, :with_steps, organization: organization) } + participatory_space { create(:participatory_process, :with_steps, organization: organization, skip_injection: skip_injection) } settings do { - intro: Decidim::Faker::Localized.wrapped("

", "

") { generate_localized_title }, - categories_label: Decidim::Faker::Localized.word, - subcategories_label: Decidim::Faker::Localized.word, - heading_parent_level_results: Decidim::Faker::Localized.word, - heading_leaf_level_results: Decidim::Faker::Localized.word, + intro: generate_localized_description(:accountability_component_intro, skip_injection: skip_injection), + categories_label: generate_localized_word(:accountability_component_categories_label, skip_injection: skip_injection), + subcategories_label: generate_localized_word(:accountability_component_subcategories_label, skip_injection: skip_injection), + heading_parent_level_results: generate_localized_word(:accountability_component_heading_parent_level_results, skip_injection: skip_injection), + heading_leaf_level_results: generate_localized_word(:accountability_component_heading_leaf_level_results, skip_injection: skip_injection), scopes_enabled: true, scope_id: participatory_space.scope&.id } @@ -25,27 +28,36 @@ end factory :status, class: "Decidim::Accountability::Status" do - component { create(:accountability_component) } + transient do + skip_injection { false } + end + component { create(:accountability_component, skip_injection: skip_injection) } sequence(:key) { |n| "status_#{n}" } - name { Decidim::Faker::Localized.word } - description { generate_localized_title } + name { generate_localized_word(:status_name, skip_injection: skip_injection) } + description { generate_localized_word(:status_description, skip_injection: skip_injection) } progress { rand(1..100) } end factory :result, class: "Decidim::Accountability::Result" do - component { create(:accountability_component) } - title { generate_localized_title } - description { Decidim::Faker::Localized.wrapped("

", "

") { generate_localized_title } } + transient do + skip_injection { false } + end + component { create(:accountability_component, skip_injection: skip_injection) } + title { generate_localized_title(:result_title, skip_injection: skip_injection) } + description { generate_localized_description(:result_description, skip_injection: skip_injection) } start_date { "12/7/2017" } end_date { "30/9/2017" } - status { create :status, component: component } + status { create :status, component: component, skip_injection: skip_injection } progress { rand(1..100) } end factory :timeline_entry, class: "Decidim::Accountability::TimelineEntry" do - result { create(:result) } + transient do + skip_injection { false } + end + result { create(:result, skip_injection: skip_injection) } entry_date { "12/7/2017" } - title { generate_localized_title } - description { generate_localized_title } + title { generate_localized_title(:timeline_entry_title, skip_injection: skip_injection) } + description { generate_localized_title(:timeline_entry_description, skip_injection: skip_injection) } end end diff --git a/decidim-accountability/spec/events/decidim/accountability/proposal_linked_event_spec.rb b/decidim-accountability/spec/events/decidim/accountability/proposal_linked_event_spec.rb index 16c52d8baaba8..3c6442d75b0ac 100644 --- a/decidim-accountability/spec/events/decidim/accountability/proposal_linked_event_spec.rb +++ b/decidim-accountability/spec/events/decidim/accountability/proposal_linked_event_spec.rb @@ -10,7 +10,7 @@ let(:proposal_component) do create(:component, manifest_name: "proposals", participatory_space: resource.component.participatory_space) end - let(:proposal) { create(:proposal, component: proposal_component, title: generate_localized_title(:proposal_title)) } + let(:proposal) { create :proposal, component: proposal_component } let(:extra) { { proposal_id: proposal.id } } let(:proposal_path) { resource_locator(proposal).path } let(:proposal_title) { decidim_sanitize_translated(proposal.title) } diff --git a/decidim-accountability/spec/events/decidim/accountability/result_progress_updated_event_spec.rb b/decidim-accountability/spec/events/decidim/accountability/result_progress_updated_event_spec.rb index 17fe1d937aba1..ad3ce8a1bc502 100644 --- a/decidim-accountability/spec/events/decidim/accountability/result_progress_updated_event_spec.rb +++ b/decidim-accountability/spec/events/decidim/accountability/result_progress_updated_event_spec.rb @@ -10,7 +10,7 @@ let(:proposal_component) do create(:component, manifest_name: "proposals", participatory_space: resource.component.participatory_space) end - let(:proposal) { create(:proposal, component: proposal_component, title: generate_localized_title(:proposal_title)) } + let(:proposal) { create :proposal, component: proposal_component } let(:extra) { { proposal_id: proposal.id, progress: 95 } } let(:proposal_path) { resource_locator(proposal).path } let(:proposal_title) { decidim_sanitize_translated(proposal.title) } diff --git a/decidim-accountability/spec/system/explore_results_spec.rb b/decidim-accountability/spec/system/explore_results_spec.rb index 193a41ca4ed83..8901f773afebb 100644 --- a/decidim-accountability/spec/system/explore_results_spec.rb +++ b/decidim-accountability/spec/system/explore_results_spec.rb @@ -175,7 +175,7 @@ it "shows all result info" do expect(page).to have_i18n_content(result.title) - expect(page).to have_i18n_content(result.description) + expect(page).to have_i18n_content(result.description, strip_tags: true) expect(page).to have_content(result.reference) expect(page).to have_content("#{result.progress.to_i}%") end @@ -321,7 +321,7 @@ it "shows related meetings" do meetings.each do |meeting| expect(page).to have_i18n_content(meeting.title) - expect(page).to have_i18n_content(meeting.description) + expect(page).to have_content(i18n_content(meeting.description, strip_tags: true).strip) end end diff --git a/decidim-accountability/spec/types/integration_schema_spec.rb b/decidim-accountability/spec/types/integration_schema_spec.rb index eb3bb95a8947e..67473f33697b5 100644 --- a/decidim-accountability/spec/types/integration_schema_spec.rb +++ b/decidim-accountability/spec/types/integration_schema_spec.rb @@ -71,7 +71,7 @@ { "__typename" => "Accountability", "id" => current_component.id.to_s, - "name" => { "translation" => "Accountability" }, + "name" => { "translation" => translated(current_component.name) }, "results" => { "edges" => [ { diff --git a/decidim-admin/app/views/decidim/admin/resource_permissions/edit.html.erb b/decidim-admin/app/views/decidim/admin/resource_permissions/edit.html.erb index e519e86152201..40053a15f6900 100644 --- a/decidim-admin/app/views/decidim/admin/resource_permissions/edit.html.erb +++ b/decidim-admin/app/views/decidim/admin/resource_permissions/edit.html.erb @@ -6,9 +6,9 @@ <% if resource %> - <% if resource.is_a?(Decidim::Resourceable) %> - <%= link_to(resource_title(resource), resource_locator(resource).path) %> + <%= link_to(decidim_escape_translated(resource.title).html_safe, resource_locator(resource).path) %> <% else %> - <%= strip_tags resource_title(resource) %> + <%= decidim_escape_translated(resource.title).html_safe %> <% end %> <% end %> diff --git a/decidim-admin/spec/helpers/moderations/reports_helper_spec.rb b/decidim-admin/spec/helpers/moderations/reports_helper_spec.rb index ca79a347d20d8..467ee04fcdd21 100644 --- a/decidim-admin/spec/helpers/moderations/reports_helper_spec.rb +++ b/decidim-admin/spec/helpers/moderations/reports_helper_spec.rb @@ -42,8 +42,9 @@ module Moderations let(:reportable) { proposal } it "returns the meeting's title" do + meeting_title = ActionView::Base.full_sanitizer.sanitize(translated_attribute(reportable.authors.first.title)) expect(helper.reportable_author_name(reportable)).to include("reportable-authors") - expect(helper.reportable_author_name(reportable)).to include(translated_attribute(reportable.authors.first.title)) + expect(helper.reportable_author_name(reportable)).to include(meeting_title) end end end diff --git a/decidim-assemblies/app/cells/decidim/assemblies/assembly_m_cell.rb b/decidim-assemblies/app/cells/decidim/assemblies/assembly_m_cell.rb index d2e2c0def4e10..c45141df49e82 100644 --- a/decidim-assemblies/app/cells/decidim/assemblies/assembly_m_cell.rb +++ b/decidim-assemblies/app/cells/decidim/assemblies/assembly_m_cell.rb @@ -70,7 +70,7 @@ def has_assembly_type? end def assembly_type - translated_attribute model.assembly_type.title + decidim_sanitize_translated model.assembly_type.title end end end diff --git a/decidim-assemblies/app/cells/decidim/assemblies/content_blocks/highlighted_assemblies/show.erb b/decidim-assemblies/app/cells/decidim/assemblies/content_blocks/highlighted_assemblies/show.erb index 5a9c581055cf4..325cc383bc7a6 100644 --- a/decidim-assemblies/app/cells/decidim/assemblies/content_blocks/highlighted_assemblies/show.erb +++ b/decidim-assemblies/app/cells/decidim/assemblies/content_blocks/highlighted_assemblies/show.erb @@ -10,7 +10,7 @@
- <%= translated_attribute assembly.title %> + <%= decidim_escape_translated assembly.title %>
<% end %>
diff --git a/decidim-assemblies/app/helpers/decidim/assemblies/assemblies_helper.rb b/decidim-assemblies/app/helpers/decidim/assemblies/assemblies_helper.rb index f6a80ef06a139..ba05771552f7a 100644 --- a/decidim-assemblies/app/helpers/decidim/assemblies/assemblies_helper.rb +++ b/decidim-assemblies/app/helpers/decidim/assemblies/assemblies_helper.rb @@ -31,7 +31,7 @@ def participatory_processes_for_assembly(assembly_participatory_processes) def assembly_features(assembly) html = "".html_safe - html += "#{translated_attribute(assembly.title)}: ".html_safe + html += "#{decidim_escape_translated(assembly.title)}: ".html_safe html += t("assemblies.show.private_space", scope: "decidim").to_s.html_safe html += ", #{t("assemblies.show.is_transparent.#{assembly.is_transparent}", scope: "decidim")}".html_safe if assembly.is_transparent? html += " #{decidim_sanitize_editor translated_attribute(assembly.special_features)}".html_safe diff --git a/decidim-assemblies/lib/decidim/assemblies/test/factories.rb b/decidim-assemblies/lib/decidim/assemblies/test/factories.rb index d902430c2acf6..ab69ede02828d 100644 --- a/decidim-assemblies/lib/decidim/assemblies/test/factories.rb +++ b/decidim-assemblies/lib/decidim/assemblies/test/factories.rb @@ -14,7 +14,10 @@ end factory :assemblies_type, class: "Decidim::AssembliesType" do - title { generate_localized_title } + transient do + skip_injection { false } + end + title { generate_localized_title(:assemblies_type_title, skip_injection: skip_injection) } organization end @@ -22,45 +25,45 @@ transient do skip_injection { false } end - title { generate_localized_title } + title { generate_localized_title(:assembly_title, skip_injection: skip_injection) } slug { generate(:assembly_slug) } - subtitle { generate_localized_title } - short_description { Decidim::Faker::Localized.wrapped("

", "

") { generate_localized_title } } - description { Decidim::Faker::Localized.wrapped("

", "

") { generate_localized_title } } + subtitle { generate_localized_title(:assembly_subtitle, skip_injection: skip_injection) } + short_description { generate_localized_description(:assembly_short_description, skip_injection: skip_injection) } + description { generate_localized_description(:assembly_description, skip_injection: skip_injection) } organization hero_image { Decidim::Dev.test_file("city.jpeg", "image/jpeg") } # Keep after organization banner_image { Decidim::Dev.test_file("city2.jpeg", "image/jpeg") } # Keep after organization published_at { Time.current } - meta_scope { Decidim::Faker::Localized.word } - developer_group { generate_localized_title } - local_area { generate_localized_title } - target { generate_localized_title } - participatory_scope { generate_localized_title } - participatory_structure { generate_localized_title } + meta_scope { generate_localized_word(:assembly_meta_scope, skip_injection: skip_injection) } + developer_group { generate_localized_title(:assembly_developer_group, skip_injection: skip_injection) } + local_area { generate_localized_title(:assembly_local_area, skip_injection: skip_injection) } + target { generate_localized_title(:assembly_target, skip_injection: skip_injection) } + participatory_scope { generate_localized_title(:assembly_participatory_scope, skip_injection: skip_injection) } + participatory_structure { generate_localized_title(:assembly_participatory_structure, skip_injection: skip_injection) } show_statistics { true } private_space { false } - purpose_of_action { Decidim::Faker::Localized.wrapped("

", "

") { generate_localized_title } } - composition { Decidim::Faker::Localized.wrapped("

", "

") { generate_localized_title } } + purpose_of_action { generate_localized_description(:assembly_purpose_of_action, skip_injection: skip_injection) } + composition { generate_localized_description(:assembly_composition, skip_injection: skip_injection) } creation_date { 1.month.ago } created_by { "others" } - created_by_other { Decidim::Faker::Localized.word } + created_by_other { generate_localized_word(:assembly_created_by_other, skip_injection: skip_injection) } duration { 2.months.from_now.at_midnight } included_at { 1.month.ago } closing_date { 2.months.from_now.at_midnight } - closing_date_reason { Decidim::Faker::Localized.wrapped("

", "

") { generate_localized_title } } - internal_organisation { Decidim::Faker::Localized.wrapped("

", "

") { generate_localized_title } } + closing_date_reason { generate_localized_description(:assembly_closing_date_reason, skip_injection: skip_injection) } + internal_organisation { generate_localized_description(:assembly_internal_organisation, skip_injection: skip_injection) } is_transparent { true } - special_features { Decidim::Faker::Localized.wrapped("

", "

") { generate_localized_title } } + special_features { generate_localized_description(:assembly_special_features, skip_injection: skip_injection) } twitter_handler { "others" } facebook_handler { "others" } instagram_handler { "others" } youtube_handler { "others" } github_handler { "others" } weight { 1 } - announcement { generate_localized_title } + announcement { generate_localized_title(:assembly_announcement, skip_injection: skip_injection) } trait :with_type do - assembly_type { create :assemblies_type, organization: organization } + assembly_type { create :assemblies_type, organization: organization, skip_injection: skip_injection } end trait :promoted do @@ -76,7 +79,7 @@ end trait :with_parent do - parent { create :assembly, organization: organization } + parent { create :assembly, organization: organization, skip_injection: skip_injection } end trait :public do @@ -97,13 +100,17 @@ end factory :assembly_user_role, class: "Decidim::AssemblyUserRole" do + transient do + skip_injection { false } + end user - assembly { create :assembly, organization: user.organization } + assembly { create :assembly, organization: user.organization, skip_injection: skip_injection } role { "admin" } end factory :assembly_admin, parent: :user, class: "Decidim::User" do transient do + skip_injection { false } assembly { create(:assembly) } end @@ -114,12 +121,14 @@ create :assembly_user_role, user: user, assembly: evaluator.assembly, - role: :admin + role: :admin, + skip_injection: evaluator.skip_injection end end factory :assembly_moderator, parent: :user, class: "Decidim::User" do transient do + skip_injection { false } assembly { create(:assembly) } end @@ -130,12 +139,14 @@ create :assembly_user_role, user: user, assembly: evaluator.assembly, - role: :moderator + role: :moderator, + skip_injection: evaluator.skip_injection end end factory :assembly_collaborator, parent: :user, class: "Decidim::User" do transient do + skip_injection { false } assembly { create(:assembly) } end @@ -146,12 +157,14 @@ create :assembly_user_role, user: user, assembly: evaluator.assembly, + skip_injection: evaluator.skip_injection, role: :collaborator end end factory :assembly_valuator, parent: :user, class: "Decidim::User" do transient do + skip_injection { false } assembly { create(:assembly) } end @@ -162,13 +175,16 @@ create :assembly_user_role, user: user, assembly: evaluator.assembly, - role: :valuator + role: :valuator, + skip_injection: evaluator.skip_injection end end factory :assembly_member, class: "Decidim::AssemblyMember" do - assembly { create(:assembly) } - + transient do + skip_injection { false } + end + assembly { create(:assembly, skip_injection: skip_injection) } full_name { Faker::Name.name } gender { Faker::Lorem.word } birthday { Faker::Date.birthday(min_age: 18, max_age: 65) } @@ -181,7 +197,7 @@ end trait :with_user do - user { create(:user, organization: assembly.organization) } + user { create(:user, organization: assembly.organization, skip_injection: skip_injection) } end end end diff --git a/decidim-assemblies/spec/requests/assembly_search_spec.rb b/decidim-assemblies/spec/requests/assembly_search_spec.rb index 4e37580d5a8e2..972dc184cba11 100644 --- a/decidim-assemblies/spec/requests/assembly_search_spec.rb +++ b/decidim-assemblies/spec/requests/assembly_search_spec.rb @@ -37,16 +37,16 @@ end it "displays all assemblies by default" do - expect(subject).to include(translated(assembly1.title)) - expect(subject).to include(translated(assembly2.title)) + expect(subject).to include(decidim_escape_translated(assembly1.title)) + expect(subject).to include(decidim_escape_translated(assembly2.title)) end context "when filtering by assembly type" do let(:filter_params) { { type_id_eq: assembly1.assembly_type.id } } it "displays matching assemblies" do - expect(subject).to include(translated(assembly1.title)) - expect(subject).not_to include(translated(assembly2.title)) + expect(subject).to include(decidim_escape_translated(assembly1.title)) + expect(subject).not_to include(decidim_escape_translated(assembly2.title)) end end @@ -54,8 +54,8 @@ let(:filter_params) { { with_area: assembly1.area.id } } it "displays matching assemblies" do - expect(subject).to include(translated(assembly1.title)) - expect(subject).not_to include(translated(assembly2.title)) + expect(subject).to include(decidim_escape_translated(assembly1.title)) + expect(subject).not_to include(decidim_escape_translated(assembly2.title)) end end @@ -63,8 +63,8 @@ let(:filter_params) { { with_any_scope: [assembly1.scope.id] } } it "displays matching assemblies" do - expect(subject).to include(translated(assembly1.title)) - expect(subject).not_to include(translated(assembly2.title)) + expect(subject).to include(decidim_escape_translated(assembly1.title)) + expect(subject).not_to include(decidim_escape_translated(assembly2.title)) end end end diff --git a/decidim-blogs/lib/decidim/blogs/test/factories.rb b/decidim-blogs/lib/decidim/blogs/test/factories.rb index 5a4f537c62059..5db33b27f4058 100644 --- a/decidim-blogs/lib/decidim/blogs/test/factories.rb +++ b/decidim-blogs/lib/decidim/blogs/test/factories.rb @@ -6,21 +6,32 @@ FactoryBot.define do factory :post_component, parent: :component do - name { Decidim::Components::Namer.new(participatory_space.organization.available_locales, :blogs).i18n_name } + transient do + skip_injection { false } + end + + name { generate_component_name(participatory_space.organization.available_locales, :blogs, skip_injection: skip_injection) } manifest_name { :blogs } - participatory_space { create(:participatory_process, :with_steps, organization: organization) } + participatory_space { create(:participatory_process, :with_steps, skip_injection: skip_injection, organization: organization) } end factory :post, class: "Decidim::Blogs::Post" do - title { generate_localized_title } - body { Decidim::Faker::Localized.wrapped("

", "

") { generate_localized_title } } - component { build(:component, manifest_name: "blogs") } - author { build(:user, :confirmed, organization: component.organization) } + transient do + skip_injection { false } + end + + title { generate_localized_title(:blog_title, skip_injection: skip_injection) } + body { generate_localized_description(:blog_body, skip_injection: skip_injection) } + component { build(:post_component, skip_injection: skip_injection) } + author { build(:user, :confirmed, skip_injection: skip_injection, organization: component.organization) } trait :with_endorsements do - after :create do |post| + after :create do |post, evaluator| 5.times.collect do - create(:endorsement, resource: post, author: build(:user, organization: post.participatory_space.organization)) + create(:endorsement, + resource: post, + skip_injection: evaluator.skip_injection, + author: build(:user, skip_injection: evaluator.skip_injection, organization: post.participatory_space.organization)) end end end diff --git a/decidim-blogs/spec/events/decidim/blogs/create_post_event_spec.rb b/decidim-blogs/spec/events/decidim/blogs/create_post_event_spec.rb index a9cea06792f65..4f4f9d40f03ae 100644 --- a/decidim-blogs/spec/events/decidim/blogs/create_post_event_spec.rb +++ b/decidim-blogs/spec/events/decidim/blogs/create_post_event_spec.rb @@ -3,14 +3,15 @@ require "spec_helper" describe Decidim::Blogs::CreatePostEvent do + include_context "when a simple event" + let(:resource) { create(:post, title: generate_localized_title(:blog_title)) } let(:event_name) { "decidim.events.blogs.post_created" } let(:email_intro) { "The post \"#{resource_title}\" has been published in \"#{participatory_space_title}\" that you are following." } let(:email_outro) { "You have received this notification because you are following \"#{participatory_space_title}\". You can unfollow it from the previous link." } let(:notification_title) { "The post #{resource_title} has been published in #{participatory_space_title}" } - let(:email_subject) { "New post published in #{decidim_sanitize_translated(participatory_space.title)}" } + let(:email_subject) { "New post published in #{participatory_space_title}" } - include_context "when a simple event" it_behaves_like "a simple event" it_behaves_like "a simple event email" it_behaves_like "a simple event notification" diff --git a/decidim-blogs/spec/types/integration_schema_spec.rb b/decidim-blogs/spec/types/integration_schema_spec.rb index 8291173c90b35..c9a7fdbb17c74 100644 --- a/decidim-blogs/spec/types/integration_schema_spec.rb +++ b/decidim-blogs/spec/types/integration_schema_spec.rb @@ -50,7 +50,7 @@ { "__typename" => "Blogs", "id" => current_component.id.to_s, - "name" => { "translation" => "Blog" }, + "name" => { "translation" => translated(current_component.name) }, "posts" => { "edges" => [ { diff --git a/decidim-budgets/app/cells/decidim/budgets/base_cell.rb b/decidim-budgets/app/cells/decidim/budgets/base_cell.rb index c87c297f9adcb..fa60018348532 100644 --- a/decidim-budgets/app/cells/decidim/budgets/base_cell.rb +++ b/decidim-budgets/app/cells/decidim/budgets/base_cell.rb @@ -13,7 +13,7 @@ class BaseCell < Decidim::ViewModel delegate :settings, to: :current_component def budgets_link_list(budgets) - budgets.map { |budget| link_to(translated_attribute(budget.title), resource_locator(budget).path) } + budgets.map { |budget| link_to(decidim_escape_translated(budget.title), resource_locator(budget).path) } .to_sentence .html_safe end diff --git a/decidim-budgets/app/cells/decidim/budgets/budget_list_item/show.erb b/decidim-budgets/app/cells/decidim/budgets/budget_list_item/show.erb index 2cb1828c124af..96ff03e5a1db4 100644 --- a/decidim-budgets/app/cells/decidim/budgets/budget_list_item/show.erb +++ b/decidim-budgets/app/cells/decidim/budgets/budget_list_item/show.erb @@ -2,7 +2,7 @@
<%= link_to budget_path(budget), class: link_class do %>

- <%= translated_attribute(title) %> + <%= decidim_escape_translated(title) %>

<% end %> diff --git a/decidim-budgets/app/cells/decidim/budgets/budgets_list/voted.erb b/decidim-budgets/app/cells/decidim/budgets/budgets_list/voted.erb index 8ff0d6b5dcc41..0b9c4c4c3a434 100644 --- a/decidim-budgets/app/cells/decidim/budgets/budgets_list/voted.erb +++ b/decidim-budgets/app/cells/decidim/budgets/budgets_list/voted.erb @@ -32,7 +32,7 @@ <% voted.each do |budget| %>
  • <%= link_to( - t("cancel_order.more_than_one", scope: i18n_scope, name: translated_attribute(budget.title)), + t("cancel_order.more_than_one", scope: i18n_scope, name: decidim_escape_translated(budget.title)), budget_order_path(budget), method: :delete, class: "cancel-order", diff --git a/decidim-budgets/app/cells/decidim/budgets/project_list_item_cell.rb b/decidim-budgets/app/cells/decidim/budgets/project_list_item_cell.rb index b6a176136bea3..12754df4709a8 100644 --- a/decidim-budgets/app/cells/decidim/budgets/project_list_item_cell.rb +++ b/decidim-budgets/app/cells/decidim/budgets/project_list_item_cell.rb @@ -21,7 +21,7 @@ def resource_path end def resource_title - translated_attribute model.title + decidim_escape_translated model.title end def resource_added? diff --git a/decidim-budgets/app/views/decidim/budgets/admin/projects/edit.html.erb b/decidim-budgets/app/views/decidim/budgets/admin/projects/edit.html.erb index 331184c14c6af..e8e2f6d950289 100644 --- a/decidim-budgets/app/views/decidim/budgets/admin/projects/edit.html.erb +++ b/decidim-budgets/app/views/decidim/budgets/admin/projects/edit.html.erb @@ -1,6 +1,6 @@ <% add_decidim_page_title("#{translated_attribute(budget.title)} - #{t(".title")}") %> <%= decidim_form_for([budget, @form], html: { class: "form edit_project" }) do |f| %> - <%= render partial: "form", object: f, locals: { title: "#{translated_attribute(budget.title)} > #{t(".title")}" } %> + <%= render partial: "form", object: f, locals: { title: "#{decidim_escape_translated(budget.title)} > #{t(".title")}" } %>
    <%= f.submit t(".update") %> diff --git a/decidim-budgets/app/views/decidim/budgets/admin/projects/index.html.erb b/decidim-budgets/app/views/decidim/budgets/admin/projects/index.html.erb index 9f3a88fcd5fd9..9128eb40d0e8f 100644 --- a/decidim-budgets/app/views/decidim/budgets/admin/projects/index.html.erb +++ b/decidim-budgets/app/views/decidim/budgets/admin/projects/index.html.erb @@ -3,7 +3,7 @@

    - <%= link_to translated_attribute(budget.title), budgets_path %> > + <%= link_to decidim_escape_translated(budget.title), budgets_path %> > <%= t(".title") %> ">
    diff --git a/decidim-budgets/app/views/decidim/budgets/admin/projects/new.html.erb b/decidim-budgets/app/views/decidim/budgets/admin/projects/new.html.erb index 0131637473c97..78115e25efa08 100644 --- a/decidim-budgets/app/views/decidim/budgets/admin/projects/new.html.erb +++ b/decidim-budgets/app/views/decidim/budgets/admin/projects/new.html.erb @@ -1,6 +1,6 @@ <% add_decidim_page_title("#{translated_attribute(budget.title)} - #{t(".title")}") %> <%= decidim_form_for([budget, @form], html: { class: "form new_project" }) do |f| %> - <%= render partial: "form", object: f, locals: { title: "#{translated_attribute(budget.title)} > #{t(".title")}" } %> + <%= render partial: "form", object: f, locals: { title: "#{decidim_escape_translated(budget.title)} > #{t(".title")}" } %>
    <%= f.submit t(".create") %> diff --git a/decidim-budgets/lib/decidim/budgets/test/factories.rb b/decidim-budgets/lib/decidim/budgets/test/factories.rb index 260e7122aabf3..41abf89f6fc3b 100644 --- a/decidim-budgets/lib/decidim/budgets/test/factories.rb +++ b/decidim-budgets/lib/decidim/budgets/test/factories.rb @@ -8,9 +8,12 @@ FactoryBot.define do factory :budgets_component, parent: :component do - name { Decidim::Components::Namer.new(participatory_space.organization.available_locales, :budgets).i18n_name } + transient do + skip_injection { false } + end + name { generate_component_name(participatory_space.organization.available_locales, :budgets, skip_injection: skip_injection) } manifest_name { :budgets } - participatory_space { create(:participatory_process, :with_steps, organization: organization) } + participatory_space { create(:participatory_process, :with_steps, skip_injection: skip_injection, organization: organization) } trait :with_geocoding_enabled do settings do @@ -109,10 +112,13 @@ end factory :budget, class: "Decidim::Budgets::Budget" do - title { generate_localized_title } - description { Decidim::Faker::Localized.wrapped("

    ", "

    ") { generate_localized_title } } + transient do + skip_injection { false } + end + title { generate_localized_title(:budget_title, skip_injection: skip_injection) } + description { generate_localized_description(:budget_description, skip_injection: skip_injection) } total_budget { 100_000_000 } - component { create(:budgets_component) } + component { create(:budgets_component, skip_injection: skip_injection) } trait :with_projects do transient do @@ -120,19 +126,22 @@ end after(:create) do |budget, evaluator| - create_list(:project, evaluator.projects_number, budget: budget) + create_list(:project, evaluator.projects_number, skip_injection: evaluator.skip_injection, budget: budget) end end end factory :project, class: "Decidim::Budgets::Project" do - title { generate_localized_title } - description { Decidim::Faker::Localized.wrapped("

    ", "

    ") { generate_localized_title } } + transient do + skip_injection { false } + end + title { generate_localized_title(:project_title, skip_injection: skip_injection) } + description { generate_localized_description(:project_description, skip_injection: skip_injection) } address { "#{Faker::Address.street_name}, #{Faker::Address.city}" } latitude { Faker::Address.latitude } longitude { Faker::Address.longitude } budget_amount { Faker::Number.number(digits: 8) } - budget { create(:budget) } + budget { create(:budget, skip_injection: skip_injection) } trait :selected do selected_at { Time.current } @@ -144,14 +153,17 @@ end after :create do |project, evaluator| - project.attachments = create_list(:attachment, evaluator.photos_number, :with_image, attached_to: project) + project.attachments = create_list(:attachment, evaluator.photos_number, :with_image, attached_to: project, skip_injection: evaluator.skip_injection) end end end factory :order, class: "Decidim::Budgets::Order" do - budget { create(:budget) } - user { create(:user, organization: component.organization) } + transient do + skip_injection { false } + end + budget { create(:budget, skip_injection: skip_injection) } + user { create(:user, organization: component.organization, skip_injection: skip_injection) } trait :with_projects do transient do @@ -160,14 +172,17 @@ after(:create) do |order, evaluator| project_budget = (order.maximum_budget / evaluator.projects_number).to_i - order.projects << create_list(:project, evaluator.projects_number, budget_amount: project_budget, budget: order.budget) + order.projects << create_list(:project, evaluator.projects_number, budget_amount: project_budget, budget: order.budget, skip_injection: evaluator.skip_injection) order.save! end end end factory :line_item, class: "Decidim::Budgets::LineItem" do + transient do + skip_injection { false } + end order - project { create(:project, budget: order.budget) } + project { create(:project, budget: order.budget, skip_injection: skip_injection) } end end diff --git a/decidim-budgets/spec/requests/project_search_spec.rb b/decidim-budgets/spec/requests/project_search_spec.rb index 6e290efed9f1b..b5ca9191b5d35 100644 --- a/decidim-budgets/spec/requests/project_search_spec.rb +++ b/decidim-budgets/spec/requests/project_search_spec.rb @@ -59,11 +59,11 @@ it_behaves_like "a resource search with categories", :project it "displays all projects within the budget without any filters" do - expect(subject).to include(translated(project1.title)) - expect(subject).to include(translated(project2.title)) - expect(subject).to include(translated(project3.title)) - expect(subject).not_to include(translated(project4.title)) - expect(subject).not_to include(translated(project5.title)) + expect(subject).to include(decidim_escape_translated(project1.title)) + expect(subject).to include(decidim_escape_translated(project2.title)) + expect(subject).to include(decidim_escape_translated(project3.title)) + expect(subject).not_to include(decidim_escape_translated(project4.title)) + expect(subject).not_to include(decidim_escape_translated(project5.title)) end context "when searching by status" do @@ -73,9 +73,9 @@ let(:status) { ["all"] } it "displays all projects" do - expect(subject).to include(translated(project1.title)) - expect(subject).to include(translated(project2.title)) - expect(subject).to include(translated(project3.title)) + expect(subject).to include(decidim_escape_translated(project1.title)) + expect(subject).to include(decidim_escape_translated(project2.title)) + expect(subject).to include(decidim_escape_translated(project3.title)) end end @@ -83,9 +83,9 @@ let(:status) { ["selected"] } it "displays the selected projects" do - expect(subject).to include(translated(project1.title)) - expect(subject).to include(translated(project2.title)) - expect(subject).not_to include(translated(project3.title)) + expect(subject).to include(decidim_escape_translated(project1.title)) + expect(subject).to include(decidim_escape_translated(project2.title)) + expect(subject).not_to include(decidim_escape_translated(project3.title)) end end @@ -93,9 +93,9 @@ let(:status) { ["not_selected"] } it "displays the selected projects" do - expect(subject).not_to include(translated(project1.title)) - expect(subject).not_to include(translated(project2.title)) - expect(subject).to include(translated(project3.title)) + expect(subject).not_to include(decidim_escape_translated(project1.title)) + expect(subject).not_to include(decidim_escape_translated(project2.title)) + expect(subject).to include(decidim_escape_translated(project3.title)) end end end diff --git a/decidim-budgets/spec/system/comments_spec.rb b/decidim-budgets/spec/system/comments_spec.rb index 14fc4e339e0e2..bebf0edd9a129 100644 --- a/decidim-budgets/spec/system/comments_spec.rb +++ b/decidim-budgets/spec/system/comments_spec.rb @@ -30,9 +30,9 @@ end within_window(another_window) do - expect(page).to have_content(commentable.title["en"]) - expect(page).to have_content(comments.first.body["en"]) - expect(page).not_to have_content(comments.second.body["en"]) + expect(page).to have_content(translated(commentable.title)) + expect(page).to have_content(decidim_sanitize_translated(comments.first.body)) + expect(page).not_to have_content(decidim_sanitize_translated(comments.second.body)) end end end diff --git a/decidim-budgets/spec/system/explore_budget_notifications_spec.rb b/decidim-budgets/spec/system/explore_budget_notifications_spec.rb index d003ed28d0950..eb9f655fb911e 100644 --- a/decidim-budgets/spec/system/explore_budget_notifications_spec.rb +++ b/decidim-budgets/spec/system/explore_budget_notifications_spec.rb @@ -33,7 +33,7 @@ visit_notifications within "#notifications" do - expect(page).to have_content(translated(project.title)) + expect(page).to have_content(decidim_sanitize_translated(project.title)) end end end diff --git a/decidim-budgets/spec/system/orders_spec.rb b/decidim-budgets/spec/system/orders_spec.rb index a8ef3fbfc4bb1..e6d8715914163 100644 --- a/decidim-budgets/spec/system/orders_spec.rb +++ b/decidim-budgets/spec/system/orders_spec.rb @@ -660,8 +660,8 @@ end it "shows the component" do - expect(page).to have_i18n_content(project.title) - expect(page).to have_i18n_content(project.description) + expect(page).to have_i18n_content(project.title, strip_tags: true) + expect(page).to have_i18n_content(project.description, strip_tags: true) end context "with linked proposals" do diff --git a/decidim-budgets/spec/types/integration_schema_spec.rb b/decidim-budgets/spec/types/integration_schema_spec.rb index ec686b5bc88ad..6d19c0ac9f8fc 100644 --- a/decidim-budgets/spec/types/integration_schema_spec.rb +++ b/decidim-budgets/spec/types/integration_schema_spec.rb @@ -52,7 +52,7 @@ { "__typename" => "Budgets", "id" => current_component.id.to_s, - "name" => { "translation" => "Budgets" }, + "name" => { "translation" => translated(current_component.name) }, "budgets" => { "edges" => [ { diff --git a/decidim-comments/lib/decidim/comments/test/factories.rb b/decidim-comments/lib/decidim/comments/test/factories.rb index dda8423b5df25..5e46a72093991 100644 --- a/decidim-comments/lib/decidim/comments/test/factories.rb +++ b/decidim-comments/lib/decidim/comments/test/factories.rb @@ -4,8 +4,11 @@ FactoryBot.define do factory :comment, class: "Decidim::Comments::Comment" do - author { build(:user, organization: commentable.organization) } - commentable { build(:dummy_resource) } + transient do + skip_injection { false } + end + author { build(:user, organization: commentable.organization, skip_injection: skip_injection) } + commentable { build(:dummy_resource, skip_injection: skip_injection) } root_commentable { commentable } body { Decidim::Faker::Localized.paragraph } participatory_space { commentable.try(:participatory_space) } @@ -25,22 +28,26 @@ end trait :comment_on_comment do - author { build(:user, organization: root_commentable.organization) } + author { build(:user, organization: root_commentable.organization, skip_injection: skip_injection) } commentable do build( :comment, author: author, root_commentable: root_commentable, - commentable: root_commentable + commentable: root_commentable, + skip_injection: skip_injection ) end - root_commentable { build(:dummy_resource) } + root_commentable { build(:dummy_resource, skip_injection: skip_injection) } end end factory :comment_vote, class: "Decidim::Comments::CommentVote" do - comment { build(:comment) } - author { build(:user, organization: comment.organization) } + transient do + skip_injection { false } + end + comment { build(:comment, skip_injection: skip_injection) } + author { build(:user, organization: comment.organization, skip_injection: skip_injection) } weight { [-1, 1].sample } trait :up_vote do diff --git a/decidim-comments/lib/decidim/comments/test/shared_examples/comment_event.rb b/decidim-comments/lib/decidim/comments/test/shared_examples/comment_event.rb index 0b97df767bc58..3b69bff6409e7 100644 --- a/decidim-comments/lib/decidim/comments/test/shared_examples/comment_event.rb +++ b/decidim-comments/lib/decidim/comments/test/shared_examples/comment_event.rb @@ -16,7 +16,7 @@ let(:comment_author_name) { decidim_html_escape comment.author.name } let(:extra) { { comment_id: comment.id } } - let(:resource_title) { decidim_html_escape(translated(resource.title)) } + let(:resource_title) { decidim_sanitize_translated(resource.title) } let(:user_group) do user_group = create(:user_group, :verified, organization: organization, users: [comment_author]) comment.update!(user_group: user_group) diff --git a/decidim-comments/lib/decidim/comments/test/shared_examples/comment_voted_event.rb b/decidim-comments/lib/decidim/comments/test/shared_examples/comment_voted_event.rb index 74822712afc13..88c279ed234a7 100644 --- a/decidim-comments/lib/decidim/comments/test/shared_examples/comment_voted_event.rb +++ b/decidim-comments/lib/decidim/comments/test/shared_examples/comment_voted_event.rb @@ -12,7 +12,7 @@ let(:comment_vote_author) { comment_vote.author } let(:extra) { { comment_id: comment.id, author_id: comment_vote_author.id, weight: weight, downvotes: 100, upvotes: 999 } } - let(:resource_title) { decidim_html_escape(translated(resource.title)) } + let(:resource_title) { decidim_sanitize_translated(resource.title) } let(:resource_text) { subject.resource_text } let(:verb) { weight.positive? ? "upvoted" : "downvoted" } diff --git a/decidim-comments/spec/events/decidim/comments/comment_downvoted_event_spec.rb b/decidim-comments/spec/events/decidim/comments/comment_downvoted_event_spec.rb index f1a19b0e9472e..c2adc43b59689 100644 --- a/decidim-comments/spec/events/decidim/comments/comment_downvoted_event_spec.rb +++ b/decidim-comments/spec/events/decidim/comments/comment_downvoted_event_spec.rb @@ -10,8 +10,8 @@ it_behaves_like "a comment voted event" do let(:parent_comment) { create(:comment) } let(:comment) { create :comment, commentable: parent_comment, root_commentable: parent_comment.root_commentable } - let(:resource_title) { decidim_html_escape(translated(resource.commentable.title)) } let(:resource_path) { resource_locator(resource.commentable).path } + let(:resource_title) { decidim_sanitize_translated(parent_comment.root_commentable.title) } end end @@ -19,7 +19,6 @@ it_behaves_like "a comment voted event" do let(:resource) { comment.commentable } let(:comment) { create :comment } - let(:resource_title) { decidim_html_escape(translated(resource.title)) } it_behaves_like "a translated comment event" do let(:translatable) { false } diff --git a/decidim-comments/spec/events/decidim/comments/comment_upvoted_event_spec.rb b/decidim-comments/spec/events/decidim/comments/comment_upvoted_event_spec.rb index 6d1632cf8569a..8a0f35d7201f3 100644 --- a/decidim-comments/spec/events/decidim/comments/comment_upvoted_event_spec.rb +++ b/decidim-comments/spec/events/decidim/comments/comment_upvoted_event_spec.rb @@ -10,8 +10,8 @@ it_behaves_like "a comment voted event" do let(:parent_comment) { create(:comment) } let(:comment) { create :comment, commentable: parent_comment, root_commentable: parent_comment.root_commentable } - let(:resource_title) { decidim_html_escape(translated(resource.commentable.title)) } let(:resource_path) { resource_locator(resource.commentable).path } + let(:resource_title) { decidim_sanitize_translated(parent_comment.root_commentable.title) } end end @@ -19,7 +19,6 @@ it_behaves_like "a comment voted event" do let(:resource) { comment.commentable } let(:comment) { create :comment } - let(:resource_title) { decidim_html_escape(translated(resource.title)) } it_behaves_like "a translated comment event" do let(:translatable) { false } diff --git a/decidim-comments/spec/events/decidim/comments/reply_created_event_spec.rb b/decidim-comments/spec/events/decidim/comments/reply_created_event_spec.rb index d175d3f2a4bf0..509a336b74d3d 100644 --- a/decidim-comments/spec/events/decidim/comments/reply_created_event_spec.rb +++ b/decidim-comments/spec/events/decidim/comments/reply_created_event_spec.rb @@ -8,10 +8,10 @@ let(:comment) { create :comment, commentable: parent_comment, root_commentable: parent_comment.root_commentable } let(:parent_comment) { create :comment } let(:resource) { comment.root_commentable } - let(:email_subject) { "#{comment_author_name} has replied your comment in #{translated resource.title}" } + let(:email_subject) { "#{comment_author_name} has replied your comment in #{resource_title}" } let(:email_intro) { "#{comment_author_name} has replied your comment in #{resource_title}. You can read it in this page:" } let(:email_outro) { "You have received this notification because your comment was replied." } - let(:notification_title) { "#{comment_author_name} @#{comment_author.nickname} has replied your comment in #{translated resource.title}" } + let(:notification_title) { "#{comment_author_name} @#{comment_author.nickname} has replied your comment in #{resource_title}" } it_behaves_like "a simple event email" it_behaves_like "a simple event notification" diff --git a/decidim-comments/spec/events/decidim/comments/user_group_mentioned_event_spec.rb b/decidim-comments/spec/events/decidim/comments/user_group_mentioned_event_spec.rb index 766cd00ba48a2..b61fe2cde605b 100644 --- a/decidim-comments/spec/events/decidim/comments/user_group_mentioned_event_spec.rb +++ b/decidim-comments/spec/events/decidim/comments/user_group_mentioned_event_spec.rb @@ -24,9 +24,9 @@ let(:parsed_body) { Decidim::ContentProcessor.parse("Comment mentioning some user group, @#{group.nickname}", current_organization: organization) } let(:parsed_ca_body) { Decidim::ContentProcessor.parse("Un commentaire pour @#{group.nickname}", current_organization: organization) } let(:body) { { en: parsed_body.rewrite, machine_translations: { ca: parsed_ca_body.rewrite } } } - let(:email_subject) { "You have been mentioned in #{html_escape(translated(resource.title))} as a member of #{html_escape(group.name)}" } + let(:email_subject) { "You have been mentioned in #{resource_title} as a member of #{html_escape(group.name)}" } let(:email_intro) { "A group you belong to has been mentioned" } - let(:email_outro) { "You have received this notification because you are a member of the group #{html_escape(group.name)} that has been mentioned in #{html_escape(translated(resource.title))}." } + let(:email_outro) { "You have received this notification because you are a member of the group #{html_escape(group.name)} that has been mentioned in #{resource_title}." } it_behaves_like "a comment event" it_behaves_like "a simple event email" @@ -61,7 +61,7 @@ describe "notification_title" do it "is generated correctly" do expect(subject.notification_title) - .to include("You have been mentioned in #{html_escape(translated(resource.title))}") + .to include("You have been mentioned in #{resource_title}") expect(subject.notification_title) .to include(" as a member of #{html_escape(group.name)} @#{group.nickname}") diff --git a/decidim-comments/spec/events/decidim/comments/user_mentioned_event_spec.rb b/decidim-comments/spec/events/decidim/comments/user_mentioned_event_spec.rb index addfb894df2b6..b77eb0d2bee8c 100644 --- a/decidim-comments/spec/events/decidim/comments/user_mentioned_event_spec.rb +++ b/decidim-comments/spec/events/decidim/comments/user_mentioned_event_spec.rb @@ -22,10 +22,10 @@ let(:author) { create :user, organization: organization } let!(:comment) { create :comment, body: body, author: author, commentable: commentable } let(:user) { create :user, organization: organization, locale: "ca" } - let(:notification_title) { "You have been mentioned in #{translated resource.title} by #{author.name} @#{author.nickname}" } - let(:email_subject) { "You have been mentioned in #{translated resource.title}" } + let(:notification_title) { "You have been mentioned in #{resource_title} by #{author.name} @#{author.nickname}" } + let(:email_subject) { "You have been mentioned in #{resource_title}" } let(:email_intro) { "You have been mentioned" } - let(:email_outro) { "You have received this notification because you have been mentioned in #{translated resource.title}." } + let(:email_outro) { "You have received this notification because you have been mentioned in #{resource_title}." } it_behaves_like "a comment event" it_behaves_like "a simple event email" diff --git a/decidim-conferences/app/cells/decidim/conferences/conference_address/show.erb b/decidim-conferences/app/cells/decidim/conferences/conference_address/show.erb index f71461b96c5fa..fb88cecb64803 100644 --- a/decidim-conferences/app/cells/decidim/conferences/conference_address/show.erb +++ b/decidim-conferences/app/cells/decidim/conferences/conference_address/show.erb @@ -1,11 +1,11 @@
    <% if model.respond_to? :location %>
    - <%= translated_attribute model.location %>
    + <%= decidim_escape_translated model.location %>
    <% end %>
    <%= model.address %>
    <% if model.respond_to? :location_hints %> -
    <%= translated_attribute model.location_hints %>
    +
    <%= decidim_escape_translated model.location_hints %>
    <% end %>
    diff --git a/decidim-conferences/app/cells/decidim/conferences/conference_m_cell.rb b/decidim-conferences/app/cells/decidim/conferences/conference_m_cell.rb index c6b7b5480cd42..04086a184ff1c 100644 --- a/decidim-conferences/app/cells/decidim/conferences/conference_m_cell.rb +++ b/decidim-conferences/app/cells/decidim/conferences/conference_m_cell.rb @@ -14,10 +14,6 @@ def current_participatory_space private - def title - decidim_html_escape(super) - end - def has_image? true end diff --git a/decidim-conferences/app/cells/decidim/conferences/conference_speaker_cell.rb b/decidim-conferences/app/cells/decidim/conferences/conference_speaker_cell.rb index 4aa2c8e019690..67416f7ab7eb1 100644 --- a/decidim-conferences/app/cells/decidim/conferences/conference_speaker_cell.rb +++ b/decidim-conferences/app/cells/decidim/conferences/conference_speaker_cell.rb @@ -60,7 +60,7 @@ def affiliation def short_bio return unless model.short_bio.presence - translated_attribute model.short_bio + decidim_escape_translated model.short_bio end def twitter_handle diff --git a/decidim-conferences/app/cells/decidim/conferences/content_blocks/highlighted_conferences/show.erb b/decidim-conferences/app/cells/decidim/conferences/content_blocks/highlighted_conferences/show.erb index 77d9b6534fd78..a36e4d1f2324e 100644 --- a/decidim-conferences/app/cells/decidim/conferences/content_blocks/highlighted_conferences/show.erb +++ b/decidim-conferences/app/cells/decidim/conferences/content_blocks/highlighted_conferences/show.erb @@ -10,7 +10,7 @@
    - <%= translated_attribute conference.title %> + <%= decidim_escape_translated conference.title %>
    <% end %>
    diff --git a/decidim-conferences/app/views/decidim/conferences/conference_program/_program_meeting.html.erb b/decidim-conferences/app/views/decidim/conferences/conference_program/_program_meeting.html.erb index ad8ed6ef8a848..12551faaaa3ba 100644 --- a/decidim-conferences/app/views/decidim/conferences/conference_program/_program_meeting.html.erb +++ b/decidim-conferences/app/views/decidim/conferences/conference_program/_program_meeting.html.erb @@ -3,7 +3,7 @@ <%= start_time.to_s(:time) %> - <%= end_time.to_s(:time) %>

    - <%= link_to present(meeting).title, resource_locator(meeting).path %> + <%= link_to decidim_sanitize(present(meeting).title), resource_locator(meeting).path %>
    diff --git a/decidim-conferences/lib/decidim/conferences/test/factories.rb b/decidim-conferences/lib/decidim/conferences/test/factories.rb index 6af3b7db5a1b6..c9507c5fc70dd 100644 --- a/decidim-conferences/lib/decidim/conferences/test/factories.rb +++ b/decidim-conferences/lib/decidim/conferences/test/factories.rb @@ -10,12 +10,15 @@ end factory :conference, class: "Decidim::Conference" do - title { generate_localized_title } + transient do + skip_injection { false } + end + title { generate_localized_title(:conference_title, skip_injection: skip_injection) } slug { generate(:conference_slug) } - slogan { generate_localized_title } - short_description { Decidim::Faker::Localized.wrapped("

    ", "

    ") { generate_localized_title } } - description { Decidim::Faker::Localized.wrapped("

    ", "

    ") { generate_localized_title } } - objectives { Decidim::Faker::Localized.wrapped("

    ", "

    ") { generate_localized_title } } + slogan { generate_localized_title(:conference_slogan, skip_injection: skip_injection) } + short_description { generate_localized_description(:conference_short_description, skip_injection: skip_injection) } + description { generate_localized_description(:conference_description, skip_injection: skip_injection) } + objectives { generate_localized_description(:conference_objectives, skip_injection: skip_injection) } organization hero_image { Decidim::Dev.test_file("city.jpeg", "image/jpeg") } # Keep after organization banner_image { Decidim::Dev.test_file("city2.jpeg", "image/jpeg") } # Keep after organization @@ -24,7 +27,7 @@ show_statistics { true } start_date { 1.month.ago } end_date { 1.month.ago + 3.days } - registration_terms { generate_localized_title } + registration_terms { generate_localized_title(:conference_registration_terms, skip_injection: skip_injection) } trait :promoted do promoted { true } @@ -47,14 +50,18 @@ end factory :conference_user_role, class: "Decidim::ConferenceUserRole" do + transient do + skip_injection { false } + end user - conference { create :conference, organization: user.organization } + conference { create :conference, organization: user.organization, skip_injection: skip_injection } role { "admin" } end factory :conference_admin, parent: :user, class: "Decidim::User" do transient do - conference { create(:conference) } + skip_injection { false } + conference { create(:conference, skip_injection: skip_injection) } end organization { conference.organization } @@ -64,13 +71,15 @@ create :conference_user_role, user: user, conference: evaluator.conference, - role: :admin + role: :admin, + skip_injection: evaluator.skip_injection end end factory :conference_moderator, parent: :user, class: "Decidim::User" do transient do - conference { create(:conference) } + skip_injection { false } + conference { create(:conference, skip_injection: skip_injection) } end organization { conference.organization } @@ -80,13 +89,15 @@ create :conference_user_role, user: user, conference: evaluator.conference, - role: :moderator + role: :moderator, + skip_injection: evaluator.skip_injection end end factory :conference_collaborator, parent: :user, class: "Decidim::User" do transient do - conference { create(:conference) } + skip_injection { false } + conference { create(:conference, skip_injection: skip_injection) } end organization { conference.organization } @@ -96,13 +107,15 @@ create :conference_user_role, user: user, conference: evaluator.conference, - role: :collaborator + role: :collaborator, + skip_injection: evaluator.skip_injection end end factory :conference_valuator, parent: :user, class: "Decidim::User" do transient do - conference { create(:conference) } + skip_injection { false } + conference { create(:conference, skip_injection: skip_injection) } end organization { conference.organization } @@ -112,17 +125,21 @@ create :conference_user_role, user: user, conference: evaluator.conference, - role: :valuator + role: :valuator, + skip_injection: evaluator.skip_injection end end factory :conference_speaker, class: "Decidim::ConferenceSpeaker" do - conference { create(:conference) } + transient do + skip_injection { false } + end + conference { create(:conference, skip_injection: skip_injection) } full_name { Faker::Name.name } position { Decidim::Faker::Localized.word } affiliation { Decidim::Faker::Localized.word } - short_bio { generate_localized_title } + short_bio { generate_localized_title(:conference_speaker_short_bio, skip_injection: skip_injection) } twitter_handle { Faker::Internet.user_name } personal_url { Faker::Internet.url } @@ -131,58 +148,66 @@ end trait :with_user do - user { create(:user, organization: conference.organization) } + user { create(:user, organization: conference.organization, skip_injection: skip_injection) } end trait :with_meeting do transient do - meetings_component { create(:meetings_component, participatory_space: conference.participatory_space) } + meetings_component { create(:meetings_component, participatory_space: conference.participatory_space, skip_injection: skip_injection) } end after :build do |conference_speaker, evaluator| conference_speaker.conference_speaker_conference_meetings << build(:conference_speaker_conference_meeting, meetings_component: evaluator.meetings_component, - conference_speaker: conference_speaker) + conference_speaker: conference_speaker, + skip_injection: evaluator.skip_injection) end end end factory :conference_speaker_conference_meeting, class: "Decidim::ConferenceSpeakerConferenceMeeting" do transient do - conference { create(:conference) } - meetings_component { create(:meetings_component, participatory_space: conference.participatory_space) } + skip_injection { false } + conference { create(:conference, skip_injection: skip_injection) } + meetings_component { create(:meetings_component, skip_injection: skip_injection, participatory_space: conference.participatory_space) } end - conference_meeting { create(:conference_meeting, :published, conference: conference, component: meetings_component) } - conference_speaker { create(:conference_speaker, conference: conference) } + conference_meeting { create(:conference_meeting, :published, conference: conference, skip_injection: skip_injection, component: meetings_component) } + conference_speaker { create(:conference_speaker, conference: conference, skip_injection: skip_injection) } end factory :conference_meeting_registration_type, class: "Decidim::Conferences::ConferenceMeetingRegistrationType" do transient do - conference { create(:conference) } + skip_injection { false } + conference { create(:conference, skip_injection: skip_injection) } end conference_meeting - registration_type { build(:registration_type, conference: conference) } + registration_type { build(:registration_type, conference: conference, skip_injection: skip_injection) } end factory :conference_meeting, parent: :meeting, class: "Decidim::ConferenceMeeting" do transient do - conference { create(:conference) } + skip_injection { false } + conference { create(:conference, skip_injection: skip_injection) } end after :build do |conference_meeting, evaluator| conference_meeting.conference_meeting_registration_types << build(:conference_meeting_registration_type, conference_meeting: conference_meeting, - conference: evaluator.conference) + conference: evaluator.conference, + skip_injection: evaluator.skip_injection) end end factory :registration_type, class: "Decidim::Conferences::RegistrationType" do + transient do + skip_injection { false } + end conference - title { generate_localized_title } - description { Decidim::Faker::Localized.wrapped("

    ", "

    ") { generate_localized_title } } + title { generate_localized_title(:registration_type_title, skip_injection: skip_injection) } + description { generate_localized_description(:registration_type_description, skip_injection: skip_injection) } published_at { Time.current } price { Faker::Number.between(from: 1, to: 300) } weight { Faker::Number.between(from: 1, to: 10) } @@ -197,6 +222,9 @@ end factory :conference_registration, class: "Decidim::Conferences::ConferenceRegistration" do + transient do + skip_injection { false } + end conference user registration_type @@ -212,6 +240,9 @@ end factory :conference_invite, class: "Decidim::Conferences::ConferenceInvite" do + transient do + skip_injection { false } + end conference user sent_at { 1.day.ago } @@ -229,6 +260,9 @@ end factory :partner, class: "Decidim::Conferences::Partner" do + transient do + skip_injection { false } + end conference name { Faker::Name.name } @@ -247,8 +281,11 @@ end factory :media_link, class: "Decidim::Conferences::MediaLink" do + transient do + skip_injection { false } + end conference - title { generate_localized_title } + title { generate_localized_title(:media_link_title, skip_injection: skip_injection) } weight { Faker::Number.between(from: 1, to: 10) } link { Faker::Internet.url } date { 1.month.ago } diff --git a/decidim-conferences/spec/commands/join_conference_spec.rb b/decidim-conferences/spec/commands/join_conference_spec.rb index 4675ea48ee53c..a019ae0db5a6d 100644 --- a/decidim-conferences/spec/commands/join_conference_spec.rb +++ b/decidim-conferences/spec/commands/join_conference_spec.rb @@ -52,7 +52,7 @@ module Decidim::Conferences email = last_email expect(email.subject).to include("pending") - expect(email.body.encoded).to include(translated(registration_type.title)) + expect(email.text_part.body.to_s).to include(translated(registration_type.title).first(60)) end it "sends a notification to the user with the pending validation" do diff --git a/decidim-conferences/spec/services/decidim/conferences/searchable_conferences_resource_spec.rb b/decidim-conferences/spec/services/decidim/conferences/searchable_conferences_resource_spec.rb index b7e6412c892f0..1aa55e5871ff3 100644 --- a/decidim-conferences/spec/services/decidim/conferences/searchable_conferences_resource_spec.rb +++ b/decidim-conferences/spec/services/decidim/conferences/searchable_conferences_resource_spec.rb @@ -37,7 +37,7 @@ module Decidim d += I18n.transliterate(translated(space.objectives, locale: locale)) { "content_a" => I18n.transliterate(translated(space.title, locale: locale)), - "content_b" => I18n.transliterate(translated(space.slogan, locale: locale)), + "content_b" => I18n.transliterate(strip_tags(translated(space.slogan, locale: locale))), "content_c" => I18n.transliterate(translated(space.short_description, locale: locale)), "content_d" => d } diff --git a/decidim-conferences/spec/system/conference_program_spec.rb b/decidim-conferences/spec/system/conference_program_spec.rb index c6a44a76ec381..85337204b615b 100644 --- a/decidim-conferences/spec/system/conference_program_spec.rb +++ b/decidim-conferences/spec/system/conference_program_spec.rb @@ -62,7 +62,7 @@ expect(page).to have_selector(".programme-title", count: 3) meetings.each do |meeting| - expect(page).to have_content(Decidim::ConferenceMeetingPresenter.new(meeting).title) + expect(page).to have_content(ActionView::Base.full_sanitizer.sanitize(Decidim::ConferenceMeetingPresenter.new(meeting).title)) end end end diff --git a/decidim-core/app/cells/decidim/activity_cell.rb b/decidim-core/app/cells/decidim/activity_cell.rb index 11493bb7eac49..17abc071d3c51 100644 --- a/decidim-core/app/cells/decidim/activity_cell.rb +++ b/decidim-core/app/cells/decidim/activity_cell.rb @@ -38,9 +38,9 @@ def title case resource_title when String - resource_title + decidim_html_escape(resource_title) when Hash - translated_attribute(resource_title) + decidim_escape_translated(resource_title) end end diff --git a/decidim-core/app/cells/decidim/card_cell.rb b/decidim-core/app/cells/decidim/card_cell.rb index 01d167a5c1399..2f78a855208de 100644 --- a/decidim-core/app/cells/decidim/card_cell.rb +++ b/decidim-core/app/cells/decidim/card_cell.rb @@ -28,11 +28,11 @@ def resource_cell end def title - model.try(:title) || model.try(:name) || "" + decidim_escape_translated(model.try(:title) || model.try(:name) || "") end def body - model.try(:body) || model.try(:about) || "" + decidim_escape_translated(model.try(:body) || model.try(:about) || "") end def resource_manifest diff --git a/decidim-core/app/cells/decidim/card_m_cell.rb b/decidim-core/app/cells/decidim/card_m_cell.rb index 423c3bb3fb4ce..c1290e332ff99 100644 --- a/decidim-core/app/cells/decidim/card_m_cell.rb +++ b/decidim-core/app/cells/decidim/card_m_cell.rb @@ -57,7 +57,7 @@ def label end def title - decidim_html_escape(translated_attribute(model.title)) + decidim_escape_translated(model.title) end def description diff --git a/decidim-core/app/cells/decidim/user_profile_cell.rb b/decidim-core/app/cells/decidim/user_profile_cell.rb index 880370bfbb37e..21af754c40411 100644 --- a/decidim-core/app/cells/decidim/user_profile_cell.rb +++ b/decidim-core/app/cells/decidim/user_profile_cell.rb @@ -29,7 +29,7 @@ def resource_path delegate :badge, to: :presented_resource def description - html_truncate(decidim_html_escape(user.about.to_s), length: 100) + html_truncate(decidim_escape_translated(user.about), length: 100) end def avatar diff --git a/decidim-core/app/views/decidim/shared/_address_details.html.erb b/decidim-core/app/views/decidim/shared/_address_details.html.erb index b863b0a2a30b3..7e2638c11c903 100644 --- a/decidim-core/app/views/decidim/shared/_address_details.html.erb +++ b/decidim-core/app/views/decidim/shared/_address_details.html.erb @@ -1,7 +1,7 @@ <% if geolocalizable.respond_to? :location %> - <%= translated_attribute geolocalizable.location %>
    + <%= decidim_sanitize(translated_attribute(geolocalizable.location)) %>
    <% end %> <%= geolocalizable.address %>
    <% if geolocalizable.respond_to? :location_hints %> - <%= translated_attribute geolocalizable.location_hints %> + <%= decidim_sanitize(translated_attribute(geolocalizable.location_hints)) %> <% end %> diff --git a/decidim-core/lib/decidim/core/test/factories.rb b/decidim-core/lib/decidim/core/test/factories.rb index d18652bb31b71..c4de629d956a9 100644 --- a/decidim-core/lib/decidim/core/test/factories.rb +++ b/decidim-core/lib/decidim/core/test/factories.rb @@ -588,8 +588,8 @@ def generate_localized_title(field = nil, skip_injection: false) # user_groups correspondence to users is by sorting order user_groups { [] } end - title { Decidim::Faker::Localized.localized { generate(:name) } } - component { create(:component, manifest_name: "dummy", skip_injection: skip_injection) } + title { generate_localized_title(:dummy_resource_title, skip_injection: skip_injection) } + component { create(:dummy_component, skip_injection: skip_injection) } author { create(:user, :confirmed, organization: component.organization, skip_injection: skip_injection) } scope { create(:scope, organization: component.organization, skip_injection: skip_injection) } @@ -598,9 +598,10 @@ def generate_localized_title(field = nil, skip_injection: false) end trait :with_endorsements do - after :create do |resource| + after :create do |resource, evaluator| 5.times.collect do - create(:endorsement, resource: resource, author: build(:user, organization: resource.component.organization)) + create(:endorsement, resource: resource, skip_injection: evaluator.skip_injection, + author: build(:user, organization: resource.component.organization, skip_injection: evaluator.skip_injection)) end end end @@ -626,9 +627,11 @@ def generate_localized_title(field = nil, skip_injection: false) after :build do |resource, evaluator| evaluator.authors_list.each do |coauthor| resource.coauthorships << if coauthor.is_a?(::Decidim::UserGroup) - build(:coauthorship, author: coauthor.users.first, user_group: coauthor, coauthorable: resource, organization: evaluator.component.organization) + build(:coauthorship, author: coauthor.users.first, user_group: coauthor, coauthorable: resource, + organization: evaluator.component.organization, skip_injection: evaluator.skip_injection) else - build(:coauthorship, author: coauthor, coauthorable: resource, organization: evaluator.component.organization) + build(:coauthorship, author: coauthor, coauthorable: resource, + organization: evaluator.component.organization, skip_injection: evaluator.skip_injection) end end end diff --git a/decidim-core/lib/decidim/core/test/shared_examples/searchable_results_examples.rb b/decidim-core/lib/decidim/core/test/shared_examples/searchable_results_examples.rb index f16498482d368..bdc435b801256 100644 --- a/decidim-core/lib/decidim/core/test/shared_examples/searchable_results_examples.rb +++ b/decidim-core/lib/decidim/core/test/shared_examples/searchable_results_examples.rb @@ -81,7 +81,7 @@ find("input#term").native.send_keys :enter expect(page).to have_current_path decidim.search_path, ignore_query: true - expect(page).to have_content(/results for the search: "#{term}"/i) + expect(page).to have_content(/results for the search: "#{term.upcase}"/i) expect(page).to have_selector(".filters__section") expect(page.find("#search-count .section-heading").text.to_i).not_to be_positive end diff --git a/decidim-core/lib/decidim/events/base_event.rb b/decidim-core/lib/decidim/events/base_event.rb index aae1a9a83f7a4..d4b7dff6ce36b 100644 --- a/decidim-core/lib/decidim/events/base_event.rb +++ b/decidim-core/lib/decidim/events/base_event.rb @@ -1,5 +1,7 @@ # frozen_string_literal: true +require_relative "../../../app/helpers/decidim/sanitize_helper" + module Decidim module Events # This class serves as a base for all event classes. Event classes are intended to @@ -8,6 +10,7 @@ module Events class BaseEvent extend ActiveModel::Translation include Decidim::TranslatableAttributes + include Decidim::SanitizeHelper class_attribute :types self.types = [] @@ -103,9 +106,9 @@ def resource_title return unless resource title = if resource.respond_to?(:title) - translated_attribute(resource.title) + decidim_sanitize_translated(resource.title) elsif resource.respond_to?(:name) - translated_attribute(resource.name) + decidim_sanitize_translated(resource.name) end Decidim::ContentProcessor.render_without_format(title, links: false).html_safe diff --git a/decidim-core/lib/decidim/events/simple_event.rb b/decidim-core/lib/decidim/events/simple_event.rb index 39e29aab7db1f..f6c1a85bbfa62 100644 --- a/decidim-core/lib/decidim/events/simple_event.rb +++ b/decidim-core/lib/decidim/events/simple_event.rb @@ -11,7 +11,6 @@ class SimpleEvent < BaseEvent include Decidim::Events::EmailEvent include Decidim::Events::NotificationEvent include Decidim::ComponentPathHelper - include Decidim::SanitizeHelper delegate :created_at, to: :resource @@ -103,18 +102,6 @@ def resource_text nil end - def resource_title - return unless resource - - title = if resource.respond_to?(:title) - decidim_sanitize_translated(resource.title) - elsif resource.respond_to?(:name) - decidim_sanitize_translated(resource.name) - end - - Decidim::ContentProcessor.render_without_format(title, links: false).html_safe - end - private def event_interpolations diff --git a/decidim-core/spec/lib/events/simple_event_spec.rb b/decidim-core/spec/lib/events/simple_event_spec.rb index c77a37ae0011b..4ad0d6732fd39 100644 --- a/decidim-core/spec/lib/events/simple_event_spec.rb +++ b/decidim-core/spec/lib/events/simple_event_spec.rb @@ -20,7 +20,7 @@ module Decidim it "sanitizes the HTML tags from the i18n options" do expect(subject.i18n_options[:resource_title]) - .to eq "alert('Hey');" + .to eq("alert('Hey');") end end end diff --git a/decidim-core/spec/mailers/reported_mailer_spec.rb b/decidim-core/spec/mailers/reported_mailer_spec.rb index 1f34691a0c0d8..a3cf8b91aac29 100644 --- a/decidim-core/spec/mailers/reported_mailer_spec.rb +++ b/decidim-core/spec/mailers/reported_mailer_spec.rb @@ -119,7 +119,7 @@ module Decidim reportable.coauthorships.destroy_all create :coauthorship, coauthorable: reportable, author: meeting - expect(email_body(mail)).to match(translated(meeting.title)) + expect(email_body(mail)).to have_content(translated(meeting.title)) end end end diff --git a/decidim-core/spec/services/decidim/open_data_exporter_spec.rb b/decidim-core/spec/services/decidim/open_data_exporter_spec.rb index ffc72cb5be91d..2f53550704873 100644 --- a/decidim-core/spec/services/decidim/open_data_exporter_spec.rb +++ b/decidim-core/spec/services/decidim/open_data_exporter_spec.rb @@ -116,7 +116,7 @@ end it "includes the results data" do - expect(csv_data).to include(result.title["en"]) + expect(csv_data).to include(translated(result.title).gsub("\"", "\"\"")) end context "with unpublished components" do @@ -125,7 +125,7 @@ end it "includes the results data" do - expect(csv_data).not_to include(result.title["en"]) + expect(csv_data).not_to include(translated(result.title).gsub("\"", "\"\"")) end end end @@ -146,7 +146,7 @@ end it "includes the meetings data" do - expect(csv_data).to include(meeting.title["en"]) + expect(csv_data).to include(meeting.title["en"].gsub(/"/, '""')) end context "with unpublished components" do diff --git a/decidim-core/spec/system/notifications_spec.rb b/decidim-core/spec/system/notifications_spec.rb index ed2b86ab1569e..a6db86a22b1a6 100644 --- a/decidim-core/spec/system/notifications_spec.rb +++ b/decidim-core/spec/system/notifications_spec.rb @@ -91,7 +91,7 @@ let(:notification_title) { "An event occured to #{translated resource.title}" } it "hides the notification from the page" do - expect(page).to have_content(translated(notification_title)) + expect(page).to have_content(decidim_sanitize_translated(notification_title)) find(".mark-as-read-button").click expect(page).to have_no_content(translated(notification_title)) expect(page).to have_content("No notifications yet") diff --git a/decidim-debates/lib/decidim/debates/test/factories.rb b/decidim-debates/lib/decidim/debates/test/factories.rb index 82d2de65751ac..359ed27a81c5d 100644 --- a/decidim-debates/lib/decidim/debates/test/factories.rb +++ b/decidim-debates/lib/decidim/debates/test/factories.rb @@ -10,17 +10,11 @@ def generate_localized_debate_title skip_injection { false } end - title do - if skip_injection - Decidim::Faker::Localized.localized { generate(:title) } - else - Decidim::Faker::Localized.localized { " #{generate(:title)}" } - end - end - description { Decidim::Faker::Localized.wrapped("

    ", "

    ") { generate_localized_debate_title } } - information_updates { Decidim::Faker::Localized.wrapped("

    ", "

    ") { generate_localized_debate_title } } - instructions { Decidim::Faker::Localized.wrapped("

    ", "

    ") { generate_localized_debate_title } } - component { build(:debates_component) } + title { generate_localized_title(:debate_title, skip_injection: skip_injection) } + description { generate_localized_description(:debate_description, skip_injection: skip_injection) } + information_updates { generate_localized_description(:debate_information_updates, skip_injection: skip_injection) } + instructions { generate_localized_description(:debate_instructions, skip_injection: skip_injection) } + component { build(:debates_component, skip_injection: skip_injection) } author { component.try(:organization) } trait :open_ama do @@ -32,7 +26,7 @@ def generate_localized_debate_title start_time { nil } end_time { nil } author do - build(:user, organization: component.organization) if component + build(:user, organization: component.organization, skip_injection: skip_injection) if component end end @@ -42,17 +36,17 @@ def generate_localized_debate_title trait :user_group_author do author do - create(:user, organization: component.organization) if component + create(:user, organization: component.organization, skip_injection: skip_injection) if component end user_group do - create(:user_group, :verified, organization: component.organization, users: [author]) if component + create(:user_group, :verified, organization: component.organization, users: [author], skip_injection: skip_injection) if component end end trait :closed do closed_at { Time.current } - conclusions { Decidim::Faker::Localized.wrapped("

    ", "

    ") { generate_localized_debate_title } } + conclusions { generate_localized_description(:debate_conclusions, skip_injection: skip_injection) } end after(:build) do |debate| @@ -62,9 +56,12 @@ def generate_localized_debate_title end factory :debates_component, parent: :component do - name { Decidim::Components::Namer.new(participatory_space.organization.available_locales, :debates).i18n_name } + transient do + skip_injection { false } + end + name { generate_component_name(participatory_space.organization.available_locales, :debates, skip_injection: skip_injection) } manifest_name { :debates } - participatory_space { create(:participatory_process, :with_steps, organization: organization) } + participatory_space { create(:participatory_process, :with_steps, organization: organization, skip_injection: skip_injection) } settings do { comments_enabled: true, diff --git a/decidim-debates/spec/system/show_spec.rb b/decidim-debates/spec/system/show_spec.rb index 2bffaeb5a3615..064acb8f62aa5 100644 --- a/decidim-debates/spec/system/show_spec.rb +++ b/decidim-debates/spec/system/show_spec.rb @@ -6,9 +6,9 @@ include_context "with a component" let(:manifest_name) { "debates" } - let(:description) { Decidim::Faker::Localized.wrapped("

    ", "

    ") { generate_localized_debate_title } } - let(:information_updates) { Decidim::Faker::Localized.wrapped("

    ", "

    ") { generate_localized_debate_title } } - let(:instructions) { Decidim::Faker::Localized.wrapped("

    ", "

    ") { generate_localized_debate_title } } + let(:description) { generate_localized_description(:debate_description) } + let(:information_updates) { generate_localized_description(:information_updates) } + let(:instructions) { generate_localized_description(:instructions) } let!(:debate) { create(:debate, component: component, description: description, information_updates: information_updates, instructions: instructions, skip_injection: true) } before do diff --git a/decidim-debates/spec/types/integration_schema_spec.rb b/decidim-debates/spec/types/integration_schema_spec.rb index a1a2e52809702..b6094259c6b1d 100644 --- a/decidim-debates/spec/types/integration_schema_spec.rb +++ b/decidim-debates/spec/types/integration_schema_spec.rb @@ -41,7 +41,7 @@ { "__typename" => "Debates", "id" => current_component.id.to_s, - "name" => { "translation" => "Debates" }, + "name" => { "translation" => translated(current_component.name) }, "debates" => { "edges" => [ { diff --git a/decidim-dev/lib/decidim/dev/test/factories.rb b/decidim-dev/lib/decidim/dev/test/factories.rb index 0a83c6a14b3e0..19a84dcdac199 100644 --- a/decidim-dev/lib/decidim/dev/test/factories.rb +++ b/decidim-dev/lib/decidim/dev/test/factories.rb @@ -6,7 +6,7 @@ skip_injection { false } end - name { Decidim::Components::Namer.new(participatory_space.organization.available_locales, :surveys).i18n_name } + name { generate_component_name(participatory_space.organization.available_locales, :dummy, skip_injection: skip_injection) } manifest_name { :dummy } end end diff --git a/decidim-dev/lib/decidim/dev/test/rspec_support/translation_helpers.rb b/decidim-dev/lib/decidim/dev/test/rspec_support/translation_helpers.rb index 215629222bea3..07c8f085dd625 100644 --- a/decidim-dev/lib/decidim/dev/test/rspec_support/translation_helpers.rb +++ b/decidim-dev/lib/decidim/dev/test/rspec_support/translation_helpers.rb @@ -25,7 +25,7 @@ def translated(field, locale: I18n.locale) # field - the field that holds the translations # upcase - a boolean to indicate whether the string must be checked upcased or not. def have_i18n_content(field, upcase: false, strip_tags: false) - have_content(i18n_content(field, upcase: upcase, strip_tags: strip_tags)) + have_content(i18n_content(field, upcase: upcase, strip_tags: strip_tags).strip) end # Checks that the current page doesn't have some translated content. It strips diff --git a/decidim-forms/app/cells/decidim/forms/question_readonly/show.erb b/decidim-forms/app/cells/decidim/forms/question_readonly/show.erb index afc5c1aa3e586..d541a80a9de53 100644 --- a/decidim-forms/app/cells/decidim/forms/question_readonly/show.erb +++ b/decidim-forms/app/cells/decidim/forms/question_readonly/show.erb @@ -1,6 +1,6 @@
  • - <%= translated_attribute(model.body) %> + <%= decidim_escape_translated(model.body) %>
    (<%= t(model.question_type, scope: "decidim.forms.question_types") %>) diff --git a/decidim-forms/lib/decidim/forms/test/factories.rb b/decidim-forms/lib/decidim/forms/test/factories.rb index fbbede5908bf1..85f73bf82fce5 100644 --- a/decidim-forms/lib/decidim/forms/test/factories.rb +++ b/decidim-forms/lib/decidim/forms/test/factories.rb @@ -5,37 +5,37 @@ FactoryBot.define do factory :questionnaire, class: "Decidim::Forms::Questionnaire" do - title { generate_localized_title } - description do - Decidim::Faker::Localized.wrapped("

    ", "

    ") do - generate_localized_title - end + transient do + skip_injection { false } end - tos { generate_localized_title } - questionnaire_for { build(:participatory_process) } + title { generate_localized_title(:questionnaire_title, skip_injection: skip_injection) } + description { generate_localized_description(:questionnaire_description, skip_injection: skip_injection) } + tos { generate_localized_title(:questionnaire_tos, skip_injection: skip_injection) } + questionnaire_for { build(:participatory_process, skip_injection: skip_injection) } salt { SecureRandom.hex(32) } trait :with_questions do questions do position = 0 qs = %w(short_answer long_answer).collect do |text_question_type| - q = build(:questionnaire_question, question_type: text_question_type, position: position) + q = build(:questionnaire_question, question_type: text_question_type, position: position, skip_injection: skip_injection) position += 1 q end - qs << build(:questionnaire_question, :with_answer_options, question_type: :single_option, position: position) + qs << build(:questionnaire_question, :with_answer_options, question_type: :single_option, position: position, skip_injection: skip_injection) qs end end trait :with_all_questions do - after(:build) do |questionaire, _evaluator| + after(:build) do |questionaire, evaluator| position = 0 %w(short_answer long_answer).collect do |text_question_type| q = create(:questionnaire_question, question_type: text_question_type, position: position, - questionnaire: questionaire) + questionnaire: questionaire, + skip_injection: evaluator.skip_injection) position += 1 questionaire.questions << q end @@ -44,7 +44,8 @@ q = create(:questionnaire_question, :with_answer_options, question_type: option_question_type, position: position, - questionnaire: questionaire) + questionnaire: questionaire, + skip_injection: evaluator.skip_injection) q.display_conditions.build( condition_question: questionaire.questions[q.position - 1], question: q, @@ -60,7 +61,8 @@ question_type: matrix_question_type, position: position, body: generate_localized_title, - questionnaire: questionaire) + questionnaire: questionaire, + skip_injection: evaluator.skip_injection) q.display_conditions.build( condition_question: questionaire.questions[q.position - 1], question: q, @@ -82,16 +84,13 @@ factory :questionnaire_question, class: "Decidim::Forms::Question" do transient do + skip_injection { false } options { [] } rows { [] } end - body { generate_localized_title } - description do - Decidim::Faker::Localized.wrapped("

    ", "

    ") do - generate_localized_title - end - end + body { generate_localized_title(:questionnaire_question_body, skip_injection: skip_injection) } + description { generate_localized_description(:questionnaire_question_description, skip_injection: skip_injection) } mandatory { false } position { 0 } question_type { Decidim::Forms::Question::TYPES.first } @@ -119,13 +118,13 @@ trait :with_answer_options do answer_options do - Array.new(3).collect { build(:answer_option) } + Array.new(3).collect { build(:answer_option, skip_injection: skip_injection) } end end trait :conditioned do display_conditions do - Array.new(3).collect { build(:display_condition) } + Array.new(3).collect { build(:display_condition, skip_injection: skip_injection) } end end @@ -139,22 +138,28 @@ end factory :answer, class: "Decidim::Forms::Answer" do + transient do + skip_injection { false } + end body { "hola" } questionnaire - question { create(:questionnaire_question, questionnaire: questionnaire) } - user { create(:user, organization: questionnaire.questionnaire_for.organization) } + question { create(:questionnaire_question, questionnaire: questionnaire, skip_injection: skip_injection) } + user { create(:user, organization: questionnaire.questionnaire_for.organization, skip_injection: skip_injection) } session_token { Digest::MD5.hexdigest(user.id.to_s) } trait :with_attachments do - after(:create) do |answer, _evaluator| - create :attachment, :with_image, attached_to: answer - create :attachment, :with_pdf, attached_to: answer + after(:create) do |answer, evaluator| + create :attachment, :with_image, attached_to: answer, skip_injection: evaluator.skip_injection + create :attachment, :with_pdf, attached_to: answer, skip_injection: evaluator.skip_injection end end end factory :answer_option, class: "Decidim::Forms::AnswerOption" do - question { create(:questionnaire_question) } + transient do + skip_injection { false } + end + question { create(:questionnaire_question, skip_injection: skip_injection) } body { generate_localized_title } free_text { false } @@ -168,31 +173,40 @@ end factory :answer_choice, class: "Decidim::Forms::AnswerChoice" do + transient do + skip_injection { false } + end answer - answer_option { create(:answer_option, question: answer.question) } - matrix_row { create(:question_matrix_row, question: answer.question) } + answer_option { create(:answer_option, question: answer.question, skip_injection: skip_injection) } + matrix_row { create(:question_matrix_row, question: answer.question, skip_injection: skip_injection) } end factory :question_matrix_row, class: "Decidim::Forms::QuestionMatrixRow" do - question { create(:questionnaire_question) } + transient do + skip_injection { false } + end + question { create(:questionnaire_question, skip_injection: skip_injection) } body { generate_localized_title } position { 0 } end factory :display_condition, class: "Decidim::Forms::DisplayCondition" do - condition_question { create(:questionnaire_question) } - question { create(:questionnaire_question, position: 1) } + transient do + skip_injection { false } + end + condition_question { create(:questionnaire_question, skip_injection: skip_injection) } + question { create(:questionnaire_question, position: 1, skip_injection: skip_injection) } condition_type { :answered } mandatory { true } trait :equal do condition_type { :equal } - answer_option { create(:answer_option, question: condition_question) } + answer_option { create(:answer_option, question: condition_question, skip_injection: skip_injection) } end trait :match do condition_type { :match } - condition_value { generate_localized_title } + condition_value { generate_localized_title(:condition_value, skip_injection: skip_injection) } end end end diff --git a/decidim-forms/lib/decidim/forms/test/shared_examples/has_questionnaire.rb b/decidim-forms/lib/decidim/forms/test/shared_examples/has_questionnaire.rb index f25e59027a9bf..5ba8547b09b2b 100644 --- a/decidim-forms/lib/decidim/forms/test/shared_examples/has_questionnaire.rb +++ b/decidim-forms/lib/decidim/forms/test/shared_examples/has_questionnaire.rb @@ -8,7 +8,7 @@ visit questionnaire_public_path expect(page).to have_i18n_content(questionnaire.title, upcase: true) - expect(page).to have_i18n_content(questionnaire.description) + expect(page).to have_i18n_content(questionnaire.description, strip_tags: true) expect(page).not_to have_css(".form.answer-questionnaire") @@ -29,7 +29,7 @@ visit questionnaire_public_path expect(page).to have_i18n_content(questionnaire.title, upcase: true) - expect(page).to have_i18n_content(questionnaire.description) + expect(page).to have_i18n_content(questionnaire.description, strip_tags: true) fill_in question.body["en"], with: "My first answer" diff --git a/decidim-initiatives/app/cells/decidim/initiatives/content_blocks/highlighted_initiatives/show.erb b/decidim-initiatives/app/cells/decidim/initiatives/content_blocks/highlighted_initiatives/show.erb index 27cc156e31c5a..fcb9df7c1d1f6 100644 --- a/decidim-initiatives/app/cells/decidim/initiatives/content_blocks/highlighted_initiatives/show.erb +++ b/decidim-initiatives/app/cells/decidim/initiatives/content_blocks/highlighted_initiatives/show.erb @@ -8,9 +8,9 @@ <%= link_to decidim_initiatives.initiative_path(initiative), class: "card card--initiative card--mini" do %> - <%= translated_attribute initiative.title %> + <%= decidim_escape_translated initiative.title %>
    - <%= decidim_html_escape(translated_attribute(initiative.title)) %> + <%= decidim_escape_translated(initiative.title) %>
    <% end %>
  • diff --git a/decidim-initiatives/app/helpers/decidim/initiatives/application_helper.rb b/decidim-initiatives/app/helpers/decidim/initiatives/application_helper.rb index 9032d134e979a..b382650287a88 100644 --- a/decidim-initiatives/app/helpers/decidim/initiatives/application_helper.rb +++ b/decidim-initiatives/app/helpers/decidim/initiatives/application_helper.rb @@ -56,7 +56,7 @@ def scope_children_to_tree(scope) def filter_types_values types_values = Decidim::InitiativesType.where(organization: current_organization).map do |type| TreeNode.new( - TreePoint.new(type.id.to_s, type.title[I18n.locale.to_s]) + TreePoint.new(type.id.to_s, decidim_escape_translated(type.title)) ) end diff --git a/decidim-initiatives/app/views/decidim/initiatives/create_initiative/select_initiative_type.html.erb b/decidim-initiatives/app/views/decidim/initiatives/create_initiative/select_initiative_type.html.erb index dba0adbb7c5c5..e5df0f606d89d 100644 --- a/decidim-initiatives/app/views/decidim/initiatives/create_initiative/select_initiative_type.html.erb +++ b/decidim-initiatives/app/views/decidim/initiatives/create_initiative/select_initiative_type.html.erb @@ -36,7 +36,7 @@
    " id="<%= "initiativeType#{type.id}" %>">

    <%= translated_attribute(type.title) %>

    - <%= raw translated_attribute type.description %> + <%= decidim_escape_translated(type.description) %>

    <%= decidim_form_for(@form, url: next_wizard_path, method: :put, html: { id: "new_initiative_#{type.id}", class: "form select-initiative_type-form" }) do |f| %> diff --git a/decidim-initiatives/app/views/decidim/initiatives/initiatives/_tags.html.erb b/decidim-initiatives/app/views/decidim/initiatives/initiatives/_tags.html.erb index 5eb30c27eecb8..4b3695cc5b44e 100644 --- a/decidim-initiatives/app/views/decidim/initiatives/initiatives/_tags.html.erb +++ b/decidim-initiatives/app/views/decidim/initiatives/initiatives/_tags.html.erb @@ -1,7 +1,7 @@
      -
    • <%= link_to translated_attribute(resource.type.title), initiatives_path(filter: { with_any_type: [resource.type.id] }) %>
    • -
    • <%= link_to translated_attribute(resource.scope_name), initiatives_path(filter: { with_any_scope: [resource.scope&.id] }) %>
    • +
    • <%= link_to decidim_escape_translated(resource.type.title).html_safe, initiatives_path(filter: { with_any_type: [resource.type.id] }) %>
    • +
    • <%= link_to decidim_escape_translated(resource.scope_name), initiatives_path(filter: { with_any_scope: [resource.scope&.id] }) %>
    • <% if resource.area %> -
    • <%= link_to translated_attribute(resource.area_name), initiatives_path(filter: { with_any_area: [resource.area.id] }) %>
    • +
    • <%= link_to decidim_escape_translated(resource.area_name), initiatives_path(filter: { with_any_area: [resource.area.id] }) %>
    • <% end %>
    diff --git a/decidim-initiatives/lib/decidim/initiatives/test/factories.rb b/decidim-initiatives/lib/decidim/initiatives/test/factories.rb index 6d785dff40a57..7b28aea94fd6b 100644 --- a/decidim-initiatives/lib/decidim/initiatives/test/factories.rb +++ b/decidim-initiatives/lib/decidim/initiatives/test/factories.rb @@ -5,8 +5,11 @@ FactoryBot.define do factory :initiatives_type, class: "Decidim::InitiativesType" do - title { generate_localized_title } - description { Decidim::Faker::Localized.wrapped("

    ", "

    ") { generate_localized_title } } + transient do + skip_injection { false } + end + title { generate_localized_title(:initiatives_type_title, skip_injection: skip_injection) } + description { generate_localized_description(:initiatives_type_description, skip_injection: skip_injection) } organization # Keep banner_image after organization banner_image do @@ -82,7 +85,7 @@ trait :with_user_extra_fields_collection do collect_user_extra_fields { true } - extra_fields_legal_information { Decidim::Faker::Localized.wrapped("

    ", "

    ") { generate_localized_title } } + extra_fields_legal_information { generate_localized_description(:initiatives_type_extra_fields_legal_information, skip_injection: skip_injection) } document_number_authorization_handler { "dummy_authorization_handler" } end @@ -100,20 +103,26 @@ end factory :initiatives_type_scope, class: "Decidim::InitiativesTypeScope" do - type { create(:initiatives_type) } - scope { create(:scope, organization: type.organization) } + transient do + skip_injection { false } + end + type { create(:initiatives_type, skip_injection: skip_injection) } + scope { create(:scope, organization: type.organization, skip_injection: skip_injection) } supports_required { 1000 } trait :with_user_extra_fields_collection do - type { create(:initiatives_type, :with_user_extra_fields_collection) } + type { create(:initiatives_type, :with_user_extra_fields_collection, skip_injection: skip_injection) } end end factory :initiative, class: "Decidim::Initiative" do - title { generate_localized_title } - description { Decidim::Faker::Localized.wrapped("

    ", "

    ") { generate_localized_title } } + transient do + skip_injection { false } + end + title { generate_localized_title(:initiative_title, skip_injection: skip_injection) } + description { generate_localized_description(:initiative_description, skip_injection: skip_injection) } organization - author { create(:user, :confirmed, organization: organization) } + author { create(:user, :confirmed, organization: organization, skip_injection: skip_injection) } published_at { Time.current } state { "published" } signature_type { "online" } @@ -121,15 +130,15 @@ signature_end_date { Date.current + 120.days } scoped_type do - create(:initiatives_type_scope, - type: create(:initiatives_type, organization: organization, signature_type: signature_type)) + create(:initiatives_type_scope, skip_injection: skip_injection, + type: create(:initiatives_type, organization: organization, signature_type: signature_type, skip_injection: skip_injection)) end - after(:create) do |initiative| + after(:create) do |initiative, evaluator| if initiative.author.is_a?(Decidim::User) && Decidim::Authorization.where(user: initiative.author).where.not(granted_at: nil).none? - create(:authorization, user: initiative.author, granted_at: Time.now.utc) + create(:authorization, user: initiative.author, granted_at: Time.now.utc, skip_injection: evaluator.skip_injection) end - create_list(:initiatives_committee_member, 3, initiative: initiative) + create_list(:initiatives_committee_member, 3, initiative: initiative, skip_injection: evaluator.skip_injection) end trait :created do @@ -198,13 +207,13 @@ trait :with_user_extra_fields_collection do scoped_type do - create(:initiatives_type_scope, - type: create(:initiatives_type, :with_user_extra_fields_collection, organization: organization)) + create(:initiatives_type_scope, skip_injection: skip_injection, + type: create(:initiatives_type, :with_user_extra_fields_collection, organization: organization, skip_injection: skip_injection)) end end trait :with_area do - area { create(:area, organization: organization) } + area { create(:area, organization: organization, skip_injection: skip_injection) } end trait :with_documents do @@ -217,7 +226,8 @@ initiative.attachments << create( :attachment, :with_pdf, - attached_to: initiative + attached_to: initiative, + skip_injection: evaluator.skip_injection ) end end @@ -233,7 +243,8 @@ initiative.attachments << create( :attachment, :with_image, - attached_to: initiative + attached_to: initiative, + skip_injection: evaluator.skip_injection ) end end @@ -241,8 +252,11 @@ end factory :initiative_user_vote, class: "Decidim::InitiativesVote" do - initiative { create(:initiative) } - author { create(:user, :confirmed, organization: initiative.organization) } + transient do + skip_injection { false } + end + initiative { create(:initiative, skip_injection: skip_injection) } + author { create(:user, :confirmed, organization: initiative.organization, skip_injection: skip_injection) } hash_id { SecureRandom.uuid } scope { initiative.scope } after(:create) do |vote| @@ -251,17 +265,23 @@ end factory :organization_user_vote, class: "Decidim::InitiativesVote" do - initiative { create(:initiative) } - author { create(:user, :confirmed, organization: initiative.organization) } - decidim_user_group_id { create(:user_group).id } - after(:create) do |support| - create(:user_group_membership, user: support.author, user_group: Decidim::UserGroup.find(support.decidim_user_group_id)) + transient do + skip_injection { false } + end + initiative { create(:initiative, skip_injection: skip_injection) } + author { create(:user, :confirmed, organization: initiative.organization, skip_injection: skip_injection) } + decidim_user_group_id { create(:user_group, skip_injection: skip_injection).id } + after(:create) do |support, evaluator| + create(:user_group_membership, user: support.author, user_group: Decidim::UserGroup.find(support.decidim_user_group_id), skip_injection: evaluator.skip_injection) end end factory :initiatives_committee_member, class: "Decidim::InitiativesCommitteeMember" do - initiative { create(:initiative) } - user { create(:user, :confirmed, organization: initiative.organization) } + transient do + skip_injection { false } + end + initiative { create(:initiative, skip_injection: skip_injection) } + user { create(:user, :confirmed, organization: initiative.organization, skip_injection: skip_injection) } state { "accepted" } trait :accepted do @@ -278,6 +298,9 @@ end factory :initiatives_settings, class: "Decidim::InitiativesSettings" do + transient do + skip_injection { false } + end initiatives_order { "random" } organization diff --git a/decidim-initiatives/spec/cells/decidim/initiatives_votes/vote_cell_spec.rb b/decidim-initiatives/spec/cells/decidim/initiatives_votes/vote_cell_spec.rb index 2c29518147f2c..8a3552855bbb5 100644 --- a/decidim-initiatives/spec/cells/decidim/initiatives_votes/vote_cell_spec.rb +++ b/decidim-initiatives/spec/cells/decidim/initiatives_votes/vote_cell_spec.rb @@ -25,7 +25,7 @@ context "when rendering" do it "shows title and identifier of initiative" do expect(subject).to have_content(vote.initiative.title[:en]) - expect(subject).to have_content(translated(vote.initiative.title, locale: :en)) + expect(subject).to have_content(decidim_sanitize_translated(vote.initiative.title)) end it "shows decrypted data" do diff --git a/decidim-initiatives/spec/events/decidim/initiatives/endorse_initiative_event_spec.rb b/decidim-initiatives/spec/events/decidim/initiatives/endorse_initiative_event_spec.rb index b2ef51d82a987..00f045006f2f0 100644 --- a/decidim-initiatives/spec/events/decidim/initiatives/endorse_initiative_event_spec.rb +++ b/decidim-initiatives/spec/events/decidim/initiatives/endorse_initiative_event_spec.rb @@ -14,7 +14,7 @@ include Decidim::TranslationsHelper let(:organization) { resource.organization } - let(:resource) { create :initiative } + let(:resource) { create(:initiative) } let(:initiative_author) { resource.author } let(:event_name) { "decidim.events.initiatives.initiative_endorsed" } let(:user) { create :user, organization: organization } diff --git a/decidim-initiatives/spec/mailers/decidim/initiatives/initiatives_mailer_spec.rb b/decidim-initiatives/spec/mailers/decidim/initiatives/initiatives_mailer_spec.rb index cde0b0f0ee7ae..d244ebfe5ea66 100644 --- a/decidim-initiatives/spec/mailers/decidim/initiatives/initiatives_mailer_spec.rb +++ b/decidim-initiatives/spec/mailers/decidim/initiatives/initiatives_mailer_spec.rb @@ -15,12 +15,12 @@ module Initiatives context "when the promoting committee is enabled" do it "renders the headers" do - expect(mail.subject).to eq("Your initiative '#{initiative.title["en"]}' has been created") + expect(mail.subject).to eq("Your initiative '#{translated(initiative.title)}' has been created") expect(mail.to).to eq([initiative.author.email]) end it "renders the body" do - expect(mail.body.encoded).to match(initiative.title["en"]) + expect(mail.body.encoded).to include(decidim_escape_translated(initiative.title)) end it "renders the promoter committee help" do @@ -40,7 +40,7 @@ module Initiatives end it "renders the body" do - expect(mail.body.encoded).to match(initiative.title["en"]) + expect(mail.body.encoded).to include(decidim_html_escape(translated(initiative.title))) end it "doesn't render the promoter committee help" do @@ -63,7 +63,7 @@ module Initiatives end it "renders the body" do - expect(mail.body).to match("The initiative #{initiative.title["en"]} has changed its status to: #{I18n.t(initiative.state, scope: "decidim.initiatives.admin_states")}") + expect(mail.body).to include("The initiative #{decidim_sanitize_translated(initiative.title)} has changed its status to: #{I18n.t(initiative.state, scope: "decidim.initiatives.admin_states")}") end end @@ -76,7 +76,7 @@ module Initiatives end it "renders the body" do - expect(mail.body.encoded).to match(initiative.title["en"]) + expect(mail.body.encoded).to include(decidim_sanitize_translated(initiative.title)) end end end diff --git a/decidim-initiatives/spec/requests/initiative_search_spec.rb b/decidim-initiatives/spec/requests/initiative_search_spec.rb index 6902320e57ac9..2677f28110ea0 100644 --- a/decidim-initiatives/spec/requests/initiative_search_spec.rb +++ b/decidim-initiatives/spec/requests/initiative_search_spec.rb @@ -45,21 +45,21 @@ end it "displays all published open initiatives by default" do - expect(subject).to include(translated(initiative1.title)) - expect(subject).to include(translated(initiative2.title)) - expect(subject).to include(translated(initiative3.title)) - expect(subject).to include(translated(area1_initiative.title)) - expect(subject).to include(translated(area2_initiative.title)) - expect(subject).to include(translated(user1_initiative.title)) - expect(subject).to include(translated(user2_initiative.title)) - expect(subject).to include(translated(group1_initiative.title)) - expect(subject).to include(translated(group2_initiative.title)) - expect(subject).not_to include(translated(closed_initiative.title)) - expect(subject).not_to include(translated(accepted_initiative.title)) - expect(subject).not_to include(translated(rejected_initiative.title)) - expect(subject).not_to include(translated(answered_rejected_initiative.title)) - expect(subject).not_to include(translated(created_initiative.title)) - expect(subject).not_to include(translated(user1_created_initiative.title)) + expect(subject).to include(decidim_escape_translated(initiative1.title)) + expect(subject).to include(decidim_escape_translated(initiative2.title)) + expect(subject).to include(decidim_escape_translated(initiative3.title)) + expect(subject).to include(decidim_escape_translated(area1_initiative.title)) + expect(subject).to include(decidim_escape_translated(area2_initiative.title)) + expect(subject).to include(decidim_escape_translated(user1_initiative.title)) + expect(subject).to include(decidim_escape_translated(user2_initiative.title)) + expect(subject).to include(decidim_escape_translated(group1_initiative.title)) + expect(subject).to include(decidim_escape_translated(group2_initiative.title)) + expect(subject).not_to include(decidim_escape_translated(closed_initiative.title)) + expect(subject).not_to include(decidim_escape_translated(accepted_initiative.title)) + expect(subject).not_to include(decidim_escape_translated(rejected_initiative.title)) + expect(subject).not_to include(decidim_escape_translated(answered_rejected_initiative.title)) + expect(subject).not_to include(decidim_escape_translated(created_initiative.title)) + expect(subject).not_to include(decidim_escape_translated(user1_created_initiative.title)) end context "when filtering by text" do @@ -67,42 +67,42 @@ let(:search_text) { "doggo" } it "displays the initiatives containing the search in the title or the body or the author name or nickname" do - expect(subject).to include(translated(initiative1.title)) - expect(subject).to include(translated(initiative2.title)) - expect(subject).not_to include(translated(initiative3.title)) - expect(subject).not_to include(translated(area1_initiative.title)) - expect(subject).not_to include(translated(area2_initiative.title)) - expect(subject).to include(translated(user1_initiative.title)) - expect(subject).to include(translated(user2_initiative.title)) - expect(subject).to include(translated(group1_initiative.title)) - expect(subject).to include(translated(group2_initiative.title)) - expect(subject).not_to include(translated(closed_initiative.title)) - expect(subject).not_to include(translated(accepted_initiative.title)) - expect(subject).not_to include(translated(rejected_initiative.title)) - expect(subject).not_to include(translated(answered_rejected_initiative.title)) - expect(subject).not_to include(translated(created_initiative.title)) - expect(subject).not_to include(translated(user1_created_initiative.title)) + expect(subject).to include(decidim_escape_translated(initiative1.title)) + expect(subject).to include(decidim_escape_translated(initiative2.title)) + expect(subject).not_to include(decidim_escape_translated(initiative3.title)) + expect(subject).not_to include(decidim_escape_translated(area1_initiative.title)) + expect(subject).not_to include(decidim_escape_translated(area2_initiative.title)) + expect(subject).to include(decidim_escape_translated(user1_initiative.title)) + expect(subject).to include(decidim_escape_translated(user2_initiative.title)) + expect(subject).to include(decidim_escape_translated(group1_initiative.title)) + expect(subject).to include(decidim_escape_translated(group2_initiative.title)) + expect(subject).not_to include(decidim_escape_translated(closed_initiative.title)) + expect(subject).not_to include(decidim_escape_translated(accepted_initiative.title)) + expect(subject).not_to include(decidim_escape_translated(rejected_initiative.title)) + expect(subject).not_to include(decidim_escape_translated(answered_rejected_initiative.title)) + expect(subject).not_to include(decidim_escape_translated(created_initiative.title)) + expect(subject).not_to include(decidim_escape_translated(user1_created_initiative.title)) end context "and the search_text is an initiative id" do let(:search_text) { initiative1.id.to_s } it "returns the initiative with the searched id" do - expect(subject).to include(translated(initiative1.title)) - expect(subject).not_to include(translated(initiative2.title)) - expect(subject).not_to include(translated(initiative3.title)) - expect(subject).not_to include(translated(area1_initiative.title)) - expect(subject).not_to include(translated(area2_initiative.title)) - expect(subject).not_to include(translated(user1_initiative.title)) - expect(subject).not_to include(translated(user2_initiative.title)) - expect(subject).not_to include(translated(group1_initiative.title)) - expect(subject).not_to include(translated(group2_initiative.title)) - expect(subject).not_to include(translated(closed_initiative.title)) - expect(subject).not_to include(translated(accepted_initiative.title)) - expect(subject).not_to include(translated(rejected_initiative.title)) - expect(subject).not_to include(translated(answered_rejected_initiative.title)) - expect(subject).not_to include(translated(created_initiative.title)) - expect(subject).not_to include(translated(user1_created_initiative.title)) + expect(subject).to include(decidim_escape_translated(initiative1.title)) + expect(subject).not_to include(decidim_escape_translated(initiative2.title)) + expect(subject).not_to include(decidim_escape_translated(initiative3.title)) + expect(subject).not_to include(decidim_escape_translated(area1_initiative.title)) + expect(subject).not_to include(decidim_escape_translated(area2_initiative.title)) + expect(subject).not_to include(decidim_escape_translated(user1_initiative.title)) + expect(subject).not_to include(decidim_escape_translated(user2_initiative.title)) + expect(subject).not_to include(decidim_escape_translated(group1_initiative.title)) + expect(subject).not_to include(decidim_escape_translated(group2_initiative.title)) + expect(subject).not_to include(decidim_escape_translated(closed_initiative.title)) + expect(subject).not_to include(decidim_escape_translated(accepted_initiative.title)) + expect(subject).not_to include(decidim_escape_translated(rejected_initiative.title)) + expect(subject).not_to include(decidim_escape_translated(answered_rejected_initiative.title)) + expect(subject).not_to include(decidim_escape_translated(created_initiative.title)) + expect(subject).not_to include(decidim_escape_translated(user1_created_initiative.title)) end end end @@ -114,21 +114,21 @@ let(:state) { %w(open) } it "displays only open initiatives" do - expect(subject).to include(translated(initiative1.title)) - expect(subject).to include(translated(initiative2.title)) - expect(subject).to include(translated(initiative3.title)) - expect(subject).to include(translated(area1_initiative.title)) - expect(subject).to include(translated(area2_initiative.title)) - expect(subject).to include(translated(user1_initiative.title)) - expect(subject).to include(translated(user2_initiative.title)) - expect(subject).to include(translated(group1_initiative.title)) - expect(subject).to include(translated(group2_initiative.title)) - expect(subject).not_to include(translated(closed_initiative.title)) - expect(subject).not_to include(translated(accepted_initiative.title)) - expect(subject).not_to include(translated(rejected_initiative.title)) - expect(subject).not_to include(translated(answered_rejected_initiative.title)) - expect(subject).not_to include(translated(created_initiative.title)) - expect(subject).not_to include(translated(user1_created_initiative.title)) + expect(subject).to include(decidim_escape_translated(initiative1.title)) + expect(subject).to include(decidim_escape_translated(initiative2.title)) + expect(subject).to include(decidim_escape_translated(initiative3.title)) + expect(subject).to include(decidim_escape_translated(area1_initiative.title)) + expect(subject).to include(decidim_escape_translated(area2_initiative.title)) + expect(subject).to include(decidim_escape_translated(user1_initiative.title)) + expect(subject).to include(decidim_escape_translated(user2_initiative.title)) + expect(subject).to include(decidim_escape_translated(group1_initiative.title)) + expect(subject).to include(decidim_escape_translated(group2_initiative.title)) + expect(subject).not_to include(decidim_escape_translated(closed_initiative.title)) + expect(subject).not_to include(decidim_escape_translated(accepted_initiative.title)) + expect(subject).not_to include(decidim_escape_translated(rejected_initiative.title)) + expect(subject).not_to include(decidim_escape_translated(answered_rejected_initiative.title)) + expect(subject).not_to include(decidim_escape_translated(created_initiative.title)) + expect(subject).not_to include(decidim_escape_translated(user1_created_initiative.title)) end end @@ -136,21 +136,21 @@ let(:state) { %w(closed) } it "displays only closed initiatives" do - expect(subject).not_to include(translated(initiative1.title)) - expect(subject).not_to include(translated(initiative2.title)) - expect(subject).not_to include(translated(initiative3.title)) - expect(subject).not_to include(translated(area1_initiative.title)) - expect(subject).not_to include(translated(area2_initiative.title)) - expect(subject).not_to include(translated(user1_initiative.title)) - expect(subject).not_to include(translated(user2_initiative.title)) - expect(subject).not_to include(translated(group1_initiative.title)) - expect(subject).not_to include(translated(group2_initiative.title)) - expect(subject).to include(translated(closed_initiative.title)) - expect(subject).to include(translated(accepted_initiative.title)) - expect(subject).to include(translated(rejected_initiative.title)) - expect(subject).to include(translated(answered_rejected_initiative.title)) - expect(subject).not_to include(translated(created_initiative.title)) - expect(subject).not_to include(translated(user1_created_initiative.title)) + expect(subject).not_to include(decidim_escape_translated(initiative1.title)) + expect(subject).not_to include(decidim_escape_translated(initiative2.title)) + expect(subject).not_to include(decidim_escape_translated(initiative3.title)) + expect(subject).not_to include(decidim_escape_translated(area1_initiative.title)) + expect(subject).not_to include(decidim_escape_translated(area2_initiative.title)) + expect(subject).not_to include(decidim_escape_translated(user1_initiative.title)) + expect(subject).not_to include(decidim_escape_translated(user2_initiative.title)) + expect(subject).not_to include(decidim_escape_translated(group1_initiative.title)) + expect(subject).not_to include(decidim_escape_translated(group2_initiative.title)) + expect(subject).to include(decidim_escape_translated(closed_initiative.title)) + expect(subject).to include(decidim_escape_translated(accepted_initiative.title)) + expect(subject).to include(decidim_escape_translated(rejected_initiative.title)) + expect(subject).to include(decidim_escape_translated(answered_rejected_initiative.title)) + expect(subject).not_to include(decidim_escape_translated(created_initiative.title)) + expect(subject).not_to include(decidim_escape_translated(user1_created_initiative.title)) end end @@ -158,21 +158,21 @@ let(:state) { %w(accepted) } it "returns only accepted initiatives" do - expect(subject).not_to include(translated(initiative1.title)) - expect(subject).not_to include(translated(initiative2.title)) - expect(subject).not_to include(translated(initiative3.title)) - expect(subject).not_to include(translated(area1_initiative.title)) - expect(subject).not_to include(translated(area2_initiative.title)) - expect(subject).not_to include(translated(user1_initiative.title)) - expect(subject).not_to include(translated(user2_initiative.title)) - expect(subject).not_to include(translated(group1_initiative.title)) - expect(subject).not_to include(translated(group2_initiative.title)) - expect(subject).not_to include(translated(closed_initiative.title)) - expect(subject).to include(translated(accepted_initiative.title)) - expect(subject).not_to include(translated(rejected_initiative.title)) - expect(subject).not_to include(translated(answered_rejected_initiative.title)) - expect(subject).not_to include(translated(created_initiative.title)) - expect(subject).not_to include(translated(user1_created_initiative.title)) + expect(subject).not_to include(decidim_escape_translated(initiative1.title)) + expect(subject).not_to include(decidim_escape_translated(initiative2.title)) + expect(subject).not_to include(decidim_escape_translated(initiative3.title)) + expect(subject).not_to include(decidim_escape_translated(area1_initiative.title)) + expect(subject).not_to include(decidim_escape_translated(area2_initiative.title)) + expect(subject).not_to include(decidim_escape_translated(user1_initiative.title)) + expect(subject).not_to include(decidim_escape_translated(user2_initiative.title)) + expect(subject).not_to include(decidim_escape_translated(group1_initiative.title)) + expect(subject).not_to include(decidim_escape_translated(group2_initiative.title)) + expect(subject).not_to include(decidim_escape_translated(closed_initiative.title)) + expect(subject).to include(decidim_escape_translated(accepted_initiative.title)) + expect(subject).not_to include(decidim_escape_translated(rejected_initiative.title)) + expect(subject).not_to include(decidim_escape_translated(answered_rejected_initiative.title)) + expect(subject).not_to include(decidim_escape_translated(created_initiative.title)) + expect(subject).not_to include(decidim_escape_translated(user1_created_initiative.title)) end end @@ -180,21 +180,21 @@ let(:state) { %w(rejected) } it "returns only rejected initiatives" do - expect(subject).not_to include(translated(initiative1.title)) - expect(subject).not_to include(translated(initiative2.title)) - expect(subject).not_to include(translated(initiative3.title)) - expect(subject).not_to include(translated(area1_initiative.title)) - expect(subject).not_to include(translated(area2_initiative.title)) - expect(subject).not_to include(translated(user1_initiative.title)) - expect(subject).not_to include(translated(user2_initiative.title)) - expect(subject).not_to include(translated(group1_initiative.title)) - expect(subject).not_to include(translated(group2_initiative.title)) - expect(subject).not_to include(translated(closed_initiative.title)) - expect(subject).not_to include(translated(accepted_initiative.title)) - expect(subject).to include(translated(rejected_initiative.title)) - expect(subject).to include(translated(answered_rejected_initiative.title)) - expect(subject).not_to include(translated(created_initiative.title)) - expect(subject).not_to include(translated(user1_created_initiative.title)) + expect(subject).not_to include(decidim_escape_translated(initiative1.title)) + expect(subject).not_to include(decidim_escape_translated(initiative2.title)) + expect(subject).not_to include(decidim_escape_translated(initiative3.title)) + expect(subject).not_to include(decidim_escape_translated(area1_initiative.title)) + expect(subject).not_to include(decidim_escape_translated(area2_initiative.title)) + expect(subject).not_to include(decidim_escape_translated(user1_initiative.title)) + expect(subject).not_to include(decidim_escape_translated(user2_initiative.title)) + expect(subject).not_to include(decidim_escape_translated(group1_initiative.title)) + expect(subject).not_to include(decidim_escape_translated(group2_initiative.title)) + expect(subject).not_to include(decidim_escape_translated(closed_initiative.title)) + expect(subject).not_to include(decidim_escape_translated(accepted_initiative.title)) + expect(subject).to include(decidim_escape_translated(rejected_initiative.title)) + expect(subject).to include(decidim_escape_translated(answered_rejected_initiative.title)) + expect(subject).not_to include(decidim_escape_translated(created_initiative.title)) + expect(subject).not_to include(decidim_escape_translated(user1_created_initiative.title)) end end @@ -202,21 +202,21 @@ let(:state) { %w(answered) } it "returns only answered initiatives" do - expect(subject).not_to include(translated(initiative1.title)) - expect(subject).not_to include(translated(initiative2.title)) - expect(subject).not_to include(translated(initiative3.title)) - expect(subject).not_to include(translated(area1_initiative.title)) - expect(subject).not_to include(translated(area2_initiative.title)) - expect(subject).not_to include(translated(user1_initiative.title)) - expect(subject).not_to include(translated(user2_initiative.title)) - expect(subject).not_to include(translated(group1_initiative.title)) - expect(subject).not_to include(translated(group2_initiative.title)) - expect(subject).not_to include(translated(closed_initiative.title)) - expect(subject).not_to include(translated(accepted_initiative.title)) - expect(subject).not_to include(translated(rejected_initiative.title)) - expect(subject).to include(translated(answered_rejected_initiative.title)) - expect(subject).not_to include(translated(created_initiative.title)) - expect(subject).not_to include(translated(user1_created_initiative.title)) + expect(subject).not_to include(decidim_escape_translated(initiative1.title)) + expect(subject).not_to include(decidim_escape_translated(initiative2.title)) + expect(subject).not_to include(decidim_escape_translated(initiative3.title)) + expect(subject).not_to include(decidim_escape_translated(area1_initiative.title)) + expect(subject).not_to include(decidim_escape_translated(area2_initiative.title)) + expect(subject).not_to include(decidim_escape_translated(user1_initiative.title)) + expect(subject).not_to include(decidim_escape_translated(user2_initiative.title)) + expect(subject).not_to include(decidim_escape_translated(group1_initiative.title)) + expect(subject).not_to include(decidim_escape_translated(group2_initiative.title)) + expect(subject).not_to include(decidim_escape_translated(closed_initiative.title)) + expect(subject).not_to include(decidim_escape_translated(accepted_initiative.title)) + expect(subject).not_to include(decidim_escape_translated(rejected_initiative.title)) + expect(subject).to include(decidim_escape_translated(answered_rejected_initiative.title)) + expect(subject).not_to include(decidim_escape_translated(created_initiative.title)) + expect(subject).not_to include(decidim_escape_translated(user1_created_initiative.title)) end end @@ -224,21 +224,21 @@ let(:state) { %w(open closed) } it "displays only closed initiatives" do - expect(subject).to include(translated(initiative1.title)) - expect(subject).to include(translated(initiative2.title)) - expect(subject).to include(translated(initiative3.title)) - expect(subject).to include(translated(area1_initiative.title)) - expect(subject).to include(translated(area2_initiative.title)) - expect(subject).to include(translated(user1_initiative.title)) - expect(subject).to include(translated(user2_initiative.title)) - expect(subject).to include(translated(group1_initiative.title)) - expect(subject).to include(translated(group2_initiative.title)) - expect(subject).to include(translated(closed_initiative.title)) - expect(subject).to include(translated(accepted_initiative.title)) - expect(subject).to include(translated(rejected_initiative.title)) - expect(subject).to include(translated(answered_rejected_initiative.title)) - expect(subject).not_to include(translated(created_initiative.title)) - expect(subject).not_to include(translated(user1_created_initiative.title)) + expect(subject).to include(decidim_escape_translated(initiative1.title)) + expect(subject).to include(decidim_escape_translated(initiative2.title)) + expect(subject).to include(decidim_escape_translated(initiative3.title)) + expect(subject).to include(decidim_escape_translated(area1_initiative.title)) + expect(subject).to include(decidim_escape_translated(area2_initiative.title)) + expect(subject).to include(decidim_escape_translated(user1_initiative.title)) + expect(subject).to include(decidim_escape_translated(user2_initiative.title)) + expect(subject).to include(decidim_escape_translated(group1_initiative.title)) + expect(subject).to include(decidim_escape_translated(group2_initiative.title)) + expect(subject).to include(decidim_escape_translated(closed_initiative.title)) + expect(subject).to include(decidim_escape_translated(accepted_initiative.title)) + expect(subject).to include(decidim_escape_translated(rejected_initiative.title)) + expect(subject).to include(decidim_escape_translated(answered_rejected_initiative.title)) + expect(subject).not_to include(decidim_escape_translated(created_initiative.title)) + expect(subject).not_to include(decidim_escape_translated(user1_created_initiative.title)) end end end @@ -250,21 +250,21 @@ let(:scope_id) { [scoped_type1.scope.id] } it "displays initiatives by scope" do - expect(subject).to include(translated(initiative1.title)) - expect(subject).not_to include(translated(initiative2.title)) - expect(subject).not_to include(translated(initiative3.title)) - expect(subject).not_to include(translated(area1_initiative.title)) - expect(subject).not_to include(translated(area2_initiative.title)) - expect(subject).not_to include(translated(user1_initiative.title)) - expect(subject).not_to include(translated(user2_initiative.title)) - expect(subject).not_to include(translated(group1_initiative.title)) - expect(subject).not_to include(translated(group2_initiative.title)) - expect(subject).not_to include(translated(closed_initiative.title)) - expect(subject).not_to include(translated(accepted_initiative.title)) - expect(subject).not_to include(translated(rejected_initiative.title)) - expect(subject).not_to include(translated(answered_rejected_initiative.title)) - expect(subject).not_to include(translated(created_initiative.title)) - expect(subject).not_to include(translated(user1_created_initiative.title)) + expect(subject).to include(decidim_escape_translated(initiative1.title)) + expect(subject).not_to include(decidim_escape_translated(initiative2.title)) + expect(subject).not_to include(decidim_escape_translated(initiative3.title)) + expect(subject).not_to include(decidim_escape_translated(area1_initiative.title)) + expect(subject).not_to include(decidim_escape_translated(area2_initiative.title)) + expect(subject).not_to include(decidim_escape_translated(user1_initiative.title)) + expect(subject).not_to include(decidim_escape_translated(user2_initiative.title)) + expect(subject).not_to include(decidim_escape_translated(group1_initiative.title)) + expect(subject).not_to include(decidim_escape_translated(group2_initiative.title)) + expect(subject).not_to include(decidim_escape_translated(closed_initiative.title)) + expect(subject).not_to include(decidim_escape_translated(accepted_initiative.title)) + expect(subject).not_to include(decidim_escape_translated(rejected_initiative.title)) + expect(subject).not_to include(decidim_escape_translated(answered_rejected_initiative.title)) + expect(subject).not_to include(decidim_escape_translated(created_initiative.title)) + expect(subject).not_to include(decidim_escape_translated(user1_created_initiative.title)) end end @@ -272,21 +272,21 @@ let(:scope_id) { [scoped_type2.scope.id, scoped_type1.scope.id] } it "displays initiatives by scope" do - expect(subject).to include(translated(initiative1.title)) - expect(subject).to include(translated(initiative2.title)) - expect(subject).not_to include(translated(initiative3.title)) - expect(subject).not_to include(translated(area1_initiative.title)) - expect(subject).not_to include(translated(area2_initiative.title)) - expect(subject).not_to include(translated(user1_initiative.title)) - expect(subject).not_to include(translated(user2_initiative.title)) - expect(subject).not_to include(translated(group1_initiative.title)) - expect(subject).not_to include(translated(group2_initiative.title)) - expect(subject).not_to include(translated(closed_initiative.title)) - expect(subject).not_to include(translated(accepted_initiative.title)) - expect(subject).not_to include(translated(rejected_initiative.title)) - expect(subject).not_to include(translated(answered_rejected_initiative.title)) - expect(subject).not_to include(translated(created_initiative.title)) - expect(subject).not_to include(translated(user1_created_initiative.title)) + expect(subject).to include(decidim_escape_translated(initiative1.title)) + expect(subject).to include(decidim_escape_translated(initiative2.title)) + expect(subject).not_to include(decidim_escape_translated(initiative3.title)) + expect(subject).not_to include(decidim_escape_translated(area1_initiative.title)) + expect(subject).not_to include(decidim_escape_translated(area2_initiative.title)) + expect(subject).not_to include(decidim_escape_translated(user1_initiative.title)) + expect(subject).not_to include(decidim_escape_translated(user2_initiative.title)) + expect(subject).not_to include(decidim_escape_translated(group1_initiative.title)) + expect(subject).not_to include(decidim_escape_translated(group2_initiative.title)) + expect(subject).not_to include(decidim_escape_translated(closed_initiative.title)) + expect(subject).not_to include(decidim_escape_translated(accepted_initiative.title)) + expect(subject).not_to include(decidim_escape_translated(rejected_initiative.title)) + expect(subject).not_to include(decidim_escape_translated(answered_rejected_initiative.title)) + expect(subject).not_to include(decidim_escape_translated(created_initiative.title)) + expect(subject).not_to include(decidim_escape_translated(user1_created_initiative.title)) end end end @@ -308,21 +308,21 @@ let(:author) { "any" } it "displays all initiatives except the created ones" do - expect(subject).to include(translated(initiative1.title)) - expect(subject).to include(translated(initiative2.title)) - expect(subject).to include(translated(initiative3.title)) - expect(subject).to include(translated(area1_initiative.title)) - expect(subject).to include(translated(area2_initiative.title)) - expect(subject).to include(translated(user1_initiative.title)) - expect(subject).to include(translated(user2_initiative.title)) - expect(subject).to include(translated(group1_initiative.title)) - expect(subject).to include(translated(group2_initiative.title)) - expect(subject).to include(translated(closed_initiative.title)) - expect(subject).to include(translated(accepted_initiative.title)) - expect(subject).to include(translated(rejected_initiative.title)) - expect(subject).to include(translated(answered_rejected_initiative.title)) - expect(subject).not_to include(translated(created_initiative.title)) - expect(subject).not_to include(translated(user1_created_initiative.title)) + expect(subject).to include(decidim_escape_translated(initiative1.title)) + expect(subject).to include(decidim_escape_translated(initiative2.title)) + expect(subject).to include(decidim_escape_translated(initiative3.title)) + expect(subject).to include(decidim_escape_translated(area1_initiative.title)) + expect(subject).to include(decidim_escape_translated(area2_initiative.title)) + expect(subject).to include(decidim_escape_translated(user1_initiative.title)) + expect(subject).to include(decidim_escape_translated(user2_initiative.title)) + expect(subject).to include(decidim_escape_translated(group1_initiative.title)) + expect(subject).to include(decidim_escape_translated(group2_initiative.title)) + expect(subject).to include(decidim_escape_translated(closed_initiative.title)) + expect(subject).to include(decidim_escape_translated(accepted_initiative.title)) + expect(subject).to include(decidim_escape_translated(rejected_initiative.title)) + expect(subject).to include(decidim_escape_translated(answered_rejected_initiative.title)) + expect(subject).not_to include(decidim_escape_translated(created_initiative.title)) + expect(subject).not_to include(decidim_escape_translated(user1_created_initiative.title)) end end @@ -330,21 +330,21 @@ let(:author) { "myself" } it "contains only initiatives of the author, including their created upcoming initiative" do - expect(subject).not_to include(translated(initiative1.title)) - expect(subject).not_to include(translated(initiative2.title)) - expect(subject).not_to include(translated(initiative3.title)) - expect(subject).not_to include(translated(area1_initiative.title)) - expect(subject).not_to include(translated(area2_initiative.title)) - expect(subject).to include(translated(user1_initiative.title)) - expect(subject).not_to include(translated(user2_initiative.title)) - expect(subject).not_to include(translated(group1_initiative.title)) - expect(subject).not_to include(translated(group2_initiative.title)) - expect(subject).not_to include(translated(closed_initiative.title)) - expect(subject).not_to include(translated(accepted_initiative.title)) - expect(subject).not_to include(translated(rejected_initiative.title)) - expect(subject).not_to include(translated(answered_rejected_initiative.title)) - expect(subject).not_to include(translated(created_initiative.title)) - expect(subject).to include(translated(user1_created_initiative.title)) + expect(subject).not_to include(decidim_escape_translated(initiative1.title)) + expect(subject).not_to include(decidim_escape_translated(initiative2.title)) + expect(subject).not_to include(decidim_escape_translated(initiative3.title)) + expect(subject).not_to include(decidim_escape_translated(area1_initiative.title)) + expect(subject).not_to include(decidim_escape_translated(area2_initiative.title)) + expect(subject).to include(decidim_escape_translated(user1_initiative.title)) + expect(subject).not_to include(decidim_escape_translated(user2_initiative.title)) + expect(subject).not_to include(decidim_escape_translated(group1_initiative.title)) + expect(subject).not_to include(decidim_escape_translated(group2_initiative.title)) + expect(subject).not_to include(decidim_escape_translated(closed_initiative.title)) + expect(subject).not_to include(decidim_escape_translated(accepted_initiative.title)) + expect(subject).not_to include(decidim_escape_translated(rejected_initiative.title)) + expect(subject).not_to include(decidim_escape_translated(answered_rejected_initiative.title)) + expect(subject).not_to include(decidim_escape_translated(created_initiative.title)) + expect(subject).to include(decidim_escape_translated(user1_created_initiative.title)) end end end @@ -354,42 +354,42 @@ let(:type_id) { [initiative1.type.id] } it "displays initiatives of correct type" do - expect(subject).to include(translated(initiative1.title)) - expect(subject).not_to include(translated(initiative2.title)) - expect(subject).not_to include(translated(initiative3.title)) - expect(subject).not_to include(translated(area1_initiative.title)) - expect(subject).not_to include(translated(area2_initiative.title)) - expect(subject).not_to include(translated(user1_initiative.title)) - expect(subject).not_to include(translated(user2_initiative.title)) - expect(subject).not_to include(translated(group1_initiative.title)) - expect(subject).not_to include(translated(group2_initiative.title)) - expect(subject).not_to include(translated(closed_initiative.title)) - expect(subject).not_to include(translated(accepted_initiative.title)) - expect(subject).not_to include(translated(rejected_initiative.title)) - expect(subject).not_to include(translated(answered_rejected_initiative.title)) - expect(subject).not_to include(translated(created_initiative.title)) - expect(subject).not_to include(translated(user1_created_initiative.title)) + expect(subject).to include(decidim_escape_translated(initiative1.title)) + expect(subject).not_to include(decidim_escape_translated(initiative2.title)) + expect(subject).not_to include(decidim_escape_translated(initiative3.title)) + expect(subject).not_to include(decidim_escape_translated(area1_initiative.title)) + expect(subject).not_to include(decidim_escape_translated(area2_initiative.title)) + expect(subject).not_to include(decidim_escape_translated(user1_initiative.title)) + expect(subject).not_to include(decidim_escape_translated(user2_initiative.title)) + expect(subject).not_to include(decidim_escape_translated(group1_initiative.title)) + expect(subject).not_to include(decidim_escape_translated(group2_initiative.title)) + expect(subject).not_to include(decidim_escape_translated(closed_initiative.title)) + expect(subject).not_to include(decidim_escape_translated(accepted_initiative.title)) + expect(subject).not_to include(decidim_escape_translated(rejected_initiative.title)) + expect(subject).not_to include(decidim_escape_translated(answered_rejected_initiative.title)) + expect(subject).not_to include(decidim_escape_translated(created_initiative.title)) + expect(subject).not_to include(decidim_escape_translated(user1_created_initiative.title)) end context "and providing multiple types" do let(:type_id) { [initiative1.type.id, initiative2.type.id] } it "displays initiatives of correct type" do - expect(subject).to include(translated(initiative1.title)) - expect(subject).to include(translated(initiative2.title)) - expect(subject).not_to include(translated(initiative3.title)) - expect(subject).not_to include(translated(area1_initiative.title)) - expect(subject).not_to include(translated(area2_initiative.title)) - expect(subject).not_to include(translated(user1_initiative.title)) - expect(subject).not_to include(translated(user2_initiative.title)) - expect(subject).not_to include(translated(group1_initiative.title)) - expect(subject).not_to include(translated(group2_initiative.title)) - expect(subject).not_to include(translated(closed_initiative.title)) - expect(subject).not_to include(translated(accepted_initiative.title)) - expect(subject).not_to include(translated(rejected_initiative.title)) - expect(subject).not_to include(translated(answered_rejected_initiative.title)) - expect(subject).not_to include(translated(created_initiative.title)) - expect(subject).not_to include(translated(user1_created_initiative.title)) + expect(subject).to include(decidim_escape_translated(initiative1.title)) + expect(subject).to include(decidim_escape_translated(initiative2.title)) + expect(subject).not_to include(decidim_escape_translated(initiative3.title)) + expect(subject).not_to include(decidim_escape_translated(area1_initiative.title)) + expect(subject).not_to include(decidim_escape_translated(area2_initiative.title)) + expect(subject).not_to include(decidim_escape_translated(user1_initiative.title)) + expect(subject).not_to include(decidim_escape_translated(user2_initiative.title)) + expect(subject).not_to include(decidim_escape_translated(group1_initiative.title)) + expect(subject).not_to include(decidim_escape_translated(group2_initiative.title)) + expect(subject).not_to include(decidim_escape_translated(closed_initiative.title)) + expect(subject).not_to include(decidim_escape_translated(accepted_initiative.title)) + expect(subject).not_to include(decidim_escape_translated(rejected_initiative.title)) + expect(subject).not_to include(decidim_escape_translated(answered_rejected_initiative.title)) + expect(subject).not_to include(decidim_escape_translated(created_initiative.title)) + expect(subject).not_to include(decidim_escape_translated(user1_created_initiative.title)) end end end @@ -401,21 +401,21 @@ let(:area_id) { [area1.id.to_s] } it "displays initiatives by area" do - expect(subject).not_to include(translated(initiative1.title)) - expect(subject).not_to include(translated(initiative2.title)) - expect(subject).not_to include(translated(initiative3.title)) - expect(subject).to include(translated(area1_initiative.title)) - expect(subject).not_to include(translated(area2_initiative.title)) - expect(subject).not_to include(translated(user1_initiative.title)) - expect(subject).not_to include(translated(user2_initiative.title)) - expect(subject).not_to include(translated(group1_initiative.title)) - expect(subject).not_to include(translated(group2_initiative.title)) - expect(subject).not_to include(translated(closed_initiative.title)) - expect(subject).not_to include(translated(accepted_initiative.title)) - expect(subject).not_to include(translated(rejected_initiative.title)) - expect(subject).not_to include(translated(answered_rejected_initiative.title)) - expect(subject).not_to include(translated(created_initiative.title)) - expect(subject).not_to include(translated(user1_created_initiative.title)) + expect(subject).not_to include(decidim_escape_translated(initiative1.title)) + expect(subject).not_to include(decidim_escape_translated(initiative2.title)) + expect(subject).not_to include(decidim_escape_translated(initiative3.title)) + expect(subject).to include(decidim_escape_translated(area1_initiative.title)) + expect(subject).not_to include(decidim_escape_translated(area2_initiative.title)) + expect(subject).not_to include(decidim_escape_translated(user1_initiative.title)) + expect(subject).not_to include(decidim_escape_translated(user2_initiative.title)) + expect(subject).not_to include(decidim_escape_translated(group1_initiative.title)) + expect(subject).not_to include(decidim_escape_translated(group2_initiative.title)) + expect(subject).not_to include(decidim_escape_translated(closed_initiative.title)) + expect(subject).not_to include(decidim_escape_translated(accepted_initiative.title)) + expect(subject).not_to include(decidim_escape_translated(rejected_initiative.title)) + expect(subject).not_to include(decidim_escape_translated(answered_rejected_initiative.title)) + expect(subject).not_to include(decidim_escape_translated(created_initiative.title)) + expect(subject).not_to include(decidim_escape_translated(user1_created_initiative.title)) end end @@ -423,21 +423,21 @@ let(:area_id) { [area1.id.to_s, area2.id.to_s] } it "displays initiatives by area" do - expect(subject).not_to include(translated(initiative1.title)) - expect(subject).not_to include(translated(initiative2.title)) - expect(subject).not_to include(translated(initiative3.title)) - expect(subject).to include(translated(area1_initiative.title)) - expect(subject).to include(translated(area2_initiative.title)) - expect(subject).not_to include(translated(user1_initiative.title)) - expect(subject).not_to include(translated(user2_initiative.title)) - expect(subject).not_to include(translated(group1_initiative.title)) - expect(subject).not_to include(translated(group2_initiative.title)) - expect(subject).not_to include(translated(closed_initiative.title)) - expect(subject).not_to include(translated(accepted_initiative.title)) - expect(subject).not_to include(translated(rejected_initiative.title)) - expect(subject).not_to include(translated(answered_rejected_initiative.title)) - expect(subject).not_to include(translated(created_initiative.title)) - expect(subject).not_to include(translated(user1_created_initiative.title)) + expect(subject).not_to include(decidim_escape_translated(initiative1.title)) + expect(subject).not_to include(decidim_escape_translated(initiative2.title)) + expect(subject).not_to include(decidim_escape_translated(initiative3.title)) + expect(subject).to include(decidim_escape_translated(area1_initiative.title)) + expect(subject).to include(decidim_escape_translated(area2_initiative.title)) + expect(subject).not_to include(decidim_escape_translated(user1_initiative.title)) + expect(subject).not_to include(decidim_escape_translated(user2_initiative.title)) + expect(subject).not_to include(decidim_escape_translated(group1_initiative.title)) + expect(subject).not_to include(decidim_escape_translated(group2_initiative.title)) + expect(subject).not_to include(decidim_escape_translated(closed_initiative.title)) + expect(subject).not_to include(decidim_escape_translated(accepted_initiative.title)) + expect(subject).not_to include(decidim_escape_translated(rejected_initiative.title)) + expect(subject).not_to include(decidim_escape_translated(answered_rejected_initiative.title)) + expect(subject).not_to include(decidim_escape_translated(created_initiative.title)) + expect(subject).not_to include(decidim_escape_translated(user1_created_initiative.title)) end end end diff --git a/decidim-meetings/app/views/decidim/meetings/admin/agenda/_form.html.erb b/decidim-meetings/app/views/decidim/meetings/admin/agenda/_form.html.erb index 9013d3fddbd3e..c7e5e74f8c97c 100644 --- a/decidim-meetings/app/views/decidim/meetings/admin/agenda/_form.html.erb +++ b/decidim-meetings/app/views/decidim/meetings/admin/agenda/_form.html.erb @@ -3,7 +3,7 @@

    - <%= present(@meeting).title %>  <%= icon "arrow-right" %> <%= title %> + <%= present(@meeting).title(html_escape: true) %>  <%= icon "arrow-right" %> <%= title %>

    diff --git a/decidim-meetings/app/views/decidim/meetings/layouts/live_event.html.erb b/decidim-meetings/app/views/decidim/meetings/layouts/live_event.html.erb index 6aa142ec43009..56527e10b8a40 100644 --- a/decidim-meetings/app/views/decidim/meetings/layouts/live_event.html.erb +++ b/decidim-meetings/app/views/decidim/meetings/layouts/live_event.html.erb @@ -24,7 +24,7 @@ <% end %>
    - <%= current_organization.name %> / <%= present(meeting).title(links: true) %> + <%= current_organization.name %> / <%= present(meeting).title(links: true, html_escape: true) %>
    diff --git a/decidim-meetings/app/views/decidim/meetings/meetings/_meeting_agenda.html.erb b/decidim-meetings/app/views/decidim/meetings/meetings/_meeting_agenda.html.erb index e028dea85c705..c893ea103b542 100644 --- a/decidim-meetings/app/views/decidim/meetings/meetings/_meeting_agenda.html.erb +++ b/decidim-meetings/app/views/decidim/meetings/meetings/_meeting_agenda.html.erb @@ -11,7 +11,7 @@ <%= display_duration_agenda_items(agenda_item.id, index, agenda_items_times) %>
    -

    <%= translated_attribute(agenda_item.description).html_safe %>

    +

    <%= decidim_sanitize_translated(agenda_item.description).html_safe %>

    <% if agenda_item.agenda_item_children.presence %> <% parent_start_time = agenda_items_times[index][:start_time] %> @@ -22,7 +22,7 @@ <%= translated_attribute(agenda_item_child.title) %>  <%= display_duration_agenda_items(agenda_item_child.id, index_child, agenda_item_children_times) %> -

    <%= translated_attribute(agenda_item_child.description).html_safe %>

    +

    <%= decidim_sanitize_translated(agenda_item_child.description).html_safe %>

    <% end %> <% end %> <% end %> diff --git a/decidim-meetings/lib/decidim/meetings/test/factories.rb b/decidim-meetings/lib/decidim/meetings/test/factories.rb index dfc722c3e6e11..75d723b6f6108 100644 --- a/decidim-meetings/lib/decidim/meetings/test/factories.rb +++ b/decidim-meetings/lib/decidim/meetings/test/factories.rb @@ -6,9 +6,12 @@ FactoryBot.define do factory :meeting_component, parent: :component do - name { Decidim::Components::Namer.new(participatory_space.organization.available_locales, :meetings).i18n_name } + transient do + skip_injection { false } + end + name { generate_component_name(participatory_space.organization.available_locales, :meetings, skip_injection: skip_injection) } manifest_name { :meetings } - participatory_space { create(:participatory_process, :with_steps, organization: organization) } + participatory_space { create(:participatory_process, :with_steps, organization: organization, skip_injection: skip_injection) } trait :with_creation_enabled do settings do @@ -20,10 +23,14 @@ end factory :meeting, class: "Decidim::Meetings::Meeting" do - title { generate_localized_title } - description { Decidim::Faker::Localized.wrapped("

    ", "

    ") { generate_localized_title } } - location { Decidim::Faker::Localized.wrapped("

    ", "

    ") { generate_localized_title } } - location_hints { Decidim::Faker::Localized.wrapped("

    ", "

    ") { generate_localized_title } } + transient do + skip_injection { false } + end + + title { generate_localized_title(:meeting_title, skip_injection: skip_injection) } + description { generate_localized_description(:meeting_description, skip_injection: skip_injection) } + location { generate_localized_description(:meeting_location, skip_injection: skip_injection) } + location_hints { generate_localized_description(:meeting_location_hints, skip_injection: skip_injection) } address { Faker::Lorem.sentence(word_count: 3) } latitude { Faker::Address.latitude } longitude { Faker::Address.longitude } @@ -33,10 +40,10 @@ transparent { true } questionnaire { build(:questionnaire) } registration_form_enabled { true } - registration_terms { Decidim::Faker::Localized.wrapped("

    ", "

    ") { generate_localized_title } } + registration_terms { generate_localized_description(:meeting_registration_terms, skip_injection: skip_injection) } registration_type { :on_this_platform } type_of_meeting { :in_person } - component { build(:component, manifest_name: "meetings") } + component { build(:meeting_component) } iframe_access_level { :all } iframe_embed_type { :none } @@ -71,7 +78,7 @@ end trait :not_official do - author { create(:user, organization: component.organization) if component } + author { create(:user, organization: component.organization, skip_injection: skip_injection) if component } end trait :with_services do @@ -82,7 +89,7 @@ end after(:build) do |meeting, evaluator| - meeting.services = evaluator.services || build_list(:service, 2, meeting: meeting) + meeting.services = evaluator.services || build_list(:service, 2, meeting: meeting, skip_injection: evaluator.skip_injection) end end @@ -90,15 +97,15 @@ trait :user_group_author do author do - create(:user, organization: component.organization) if component + create(:user, organization: component.organization, skip_injection: skip_injection) if component end user_group do - create(:user_group, :verified, organization: component.organization, users: [author]) if component + create(:user_group, :verified, organization: component.organization, users: [author], skip_injection: skip_injection) if component end end trait :closed do - closing_report { generate_localized_title } + closing_report { generate_localized_title(:meeting_closing_report, skip_injection: skip_injection) } attendees_count { rand(50) } contributions_count { rand(50) } attending_organizations { Array.new(3) { Faker::TvShows::GameOfThrones.house }.join(", ") } @@ -117,7 +124,7 @@ registrations_enabled { true } available_slots { 10 } reserved_slots { 4 } - registration_terms { generate_localized_title } + registration_terms { generate_localized_title(:meeting_registration_terms, skip_injection: skip_injection) } end trait :past do @@ -170,41 +177,53 @@ end factory :registration, class: "Decidim::Meetings::Registration" do + transient do + skip_injection { false } + end meeting user end factory :agenda, class: "Decidim::Meetings::Agenda" do + transient do + skip_injection { false } + end meeting - title { generate_localized_title } + title { generate_localized_title(:meeting_agenda_title, skip_injection: skip_injection) } visible { true } trait :with_agenda_items do - after(:create) do |agenda, _evaluator| - create_list(:agenda_item, 2, :with_children, agenda: agenda) + after(:create) do |agenda, evaluator| + create_list(:agenda_item, 2, :with_children, agenda: agenda, skip_injection: evaluator.skip_injection) end end end factory :agenda_item, class: "Decidim::Meetings::AgendaItem" do + transient do + skip_injection { false } + end agenda - title { generate_localized_title } - description { Decidim::Faker::Localized.wrapped("

    ", "

    ") { generate_localized_title } } + title { generate_localized_title(:meeting_agenda_item_title, skip_injection: skip_injection) } + description { generate_localized_description(:meeting_agenda_item_description, skip_injection: skip_injection) } duration { 15 } position { 0 } trait :with_parent do - parent { create(:agenda_item, agenda: agenda) } + parent { create(:agenda_item, agenda: agenda, skip_injection: skip_injection) } end trait :with_children do after(:create) do |agenda_item, evaluator| - create_list(:agenda_item, 2, parent: agenda_item, agenda: evaluator.agenda) + create_list(:agenda_item, 2, parent: agenda_item, agenda: evaluator.agenda, skip_injection: evaluator.skip_injection) end end end factory :invite, class: "Decidim::Meetings::Invite" do + transient do + skip_injection { false } + end meeting user sent_at { 1.day.ago } @@ -221,31 +240,41 @@ end factory :service, class: "Decidim::Meetings::Service" do + transient do + skip_injection { false } + end meeting - title { generate_localized_title } - description { Decidim::Faker::Localized.wrapped("

    ", "

    ") { generate_localized_title } } + title { generate_localized_title(:meeting_service_title, skip_injection: skip_injection) } + description { generate_localized_description(:meeting_service_description, skip_injection: skip_injection) } end factory :poll, class: "Decidim::Meetings::Poll" do + transient do + skip_injection { false } + end meeting end factory :meetings_poll_questionnaire, class: "Decidim::Meetings::Questionnaire" do - questionnaire_for { build(:poll) } + transient do + skip_injection { false } + end + questionnaire_for { build(:poll, skip_injection: skip_injection) } end factory :meetings_poll_question, class: "Decidim::Meetings::Question" do transient do + skip_injection { false } options { [] } end - body { generate_localized_title } + body { generate_localized_title(:meeting_poll_question_body, skip_injection: skip_injection) } position { 0 } status { 0 } question_type { Decidim::Meetings::Question::QUESTION_TYPES.first } questionnaire factory: :meetings_poll_questionnaire answer_options do - Array.new(3).collect { build(:meetings_poll_answer_option, question: nil) } + Array.new(3).collect { build(:meetings_poll_answer_option, question: nil, skip_injection: skip_injection) } end trait :unpublished do @@ -262,18 +291,27 @@ end factory :meetings_poll_answer, class: "Decidim::Meetings::Answer" do + transient do + skip_injection { false } + end questionnaire factory: :meetings_poll_questionnaire - question { create(:meetings_poll_question, questionnaire: questionnaire) } - user { create(:user, organization: questionnaire.questionnaire_for.organization) } + question { create(:meetings_poll_question, questionnaire: questionnaire, skip_injection: skip_injection) } + user { create(:user, organization: questionnaire.questionnaire_for.organization, skip_injection: skip_injection) } end factory :meetings_poll_answer_option, class: "Decidim::Meetings::AnswerOption" do - question { create(:meetings_poll_question) } + transient do + skip_injection { false } + end + question { create(:meetings_poll_question, skip_injection: skip_injection) } body { generate_localized_title } end factory :meetings_poll_answer_choice, class: "Decidim::Meetings::AnswerChoice" do + transient do + skip_injection { false } + end answer factory: :meetings_poll_answer - answer_option { create(:meetings_poll_answer_option, question: answer.question) } + answer_option { create(:meetings_poll_answer_option, question: answer.question, skip_injection: skip_injection) } end end diff --git a/decidim-meetings/spec/cells/decidim/meetings/meeting_highlighted_list_item_cell_spec.rb b/decidim-meetings/spec/cells/decidim/meetings/meeting_highlighted_list_item_cell_spec.rb index 03628480cfe62..ae42ef368bc85 100644 --- a/decidim-meetings/spec/cells/decidim/meetings/meeting_highlighted_list_item_cell_spec.rb +++ b/decidim-meetings/spec/cells/decidim/meetings/meeting_highlighted_list_item_cell_spec.rb @@ -18,15 +18,8 @@ module Decidim::Meetings end context "when title contains special html entities" do - let!(:original_title) { meeting.title["en"] } - - before do - meeting.update!(title: { en: "#{original_title} &'<" }) - meeting.reload - end - it "escapes them correctly" do - expect(subject.to_s).to include("<strong>#{original_title}</strong> &'<") + expect(subject.to_s).to include(decidim_escape_translated(meeting.title).gsub(""", "\"")) end end end diff --git a/decidim-meetings/spec/cells/decidim/meetings/meeting_list_item_cell_spec.rb b/decidim-meetings/spec/cells/decidim/meetings/meeting_list_item_cell_spec.rb index 79ec0adbb1f88..ae5c30d7cb3a9 100644 --- a/decidim-meetings/spec/cells/decidim/meetings/meeting_list_item_cell_spec.rb +++ b/decidim-meetings/spec/cells/decidim/meetings/meeting_list_item_cell_spec.rb @@ -16,15 +16,8 @@ module Decidim::Meetings end context "when title contains special html entities" do - let!(:original_title) { meeting.title["en"] } - - before do - meeting.update!(title: { en: "#{original_title} &'<" }) - meeting.reload - end - it "escapes them correctly" do - expect(subject.to_s).to include("<strong>#{original_title}</strong> &'<") + expect(subject.to_s).to include(decidim_escape_translated(meeting.title).gsub(""", "\"")) end end end diff --git a/decidim-meetings/spec/cells/decidim/meetings/meeting_m_cell_spec.rb b/decidim-meetings/spec/cells/decidim/meetings/meeting_m_cell_spec.rb index 998d02ec2b1dd..a9ccc59e8f7bf 100644 --- a/decidim-meetings/spec/cells/decidim/meetings/meeting_m_cell_spec.rb +++ b/decidim-meetings/spec/cells/decidim/meetings/meeting_m_cell_spec.rb @@ -50,17 +50,11 @@ module Decidim::Meetings context "when title contains special html entities" do let(:show_space) { true } - before do - @original_title = meeting.title["en"] - meeting.update!(title: { en: "#{meeting.title["en"]} &'<" }) - meeting.reload - end - it "escapes them correctly" do - expect(the_cell.title).to eq("#{@original_title} &'<") + expect(the_cell.title).to eq(decidim_escape_translated(meeting.title)) # as the `cell` test helper wraps content in a Capybara artifact that already converts html entities # we should compare with the expected visual result, as we were checking the DOM instead of the html - expect(cell_html).to have_content("#{@original_title} &'<") + expect(cell_html).to have_content(translated(meeting.title)) end end end diff --git a/decidim-meetings/spec/requests/meeting_directory_search_spec.rb b/decidim-meetings/spec/requests/meeting_directory_search_spec.rb index 246f1ecefb427..2c3ecd2230557 100644 --- a/decidim-meetings/spec/requests/meeting_directory_search_spec.rb +++ b/decidim-meetings/spec/requests/meeting_directory_search_spec.rb @@ -34,11 +34,11 @@ end it "displays all meetings without any filters" do - expect(subject).to include(translated(meeting1.title)) - expect(subject).to include(translated(meeting2.title)) - expect(subject).to include(translated(meeting3.title)) - expect(subject).to include(translated(meeting4.title)) - expect(subject).to include(translated(meeting5.title)) + expect(subject).to include(decidim_escape_translated(meeting1.title)) + expect(subject).to include(decidim_escape_translated(meeting2.title)) + expect(subject).to include(decidim_escape_translated(meeting3.title)) + expect(subject).to include(decidim_escape_translated(meeting4.title)) + expect(subject).to include(decidim_escape_translated(meeting5.title)) end context "when filtering by category" do @@ -48,11 +48,11 @@ let(:category_ids) { nil } it "displays all resources" do - expect(subject).to include(translated(meeting1.title)) - expect(subject).to include(translated(meeting2.title)) - expect(subject).to include(translated(meeting3.title)) - expect(subject).to include(translated(meeting4.title)) - expect(subject).to include(translated(meeting5.title)) + expect(subject).to include(decidim_escape_translated(meeting1.title)) + expect(subject).to include(decidim_escape_translated(meeting2.title)) + expect(subject).to include(decidim_escape_translated(meeting3.title)) + expect(subject).to include(decidim_escape_translated(meeting4.title)) + expect(subject).to include(decidim_escape_translated(meeting5.title)) end end @@ -60,11 +60,11 @@ let(:category_ids) { [category2.id] } it "displays only resources for that category and its children" do - expect(subject).not_to include(translated(meeting1.title)) - expect(subject).not_to include(translated(meeting2.title)) - expect(subject).to include(translated(meeting3.title)) - expect(subject).to include(translated(meeting4.title)) - expect(subject).not_to include(translated(meeting5.title)) + expect(subject).not_to include(decidim_escape_translated(meeting1.title)) + expect(subject).not_to include(decidim_escape_translated(meeting2.title)) + expect(subject).to include(decidim_escape_translated(meeting3.title)) + expect(subject).to include(decidim_escape_translated(meeting4.title)) + expect(subject).not_to include(decidim_escape_translated(meeting5.title)) end end @@ -72,11 +72,11 @@ let(:category_ids) { [child_category.id] } it "displays only resources for that category" do - expect(subject).not_to include(translated(meeting1.title)) - expect(subject).not_to include(translated(meeting2.title)) - expect(subject).not_to include(translated(meeting3.title)) - expect(subject).to include(translated(meeting4.title)) - expect(subject).not_to include(translated(meeting5.title)) + expect(subject).not_to include(decidim_escape_translated(meeting1.title)) + expect(subject).not_to include(decidim_escape_translated(meeting2.title)) + expect(subject).not_to include(decidim_escape_translated(meeting3.title)) + expect(subject).to include(decidim_escape_translated(meeting4.title)) + expect(subject).not_to include(decidim_escape_translated(meeting5.title)) end end @@ -85,11 +85,11 @@ let(:category_ids) { [value] } it "displays only resources for that participatory_process - all categories and sub-categories" do - expect(subject).not_to include(translated(meeting1.title)) - expect(subject).to include(translated(meeting2.title)) - expect(subject).to include(translated(meeting3.title)) - expect(subject).to include(translated(meeting4.title)) - expect(subject).not_to include(translated(meeting5.title)) + expect(subject).not_to include(decidim_escape_translated(meeting1.title)) + expect(subject).to include(decidim_escape_translated(meeting2.title)) + expect(subject).to include(decidim_escape_translated(meeting3.title)) + expect(subject).to include(decidim_escape_translated(meeting4.title)) + expect(subject).not_to include(decidim_escape_translated(meeting5.title)) end end @@ -97,11 +97,11 @@ let(:category_ids) { ["without"] } it "returns resources without a category" do - expect(subject).to include(translated(meeting1.title)) - expect(subject).not_to include(translated(meeting2.title)) - expect(subject).not_to include(translated(meeting3.title)) - expect(subject).not_to include(translated(meeting4.title)) - expect(subject).to include(translated(meeting5.title)) + expect(subject).to include(decidim_escape_translated(meeting1.title)) + expect(subject).not_to include(decidim_escape_translated(meeting2.title)) + expect(subject).not_to include(decidim_escape_translated(meeting3.title)) + expect(subject).not_to include(decidim_escape_translated(meeting4.title)) + expect(subject).to include(decidim_escape_translated(meeting5.title)) end end @@ -109,11 +109,11 @@ let(:category_ids) { ["without", category1.id] } it "returns resources without a category and with the selected category" do - expect(subject).to include(translated(meeting1.title)) - expect(subject).to include(translated(meeting2.title)) - expect(subject).not_to include(translated(meeting3.title)) - expect(subject).not_to include(translated(meeting4.title)) - expect(subject).to include(translated(meeting5.title)) + expect(subject).to include(decidim_escape_translated(meeting1.title)) + expect(subject).to include(decidim_escape_translated(meeting2.title)) + expect(subject).not_to include(decidim_escape_translated(meeting3.title)) + expect(subject).not_to include(decidim_escape_translated(meeting4.title)) + expect(subject).to include(decidim_escape_translated(meeting5.title)) end end end diff --git a/decidim-meetings/spec/requests/meeting_search_spec.rb b/decidim-meetings/spec/requests/meeting_search_spec.rb index 6ad586376c1d2..1360123d1b716 100644 --- a/decidim-meetings/spec/requests/meeting_search_spec.rb +++ b/decidim-meetings/spec/requests/meeting_search_spec.rb @@ -73,10 +73,10 @@ it_behaves_like "a resource search with origin", :published_meeting it "displays all meetings without any filters" do - expect(subject).to include(translated(meeting1.title)) - expect(subject).to include(translated(meeting2.title)) - expect(subject).not_to include(translated(meeting3.title)) - expect(subject).not_to include(translated(meeting4.title)) + expect(subject).to include(decidim_escape_translated(meeting1.title)) + expect(subject).to include(decidim_escape_translated(meeting2.title)) + expect(subject).not_to include(decidim_escape_translated(meeting3.title)) + expect(subject).not_to include(decidim_escape_translated(meeting4.title)) end context "when searching by date" do @@ -97,11 +97,11 @@ let(:date) { ["upcoming"] } it "only returns that are scheduled in the future" do - expect(subject).to include(translated(meeting1.title)) - expect(subject).to include(translated(meeting2.title)) - expect(subject).not_to include(translated(meeting3.title)) - expect(subject).not_to include(translated(meeting4.title)) - expect(subject).not_to include(translated(past_meeting.title)) + expect(subject).to include(decidim_escape_translated(meeting1.title)) + expect(subject).to include(decidim_escape_translated(meeting2.title)) + expect(subject).not_to include(decidim_escape_translated(meeting3.title)) + expect(subject).not_to include(decidim_escape_translated(meeting4.title)) + expect(subject).not_to include(decidim_escape_translated(past_meeting.title)) end end @@ -109,11 +109,11 @@ let(:date) { ["past"] } it "only returns meetings that were scheduled in the past" do - expect(subject).not_to include(translated(meeting1.title)) - expect(subject).not_to include(translated(meeting2.title)) - expect(subject).not_to include(translated(meeting3.title)) - expect(subject).not_to include(translated(meeting4.title)) - expect(subject).to include(translated(past_meeting.title)) + expect(subject).not_to include(decidim_escape_translated(meeting1.title)) + expect(subject).not_to include(decidim_escape_translated(meeting2.title)) + expect(subject).not_to include(decidim_escape_translated(meeting3.title)) + expect(subject).not_to include(decidim_escape_translated(meeting4.title)) + expect(subject).to include(decidim_escape_translated(past_meeting.title)) end end end @@ -125,10 +125,10 @@ let(:availability) { "withdrawn" } it "only returns meetings that are withdrawn" do - expect(subject).not_to include(translated(meeting1.title)) - expect(subject).not_to include(translated(meeting2.title)) - expect(subject).not_to include(translated(meeting3.title)) - expect(subject).to include(translated(meeting4.title)) + expect(subject).not_to include(decidim_escape_translated(meeting1.title)) + expect(subject).not_to include(decidim_escape_translated(meeting2.title)) + expect(subject).not_to include(decidim_escape_translated(meeting3.title)) + expect(subject).to include(decidim_escape_translated(meeting4.title)) end end @@ -136,10 +136,10 @@ let(:availability) { nil } it "only returns meetings that are not withdrawn" do - expect(subject).to include(translated(meeting1.title)) - expect(subject).to include(translated(meeting2.title)) - expect(subject).not_to include(translated(meeting3.title)) - expect(subject).not_to include(translated(meeting4.title)) + expect(subject).to include(decidim_escape_translated(meeting1.title)) + expect(subject).to include(decidim_escape_translated(meeting2.title)) + expect(subject).not_to include(decidim_escape_translated(meeting3.title)) + expect(subject).not_to include(decidim_escape_translated(meeting4.title)) end end end @@ -148,10 +148,10 @@ let(:filter_params) { { search_text_cont: "TestCheck" } } it "show only the meeting containing the search_text" do - expect(subject).to include(translated(meeting1.title)) - expect(subject).not_to include(translated(meeting2.title)) - expect(subject).not_to include(translated(meeting3.title)) - expect(subject).not_to include(translated(meeting4.title)) + expect(subject).to include(decidim_escape_translated(meeting1.title)) + expect(subject).not_to include(decidim_escape_translated(meeting2.title)) + expect(subject).not_to include(decidim_escape_translated(meeting3.title)) + expect(subject).not_to include(decidim_escape_translated(meeting4.title)) end end @@ -176,8 +176,8 @@ let(:type) { ["online"] } it "only lists online meetings" do - expect(subject).to include(translated(online_meeting.title)) - expect(subject).not_to include(translated(in_person_meeting.title)) + expect(subject).to include(decidim_escape_translated(online_meeting.title)) + expect(subject).not_to include(decidim_escape_translated(in_person_meeting.title)) end end @@ -185,8 +185,8 @@ let(:type) { ["in_person"] } it "only lists online meetings" do - expect(subject).to include(translated(in_person_meeting.title)) - expect(subject).not_to include(translated(online_meeting.title)) + expect(subject).to include(decidim_escape_translated(in_person_meeting.title)) + expect(subject).not_to include(decidim_escape_translated(online_meeting.title)) end end end @@ -208,8 +208,8 @@ let(:activity) { "all" } it "returns all the meetings" do - expect(subject).to include(translated(meeting1.title)) - expect(subject).to include(translated(meeting2.title)) + expect(subject).to include(decidim_escape_translated(meeting1.title)) + expect(subject).to include(decidim_escape_translated(meeting2.title)) end end @@ -217,8 +217,8 @@ let(:activity) { "my_meetings" } it "returns only the meeting created by the current user" do - expect(subject).to include(translated(meeting1.title)) - expect(subject).not_to include(translated(meeting2.title)) + expect(subject).to include(decidim_escape_translated(meeting1.title)) + expect(subject).not_to include(decidim_escape_translated(meeting2.title)) end end end diff --git a/decidim-meetings/spec/services/calendar/component_calendar_spec.rb b/decidim-meetings/spec/services/calendar/component_calendar_spec.rb index a5cb89dd10842..f4193b60d682d 100644 --- a/decidim-meetings/spec/services/calendar/component_calendar_spec.rb +++ b/decidim-meetings/spec/services/calendar/component_calendar_spec.rb @@ -6,12 +6,13 @@ module Decidim::Meetings::Calendar describe ComponentCalendar do subject { described_class.for(component) } - let!(:meeting) { create :meeting, :published } + let(:title) { Decidim::Faker::Localized.localized { " #{generate(:title)}" } } + let!(:meeting) { create :meeting, :published, title: title } let!(:component) { meeting.component } - let!(:another_meeting) { create :meeting, :published, component: component } - let!(:external_meeting) { create :meeting } - let!(:unpublished_meeting) { create :meeting, component: component } - let!(:withdrawn_meeting) { create :meeting, :published, :withdrawn } + let!(:another_meeting) { create(:meeting, :published, component: component, title: Decidim::Faker::Localized.localized { generate(:title) }) } + let!(:external_meeting) { create(:meeting, title: Decidim::Faker::Localized.localized { generate(:title) }) } + let!(:unpublished_meeting) { create(:meeting, component: component, title: Decidim::Faker::Localized.localized { generate(:title) }) } + let!(:withdrawn_meeting) { create(:meeting, :published, :withdrawn, title: Decidim::Faker::Localized.localized { generate(:title) }) } describe "#calendar" do it "renders a full calendar" do @@ -55,7 +56,7 @@ module Decidim::Meetings::Calendar let!(:filters) { { "with_any_origin" => ["", "official"], "with_any_type" => ["", "online"] } } context "when no meetings returned" do - let!(:online_meeting) { create :meeting, :published, :not_official, :online, component: component } + let!(:online_meeting) { create :meeting, :published, :not_official, :online, component: component, title: title } it "returns a nil value" do expect(subject).to be_nil @@ -63,7 +64,7 @@ module Decidim::Meetings::Calendar end context "when having meetings returned" do - let!(:online_meeting) { create :meeting, :published, :official, :online, component: component } + let!(:online_meeting) { create :meeting, :published, :official, :online, component: component, title: Decidim::Faker::Localized.localized { generate(:title) } } it "renders the meetings of the given component based on filters" do expect(subject).to include(online_meeting.title["en"]) diff --git a/decidim-meetings/spec/services/calendar/meeting_calendar_spec.rb b/decidim-meetings/spec/services/calendar/meeting_calendar_spec.rb index c41dd96dc6f7a..38f13b2ed10de 100644 --- a/decidim-meetings/spec/services/calendar/meeting_calendar_spec.rb +++ b/decidim-meetings/spec/services/calendar/meeting_calendar_spec.rb @@ -5,9 +5,8 @@ module Decidim::Meetings::Calendar describe MeetingCalendar do subject { described_class.for(meeting) } - - let!(:meeting) { create :meeting } - let!(:another_meeting) { create :meeting } + let!(:meeting) { create(:meeting, title: Decidim::Faker::Localized.localized { " #{generate(:title)}" }) } + let!(:another_meeting) { create(:meeting, title: Decidim::Faker::Localized.localized { " #{generate(:title)}" }) } describe "#calendar" do it "renders a full calendar" do diff --git a/decidim-meetings/spec/services/calendar/organization_calendar_spec.rb b/decidim-meetings/spec/services/calendar/organization_calendar_spec.rb index eedd11b2abb16..6d2500020f520 100644 --- a/decidim-meetings/spec/services/calendar/organization_calendar_spec.rb +++ b/decidim-meetings/spec/services/calendar/organization_calendar_spec.rb @@ -6,12 +6,12 @@ module Decidim::Meetings::Calendar describe OrganizationCalendar do subject { described_class.for(organization) } - let!(:meeting) { create :meeting, :published } + let!(:meeting) { create :meeting, :published, title: Decidim::Faker::Localized.localized { " meeting title" } } let!(:component) { meeting.component } let!(:component2) { create :meeting_component, participatory_space: component.participatory_space } let!(:organization) { component.organization } - let!(:another_meeting) { create :meeting, :published, component: component2 } - let!(:external_meeting) { create :meeting } + let!(:another_meeting) { create :meeting, :published, component: component2, title: Decidim::Faker::Localized.localized { " another meeting title" } } + let!(:external_meeting) { create :meeting, title: Decidim::Faker::Localized.localized { " external meeting title" } } describe "#calendar" do it "renders a full calendar" do @@ -48,9 +48,9 @@ module Decidim::Meetings::Calendar describe "#filters" do subject { described_class.for(organization, filters) } - let(:online_meeting) { create :meeting, :official, :online, component: component } - let(:online_meeting2) { create :meeting, :not_official, :online, component: component2 } - let!(:withdrawn_meeting) { create :meeting, :published, :withdrawn, component: component2 } + let(:online_meeting) { create :meeting, :official, :online, component: component, title: Decidim::Faker::Localized.localized { " online meeting title" } } + let(:online_meeting2) { create :meeting, :not_official, :online, component: component2, title: Decidim::Faker::Localized.localized { " online meeting 2 " } } + let!(:withdrawn_meeting) { create :meeting, :published, :withdrawn, component: component2, title: Decidim::Faker::Localized.localized { " withdrawn meeting title" } } let!(:filters) { { "with_any_origin" => ["", "official"], "with_any_type" => ["", "online"] } } context "when no meetings returned" do diff --git a/decidim-meetings/spec/system/explore_meetings_spec.rb b/decidim-meetings/spec/system/explore_meetings_spec.rb index cb54c60a2a537..0dd273ffeb627 100644 --- a/decidim-meetings/spec/system/explore_meetings_spec.rb +++ b/decidim-meetings/spec/system/explore_meetings_spec.rb @@ -478,9 +478,9 @@ it "shows all meeting info" do expect(page).to have_i18n_content(meeting.title) - expect(page).to have_i18n_content(meeting.description) - expect(page).to have_i18n_content(meeting.location) - expect(page).to have_i18n_content(meeting.location_hints) + expect(page).to have_i18n_content(meeting.description, strip_tags: true) + expect(page).to have_i18n_content(meeting.location, strip_tags: true) + expect(page).to have_i18n_content(meeting.location_hints, strip_tags: true) expect(page).to have_content(meeting.address) expect(page).to have_content(meeting.reference) @@ -594,7 +594,7 @@ it "shows the closing report" do visit_component click_link translated(meeting.title) - expect(page).to have_i18n_content(meeting.closing_report) + expect(page).to have_i18n_content(meeting.closing_report, strip_tags: true) within ".definition-data" do expect(page).to have_content("ATTENDEES COUNT\n#{meeting.attendees_count}") diff --git a/decidim-meetings/spec/system/meeting_registrations_spec.rb b/decidim-meetings/spec/system/meeting_registrations_spec.rb index 433d36e6f54c1..045f80ccf6646 100644 --- a/decidim-meetings/spec/system/meeting_registrations_spec.rb +++ b/decidim-meetings/spec/system/meeting_registrations_spec.rb @@ -61,7 +61,7 @@ def questionnaire_public_path visit questionnaire_public_path expect(page).to have_i18n_content(questionnaire.title, upcase: true) - expect(page).to have_i18n_content(questionnaire.description) + expect(page).to have_i18n_content(questionnaire.description, strip_tags: true) expect(page).to have_no_i18n_content(question.body) @@ -98,7 +98,7 @@ def questionnaire_public_path visit questionnaire_public_path expect(page).to have_i18n_content(questionnaire.title, upcase: true) - expect(page).to have_i18n_content(questionnaire.description) + expect(page).to have_i18n_content(questionnaire.description, strip_tags: true) expect(page).to have_no_i18n_content(question.body) @@ -153,7 +153,7 @@ def questionnaire_public_path visit questionnaire_public_path expect(page).to have_i18n_content(questionnaire.title, upcase: true) - expect(page).to have_i18n_content(questionnaire.description) + expect(page).to have_i18n_content(questionnaire.description, strip_tags: true) expect(page).not_to have_css(".form.answer-questionnaire") @@ -309,7 +309,7 @@ def questionnaire_public_path visit questionnaire_public_path expect(page).to have_i18n_content(questionnaire.title, upcase: true) - expect(page).to have_i18n_content(questionnaire.description) + expect(page).to have_i18n_content(questionnaire.description, strip_tags: true) expect(page).to have_content "Show my attendance publicly" expect(page).to have_field("public_participation", checked: false) @@ -483,7 +483,7 @@ def questionnaire_public_path visit questionnaire_public_path expect(page).to have_i18n_content(questionnaire.title, upcase: true) - expect(page).to have_i18n_content(questionnaire.description) + expect(page).to have_i18n_content(questionnaire.description, strip_tags: true) expect(page).to have_no_i18n_content(question.body) diff --git a/decidim-meetings/spec/system/participatory_processes_view_hooks_spec.rb b/decidim-meetings/spec/system/participatory_processes_view_hooks_spec.rb index 9a6b092fa5ba8..fce8efc7725b7 100644 --- a/decidim-meetings/spec/system/participatory_processes_view_hooks_spec.rb +++ b/decidim-meetings/spec/system/participatory_processes_view_hooks_spec.rb @@ -17,10 +17,10 @@ visit resource_locator(participatory_process).path expect(page).to have_css(".past_meetings .card--list__item", count: 3) - expect(page).not_to have_content(/#{translated(moderated_meeting.title)}/i) + expect(page).to have_no_content(/#{translated(moderated_meeting.title)}/i) past_meetings.sort_by { |m| [m.end_time, m.start_time] }.last(3).each do |meeting| - expect(page).to have_content(/#{translated(meeting.title)}/i) + expect(page).to have_content(translated(meeting.title)) end end end @@ -38,7 +38,7 @@ expect(page).not_to have_content(/#{translated(moderated_meeting.title)}/i) upcoming_meetings.sort_by { |m| [m.start_time, m.end_time] }.first(3).each do |meeting| - expect(page).to have_content(/#{translated(meeting.title)}/i) + expect(page).to have_content(translated(meeting.title)) end end end @@ -58,11 +58,11 @@ expect(page).not_to have_css(".past_meetings") past_meetings.each do |meeting| - expect(page).not_to have_content(/#{translated(meeting.title)}/i) + expect(page).not_to have_content(translated(meeting.title)) end upcoming_meetings.sort_by { |m| [m.start_time, m.end_time] }.first(3).each do |meeting| - expect(page).to have_content(/#{translated(meeting.title)}/i) + expect(page).to have_content(translated(meeting.title)) end end end diff --git a/decidim-meetings/spec/types/integration_schema_spec.rb b/decidim-meetings/spec/types/integration_schema_spec.rb index 9b6976d6f3b91..11108c3be2ce0 100644 --- a/decidim-meetings/spec/types/integration_schema_spec.rb +++ b/decidim-meetings/spec/types/integration_schema_spec.rb @@ -72,7 +72,7 @@ { "__typename" => "Meetings", "id" => current_component.id.to_s, - "name" => { "translation" => "Meetings" }, + "name" => { "translation" => translated(current_component.name) }, "meetings" => { "edges" => [ { diff --git a/decidim-participatory_processes/spec/events/decidim/participatory_process_role_assigned_event_spec.rb b/decidim-participatory_processes/spec/events/decidim/participatory_process_role_assigned_event_spec.rb index 7de3122a8237d..bc898579db835 100644 --- a/decidim-participatory_processes/spec/events/decidim/participatory_process_role_assigned_event_spec.rb +++ b/decidim-participatory_processes/spec/events/decidim/participatory_process_role_assigned_event_spec.rb @@ -10,7 +10,7 @@ let(:event_name) { "decidim.events.participatory_process.role_assigned" } let(:role) { create(:participatory_process_user_role, user: user, participatory_process: resource, role: :admin) } let(:extra) { { role: role } } - let(:email_subject) { "You have been assigned as #{role} for \"#{decidim_sanitize_translated(resource.title)}\"." } + let(:email_subject) { "You have been assigned as #{role} for \"#{resource_title}\"." } let(:email_outro) { "You have received this notification because you are #{role} of the \"#{resource_title}\" participatory process." } let(:email_intro) { "You have been assigned as #{role} for participatory process \"#{resource_title}\"." } let(:notification_title) { "You have been assigned as #{role} for participatory process #{resource_title}." } diff --git a/decidim-proposals/app/views/decidim/proposals/admin/proposals/_form.html.erb b/decidim-proposals/app/views/decidim/proposals/admin/proposals/_form.html.erb index 304fa5194399c..c328ee82c9db0 100644 --- a/decidim-proposals/app/views/decidim/proposals/admin/proposals/_form.html.erb +++ b/decidim-proposals/app/views/decidim/proposals/admin/proposals/_form.html.erb @@ -44,7 +44,7 @@
    <%= form.select :meeting_id, - options_for_select(@form.meetings&.map { |meeting| [present(meeting).title, meeting.id] }, selected: meetings_as_authors_selected ), + options_for_select(@form.meetings&.map { |meeting| [present(meeting).title(html_escape: true), meeting.id] }, selected: meetings_as_authors_selected ), { include_blank: true, label: t(".select_a_meeting") }, { multiple: false, class: "chosen-select" } %>
    diff --git a/decidim-proposals/app/views/decidim/proposals/admin/proposals/show.html.erb b/decidim-proposals/app/views/decidim/proposals/admin/proposals/show.html.erb index 4fe1e2a304685..b1081eb7d0a91 100644 --- a/decidim-proposals/app/views/decidim/proposals/admin/proposals/show.html.erb +++ b/decidim-proposals/app/views/decidim/proposals/admin/proposals/show.html.erb @@ -107,7 +107,7 @@ <% proposal_meetings.each do |meeting| %> <% presented_meeting = present(meeting) %>
  • - <%= link_to presented_meeting.title, presented_meeting.profile_path %> + <%= link_to decidim_escape_translated(meeting.title).html_safe, presented_meeting.profile_path %>
  • <% end %> diff --git a/decidim-proposals/lib/decidim/proposals/test/factories.rb b/decidim-proposals/lib/decidim/proposals/test/factories.rb index 50d9f6b07de1b..22d157105777f 100644 --- a/decidim-proposals/lib/decidim/proposals/test/factories.rb +++ b/decidim-proposals/lib/decidim/proposals/test/factories.rb @@ -6,10 +6,12 @@ FactoryBot.define do factory :proposal_component, parent: :component do - name { Decidim::Components::Namer.new(participatory_space.organization.available_locales, :proposals).i18n_name } + transient do + skip_injection { false } + end + name { generate_component_name(participatory_space.organization.available_locales, :proposals) } manifest_name { :proposals } - participatory_space { create(:participatory_process, :with_steps, organization: organization) } - + participatory_space { create(:participatory_process, :with_steps, organization: organization, skip_injection: skip_injection) } trait :with_endorsements_enabled do step_settings do { @@ -250,28 +252,16 @@ skip_injection { false } end - title do - if skip_injection - Decidim::Faker::Localized.localized { generate(:title) } - else - Decidim::Faker::Localized.localized { " #{generate(:title)}" } - end - end - body do - if skip_injection - Decidim::Faker::Localized.localized { Faker::Lorem.sentences(number: 3).join("\n") } - else - Decidim::Faker::Localized.localized { " #{Faker::Lorem.sentences(number: 3).join("\n")}" } - end - end - component { create(:proposal_component) } + title { generate_localized_title(:proposal_title, skip_injection: skip_injection) } + body { generate_localized_description(:proposal_body, skip_injection: skip_injection) } + component { create(:proposal_component, skip_injection: skip_injection) } published_at { Time.current } address { "#{Faker::Address.street_name}, #{Faker::Address.city}" } latitude { Faker::Address.latitude } longitude { Faker::Address.longitude } cost { 20_000 } - cost_report { { en: "My cost report" } } - execution_period { { en: "My execution period" } } + cost_report { generate_localized_title(:proposal_cost_report, skip_injection: skip_injection) } + execution_period { generate_localized_title(:proposal_execution_period, skip_injection: skip_injection) } after(:build) do |proposal, evaluator| proposal.title = if evaluator.title.is_a?(String) @@ -289,7 +279,7 @@ proposal.body = Decidim::ContentProcessor.parse_with_processor(:hashtag, proposal.body, current_organization: proposal.organization).rewrite if proposal.component - users = evaluator.users || [create(:user, :confirmed, organization: proposal.component.participatory_space.organization)] + users = evaluator.users || [create(:user, :confirmed, organization: proposal.component.participatory_space.organization, skip_injection: evaluator.skip_injection)] users.each_with_index do |user, idx| user_group = evaluator.user_groups[idx] proposal.coauthorships.build(author: user, user_group: user_group) @@ -306,18 +296,18 @@ end trait :participant_author do - after :build do |proposal| + after :build do |proposal, evaluator| proposal.coauthorships.clear - user = build(:user, organization: proposal.component.participatory_space.organization) + user = build(:user, organization: proposal.component.participatory_space.organization, skip_injection: evaluator.skip_injection) proposal.coauthorships.build(author: user) end end trait :user_group_author do - after :build do |proposal| + after :build do |proposal, evaluator| proposal.coauthorships.clear - user = create(:user, organization: proposal.component.participatory_space.organization) - user_group = create(:user_group, :verified, organization: user.organization, users: [user]) + user = create(:user, organization: proposal.component.participatory_space.organization, skip_injection: evaluator.skip_injection) + user_group = create(:user_group, :verified, organization: user.organization, users: [user], skip_injection: evaluator.skip_injection) proposal.coauthorships.build(author: user, user_group: user_group) end end @@ -330,10 +320,10 @@ end trait :official_meeting do - after :build do |proposal| + after :build do |proposal, evaluator| proposal.coauthorships.clear - component = build(:meeting_component, participatory_space: proposal.component.participatory_space) - proposal.coauthorships.build(author: build(:meeting, component: component)) + component = build(:meeting_component, participatory_space: proposal.component.participatory_space, skip_injection: evaluator.skip_injection) + proposal.coauthorships.build(author: build(:meeting, component: component, skip_injection: evaluator.skip_injection)) end end @@ -382,78 +372,89 @@ end trait :hidden do - after :create do |proposal| - create(:moderation, hidden_at: Time.current, reportable: proposal) + after :create do |proposal, evaluator| + create(:moderation, hidden_at: Time.current, reportable: proposal, skip_injection: evaluator.skip_injection) end end trait :with_votes do - after :create do |proposal| - create_list(:proposal_vote, 5, proposal: proposal) + after :create do |proposal, evaluator| + create_list(:proposal_vote, 5, proposal: proposal, skip_injection: evaluator.skip_injection) end end trait :with_endorsements do - after :create do |proposal| + after :create do |proposal, evaluator| 5.times.collect do - create(:endorsement, resource: proposal, author: build(:user, organization: proposal.participatory_space.organization)) + create(:endorsement, resource: proposal, skip_injection: evaluator.skip_injection, + author: build(:user, organization: proposal.participatory_space.organization, skip_injection: evaluator.skip_injection)) end end end trait :with_amendments do - after :create do |proposal| - create_list(:proposal_amendment, 5, amendable: proposal) + after :create do |proposal, evaluator| + create_list(:proposal_amendment, 5, amendable: proposal, skip_injection: evaluator.skip_injection) end end trait :with_photo do - after :create do |proposal| - proposal.attachments << create(:attachment, :with_image, attached_to: proposal) + after :create do |proposal, evaluator| + proposal.attachments << create(:attachment, :with_image, attached_to: proposal, skip_injection: evaluator.skip_injection) end end trait :with_document do - after :create do |proposal| - proposal.attachments << create(:attachment, :with_pdf, attached_to: proposal) + after :create do |proposal, evaluator| + proposal.attachments << create(:attachment, :with_pdf, attached_to: proposal, skip_injection: evaluator.skip_injection) end end end factory :proposal_vote, class: "Decidim::Proposals::ProposalVote" do - proposal { build(:proposal) } - author { build(:user, organization: proposal.organization) } + transient do + skip_injection { false } + end + proposal { build(:proposal, skip_injection: skip_injection) } + author { build(:user, organization: proposal.organization, skip_injection: skip_injection) } end factory :proposal_amendment, class: "Decidim::Amendment" do - amendable { build(:proposal) } - emendation { build(:proposal, component: amendable.component) } - amender { build(:user, organization: amendable.component.participatory_space.organization) } + transient do + skip_injection { false } + end + amendable { build(:proposal, skip_injection: skip_injection) } + emendation { build(:proposal, component: amendable.component, skip_injection: skip_injection) } + amender { build(:user, organization: amendable.component.participatory_space.organization, skip_injection: skip_injection) } state { Decidim::Amendment::STATES.sample } end factory :proposal_note, class: "Decidim::Proposals::ProposalNote" do + transient do + skip_injection { false } + end body { Faker::Lorem.sentences(number: 3).join("\n") } - proposal { build(:proposal) } - author { build(:user, organization: proposal.organization) } + proposal { build(:proposal, skip_injection: skip_injection) } + author { build(:user, organization: proposal.organization, skip_injection: skip_injection) } end factory :collaborative_draft, class: "Decidim::Proposals::CollaborativeDraft" do transient do users { nil } + skip_injection { false } # user_groups correspondence to users is by sorting order user_groups { [] } end - title { " #{generate(:title)}" } - body { "\n#{Faker::Lorem.sentences(number: 3).join("\n")}" } - component { create(:proposal_component) } + title { generate_localized_title(:collaborative_draft_title, skip_injection: skip_injection)["en"] } + body { generate_localized_description(:collaborative_draft_body, skip_injection: skip_injection)["en"] } + component { create(:proposal_component, skip_injection: skip_injection) } address { "#{Faker::Address.street_name}, #{Faker::Address.city}" } state { "open" } after(:build) do |collaborative_draft, evaluator| if collaborative_draft.component - users = evaluator.users || [create(:user, organization: collaborative_draft.component.participatory_space.organization)] + users = evaluator.users || [create(:user, organization: collaborative_draft.component.participatory_space.organization, skip_injection: evaluator.skip_injection)] users.each_with_index do |user, idx| user_group = evaluator.user_groups[idx] collaborative_draft.coauthorships.build(author: user, user_group: user_group) @@ -476,17 +477,23 @@ end factory :participatory_text, class: "Decidim::Proposals::ParticipatoryText" do - title { { en: " #{generate(:title)}" } } - description { { en: "\n#{Faker::Lorem.sentences(number: 3).join("\n")}" } } - component { create(:proposal_component) } + transient do + skip_injection { false } + end + title { generate_localized_title(:participatory_text_title, skip_injection: skip_injection) } + description { generate_localized_description(:participatory_text_description, skip_injection: skip_injection) } + component { create(:proposal_component, skip_injection: skip_injection) } end factory :valuation_assignment, class: "Decidim::Proposals::ValuationAssignment" do + transient do + skip_injection { false } + end proposal valuator_role do space = proposal.component.participatory_space organization = space.organization - build :participatory_process_user_role, role: :valuator, user: build(:user, organization: organization) + build :participatory_process_user_role, role: :valuator, skip_injection: skip_injection, user: build(:user, organization: organization, skip_injection: skip_injection) end end end diff --git a/decidim-proposals/spec/events/decidim/proposals/admin/update_proposal_category_event_spec.rb b/decidim-proposals/spec/events/decidim/proposals/admin/update_proposal_category_event_spec.rb index e838f64bcacac..6c6e8215100e1 100644 --- a/decidim-proposals/spec/events/decidim/proposals/admin/update_proposal_category_event_spec.rb +++ b/decidim-proposals/spec/events/decidim/proposals/admin/update_proposal_category_event_spec.rb @@ -3,7 +3,7 @@ require "spec_helper" describe Decidim::Proposals::Admin::UpdateProposalCategoryEvent do - let(:resource) { create :proposal, title: "It's my super proposal" } + let(:resource) { create :proposal, title: "It is my super proposal" } let(:event_name) { "decidim.events.proposals.proposal_update_category" } let(:email_subject) { "The #{translated(resource.title)} proposal category has been updated" } let(:email_intro) { "An admin has updated the category of your proposal \"#{resource_title}\", check it out in this page:" } diff --git a/decidim-proposals/spec/events/decidim/proposals/admin/update_proposal_scope_event_spec.rb b/decidim-proposals/spec/events/decidim/proposals/admin/update_proposal_scope_event_spec.rb index 537b1a28cff83..1249dfa9ec658 100644 --- a/decidim-proposals/spec/events/decidim/proposals/admin/update_proposal_scope_event_spec.rb +++ b/decidim-proposals/spec/events/decidim/proposals/admin/update_proposal_scope_event_spec.rb @@ -3,7 +3,7 @@ require "spec_helper" describe Decidim::Proposals::Admin::UpdateProposalScopeEvent do - let(:resource) { create :proposal, title: "It's my super proposal" } + let(:resource) { create :proposal, title: "It is my super proposal" } let(:event_name) { "decidim.events.proposals.proposal_update_scope" } let(:email_subject) { "The #{resource_title} proposal scope has been updated" } let(:email_intro) { "An admin has updated the scope of your proposal \"#{resource_title}\", check it out in this page:" } diff --git a/decidim-proposals/spec/events/decidim/proposals/collaborative_draft_access_accepted_event_spec.rb b/decidim-proposals/spec/events/decidim/proposals/collaborative_draft_access_accepted_event_spec.rb index 4943631c0caa1..ec4692765ea34 100644 --- a/decidim-proposals/spec/events/decidim/proposals/collaborative_draft_access_accepted_event_spec.rb +++ b/decidim-proposals/spec/events/decidim/proposals/collaborative_draft_access_accepted_event_spec.rb @@ -6,7 +6,7 @@ include_context "when a simple event" let(:event_name) { "decidim.events.proposals.collaborative_draft_access_accepted" } - let(:resource) { create :collaborative_draft, title: "It's my collaborative draft" } + let(:resource) { create :collaborative_draft, title: "It is my collaborative draft" } let(:resource_path) { Decidim::ResourceLocatorPresenter.new(resource).path } let(:resource_title) { resource.title } let(:author) { resource.authors.first } diff --git a/decidim-proposals/spec/events/decidim/proposals/collaborative_draft_access_rejected_event_spec.rb b/decidim-proposals/spec/events/decidim/proposals/collaborative_draft_access_rejected_event_spec.rb index 7675c432b29f7..ded9da11f5795 100644 --- a/decidim-proposals/spec/events/decidim/proposals/collaborative_draft_access_rejected_event_spec.rb +++ b/decidim-proposals/spec/events/decidim/proposals/collaborative_draft_access_rejected_event_spec.rb @@ -6,7 +6,7 @@ include_context "when a simple event" let(:event_name) { "decidim.events.proposals.collaborative_draft_access_rejected" } - let(:resource) { create :collaborative_draft, title: "It's my collaborative draft" } + let(:resource) { create :collaborative_draft, title: "It is my collaborative draft" } let(:resource_path) { Decidim::ResourceLocatorPresenter.new(resource).path } let(:author) { resource.authors.first } let(:author_id) { author.id } diff --git a/decidim-proposals/spec/events/decidim/proposals/collaborative_draft_access_requested_event_spec.rb b/decidim-proposals/spec/events/decidim/proposals/collaborative_draft_access_requested_event_spec.rb index 5df055667eb1b..9c4cf31899f19 100644 --- a/decidim-proposals/spec/events/decidim/proposals/collaborative_draft_access_requested_event_spec.rb +++ b/decidim-proposals/spec/events/decidim/proposals/collaborative_draft_access_requested_event_spec.rb @@ -6,7 +6,7 @@ include_context "when a simple event" let(:event_name) { "decidim.events.proposals.collaborative_draft_access_requested" } - let(:resource) { create :collaborative_draft, title: "It's my collaborative draft" } + let(:resource) { create :collaborative_draft, title: "It is my collaborative draft" } let(:resource_path) { Decidim::ResourceLocatorPresenter.new(resource).path } let(:resource_title) { resource.title } let(:author) { resource.authors.first } diff --git a/decidim-proposals/spec/events/decidim/proposals/collaborative_draft_withdrawn_event_spec.rb b/decidim-proposals/spec/events/decidim/proposals/collaborative_draft_withdrawn_event_spec.rb index 6af8648531822..f20d879392abe 100644 --- a/decidim-proposals/spec/events/decidim/proposals/collaborative_draft_withdrawn_event_spec.rb +++ b/decidim-proposals/spec/events/decidim/proposals/collaborative_draft_withdrawn_event_spec.rb @@ -6,7 +6,7 @@ include_context "when a simple event" let(:event_name) { "decidim.events.proposals.collaborative_draft_withdrawn" } - let(:resource) { create :collaborative_draft, title: "It's my collaborative draft" } + let(:resource) { create :collaborative_draft, title: "It is my collaborative draft" } let(:resource_path) { Decidim::ResourceLocatorPresenter.new(resource).path } let(:author) { resource.authors.first } let(:author_id) { author.id } diff --git a/decidim-proposals/spec/events/decidim/proposals/creation_enabled_event_spec.rb b/decidim-proposals/spec/events/decidim/proposals/creation_enabled_event_spec.rb index 0858da265e5dc..e6b2f98ae9b51 100644 --- a/decidim-proposals/spec/events/decidim/proposals/creation_enabled_event_spec.rb +++ b/decidim-proposals/spec/events/decidim/proposals/creation_enabled_event_spec.rb @@ -11,9 +11,8 @@ module Proposals let(:event_name) { "decidim.events.proposals.creation_enabled" } let(:resource) { create(:proposal_component) } - let(:participatory_space) { resource.participatory_space } let(:resource_path) { main_component_path(resource) } - let(:email_subject) { "Proposals now available in #{decidim_sanitize_translated(participatory_space.title)}" } + let(:email_subject) { "Proposals now available in #{participatory_space_title}" } let(:email_intro) { "You can now create new proposals in #{participatory_space_title}! Start participating in this page:" } let(:email_outro) { "You have received this notification because you are following #{participatory_space_title}. You can stop receiving notifications following the previous link." } let(:notification_title) { "You can now put forward new proposals in #{participatory_space_title}" } diff --git a/decidim-proposals/spec/events/decidim/proposals/endorsing_enabled_event_spec.rb b/decidim-proposals/spec/events/decidim/proposals/endorsing_enabled_event_spec.rb index adedc6713d88f..9465e4fb279e6 100644 --- a/decidim-proposals/spec/events/decidim/proposals/endorsing_enabled_event_spec.rb +++ b/decidim-proposals/spec/events/decidim/proposals/endorsing_enabled_event_spec.rb @@ -13,7 +13,7 @@ module Proposals let(:resource) { create(:proposal_component) } let(:participatory_space) { resource.participatory_space } let(:resource_path) { main_component_path(resource) } - let(:email_subject) { "Proposals endorsing has started for #{decidim_sanitize_translated(participatory_space.title)}" } + let(:email_subject) { "Proposals endorsing has started for #{participatory_space_title}" } let(:email_intro) { "You can endorse proposals in #{participatory_space_title}! Start participating in this page:" } let(:email_outro) { "You have received this notification because you are following #{participatory_space_title}. You can stop receiving notifications following the previous link." } let(:notification_title) { "You can now start endorsing proposals in #{participatory_space_title}" } diff --git a/decidim-proposals/spec/events/decidim/proposals/publish_proposal_event_spec.rb b/decidim-proposals/spec/events/decidim/proposals/publish_proposal_event_spec.rb index d1c7cd257c2d0..de56606b01273 100644 --- a/decidim-proposals/spec/events/decidim/proposals/publish_proposal_event_spec.rb +++ b/decidim-proposals/spec/events/decidim/proposals/publish_proposal_event_spec.rb @@ -5,10 +5,10 @@ module Decidim module Proposals describe PublishProposalEvent do - let(:resource) { create :proposal, title: "A nice proposal" } + let(:resource) { create :proposal } let(:participatory_process) { create :participatory_process, organization: organization } let(:proposal_component) { create(:proposal_component, participatory_space: participatory_process) } - let(:resource_title) { translated(resource.title) } + let(:resource_title) { decidim_sanitize_translated(resource.title) } let(:event_name) { "decidim.events.proposals.proposal_published" } include_context "when a simple event" @@ -23,7 +23,7 @@ module Proposals describe "email_subject" do context "when resource title contains apostrophes" do - let(:resource) { create :proposal, title: "It's a nice proposal" } + let(:resource) { create :proposal } it "is generated correctly" do expect(subject.email_subject).to eq("New proposal \"#{resource_title}\" by @#{author.nickname}") @@ -60,7 +60,7 @@ module Proposals end context "when the proposal is official" do - let(:resource) { create :proposal, :official, title: "A nice proposal" } + let(:resource) { create :proposal, :official } let(:extra) { { participatory_space: resource.participatory_space } } describe "notification_title" do @@ -72,14 +72,15 @@ module Proposals end context "when the target are the participatory space followers" do + include_context "when a simple event" + let(:event_name) { "decidim.events.proposals.proposal_published_for_space" } - let(:notification_title) { "The proposal A nice proposal has been added to #{participatory_space_title} by #{author.name} @#{author.nickname}" } + let(:notification_title) { "The proposal #{resource_title} has been added to #{participatory_space_title} by #{author.name} @#{author.nickname}" } let(:email_outro) { "You have received this notification because you are following \"#{participatory_space_title}\". You can stop receiving notifications following the previous link." } - let(:email_intro) { "The proposal \"A nice proposal\" has been added to \"#{participatory_space_title}\" that you are following." } - let(:email_subject) { "New proposal \"#{resource_title}\" added to #{decidim_sanitize_translated(participatory_space.title)}" } + let(:email_intro) { "The proposal \"#{resource_title}\" has been added to \"#{participatory_space_title}\" that you are following." } + let(:email_subject) { "New proposal \"#{resource_title}\" added to #{participatory_space_title}" } let(:extra) { { participatory_space: true } } - include_context "when a simple event" it_behaves_like "a simple event" it_behaves_like "a simple event email" it_behaves_like "a simple event notification" diff --git a/decidim-proposals/spec/events/decidim/proposals/rejected_proposal_event_spec.rb b/decidim-proposals/spec/events/decidim/proposals/rejected_proposal_event_spec.rb index 587fa50efe3e6..32f9c2280e5eb 100644 --- a/decidim-proposals/spec/events/decidim/proposals/rejected_proposal_event_spec.rb +++ b/decidim-proposals/spec/events/decidim/proposals/rejected_proposal_event_spec.rb @@ -4,7 +4,6 @@ describe Decidim::Proposals::RejectedProposalEvent do let(:resource) { create :proposal, :with_answer, title: "It's my super proposal" } - let(:resource_title) { translated(resource.title) } let(:event_name) { "decidim.events.proposals.proposal_rejected" } let(:email_subject) { "A proposal you're following has been rejected" } let(:email_intro) { "The proposal \"#{resource_title}\" has been rejected. You can read the answer in this page:" } diff --git a/decidim-proposals/spec/events/decidim/proposals/voting_enabled_event_spec.rb b/decidim-proposals/spec/events/decidim/proposals/voting_enabled_event_spec.rb index 4629d847f446d..8684308b6ee80 100644 --- a/decidim-proposals/spec/events/decidim/proposals/voting_enabled_event_spec.rb +++ b/decidim-proposals/spec/events/decidim/proposals/voting_enabled_event_spec.rb @@ -10,7 +10,7 @@ module Proposals include_context "when a simple event" let(:event_name) { "decidim.events.proposals.voting_enabled" } - let(:email_subject) { "Proposal support has started for #{decidim_sanitize_translated(participatory_space.title)}" } + let(:email_subject) { "Proposal support has started for #{participatory_space_title}" } let(:email_intro) { "You can support proposals in #{participatory_space_title}! Start participating in this page:" } let(:email_outro) { "You have received this notification because you are following #{participatory_space_title}. You can stop receiving notifications following the previous link." } let(:notification_title) { "You can now start supporting proposals in #{participatory_space_title}" } diff --git a/decidim-proposals/spec/system/collaborative_drafts_spec.rb b/decidim-proposals/spec/system/collaborative_drafts_spec.rb index 325f7094a0542..f46fbbe7c9d45 100644 --- a/decidim-proposals/spec/system/collaborative_drafts_spec.rb +++ b/decidim-proposals/spec/system/collaborative_drafts_spec.rb @@ -91,7 +91,7 @@ end let(:html_body) { strip_tags(collaborative_draft.body).gsub(/\n/, " ").strip } - let(:stripped_body) { %(alert("BODY"); #{html_body}) } + let(:stripped_body) { %(alert("collaborative_draft_body"); #{html_body}) } it "shows the title" do expect(page).to have_content(collaborative_draft.title) diff --git a/decidim-proposals/spec/system/proposals_spec.rb b/decidim-proposals/spec/system/proposals_spec.rb index be910b1e9adde..ac33fbecd74b6 100644 --- a/decidim-proposals/spec/system/proposals_spec.rb +++ b/decidim-proposals/spec/system/proposals_spec.rb @@ -154,7 +154,7 @@ end it "shows the author as meeting" do - expect(page).to have_content(translated(proposal.authors.first.title)) + expect(page).to have_content(decidim_sanitize_translated(proposal.authors.first.title)) end it_behaves_like "rendering safe content", ".columns.mediumlarge-8.large-9" diff --git a/decidim-sortitions/lib/decidim/sortitions/test/factories.rb b/decidim-sortitions/lib/decidim/sortitions/test/factories.rb index 49ec02cc43dd0..0e7a3b3fad88b 100644 --- a/decidim-sortitions/lib/decidim/sortitions/test/factories.rb +++ b/decidim-sortitions/lib/decidim/sortitions/test/factories.rb @@ -6,16 +6,22 @@ FactoryBot.define do factory :sortition_component, parent: :component do - name { Decidim::Components::Namer.new(participatory_space.organization.available_locales, :sortitions).i18n_name } + transient do + skip_injection { false } + end + name { generate_component_name(participatory_space.organization.available_locales, :sortitions, skip_injection: skip_injection) } manifest_name { :sortitions } - participatory_space { create(:participatory_process, :with_steps, organization: organization) } + participatory_space { create(:participatory_process, :with_steps, organization: organization, skip_injection: skip_injection) } end factory :sortition, class: "Decidim::Sortitions::Sortition" do - component { create(:sortition_component) } - decidim_proposals_component { create(:proposal_component, organization: component.organization) } + transient do + skip_injection { false } + end + component { create(:sortition_component, skip_injection: skip_injection) } + decidim_proposals_component { create(:proposal_component, organization: component.organization, skip_injection: skip_injection) } - title { generate_localized_title } + title { generate_localized_title(:sortition_title, skip_injection: skip_injection) } author do create(:user, :admin, organization: component.organization) if component end @@ -23,15 +29,15 @@ dice { Faker::Number.between(from: 1, to: 6).to_i } target_items { Faker::Number.between(from: 1, to: 5).to_i } request_timestamp { Time.now.utc } - witnesses { Decidim::Faker::Localized.wrapped("

    ", "

    ") { generate_localized_title } } - additional_info { Decidim::Faker::Localized.wrapped("

    ", "

    ") { generate_localized_title } } - selected_proposals { create_list(:proposal, target_items, component: decidim_proposals_component).pluck(:id) } + witnesses { generate_localized_description(:sortition_witnesses, skip_injection: skip_injection) } + additional_info { generate_localized_description(:sortition_additional_info, skip_injection: skip_injection) } + selected_proposals { create_list(:proposal, target_items, component: decidim_proposals_component, skip_injection: skip_injection).pluck(:id) } candidate_proposals { selected_proposals } trait :cancelled do cancelled_on { Time.now.utc } - cancel_reason { Decidim::Faker::Localized.wrapped("

    ", "

    ") { generate_localized_title } } - cancelled_by_user { create(:user, :admin, organization: component.organization) if component } + cancel_reason { generate_localized_description(:sortition_cancel_reason, skip_injection: skip_injection) } + cancelled_by_user { create(:user, :admin, organization: component.organization, skip_injection: skip_injection) if component } end end end diff --git a/decidim-sortitions/spec/requests/sortition_search_spec.rb b/decidim-sortitions/spec/requests/sortition_search_spec.rb index 8aa31295205a8..891422caed2eb 100644 --- a/decidim-sortitions/spec/requests/sortition_search_spec.rb +++ b/decidim-sortitions/spec/requests/sortition_search_spec.rb @@ -32,22 +32,22 @@ it_behaves_like "a resource search with categories", :sortition, :single it "displays all non-cancelled sortitions without any filters" do - expect(subject).to include(translated(sortition1.title)) - expect(subject).to include(translated(sortition2.title)) - expect(subject).to include(translated(sortition3.title)) - expect(subject).to include(translated(sortition4.title)) - expect(subject).not_to include(translated(sortition5.title)) + expect(subject).to include(decidim_escape_translated(sortition1.title)) + expect(subject).to include(decidim_escape_translated(sortition2.title)) + expect(subject).to include(decidim_escape_translated(sortition3.title)) + expect(subject).to include(decidim_escape_translated(sortition4.title)) + expect(subject).not_to include(decidim_escape_translated(sortition5.title)) end context "when searching by text" do let(:filter_params) { { search_text_cont: "doggo" } } it "displays only the sortitions containing the search_text" do - expect(subject).to include(translated(sortition1.title)) - expect(subject).to include(translated(sortition2.title)) - expect(subject).to include(translated(sortition3.title)) - expect(subject).not_to include(translated(sortition4.title)) - expect(subject).not_to include(translated(sortition5.title)) + expect(subject).to include(decidim_escape_translated(sortition1.title)) + expect(subject).to include(decidim_escape_translated(sortition2.title)) + expect(subject).to include(decidim_escape_translated(sortition3.title)) + expect(subject).not_to include(decidim_escape_translated(sortition4.title)) + expect(subject).not_to include(decidim_escape_translated(sortition5.title)) end end @@ -58,11 +58,11 @@ let(:state) { "active" } it "displays the active sortitions" do - expect(subject).to include(translated(sortition1.title)) - expect(subject).to include(translated(sortition2.title)) - expect(subject).to include(translated(sortition3.title)) - expect(subject).to include(translated(sortition4.title)) - expect(subject).not_to include(translated(sortition5.title)) + expect(subject).to include(decidim_escape_translated(sortition1.title)) + expect(subject).to include(decidim_escape_translated(sortition2.title)) + expect(subject).to include(decidim_escape_translated(sortition3.title)) + expect(subject).to include(decidim_escape_translated(sortition4.title)) + expect(subject).not_to include(decidim_escape_translated(sortition5.title)) end end @@ -70,11 +70,11 @@ let(:state) { "cancelled" } it "displays only the cancelled sortition" do - expect(subject).not_to include(translated(sortition1.title)) - expect(subject).not_to include(translated(sortition2.title)) - expect(subject).not_to include(translated(sortition3.title)) - expect(subject).not_to include(translated(sortition4.title)) - expect(subject).to include(translated(sortition5.title)) + expect(subject).not_to include(decidim_escape_translated(sortition1.title)) + expect(subject).not_to include(decidim_escape_translated(sortition2.title)) + expect(subject).not_to include(decidim_escape_translated(sortition3.title)) + expect(subject).not_to include(decidim_escape_translated(sortition4.title)) + expect(subject).to include(decidim_escape_translated(sortition5.title)) end end @@ -82,11 +82,11 @@ let(:state) { "all" } it "displays all the sortitions" do - expect(subject).to include(translated(sortition1.title)) - expect(subject).to include(translated(sortition2.title)) - expect(subject).to include(translated(sortition3.title)) - expect(subject).to include(translated(sortition4.title)) - expect(subject).to include(translated(sortition5.title)) + expect(subject).to include(decidim_escape_translated(sortition1.title)) + expect(subject).to include(decidim_escape_translated(sortition2.title)) + expect(subject).to include(decidim_escape_translated(sortition3.title)) + expect(subject).to include(decidim_escape_translated(sortition4.title)) + expect(subject).to include(decidim_escape_translated(sortition5.title)) end end end diff --git a/decidim-sortitions/spec/types/integration_schema_spec.rb b/decidim-sortitions/spec/types/integration_schema_spec.rb index dce02375b9db6..ab815c433046b 100644 --- a/decidim-sortitions/spec/types/integration_schema_spec.rb +++ b/decidim-sortitions/spec/types/integration_schema_spec.rb @@ -45,7 +45,7 @@ { "__typename" => "Sortitions", "id" => current_component.id.to_s, - "name" => { "translation" => "Sortitions" }, + "name" => { "translation" => translated(current_component.name) }, "sortitions" => { "edges" => [ { diff --git a/decidim-surveys/lib/decidim/surveys/test/factories.rb b/decidim-surveys/lib/decidim/surveys/test/factories.rb index d8dc88f5be56c..4103062040599 100644 --- a/decidim-surveys/lib/decidim/surveys/test/factories.rb +++ b/decidim-surveys/lib/decidim/surveys/test/factories.rb @@ -6,13 +6,19 @@ FactoryBot.define do factory :surveys_component, parent: :component do - name { Decidim::Components::Namer.new(participatory_space.organization.available_locales, :surveys).i18n_name } + transient do + skip_injection { false } + end + name { generate_component_name(participatory_space.organization.available_locales, :surveys, skip_injection: skip_injection) } manifest_name { :surveys } - participatory_space { create(:participatory_process, :with_steps) } + participatory_space { create(:participatory_process, :with_steps, skip_injection: skip_injection) } end factory :survey, class: "Decidim::Surveys::Survey" do - questionnaire { build(:questionnaire, :with_questions) } - component { build(:surveys_component) } + transient do + skip_injection { false } + end + questionnaire { build(:questionnaire, :with_questions, skip_injection: skip_injection) } + component { build(:surveys_component, skip_injection: skip_injection) } end end diff --git a/decidim-surveys/spec/events/decidim/surveys/closed_survey_event_spec.rb b/decidim-surveys/spec/events/decidim/surveys/closed_survey_event_spec.rb index 2d5f89ff58d94..52f73e1bd5202 100644 --- a/decidim-surveys/spec/events/decidim/surveys/closed_survey_event_spec.rb +++ b/decidim-surveys/spec/events/decidim/surveys/closed_survey_event_spec.rb @@ -13,10 +13,11 @@ module Surveys let(:resource) { create(:surveys_component) } let(:participatory_space) { resource.participatory_space } let(:resource_path) { main_component_path(resource) } - let(:email_subject) { "A survey has finished in #{decidim_sanitize_translated(participatory_space.title)}" } - let(:email_intro) { "The survey #{resource.name["en"]} in #{participatory_space_title} has been closed." } + let(:resource_title) { decidim_sanitize_translated(resource.name) } + let(:email_subject) { "A survey has finished in #{participatory_space_title}" } + let(:email_intro) { "The survey #{resource_title} in #{participatory_space_title} has been closed." } let(:email_outro) { "You have received this notification because you are following #{participatory_space_title}. You can stop receiving notifications following the previous link." } - let(:notification_title) { "The survey #{resource.name["en"]} in #{participatory_space_title} has finished." } + let(:notification_title) { "The survey #{resource_title} in #{participatory_space_title} has finished." } it_behaves_like "a simple event" it_behaves_like "a simple event email" diff --git a/decidim-surveys/spec/events/decidim/surveys/opened_survey_event_spec.rb b/decidim-surveys/spec/events/decidim/surveys/opened_survey_event_spec.rb index 681817472d74c..bfcc44a60bf68 100644 --- a/decidim-surveys/spec/events/decidim/surveys/opened_survey_event_spec.rb +++ b/decidim-surveys/spec/events/decidim/surveys/opened_survey_event_spec.rb @@ -13,10 +13,11 @@ module Surveys let(:resource) { create(:surveys_component) } let(:participatory_space) { resource.participatory_space } let(:resource_path) { main_component_path(resource) } - let(:email_subject) { "A new survey in #{decidim_sanitize_translated(participatory_space.title)}" } - let(:email_intro) { "The survey #{resource.name["en"]} in #{participatory_space_title} is now open. You can participate in it from this page:" } + let(:resource_title) { decidim_sanitize_translated(resource.name) } + let(:email_subject) { "A new survey in #{participatory_space_title}" } + let(:email_intro) { "The survey #{resource_title} in #{participatory_space_title} is now open. You can participate in it from this page:" } let(:email_outro) { "You have received this notification because you are following #{participatory_space_title}. You can stop receiving notifications following the previous link." } - let(:notification_title) { "The survey #{resource.name["en"]} in #{participatory_space_title} is now open." } + let(:notification_title) { "The survey #{resource_title} in #{participatory_space_title} is now open." } it_behaves_like "a simple event" it_behaves_like "a simple event email" diff --git a/decidim-surveys/spec/types/integration_schema_spec.rb b/decidim-surveys/spec/types/integration_schema_spec.rb index 799e0fd2caeb3..3c9732517dc80 100644 --- a/decidim-surveys/spec/types/integration_schema_spec.rb +++ b/decidim-surveys/spec/types/integration_schema_spec.rb @@ -54,7 +54,7 @@ { "__typename" => "Surveys", "id" => current_component.id.to_s, - "name" => { "translation" => "Survey" }, + "name" => { "translation" => translated(current_component.name) }, "surveys" => { "edges" => [ { diff --git a/decidim-templates/lib/decidim/templates/test/factories.rb b/decidim-templates/lib/decidim/templates/test/factories.rb index ed94c23d09fe2..acb384f268bd2 100644 --- a/decidim-templates/lib/decidim/templates/test/factories.rb +++ b/decidim-templates/lib/decidim/templates/test/factories.rb @@ -5,28 +5,35 @@ FactoryBot.define do factory :template, class: "Decidim::Templates::Template" do + transient do + skip_injection { false } + end organization - templatable { build(:dummy_resource) } - name { Decidim::Faker::Localized.sentence } + name { generate_localized_title(:template_name, skip_injection: skip_injection) } + description { generate_localized_title(:template_description, skip_injection: skip_injection) } + templatable { build(:dummy_resource, skip_injection: skip_injection) } ## Questionnaire templates factory :questionnaire_template do + transient do + skip_injection { false } + end trait :with_questions do - after(:create) do |template| - template.templatable = create(:questionnaire, :with_questions, questionnaire_for: template) + after(:create) do |template, evaluator| + template.templatable = create(:questionnaire, :with_questions, questionnaire_for: template, skip_injection: evaluator.skip_injection) template.save! end end trait :with_all_questions do - after(:create) do |template| - template.templatable = create(:questionnaire, :with_all_questions, questionnaire_for: template) + after(:create) do |template, evaluator| + template.templatable = create(:questionnaire, :with_all_questions, questionnaire_for: template, skip_injection: evaluator.skip_injection) template.save! end end - after(:create) do |template| - template.templatable = create(:questionnaire, questionnaire_for: template) + after(:create) do |template, evaluator| + template.templatable = create(:questionnaire, questionnaire_for: template, skip_injection: evaluator.skip_injection) template.save! end end diff --git a/decidim-templates/lib/decidim/templates/test/shared_examples/uses_questionnaire_templates.rb b/decidim-templates/lib/decidim/templates/test/shared_examples/uses_questionnaire_templates.rb index fa180e608c57b..979af6e3f75cf 100644 --- a/decidim-templates/lib/decidim/templates/test/shared_examples/uses_questionnaire_templates.rb +++ b/decidim-templates/lib/decidim/templates/test/shared_examples/uses_questionnaire_templates.rb @@ -20,7 +20,7 @@ end context "when there are templates" do - let!(:templates) { create_list(:questionnaire_template, 6, :with_questions, organization: questionnaire.questionnaire_for.organization) } + let!(:templates) { create_list(:questionnaire_template, 6, :with_questions, skip_injection: true, organization: questionnaire.questionnaire_for.organization) } let(:template) { templates.first } let(:question) { template.templatable.questions.first } @@ -74,7 +74,7 @@ end describe "apply a template" do - let!(:templates) { create_list(:questionnaire_template, 6, :with_questions, organization: questionnaire.questionnaire_for.organization) } + let!(:templates) { create_list(:questionnaire_template, 6, :with_questions, skip_injection: true, organization: questionnaire.questionnaire_for.organization) } let(:template) { templates.first } let(:question) { template.templatable.questions.first } let(:questionnaire_question) { questionnaire.questions.first } diff --git a/decidim-verifications/lib/decidim/verifications/test/factories.rb b/decidim-verifications/lib/decidim/verifications/test/factories.rb index e0c2128f50ed3..b2d251fd348b9 100644 --- a/decidim-verifications/lib/decidim/verifications/test/factories.rb +++ b/decidim-verifications/lib/decidim/verifications/test/factories.rb @@ -5,13 +5,19 @@ FactoryBot.define do factory :csv_datum, class: "Decidim::Verifications::CsvDatum" do + transient do + skip_injection { false } + end email { generate(:email) } organization end factory :conflict, class: "Decidim::Verifications::Conflict" do - current_user { create(:user) } - managed_user { create(:user, managed: true, organization: current_user.organization) } + transient do + skip_injection { false } + end + current_user { create(:user, skip_injection: skip_injection) } + managed_user { create(:user, managed: true, organization: current_user.organization, skip_injection: skip_injection) } unique_id { "12345678X" } times { 1 } end From 3695c785e10c4caad59ba3b53a213565296efc8f Mon Sep 17 00:00:00 2001 From: decidim-bot Date: Tue, 16 Apr 2024 15:14:55 +0200 Subject: [PATCH 13/88] New Crowdin updates (#12631) * New translations en.yml (Turkish) * New translations en.yml (Spanish) * New translations en.yml (Catalan) * New translations en.yml (Bulgarian) * New translations en.yml (Bulgarian) * New translations en.yml (Bulgarian) * New translations en.yml (Italian) * New translations en.yml (Bulgarian) * New translations en.yml (Bulgarian) * New translations en.yml (Bulgarian) * New translations en.yml (Bulgarian) * New translations en.yml (Bulgarian) * New translations en.yml (Bulgarian) * New translations en.yml (Bulgarian) * New translations en.yml (Finnish) * New translations en.yml (Bulgarian) * New translations en.yml (Bulgarian) * New translations en.yml (Bulgarian) * New translations en.yml (Bulgarian) * New translations en.yml (Bulgarian) * New translations en.yml (Bulgarian) * New translations en.yml (Bulgarian) * New translations en.yml (Bulgarian) * New translations en.yml (Bulgarian) * New translations en.yml (Bulgarian) * New translations en.yml (Bulgarian) * New translations en.yml (Hebrew) * New translations en.yml (Hebrew) * New translations en.yml (Hebrew) * New translations en.yml (Hebrew) * New translations en.yml (Hebrew) * New translations en.yml (Hebrew) * New translations en.yml (Hebrew) * New translations en.yml (Hebrew) * New translations en.yml (Hebrew) * New translations en.yml (Hebrew) * New translations en.yml (Hebrew) * New translations en.yml (Hebrew) * New translations en.yml (Hebrew) * New translations en.yml (Hebrew) * New translations en.yml (Hebrew) * New translations en.yml (Hebrew) * New translations en.yml (Hebrew) * New translations en.yml (Hebrew) * New translations en.yml (Hebrew) * New translations en.yml (Hebrew) * New translations en.yml (Hebrew) * New translations en.yml (Hebrew) * New translations en.yml (Hebrew) * New translations en.yml (Bulgarian) * New translations en.yml (Norwegian) * New translations en.yml (Slovenian) * New translations en.yml (Latvian) * New translations en.yml (Irish) * New translations en.yml (Italian) * New translations en.yml (Portuguese) * New translations en.yml (Luxembourgish) * New translations en.yml (Bulgarian) * New translations en.yml (German) * New translations en.yml (Ukrainian with many plural form) * New translations en.yml (Russian with many plural form) * New translations en.yml (Hungarian) * New translations en.yml (Slovak) * New translations en.yml (Ukrainian with many plural form) * New translations en.yml (Russian with many plural form) * New translations en.yml (Luxembourgish) * New translations en.yml (Hungarian) * New translations en.yml (Ukrainian with many plural form) * New translations en.yml (Russian with many plural form) * New translations en.yml (Bulgarian) * New translations en.yml (Hungarian) * New translations en.yml (Dutch) * New translations en.yml (Slovak) * New translations en.yml (Slovenian) * New translations en.yml (Icelandic) * New translations en.yml (Latvian) * New translations en.yml (Esperanto) * New translations en.yml (Serbian (Latin)) * New translations en.yml (Ukrainian with many plural form) * New translations en.yml (Russian with many plural form) * New translations en.yml (Bulgarian) * New translations en.yml (Bulgarian) * New translations en.yml (Bulgarian) * New translations en.yml (Bulgarian) * New translations en.yml (Hebrew) * New translations en.yml (Hebrew) * New translations en.yml (Bulgarian) * New translations en.yml (Bulgarian) * New translations en.yml (Hebrew) * New translations en.yml (Hebrew) * New translations en.yml (Hebrew) * New translations en.yml (Hebrew) * New translations en.yml (Hebrew) * New translations en.yml (Hebrew) * New translations en.yml (Romanian) * New translations en.yml (French) * New translations en.yml (Spanish) * New translations en.yml (Arabic) * New translations en.yml (Catalan) * New translations en.yml (Czech) * New translations en.yml (German) * New translations en.yml (Greek) * New translations en.yml (Basque) * New translations en.yml (Finnish) * New translations en.yml (Hungarian) * New translations en.yml (Italian) * New translations en.yml (Japanese) * New translations en.yml (Lithuanian) * New translations en.yml (Dutch) * New translations en.yml (Norwegian) * New translations en.yml (Polish) * New translations en.yml (Portuguese) * New translations en.yml (Slovak) * New translations en.yml (Swedish) * New translations en.yml (Turkish) * New translations en.yml (Chinese Simplified) * New translations en.yml (Chinese Traditional) * New translations en.yml (Galician) * New translations en.yml (Icelandic) * New translations en.yml (Portuguese, Brazilian) * New translations en.yml (Indonesian) * New translations en.yml (Spanish, Mexico) * New translations en.yml (Latvian) * New translations en.yml (French, Canada) * New translations en.yml (Luxembourgish) * New translations en.yml (Spanish, Paraguay) * New translations en.yml (Ukrainian with many plural form) * New translations en.yml (Russian with many plural form) * New translations en.yml (Finnish (plain)) * New translations en.yml (Catalan) * New translations en.yml (Catalan) * New translations en.yml (German) * New translations en.yml (Bulgarian) * New translations en.yml (Bulgarian) * New translations en.yml (Bulgarian) * New translations en.yml (Czech) * New translations en.yml (Czech) * New translations en.yml (Bulgarian) * New translations en.yml (Bulgarian) * New translations en.yml (Bulgarian) * New translations en.yml (Slovak) * New translations en.yml (Turkish) * New translations en.yml (Chinese Traditional) * New translations en.yml (Icelandic) * New translations en.yml (Indonesian) * New translations en.yml (Luxembourgish) * New translations en.yml (Bulgarian) * New translations en.yml (Hebrew) * New translations en.yml (Bulgarian) * New translations en.yml (Bulgarian) * New translations en.yml (Bulgarian) * New translations en.yml (Bulgarian) * New translations en.yml (Bulgarian) --- decidim-accountability/config/locales/bg.yml | 62 ++- .../config/locales/he-IL.yml | 219 +++++++++++ decidim-accountability/config/locales/it.yml | 2 + .../config/locales/tr-TR.yml | 13 + decidim-admin/config/locales/bg.yml | 5 + decidim-admin/config/locales/he-IL.yml | 53 +++ decidim-admin/config/locales/lv.yml | 3 + decidim-admin/config/locales/no.yml | 4 + decidim-admin/config/locales/sl.yml | 3 + decidim-assemblies/config/locales/he-IL.yml | 110 ++++++ decidim-assemblies/config/locales/id-ID.yml | 2 +- decidim-assemblies/config/locales/is-IS.yml | 1 - decidim-assemblies/config/locales/lb.yml | 2 +- decidim-assemblies/config/locales/sk.yml | 1 + decidim-assemblies/config/locales/tr-TR.yml | 2 +- decidim-assemblies/config/locales/zh-TW.yml | 2 +- decidim-blogs/config/locales/ga-IE.yml | 3 + decidim-blogs/config/locales/he-IL.yml | 1 + decidim-blogs/config/locales/it.yml | 3 + decidim-blogs/config/locales/lb.yml | 3 + decidim-blogs/config/locales/pt.yml | 3 + decidim-budgets/config/locales/he-IL.yml | 1 + decidim-comments/config/locales/he-IL.yml | 1 + decidim-conferences/config/locales/he-IL.yml | 1 + .../config/locales/he-IL.yml | 1 + decidim-core/config/locales/bg.yml | 1 + decidim-core/config/locales/de.yml | 30 +- decidim-core/config/locales/fi.yml | 2 +- decidim-core/config/locales/he-IL.yml | 1 + decidim-core/config/locales/ru.yml | 6 + decidim-core/config/locales/uk.yml | 11 + decidim-debates/config/locales/ar.yml | 7 - decidim-debates/config/locales/ca.yml | 8 +- decidim-debates/config/locales/cs.yml | 10 +- decidim-debates/config/locales/de.yml | 10 +- decidim-debates/config/locales/el.yml | 7 - decidim-debates/config/locales/es-MX.yml | 8 +- decidim-debates/config/locales/es-PY.yml | 8 +- decidim-debates/config/locales/es.yml | 8 +- decidim-debates/config/locales/eu.yml | 10 +- decidim-debates/config/locales/fi-plain.yml | 8 +- decidim-debates/config/locales/fi.yml | 8 +- decidim-debates/config/locales/fr-CA.yml | 10 +- decidim-debates/config/locales/fr.yml | 10 +- decidim-debates/config/locales/gl.yml | 7 - decidim-debates/config/locales/he-IL.yml | 1 + decidim-debates/config/locales/hu.yml | 7 - decidim-debates/config/locales/id-ID.yml | 7 - decidim-debates/config/locales/is-IS.yml | 3 - decidim-debates/config/locales/it.yml | 7 - decidim-debates/config/locales/ja.yml | 8 +- decidim-debates/config/locales/lb.yml | 7 - decidim-debates/config/locales/lt.yml | 7 - decidim-debates/config/locales/lv.yml | 6 - decidim-debates/config/locales/nl.yml | 7 - decidim-debates/config/locales/no.yml | 7 - decidim-debates/config/locales/pl.yml | 6 - decidim-debates/config/locales/pt-BR.yml | 7 - decidim-debates/config/locales/pt.yml | 7 - decidim-debates/config/locales/ro-RO.yml | 7 - decidim-debates/config/locales/ru.yml | 3 - decidim-debates/config/locales/sk.yml | 6 - decidim-debates/config/locales/sv.yml | 7 - decidim-debates/config/locales/tr-TR.yml | 10 +- decidim-debates/config/locales/uk.yml | 3 - decidim-debates/config/locales/zh-CN.yml | 7 - decidim-debates/config/locales/zh-TW.yml | 7 - decidim-dev/config/locales/he-IL.yml | 1 + decidim-elections/config/locales/bg.yml | 353 ++++++++++++++++++ decidim-elections/config/locales/he-IL.yml | 1 + decidim-elections/config/locales/hu.yml | 1 + decidim-elections/config/locales/ru.yml | 5 + decidim-elections/config/locales/sk.yml | 5 + decidim-elections/config/locales/uk.yml | 5 + decidim-forms/config/locales/bg.yml | 11 + decidim-forms/config/locales/he-IL.yml | 1 + decidim-initiatives/config/locales/bg.yml | 141 +++++++ decidim-initiatives/config/locales/he-IL.yml | 1 + decidim-meetings/config/locales/bg.yml | 105 ++++++ decidim-meetings/config/locales/ca.yml | 2 +- decidim-meetings/config/locales/he-IL.yml | 1 + decidim-pages/config/locales/bg.yml | 5 + decidim-pages/config/locales/he-IL.yml | 1 + .../config/locales/bg.yml | 66 ++++ .../config/locales/he-IL.yml | 1 + .../config/locales/lb.yml | 86 +++++ decidim-proposals/config/locales/bg.yml | 153 ++++++++ decidim-proposals/config/locales/ca.yml | 10 +- decidim-proposals/config/locales/cs.yml | 3 + decidim-proposals/config/locales/es.yml | 8 +- decidim-proposals/config/locales/he-IL.yml | 1 + decidim-proposals/config/locales/hu.yml | 1 + decidim-proposals/config/locales/ru.yml | 2 + decidim-proposals/config/locales/uk.yml | 2 + decidim-sortitions/config/locales/bg.yml | 36 ++ decidim-sortitions/config/locales/he-IL.yml | 1 + decidim-surveys/config/locales/bg.yml | 7 + decidim-surveys/config/locales/he-IL.yml | 1 + decidim-system/config/locales/bg.yml | 27 ++ decidim-system/config/locales/eo.yml | 7 + decidim-system/config/locales/he-IL.yml | 1 + decidim-system/config/locales/hu.yml | 17 + decidim-system/config/locales/is-IS.yml | 6 + decidim-system/config/locales/lv.yml | 17 + decidim-system/config/locales/nl.yml | 10 + decidim-system/config/locales/ru.yml | 17 + decidim-system/config/locales/sk.yml | 17 + decidim-system/config/locales/sl.yml | 17 + decidim-system/config/locales/sr-CS.yml | 17 + decidim-system/config/locales/uk.yml | 12 + decidim-templates/config/locales/bg.yml | 22 ++ decidim-templates/config/locales/he-IL.yml | 1 + decidim-verifications/config/locales/bg.yml | 146 ++++++++ .../config/locales/he-IL.yml | 1 + 114 files changed, 1931 insertions(+), 229 deletions(-) create mode 100644 decidim-accountability/config/locales/he-IL.yml create mode 100644 decidim-admin/config/locales/he-IL.yml create mode 100644 decidim-assemblies/config/locales/he-IL.yml create mode 100644 decidim-blogs/config/locales/he-IL.yml create mode 100644 decidim-budgets/config/locales/he-IL.yml create mode 100644 decidim-comments/config/locales/he-IL.yml create mode 100644 decidim-conferences/config/locales/he-IL.yml create mode 100644 decidim-consultations/config/locales/he-IL.yml create mode 100644 decidim-core/config/locales/he-IL.yml create mode 100644 decidim-debates/config/locales/he-IL.yml create mode 100644 decidim-dev/config/locales/he-IL.yml create mode 100644 decidim-elections/config/locales/he-IL.yml create mode 100644 decidim-forms/config/locales/he-IL.yml create mode 100644 decidim-initiatives/config/locales/he-IL.yml create mode 100644 decidim-meetings/config/locales/he-IL.yml create mode 100644 decidim-pages/config/locales/he-IL.yml create mode 100644 decidim-participatory_processes/config/locales/he-IL.yml create mode 100644 decidim-proposals/config/locales/he-IL.yml create mode 100644 decidim-sortitions/config/locales/he-IL.yml create mode 100644 decidim-surveys/config/locales/he-IL.yml create mode 100644 decidim-system/config/locales/he-IL.yml create mode 100644 decidim-templates/config/locales/he-IL.yml create mode 100644 decidim-verifications/config/locales/he-IL.yml diff --git a/decidim-accountability/config/locales/bg.yml b/decidim-accountability/config/locales/bg.yml index 3c61732a93308..fad3e6f8ac2a4 100644 --- a/decidim-accountability/config/locales/bg.yml +++ b/decidim-accountability/config/locales/bg.yml @@ -22,6 +22,7 @@ bg: timeline_entry: description: Описание entry_date: Дата + title: Заглавие models: decidim/accountability/proposal_linked_event: Предложение, включено в резултата decidim/accountability/result_progress_updated_event: Напредъкът на резултатите е актуализиран @@ -33,20 +34,45 @@ bg: decidim: accountability: actions: + attachment_collections: Папки + attachments: Прикачени файлове confirm_destroy: Сигурни ли сте, че искате да изтриете това %{name}? destroy: Изтрий edit: Редактирай - import_csv: Импорт CVS + import_csv: Импортиране на CSV new: Ново %{name} preview: Преглед timeline_entries: Развитие на проекта title: Действия admin: exports: + result_comments: Коментари results: Резултати import_results: new: + download_export: Свалете експорта в CSV формат import: Внасяне + info: | +

    Препоръчваме ви да следвате следните стъпки:

    +
      +
    1. Създайте статусите за резултатите, които искате да добавите
    2. +
    3. Създайте поне един резултат ръчно чрез този административен панел, преди да използвате Импортиране, за да разберете по-добре формата и това, което ще се нуждае от попълване.
    4. +
    5. %{link_export_csv}
    6. +
    7. Направете промените локално. Можете да промените само следните колони в CSV: +
        +
      • category/id: ID за категорията
      • +
      • scope/id: ID за обхвата
      • +
      • parent/id: ID на родителя (за свързани резултати). По избор
      • +
      • title/en: Заглавие на английски език. Това ще зависи от езиковата конфигурация на вашата платформа.
      • +
      • description/en: Описание на английски език. Това ще зависи от езиковата конфигурация на вашата платформа.
      • +
      • начална_дата: дата, когато резултатът започва да се изпълнява (формат ГГГГ-ММ-ДД)
      • +
      • крайна_дата: дата, на която резултатът приключва изпълнението (формат ГГГГ-ММ-ДД)
      • +
      • status/id: ID на статуса за този резултат
      • +
      • напредък: Процент (от 0 до 100) на изпълнението
      • +
      • proposals_ids: вътрешен идентификатор на свързаните предложения (разделени със запетая). Той автоматично се преобразува в proposal_url
      • +
      +
    8. +
    title: Импортирай резултати от CSV imports: create: @@ -117,9 +143,22 @@ bg: create: "%{user_name} създаде резултата %{resource_name} в %{space_name}" delete: "%{user_name} изтри резултата %{resource_name} в %{space_name}" update: "%{user_name} обнови резултата %{resource_name} в %{space_name}" + status: + create: "Статусът е създаден" + delete: "Статусът е изтрит" + update: "Статусът е обновен" + timeline_entry: + create: "Създаде запис във времевата линия" + delete: "Изтри запис от времевата линия" + update: "Обнови запис във времевата линия" value_types: parent_presenter: not_found: 'Родителя липсва в базата данни (ID: %{id})' + content_blocks: + highlighted_results: + dates: Дати + results: Резултати + unspecified: Не е посочено import_mailer: import: errors: Грешки @@ -132,8 +171,12 @@ bg: models: result: fields: + category: Категория + created_at: Създаден end_date: Крайна дата + id: ID progress: Напредък + scope: Обхват start_date: Начална дата status: Статус title: Заглавие @@ -146,6 +189,10 @@ bg: timeline_entry: fields: entry_date: Дата + title: Заглавие + result_m: + executed: Изпълнено + view: Изглед results: count: results_count: @@ -176,8 +223,19 @@ bg: votes: Поддръжки timeline: title: Развитие на проекта + admin: + filters: + results: + category_id_eq: + label: Категория + scope_id_eq: + label: Обхват + status_id_eq: + label: Статус components: accountability: + actions: + comment: Коментар name: Отговорност settings: global: @@ -218,3 +276,5 @@ bg: result_project: Проекти, включени в резултата included_proposals: result_proposal: Предложения, включени в резултата + statistics: + results_count: Резултати diff --git a/decidim-accountability/config/locales/he-IL.yml b/decidim-accountability/config/locales/he-IL.yml new file mode 100644 index 0000000000000..c5edfc3cf1aef --- /dev/null +++ b/decidim-accountability/config/locales/he-IL.yml @@ -0,0 +1,219 @@ +--- +he: + activemodel: + attributes: + result: + decidim_accountability_status_id: סטטוס + decidim_category_id: קטגוריה + decidim_scope_id: היקף + description: תיאור + end_date: תאריך סיום + progress: התקדמות + project_ids: פרויקטים כלולים + proposals: הצעות כלולות + start_date: תאריך התחלה + title: כותרת + updated_at: עודכן ב- + status: + description: תיאור + key: מפתח + name: שם + progress: התקדמות + timeline_entry: + description: תיאור + entry_date: תאריך + title: כותרת + models: + decidim/accountability/proposal_linked_event: הצעה כלולה בתוצאה + decidim/accountability/result_progress_updated_event: התקדמות התוצאה עודכנה + activerecord: + models: + decidim/accountability/result: + one: תוצאה + two: תוצאות + many: תוצאות + other: תוצאות + decidim: + accountability: + actions: + attachment_collections: תיקיות + attachments: צרופות + confirm_destroy: האם את/ה בטוח/ה שברצונך למחוק את {name}? + destroy: מחיקה + edit: עריכה + preview: תצוגה מקדימה + timeline_entries: אבולוציה של הפרויקט + title: פעולות + admin: + exports: + result_comments: תגובות + results: תוצאות + import_results: + new: + download_export: להורדת הייצוא כקובץ CSV + import: ייבוא + models: + result: + name: תוצאה + status: + name: סטטוס + results: + edit: + title: עריכת תוצאה + update: עדכון תוצאה + index: + title: תוצאות + new: + create: יצירת תוצאה + title: תוצאה חדשה + shared: + subnav: + statuses: סטטוסים + statuses: + edit: + title: עריכת סטטוס + update: עדכון סטטוס + index: + title: סטטוסים + new: + create: יצירת סטטוס + title: סטטוס חדש + timeline_entries: + edit: + title: עריכת רשומה + update: עדכן רשומה + index: + title: ערכי ציר הזמן של הפרויקט + new: + create: יצירת רשומה + title: רשומה חדשה + admin_log: + result: + create: "%{user_name} תוצאה נוצרה %{resource_name} ב %{space_name}" + delete: "%{user_name} מחק.ה את %{resource_name} התוצאה ב %{space_name}" + update: "%{user_name} עדכן.ה תוצאה %{resource_name} ב %{space_name}" + status: + create: "%{user_name} יצר.ה את %{resource_name} הסטטוס" + delete: "%{user_name} מחק.ה את %{resource_name} הסטטוס" + update: "%{user_name} עדכנ.ה את %{resource_name} הסטטוס" + timeline_entry: + create: "%{user_name} יצר את הערך של ציר הזמן %{resource_name}" + delete: "%{user_name} מחק את הערך של ציר הזמן %{resource_name}" + update: "%{user_name} יצר את הערך של ציר הזמן %{resource_name}" + value_types: + parent_presenter: + not_found: 'ההורה לא נמצא במסד הנתונים (מזהה: %{id})' + content_blocks: + highlighted_results: + results: תוצאות + import_mailer: + import: + errors: שגיאות + row_number: שורה + subject: ייבוא ​​מוצלח של תוצאות + success: ייבוא ​​מוצלח של תוצאות. ניתן לעיין בתוצאות בממשק הניהול. + models: + result: + fields: + category: קטגוריה + created_at: נוצר + end_date: תאריך סיום + id: מספר מזהה + progress: התקדמות + scope: היקף + start_date: תאריך התחלה + status: סטטוס + title: כותרת + status: + fields: + description: תיאור + key: מפתח + name: שם + progress: התקדמות + timeline_entry: + fields: + entry_date: תאריך + title: כותרת + results: + count: + results_count: + one: תוצאה אחת + two: "שתי תוצאות" + many: "%{count} תוצאות" + other: "%{count} תוצאות" + filters: + all: הכל + home: + categories_label: קטגוריות + subcategories_label: תתי קטגוריות + home_header: + global_status: סטטוס ביצוע גלובלי + nav_breadcrumb: + global: ביצוע גלובלי + search: + search: חיפוש פעולה + show: + stats: + attendees: משתתפים.ות + back_to_resource: בחזרה לתוצאות + comments: תגובות + contributions: תרומות + last_edited_by: נערך לאחרונה על-ידי + last_updated_at: עודכן לאחרונה ב + meetings: פגישות + proposals: הצעות + votes: תמיכה + timeline: + title: אבולוציה של הפרויקט + admin: + filters: + results: + category_id_eq: + label: קטגוריה + scope_id_eq: + label: היקף + status_id_eq: + label: סטטוס + components: + accountability: + actions: + comment: תגובה + name: אחריותיות + settings: + global: + categories_label: שם ל"קטגוריות" + comments_enabled: איפשור תגובות + comments_max_length: אורך מקסימלי להערות (השאירו 0 לערך ברירת המחדל) + display_progress_enabled: הצגת התקדמות + heading_leaf_level_results: שם ל"פרויקטים" + heading_parent_level_results: שם ל"תוצאות" + intro: הקדמה + scope_id: היקף + scopes_enabled: היקפים מאופשרים + subcategories_label: שם ל"תתי קטוגריות" + step: + comments_blocked: תגובות חסומות + events: + accountability: + proposal_linked: + email_intro: 'ההצעה "%{proposal_title}" נכללה בתוצאה. ניתן לראות אותה מהעמוד הזה:' + email_outro: קיבלת הודעה זו מכיוון שאת.ה עוקב.ת אחר "%{proposal_title}". ניתן להפסיק לקבל התראות באמצעות הקישור הקודם. + email_subject: עדכון ל-%{proposal_title} + notification_title: ההצעה %{proposal_title} נכללה בתוצאת %{resource_title}. + result_progress_updated: + email_intro: 'התוצאה "%{resource_title}", הכוללת את ההצעה "%{proposal_title}", הושלמה כעת %{progress}%. ניתן לראות את זה מהעמוד הזה:' + email_outro: קיבלת הודעה זו מכיוון שאת.ה עוקב.ת אחר "%{proposal_title}", וההצעה הזו כלולה בתוצאה "%{resource_title}". ניתן להפסיק לקבל התראות באמצעות הקישור הקודם. + email_subject: עדכון ל-%{resource_title} התקדמות + notification_title: התוצאה %{resource_title}, הכוללת את ההצעה %{proposal_title}, היא כעת %{ התקדמות}% הושלמה. + metrics: + results: + description: מספר התוצאות שנוצרו + object: תוצאות + title: תוצאות + resource_links: + included_projects: + result_project: פרויקטים כלולים בתוצאה זו + included_proposals: + result_proposal: הצעות כלולות בתוצאה זו + statistics: + results_count: תוצאות diff --git a/decidim-accountability/config/locales/it.yml b/decidim-accountability/config/locales/it.yml index 496f459249198..ffe7c9137e902 100644 --- a/decidim-accountability/config/locales/it.yml +++ b/decidim-accountability/config/locales/it.yml @@ -22,6 +22,7 @@ it: timeline_entry: description: Descrizione entry_date: Data + title: Titolo models: decidim/accountability/proposal_linked_event: Proposta inclusa in un risultato decidim/accountability/result_progress_updated_event: Avanzamento dei risultati aggiornato @@ -158,6 +159,7 @@ it: timeline_entry: fields: entry_date: Data + title: Titolo result_m: executed: Eseguito view: Visualizza diff --git a/decidim-accountability/config/locales/tr-TR.yml b/decidim-accountability/config/locales/tr-TR.yml index f623dbfc93814..57420b8385092 100644 --- a/decidim-accountability/config/locales/tr-TR.yml +++ b/decidim-accountability/config/locales/tr-TR.yml @@ -143,6 +143,14 @@ tr: create: "%{user_name} sonuç yaratmıştır %{resource_name} içinde %{space_name}" delete: "%{user_name} %{resource_name} sonuçtan %{space_name}sildi" update: "%{user_name} güncellenen sonuç %{resource_name} in %{space_name}" + status: + create: "48 / 5.000\nÇeviri sonuçları\nÇeviri sonucu\n%{user_name}, %{resource_name} kaydını oluşturdu" + delete: "%{user_name}, %{resource_name} kaydını sildi" + update: "%{user_name}, %{resource_name} kaydını Güncelledi" + timeline_entry: + create: "%{user_name}, %{resource_name} zaman çizelgesi girişini oluşturdu" + delete: "%{user_name}, %{resource_name} zaman çizelgesi girişini sildi" + update: "%{user_name}, %{resource_name} zaman çizelgesi girişini güncelledi" value_types: parent_presenter: not_found: 'Üst veritabanında bulunamadı (ID: %{id})' @@ -181,6 +189,7 @@ tr: timeline_entry: fields: entry_date: tarih + title: Başlık result_m: executed: Yürütüldü view: Görünüm @@ -225,6 +234,8 @@ tr: label: Durum components: accountability: + actions: + comment: Yorum name: Sorumluluk settings: global: @@ -265,3 +276,5 @@ tr: result_project: Bu sonuca dahil edilen projeler included_proposals: result_proposal: Bu sonuca dahil teklifler + statistics: + results_count: Sonuçlar diff --git a/decidim-admin/config/locales/bg.yml b/decidim-admin/config/locales/bg.yml index ee079e7f33e6f..db5ffd07cebca 100644 --- a/decidim-admin/config/locales/bg.yml +++ b/decidim-admin/config/locales/bg.yml @@ -117,6 +117,11 @@ bg: title: Заглавие decidim: admin: + filters: + state_eq: + label: Състояние + values: + rejected: Отхвърлен organization_appearance: form: colors: diff --git a/decidim-admin/config/locales/he-IL.yml b/decidim-admin/config/locales/he-IL.yml new file mode 100644 index 0000000000000..118fac6a0317e --- /dev/null +++ b/decidim-admin/config/locales/he-IL.yml @@ -0,0 +1,53 @@ +--- +he: + activemodel: + attributes: + area: + area_type: סוג איזור + name: שם + organization: ארגון + area_type: + name: שם + organization: ארגון + plural: רבים + attachment: + attachment_collection_id: תיקייה + description: תיאור + file: קובץ + title: צרופה או שם קובץ + weight: סידור המיקום + attachment_collection: + description: תיאור + name: שם + weight: סידור המיקום + category: + description: תיאור + name: שם + parent_id: הורה + weight: סידור המיקום + component: + name: שם + published_at: פורסם בתאריך + weight: סידור המיקום + external_domain: + value: ערך + help_section: + content: תוכן + id: מספר מזהה + import: + user_group_id: יצירת ייבוא כ + newsletter: + body: גוף + subject: נושא + organization: + alert_color: התראה + available_authorizations: הרשאות זמינות + badges_enabled: אפשר תגיות + comments_max_length: אורך מקסימלי לתגובות (השאירו 0 לערך ברירת המחדל) + decidim: + admin: + newsletters: + select_recipients_to_deliver: + send_to_all_users: שליחה לכל המשתמשים.ות + send_to_followers: שליחה לכל העוקבים.ות + send_to_participants: שליחה למשתתפים.ות diff --git a/decidim-admin/config/locales/lv.yml b/decidim-admin/config/locales/lv.yml index 4ce710521111e..02815ac53ad5b 100644 --- a/decidim-admin/config/locales/lv.yml +++ b/decidim-admin/config/locales/lv.yml @@ -288,6 +288,9 @@ lv: search_placeholder: name_or_nickname_or_email_cont: Meklējiet %{collection} pēc e-pasta adreses, vārda vai segvārda. title_cont: Meklējiet %{collection} pēc nosaukuma. + state_eq: + values: + rejected: Noraidīts help_sections: error: Palīdzības sadaļu atjaunināšanas laikā radās problēma form: diff --git a/decidim-admin/config/locales/no.yml b/decidim-admin/config/locales/no.yml index 796847254a250..515b700d5e0d0 100644 --- a/decidim-admin/config/locales/no.yml +++ b/decidim-admin/config/locales/no.yml @@ -793,6 +793,10 @@ form: add: Legg til i hviteliste title: Hviteliste for eksterne domener + organization_homepage: + edit: + active_content_blocks: Aktive innholdsblokker + inactive_content_blocks: Inaktive innholdsblokker organization_homepage_content_blocks: edit: update: Oppdater diff --git a/decidim-admin/config/locales/sl.yml b/decidim-admin/config/locales/sl.yml index 83bc9f2f670c2..adb6561bf5214 100644 --- a/decidim-admin/config/locales/sl.yml +++ b/decidim-admin/config/locales/sl.yml @@ -127,6 +127,9 @@ sl: filters: scope_id_eq: label: Področje + state_eq: + values: + rejected: Zavrnjen menu: scope_types: Tipi področja scopes: Področja diff --git a/decidim-assemblies/config/locales/he-IL.yml b/decidim-assemblies/config/locales/he-IL.yml new file mode 100644 index 0000000000000..e7feee24b4654 --- /dev/null +++ b/decidim-assemblies/config/locales/he-IL.yml @@ -0,0 +1,110 @@ +--- +he: + activemodel: + attributes: + assemblies_type: + title: כותרת + assembly: + announcement: הכרזה + area_id: אזור + assembly_type: סוג אסיפה + assembly_type_other: סוג אסיפה אחרת + banner_image: תמונת הבאנר + closing_date: תאריך סגירה + closing_date_reason: סיבת תאריך סגירה + composition: הרכב + copy_categories: העתקת קטגוריה + copy_components: העתקת רכיבים + copy_features: העתקת מאפיינים + created_by: נוצר ע"י + created_by_other: נוצר על ידי אחרים + creation_date: תאריך יצירה + decidim_area_id: אזור + decidim_assemblies_type_id: סוג אסיפה + decidim_scope_id: היקף + description: תיאור + developer_group: קבוצת יזמים + document: מסמך + domain: דומיין + duration: משך זמן + facebook: פייסבוק + github: Github + hashtag: תַּג הַקְבָּצָה + hero_image: תמונת ראשית + import_attachments: יבוא צרופות + import_categories: ייבוא קטגוריות + import_components: ייבוא רכיבים + included_at: נכלל ב + instagram: אינסטגרם + internal_organisation: ארגון פנימי + is_transparent: שקוף + local_area: אזור ארגון + meta_scope: מטא נתונים של היקף + parent_id: אסיפה (הורה) + participatory_processes_ids: תהליך השתתפותי מקושר + participatory_scope: מה הוחלט + participatory_structure: איך זה מוחלט + private_space: מרחב פרטי + promoted: הודגש + published_at: פורסם בתאריך + purpose_of_action: מטרת הפעולה + scope_id: היקף + scopes_enabled: היקפים מאופשרים + short_description: תיאור קצר + show_statistics: הצגת סטטיסטיקה + slug: כינוי לקישור + special_features: מאפיינים מיוחדים + decidim: + admin: + assembly_copies: + new: + title: שכפל אסיפה + assembly_imports: + create: + error: הייתה בעיה בייבוא ​​אסיפה זו. + success: אסיפה יובאה בהצלחה. + new: + import: ייבוא + select: בחירת הנתונים לייבוא + title: ייבוא אסיפה + assembly_members: + create: + error: הייתה בעיה בהוספת חבר.ה עבור אסיפה זו. + success: חבר.ה נוצר.ה בהצלחה עבור האסיפה הזו. + destroy: + success: חבר.ה נמחק.ה בהצלחה מאסיפה זו. + edit: + update: עדכון + index: + assembly_members_title: חברי.ות אסיפה + new: + create: יצירה + update: + error: הייתה בעיה בעדכון חבר.ה עבור אסיפה זו. + success: חבר.ה עודכנ.ה בהצלחה עבור אסיפה זו. + assembly_publications: + create: + error: הייתה בעיה בפרסום ​​אסיפה זו. + success: אסיפה פורסמה בהצלחה. + destroy: + error: הייתה בעיה בביטול פרסום ​​אסיפה זו. + success: פרסום האסיפה בוטל בהצלחה. + assembly_user_roles: + create: + error: הייתה בעיה בהוספת מנהל.ת עבור אסיפה זו. + assemblies: + show: + area: אזור + closing_date: תאריך סגירה + composition: הרכב + created_by: נוצר ע"י + creation_date: תאריך יצירה + developer_group: קבוצת יזמים + included_at: נכלל ב + internal_organisation: ארגון פנימי + local_area: אזור ארגון + participatory_scope: מה הוחלט + participatory_structure: איך זה מוחלט + purpose_of_action: מטרת הפעולה + related_participatory_processes: תהליך השתתפותי מקושר + scope: היקף diff --git a/decidim-assemblies/config/locales/id-ID.yml b/decidim-assemblies/config/locales/id-ID.yml index d223024f0f2b2..5dc599d934f27 100644 --- a/decidim-assemblies/config/locales/id-ID.yml +++ b/decidim-assemblies/config/locales/id-ID.yml @@ -303,7 +303,7 @@ id: purpose_of_action: Tujuan tindakan read_less: Baca lebih sedikit read_more: Baca lebih lajut - related_participatory_processes: Proses partisipatif terkait + related_participatory_processes: Proses Partisipatif Terkait scope: Cakupan social_networks: Jaringan sosial target: Yang berpartisipasi diff --git a/decidim-assemblies/config/locales/is-IS.yml b/decidim-assemblies/config/locales/is-IS.yml index ff58d9883ffd4..1d03a4726f084 100644 --- a/decidim-assemblies/config/locales/is-IS.yml +++ b/decidim-assemblies/config/locales/is-IS.yml @@ -233,7 +233,6 @@ is: purpose_of_action: Tilgangur aðgerða read_less: Lesa minna read_more: Lestu meira - related_participatory_processes: Svipaðir þátttakandi ferli scope: Umfang social_networks: Samfélagsmiðlar target: Hver tekur þátt diff --git a/decidim-assemblies/config/locales/lb.yml b/decidim-assemblies/config/locales/lb.yml index 1909c99effc0d..82fc15ebba5c9 100644 --- a/decidim-assemblies/config/locales/lb.yml +++ b/decidim-assemblies/config/locales/lb.yml @@ -309,7 +309,7 @@ lb: purpose_of_action: Zweck der Aktion read_less: Lese weniger read_more: Weiterlesen - related_participatory_processes: Procesos participativos relacionados + related_participatory_processes: Ähnliche Beteiligungsprozesse scope: Umfang social_networks: Soziale Netzwerke target: Wer nimmt teil? diff --git a/decidim-assemblies/config/locales/sk.yml b/decidim-assemblies/config/locales/sk.yml index 4e7daac2a2a1c..656de90eaffbc 100644 --- a/decidim-assemblies/config/locales/sk.yml +++ b/decidim-assemblies/config/locales/sk.yml @@ -158,6 +158,7 @@ sk: participatory_scope: O čom sa rozhoduje participatory_structure: Ako sa o tom rozhoduje purpose_of_action: Cieľ aktivity + related_participatory_processes: Súvisiace participatívne procesy scope: Rozsah target: Kto sa zúčastňuje events: diff --git a/decidim-assemblies/config/locales/tr-TR.yml b/decidim-assemblies/config/locales/tr-TR.yml index 4839419bf5834..0b9645ce1845a 100644 --- a/decidim-assemblies/config/locales/tr-TR.yml +++ b/decidim-assemblies/config/locales/tr-TR.yml @@ -376,7 +376,7 @@ tr: purpose_of_action: Eylem amacı read_less: Daha az oku read_more: Daha fazla oku - related_participatory_processes: İlgili katılımcı süreçleri + related_participatory_processes: İlgili Katılımcı süreçler scope: kapsam social_networks: Sosyal ağlar target: Katılanlar diff --git a/decidim-assemblies/config/locales/zh-TW.yml b/decidim-assemblies/config/locales/zh-TW.yml index dcda7902b90bf..f4becfdb4b822 100644 --- a/decidim-assemblies/config/locales/zh-TW.yml +++ b/decidim-assemblies/config/locales/zh-TW.yml @@ -383,7 +383,7 @@ zh-TW: purpose_of_action: 行動目的 read_less: 閱讀減少 read_more: 閱讀變多 - related_participatory_processes: 相關參與過程 + related_participatory_processes: 相關參與程序 scope: 範圍 social_networks: 社群網路 social_networks_title: 訪問大會 diff --git a/decidim-blogs/config/locales/ga-IE.yml b/decidim-blogs/config/locales/ga-IE.yml index d5a20266867b8..187096b21d52c 100644 --- a/decidim-blogs/config/locales/ga-IE.yml +++ b/decidim-blogs/config/locales/ga-IE.yml @@ -41,6 +41,9 @@ ga: comments: tráchtanna components: blogs: + actions: + comment: Tabhair Trácht + endorse: Formhuinigh name: Blag settings: step: diff --git a/decidim-blogs/config/locales/he-IL.yml b/decidim-blogs/config/locales/he-IL.yml new file mode 100644 index 0000000000000..af6fa60a73f2c --- /dev/null +++ b/decidim-blogs/config/locales/he-IL.yml @@ -0,0 +1 @@ +he: diff --git a/decidim-blogs/config/locales/it.yml b/decidim-blogs/config/locales/it.yml index 9a9593c763bdd..f0156de1106ce 100644 --- a/decidim-blogs/config/locales/it.yml +++ b/decidim-blogs/config/locales/it.yml @@ -57,6 +57,9 @@ it: read_more: Leggi di più components: blogs: + actions: + comment: Commento + endorse: Appoggia name: blog settings: global: diff --git a/decidim-blogs/config/locales/lb.yml b/decidim-blogs/config/locales/lb.yml index 5a65b967973e6..8410857bab35d 100644 --- a/decidim-blogs/config/locales/lb.yml +++ b/decidim-blogs/config/locales/lb.yml @@ -57,6 +57,9 @@ lb: read_more: Weiterlesen components: blogs: + actions: + comment: Kommentar + endorse: Bestätigen name: Blog settings: global: diff --git a/decidim-blogs/config/locales/pt.yml b/decidim-blogs/config/locales/pt.yml index 7cfc7c690b0e6..ef315d2f4a71f 100644 --- a/decidim-blogs/config/locales/pt.yml +++ b/decidim-blogs/config/locales/pt.yml @@ -57,6 +57,9 @@ pt: read_more: Ler mais components: blogs: + actions: + comment: Comentar + endorse: Apoiar name: Blog settings: global: diff --git a/decidim-budgets/config/locales/he-IL.yml b/decidim-budgets/config/locales/he-IL.yml new file mode 100644 index 0000000000000..af6fa60a73f2c --- /dev/null +++ b/decidim-budgets/config/locales/he-IL.yml @@ -0,0 +1 @@ +he: diff --git a/decidim-comments/config/locales/he-IL.yml b/decidim-comments/config/locales/he-IL.yml new file mode 100644 index 0000000000000..af6fa60a73f2c --- /dev/null +++ b/decidim-comments/config/locales/he-IL.yml @@ -0,0 +1 @@ +he: diff --git a/decidim-conferences/config/locales/he-IL.yml b/decidim-conferences/config/locales/he-IL.yml new file mode 100644 index 0000000000000..af6fa60a73f2c --- /dev/null +++ b/decidim-conferences/config/locales/he-IL.yml @@ -0,0 +1 @@ +he: diff --git a/decidim-consultations/config/locales/he-IL.yml b/decidim-consultations/config/locales/he-IL.yml new file mode 100644 index 0000000000000..af6fa60a73f2c --- /dev/null +++ b/decidim-consultations/config/locales/he-IL.yml @@ -0,0 +1 @@ +he: diff --git a/decidim-core/config/locales/bg.yml b/decidim-core/config/locales/bg.yml index 6a953d457a820..50e1aa8bf88c6 100644 --- a/decidim-core/config/locales/bg.yml +++ b/decidim-core/config/locales/bg.yml @@ -1139,6 +1139,7 @@ bg: versions: resource_version: of_versions: "(от %{number})" + see_other_versions: виж други версии version: Версия %{number} versions_list: show: diff --git a/decidim-core/config/locales/de.yml b/decidim-core/config/locales/de.yml index 0558980c0283d..85dc9e93c5713 100644 --- a/decidim-core/config/locales/de.yml +++ b/decidim-core/config/locales/de.yml @@ -1397,7 +1397,7 @@ de: already_reported: Dieser Inhalt wurde bereits gemeldet und wird von einem Administrator überprüft. close: Schließen description: Wieso ist dieser Inhalt problematisch / unangemessen? - does_not_belong: Enthält illegale Aktivitäten, Selbstmorddrohungen, persönliche Informationen oder etwas anderes, von dem Sie denken, dass es nicht auf %{organization_name}. + does_not_belong: Enthält illegale Aktivitäten, Selbstmorddrohungen, persönliche Informationen oder etwas anderes, von dem Sie denken, dass es nicht auf %{organization_name} gehört. offensive: Enthält Rassismus, Sexismus, Verunglimpfungen, persönliche Angriffe, Morddrohungen, Selbstmordanträge oder jede Form von Hassreden. reason: Begründung report: Meldung erfassen @@ -1587,25 +1587,25 @@ de: confirmation_instructions: action: Konto bestätigen greeting: Willkommen %{recipient}! - instruction: 'Sie können Ihre Konto-E-Mail über den folgenden Link bestätigen:' - subject: Bestätigungsanweisungen + instruction: 'Bitte bestätigen Sie Ihre E-Mail-Adresse über den folgenden Link:' + subject: E-Mail bestätigen email_changed: greeting: Hallo %{recipient}! - message: Wir setzen uns mit Ihnen in Verbindung, um Sie darüber zu informieren, dass Ihre E-Mail-Adresse auf %{email}geändert wird. + message: Ihre E-Mail-Adresse wurde zu %{email} geändert. subject: E-Mail geändert invitation_instructions: - accept: Die Einladung annehmen - accept_until: Diese Einladung wird in %{due_date}fällig. + accept: Einladung annehmen + accept_until: Diese Einladung ist bis %{due_date} gültig. decline: Einladung ablehnen hello: Hallo %{email}, ignore: |- Wenn Sie die Einladung nicht annehmen möchten, ignorieren Sie diese E-Mail.
    Ihr Konto wird erst erstellt, wenn Sie auf den obigen Link zugreifen und Ihren Kontonamen und Ihr Passwort festlegen. invited_you_as_admin: "%{invited_by} hat Sie als Admin von %{application} eingeladen. Sie können die Einladung über den folgenden Link akzeptieren." - invited_you_as_private_user: "%{invited_by} hat Sie als privaten Nutzenden zu %{application} eingeladen. Sie können die Einladung über den folgenden Link akzeptieren." + invited_you_as_private_user: "%{invited_by} hat Sie als privaten Teilnehmenden zu %{application} eingeladen. Sie können die Einladung über den folgenden Link akzeptieren." someone_invited_you: Jemand hat Sie zu %{application} eingeladen. Sie können die EInladung über den folgenden Link akzeptieren. someone_invited_you_as_admin: Jemand hat Sie als Admin zu %{application} eingeladen. Sie können die Einladung über den folgenden Link akzeptieren. - someone_invited_you_as_private_user: Jemand hat Sie als privater Teilnehmende zu %{application} eingeladen. Sie können die Einladung über den folgenden Link akzeptieren. + someone_invited_you_as_private_user: Jemand hat Sie als privaten Teilnehmenden zu %{application} eingeladen. Sie können die Einladung über den folgenden Link akzeptieren. subject: Anweisungen zur Einladung invite_admin: subject: Du wurdest eingeladen, %{organization} zu verwalten @@ -1620,18 +1620,18 @@ de: message: Wir kontaktieren Sie, um Sie darüber zu informieren, dass Ihr Passwort geändert wurde. subject: Passwort geändert reset_password_instructions: - action: Ändere mein Passwort + action: Mein Passwort ändern greeting: Hallo %{recipient}! - instruction: Jemand hat einen Link angefordert, um Ihr Passwort zu ändern, und Sie können dies über den folgenden Link tun. + instruction: 'Jemand hat einen Link angefordert, um Ihr Passwort zu ändern. Falls Sie das selbst waren, folgen Sie diesem Link:' instruction_2: Wenn Sie dies nicht angefordert haben, ignorieren Sie diese E-Mail. - instruction_3: Ihr Passwort ändert sich erst, wenn Sie auf den obigen Link zugreifen und einen neuen erstellen. - subject: Passwort-Anweisungen zurücksetzen + instruction_3: Ihr Passwort ändert sich erst, wenn Sie auf den angezeigten Link zugreifen und ein neues Passwort erstellen. + subject: Passwort zurücksetzen unlock_instructions: - action: Entsperren Sie mein Konto + action: Mein Konto entsperren greeting: Hallo %{recipient}! instruction: 'Klicken Sie auf den folgenden Link, um Ihr Konto zu entsperren:' message: Ihr Konto wurde aufgrund einer übermäßigen Anzahl fehlgeschlagener Anmeldeversuche gesperrt. - subject: Entsperren Anweisungen + subject: Anweisungen zur Entsperrung omniauth_callbacks: failure: 'Sie konnten nicht mit Ihrem %{kind}-Account angemeldet werden. Grund: "%{reason}".' success: Sie haben sich erfolgreich mit Ihrem %{kind}-Account angemeldet. @@ -1645,7 +1645,7 @@ de: title: Passwort ändern new: forgot_your_password: Haben Sie Ihr Passwort vergessen? - send_me_reset_password_instructions: Senden Sie mir das Passwort zurück + send_me_reset_password_instructions: Schicken Sie mir eine Anweisung zum Zurücksetzen des Passwortes no_token: Sie können nicht auf diese Seite zugreifen, ohne von einer E-Mail zum Zurücksetzen des Kennworts zu stammen. Wenn Sie eine E-Mail zum Zurücksetzen des Passworts erhalten, vergewissern Sie sich bitte, dass Sie die vollständige URL verwendet haben. send_instructions: Sie erhalten eine E-Mail mit Anweisungen zum Zurücksetzen Ihres Passworts in wenigen Minuten. send_paranoid_instructions: Wenn Ihre E-Mail-Adresse in unserer Datenbank vorhanden ist, erhalten Sie innerhalb weniger Minuten einen Link zur Passwortwiederherstellung unter Ihrer E-Mail-Adresse. diff --git a/decidim-core/config/locales/fi.yml b/decidim-core/config/locales/fi.yml index 36d8dbb5e0298..3c0618559e170 100644 --- a/decidim-core/config/locales/fi.yml +++ b/decidim-core/config/locales/fi.yml @@ -777,7 +777,7 @@ fi: linked_classes: all: Kaikki collaborative_draft: Yhdessä koostettu luonnos - dummy_resource: Dummy-resurssit + dummy_resource: Esimerkkitietueet meeting: Tapaamiset project: Hankkeet proposal: Ehdotukset diff --git a/decidim-core/config/locales/he-IL.yml b/decidim-core/config/locales/he-IL.yml new file mode 100644 index 0000000000000..af6fa60a73f2c --- /dev/null +++ b/decidim-core/config/locales/he-IL.yml @@ -0,0 +1 @@ +he: diff --git a/decidim-core/config/locales/ru.yml b/decidim-core/config/locales/ru.yml index 9f01183e57f92..4ae5074ae5b04 100644 --- a/decidim-core/config/locales/ru.yml +++ b/decidim-core/config/locales/ru.yml @@ -504,9 +504,12 @@ ru: index: from: От no_conversations: У вас еще нет бесед + title: Беседы reply: send: Отправить title: Ответить + show: + title: Беседа с %{usernames} start: send: Отправить title: Начать беседу @@ -590,6 +593,7 @@ ru: profiles: default_officialization_text_for_users: Личность этого участника подтверждена при всём честном народе, его / ее имя или роль проверены на соответствие его / ее реальному имени и роли show: + conversations: Беседы followers: Читают following: Следит за sidebar: @@ -666,6 +670,8 @@ ru: user_conversations: index: close: Закрыть + show: + title: Беседа с %{usernames} update: error: Сообщение не отправлено. Попробуйте позже version_author: diff --git a/decidim-core/config/locales/uk.yml b/decidim-core/config/locales/uk.yml index 2f2cf432b4ba9..128e4cd17a65b 100644 --- a/decidim-core/config/locales/uk.yml +++ b/decidim-core/config/locales/uk.yml @@ -172,6 +172,11 @@ uk: ok: Гаразд title: Недостатньо прав через відсутність підтвердження особи collapsible_list: + hidden_elements_count: + one: і ще %{count} + few: і ще %{count} + many: і ще %{count} + other: і ще %{count} see_less: "(читати менше)" see_more: "(читати далі)" components: @@ -379,9 +384,12 @@ uk: index: from: Від no_conversations: У вас ще немає бесід + title: Бесіди reply: send: Надіслати title: Відповісти + show: + title: Бесіда з %{usernames} start: send: Надіслати title: Почати бесіду @@ -465,6 +473,7 @@ uk: profiles: default_officialization_text_for_users: Особу цього учасника прилюдно підтверджено, його ім'я чи роль перевірено на відповідність його справжньому імені та ролі show: + conversations: Бесіди followers: Ті, хто стежить following: 'Стежить за:' user: @@ -530,6 +539,8 @@ uk: user_conversations: index: close: Закрити + show: + title: Бесіда з %{usernames} update: error: Повідомлення не надіслано. Спробуйте ще раз пізніше version_author: diff --git a/decidim-debates/config/locales/ar.yml b/decidim-debates/config/locales/ar.yml index afa3e7b5dd9c9..232e1c988c919 100644 --- a/decidim-debates/config/locales/ar.yml +++ b/decidim-debates/config/locales/ar.yml @@ -124,13 +124,6 @@ ar: events: debates: create_debate_event: - space_followers: - email_intro: |- - مرحبا، - نقاش الجديدة "%{resource_title}" تم إنشاؤها على %{space_title} مساحة المشاركة، والتحقق من ذلك والمساهمة: - email_outro: لقد تلقيت هذا الإشعار لأنك تتابع مساحة المشاركة %{space_title} . يمكنك إيقاف تلقي الإخطارات باتباع الرابط السابق. - email_subject: مناقشة جديدة "%{resource_title}" في %{space_title} - notification_title: تم إنشاء المناقشة %{resource_title} في %{space_title}. user_followers: email_intro: |- مرحبًا ، diff --git a/decidim-debates/config/locales/ca.yml b/decidim-debates/config/locales/ca.yml index f1cfa4c47c76f..a82798b131010 100644 --- a/decidim-debates/config/locales/ca.yml +++ b/decidim-debates/config/locales/ca.yml @@ -192,10 +192,10 @@ ca: space_followers: email_intro: |- Hola, - S'ha creat un nou debat "%{resource_title}" a l'espai participatiu %{space_title}, fes-hi un cop d'ull i contribueix: - email_outro: Has rebut aquesta notificació perquè estàs seguint %{space_title}. Pots deixar de rebre notificacions seguint l'enllaç anterior. - email_subject: Nou debat "%{resource_title}" el dia %{space_title} - notification_title: El debat %{resource_title} s'ha creat a %{space_title}. + S'ha creat un nou debat "%{resource_title}" a l'espai participatiu %{participatory_space_title}, dona-hi una ullada i contribueix-hi: + email_outro: Has rebut aquesta notificació perquè estàs seguint %{participatory_space_title}. Pots deixar de rebre notificacions des de l'enllaç anterior. + email_subject: Nou debat "%{resource_title}" a %{participatory_space_title} + notification_title: S'ha creat el debat %{resource_title} a %{participatory_space_title}. user_followers: email_intro: |- Hola, diff --git a/decidim-debates/config/locales/cs.yml b/decidim-debates/config/locales/cs.yml index d868c6a3e8f15..36e56937c0222 100644 --- a/decidim-debates/config/locales/cs.yml +++ b/decidim-debates/config/locales/cs.yml @@ -195,11 +195,11 @@ cs: create_debate_event: space_followers: email_intro: |- - Ahoj, - Byla vytvořena nová debata "%{resource_title}" ve skupině %{space_title}, omrkněte a přispějte: - email_outro: Toto oznámení jste obdrželi, protože sledujete participační prostor %{space_title}. Můžete zrušit příjem oznámení na předchozím odkazu. - email_subject: Nová debata "%{resource_title}" na %{space_title} - notification_title: Debata %{resource_title} byla vytvořena na %{space_title}. + Dobrý den, + Byla vytvořena nová debata "%{resource_title}" ve skupině %{participatory_space_title}, omrkněte a přispějte: + email_outro: Toto oznámení jste obdrželi, protože sledujete participační prostor %{participatory_space_title}. Můžete zrušit příjem oznámení na předchozím odkazu. + email_subject: Nová debata "%{resource_title}" na %{participatory_space_title} + notification_title: Debata %{resource_title} byla vytvořena na %{participatory_space_title}. user_followers: email_intro: |- Ahoj, diff --git a/decidim-debates/config/locales/de.yml b/decidim-debates/config/locales/de.yml index c6b0bd46bc47a..42e5bc02e1573 100644 --- a/decidim-debates/config/locales/de.yml +++ b/decidim-debates/config/locales/de.yml @@ -191,11 +191,11 @@ de: create_debate_event: space_followers: email_intro: |- - Hallo, - Eine neue Debatte "%{resource_title}" wurde in %{space_title} erstellt, sehen Sie es sich an und reden Sie mit: - email_outro: Sie haben diese Benachrichtigung erhalten, weil Sie %{space_title} folgen. Falls Sie keine solchen Benachrichtigungen mehr erhalten möchten, besuchen Sie den obigen Link. - email_subject: Neue Debatte "%{resource_title}" in %{space_title} - notification_title: Die Debatte %{resource_title} wurde in %{space_title} erstellt. + Guten Tag, + Eine neue Debatte "%{resource_title}" wurde auf %{participatory_space_title} eröffnet. Jetzt anschauen und mitdiskutieren unter: + email_outro: Sie haben diese Benachrichtigung erhalten, weil Sie %{participatory_space_title} folgen. Falls Sie keine solchen Benachrichtigungen mehr erhalten möchten, besuchen Sie den obigen Link. + email_subject: Neue Debatte "%{resource_title}" in %{participatory_space_title} + notification_title: Die Debatte %{resource_title} wurde auf %{participatory_space_title} erstellt. user_followers: email_intro: |- Hallo, diff --git a/decidim-debates/config/locales/el.yml b/decidim-debates/config/locales/el.yml index 433b82566dd92..f3bf41e9c72f6 100644 --- a/decidim-debates/config/locales/el.yml +++ b/decidim-debates/config/locales/el.yml @@ -185,13 +185,6 @@ el: events: debates: create_debate_event: - space_followers: - email_intro: |- - Γεια σας, - Μια νέα συζήτηση «%{resource_title}» δημιουργήθηκε στον χώρο συμμετοχής %{space_title}, δείτε την και συνεισφέρετε: - email_outro: Λάβατε αυτήν την ειδοποίηση επειδή ακολουθείτε τον χώρο συμμετοχής %{space_title}. Μπορείτε να διακόψετε τη λήψη ειδοποιήσεων ακολουθώντας τον προηγούμενο σύνδεσμο. - email_subject: Νέα συζήτηση «%{resource_title}» στον χώρο %{space_title} - notification_title: Η %{resource_title} συζήτηση δημιουργήθηκε στον χώρο %{space_title}. user_followers: email_intro: |- Γεια σας, diff --git a/decidim-debates/config/locales/es-MX.yml b/decidim-debates/config/locales/es-MX.yml index 3c7299ce95203..010d63b42c277 100644 --- a/decidim-debates/config/locales/es-MX.yml +++ b/decidim-debates/config/locales/es-MX.yml @@ -192,10 +192,10 @@ es-MX: space_followers: email_intro: |- Hola, - Se ha creado un nuevo debate "%{resource_title}" en el espacio participativo %{space_title} , échale un vistazo y contribuye: - email_outro: Has recibido esta notificación porque estás siguiendo a %{space_title}. Puedes dejar de recibir notificaciones siguiendo el enlace anterior. - email_subject: Nuevo debate "%{resource_title}" en %{space_title} - notification_title: El debate %{resource_title} fue creado el %{space_title}. + Se ha creado un nuevo debate "%{resource_title}" en el espacio participativo %{participatory_space_title}, échale un vistazo y contribuye: + email_outro: Has recibido esta notificación porque estás siguiendo a %{participatory_space_title}. Puedes dejar de recibir notificaciones desde el enlace anterior. + email_subject: Nuevo debate "%{resource_title}" en %{participatory_space_title} + notification_title: Se ha creado el debate %{resource_title} en %{participatory_space_title}. user_followers: email_intro: |- Hola, diff --git a/decidim-debates/config/locales/es-PY.yml b/decidim-debates/config/locales/es-PY.yml index eb754ef4990d2..7e33a64d2ec59 100644 --- a/decidim-debates/config/locales/es-PY.yml +++ b/decidim-debates/config/locales/es-PY.yml @@ -188,10 +188,10 @@ es-PY: space_followers: email_intro: |- Hola, - Se ha creado un nuevo debate "%{resource_title}" en el espacio participativo %{space_title} , échale un vistazo y contribuye: - email_outro: Has recibido esta notificación porque estás siguiendo a %{space_title}. Puedes dejar de recibir notificaciones siguiendo el enlace anterior. - email_subject: Nuevo debate "%{resource_title}" en %{space_title} - notification_title: El debate %{resource_title} fue creado el %{space_title}. + Se ha creado un nuevo debate "%{resource_title}" en el espacio participativo %{participatory_space_title}, échale un vistazo y contribuye: + email_outro: Has recibido esta notificación porque estás siguiendo a %{participatory_space_title}. Puedes dejar de recibir notificaciones desde el enlace anterior. + email_subject: Nuevo debate "%{resource_title}" en %{participatory_space_title} + notification_title: Se ha creado el debate %{resource_title} en %{participatory_space_title}. user_followers: email_intro: |- Hola, diff --git a/decidim-debates/config/locales/es.yml b/decidim-debates/config/locales/es.yml index 3bd3f2c1e8acb..dd4b2855ed0ca 100644 --- a/decidim-debates/config/locales/es.yml +++ b/decidim-debates/config/locales/es.yml @@ -192,10 +192,10 @@ es: space_followers: email_intro: |- Hola, - Se ha creado un nuevo debate "%{resource_title}" en el espacio participativo %{space_title} , échale un vistazo y contribuye: - email_outro: Has recibido esta notificación porque estás siguiendo a %{space_title}. Puedes dejar de recibir notificaciones siguiendo el enlace anterior. - email_subject: Nuevo debate "%{resource_title}" en %{space_title} - notification_title: El debate %{resource_title} fue creado el %{space_title}. + Se ha creado un nuevo debate "%{resource_title}" en el espacio participativo %{participatory_space_title}, échale un vistazo y contribuye: + email_outro: Has recibido esta notificación porque estás siguiendo a %{participatory_space_title}. Puedes dejar de recibir notificaciones desde el enlace anterior. + email_subject: Nuevo debate "%{resource_title}" en %{participatory_space_title} + notification_title: Se ha creado el debate %{resource_title} en %{participatory_space_title}. user_followers: email_intro: |- Hola, diff --git a/decidim-debates/config/locales/eu.yml b/decidim-debates/config/locales/eu.yml index 6b486683081e5..64d93903d4986 100644 --- a/decidim-debates/config/locales/eu.yml +++ b/decidim-debates/config/locales/eu.yml @@ -191,11 +191,11 @@ eu: create_debate_event: space_followers: email_intro: |- - Kaixo, - "%{resource_title}" beste eztabaida bat sortu da %{space_title} parte hartzeko espazioan, begiratu eta lagundu: - email_outro: Jakinarazpen hori jaso duzu %{space_title} partaidetzazko espazioa jarraitzen ari zarelako. Aurreko estekan jakinarazpenak jasotzeari utzi ahal diozu. - email_subject: Beste eztabaida bat "%{resource_title}" hemen %{space_title} - notification_title: %{resource_title} eztabaida sortu zen %{space_title}. + Kaixo: + "%{resources ce_title}" eztabaida berria sortu da %{participatory_space_title}} partaidetza-espazioan, egiaztatu eta egin ekarpenak: + email_outro: Jakinarazpen hau jaso duzu %{participatory_space_title} parte hartzeko espazioa jarraitzen ari zarelako. Aurreko estekan jakinarazpenak jasotzeari utzi ahal diozu. + email_subject: '"%{resource_title}" eztabaida berria hemen %{participatory_space_title}' + notification_title: '%{resource_title} eztabaida sortu da hemen: %{participatory_space_title}.' user_followers: email_intro: |- Kaixo, diff --git a/decidim-debates/config/locales/fi-plain.yml b/decidim-debates/config/locales/fi-plain.yml index 8ff299cf1c4db..37e00ce04e6b5 100644 --- a/decidim-debates/config/locales/fi-plain.yml +++ b/decidim-debates/config/locales/fi-plain.yml @@ -192,10 +192,10 @@ fi-pl: space_followers: email_intro: |- Hei, - osallisuustilaan %{space_title} on luotu uusi keskustelu "%{resource_title}", tutustu siihen ja osallistu: - email_outro: Tämä ilmoitus on lähetetty sinulle, koska seuraat kohdetta %{space_title}. Voit lopettaa ilmoitusten vastaanottamisen edellä esitetyn linkin kautta. - email_subject: Uusi keskustelu "%{resource_title}" tilassa %{space_title} - notification_title: Keskustelu aiheesta %{resource_title} luotiin kohtaan %{space_title}. + osallistumistilaan %{participatory_space_title} on luotu uusi keskustelu "%{resource_title}", tutustu siihen ja osallistu: + email_outro: Tämä ilmoitus on lähetetty sinulle, koska seuraat kohdetta %{participatory_space_title}. Voit lopettaa ilmoitusten vastaanottamisen edellä esitetyn linkin kautta. + email_subject: Uusi keskustelu "%{resource_title}" osallistumistilassa %{participatory_space_title} + notification_title: Keskustelu nimeltä %{resource_title} luotiin osallistumistilaan %{participatory_space_title}. user_followers: email_intro: |- Hei, diff --git a/decidim-debates/config/locales/fi.yml b/decidim-debates/config/locales/fi.yml index 7e570abf08c14..86def0d8f6faf 100644 --- a/decidim-debates/config/locales/fi.yml +++ b/decidim-debates/config/locales/fi.yml @@ -192,10 +192,10 @@ fi: space_followers: email_intro: |- Hei, - osallistumistilaan %{space_title} on luotu uusi keskustelu "%{resource_title}", tutustu siihen ja osallistu: - email_outro: Tämä ilmoitus on lähetetty sinulle, koska seuraat kohdetta %{space_title}. Voit lopettaa ilmoitusten vastaanottamisen edellä esitetyn linkin kautta. - email_subject: Uusi keskustelu "%{resource_title}" osallistumistilassa %{space_title} - notification_title: Keskustelu aiheesta %{resource_title} luotiin kohtaan %{space_title}. + osallistumistilaan %{participatory_space_title} on luotu uusi keskustelu "%{resource_title}", tutustu siihen ja osallistu: + email_outro: Tämä ilmoitus on lähetetty sinulle, koska seuraat kohdetta %{participatory_space_title}. Voit lopettaa ilmoitusten vastaanottamisen edellä esitetyn linkin kautta. + email_subject: Uusi keskustelu "%{resource_title}" osallistumistilassa %{participatory_space_title} + notification_title: Keskustelu nimeltä %{resource_title} luotiin osallistumistilaan %{participatory_space_title}. user_followers: email_intro: |- Hei, diff --git a/decidim-debates/config/locales/fr-CA.yml b/decidim-debates/config/locales/fr-CA.yml index 26d0c7dfd9c3c..e04d0f0bfd481 100644 --- a/decidim-debates/config/locales/fr-CA.yml +++ b/decidim-debates/config/locales/fr-CA.yml @@ -191,11 +191,11 @@ fr-CA: create_debate_event: space_followers: email_intro: |- - Salut, - Un nouveau débat «%{resource_title}» a été créée sur le %{space_title} espace participatif, vérifier et contribuer: - email_outro: Vous avez reçu cette notification parce que vous suivez l'espace participatif %{space_title}. Vous pouvez cesser de recevoir des notifications en suivant ce dernier lien. - email_subject: Nouveau débat "%{resource_title}" sur %{space_title} - notification_title: Le débat %{resource_title} a été créé le %{space_title}. + Bonjour, + Un nouveau débat "%{resource_title}" a été créé dans l'espace participatif %{participatory_space_title}, nous vous invitons à le consulter et à y contribuer: + email_outro: Vous avez reçu cette notification car vous suivez l'espace participatif %{participatory_space_title}. Vous pouvez arrêter de recevoir des notifications en cliquant sur le lien précédent. + email_subject: Nouveau débat "%{resource_title}" sur %{participatory_space_title} + notification_title: Le débat %{resource_title} a été créé sur %{participatory_space_title}. user_followers: email_intro: |- Bonjour, diff --git a/decidim-debates/config/locales/fr.yml b/decidim-debates/config/locales/fr.yml index fb7acc91c5cf9..b84d8232469ee 100644 --- a/decidim-debates/config/locales/fr.yml +++ b/decidim-debates/config/locales/fr.yml @@ -191,11 +191,11 @@ fr: create_debate_event: space_followers: email_intro: |- - Salut, - Un nouveau débat «%{resource_title}» a été créée sur le %{space_title} espace participatif, vérifier et contribuer: - email_outro: Vous avez reçu cette notification parce que vous suivez l'espace participatif %{space_title}. Si vous souhaitez vous désabonner des notifications, connectez-vous à la plateforme, puis rendez-vous dans l'onglet “Mon compte” > “Paramètres des notifications”. - email_subject: Nouveau débat "%{resource_title}" sur %{space_title} - notification_title: Le débat %{resource_title} a été créé le %{space_title}. + Bonjour, + Un nouveau débat "%{resource_title}" a été créé dans l'espace participatif %{participatory_space_title}, nous vous invitons à le consulter et à y contribuer: + email_outro: Vous avez reçu cette notification car vous suivez l'espace participatif %{participatory_space_title}. Vous pouvez arrêter de recevoir des notifications en cliquant sur le lien précédent. + email_subject: Nouveau débat "%{resource_title}" sur %{participatory_space_title} + notification_title: Le débat %{resource_title} a été créé sur %{participatory_space_title}. user_followers: email_intro: |- Bonjour, diff --git a/decidim-debates/config/locales/gl.yml b/decidim-debates/config/locales/gl.yml index 8c4bd80c31d1f..9285f3d045e46 100644 --- a/decidim-debates/config/locales/gl.yml +++ b/decidim-debates/config/locales/gl.yml @@ -111,13 +111,6 @@ gl: events: debates: create_debate_event: - space_followers: - email_intro: |- - Ola, - Creouse un novo debate "%{resource_title}" nos %{space_title} espazos participativos, verifícalo e contribuír: - email_outro: Recibiches esta notificación porque estás seguindo o %{space_title} espazo participativo. Podes deixar de recibir notificacións seguindo a ligazón anterior. - email_subject: Novo debate "%{resource_title}" en %{space_title} - notification_title: O %{resource_title} debate foi creado en %{space_title}. user_followers: email_intro: |- Ola, diff --git a/decidim-debates/config/locales/he-IL.yml b/decidim-debates/config/locales/he-IL.yml new file mode 100644 index 0000000000000..af6fa60a73f2c --- /dev/null +++ b/decidim-debates/config/locales/he-IL.yml @@ -0,0 +1 @@ +he: diff --git a/decidim-debates/config/locales/hu.yml b/decidim-debates/config/locales/hu.yml index e16c16c9d365e..4040ad828a12d 100644 --- a/decidim-debates/config/locales/hu.yml +++ b/decidim-debates/config/locales/hu.yml @@ -186,13 +186,6 @@ hu: events: debates: create_debate_event: - space_followers: - email_intro: |- - Szia, - Új vitát "%{resource_title}" hoztak létre a %{space_title} részvételi téren, nézd meg és járulj hozzá: - email_outro: 'Ezt az értesítést azért kaptad, mert ezt a részvételi helyet követed: "%{space_title}". Az értesítéseket a következő linkre kattintva kapcsolhatod ki.' - email_subject: Új vita "%{resource_title}" indult itt %{space_title} - notification_title: A(z) %{resource_title}vita létrejött itt:%{space_title}. user_followers: email_intro: |- Szia, diff --git a/decidim-debates/config/locales/id-ID.yml b/decidim-debates/config/locales/id-ID.yml index e776e6c137367..5fed7981d55fd 100644 --- a/decidim-debates/config/locales/id-ID.yml +++ b/decidim-debates/config/locales/id-ID.yml @@ -105,13 +105,6 @@ id: events: debates: create_debate_event: - space_followers: - email_intro: |- - Hai, - Debat baru "%{resource_title}" telah dibuat di %{space_title} ruang partisipatif, periksa dan berkontribusi: - email_outro: Anda telah menerima pemberitahuan ini karena Anda mengikuti %{space_title} ruang partisipatif. Anda dapat berhenti menerima pemberitahuan setelah tautan sebelumnya. - email_subject: Perdebatan baru "%{resource_title}" pada %{space_title} - notification_title: Debat %{resource_title} dibuat pada %{space_title}. user_followers: email_intro: |- Hai, diff --git a/decidim-debates/config/locales/is-IS.yml b/decidim-debates/config/locales/is-IS.yml index 3c9c7729eaa98..f54533c504320 100644 --- a/decidim-debates/config/locales/is-IS.yml +++ b/decidim-debates/config/locales/is-IS.yml @@ -83,9 +83,6 @@ is: events: debates: create_debate_event: - space_followers: - email_outro: Þú hefur fengið þessa tilkynningu vegna þess að þú fylgir %{space_title} þátttakandi plássinu. Þú getur hætt við að fá tilkynningar eftir fyrri tengilinn. - notification_title: %{resource_title} umræðurnar voru búnar til á %{space_title}. user_followers: email_outro: Þú hefur fengið þessa tilkynningu vegna þess að þú fylgist með %{author_nickname}. Þú getur hætt við að fá tilkynningar eftir fyrri tengilinn. creation_disabled: diff --git a/decidim-debates/config/locales/it.yml b/decidim-debates/config/locales/it.yml index 19e298f699f29..31cd834e1d628 100644 --- a/decidim-debates/config/locales/it.yml +++ b/decidim-debates/config/locales/it.yml @@ -185,13 +185,6 @@ it: events: debates: create_debate_event: - space_followers: - email_intro: |- - Ciao, - Un nuovo dibattito "%{resource_title}" è stato creato sui %{space_title} spazi partecipativi, dai un'occhiata e dai: - email_outro: Hai ricevuto questa notifica perché stai seguendo lo spazio partecipativo %{space_title}. È possibile interrompere la ricezione di notifiche seguendo il collegamento precedente. - email_subject: Nuovo dibattito "%{resource_title}" su %{space_title} - notification_title: Il dibattito %{resource_title} è stato creato su %{space_title}. user_followers: email_intro: |- Ciao, diff --git a/decidim-debates/config/locales/ja.yml b/decidim-debates/config/locales/ja.yml index 9171f4c7db6a7..9f50be0efc9a3 100644 --- a/decidim-debates/config/locales/ja.yml +++ b/decidim-debates/config/locales/ja.yml @@ -190,10 +190,10 @@ ja: space_followers: email_intro: |- こんにちは、 - %{resource_title} 参加型スペースに新しいディベート「 %{space_title} 」が作成されました。チェックして貢献: - email_outro: '%{space_title} の参加型スペースをフォローしているため、この通知を受信しました。前のリンクに続く通知の受信を停止できます。' - email_subject: '%{resource_title}に新しいディベート " %{space_title}"' - notification_title: %{resource_title} のディベートは %{space_title} に作成されました。 + %{resource_title} 参加型スペースに新しいディベート「 %{participatory_space_title} 」が作成されました。ぜひともご参加ください: + email_outro: 参加型スペース %{participatory_space_title} をフォローしているため、この通知を受信しました。通知が不要な場合、上記リンクより停止できます。 + email_subject: '"%{participatory_space_title}" での新しいディベート %{resource_title}' + notification_title: ディベート %{resource_title} が、 %{participatory_space_title} に作成されました。 user_followers: email_intro: |- こんにちは、 diff --git a/decidim-debates/config/locales/lb.yml b/decidim-debates/config/locales/lb.yml index 63dd2bbf6ea47..2cc1155fabef6 100644 --- a/decidim-debates/config/locales/lb.yml +++ b/decidim-debates/config/locales/lb.yml @@ -116,13 +116,6 @@ lb: events: debates: create_debate_event: - space_followers: - email_intro: |- - Hallo, - Eine neue Debatte "%{resource_title}" wurde in %{space_title} erstellt, sehen Sie es sich an und reden Sie mit: - email_outro: Sie haben diese Benachrichtigung erhalten, weil Sie %{space_title} folgen. Falls Sie keine solchen Benachrichtigungen mehr erhalten möchten, besuchen Sie den obigen Link. - email_subject: Neue Debatte "%{resource_title}" in %{space_title} - notification_title: Die Debatte %{resource_title} wurde in %{space_title} erstellt. user_followers: email_intro: |- Hallo, diff --git a/decidim-debates/config/locales/lt.yml b/decidim-debates/config/locales/lt.yml index 617a20be87014..f506ffac68afb 100644 --- a/decidim-debates/config/locales/lt.yml +++ b/decidim-debates/config/locales/lt.yml @@ -190,13 +190,6 @@ lt: events: debates: create_debate_event: - space_followers: - email_intro: |- - Sveiki, - Dalyvaujamojo proceso erdvėje %{space_title} sukurta nauja diskusija „%{resource_title}“, peržiūrėkite ir prisidėkite: - email_outro: Šį pranešimą gavote dėl to, kad sekate dalyvaujamojo proceso erdvę %{space_title}. Jeigu nebenorite gauti pranešimų, spustelėkite ankstesnę nuorodą. - email_subject: Nauja diskusija "%{resource_title}" %{space_title} erdvėje - notification_title: %{resource_title} diskusija sukurta %{space_title}. user_followers: email_intro: |- Sveiki, diff --git a/decidim-debates/config/locales/lv.yml b/decidim-debates/config/locales/lv.yml index ea3710175c188..fb959f0462fd6 100644 --- a/decidim-debates/config/locales/lv.yml +++ b/decidim-debates/config/locales/lv.yml @@ -95,12 +95,6 @@ lv: events: debates: create_debate_event: - space_followers: - email_intro: |- - Sveiki, %{space_title} līdzdalības telpā ir izveidotas jaunas debates "%{resource_title}", aplūkojiet tās un piedalieties: - email_outro: Jūs saņēmāt šo paziņojumu, jo sekojat %{participatory_space_title}. Jūs varat atteikties no paziņojumu saņemšanas, sekojot iepriekšējai saitei. - email_subject: Jaunas debates "%{resource_title}" par %{space_title} - notification_title: %{resource_title} debates tika izveidotas telpā %{space_title}. user_followers: email_intro: |- Sveiki,%{author_name}%{author_nickname}, kam jūs sekojat, ir izveidojis jaunas debates "%{resource_title}". Aplūkojiet tās un piedalieties: diff --git a/decidim-debates/config/locales/nl.yml b/decidim-debates/config/locales/nl.yml index 1e692a2425b43..8464a31386d75 100644 --- a/decidim-debates/config/locales/nl.yml +++ b/decidim-debates/config/locales/nl.yml @@ -162,13 +162,6 @@ nl: events: debates: create_debate_event: - space_followers: - email_intro: |- - Hallo, - Een nieuw debat "%{resource_title}" is opgezet op de %{space_title} inspraakruimte, bekijk het en draag bij: - email_outro: Je hebt deze melding ontvangen omdat je de %{space_title} participatorische ruimte volgt. Je kan de meldingen deactiveren door te klikken op de voorgaande link. - email_subject: Nieuw debat "%{resource_title}" op %{space_title} - notification_title: Het %{resource_title} debat is gemaakt op %{space_title}. user_followers: email_intro: |- Hallo, diff --git a/decidim-debates/config/locales/no.yml b/decidim-debates/config/locales/no.yml index 577cd518d0165..f0d0c39d0e3e8 100644 --- a/decidim-debates/config/locales/no.yml +++ b/decidim-debates/config/locales/no.yml @@ -185,13 +185,6 @@ events: debates: create_debate_event: - space_followers: - email_intro: |- - Hei, - En ny innspillstråd "%{resource_title}" har blitt opprettet under området %{space_title}, sjekk det ut og bidra: - email_outro: Du har mottatt denne varslingen fordi du følger %{space_title}. Du kan slutte å motta varsler hvis du følger den vedlagte lenken. - email_subject: Ny innspillstråd "%{resource_title}" under %{space_title} - notification_title: Innspillstråden %{resource_title} ble opprettet under %{space_title} . user_followers: email_intro: |- Hei, diff --git a/decidim-debates/config/locales/pl.yml b/decidim-debates/config/locales/pl.yml index 38cf4d723fb6f..3bf5129ab69cd 100644 --- a/decidim-debates/config/locales/pl.yml +++ b/decidim-debates/config/locales/pl.yml @@ -193,12 +193,6 @@ pl: events: debates: create_debate_event: - space_followers: - email_intro: |- - Nowa debata "%{resource_title}" została utworzona w przestrzeni partycypacyjnej %{space_title}, sprawdź ją i przyłącz się: - email_outro: Otrzymałeś to powiadomienie, ponieważ obserwujesz przestrzeń partycypacyjną %{space_title}. Możesz przestać otrzymywać powiadomienia po kliknięciu w poprzedni link. - email_subject: Nowa debata "%{resource_title}" w %{space_title} - notification_title: Debata %{resource_title} została utworzona w %{space_title}. user_followers: email_intro: |- Cześć, diff --git a/decidim-debates/config/locales/pt-BR.yml b/decidim-debates/config/locales/pt-BR.yml index 2d5e326eac6bf..93eb95b20b87e 100644 --- a/decidim-debates/config/locales/pt-BR.yml +++ b/decidim-debates/config/locales/pt-BR.yml @@ -189,13 +189,6 @@ pt-BR: events: debates: create_debate_event: - space_followers: - email_intro: |- - Oi, - Um novo debate "%{resource_title}" foi criado no espaço participativo %{space_title} , confira e contribua: - email_outro: Você recebeu esta notificação porque está seguindo o espaço participativo %{space_title}. Você pode parar de receber notificações após o link anterior. - email_subject: Novo debate "%{resource_title}" em %{space_title} - notification_title: O %{resource_title} debate foi criado em %{space_title}. user_followers: email_intro: |- Olá, diff --git a/decidim-debates/config/locales/pt.yml b/decidim-debates/config/locales/pt.yml index e0f205615188c..0997778cdbc47 100644 --- a/decidim-debates/config/locales/pt.yml +++ b/decidim-debates/config/locales/pt.yml @@ -182,13 +182,6 @@ pt: events: debates: create_debate_event: - space_followers: - email_intro: |- - Olá, - Um novo debate "%{resource_title}" foi criado no espaço participativo %{space_title}, confira e contribua: - email_outro: Recebeu esta notificação porque segue o espaço participativo %{space_title}. Pode parar de receber notificações seguindo a hiperligação anterior. - email_subject: Novo debate "%{resource_title}" em %{space_title} - notification_title: O debate %{resource_title} foi criado em %{space_title}. user_followers: email_intro: |- Olá, diff --git a/decidim-debates/config/locales/ro-RO.yml b/decidim-debates/config/locales/ro-RO.yml index 8d228172dd1ef..0e2fd725b1ae2 100644 --- a/decidim-debates/config/locales/ro-RO.yml +++ b/decidim-debates/config/locales/ro-RO.yml @@ -188,13 +188,6 @@ ro: events: debates: create_debate_event: - space_followers: - email_intro: |- - Bună, - O nouă dezbatere "%{resource_title}" a fost creată în spațiul participativ %{space_title}, citește și contribuie: - email_outro: Ați primit această notificare deoarece urmați spațiul participativ al %{space_title} . Puteți înceta să primiți notificări urmând linkul anterior. - email_subject: Dezbatere nouă "%{resource_title}" pe %{space_title} - notification_title: Dezbaterea %{resource_title} a fost creată în %{space_title}. user_followers: email_intro: |- Bună, diff --git a/decidim-debates/config/locales/ru.yml b/decidim-debates/config/locales/ru.yml index 6afcf760d9ce7..f8dbfc07d1723 100644 --- a/decidim-debates/config/locales/ru.yml +++ b/decidim-debates/config/locales/ru.yml @@ -109,9 +109,6 @@ ru: events: debates: create_debate_event: - space_followers: - email_outro: Вы получили это уведомление, потому что вы следите за пространством соучастия %{space_title}. Вы можете отписаться от уведомлений, перейдя по приведенной выше ссылке. - notification_title: В %{space_title} началось обсуждение %{resource_title}. user_followers: email_outro: Вы получили это уведомление, потому что вы следите за «%{author_nickname}». Вы можете отписаться от уведомлений, перейдя по приведенной выше ссылке. creation_disabled: diff --git a/decidim-debates/config/locales/sk.yml b/decidim-debates/config/locales/sk.yml index d168478361add..a810d68bad52b 100644 --- a/decidim-debates/config/locales/sk.yml +++ b/decidim-debates/config/locales/sk.yml @@ -113,12 +113,6 @@ sk: events: debates: create_debate_event: - space_followers: - email_intro: |- - Ahoj, debata "%{resource_title}" bola vytvorená v participatívnom priestore "%{participatory_space_title}", pozrite sa na ňu a prispejte: - email_outro: Toto oznámenie ste dostali, pretože sledujete participatívny priestor %{space_title}. Notifikácie môžete zrušiť po kliknutí na predchádzajúci odkaz. - email_subject: Nová debata "%{resource_title}" na %{space_title} - notification_title: Debata %{resource_title} bola vytvorená v priestore %{space_title} . user_followers: email_intro: |- Dobrý deň, diff --git a/decidim-debates/config/locales/sv.yml b/decidim-debates/config/locales/sv.yml index f2781860e6cd0..60d10aec036ec 100644 --- a/decidim-debates/config/locales/sv.yml +++ b/decidim-debates/config/locales/sv.yml @@ -184,13 +184,6 @@ sv: events: debates: create_debate_event: - space_followers: - email_intro: |- - Hej, - En ny debatt, "%{resource_title}", har skapats i deltagarutrymmet %{space_title}, ta en titt och bidra: - email_outro: Du har fått detta meddelande eftersom du följer deltagarutrymmet %{space_title}. Du kan sluta att ta emot meddelanden via föregående länk. - email_subject: Ny debatt "%{resource_title}" i %{space_title} - notification_title: Debatten %{resource_title} har skapats i %{space_title}. user_followers: email_intro: |- Hej, diff --git a/decidim-debates/config/locales/tr-TR.yml b/decidim-debates/config/locales/tr-TR.yml index aa30ca2171322..cec49247032c0 100644 --- a/decidim-debates/config/locales/tr-TR.yml +++ b/decidim-debates/config/locales/tr-TR.yml @@ -182,11 +182,11 @@ tr: create_debate_event: space_followers: email_intro: |- - Merhaba, - %{space_title} katılımcı alanda yeni bir "%{resource_title}" tartışması oluşturuldu, inceleyin ve katkıda bulunun: - email_outro: '%{space_title} katılımcı alanı takip ettiğiniz için bu bildirimi aldınız. Önceki bağlantıyı takip ederek bildirim almayı durdurabilirsiniz.' - email_subject: '%{space_title} üzerinde yeni tartışma "%{resource_title}"' - notification_title: %{resource_title} tartışması %{space_title} adresinde oluşturuldu. + Merhaba + %{participatory_space_title} katılımcı alanında yeni bir "%{resource_title}" tartışma başlığı oluşturuldu. İnceleyerek katkıda bulunabilirsiniz. + email_outro: Bu bildirimi %{participatory_space_title} katılımcılık Başlıklı alanını takip ettiğiniz için aldınız. Bildirim almayı önceki bağlantı linkini izleyerek durdurabilirsiniz. + email_subject: '%{participatory_space_title} başlıpı ile ilgili yeni tartışma "%{resource_title}"' + notification_title: %{resource_title tartışması %{participatory_space_title tarihinde oluşturuldu. user_followers: email_intro: |- Merhaba, diff --git a/decidim-debates/config/locales/uk.yml b/decidim-debates/config/locales/uk.yml index e2189aa2a6f79..3781c5abc9411 100644 --- a/decidim-debates/config/locales/uk.yml +++ b/decidim-debates/config/locales/uk.yml @@ -109,9 +109,6 @@ uk: events: debates: create_debate_event: - space_followers: - email_outro: Ви отримали це сповіщення, тому що ви стежите за простором співучасті %{space_title}. Ви можете відписатися від цих сповіщень, перейшовши за наведеним вище посиланням. - notification_title: %{space_title} розпочав обговорення у %{resource_title}. user_followers: email_outro: Ви отримали це сповіщення, тому що ви стежите за %{author_nickname}. Ви можете відписатися від цих сповіщень, перейшовши за наведеним вище посиланням. creation_disabled: diff --git a/decidim-debates/config/locales/zh-CN.yml b/decidim-debates/config/locales/zh-CN.yml index bc09847cdd215..f08de4218f1a1 100644 --- a/decidim-debates/config/locales/zh-CN.yml +++ b/decidim-debates/config/locales/zh-CN.yml @@ -169,13 +169,6 @@ zh-CN: events: debates: create_debate_event: - space_followers: - email_intro: |- - 您好, - 在参与性的 %{space_title} 空间上创建了一个新的辩论"%{resource_title}"。查看它并做出贡献: - email_outro: 您收到此通知是因为您正在关注 %{space_title} 个参与性空间。您可以停止收到跟随上一个链接的通知。 - email_subject: 在%{resource_title}上的新辩论 " %{space_title} - notification_title: %{resource_title} 辩论是在 %{space_title} 创建的。 user_followers: email_intro: |- 你好, diff --git a/decidim-debates/config/locales/zh-TW.yml b/decidim-debates/config/locales/zh-TW.yml index bef8424dffade..cedcc20a39c8d 100644 --- a/decidim-debates/config/locales/zh-TW.yml +++ b/decidim-debates/config/locales/zh-TW.yml @@ -184,13 +184,6 @@ zh-TW: events: debates: create_debate_event: - space_followers: - email_intro: |- - 你好, - 一個新的辯論「%{resource_title}」已經在 %{space_title} 參與空間中建立,請查看並參與: - email_outro: 您收到此通知,是因為您正在追蹤 %{space_title} 參與空間。您可以按照上述連結停止接收通知。 - email_subject: '%{space_title} 參與空間上有新辯論主題%{resource_title}' - notification_title: 在%{space_title}上建立了辯論主題%{resource_title}。 user_followers: email_intro: |- 嗨, diff --git a/decidim-dev/config/locales/he-IL.yml b/decidim-dev/config/locales/he-IL.yml new file mode 100644 index 0000000000000..af6fa60a73f2c --- /dev/null +++ b/decidim-dev/config/locales/he-IL.yml @@ -0,0 +1 @@ +he: diff --git a/decidim-elections/config/locales/bg.yml b/decidim-elections/config/locales/bg.yml index c4ba3a6e3c604..657836f68d02c 100644 --- a/decidim-elections/config/locales/bg.yml +++ b/decidim-elections/config/locales/bg.yml @@ -6,3 +6,356 @@ bg: description: Описание image: Изображение proposals: Свързани предложения + voting: + scope_id: Обхват + errors: + models: + trustee: + attributes: + name: + cant_be_changed: не може да се променя + public_key: + cant_be_changed: не може да се променя + activerecord: + errors: + models: + decidim/votings/polling_officer: + attributes: + presided_polling_station: + president_and_manager: Избирателният служител вече е председател на избирателна секция + voting: + different_organization: Гласуването трябва да е в същата организация като потребителя + decidim/votings/polling_station: + attributes: + polling_station_president: + different_voting: Избирателният служител трябва да бъде в същото гласуване като избирателната секция + decidim: + elections: + actions: + new: Ново %{name} + admin: + answers: + create: + invalid: Възникна проблем при създаването на този отговор + success: Отговорът беше създаден успешно + destroy: + invalid: Възникна проблем при изтриването на този отговор + success: Отговорът беше изтрит успешно + index: + invalid_max_selections: Имате нужда от още %{missing_answers} отговора, за достигане на максималните селекции + select: + invalid: Възникна проблем при селектирането на този отговор + success: Отговорът е селектиран успешно + unselect: + invalid: Възникна проблем при отселектирането на този отговор + success: Отговорът е отселектиран успешно + update: + invalid: Възникна проблем при актуализирането на този отговор + success: Отговорът беше актуализиран успешно + elections: + create: + invalid: Възникна проблем при създаването на тези избори + success: Изборите бяха създадени успешно + destroy: + invalid: Възникна проблем при изтриването на тези избори + success: Изборите бяха изтрити успешно + update: + invalid: Възникна проблем при актуализирането на тези избори + success: Изборите бяха актуализирани успешно + mailers: + trustee_mailer: + body: "

    Hi %{user_name},

    Бяхте добавен като Валидатор към %{resource_name}.

    " + subject: Бяхте добавен като Валидатор на %{resource_name} + models: + trustee: + name: Валидатор + proposals_imports: + create: + invalid: Възникна проблем при импортирането на предложенията в отговорите + success: "%{number} предложения бяха импортирани успешно в отговорите" + questions: + create: + election_started: Изборния процес вече стартира + invalid: Възникна проблем при създаването на този въпрос + success: Въпросът беше създаден успешно + destroy: + invalid: Възникна проблем при изтриването на този въпрос + success: Въпросът беше изтрит успешно + update: + invalid: Възникна проблем при актуализирането на този въпрос + success: Въпросът беше актуализиран успешно + steps: + create_election: + success: Изборът е изпратен успешно към Информационното табло + created: + invalid: Имаше проблем при стартирането на ключивата церемония + success: Стартирането на ключовата церемония беше успешно изпратено към Информационното табло + key_ceremony_ended: + invalid: Възникна проблем със стартирането на периода за гласуване + success: Обявлението за начало на периода на гласуване беше успешно изпратено към Информационното табло + tally_ended: + success: Заявката за публикуване на резултати беше успешно изпратена до Информационното табло + tally_started: + invalid: Възникна проблем при докладването за отсъствие на Валидатор + mark_as_missing_description: Всички Валидатори трябва да участват в този процес, но ако накой Валидатор не може да участва в процеса, можете да го маркирате като липсващ. + success: Докладване за липсващ Валидатор беше успешно изпратено към Информационното табло + vote: + invalid: Възникна проблем при приключване на периода за гласуване + success: Обявлението за край на периода на гласуване беше успешно изпратено към Информационното табло + vote_ended: + invalid: Възникна проблем със стартирането на преброяването + success: Заявката за започване на преброяване беше успешно изпратена до Информационното табло + trustees_participatory_spaces: + create: + exists: В това пространство за участие съществува Валидатор + invalid: Възникна проблем при създаването на Валидатор + success: Успешно създаване на Валидатор + delete: + invalid: Възникна проблем при премахването на този Валидатор + success: Успешно премахване на Валидатор + update: + invalid: Възникна проблем при актуализирането на %{trustee} Валидатор + success: Валидатор %{trustee} е актуализиран успешно + elections: + election_log: + not_published: Не публикувано + verifiable_results: + description: + not_ready: Верифицираният файл от изборите и контролната сума SHA256 все още не са налични. Веднага щом резултатите бъдат публикувани, вие ще можете да проверите този избор. + filters_small_view: + close_modal: Затвори прозореца + filter: Филтър + filter_by: Филтрирай по + unfold: Разгъване + show: + back: Активни избори + feedback: + answer: + spam_detected: Възникна проблем при попълването на отговорите във формуляра. Навярно сте били твърде бързи, бихте ли опитали отново? + trustee_zone: + elections: + backup_modal: + download_icon: Иконка, която обозначава действието "сваляне" + key_ceremony_steps: + start_icon: Икона, която обозначава бутон за стартиране на генерирането на ключове за избори + restore_modal: + upload_icon: Иконка, която обозначава действието "сваляне" + tally_started_steps: + start_icon: Икона, която обозначава бутон за стартиране на генерирането на ключове за избори + update: + error: Статусът на изборите не беше актуализиран. + success: 'Статусът на изборите е: %{status}' + trustees: + show: + elections: + no_elections: Няма избори, докато действате като Валидатор. + identification_keys: + generate_legend_3: Уверете се, че компютърът Ви няма копие на файла (напр. проверете папките Downloads и Desktop). + upload_error: + invalid_format: Каченият файл не съдържа идентификационен ключ. + invalid_key: Идентификационните ключове в качения файл не могат да бъдат заредени. + invalid_public_key: Идентификационните ключове в качения файл не съвпадат със съхранения публичен идентификационен ключ. + upload_legend: Сървърът има вашите публични идентификационни ключове, но вашият браузър все още не ги има. Трябва да импортирате файла с вашите идентификационни ключове на вашия компютър от резервното копие, което сте създали след генерирането им. + not_supported_browser_description: Изглежда, че използвате уеб браузър, който не може да се използва за действията на Валидатор. Уверете се, че използвате най-новата версия на вашия браузър или опитайте да използвате който и да е от най-популярните браузъри, за да можете да изпълнявате задачите си на Валидатор. + votes: + ballot_decision: + audit: "(Бюлетина за одит)" + description: Тук имате опциите да пуснете бюлетината си, така че да проверите дали тя се преброява коректно и се криптира правилно. От съображения за сигурност проверката на вашата бюлетина ще я развали. Това означава, че за реално гласуване, ще трябва да рестартирате процеса на гласуване. + confirm: + question: Въпрос %{count} + confirmed: + text: 'Можете да проверите дали гласът Ви е добавен успешно в урната със следния идентификатор: %{e_vote_poll_id}' + header: + ballot_decision: Гласувайте или проверете вашият вот + casting: Подаване на вот + encrypting: Криптиране на вота + new: + selections: "%{selected} от %{max_selections}
     елемента с възможност за избор" + onboarding_modal: + close: Затвори прозореца + verify: + success: + info: Вашият криптиран вот е в %{link} избирателна урна + warnings: + no_elections_warning: Няма избори, отговарящи на вашите критерии за търсене, или няма насрочени избори. + events: + elections: + trustees: + new_election: + email_outro: Получихте това известие, защото бяхте добавен като Валидатор на изборите %{resource_title}. + email_subject: Вие сте Валидатор на изборите %{resource_title}.. + notification_title: Вие сте Валидатор на изборите %{resource_title}. + new_trustee: + email_outro: Получихте това известие, защото бяхте добавен като Валидатор за изборите %{resource_name}. + notification_title: Вие сте Валидатор на изборите %{resource_name}. + votes: + accepted_votes: + email_outro: Получихте това известие, защото гласувахте за изборите %{resource_name}. + votings: + admin: + ballot_styles: + create: + error: Възникна проблем при създаването на този "Стил на бюлетина" + success: Стилът на бюлетината е създаден успешно + destroy: + invalid: Възникна проблем при изтриването на този стил на бюлетина + success: Стилът на бюлетината беше изтрит успешно + form: + code_help: 'Съвет: кодът е връзката между преброяването и стила на бюлетината. При качване на данните от преброяването на всеки запис ще бъде присвоен стил на бюлетина чрез съвпадение на кода' + questions_help: 'Съвет: изберете въпросите от изборните компоненти, които да бъдат представени на гласоподавателите, определени за този стил на бюлетина' + index: + actions: + new: Ново + explanation_callout: В "Стил на бюлетина" се определят какви въпроси ще бъдат представени на гласоподавателя в кабината. Можете да изберете кои въпроси от изборните компоненти на това гласуване принадлежат към дадена бюлетина. Кодът за "Стил на бюлетина" се използва за съпоставяне на гласоподавател от преброяването с бюлетината, която ще бъде представена в кабината. Не създавайте "Стил на бюлетина", ако винаги искате да представите всички въпроси. + update: + invalid: Възникна проблем при актуализирането на този "Стил на бюлетина" + success: Стилът на бюлетината е актуализиран успешно + content_blocks: + landing_page: + description: + name: Описание на гласуването + landing_page: + edit: + active_content_blocks: Активни блокове със съдържание + inactive_content_blocks: Неактивни блокове със съдържание + menu: + votings_submenu: + info: Информация + models: + ballot_style: + name: Стил на бюлетина + monitoring_committee_member: + name: Член на Мониторинговия комитет + polling_officer: + name: Член на избирателна комисия + polling_station: + name: Избирателна секция + voting: + fields: + promoted: Акцентирано + monitoring_committee_election_results: + update: + invalid: Възникна проблем при публикуването на резултатите + success: Резултатите бяха публикувани успешно + monitoring_committee_members: + create: + invalid: Възникна проблем при създаването на този член на Мониторингов комитет + success: Успешно създаден член на Мониторинговия комитет + destroy: + invalid: Възникна проблем при премахването на този член на Мониторингов комитет + success: Успешно премахнат член на Мониторинговия комитет + monitoring_committee_polling_station_closures: + validate: + error: Възникна проблем при валидирането на затварянето + success: Затварянето беше валидирано коректно + polling_officers: + create: + invalid: Възникна проблем при създаването на този член на избирателна комисия + success: Успешно създаване на член на избирателна комисия + destroy: + invalid: Възникна проблем при премахването на този член на избирателна комисия + success: Успешно премахване на член на избирателна комисия + polling_officers_picker: + more_polling_officers: Има още %{number} членове на избирателна комисия. Прецизирайте търсенето си, за да ги намерите. + no_polling_officers: Няма членове на избирателна комисия, които да съответстват на критериите Ви за търсене, или няма никакви членове. + polling_stations: + create: + invalid: Възникна проблем при създаването на тази избирателна секция + success: Успешно създадена избирателна секция + destroy: + invalid: Възникна проблем при изтриването на тази избирателна секция + success: Успешно изтрита избирателна секция + form: + polling_station_president_help: 'Член на избирателната комисия: служителят, който ще действа като председател на избирателната комисия. Уверете се, че служителят вече е създаден в "Членове на избирателна комисия" и че той/той вече не е назначен към друга избирателна комисия.' + update: + invalid: Възникна проблем при актуализирането на тази избирателна секция + success: Успешно актуализирана избирателна секция + votings: + create: + invalid: Възникна проблем при създаването на това гласуване + success: Гласуването е създадено успешно + edit: + add_election_component: Нямате конфигурирани избори за това гласуване. Моля, добавете го в секцията Компоненти + assign_missing_officers: Има избирателни секции без председател. Моля, задайте ги от раздел Избирателни секции + form: + show_check_census_help: Да се показва ли линк "Мога ли да гласувам?" в менюто за публични гласувания + publish: + success: Гласуването беше публикувано успешно + unpublish: + success: Публикуването на гласуването бе успешно отменено + update: + invalid: Възникна проблем при актуализирането на това гласуване + success: Гласуването е актуализирано успешно + census: + admin: + census: + create: + invalid_csv_header: CSV заглавията (headers) липсват или не са правилни - моля, прочетете внимателно инструкциите + destroy: + success: Данните от преброяването са изтрити + export_access_codes: + file_not_exist: Файлът не съществува + launch_error: Проблем при стартиране на експортирането на кодове за достъп + launch_success: Стартира експорт на кодове за достъп. Скоро ще получите имейл на %{email} + document_types: + dni: Документ за самоличност + nie: ЛНЧ + vote_flow: + datum_not_found: Посочените данни не отговарят на нито един гласоподавател. + content_blocks: + landing_page: + metrics: + heading: Метрики + timeline: + heading: Хронология + pages: + home: + highlighted_votings: + votings_button_title: Връзка към страницата „Гласувания“, показваща всички вотове + polling_officer_zone: + closures: + certify: + add_images: Добави изображения + edit: + info_text: Моля, въведете общия брой отговори за всеки въпрос. + modal_ballots_results_count_error: + info_text: Общият брой на бюлетините не съвпада с общия брой на пликовете. Моля, прегледайте общия брой бюлетини. + new: + modal_ballots_count_error: + info_text: Общият брой на въведените бюлетини (пликове) не съответства на записа на хората, които са гласували в тази избирателна секция. + show: + info_text: Затваряне на избирателните секции. + sign: + check_box: Прегледах това и декларирам, че то е същото като физическия документ за приключване на изборите + info_text: Ако продължите, вече не можете да променяте никаква информация, това действие не може да бъде отменено. + title: Действието не може да бъде отменено + in_person_votes: + complete_voting: + questions_title: 'Те имат право да гласуват по следните въпроси:' + polling_officers: + actions: + new: Ново + polling_stations: + actions: + new: Ново + votings: + access_code_modal: + info: Имате нужда от Код за достъп, за да участвате. Ако не сте получили такъв по пощата, можем да ви изпратим нов. + check_census: + error: + info: 'Моля, опитайте отново. Ако смятате, че данните в системата са неверни, можете да докладвате тук: %{census_contact_information}' + success: + info: Трябва вече да сте получили кода си за достъп по пощата. В случай, че не разполагате с него, можете да го заявите тук + elections_log: + bb_status: Статус на изборите + filters_small_view: + close_modal: Затвори прозореца + filter: Филтър + filter_by: Филтрирай по + unfold: Разгъване + login: + dont_have_access_code: Нямате код за достъп? + step: Идентификация + no_census_contact_information: Все още няма контактна информация + send_access_code: + invalid: Възникна проблем при изпращането на Кода за достъп diff --git a/decidim-elections/config/locales/he-IL.yml b/decidim-elections/config/locales/he-IL.yml new file mode 100644 index 0000000000000..af6fa60a73f2c --- /dev/null +++ b/decidim-elections/config/locales/he-IL.yml @@ -0,0 +1 @@ +he: diff --git a/decidim-elections/config/locales/hu.yml b/decidim-elections/config/locales/hu.yml index e4b50b0b55475..951c248b393f3 100644 --- a/decidim-elections/config/locales/hu.yml +++ b/decidim-elections/config/locales/hu.yml @@ -158,6 +158,7 @@ hu: success: "%{number} javaslat sikeresen importálva a válaszokba" new: create: Válaszjavaslatok importálása + no_components: Ezen a részvételi téren nincsenek más javaslati komponensek, amelyek a javaslatokat kérdésekbe importálják. select_component: Kérjük, válassz egy komponenst title: Javaslatok importálása questions: diff --git a/decidim-elections/config/locales/ru.yml b/decidim-elections/config/locales/ru.yml index ddc9d1e32c29b..48eab848b1832 100644 --- a/decidim-elections/config/locales/ru.yml +++ b/decidim-elections/config/locales/ru.yml @@ -1 +1,6 @@ +--- ru: + activemodel: + attributes: + question: + title: Заголовок diff --git a/decidim-elections/config/locales/sk.yml b/decidim-elections/config/locales/sk.yml index f634a02824398..ce9b055fce208 100644 --- a/decidim-elections/config/locales/sk.yml +++ b/decidim-elections/config/locales/sk.yml @@ -1 +1,6 @@ +--- sk: + activemodel: + attributes: + question: + title: Názov diff --git a/decidim-elections/config/locales/uk.yml b/decidim-elections/config/locales/uk.yml index c256c3246c4a3..29229aef5d6d4 100644 --- a/decidim-elections/config/locales/uk.yml +++ b/decidim-elections/config/locales/uk.yml @@ -1 +1,6 @@ +--- uk: + activemodel: + attributes: + question: + title: Заголовок diff --git a/decidim-forms/config/locales/bg.yml b/decidim-forms/config/locales/bg.yml index 778c0f37d1302..930bc556ee13d 100644 --- a/decidim-forms/config/locales/bg.yml +++ b/decidim-forms/config/locales/bg.yml @@ -7,8 +7,19 @@ bg: question: max_choices: Максимален брой възможности question_type: Тип + errors: + models: + questionnaire: + request_invalid: Възникна грешка при обработката на заявката. Моля, опитайте отново decidim: forms: + errors: + answer: + body: Основният текст не може да бъде празен + questionnaires: + show: + answer_questionnaire: + anonymous_user_message: Влезте в профила си или се регистрирайте, за да попълните отговорите си във формуляра. step_navigation: show: are_you_sure: Това действие не може да се отмени и Вие не можете да редактирате отговорите си. Сигурни ли сте? diff --git a/decidim-forms/config/locales/he-IL.yml b/decidim-forms/config/locales/he-IL.yml new file mode 100644 index 0000000000000..af6fa60a73f2c --- /dev/null +++ b/decidim-forms/config/locales/he-IL.yml @@ -0,0 +1 @@ +he: diff --git a/decidim-initiatives/config/locales/bg.yml b/decidim-initiatives/config/locales/bg.yml index 4677627d29d26..6bb4cbdc389c9 100644 --- a/decidim-initiatives/config/locales/bg.yml +++ b/decidim-initiatives/config/locales/bg.yml @@ -6,9 +6,150 @@ bg: decidim_user_group_id: Автор description: Описание offline_votes: Лични подписи + errors: + models: + initiative: + attributes: + attachment: + title: Заглавието не трябва да бъде празно + activerecord: + models: + decidim/initiative: + one: Инициатива + other: Инициативи decidim: + admin: + initiatives_settings: + update: + error: Възникна грешка + success: Настройките на инициативите са актуализирани успешно + gamification: + badges: + initiatives: + description_own: Публикували сте %{score} инициативи. + unearned_another: Този участник все още няма публикувани инициативи. initiatives: + admin: + committee_requests: + index: + invite_to_committee_help: Споделете този линк, за да поканите други участници в промоторския комитет + no_members_yet: Няма участници в промоторския комитет + initiatives: + edit: + success: Инициативата е изпратена за техническа валидация + update: + error: Възникна грешка + success: Инициативата беше актуализирана успешно + initiatives_type_scopes: + create: + error: Възникна грешка + success: Създаден е нов обхват за дадения тип инициатива + destroy: + success: Обхватът беше премахнат успешно + edit: + destroy: Изтрий + update: + error: Възникна грешка + success: Обхватът беше актуализиран успешно + initiatives_types: + create: + error: Възникна грешка + success: Успешно е създаден нов тип инициатива + destroy: + success: Типът инициатива беше премахнат успешно + edit: + destroy: Изтрий + update: + error: Възникна грешка + success: Типът инициатива беше актуализиран успешно application_helper: filter_state_values: closed: Затворен open: Отворен + committee_requests: + new: + help_text: На път сте да заявите членство в промоторския комитет на тази инициатива + create_initiative: + fill_data: + decidim_user_group_id_help: Не е възможно да се промени авторството на инициативата след създаването и. + finish_help: + access_reminder: Можете да достъпите инициативите си чрез филтъра %{link} на страницата Инициативи. + previous_form: + help: В какво се състои инициативата? Напишете заглавието и описанието. Препоръчваме кратко заглавие и описание, което да включва предложеното решение. + show_similar_initiatives: + compare_help: Ако някоя от следните инициативи е подобна на Вашата, препоръчваме да се подпишете в нея. Така ще има повече възможности за осъществяването на предложението Ви. + continue: Моята инициатива е различна + form: + delete_attachment: Изтрий + index: + uninitialized: Инициативите все още не са конфигурирани от администратор + initiative_signatures: + fill_personal_data: + date_select: + day: Ден + month: Месец + year: Година + help: Моля, попълнете личните си данни в следните полета, за да подпишете инициативата + sms_phone_number: + help: Попълнете потвърдения си телефонен номер във формуляра, за да заявите вашия код за потвърждение + initiative_votes: + create: + invalid: Предоставената информация за подписване на инициативата не е валидна + success_html: Поздравления! Подписахте успешно инициативата %{title} + sms_code: + invalid: Кодът Ви за потвърждение не съвпада с нашия. Моля, проверете отново съобщението, което Ви изпратихме със SMS. + initiatives: + author: + deleted: Изтрито + committee_members: + invite_to_committee_help: Споделете този линк, за да поканите други участници в промоторския комитет + no_members_yet: Няма участници в промоторския комитет + filters: + search: Търсене + filters_small_view: + close_modal: Затвори прозореца + filter: Филтър + filter_by: Филтрирай по + unfold: Разгъване + index_header: + not_authorized: + authorizations_page: Преглед на оторизациите + close: Затвори + explanation: Трябва да преминете проверка, за да създадете нова инициатива. + title: Изисква се оторизация + result: + answer_title: На тази инициатива е отговорено + show: + any_vote_method: За тази гражданска инициатива се събират подписи както онлайн, така и лично. + follow_description: Получавайте известия, когато има новини за тази инициатива + offline_method: За тази гражданска инициатива се събират подписи само лично. + print: Отпечатай инициативата + votes_count: + most_popular_initiative: Най-популярна инициатива + need_more_votes: Има нужда от повече подписи + signature_interval: + title: Период за събиране на подписи + update: + error: Възникна грешка + success: Инициативата беше актуализирана успешно + versions: + shared: + back_to_resource: Връщане назад към инициативата + layouts: + decidim: + initiative_creation_header: + previous_form: Начало + show_similar_initiatives: Сравнете + step: Стъпка %{current} от общо %{total} + title: Създаване на нова инициатива + initiative_header: + initiative_menu_item: Инициатива + initiative_signature_creation_header: + finished: Подписът на инициативата е създаден + see_steps: вижте стъпките + select_identity: Изберете идентичност + step: Стъпка %{current} от общо %{total} + initiatives: + initiative: + check: Прегледайте + check_and_support: Прегледайте и се подпишете diff --git a/decidim-initiatives/config/locales/he-IL.yml b/decidim-initiatives/config/locales/he-IL.yml new file mode 100644 index 0000000000000..af6fa60a73f2c --- /dev/null +++ b/decidim-initiatives/config/locales/he-IL.yml @@ -0,0 +1 @@ +he: diff --git a/decidim-meetings/config/locales/bg.yml b/decidim-meetings/config/locales/bg.yml index 5280465c0bd32..640523059f4fc 100644 --- a/decidim-meetings/config/locales/bg.yml +++ b/decidim-meetings/config/locales/bg.yml @@ -1,6 +1,34 @@ --- bg: + activemodel: + errors: + models: + meeting: + attributes: + iframe_embed_type: + not_embeddable: Този URL адрес не може да бъде вграден в страница за среща или събитие на живо + meeting_agenda: + attributes: + base: + too_many_minutes: Продължителността на точките надвишава продължителността на срещата с(ъс) %{count} минути + too_many_minutes_child: Продължителността на подточките надвишава продължителността на точката от дневния ред „%{parent_title}“ с(ъс) %{count} минути + meeting_registration_invite: + attributes: + email: + already_invited: На този имейл вече е изпратена покана decidim: + admin: + meeting_copies: + new: + select: Изберете кои данни искате да дублирате + forms: + meetings: + attendees_count_help_text: Не забравяйте да включите общия брой присъстващи на вашата среща, независимо дали те присъстват лично, онлайн или хибридно. + gamification: + badges: + attended_meetings: + unearned_another: Този участник все още не е присъствал на нито една среща. + unearned_own: Все още не сте присъствали на нито една среща. meetings: actions: invalid_destroy: @@ -8,9 +36,86 @@ bg: one: 'Срещата не може да бъде премахната, понеже има %{count} участник свързан с нея:' other: 'Срещата не може да бъде премахната, понеже има %{count} участника свързани с нея:' admin: + agenda: + create: + invalid: Възникна проблем при създаването на този дневен ред + success: Дневният ред беше създаден успешно + update: + invalid: Възникна проблем при актуализирането на този дневен ред + success: Дневният ред беше актуализиран успешно + invites: + index: + filter_by: Филтрирай по + registrations_disabled: Не можете да поканите присъстващи, защото регистрациите са изключени. meetings: + close: + invalid: Възникна проблем при закриването на тази среща + success: Срещата беше закрита успешно + create: + invalid: Възникна проблем при създаването на тази среща destroy: invalid: proposals_count: one: Срещата не може да бъде премахната, понеже има %{count} участник свързан с нея other: Срещата не може да бъде премахната, понеже има %{count} участника свързани с нея + form: + disclaimer: 'Отказ от отговорност: Използвайки външна система за регистрация, вие сте наясно, че организаторите на %{organization} не носят отговорност за данните, предоставени от потребителите на външната услуга.' + publish: + invalid: Възникна проблем при публикуването на тази среща + success: Срещата беше публикувана успешно + unpublish: + invalid: Възникна проблем при отмяната на публикуването на тази среща + success: Публикуването на срещата беше успешно отменено + update: + invalid: Възникна проблем при актуализирането на тази среща + success: Срещата беше актуализирана успешно + meetings_poll: + update: + invalid: Възникна проблем при актуализирането на тази анкета за среща + success: Анкетата за среща бе актуализирана успешно + registrations: + form: + reserved_slots_help: Оставете 0, ако не разполагате с резервирани места + calendar_modal: + close_window: Затвори прозореца + copy_calendar_url_explanation: Моля, обърнете внимание, че експортирате селекция от срещи, тъй като има активни филтри. Ако искате да ги експортирате всички, първо нулирайте всички филтри. + content_blocks: + upcoming_meetings: + view_all_meetings: Виж всички + last_activity: + meeting_updated_at_html: "Срещата беше актуализирана на: %{link}" + new_meeting_at_html: "Нова среща на %{link}" + meeting: + not_allowed: Нямате разрешение да разглеждате тази среща + meetings: + calendar_modal: + close_window: Затвори прозореца + filters_small_view: + close_modal: Затвори прозореца + filter: Филтър + filter_by: Филтрирай по + unfold: Разгъване + form: + disclaimer: 'Отказ от отговорност: Използвайки външна система за регистрация, вие сте наясно, че организаторите на %{organization} не носят отговорност за данните, предоставени от потребителите на външната услуга.' + meeting_minutes: + related_information: Свързана информация + meetings: + no_meetings_warning: Няма срещи, които да съответстват на критериите Ви за търсене, или няма насрочени срещи. + show: + back: Обратно към списъка + view: Преглед + meetings_map: + view_meeting: Преглед на срещата + public_participants_list: + attending_participants: Присъстващи участници + registrations: + create: + success: Присъединихте се успешно към срещата. Тъй като се регистрирахте за тази среща, ще бъдете уведомявани за всички нейни актуализации. + versions: + back_to_resource: Връщане назад към срещата + withdraw: + error: Възникна грешка при оттеглянето на срещата + success: Срещата е оттеглена успешно + participatory_spaces: + highlighted_meetings: + see_all: Виж всички срещи (%{count}) diff --git a/decidim-meetings/config/locales/ca.yml b/decidim-meetings/config/locales/ca.yml index 91c1000cfdf91..5a47240d16301 100644 --- a/decidim-meetings/config/locales/ca.yml +++ b/decidim-meetings/config/locales/ca.yml @@ -663,7 +663,7 @@ ca: participatory_spaces: highlighted_meetings: past_meetings: Trobades anteriors - see_all: Veure tots (%{count}) + see_all: Veure totes (%{count}) upcoming_meetings: Properes trobades upcoming_meeting_for_card: upcoming_meeting: Propera trobada diff --git a/decidim-meetings/config/locales/he-IL.yml b/decidim-meetings/config/locales/he-IL.yml new file mode 100644 index 0000000000000..af6fa60a73f2c --- /dev/null +++ b/decidim-meetings/config/locales/he-IL.yml @@ -0,0 +1 @@ +he: diff --git a/decidim-pages/config/locales/bg.yml b/decidim-pages/config/locales/bg.yml index cc3180509c795..5d76b343f3a52 100644 --- a/decidim-pages/config/locales/bg.yml +++ b/decidim-pages/config/locales/bg.yml @@ -29,3 +29,8 @@ bg: update: invalid: Възникна проблем при запазване на страницата. success: Страницата е успешно съхранена. + home: + hero: + participate_title: Участвайте в процесите на платформата + sub_hero: + register_title: Регистрирайте се, за да си създадете акаунт diff --git a/decidim-pages/config/locales/he-IL.yml b/decidim-pages/config/locales/he-IL.yml new file mode 100644 index 0000000000000..af6fa60a73f2c --- /dev/null +++ b/decidim-pages/config/locales/he-IL.yml @@ -0,0 +1 @@ +he: diff --git a/decidim-participatory_processes/config/locales/bg.yml b/decidim-participatory_processes/config/locales/bg.yml index 1cbca58772a13..c48a8b353cd56 100644 --- a/decidim-participatory_processes/config/locales/bg.yml +++ b/decidim-participatory_processes/config/locales/bg.yml @@ -19,8 +19,74 @@ bg: local_area: Район на организацията meta_scope: Метаданни сфера decidim: + admin: + actions: + filter: + all_processes: Показване на всички процеси + process_groups: Групи процеси + models: + participatory_process: + fields: + promoted: Акцентирано + participatory_process_group_landing_page: + edit: + active_content_blocks: Активни блокове със съдържание + inactive_content_blocks: Неактивни блокове със съдържание + participatory_process_steps: + destroy: + error: + active_step: Не може да изтриете активна фаза. + last_step: Не може да изтриете последната фаза от процеса. + participatory_processes: + index: + not_published: Не публикувано + log: + value_types: + participatory_process_type_presenter: + not_found: 'Типът на процеса не бе намерен в базата данни (Идент. №: %{id})' + participatory_process: + show: + related_assemblies: Свързани събрания + participatory_process_groups: + content_blocks: + title: + name: Заглавие, описание и хаштаг + participatory_process_steps: + index: + title: Фази на процес за участие participatory_processes: + pages: + home: + highlighted_processes: + active_step: Активна фаза + more_information: Още информация + participate: Участвайте + participate_in: Участие в процеса %{resource_name} + processes_button_title: Връзка към страницата „Процеси“, на която се показват всички процеси + participatory_processes: + filters: + explanations: + no_active: Няма активни процеси + no_active_nor_upcoming: Няма активни или предстоящи процеси + index: + loading: Зареждане на резултати... show: area: Район + dates: Дати developer_group: Група за популяризиране end_date: Крайна дата + unspecified: Неопределено + layouts: + decidim: + participatory_process_widgets: + show: + active_step: Активна фаза + participatory_processes: + participatory_process: + active_step: 'Текуща фаза:' + promoted_process: + active_step: 'Текуща фаза:' + process_header_steps: + step: Фаза %{current} от общо %{total} + process_navigation: + process_menu_item: Процесът diff --git a/decidim-participatory_processes/config/locales/he-IL.yml b/decidim-participatory_processes/config/locales/he-IL.yml new file mode 100644 index 0000000000000..af6fa60a73f2c --- /dev/null +++ b/decidim-participatory_processes/config/locales/he-IL.yml @@ -0,0 +1 @@ +he: diff --git a/decidim-participatory_processes/config/locales/lb.yml b/decidim-participatory_processes/config/locales/lb.yml index 48c31bce4d9e1..544a286736ae9 100644 --- a/decidim-participatory_processes/config/locales/lb.yml +++ b/decidim-participatory_processes/config/locales/lb.yml @@ -72,6 +72,9 @@ lb: decidim/participatory_process_group: one: Prozessgruppe other: Prozessgruppen + decidim/participatory_process_step: + one: Etapp + other: Phasen decidim: admin: actions: @@ -169,14 +172,64 @@ lb: update: error: Beim Aktualisieren dieser partizipativen Prozessgruppe ist ein Fehler aufgetreten. success: Partizipative Prozessgruppe wurde erfolgreich aktualisiert. + participatory_process_imports: + create: + error: Beim Importieren dieses Beteiligungsprozesses ist ein Fehler aufgetreten. + success: Beteiligungsprozess wurde erfolgreich importiert. + new: + import: Import + select: Wählen Sie aus, welche Daten Sie importieren möchten + title: Beteiligungsprozess importieren + participatory_process_publications: + create: + error: Bei der Veröffentlichung dieses Beteiligungsprozesses ist ein Fehler aufgetreten. + success: Partizipativer Prozess erfolgreich veröffentlicht. + destroy: + error: Beim Aufheben der Veröffentlichung dieses Beteiligungsprozesses ist ein Fehler aufgetreten. + success: Partizipativer Prozess wurde nicht veröffentlicht. + participatory_process_step_activations: + create: + error: Beim Aktivieren dieses partizipativen Prozessschritts ist ein Fehler aufgetreten. + success: Partizipativer Prozessschritt erfolgreich aktiviert. participatory_process_steps: + create: + error: Beim Erstellen eines neuen partizipativen Prozessschritts ist ein Fehler aufgetreten. + success: Partizipativer Prozessschritt erfolgreich erstellt. + default_title: Aféierung destroy: error: active_step: Der aktive Schritt kann nicht gelöscht werden. last_step: Der letzte Schritt eines Beteiligungsprozesses kann nicht gelöscht werden. + success: Participatory-Prozessschritt erfolgreich gelöscht. + edit: + title: Beteiligungsschritt bearbeiten + update: Aktualiséieren + index: + steps_title: Phasen + new: + create: Erstellen + title: Neuer partizipativer Prozessschritt + ordering: + error: Beim Neuanordnen dieser partizipativen Prozessschritte ist ein Fehler aufgetreten. + update: + error: Beim Aktualisieren dieses partizipativen Prozessschritts ist ein Fehler aufgetreten. + success: Partizipativer Prozessschritt erfolgreich aktualisiert. participatory_process_types: form: title: Titel + participatory_process_user_roles: + create: + error: Beim Hinzufügen eines Benutzers für diesen partizipativen Prozess ist ein Fehler aufgetreten. + success: Benutzer hat diesen partizipativen Prozess erfolgreich hinzugefügt. + destroy: + success: Der Benutzer wurde erfolgreich aus diesem partizipativen Prozess entfernt. + edit: + title: Administrator des Beteiligungsprozesses aktualisieren + update: Aktualiséieren + index: + process_admins_title: Partizipative Prozessbenutzer + new: + create: Erstellen titles: participatory_process_groups: Prozessgruppen participatory_processes: Bedeelegungsprozesser @@ -257,6 +310,25 @@ lb: show: title: Prozessgruppen participatory_processes: + admin: + participatory_process_groups: + form: + title: Allgemeine Information + participatory_processes: + form: + other: Andere + related_processes: Ähnliche Beteiligungsprozesse + scope_type_max_depth_help: Beschränken Sie die Bereichs-Filtertiefe; der Filter zeigt nur Ergebnisse von Allgemein bis zum ausgewählten Bereichstyp an. + select_an_area: Wählen Sie einen Bereich aus + select_process_group: Wählen Sie eine Prozessgruppe aus + title: Allgemeine Information + content_blocks: + highlighted_processes: + name: Hervorgehobene Beteiligungsprozesse + index: + title: Bedeelegungsprozesser + last_activity: + new_participatory_process: Neuer partizipativer Prozess pages: home: highlighted_processes: @@ -264,11 +336,25 @@ lb: more_information: weider Informatiounen participate: Matmaachen participate_in: Am Prozess %{resource_name} teilnehmen + participatory_process_steps: + index: + back_to_process: Zurück zur Prozessseite participatory_processes: filters: + counters: + active: + one: 1 aktiver Beteiligungsprozess + other: "%{count} Beteiligungsprozesse" explanations: no_active: Keine aktiven Prozesse no_active_nor_upcoming: Keine aktiven oder zukünftigen Beteiligungsprozesse + no_active_nor_upcoming_callout: Es gibt keine aktiven oder zukünftigen Beteiligungsprozesse. Hier ist eine Liste der vergangenen. + names: + active: Aktiv + all: All + past: Vergaangenes + upcoming: Demnächst stattfannend + see: Sehen index: loading: Ergebnisse werden geladen... show: diff --git a/decidim-proposals/config/locales/bg.yml b/decidim-proposals/config/locales/bg.yml index 22dd9ef66d930..4621e05b67293 100644 --- a/decidim-proposals/config/locales/bg.yml +++ b/decidim-proposals/config/locales/bg.yml @@ -11,6 +11,8 @@ bg: state: Състояние title: Заглавие user_group_id: Създай съвместна чернова като + import_participatory_text: + document: Текстов документ за участие proposal: address: Адрес answer: Отговор @@ -141,6 +143,7 @@ bg: endorsements_enabled: Одобряване разрешено proposal_answering_enabled: Отговора на предложение е разрешен publish_answers_immediately: Публикувай отговорите на предложения незабавно + publish_answers_immediately_help_html: 'Имайте предвид, че ако отговаряте на някои предложения, без това активиране, ще трябва да ги публикувате ръчно, като ги изберете и използвате действието за публикуване. За повече информация как работи това вижте страницата с документация за отговорите на предложенията.' suggested_hashtags: Предлагай хаштаг на участниците когато създават предложения votes_blocked: Поддържането блокирано votes_enabled: Поддържането разрешено @@ -214,23 +217,173 @@ bg: proposal_published_for_space: email_intro: Предложението "%{resource_title}" беше добавено в "%{participatory_space_title}", което следвате. email_outro: Получавате това известие, защото следвате "%{participatory_space_title}". Може да прекратите известията чрез предната връзка. + notification_title: Предложениетоl %{resource_title} е добавено към %{participatory_space_title} от %{author} + notification_title_official: Официалното предложение %{resource_title} е добавено към %{participatory_space_title} proposal_rejected: affected_user: + email_intro: 'Вашето предложение "%{resource_title}" беше отхвърлено. Можете да прочетете отговора на тази страница:' email_outro: Получавате това известие, защото сте автор на %{resource_title}". + email_subject: Вашето предложение беше отхвърлено + notification_title: Вашето предложение %{resource_title} беше отхвърлено. + follower: + email_intro: 'Предложението „%{resource_title}“ беше отхвърлено. Можете да прочетете отговора на тази страница:' + email_subject: Предложение, което следвате, беше отхвърлено + notification_title: Предложението %{resource_title} беше отхвърлено. + gamification: + badges: + proposal_votes: + unearned_another: Този участник все още не е подкрепил нито едно предложение. + proposals: + unearned_another: Този участник все още не е създал нито едно предложение. + participatory_spaces: + highlighted_proposals: + see_all: Виж всички предложения (%{count}) proposals: admin: imports: title: + answers: Импортиране на отговори на предложения proposals: Копиране на предложения + participatory_texts: + new_import: + document_legend: 'Добавете документ с големина до 2 Mb, като всеки раздел до 3 нива надолу в структурата ще бъде анализиран в „Предложения“. Поддържаните формати са: %{valid_mime_types}' + publish: + invalid: Неуспешно публикуване на предложения + success: Всички предложения бяха публикувани + proposal_notes: + create: + error: Възникна проблем при създаването на тази бележка за предложението + success: Бележката за предложението беше създадена успешно proposals: + answer: + invalid: Възникна проблем при отговарянето на това предложение + success: Отговорихте успешно на предложението + create: + invalid: Възникна проблем при създаването на това предложение + success: Предложението беше създадено успешно + publish_answers: + number_of_proposals: Отговорите на %{number} предложения ще бъдат публикувани. + select_a_proposal: Моля, изберете предложение show: + authors: Автори + comments_negative_count: Против + comments_neutral_count: Неутрален + comments_positive_count: Подкрепям + created_at: Дата на създаване + endorsements_ranking: Класиране по препоръки + link: Връзка proposals: Предложения + votes_ranking: Класиране по подкрепяния + update_category: + select_a_proposal: Моля, изберете предложение + update_scope: + select_a_proposal: Моля, изберете предложение + select_a_scope: Моля, изберете обхват proposals_imports: + create: + invalid: Възникна проблем при импортирането на предложенията + success: "%{number} предложения бяха импортирани успешно" new: title: Копиране на предложения + valuation_assignments: + create: + invalid: Възникна грешка при възлагането на предложенията на оценител + success: Предложенията бяха възложени успешно на оценител + delete: + invalid: Възникна грешка при отмяна на възлагането на предложения към оценител + success: Оценителят бе успешно премахнат от предложенията + collaborative_drafts: + collaborative_draft: + publish: + irreversible_action_modal: + body: След като черновата бъде публикувана като предложение, тя повече няма да може да се редактира. За предложението няма да могат да се приемат нови автори или добавки. + view_collaborative_draft: Преглед на съвместна чернова + withdraw: + irreversible_action_modal: + body: След като черновата бъде затворена, тя повече няма да може да се редактира. За черновата няма да могат да се приемат нови автори или добавки. + count: + drafts_count: + one: "Съвместна чернова" + other: "Съвместни чернови" + requests: + accepted_request: + success: "@%{user} беше приет(а) успешно като сътрудник" + access_requested: + success: Вашата заявка за сътрудничество беше изпратена успешно + rejected_request: + success: "@%{user} беше отхвърлен(а) успешно като сътрудник" + show: + final_proposal: окончателно предложение + info-message: Това е съвместна чернова за предложение. Това означава, че можете да помогнете на авторите да оформят предложението си, като използвате раздела за коментари по-долу, или да го подобрите директно, като поискате редакторски достъп. След като авторите Ви предоставят достъп, ще можете да извършвате промени в черновата. + published_proposal: публикувано предложение + version_history: вижте хронологията на версиите за това предложение + wizard_aside: + info: Създавате съвместна чернова. content_blocks: highlighted_proposals: proposals: Предложения + last_activity: + new_proposal_at_html: "Ново предложение на адрес: %{link}" + proposal_updated_at_html: "Предложение беше актуализирано на: %{link}" + models: + collaborative_draft: + fields: + authors: Автори + contributions: Добавки + new: + limit_reached: Не можете да създавате нови предложения, докато сте надхвърлили ограничението. + proposals: + count: + proposals_count: + one: "%{count} предложение" + other: "%{count} предложения" + edit: + add_image: Добавяне на изображение + edit_image: Редактиране на изображение + gallery_legend: "(Незадължително) Добавете изображение към картата с предложението" + index: + view_proposal: Преглед на предложението + linked_proposals: + proposal_votes: + one: поддръжка + other: поддръжки + participatory_texts: + view_index: + see_index: Вижте индекса + proposal: + creation_date: 'Създадено на:' + view_proposal: Преглед на предложението + proposals: + empty: Все още няма предложение + empty_filters: Няма предложение, което да отговаря на тези критерии + show: + back_to: Назад към + back_to_list: Назад към списъка + endorsements_list: Списък с одобрения + read_less: Виж по-малко + read_more: Прочетете повече + report: Отчет + tags: + changed_from: "(променено от предишното %{previous_name} от администратор)" + votes_count: + most_popular_proposal: Най-популярно предложение + need_more_votes: Има нужда от повече подкрепяния + voting_rules: + minimum_votes_per_user: + given_enough_votes: Предоставили сте достатъчно подкрепяния. + threshold_per_proposal: + description: За да бъдат валидирани, предложенията трябва да съберат %{limit} подкрепяния + vote_limit: + left: Оставащи + wizard_aside: + info: Вие създавате предложение. + wizard_steps: + see_steps: вижте стъпките + step_of: Стъпка %{current_step_num} от общо %{total_steps} + proposals_picker: + close: Затвори + more_proposals: Има още %{number} предложения. Прецизирайте търсенето си, за да ги намерите. + no_proposals: Няма предложения, които да съответстват на критериите Ви за търсене, или няма никакви предложения. versions: collaborative_drafts: back_to_resource: Обратно към съвместната чернова diff --git a/decidim-proposals/config/locales/ca.yml b/decidim-proposals/config/locales/ca.yml index eb4a670733b30..f76e94df1023e 100644 --- a/decidim-proposals/config/locales/ca.yml +++ b/decidim-proposals/config/locales/ca.yml @@ -111,7 +111,7 @@ ca: state_eq: label: Estat values: - accepted: Acceptada + accepted: Acceptades evaluating: En avaluació published: Publicades rejected: Rebutjada @@ -387,7 +387,7 @@ ca: title: Suports participatory_spaces: highlighted_proposals: - see_all: Veure tots (%{count}) + see_all: Veure totes (%{count}) proposals: actions: answer_proposal: Respondre a la proposta @@ -471,7 +471,7 @@ ca: success: El text participatiu s'ha actualitzat correctament. proposal_answers: form: - accepted: Acceptades + accepted: Acceptada answer_proposal: Resposta evaluating: En avaluació not_answered: No resposta @@ -602,7 +602,7 @@ ca: create: "%{user_name} ha assignat la proposta %{resource_name} a una avaluadora" delete: "%{user_name} ha desfet l'assignació a una avaluadora de la proposta %{proposal_title}" answers: - accepted: Acceptades + accepted: Acceptada evaluating: En avaluació not_answered: No resposta rejected: Rebutjada @@ -619,7 +619,7 @@ ca: filter_scope_values: all: Totes filter_state_values: - accepted: Acceptades + accepted: Acceptada all: Totes evaluating: En avaluació not_answered: No resposta diff --git a/decidim-proposals/config/locales/cs.yml b/decidim-proposals/config/locales/cs.yml index acbcf3e4dca65..319654a1ad5ed 100644 --- a/decidim-proposals/config/locales/cs.yml +++ b/decidim-proposals/config/locales/cs.yml @@ -283,6 +283,7 @@ cs: notification_title: Váš návrh %{resource_title} byl přijat. follower: email_intro: 'Návrh "%{resource_title}" byl přijat. Odpověď můžete číst na této stránce:' + email_outro: Toto oznámení jste obdrželi, protože sledujete "%{resource_title}". Můžete sledování odhlásit na předchozím odkazu. email_subject: Návrh, který sledujete, byl přijat notification_title: Návrh %{resource_title} byl přijat. proposal_evaluating: @@ -293,6 +294,7 @@ cs: notification_title: Váš návrh %{resource_title} je hodnocen. follower: email_intro: 'V současné době se hodnotí návrh "%{resource_title}". V této stránce můžete zkontrolovat odpověď:' + email_outro: Toto oznámení jste obdrželi, protože sledujete "%{resource_title}". Můžete sledování odhlásit na předchozím odkazu. email_subject: Návrh, který sledujete, se hodnotí notification_title: Návrh %{resource_title} se hodnotí. proposal_mentioned: @@ -319,6 +321,7 @@ cs: notification_title: Váš návrh %{resource_title} byl zamítnut. follower: email_intro: 'Návrh "%{resource_title}" byl zamítnut. Odpověď můžete číst na této stránce:' + email_outro: Toto oznámení jste obdrželi, protože sledujete "%{resource_title}". Můžete sledování odhlásit na předchozím odkazu. email_subject: Návrh, který sledujete, byl zamítnut notification_title: Návrh %{resource_title} byl zamítnut. proposal_update_category: diff --git a/decidim-proposals/config/locales/es.yml b/decidim-proposals/config/locales/es.yml index 09720c0917e76..0d43cb78224b2 100644 --- a/decidim-proposals/config/locales/es.yml +++ b/decidim-proposals/config/locales/es.yml @@ -111,7 +111,7 @@ es: state_eq: label: Estado values: - accepted: Aceptada + accepted: Aceptadas evaluating: En evaluación published: Publicada rejected: Rechazada @@ -471,7 +471,7 @@ es: success: Texto participativo actualizado correctamente. proposal_answers: form: - accepted: Aceptadas + accepted: Aceptada answer_proposal: Respuesta evaluating: En evaluación not_answered: No contestada @@ -602,7 +602,7 @@ es: create: "%{user_name} asignó la propuesta %{resource_name} a una evaluadora" delete: "%{user_name} desasignó una evaluadora de la propuesta %{proposal_title}" answers: - accepted: Aceptadas + accepted: Aceptada evaluating: En evaluación not_answered: No contestada rejected: Rechazada @@ -619,7 +619,7 @@ es: filter_scope_values: all: Todas filter_state_values: - accepted: Aceptadas + accepted: Aceptada all: Todas evaluating: En evaluación not_answered: No contestada diff --git a/decidim-proposals/config/locales/he-IL.yml b/decidim-proposals/config/locales/he-IL.yml new file mode 100644 index 0000000000000..af6fa60a73f2c --- /dev/null +++ b/decidim-proposals/config/locales/he-IL.yml @@ -0,0 +1 @@ +he: diff --git a/decidim-proposals/config/locales/hu.yml b/decidim-proposals/config/locales/hu.yml index 8a7892918868e..440832c25c0ff 100644 --- a/decidim-proposals/config/locales/hu.yml +++ b/decidim-proposals/config/locales/hu.yml @@ -22,6 +22,7 @@ hu: category_id: Kategória decidim_scope_id: Hatáskör has_address: Van lakcíme + scope_id: Hatáskör state: Állapot suggested_hashtags: Javasolt hashtagek title: Cím diff --git a/decidim-proposals/config/locales/ru.yml b/decidim-proposals/config/locales/ru.yml index 8e000504b41db..8701bcb991905 100644 --- a/decidim-proposals/config/locales/ru.yml +++ b/decidim-proposals/config/locales/ru.yml @@ -8,6 +8,7 @@ ru: body: Основной текст category_id: Категория has_address: Имеет адрес + scope_id: Охват state: Cостояние title: Заголовок user_group_id: Создать предложение в качестве @@ -284,6 +285,7 @@ ru: send: Предпросмотр title: Редактировать черновик предложения filters: + all: Все category: Категория origin: Источник related_to: Связано с diff --git a/decidim-proposals/config/locales/uk.yml b/decidim-proposals/config/locales/uk.yml index 7dec909722c6f..17891a12c8d09 100644 --- a/decidim-proposals/config/locales/uk.yml +++ b/decidim-proposals/config/locales/uk.yml @@ -8,6 +8,7 @@ uk: body: Основний текст category_id: Категорія has_address: Має адресу + scope_id: Обсяг state: Стан title: Назва user_group_id: Створити пропозицію як @@ -284,6 +285,7 @@ uk: send: Попередній перегляд title: Редагувати чернетку пропозиції filters: + all: Усі category: Категорія origin: Джерело related_to: Пов'язане з diff --git a/decidim-sortitions/config/locales/bg.yml b/decidim-sortitions/config/locales/bg.yml index 0185d5de17008..6e47c5e15b511 100644 --- a/decidim-sortitions/config/locales/bg.yml +++ b/decidim-sortitions/config/locales/bg.yml @@ -6,3 +6,39 @@ bg: additional_info: Сортиране на информация decidim_category_id: Категории от набора от предложения, в които искате да приложите жребий decidim_proposals_component_id: Предложенията са зададени + decidim: + sortitions: + admin: + sortitions: + create: + success: Жребият беше създаден успешно + destroy: + error: Жребият не може да се отмени. + success: Жребият беше отменен успешно + form: + title: Нов жребий за предложения + new: + confirm: Когато натиснете бутона „Напред“, системата ще запише датата и часа (с точност до секунди) и заедно с хвърлянето на зара тази информация ще се използва за генериране на избор на случаен принцип. Действието няма да може да бъде отменено — когато щракнете върху бутона, резултатът от жребия ще бъде публикуван заедно с въведените в този формуляр данни и няма да подлежи на промяна. Моля, прегледайте съдържанието внимателно + update: + success: Жребият беше актуализиран успешно + sortitions: + filters: + category_prompt: Изберете категория + search: Търсене + filters_small_view: + close_modal: Затвори прозореца + filter: Филтър + filter_by: Филтрирай по + unfold: Разгъване + results_count: + count: + one: избрано предложение + other: избрани предложения + show: + back: Назад към списъка + dice_result: "(1) Резултат от жребия" + mathematical_result: Резултат (1) x (2) + sortition_reproducibility_details: Подробности за възпроизвеждане на жребия + time_seed: "(2) Време за зареждане" + sortition: + view: Изглед diff --git a/decidim-sortitions/config/locales/he-IL.yml b/decidim-sortitions/config/locales/he-IL.yml new file mode 100644 index 0000000000000..af6fa60a73f2c --- /dev/null +++ b/decidim-sortitions/config/locales/he-IL.yml @@ -0,0 +1 @@ +he: diff --git a/decidim-surveys/config/locales/bg.yml b/decidim-surveys/config/locales/bg.yml index bb348535b1445..3c3cb5103fc14 100644 --- a/decidim-surveys/config/locales/bg.yml +++ b/decidim-surveys/config/locales/bg.yml @@ -9,3 +9,10 @@ bg: decidim/surveys/survey: one: Анкета other: Анкети + decidim: + surveys: + last_activity: + new_survey_at_html: "Ново допитване на %{link}" + surveys: + answer: + spam_detected: Възникна проблем при попълването на отговорите във формуляра. Навярно сте били твърде бързи, бихте ли опитали отново? diff --git a/decidim-surveys/config/locales/he-IL.yml b/decidim-surveys/config/locales/he-IL.yml new file mode 100644 index 0000000000000..af6fa60a73f2c --- /dev/null +++ b/decidim-surveys/config/locales/he-IL.yml @@ -0,0 +1 @@ +he: diff --git a/decidim-system/config/locales/bg.yml b/decidim-system/config/locales/bg.yml index 70c161a2c3b67..688dab6a8b7ad 100644 --- a/decidim-system/config/locales/bg.yml +++ b/decidim-system/config/locales/bg.yml @@ -1,5 +1,12 @@ --- bg: + activemodel: + attributes: + organization: + address: Име на SMTP хост + password: Парола + port: Порт + user_name: Потребителско име decidim: system: actions: @@ -8,5 +15,25 @@ bg: edit: Редактирай new: Нов admins: + create: + success: Администраторът беше създаден успешно + destroy: + success: Администраторът беше изтрит успешно show: + destroy: Унищожи edit: Редактирай + update: + success: Администраторът беше актуализиран успешно + models: + admin: + name: Администратор + oauth_application: + name: Приложение за OAuth + organizations: + create: + success: Организацията беше създадена успешно. + smtp_settings: + instructions: + from_label: 'Подателят на имейла ще бъде: „името-на-организацията-ви “. Оставете празно, за да използвате „имейл адресът“ като етикет' + users_registration_mode: + existing: Не разрешавайте на участниците да се регистрират, но разрешете на съществуващите участници да влизат в профила си diff --git a/decidim-system/config/locales/eo.yml b/decidim-system/config/locales/eo.yml index 7599814048735..4323652d927d1 100644 --- a/decidim-system/config/locales/eo.yml +++ b/decidim-system/config/locales/eo.yml @@ -1 +1,8 @@ +--- eo: + activemodel: + attributes: + oauth_application: + organization_logo: Organizaĵa emblemo (kvadrata) + organization_url: Organizo URL + redirect_uri: Adresado URL diff --git a/decidim-system/config/locales/he-IL.yml b/decidim-system/config/locales/he-IL.yml new file mode 100644 index 0000000000000..af6fa60a73f2c --- /dev/null +++ b/decidim-system/config/locales/he-IL.yml @@ -0,0 +1 @@ +he: diff --git a/decidim-system/config/locales/hu.yml b/decidim-system/config/locales/hu.yml index fe8b3ea94ce09..daf9861b0a18d 100644 --- a/decidim-system/config/locales/hu.yml +++ b/decidim-system/config/locales/hu.yml @@ -1,5 +1,22 @@ --- hu: + activemodel: + attributes: + oauth_application: + organization_logo: Szervezet logója (négyzet) + organization_url: Szervezet URL + redirect_uri: Redirect URI + organization: + address: SMTP host név + password: Jelszó + port: Port + user_name: Felhasználónév + errors: + models: + oauth_application: + attributes: + redirect_uri: + must_be_ssl: Az átirányítási URI-nak SSL URI-nak kell lennie decidim: system: actions: diff --git a/decidim-system/config/locales/is-IS.yml b/decidim-system/config/locales/is-IS.yml index 8b3dcaaf008b7..f3863e10007f8 100644 --- a/decidim-system/config/locales/is-IS.yml +++ b/decidim-system/config/locales/is-IS.yml @@ -1,5 +1,11 @@ --- is: + activemodel: + attributes: + organization: + password: Lykilorð + port: Gátt + user_name: Notendanafn decidim: system: actions: diff --git a/decidim-system/config/locales/lv.yml b/decidim-system/config/locales/lv.yml index fe66db21befd0..05fa13912074e 100644 --- a/decidim-system/config/locales/lv.yml +++ b/decidim-system/config/locales/lv.yml @@ -1,5 +1,22 @@ --- lv: + activemodel: + attributes: + oauth_application: + organization_logo: Organizācijas logotips (kvadrāts) + organization_url: Organizācijas URL + redirect_uri: Novirzīšanas URI + organization: + address: SMTP saimniekdatora nosaukums + password: Parole + port: Ports + user_name: Lietotājvārds + errors: + models: + oauth_application: + attributes: + redirect_uri: + must_be_ssl: Novirzīšanas URI jābūt SSL URI decidim: system: actions: diff --git a/decidim-system/config/locales/nl.yml b/decidim-system/config/locales/nl.yml index 4408f41f0f8c3..15a83b6adb3fe 100644 --- a/decidim-system/config/locales/nl.yml +++ b/decidim-system/config/locales/nl.yml @@ -2,6 +2,10 @@ nl: activemodel: attributes: + oauth_application: + organization_logo: Logo organisatie (vierkant) + organization_url: URL van de organisatie + redirect_uri: URI doorsturen organization: address: SMTP hostname from_email: E-mailadres @@ -9,6 +13,12 @@ nl: password: Wachtwoord port: Poort user_name: Gebruikersnaam + errors: + models: + oauth_application: + attributes: + redirect_uri: + must_be_ssl: De omleidings-URI moet een SSL-URI zijn decidim: system: actions: diff --git a/decidim-system/config/locales/ru.yml b/decidim-system/config/locales/ru.yml index 1a615c296a5f9..df0e5d9959e17 100644 --- a/decidim-system/config/locales/ru.yml +++ b/decidim-system/config/locales/ru.yml @@ -1,5 +1,22 @@ --- ru: + activemodel: + attributes: + oauth_application: + organization_logo: Логотип организации (квадрат) + organization_url: Веб-адрес организации + redirect_uri: URI перенаправления + organization: + address: Имя хоста SMTP + password: Пароль + port: Порт + user_name: Имя пользователя + errors: + models: + oauth_application: + attributes: + redirect_uri: + must_be_ssl: URI перенаправления должен быть SSL URI decidim: system: actions: diff --git a/decidim-system/config/locales/sk.yml b/decidim-system/config/locales/sk.yml index 05b81528007e7..29e4456a746f3 100644 --- a/decidim-system/config/locales/sk.yml +++ b/decidim-system/config/locales/sk.yml @@ -1,5 +1,22 @@ --- sk: + activemodel: + attributes: + oauth_application: + organization_logo: Logo organizácie (štvorec) + organization_url: Odkaz na stránku organizácie + redirect_uri: Presmerovať URI + organization: + address: SMTP hostname + password: Heslo + port: Port + user_name: Používateľské meno + errors: + models: + oauth_application: + attributes: + redirect_uri: + must_be_ssl: Presmerovacie URI musí byť SSL URI decidim: system: actions: diff --git a/decidim-system/config/locales/sl.yml b/decidim-system/config/locales/sl.yml index 1bbecbe8ec4d2..9c5955bb61522 100644 --- a/decidim-system/config/locales/sl.yml +++ b/decidim-system/config/locales/sl.yml @@ -1,5 +1,22 @@ --- sl: + activemodel: + attributes: + oauth_application: + organization_logo: Logo organizacije (kvadratni) + organization_url: Domača stran organizacije + redirect_uri: Preusmeritev URI + organization: + address: SMTP Gostitelj + password: Geslo + port: Vrata + user_name: Uporabniško ime + errors: + models: + oauth_application: + attributes: + redirect_uri: + must_be_ssl: URL preusmeritev mora bit SSL decidim: system: actions: diff --git a/decidim-system/config/locales/sr-CS.yml b/decidim-system/config/locales/sr-CS.yml index 25e8912f51d63..fa1b678387f1a 100644 --- a/decidim-system/config/locales/sr-CS.yml +++ b/decidim-system/config/locales/sr-CS.yml @@ -1,5 +1,22 @@ --- sr: + activemodel: + attributes: + oauth_application: + organization_logo: Logo organizacije (kvadrat) + organization_url: Link organizacije + redirect_uri: Preusmeren URL + organization: + address: SMTP domaćin + password: Šifra + port: Port + user_name: Korisničko ime + errors: + models: + oauth_application: + attributes: + redirect_uri: + must_be_ssl: URI za preusmeravanje mora biti SSL URI decidim: system: models: diff --git a/decidim-system/config/locales/uk.yml b/decidim-system/config/locales/uk.yml index 80b988990ad1a..69a5e0df8eaf5 100644 --- a/decidim-system/config/locales/uk.yml +++ b/decidim-system/config/locales/uk.yml @@ -1,5 +1,17 @@ --- uk: + activemodel: + attributes: + oauth_application: + organization_logo: Логотип організації (квадрат) + organization_url: Адреса сайту організації + redirect_uri: URI перенаправлення + errors: + models: + oauth_application: + attributes: + redirect_uri: + must_be_ssl: URI перенаправлення має бути SSL URI decidim: system: actions: diff --git a/decidim-templates/config/locales/bg.yml b/decidim-templates/config/locales/bg.yml index d0e375da96f10..80fbe5980b13a 100644 --- a/decidim-templates/config/locales/bg.yml +++ b/decidim-templates/config/locales/bg.yml @@ -1 +1,23 @@ +--- bg: + decidim: + admin: + templates: + apply: + success: Шаблонът е приложен успешно + copy: + success: Шаблонът е копиран успешно + create: + success: Шаблонът е създаден успешно + destroy: + success: Шаблонът е изтрит успешно + update: + success: Шаблонът е обновен успешно + templates: + admin: + questionnaire_templates: + edit: + empty: Все още няма въпроси + form: + save: Запази + template_title: Информация за шаблона diff --git a/decidim-templates/config/locales/he-IL.yml b/decidim-templates/config/locales/he-IL.yml new file mode 100644 index 0000000000000..af6fa60a73f2c --- /dev/null +++ b/decidim-templates/config/locales/he-IL.yml @@ -0,0 +1 @@ +he: diff --git a/decidim-verifications/config/locales/bg.yml b/decidim-verifications/config/locales/bg.yml index 88bcfe13feb4f..81ac9eb23f8a6 100644 --- a/decidim-verifications/config/locales/bg.yml +++ b/decidim-verifications/config/locales/bg.yml @@ -7,13 +7,159 @@ bg: offline: Извън линия offline_explanation: Инструкции за проверка извън линия online: На линия + confirmation: + verification_code: Код за потвърждение id_document_information: document_number: Номер на документ (с буквите) document_type: Тип на документа + id_document_upload: + document_number: Номер на документа (с буква) + document_type: Тип на Вашия документ + user: Участник + verification_attachment: Сканирано копие на Вашия документ + mobile_phone: + mobile_phone_number: Номер на мобилен телефон + offline_confirmation: + email: Имейл на участника + postal_letter_address: + full_address: Пълен адрес + postal_letter_confirmation: + verification_code: Код за потвърждение + postal_letter_postage: + full_address: Пълен адрес + verification_code: Код за потвърждение + errors: + models: + census_data: + attributes: + file: + malformed: Неправилен файл за импортиране, моля, прочетете внимателно инструкциите и се уверете, че файлът е UTF-8 кодиран. decidim: + admin: + menu: + authorization_revocation: + before_date_info: Полезна функция, ако процесът вече е започнал и искате да анулирате разрешенията на предходния процес. + button: Отмени всичко + button_before: Отмени преди дата + destroy: + confirm: Отмяната на оторизациите преди определена дата е действие, което не може да бъде отменено. Сигурни ли сте, че искате да продължите? + confirm_all: Отмяната на всички оторизации е действие, което не може да бъде отменено. Сигурни ли сте, че искате да продължите? + destroy_nok: Възникна проблем при отмяната на оторизации. + destroy_ok: Всички съвпадащи оторизации бяха отменени успешно. + info: Има общо %{count} потвърдени участници. + no_data: Няма потвърдени участници + title: Оторизации за отмяна + authorization_workflows: Оторизации + admin_log: + organization: + update_id_documents_config: "%{user_name} актуализира конфигурацията за оторизация на документи за самоличност" + user: + grant_id_documents_offline_verification: "%{user_name} потвърди %{resource_name}, като използва офлайн проверка на документите за самоличност" + authorization_handlers: + admin: + csv_census: + help: + - Администраторите качват CSV с имейлите на приетите участници + - Само участници с имейл в този CSV файл могат да бъдат потвърдени + id_documents: + help: + - Потребителите попълват своята информация за самоличност и качват копие на своя документ. + - Попълнете информацията, присъстваща в каченото изображение. + - Информацията трябва да съответства на това, което е попълнил потребителят. + - Ако не можете да видите ясно информацията или не можете да я проверите, можете да отхвърлите заявката и потребителят ще има възможността да я коригира. + postal_letter: + help: + - Участниците искат да им бъде изпратен код за потвърждение на техния адрес. + - Изпращате писмото до техния адрес с кода за потвърждение. + - + - + csv_census: + explanation: Потвърждение чрез преброяването на участниците в организацията + id_documents: + explanation: Качете документите си за самоличност, за да можем да проверим самоличността Ви + postal_letter: + explanation: Ще Ви изпратим писмо по пощата с код, който ще трябва да въведете, за да потвърдим адреса Ви + events: + verifications: + verify_with_managed_user: + email_intro: Участникът %{resource_title} се е опитал да се удостовери с данните на друг участник (%{managed_user_name}). + notification_title: Участникът %{resource_title} се е опитал да се удостовери с данните на друг участник (%{managed_user_name}). verifications: + authorizations: + create: + success: Успешно се удостоверихте. + destroy: + success: Успешно изтрихте удостоверяването. + index: + unauthorized_verification: Ново потвърждение + renew_modal: + close: затваряне + info_renew: Ако искате да актуализирате данните, продължете с подновяването + csv_census: + admin: + census: + create: + success: Успешно бяха импортирани %{count} елемента (%{errors} грешки) + destroy_all: + success: Всички данни от преброяването бяха изтрити + destroy: + confirm: Изтриването на преброяването е действие, което не може да бъде отменено. Сигурни ли сте, че искате да продължите? + index: + data: Заредени са общо %{count} записа. Датата на последното качване е на %{due_date} dummy_authorization: extra_explanation: postal_codes: one: Участието е ограничено до участници с пощенски код %{postal_codes}. other: 'Участието е ограничено до участници с пощенски кодове %{postal_codes}.' + id_documents: + admin: + config: + update: + success: Конфигурирането е успешно обновено + confirmations: + create: + error: Потвърждението не съвпада. Моля, опитайте отново или отхвърлете потвърждението, за да може участникът да го коригира. + success: Участникът беше потвърден успешно + offline_confirmations: + create: + error: Потвърждението не съвпада. Моля, опитайте отново или кажете на участника да го коригира + success: Участникът беше потвърден успешно + rejections: + create: + success: Потвърждението беше отхвърлено. Участниците ще получат напомняне да коригират документите си + authorizations: + create: + error: Възникна грешка при качването на документа Ви + success: Документът беше качен успешно + edit: + being_reviewed: Преглеждаме документите Ви. Скоро ще потвърдим самоличността Ви. + rejection_clarity: Уверете се, че информацията се вижда ясно в каченото изображение + rejection_correctness: Уверете се, че въведената информация е правилна + rejection_notice: Възникна проблем с потвърждението на самоличността Ви. Моля, опитайте отново + postal_letter: + admin: + postages: + create: + error: Грешка при обозначаването на писмото като "изпратено". + success: Писмото беше обозначено успешно като "изпратено". + authorizations: + create: + error: Възникна проблем със заявката Ви + success: Благодарим Ви! Ще изпратим код за потвърждение на Вашия адрес + edit: + waiting_for_letter: Скоро ще изпратим писмо с код за потвърждение на Вашия адрес + update: + error: Кодът Ви за потвърждение не съвпада с нашия. Моля, проверете отново писмото, което Ви изпратихме + success: Поздравления! Успешно потвърдихте самоличността си. + sms: + authorizations: + create: + error: Възникна проблем със заявката Ви + success: Благодарим Ви! Изпратихме SMS на Вашия телефон.. + destroy: + success: Кодът за потвърждение беше успешно презареден. Моля, въведете повторно телефонния си номер. + edit: + resend: Не получихте ли кода за потвърждение? + update: + error: Кодът Ви за потвърждение не съвпада с нашия. Моля, проверете отново съобщението, което Ви изпратихме със SMS. + success: Поздравления. Успешно потвърдихте самоличността си. diff --git a/decidim-verifications/config/locales/he-IL.yml b/decidim-verifications/config/locales/he-IL.yml new file mode 100644 index 0000000000000..af6fa60a73f2c --- /dev/null +++ b/decidim-verifications/config/locales/he-IL.yml @@ -0,0 +1 @@ +he: From 7ca2ef560433a17ca0abb35e43dac72d7d711bc8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20Pereira=20de=20Lucena?= Date: Wed, 24 Apr 2024 18:30:59 +0200 Subject: [PATCH 14/88] Backport 'Fix user profile current tab' to v0.27 (#12729) * Fix user profile current tab * Add to the user profile tabs * Mark the current profile tabs as 0.28 * Add suggestion from code review to fix the code * Fix ruby syntax for this version --------- Co-authored-by: Antti Hukkanen --- decidim-core/app/helpers/decidim/user_profile_helper.rb | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/decidim-core/app/helpers/decidim/user_profile_helper.rb b/decidim-core/app/helpers/decidim/user_profile_helper.rb index f69d31b3dd556..19d2b1ab97803 100644 --- a/decidim-core/app/helpers/decidim/user_profile_helper.rb +++ b/decidim-core/app/helpers/decidim/user_profile_helper.rb @@ -14,9 +14,14 @@ module UserProfileHelper # # Returns a String with the menu tab. def user_profile_tab(text, link, options = {}) - active = is_active_link?(link, (options[:aria_link_type] || :inclusive)) + aria = {} + cls = %w(tabs-title) + if is_active_link?(link, (options[:aria_link_type] || :inclusive)) + cls << "is-active" + aria[:current] = "page" + end - content_tag(:li, class: "tabs-title#{active ? " is-active" : nil}") do + content_tag(:li, class: cls.join(" "), aria: aria) do link_to(text, link, options) end end From ed34e68eef841f2223097022509617a9b14b2ab2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20Pereira=20de=20Lucena?= Date: Wed, 24 Apr 2024 20:29:54 +0200 Subject: [PATCH 15/88] Add description for the decidim:reminders:all task (#12733) * Add description for the decidim:reminders:all task * Removing double whitespace --------- Co-authored-by: Alexandru Emil Lupu --- decidim-core/lib/tasks/decidim_reminders_tasks.rake | 1 + 1 file changed, 1 insertion(+) diff --git a/decidim-core/lib/tasks/decidim_reminders_tasks.rake b/decidim-core/lib/tasks/decidim_reminders_tasks.rake index c6e4b0b632aa9..9d0d5e4bb2042 100644 --- a/decidim-core/lib/tasks/decidim_reminders_tasks.rake +++ b/decidim-core/lib/tasks/decidim_reminders_tasks.rake @@ -2,6 +2,7 @@ namespace :decidim do namespace :reminders do + desc "Sends all the email reminders defined in the manifests" task :all, [] => :environment do Decidim.reminders_registry.all.each do |reminder_manifest| call_reminder_job(reminder_manifest) From 8bcf323338ba8b4d41df6d48a47dc33ac25ba48f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20Pereira=20de=20Lucena?= Date: Thu, 25 Apr 2024 14:57:59 +0200 Subject: [PATCH 16/88] Add matrix for Decidim/Ruby/Node versions in manual guide (#12759) * Add matrix for Decidim/Ruby/Node versions in manual guide * Extract matrix to partial * Implement matrix in Update page * Improve matrix table - Add status column - Add develop decidim version - Add v0.26 --------- Co-authored-by: Alexandru Emil Lupu --- docs/modules/install/pages/manual.adoc | 4 ++++ docs/modules/install/pages/update.adoc | 5 +++++ docs/modules/install/partials/version_matrix.adoc | 13 +++++++++++++ 3 files changed, 22 insertions(+) create mode 100644 docs/modules/install/partials/version_matrix.adoc diff --git a/docs/modules/install/pages/manual.adoc b/docs/modules/install/pages/manual.adoc index c18c8c230d17d..d93b753d4e099 100644 --- a/docs/modules/install/pages/manual.adoc +++ b/docs/modules/install/pages/manual.adoc @@ -12,6 +12,10 @@ In order to develop on decidim, you'll need: We're starting with an Ubuntu 22.04.1 LTS. This is an opinionated guide, so you're free to use the technology that you are most comfortable. If you have any doubts and you're blocked you can go and ask on https://matrix.to/#/#decidimdevs:matrix.org[our Matrix.org chat room for developers]. +The compatibility between the different versions of the components is the following: + +include::install:partial$version_matrix.adoc[] + We recommend to have at least some basic proficiency in GNU/Linux (i.e. how to use the command-line, packages, etc), networking knowledge, server administration, development in general, and some basic knowledge about software package managers. It would be great to have Ruby on Rails development basics (a good starting point is http://guides.rubyonrails.org/getting_started.html[Getting Started with Ruby on Rails]) and have some knowledge on how package libraries are working (we use `bundler` for handling ruby packages, and `npm`/`yarn` for handling javascript). In this guide, we'll see how to install rbenv, PostgreSQL, Node.js and, Decidim, and how to configure everything together for a development environment. Mind that if you want to make a production deployment with real users this guide isn't enough, you should configure a web server (like nginx), backups, monitoring, etc. This is out of the scope of this guide, but you can follow the https://platoniq.github.io/decidim-install/[Platoniq guide]. diff --git a/docs/modules/install/pages/update.adoc b/docs/modules/install/pages/update.adoc index d344dc9400a61..746e1c3362768 100644 --- a/docs/modules/install/pages/update.adoc +++ b/docs/modules/install/pages/update.adoc @@ -85,6 +85,11 @@ gem "decidim-initiatives", DECIDIM_VERSION gem "decidim-dev", DECIDIM_VERSION ---- +== Compatiblity versions matrix + +There are different versions of Decidim that are compatible with different versions of Ruby and Node. You can check the following table to see which versions are compatible with each other: + +include::install:partial$version_matrix.adoc[] [discrete] == Recommendations diff --git a/docs/modules/install/partials/version_matrix.adoc b/docs/modules/install/partials/version_matrix.adoc new file mode 100644 index 0000000000000..0e478d7e8353e --- /dev/null +++ b/docs/modules/install/partials/version_matrix.adoc @@ -0,0 +1,13 @@ + +|=== +|Decidim version |Ruby version |Node version | Status + +|develop | 3.2.2 | 18.17.x | Unreleased + +|v0.28 | 3.1.1 | 18.17.x | Bug fixes and security updates + +|v0.27 | 3.0.2 | 16.18.x | Bug fixes and security updates + +|v0.26 | 2.7.5+ | 16.9.x | Not maintained + +|=== From 5525bb83f162f2b410e6c75630a324fc5f9e4cc5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20Pereira=20de=20Lucena?= Date: Mon, 29 Apr 2024 07:28:30 +0200 Subject: [PATCH 17/88] Backport 'Fix bug in welcome notifications when the organization has weird characters' to v0.27 (#12784) * Fix bug in welcome notifications when the organization has weird characters * Fix bug in welcome notifications when the organization has weird characters * Remove unecessary mustache dependency * Make sure the formatting is displayed as HTML in the mail body Co-authored-by: Alexandru Emil Lupu --------- Co-authored-by: Alexandru Emil Lupu * Fix syntax for ruby version --------- Co-authored-by: Alexandru Emil Lupu --- Gemfile.lock | 2 - .../decidim/welcome_notification_event.rb | 15 +++--- decidim-core/decidim-core.gemspec | 1 - .../welcome_notification_event_spec.rb | 50 +++++++++++++++++++ decidim-generators/Gemfile.lock | 2 - decidim_app-design/Gemfile.lock | 2 - 6 files changed, 56 insertions(+), 16 deletions(-) create mode 100644 decidim-core/spec/events/decidim/welcome_notification_event_spec.rb diff --git a/Gemfile.lock b/Gemfile.lock index 26a2262127bd2..a250329a29fb7 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -82,7 +82,6 @@ PATH loofah (~> 2.19.0) mime-types (>= 1.16, < 4.0) mini_magick (~> 4.9) - mustache (~> 1.1.0) omniauth (~> 2.0) omniauth-facebook (~> 5.0) omniauth-google-oauth2 (~> 1.0) @@ -558,7 +557,6 @@ GEM msgpack (1.4.5) multi_xml (0.6.0) multipart-post (2.3.0) - mustache (1.1.1) net-imap (0.4.4) date net-protocol diff --git a/decidim-core/app/events/decidim/welcome_notification_event.rb b/decidim-core/app/events/decidim/welcome_notification_event.rb index fa742f35fceb8..261f780868066 100644 --- a/decidim-core/app/events/decidim/welcome_notification_event.rb +++ b/decidim-core/app/events/decidim/welcome_notification_event.rb @@ -1,7 +1,5 @@ # frozen_string_literal: true -require "mustache" - module Decidim class WelcomeNotificationEvent < Decidim::Events::BaseEvent include Decidim::Events::EmailEvent @@ -46,13 +44,12 @@ def resource_title private def interpolate(template) - Mustache.render( - template.to_s, - organization: organization.name, - name: user.name, - help_url: url_helpers.pages_url(host: organization.host), - badges_url: url_helpers.gamification_badges_url(host: organization.host) - ).html_safe + template + .gsub("{{name}}", user.name) + .gsub("{{organization}}", organization.name) + .gsub("{{help_url}}", url_helpers.pages_url(host: organization.host)) + .gsub("{{badges_url}}", url_helpers.gamification_badges_url(host: organization.host)) + .html_safe end end end diff --git a/decidim-core/decidim-core.gemspec b/decidim-core/decidim-core.gemspec index bcc058737c8e9..212396e43a564 100644 --- a/decidim-core/decidim-core.gemspec +++ b/decidim-core/decidim-core.gemspec @@ -48,7 +48,6 @@ Gem::Specification.new do |s| s.add_dependency "loofah", "~> 2.19.0" s.add_dependency "mime-types", ">= 1.16", "< 4.0" s.add_dependency "mini_magick", "~> 4.9" - s.add_dependency "mustache", "~> 1.1.0" s.add_dependency "omniauth", "~> 2.0" s.add_dependency "omniauth-facebook", "~> 5.0" s.add_dependency "omniauth-google-oauth2", "~> 1.0" diff --git a/decidim-core/spec/events/decidim/welcome_notification_event_spec.rb b/decidim-core/spec/events/decidim/welcome_notification_event_spec.rb new file mode 100644 index 0000000000000..91948122fdab2 --- /dev/null +++ b/decidim-core/spec/events/decidim/welcome_notification_event_spec.rb @@ -0,0 +1,50 @@ +# frozen_string_literal: true + +require "spec_helper" + +describe Decidim::WelcomeNotificationEvent do + subject { event_instance } + + let(:event_instance) do + described_class.new( + resource: user, + event_name: event_name, + user: user + ) + end + let(:event_name) { "decidim.events.core.welcome_notification" } + let(:user) { create(:user, organization: organization) } + let(:organization) { create(:organization, name: organization_name) } + + context "with a normal organization name" do + let(:organization_name) { "My Organization" } + + describe "#email_subject" do + subject { event_instance.email_subject } + + it { is_expected.to eq("Thanks for joining My Organization!") } + end + + describe "#email_intro" do + subject { event_instance.email_intro } + + it { is_expected.to match(%r{^

    Hi #{CGI.escapeHTML(user.name)}, thanks for joining My Organization and welcome!

    }) } + end + end + + context "with an organization with an apostrophe" do + let(:organization_name) { "My ol'Organization" } + + describe "#email_subject" do + subject { event_instance.email_subject } + + it { is_expected.to eq("Thanks for joining My ol'Organization!") } + end + + describe "#email_intro" do + subject { event_instance.email_intro } + + it { is_expected.to match(%r{^

    Hi #{CGI.escapeHTML(user.name)}, thanks for joining My ol'Organization and welcome!

    }) } + end + end +end diff --git a/decidim-generators/Gemfile.lock b/decidim-generators/Gemfile.lock index fb56e8d4cf49c..f036537959a5c 100644 --- a/decidim-generators/Gemfile.lock +++ b/decidim-generators/Gemfile.lock @@ -82,7 +82,6 @@ PATH loofah (~> 2.19.0) mime-types (>= 1.16, < 4.0) mini_magick (~> 4.9) - mustache (~> 1.1.0) omniauth (~> 2.0) omniauth-facebook (~> 5.0) omniauth-google-oauth2 (~> 1.0) @@ -559,7 +558,6 @@ GEM msgpack (1.4.5) multi_xml (0.6.0) multipart-post (2.4.0) - mustache (1.1.1) net-imap (0.4.10) date net-protocol diff --git a/decidim_app-design/Gemfile.lock b/decidim_app-design/Gemfile.lock index aea3d209b8151..f3e2752fc1b30 100644 --- a/decidim_app-design/Gemfile.lock +++ b/decidim_app-design/Gemfile.lock @@ -82,7 +82,6 @@ PATH loofah (~> 2.19.0) mime-types (>= 1.16, < 4.0) mini_magick (~> 4.9) - mustache (~> 1.1.0) omniauth (~> 2.0) omniauth-facebook (~> 5.0) omniauth-google-oauth2 (~> 1.0) @@ -559,7 +558,6 @@ GEM msgpack (1.4.5) multi_xml (0.6.0) multipart-post (2.4.0) - mustache (1.1.1) net-imap (0.4.10) date net-protocol From 2fdb64de585f579108ac27e5a1205d7b188bb352 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20Pereira=20de=20Lucena?= Date: Mon, 29 Apr 2024 07:41:10 +0200 Subject: [PATCH 18/88] Backport 'Add votes count to comment caches' to v0.27 (#12782) * Add votes count to comment caches * Add votes count to comment caches * Use size instead of count method Co-authored-by: Alexandru Emil Lupu * Implement counter_cache for comment's votes We need to handle the counter_cache manually as we have an scoped association (i.e. with the lambda that does the where in the relation) > has_many :up_votes, -> { where(weight: 1) } So, for this reason we need to do handle the update with a callback in CommentVote and can't use the reset_counters in the migration. * Explicitly use the counter_cache attributes in comment cell --------- Co-authored-by: Alexandru Emil Lupu * Fix syntax for ruby version --------- Co-authored-by: Alexandru Emil Lupu --- .../cells/decidim/comments/comment_cell.rb | 6 ++++-- .../models/decidim/comments/comment_vote.rb | 10 +++++++++ ..._comment_vote_counter_cache_to_comments.rb | 21 +++++++++++++++++++ decidim-comments/spec/models/comment_spec.rb | 2 ++ .../spec/models/comment_vote_spec.rb | 4 ++++ 5 files changed, 41 insertions(+), 2 deletions(-) create mode 100644 decidim-comments/db/migrate/20240304092558_add_comment_vote_counter_cache_to_comments.rb diff --git a/decidim-comments/app/cells/decidim/comments/comment_cell.rb b/decidim-comments/app/cells/decidim/comments/comment_cell.rb index a782daea7a14d..cf5f8f624647b 100644 --- a/decidim-comments/app/cells/decidim/comments/comment_cell.rb +++ b/decidim-comments/app/cells/decidim/comments/comment_cell.rb @@ -47,6 +47,8 @@ def cache_hash hash.push(model.must_render_translation?(current_organization) ? 1 : 0) hash.push(model.authored_by?(current_user) ? 1 : 0) hash.push(model.reported_by?(current_user) ? 1 : 0) + hash.push(model.up_votes_count) + hash.push(model.down_votes_count) hash.push(model.cache_key_with_version) hash.push(model.author.cache_key_with_version) @hash = hash.join(Decidim.cache_key_separator) @@ -146,11 +148,11 @@ def comment_path end def up_votes_count - model.up_votes.count + model.up_votes_count end def down_votes_count - model.down_votes.count + model.down_votes_count end def root_depth diff --git a/decidim-comments/app/models/decidim/comments/comment_vote.rb b/decidim-comments/app/models/decidim/comments/comment_vote.rb index ae05469bddc21..48324716d2f47 100644 --- a/decidim-comments/app/models/decidim/comments/comment_vote.rb +++ b/decidim-comments/app/models/decidim/comments/comment_vote.rb @@ -14,12 +14,22 @@ class CommentVote < ApplicationRecord validates :weight, inclusion: { in: [-1, 1] } validate :author_and_comment_same_organization + after_create :update_comment_votes_count + after_destroy :update_comment_votes_count + def self.export_serializer Decidim::Comments::CommentVoteSerializer end private + def update_comment_votes_count + up_votes_count = self.class.where(decidim_comment_id: comment.id, weight: 1).count + down_votes_count = self.class.where(decidim_comment_id: comment.id, weight: -1).count + + comment.update(up_votes_count: up_votes_count, down_votes_count: down_votes_count) + end + # Private: check if the comment and the author have the same organization def author_and_comment_same_organization return unless author.present? && comment.present? diff --git a/decidim-comments/db/migrate/20240304092558_add_comment_vote_counter_cache_to_comments.rb b/decidim-comments/db/migrate/20240304092558_add_comment_vote_counter_cache_to_comments.rb new file mode 100644 index 0000000000000..8055094f543f1 --- /dev/null +++ b/decidim-comments/db/migrate/20240304092558_add_comment_vote_counter_cache_to_comments.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true + +class AddCommentVoteCounterCacheToComments < ActiveRecord::Migration[6.1] + def change + add_column :decidim_comments_comments, :up_votes_count, :integer, null: false, default: 0, index: true + add_column :decidim_comments_comments, :down_votes_count, :integer, null: false, default: 0, index: true + + # We cannot use the reset_counters as up_votes and down_votes are scoped associationws + reversible do |dir| + dir.up do + Decidim::Comments::Comment.reset_column_information + Decidim::Comments::Comment.find_each do |record| + # rubocop:disable Rails/SkipsModelValidations + record.class.update_counters(record.id, up_votes_count: record.up_votes.length) + record.class.update_counters(record.id, down_votes_count: record.down_votes.length) + # rubocop:enable Rails/SkipsModelValidations + end + end + end + end +end diff --git a/decidim-comments/spec/models/comment_spec.rb b/decidim-comments/spec/models/comment_spec.rb index a5bc0e7e14b5a..3b277e3e12b55 100644 --- a/decidim-comments/spec/models/comment_spec.rb +++ b/decidim-comments/spec/models/comment_spec.rb @@ -47,10 +47,12 @@ module Comments it "has a up_votes association returning comment votes with weight 1" do expect(comment.up_votes.count).to eq(1) + expect(comment.up_votes_count).to eq(1) end it "has a down_votes association returning comment votes with weight -1" do expect(comment.down_votes.count).to eq(1) + expect(comment.down_votes_count).to eq(1) end it "has an associated participatory_process" do diff --git a/decidim-comments/spec/models/comment_vote_spec.rb b/decidim-comments/spec/models/comment_vote_spec.rb index 9eaba3ddbdda5..868af66c56384 100644 --- a/decidim-comments/spec/models/comment_vote_spec.rb +++ b/decidim-comments/spec/models/comment_vote_spec.rb @@ -42,6 +42,10 @@ module Comments comment_vote = build(:comment_vote, comment: comment, author: author) expect(comment_vote).to be_invalid end + + it "updates the comment votes count after creation" do + expect(comment_vote.comment.up_votes_count).to eq(1) + end end end end From 869929012efc58794d173405343fd2865c8fc10d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20Pereira=20de=20Lucena?= Date: Mon, 29 Apr 2024 07:42:32 +0200 Subject: [PATCH 19/88] Fix DOM text reinterpreted as HTML in budgets' exit handler (#12769) --- decidim-budgets/app/packs/src/decidim/budgets/exit_handler.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/decidim-budgets/app/packs/src/decidim/budgets/exit_handler.js b/decidim-budgets/app/packs/src/decidim/budgets/exit_handler.js index b0c20aa2f434a..88e80e2ab5df5 100644 --- a/decidim-budgets/app/packs/src/decidim/budgets/exit_handler.js +++ b/decidim-budgets/app/packs/src/decidim/budgets/exit_handler.js @@ -65,7 +65,7 @@ $(() => { } $exitLink.attr("href", url); - $exitLink.html(exitLinkText); + $exitLink.text(exitLinkText); $exitNotification.foundation("open"); }; From ba758bc96554f964ee0ee648ded1a5d978fbed45 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20Pereira=20de=20Lucena?= Date: Mon, 29 Apr 2024 07:46:29 +0200 Subject: [PATCH 20/88] Fix potential unsafe external link in initiatives (#12780) --- .../views/decidim/initiatives/initiatives/_result.html.erb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/decidim-initiatives/app/views/decidim/initiatives/initiatives/_result.html.erb b/decidim-initiatives/app/views/decidim/initiatives/initiatives/_result.html.erb index 951da3be99d92..533ba3f1dc068 100644 --- a/decidim-initiatives/app/views/decidim/initiatives/initiatives/_result.html.erb +++ b/decidim-initiatives/app/views/decidim/initiatives/initiatives/_result.html.erb @@ -5,9 +5,9 @@
    <%= t("decidim.initiatives.initiatives.result.answer_title") %>:

    <% if initiative.answer_url.present? %> - + <%= link_to initiative.answer_url, target: "_blank", rel: "noopener noreferrer" do %> <%= decidim_sanitize_editor translated_attribute initiative.answer %> - + <% end %> <% else %> <%= decidim_sanitize_editor translated_attribute initiative.answer %> <% end %> From f0a2f4c555e8e09ee7f51b08e5f2f89a071fb1c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20Pereira=20de=20Lucena?= Date: Mon, 29 Apr 2024 07:47:32 +0200 Subject: [PATCH 21/88] Fix graphiql initial query escaping (#12779) --- decidim-api/lib/decidim/api/engine.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/decidim-api/lib/decidim/api/engine.rb b/decidim-api/lib/decidim/api/engine.rb index 3fd4711571a33..38727a30bf152 100644 --- a/decidim-api/lib/decidim/api/engine.rb +++ b/decidim-api/lib/decidim/api/engine.rb @@ -35,9 +35,9 @@ class Engine < ::Rails::Engine initializer "decidim-api.graphiql" do Decidim::GraphiQL::Rails.config.tap do |config| config.query_params = true - config.initial_query = File.read( - File.join(__dir__, "graphiql-initial-query.txt") - ).html_safe + config.initial_query = ERB::Util.html_escape( + File.read(File.join(__dir__, "graphiql-initial-query.txt")) + ) end end From c031cd8f8174d35d70f5d11db0bd7e46dfc5bd3a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20Pereira=20de=20Lucena?= Date: Mon, 29 Apr 2024 07:50:27 +0200 Subject: [PATCH 22/88] Fix clear-text storage of sensitive information in omniauth registration (#12773) --- .../app/commands/decidim/create_omniauth_registration.rb | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/decidim-core/app/commands/decidim/create_omniauth_registration.rb b/decidim-core/app/commands/decidim/create_omniauth_registration.rb index 60fedb6ce473f..fe09315474547 100644 --- a/decidim-core/app/commands/decidim/create_omniauth_registration.rb +++ b/decidim-core/app/commands/decidim/create_omniauth_registration.rb @@ -57,14 +57,12 @@ def create_or_find_user # to be marked confirmed. @user.skip_confirmation! if !@user.confirmed? && @user.email == verified_email else - generated_password = SecureRandom.hex - @user.email = (verified_email || form.email) @user.name = form.name @user.nickname = form.normalized_nickname @user.newsletter_notifications_at = nil - @user.password = generated_password - @user.password_confirmation = generated_password + @user.password = SecureRandom.hex + @user.password_confirmation = @user.password if form.avatar_url.present? url = URI.parse(form.avatar_url) filename = File.basename(url.path) From 63afc2465ba6baca9e9d6d69d5c25e14f959bf7e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20Pereira=20de=20Lucena?= Date: Mon, 29 Apr 2024 07:51:56 +0200 Subject: [PATCH 23/88] Remove ComponentInterface from the ResultType in the API (#12774) * Remove ComponentInterface from the ResultType in the API * Add the field for As this field was requested by the integration schema spec and it became unavailable after removing the from the . * Remove the field from the Co-authored-by: Antti Hukkanen --- decidim-accountability/lib/decidim/api/result_type.rb | 1 - .../spec/types/integration_schema_spec.rb | 7 ------- 2 files changed, 8 deletions(-) diff --git a/decidim-accountability/lib/decidim/api/result_type.rb b/decidim-accountability/lib/decidim/api/result_type.rb index 5e5fe5b8983f4..4ca5ed8043e9a 100644 --- a/decidim-accountability/lib/decidim/api/result_type.rb +++ b/decidim-accountability/lib/decidim/api/result_type.rb @@ -3,7 +3,6 @@ module Decidim module Accountability class ResultType < Decidim::Api::Types::BaseObject - implements Decidim::Core::ComponentInterface implements Decidim::Core::CategorizableInterface implements Decidim::Comments::CommentableInterface implements Decidim::Core::ScopableInterface diff --git a/decidim-accountability/spec/types/integration_schema_spec.rb b/decidim-accountability/spec/types/integration_schema_spec.rb index 67473f33697b5..4dff053b070b2 100644 --- a/decidim-accountability/spec/types/integration_schema_spec.rb +++ b/decidim-accountability/spec/types/integration_schema_spec.rb @@ -32,7 +32,6 @@ "hasComments" => result.comment_threads.size.positive?, "id" => result.id.to_s, "parent" => result.parent, - "participatorySpace" => { "id" => result.participatory_space.id.to_s }, "progress" => result.progress.to_f, "reference" => result.reference, "scope" => result.scope, @@ -123,9 +122,6 @@ parent { id } - participatorySpace { - id - } progress reference scope { @@ -232,9 +228,6 @@ parent { id } - participatorySpace { - id - } progress reference scope { From 791815469a1e0caa43feb1323eccd717716e0ede Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20Pereira=20de=20Lucena?= Date: Mon, 29 Apr 2024 07:53:16 +0200 Subject: [PATCH 24/88] Fix flaky spec on join user group command spec (#12776) --- decidim-core/spec/commands/decidim/join_user_group_spec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/decidim-core/spec/commands/decidim/join_user_group_spec.rb b/decidim-core/spec/commands/decidim/join_user_group_spec.rb index 8d892f1d59e89..a26d09f415194 100644 --- a/decidim-core/spec/commands/decidim/join_user_group_spec.rb +++ b/decidim-core/spec/commands/decidim/join_user_group_spec.rb @@ -55,7 +55,7 @@ module Comments event: "decidim.events.groups.join_request_created", event_class: JoinRequestCreatedEvent, resource: user_group, - affected_users: affected_users, + affected_users: match_array(affected_users), extra: { user_group_name: user_group.name, user_group_nickname: user_group.nickname From 5c07bc96f90ee6d0822056ba3d28197bbf8330b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20Pereira=20de=20Lucena?= Date: Mon, 29 Apr 2024 07:54:06 +0200 Subject: [PATCH 25/88] Fix flaky spec on endorsements controller (#12777) --- .../controllers/decidim/endorsements_controller_as_user_spec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/decidim-core/spec/controllers/decidim/endorsements_controller_as_user_spec.rb b/decidim-core/spec/controllers/decidim/endorsements_controller_as_user_spec.rb index 50cda4ea686b1..41a527cf32dd3 100644 --- a/decidim-core/spec/controllers/decidim/endorsements_controller_as_user_spec.rb +++ b/decidim-core/spec/controllers/decidim/endorsements_controller_as_user_spec.rb @@ -46,7 +46,7 @@ module Decidim get :identities, params: params expect(response).to have_http_status(:ok) - expect(assigns[:user_verified_groups]).to eq user.user_groups + expect(assigns[:user_verified_groups]).to match_array(user.user_groups) expect(subject).to render_template("decidim/endorsements/identities") end end From 9dfa9a57917fc2a96e981bc92941f7cc5b488439 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20Pereira=20de=20Lucena?= Date: Mon, 29 Apr 2024 07:55:25 +0200 Subject: [PATCH 26/88] Fix overly permissive regular expression range in "has reference" specs (#12770) --- .../lib/decidim/core/test/shared_examples/has_reference.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/decidim-core/lib/decidim/core/test/shared_examples/has_reference.rb b/decidim-core/lib/decidim/core/test/shared_examples/has_reference.rb index 0afce082bb052..1704ce766e4ff 100644 --- a/decidim-core/lib/decidim/core/test/shared_examples/has_reference.rb +++ b/decidim-core/lib/decidim/core/test/shared_examples/has_reference.rb @@ -8,7 +8,7 @@ context "when there is not a custom resource reference generator present" do it "generates a valid reference" do - expect(subject.reference).to match(/[A-z]+/) + expect(subject.reference).to match(/[a-zA-Z]+/) end end From c5cff9c96f0283f7cb06159cfc36f1c6b035ac45 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20Pereira=20de=20Lucena?= Date: Mon, 29 Apr 2024 07:57:31 +0200 Subject: [PATCH 27/88] Add counter cache for proposals' ValuationAssignments (#12771) Co-authored-by: Alexandru Emil Lupu --- .../app/models/decidim/proposals/proposal.rb | 16 ++-------------- .../decidim/proposals/valuation_assignment.rb | 3 ++- .../admin/proposals/_proposal-tr.html.erb | 2 +- ...ments_count_to_decidim_proposals_proposals.rb | 16 ++++++++++++++++ .../lib/decidim/proposals/valuatable.rb | 3 ++- 5 files changed, 23 insertions(+), 17 deletions(-) create mode 100644 decidim-proposals/db/migrate/20240404202756_add_valuation_assignments_count_to_decidim_proposals_proposals.rb diff --git a/decidim-proposals/app/models/decidim/proposals/proposal.rb b/decidim-proposals/app/models/decidim/proposals/proposal.rb index 2a376a7f3ac13..e548702577723 100644 --- a/decidim-proposals/app/models/decidim/proposals/proposal.rb +++ b/decidim-proposals/app/models/decidim/proposals/proposal.rb @@ -96,11 +96,11 @@ class Proposal < Proposals::ApplicationRecord } scope :sort_by_valuation_assignments_count_asc, lambda { - order(Arel.sql("#{sort_by_valuation_assignments_count_nulls_last_query} ASC NULLS FIRST").to_s) + order(valuation_assignments_count: :asc) } scope :sort_by_valuation_assignments_count_desc, lambda { - order(Arel.sql("#{sort_by_valuation_assignments_count_nulls_last_query} DESC NULLS LAST").to_s) + order(valuation_assignments_count: :desc) } scope_search_multi :with_any_state, [:accepted, :rejected, :evaluating, :state_not_published] @@ -333,18 +333,6 @@ def self.ransack(params = {}, options = {}) ProposalSearch.new(self, params, options) end - # Defines the base query so that ransack can actually sort by this value - def self.sort_by_valuation_assignments_count_nulls_last_query - <<-SQL.squish - ( - SELECT COUNT(decidim_proposals_valuation_assignments.id) - FROM decidim_proposals_valuation_assignments - WHERE decidim_proposals_valuation_assignments.decidim_proposal_id = decidim_proposals_proposals.id - GROUP BY decidim_proposals_valuation_assignments.decidim_proposal_id - ) - SQL - end - # method to filter by assigned valuator role ID def self.valuator_role_ids_has(value) query = <<-SQL.squish diff --git a/decidim-proposals/app/models/decidim/proposals/valuation_assignment.rb b/decidim-proposals/app/models/decidim/proposals/valuation_assignment.rb index dcf9ccda990af..ac7cf5f37a3ad 100644 --- a/decidim-proposals/app/models/decidim/proposals/valuation_assignment.rb +++ b/decidim-proposals/app/models/decidim/proposals/valuation_assignment.rb @@ -9,7 +9,8 @@ class ValuationAssignment < ApplicationRecord include Decidim::Traceable include Decidim::Loggable - belongs_to :proposal, foreign_key: "decidim_proposal_id", class_name: "Decidim::Proposals::Proposal" + belongs_to :proposal, foreign_key: "decidim_proposal_id", class_name: "Decidim::Proposals::Proposal", + counter_cache: true belongs_to :valuator_role, polymorphic: true def self.log_presenter_class_for(_log) diff --git a/decidim-proposals/app/views/decidim/proposals/admin/proposals/_proposal-tr.html.erb b/decidim-proposals/app/views/decidim/proposals/admin/proposals/_proposal-tr.html.erb index bd153f2faf79a..cbaafe51fa3de 100644 --- a/decidim-proposals/app/views/decidim/proposals/admin/proposals/_proposal-tr.html.erb +++ b/decidim-proposals/app/views/decidim/proposals/admin/proposals/_proposal-tr.html.erb @@ -53,7 +53,7 @@ - <%= proposal.valuation_assignments.count %> + <%= proposal.valuation_assignments.size %> diff --git a/decidim-proposals/db/migrate/20240404202756_add_valuation_assignments_count_to_decidim_proposals_proposals.rb b/decidim-proposals/db/migrate/20240404202756_add_valuation_assignments_count_to_decidim_proposals_proposals.rb new file mode 100644 index 0000000000000..89c51425156da --- /dev/null +++ b/decidim-proposals/db/migrate/20240404202756_add_valuation_assignments_count_to_decidim_proposals_proposals.rb @@ -0,0 +1,16 @@ +# frozen_string_literal: true + +class AddValuationAssignmentsCountToDecidimProposalsProposals < ActiveRecord::Migration[6.1] + def change + add_column :decidim_proposals_proposals, :valuation_assignments_count, :integer, default: 0 + + reversible do |dir| + dir.up do + Decidim::Proposals::Proposal.reset_column_information + Decidim::Proposals::Proposal.find_each do |record| + Decidim::Proposals::Proposal.reset_counters(record.id, :valuation_assignments) + end + end + end + end +end diff --git a/decidim-proposals/lib/decidim/proposals/valuatable.rb b/decidim-proposals/lib/decidim/proposals/valuatable.rb index 7471e3af2bf64..d1143621e4de4 100644 --- a/decidim-proposals/lib/decidim/proposals/valuatable.rb +++ b/decidim-proposals/lib/decidim/proposals/valuatable.rb @@ -8,7 +8,8 @@ module Valuatable include Decidim::Comments::Commentable included do - has_many :valuation_assignments, foreign_key: "decidim_proposal_id", dependent: :destroy + has_many :valuation_assignments, foreign_key: "decidim_proposal_id", dependent: :destroy, + counter_cache: :valuation_assignments_count, class_name: "Decidim::Proposals::ValuationAssignment" def valuators valuator_role_ids = valuation_assignments.where(proposal: self).pluck(:valuator_role_id) From 48719df07386bf345ddba2b5b2f79d72c20c2089 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20Pereira=20de=20Lucena?= Date: Mon, 29 Apr 2024 07:59:50 +0200 Subject: [PATCH 28/88] Fix API paths when deploying decidim in folder (#12775) * Fix API paths when deploying decidim in folder * Fix specs * Add admin api path * Fix editor error * Apply suggestions from code review * Fix code review issues --------- Co-authored-by: Alexandru Emil Lupu --- .../app/views/layouts/decidim/admin/_js_configuration.html.erb | 1 + decidim-core/app/packs/src/decidim/input_hashtags.js | 2 +- decidim-core/app/packs/src/decidim/input_mentions.js | 2 +- decidim-core/app/packs/src/decidim/input_multiple_mentions.js | 2 +- decidim-core/app/packs/src/decidim/vizzs/index.js | 2 +- .../app/views/layouts/decidim/_js_configuration.html.erb | 1 + 6 files changed, 6 insertions(+), 4 deletions(-) diff --git a/decidim-admin/app/views/layouts/decidim/admin/_js_configuration.html.erb b/decidim-admin/app/views/layouts/decidim/admin/_js_configuration.html.erb index 96892c18cbcd3..b28a3ab69612d 100644 --- a/decidim-admin/app/views/layouts/decidim/admin/_js_configuration.html.erb +++ b/decidim-admin/app/views/layouts/decidim/admin/_js_configuration.html.erb @@ -1,5 +1,6 @@ <% js_configs = { + api_path: decidim_api.root_path(locale: nil), icons_path: Decidim.cors_enabled ? "" : asset_pack_path("media/images/icons.svg"), messages: { "selfxssWarning": { diff --git a/decidim-core/app/packs/src/decidim/input_hashtags.js b/decidim-core/app/packs/src/decidim/input_hashtags.js index 5397f650798bf..e457c84bb41f3 100644 --- a/decidim-core/app/packs/src/decidim/input_hashtags.js +++ b/decidim-core/app/packs/src/decidim/input_hashtags.js @@ -26,7 +26,7 @@ $(() => { /* eslint no-use-before-define: ["error", { "variables": false }]*/ let remoteSearch = function(text, cb) { - $.post("/api", {query: `{hashtags(name:"${text}") {name}}`}). + $.post(window.Decidim.config.get("api_path"), {query: `{hashtags(name:"${text}") {name}}`}). then((response) => { let data = response.data.hashtags || {}; diff --git a/decidim-core/app/packs/src/decidim/input_mentions.js b/decidim-core/app/packs/src/decidim/input_mentions.js index a02c949747aea..a377399996354 100644 --- a/decidim-core/app/packs/src/decidim/input_mentions.js +++ b/decidim-core/app/packs/src/decidim/input_mentions.js @@ -42,7 +42,7 @@ $(() => { /* eslint no-use-before-define: ["error", { "variables": false }]*/ let remoteSearch = function(text, cb) { let query = `{users(filter:{wildcard:"${text}"}){nickname,name,avatarUrl,__typename,...on UserGroup{membersCount}}}`; - $.post("/api", {query: query}). + $.post(window.Decidim.config.get("api_path"), {query: query}). then((response) => { let data = response.data.users || {}; cb(data) diff --git a/decidim-core/app/packs/src/decidim/input_multiple_mentions.js b/decidim-core/app/packs/src/decidim/input_multiple_mentions.js index defa47391e76f..3e92e2c0d473a 100644 --- a/decidim-core/app/packs/src/decidim/input_multiple_mentions.js +++ b/decidim-core/app/packs/src/decidim/input_multiple_mentions.js @@ -42,7 +42,7 @@ $(() => { const autoComplete = new AutoComplete($searchInput[0], { dataMatchKeys: ["name", "nickname"], dataSource: (query, callback) => { - $.post("/api", { + $.post(window.Decidim.config.get("api_path"), { "query": ` { users(filter:{wildcard:"${query}",excludeIds:[]}) diff --git a/decidim-core/app/packs/src/decidim/vizzs/index.js b/decidim-core/app/packs/src/decidim/vizzs/index.js index 0f1c570d422ae..d00e11065b723 100644 --- a/decidim-core/app/packs/src/decidim/vizzs/index.js +++ b/decidim-core/app/packs/src/decidim/vizzs/index.js @@ -19,7 +19,7 @@ $(() => { metricsParams.spaceId = $("#metrics #metrics-space_id").val() || null; } - const fetch = (metrics) => $.post("/api", query(metrics)); + const fetch = (metrics) => $.post(window.Decidim.config.get("api_path"), query(metrics)); const downloadMetricData = (event) => { event.preventDefault(); diff --git a/decidim-core/app/views/layouts/decidim/_js_configuration.html.erb b/decidim-core/app/views/layouts/decidim/_js_configuration.html.erb index b0b382a09c9f6..8525e9c48dbbf 100644 --- a/decidim-core/app/views/layouts/decidim/_js_configuration.html.erb +++ b/decidim-core/app/views/layouts/decidim/_js_configuration.html.erb @@ -1,5 +1,6 @@ <% js_configs = { + api_path: decidim_api.root_path(locale: nil), icons_path: Decidim.cors_enabled ? "" : asset_pack_path("media/images/icons.svg"), messages: { "selfxssWarning": { From 64e298e7ed822ff4d63d06a3bc1d5fe6ae64b1ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20Pereira=20de=20Lucena?= Date: Mon, 29 Apr 2024 08:48:30 +0200 Subject: [PATCH 29/88] Improve testing on address cell (#12788) Co-authored-by: Alexandru Emil Lupu --- decidim-core/spec/cells/decidim/address_cell_spec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/decidim-core/spec/cells/decidim/address_cell_spec.rb b/decidim-core/spec/cells/decidim/address_cell_spec.rb index 48b5215b62cd8..1c7be4ec8f332 100644 --- a/decidim-core/spec/cells/decidim/address_cell_spec.rb +++ b/decidim-core/spec/cells/decidim/address_cell_spec.rb @@ -28,7 +28,7 @@ expect(icondata_address).to have_content(address_text) expect(icondata_address).to have_content(hint_text) expect(icondata_address).to have_content(location_text) - expect(icondata_address.to_s).not_to match("} + + expect(page).to have_content("22 RESULTS FOR THE SEARCH") + end + end end From d04d6e5bd37062b7a9ae7a7adbc0cb2e9375022a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20Pereira=20de=20Lucena?= Date: Tue, 30 Apr 2024 10:52:33 +0200 Subject: [PATCH 46/88] Backport 'Prevent multiple requests from creating multiple orders at budgets' to v0.27 (#12804) * Prevent multiple requests from creating multiple orders for the same user at budgets * Prevent multiple requests from creating multiple orders * Cleanup * Fix ruby syntax for this version * Fix rubocop offense --------- Co-authored-by: Antti Hukkanen --- .../decidim/budgets/line_items_controller.rb | 24 ++++--- .../spec/requests/line_items_spec.rb | 70 +++++++++++++++++++ .../dev/test/rspec_support/concurrency.rb | 23 ++++++ 3 files changed, 108 insertions(+), 9 deletions(-) create mode 100644 decidim-budgets/spec/requests/line_items_spec.rb create mode 100644 decidim-dev/lib/decidim/dev/test/rspec_support/concurrency.rb diff --git a/decidim-budgets/app/controllers/decidim/budgets/line_items_controller.rb b/decidim-budgets/app/controllers/decidim/budgets/line_items_controller.rb index d4c6fac6cdd9c..87c707dd32c2c 100644 --- a/decidim-budgets/app/controllers/decidim/budgets/line_items_controller.rb +++ b/decidim-budgets/app/controllers/decidim/budgets/line_items_controller.rb @@ -12,15 +12,21 @@ def create enforce_permission_to :vote, :project, project: project, budget: budget, workflow: current_workflow respond_to do |format| - AddLineItem.call(persisted_current_order, project, current_user) do - on(:ok) do |order| - self.current_order = order - format.html { redirect_back(fallback_location: budget_path(budget)) } - format.js { render "update_budget" } - end - - on(:invalid) do - format.js { render "update_budget", status: :unprocessable_entity } + # Note that the user-specific lock here is important in order to + # prevent multiple simultaneous processes on different machines from + # creating multiple orders for the same user in case the button is + # pressed multiple times. + current_user.with_lock do + AddLineItem.call(persisted_current_order, project, current_user) do + on(:ok) do |order| + self.current_order = order + format.html { redirect_back(fallback_location: budget_path(budget)) } + format.js { render "update_budget" } + end + + on(:invalid) do + format.js { render "update_budget", status: :unprocessable_entity } + end end end end diff --git a/decidim-budgets/spec/requests/line_items_spec.rb b/decidim-budgets/spec/requests/line_items_spec.rb new file mode 100644 index 0000000000000..dfdcb7d398fe3 --- /dev/null +++ b/decidim-budgets/spec/requests/line_items_spec.rb @@ -0,0 +1,70 @@ +# frozen_string_literal: true + +require "spec_helper" + +RSpec.describe "Project search", type: :request do + include Decidim::ComponentPathHelper + + let(:user) { create(:user, :confirmed) } + let(:participatory_space) { create :participatory_process, :with_steps, organization: user.organization } + let(:component) { create(:budgets_component, participatory_space: participatory_space, settings: settings) } + let(:settings) { { vote_threshold_percent: 50 } } + let(:budget) { create(:budget, component: component, total_budget: 100_000) } + let(:project) { create(:project, budget: budget, budget_amount: 60_000) } + + let(:headers) { { "HOST" => participatory_space.organization.host } } + + before do + login_as user, scope: :user + end + + describe "POST create" do + let(:request_path) { Decidim::EngineRouter.main_proxy(component).budget_order_line_item_path(budget) } + + it "creates the order" do + expect do + post(request_path, xhr: true, params: { project_id: project.id }, headers: headers) + end.to change(Decidim::Budgets::Order, :count).by(1) + + expect(response).to have_http_status(:ok) + end + + context "when trying to add the same project twice" do + it "adds it only once" do + post(request_path, xhr: true, params: { project_id: project.id }, headers: headers) + expect(response).to have_http_status(:ok) + + post(request_path, xhr: true, params: { project_id: project.id }, headers: headers) + expect(response).to have_http_status(:unprocessable_entity) + + expect(Decidim::Budgets::Order.count).to eq(1) + expect(Decidim::Budgets::LineItem.count).to eq(1) + end + end + + context "with concurrent requests" do + include_context "with concurrency" + + before do + # Persist the session cookie before the concurrent requests. + get(Decidim::Core::Engine.routes.url_helpers.root_path, headers: headers) + end + + it "only creates a single order" do + expect do + threads = 10.times.map do + Thread.new do + sleep(rand(0.05..0.5)) + + post(request_path, xhr: true, params: { project_id: project.id }, headers: headers) + end + end + # Wait for each thread to finish + threads.each(&:join) + end.not_to raise_error + + expect(Decidim::Budgets::Order.count).to eq(1) + end + end + end +end diff --git a/decidim-dev/lib/decidim/dev/test/rspec_support/concurrency.rb b/decidim-dev/lib/decidim/dev/test/rspec_support/concurrency.rb new file mode 100644 index 0000000000000..a6c385a0749de --- /dev/null +++ b/decidim-dev/lib/decidim/dev/test/rspec_support/concurrency.rb @@ -0,0 +1,23 @@ +# frozen_string_literal: true + +# Note that RSpec also provides `uses_transaction` but it needs to be specific +# with the name of the method which can easily break and the concurrency tests +# will anyways pass when run with the transactional mode. We want the same +# database to be used without transactions during the tests so that we can test +# concurrency correctly. +RSpec.shared_context "with concurrency" do + self.use_transactional_tests = false + + after do + # Because the transactional tests are disabled, we need to manually clear + # the tables after the test. + connection = ActiveRecord::Base.connection + connection.disable_referential_integrity do + connection.tables.each do |table_name| + next if connection.select_value("SELECT COUNT(*) FROM #{table_name}").zero? + + connection.execute("TRUNCATE #{table_name} CASCADE") + end + end + end +end From 1e42de23d22953f8863402e4ff8e1c5a41cd208b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20Pereira=20de=20Lucena?= Date: Tue, 30 Apr 2024 10:53:38 +0200 Subject: [PATCH 47/88] Backport 'Attempt to fix flaky spec on proposals' ammends' to v0.27 (#12796) * Attempt to fix flaky spec on proposals' ammends * Fix specs --------- Co-authored-by: Alexandru Emil Lupu --- .../spec/system/amendable/amend_proposal_spec.rb | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/decidim-proposals/spec/system/amendable/amend_proposal_spec.rb b/decidim-proposals/spec/system/amendable/amend_proposal_spec.rb index 7d46d2ac3f48f..9fe0637c5cf4f 100644 --- a/decidim-proposals/spec/system/amendable/amend_proposal_spec.rb +++ b/decidim-proposals/spec/system/amendable/amend_proposal_spec.rb @@ -245,6 +245,10 @@ context "when the form is filled correctly" do before do + login_as user, scope: :user + visit proposal_path + expect(page).to have_content(proposal_title) + click_link "Amend Proposal" within ".new_amendment" do fill_in "amendment[emendation_params][title]", with: "More sidewalks and less roads" fill_in "amendment[emendation_params][body]", with: "Cities need more people, not more cars" @@ -260,6 +264,10 @@ context "when the form is filled incorrectly" do before do + login_as user, scope: :user + visit proposal_path + expect(page).to have_content(proposal_title) + click_link "Amend Proposal" within ".new_amendment" do fill_in "amendment[emendation_params][title]", with: "INVALID TITLE" end From 453b96888e9dfb335e1c8341e72e1c403aa7a56d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20Pereira=20de=20Lucena?= Date: Tue, 30 Apr 2024 11:20:49 +0200 Subject: [PATCH 48/88] Backport 'Update Leaflet and related NPM packages' to v0.27 (#12794) * Update Leaflet and related NPM packages * Update leaflet and related NPM packages * Update package-lock.json * Fix spelling issue in the Leaflet CSS * Updates integrity for leaflet NPM packages * Fix stylelint offenses --------- Co-authored-by: Antti Hukkanen --- .../stylesheets/decidim/plugins/leaflet.scss | 232 +++++++++--------- decidim_app-design/package-lock.json | 44 ++-- decidim_app-design/packages/core/package.json | 6 +- package-lock.json | 44 ++-- packages/core/package.json | 6 +- 5 files changed, 174 insertions(+), 158 deletions(-) diff --git a/decidim-core/app/packs/stylesheets/decidim/plugins/leaflet.scss b/decidim-core/app/packs/stylesheets/decidim/plugins/leaflet.scss index 06f8a3a8a78e4..ead8b05b53137 100644 --- a/decidim-core/app/packs/stylesheets/decidim/plugins/leaflet.scss +++ b/decidim-core/app/packs/stylesheets/decidim/plugins/leaflet.scss @@ -22,8 +22,6 @@ .leaflet-tile, .leaflet-marker-icon, .leaflet-marker-shadow{ - -webkit-user-select: none; - -moz-user-select: none; user-select: none; -webkit-user-drag: none; } @@ -45,34 +43,53 @@ display: block; } -/* .leaflet-container svg: reset svg max-width decleration shipped in Joomla! (joomla.org) 3.x */ +/* .leaflet-container svg: reset svg max-width declaration shipped in Joomla! (joomla.org) 3.x */ /* .leaflet-container img: map is broken in FF if you have max-width: 100% on tiles */ -.leaflet-container .leaflet-overlay-pane svg, +.leaflet-container .leaflet-overlay-pane svg{ + max-width: none !important; + max-height: none !important; +} + .leaflet-container .leaflet-marker-pane img, .leaflet-container .leaflet-shadow-pane img, .leaflet-container .leaflet-tile-pane img, -.leaflet-container img.leaflet-image-layer{ +.leaflet-container img.leaflet-image-layer, +.leaflet-container .leaflet-tile{ max-width: none !important; + max-height: none !important; + width: auto; + padding: 0; +} + +.leaflet-container img.leaflet-tile{ + /* See: https://bugs.chromium.org/p/chromium/issues/detail?id=600120 */ + mix-blend-mode: plus-lighter; } .leaflet-container.leaflet-touch-zoom{ - -ms-touch-action: pan-x pan-y; touch-action: pan-x pan-y; } .leaflet-container.leaflet-touch-drag{ - -ms-touch-action: pinch-zoom; + /* Fallback for FF which does not support pinch-zoom */ + touch-action: none; touch-action: pinch-zoom; } .leaflet-container.leaflet-touch-drag.leaflet-touch-zoom{ - -ms-touch-action: none; touch-action: none; } +.leaflet-container{ + -webkit-tap-highlight-color: transparent; +} + +.leaflet-container a{ + -webkit-tap-highlight-color: rgba(51, 181, 229, .4); +} + .leaflet-tile{ - filter: inherit; visibility: hidden; } @@ -83,7 +100,6 @@ .leaflet-zoom-box{ width: 0; height: 0; - -moz-box-sizing: border-box; box-sizing: border-box; z-index: 800; } @@ -94,27 +110,40 @@ user-select: none; } -.leaflet-pane{ z-index: 400; } +.leaflet-pane{ + z-index: 400; +} -.leaflet-tile-pane{ z-index: 200; } -.leaflet-overlay-pane{ z-index: 400; } -.leaflet-shadow-pane{ z-index: 500; } -.leaflet-marker-pane{ z-index: 600; } -.leaflet-tooltip-pane{ z-index: 650; } -.leaflet-popup-pane{ z-index: 700; } +.leaflet-tile-pane{ + z-index: 200; +} -.leaflet-map-pane canvas{ z-index: 100; } -.leaflet-map-pane svg{ z-index: 200; } +.leaflet-overlay-pane{ + z-index: 400; +} -.leaflet-vml-shape{ - width: 1px; - height: 1px; +.leaflet-shadow-pane{ + z-index: 500; } -.lvml{ - behavior: url(#default#VML); - display: inline-block; - position: absolute; +.leaflet-marker-pane{ + z-index: 600; +} + +.leaflet-tooltip-pane{ + z-index: 650; +} + +.leaflet-popup-pane{ + z-index: 700; +} + +.leaflet-map-pane canvas{ + z-index: 100; +} + +.leaflet-map-pane svg{ + z-index: 200; } /* control positioning */ @@ -122,7 +151,6 @@ .leaflet-control{ position: relative; z-index: 800; - pointer-events: visiblePainted; /* IE 9-10 doesn't have auto */ pointer-events: auto; } @@ -176,15 +204,8 @@ /* zoom and fade animations */ -.leaflet-fade-anim .leaflet-tile{ - will-change: opacity; -} - .leaflet-fade-anim .leaflet-popup{ opacity: 0; - -webkit-transition: opacity .2s linear; - -moz-transition: opacity .2s linear; - -o-transition: opacity .2s linear; transition: opacity .2s linear; } @@ -193,8 +214,6 @@ } .leaflet-zoom-animated{ - -webkit-transform-origin: 0 0; - -ms-transform-origin: 0 0; transform-origin: 0 0; } @@ -203,17 +222,11 @@ } .leaflet-zoom-anim .leaflet-zoom-animated{ - -webkit-transition: -webkit-transform .25s cubic-bezier(0, 0, .25, 1); - -moz-transition: -moz-transform .25s cubic-bezier(0, 0, .25, 1); - -o-transition: -o-transform .25s cubic-bezier(0, 0, .25, 1); transition: transform .25s cubic-bezier(0, 0, .25, 1); } .leaflet-zoom-anim .leaflet-tile, .leaflet-pan-anim .leaflet-tile{ - -webkit-transition: none; - -moz-transition: none; - -o-transition: none; transition: none; } @@ -228,8 +241,7 @@ } .leaflet-grab{ - cursor: -webkit-grab; - cursor: -moz-grab; + cursor: grab; } .leaflet-crosshair, @@ -245,9 +257,7 @@ .leaflet-dragging .leaflet-grab, .leaflet-dragging .leaflet-grab .leaflet-interactive, .leaflet-dragging .leaflet-marker-draggable{ - cursor: move; - cursor: -webkit-grabbing; - cursor: -moz-grabbing; + cursor: grabbing; } /* marker & overlays interactivity */ @@ -262,7 +272,6 @@ .leaflet-marker-icon.leaflet-interactive, .leaflet-image-layer.leaflet-interactive, .leaflet-pane > svg path.leaflet-interactive{ - pointer-events: visiblePainted; /* IE 9-10 doesn't have auto */ pointer-events: auto; } @@ -277,10 +286,6 @@ color: #0078a8; } -.leaflet-container a.leaflet-active{ - outline: 2px solid orange; -} - .leaflet-zoom-box{ border: 2px dotted #38f; background: rgba(255, 255, 255, .5); @@ -288,7 +293,10 @@ /* general typography */ .leaflet-container{ - font: 12px/1.5 "Helvetica Neue", Arial, Helvetica, sans-serif; + font-family: "Helvetica Neue", Arial, Helvetica, sans-serif; + font-size: 12px; + font-size: .75rem; + line-height: 1.5; } /* general toolbar styles */ @@ -318,7 +326,8 @@ display: block; } -.leaflet-bar a:hover{ +.leaflet-bar a:hover, +.leaflet-bar a:focus{ background-color: #f4f4f4; } @@ -345,24 +354,27 @@ line-height: 30px; } +.leaflet-touch .leaflet-bar a:first-child{ + border-top-left-radius: 2px; + border-top-right-radius: 2px; +} + +.leaflet-touch .leaflet-bar a:last-child{ + border-bottom-left-radius: 2px; + border-bottom-right-radius: 2px; +} + /* zoom control */ .leaflet-control-zoom-in, .leaflet-control-zoom-out{ - font: bold 18px 'Lucida Console', Monaco, monospace; + font: bold 18px "Lucida Console", Monaco, monospace; text-indent: 1px; } -.leaflet-control-zoom-out{ - font-size: 20px; -} - -.leaflet-touch .leaflet-control-zoom-in{ - font-size: 22px; -} - +.leaflet-touch .leaflet-control-zoom-in, .leaflet-touch .leaflet-control-zoom-out{ - font-size: 24px; + font-size: 22px; } /* layers control */ @@ -399,6 +411,12 @@ position: relative; } +.leaflet-control-layers-list{ + border: 0; + margin: 0; + padding: 0; +} + .leaflet-control-layers-expanded{ padding: 6px 10px 6px 6px; color: #333; @@ -406,7 +424,7 @@ } .leaflet-control-layers-scrollbar{ - overflow-y: scroll; + overflow: hidden scroll; padding-right: 5px; } @@ -418,6 +436,8 @@ .leaflet-control-layers label{ display: block; + font-size: 13px; + font-size: 1.08333em; } .leaflet-control-layers-separator{ @@ -443,19 +463,24 @@ .leaflet-control-scale-line{ padding: 0 5px; color: #333; + line-height: 1.4; } .leaflet-control-attribution a{ text-decoration: none; } -.leaflet-control-attribution a:hover{ +.leaflet-control-attribution a:hover, +.leaflet-control-attribution a:focus{ text-decoration: underline; } -.leaflet-container .leaflet-control-attribution, -.leaflet-container .leaflet-control-scale{ - font-size: 11px; +.leaflet-attribution-flag{ + display: inline !important; + vertical-align: baseline !important; + width: 1em; + height: .6669em; + margin-right: .277em; } .leaflet-left .leaflet-control-scale{ @@ -471,13 +496,10 @@ border-top: none; line-height: 1.1; padding: 2px 5px 1px; - font-size: 11px; white-space: nowrap; - overflow: hidden; - -moz-box-sizing: border-box; box-sizing: border-box; - background: #fff; background: rgba(255, 255, 255, .5); + text-shadow: 1px 1px #fff; } .leaflet-control-scale-line:not(:first-child){ @@ -517,8 +539,11 @@ } .leaflet-popup-content{ - margin: 13px 19px; - line-height: 1.4; + margin: 13px 24px 13px 20px; + line-height: 1.3; + font-size: 13px; + font-size: 1.08333em; + min-height: 1px; } .leaflet-popup-content p{ @@ -530,6 +555,7 @@ height: 20px; position: absolute; left: 50%; + margin-top: -1px; margin-left: -20px; overflow: hidden; pointer-events: none; @@ -540,10 +566,7 @@ height: 17px; padding: 1px; margin: -10px auto 0; - -webkit-transform: rotate(45deg); - -moz-transform: rotate(45deg); - -ms-transform: rotate(45deg); - -o-transform: rotate(45deg); + pointer-events: auto; transform: rotate(45deg); } @@ -558,48 +581,23 @@ position: absolute; top: 0; right: 0; - padding: 4px 4px 0 0; border: none; text-align: center; - width: 18px; - height: 14px; + width: 24px; + height: 24px; font: 16px/14px Tahoma, Verdana, sans-serif; - color: #c3c3c3; + color: #757575; text-decoration: none; - font-weight: bold; background: transparent; } -.leaflet-container a.leaflet-popup-close-button:hover{ - color: #999; +.leaflet-container a.leaflet-popup-close-button:hover, +.leaflet-container a.leaflet-popup-close-button:focus{ + color: #585858; } .leaflet-popup-scrolled{ overflow: auto; - border-bottom: 1px solid #ddd; - border-top: 1px solid #ddd; -} - -.leaflet-oldie .leaflet-popup-content-wrapper{ - zoom: 1; -} - -.leaflet-oldie .leaflet-popup-tip{ - width: 24px; - margin: 0 auto; - -ms-filter: "progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678)"; - filter: progid:dximagetransform.microsoft.matrix(M11=.70710678, M12=.70710678, M21=-.70710678, M22=.70710678); -} - -.leaflet-oldie .leaflet-popup-tip-container{ - margin-top: -1px; -} - -.leaflet-oldie .leaflet-control-zoom, -.leaflet-oldie .leaflet-control-layers, -.leaflet-oldie .leaflet-popup-content-wrapper, -.leaflet-oldie .leaflet-popup-tip{ - border: 1px solid #999; } /* div icon */ @@ -620,15 +618,12 @@ border-radius: 3px; color: #222; white-space: nowrap; - -webkit-user-select: none; - -moz-user-select: none; - -ms-user-select: none; user-select: none; pointer-events: none; box-shadow: 0 1px 3px rgba(0, 0, 0, .4); } -.leaflet-tooltip.leaflet-clickable{ +.leaflet-tooltip.leaflet-interactive{ cursor: pointer; pointer-events: auto; } @@ -698,3 +693,12 @@ margin-left: -12px; border-right-color: #fff; } + +/* Printing */ + +@media print{ + /* Prevent printers from removing background-images of controls. */ + .leaflet-control{ + -webkit-print-color-adjust: exact; + } +} diff --git a/decidim_app-design/package-lock.json b/decidim_app-design/package-lock.json index 258ffc6db0061..4188fa4497507 100644 --- a/decidim_app-design/package-lock.json +++ b/decidim_app-design/package-lock.json @@ -11073,18 +11073,21 @@ } }, "node_modules/leaflet": { - "version": "1.3.1", - "integrity": "sha512-adQOIzh+bfdridLM1xIgJ9VnJbAUY3wqs/ueF+ITla+PLQ1z47USdBKUf+iD9FuUA8RtlT6j6hZBfZoA6mW+XQ==" + "version": "1.9.4", + "resolved": "https://registry.npmjs.org/leaflet/-/leaflet-1.9.4.tgz", + "integrity": "sha512-nxS1ynzJOmOlHp+iL3FyWqK89GtNL8U8rvlMOsQdTTssxZwCXh8N2NB3GDQOL+YR3XnWyZAxwQixURb+FA74PA==" }, "node_modules/leaflet-tilelayer-here": { - "version": "1.0.2", - "integrity": "sha512-PQytY0goCZLANGabPCPQJDhCrXrwdVP6F5NEgw/zjunrfFhQ1XwnBUNCWi0irUWQsETNntcwfkomikhlQ7uCRQ==" + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/leaflet-tilelayer-here/-/leaflet-tilelayer-here-2.0.1.tgz", + "integrity": "sha512-lujfnFt7TuEk3bHGsWt/w01XBfrU9zy7B6C8fzJDr8txhNmVNA00kRRrEJPaLaFyVeSwwA5vWS6zDg2W13DCIA==" }, "node_modules/leaflet.markercluster": { - "version": "1.4.1", - "integrity": "sha512-ZSEpE/EFApR0bJ1w/dUGwTSUvWlpalKqIzkaYdYB7jaftQA/Y2Jav+eT4CMtEYFj+ZK4mswP13Q2acnPBnhGOw==", + "version": "1.5.3", + "resolved": "https://registry.npmjs.org/leaflet.markercluster/-/leaflet.markercluster-1.5.3.tgz", + "integrity": "sha512-vPTw/Bndq7eQHjLBVlWpnGeLa3t+3zGiuM7fJwCkiMFq+nmRuG3RI3f7f4N4TDX7T4NpbAXpR2+NTRSEGfCSeA==", "peerDependencies": { - "leaflet": "~1.3.1" + "leaflet": "^1.3.1" } }, "node_modules/leven": { @@ -17433,9 +17436,9 @@ "jquery": "^3.2.1", "jquery-serializejson": "2.9.0", "js-cookie": "^3.0.1", - "leaflet": "1.3.1", - "leaflet-tilelayer-here": "1.0.2", - "leaflet.markercluster": "1.4.1", + "leaflet": "^1.9.4", + "leaflet-tilelayer-here": "^2.0.1", + "leaflet.markercluster": "^1.5.3", "morphdom": "2.6.1", "prop-types": "^15.7.2", "quill": "1.3.7", @@ -20067,9 +20070,9 @@ "jquery": "^3.2.1", "jquery-serializejson": "2.9.0", "js-cookie": "^3.0.1", - "leaflet": "1.3.1", - "leaflet-tilelayer-here": "1.0.2", - "leaflet.markercluster": "1.4.1", + "leaflet": "^1.9.4", + "leaflet-tilelayer-here": "^2.0.1", + "leaflet.markercluster": "^1.5.3", "morphdom": "2.6.1", "prop-types": "^15.7.2", "quill": "1.3.7", @@ -28016,16 +28019,19 @@ } }, "leaflet": { - "version": "1.3.1", - "integrity": "sha512-adQOIzh+bfdridLM1xIgJ9VnJbAUY3wqs/ueF+ITla+PLQ1z47USdBKUf+iD9FuUA8RtlT6j6hZBfZoA6mW+XQ==" + "version": "1.9.4", + "resolved": "https://registry.npmjs.org/leaflet/-/leaflet-1.9.4.tgz", + "integrity": "sha512-nxS1ynzJOmOlHp+iL3FyWqK89GtNL8U8rvlMOsQdTTssxZwCXh8N2NB3GDQOL+YR3XnWyZAxwQixURb+FA74PA==" }, "leaflet-tilelayer-here": { - "version": "1.0.2", - "integrity": "sha512-PQytY0goCZLANGabPCPQJDhCrXrwdVP6F5NEgw/zjunrfFhQ1XwnBUNCWi0irUWQsETNntcwfkomikhlQ7uCRQ==" + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/leaflet-tilelayer-here/-/leaflet-tilelayer-here-2.0.1.tgz", + "integrity": "sha512-lujfnFt7TuEk3bHGsWt/w01XBfrU9zy7B6C8fzJDr8txhNmVNA00kRRrEJPaLaFyVeSwwA5vWS6zDg2W13DCIA==" }, "leaflet.markercluster": { - "version": "1.4.1", - "integrity": "sha512-ZSEpE/EFApR0bJ1w/dUGwTSUvWlpalKqIzkaYdYB7jaftQA/Y2Jav+eT4CMtEYFj+ZK4mswP13Q2acnPBnhGOw==", + "version": "1.5.3", + "resolved": "https://registry.npmjs.org/leaflet.markercluster/-/leaflet.markercluster-1.5.3.tgz", + "integrity": "sha512-vPTw/Bndq7eQHjLBVlWpnGeLa3t+3zGiuM7fJwCkiMFq+nmRuG3RI3f7f4N4TDX7T4NpbAXpR2+NTRSEGfCSeA==", "requires": {} }, "leven": { diff --git a/decidim_app-design/packages/core/package.json b/decidim_app-design/packages/core/package.json index 424c520705cc4..e8ebde7e545fc 100644 --- a/decidim_app-design/packages/core/package.json +++ b/decidim_app-design/packages/core/package.json @@ -28,9 +28,9 @@ "jquery": "^3.2.1", "jquery-serializejson": "2.9.0", "js-cookie": "^3.0.1", - "leaflet": "1.3.1", - "leaflet-tilelayer-here": "1.0.2", - "leaflet.markercluster": "1.4.1", + "leaflet": "^1.9.4", + "leaflet-tilelayer-here": "^2.0.1", + "leaflet.markercluster": "^1.5.3", "morphdom": "2.6.1", "prop-types": "^15.7.2", "quill": "1.3.7", diff --git a/package-lock.json b/package-lock.json index 258ffc6db0061..4188fa4497507 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11073,18 +11073,21 @@ } }, "node_modules/leaflet": { - "version": "1.3.1", - "integrity": "sha512-adQOIzh+bfdridLM1xIgJ9VnJbAUY3wqs/ueF+ITla+PLQ1z47USdBKUf+iD9FuUA8RtlT6j6hZBfZoA6mW+XQ==" + "version": "1.9.4", + "resolved": "https://registry.npmjs.org/leaflet/-/leaflet-1.9.4.tgz", + "integrity": "sha512-nxS1ynzJOmOlHp+iL3FyWqK89GtNL8U8rvlMOsQdTTssxZwCXh8N2NB3GDQOL+YR3XnWyZAxwQixURb+FA74PA==" }, "node_modules/leaflet-tilelayer-here": { - "version": "1.0.2", - "integrity": "sha512-PQytY0goCZLANGabPCPQJDhCrXrwdVP6F5NEgw/zjunrfFhQ1XwnBUNCWi0irUWQsETNntcwfkomikhlQ7uCRQ==" + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/leaflet-tilelayer-here/-/leaflet-tilelayer-here-2.0.1.tgz", + "integrity": "sha512-lujfnFt7TuEk3bHGsWt/w01XBfrU9zy7B6C8fzJDr8txhNmVNA00kRRrEJPaLaFyVeSwwA5vWS6zDg2W13DCIA==" }, "node_modules/leaflet.markercluster": { - "version": "1.4.1", - "integrity": "sha512-ZSEpE/EFApR0bJ1w/dUGwTSUvWlpalKqIzkaYdYB7jaftQA/Y2Jav+eT4CMtEYFj+ZK4mswP13Q2acnPBnhGOw==", + "version": "1.5.3", + "resolved": "https://registry.npmjs.org/leaflet.markercluster/-/leaflet.markercluster-1.5.3.tgz", + "integrity": "sha512-vPTw/Bndq7eQHjLBVlWpnGeLa3t+3zGiuM7fJwCkiMFq+nmRuG3RI3f7f4N4TDX7T4NpbAXpR2+NTRSEGfCSeA==", "peerDependencies": { - "leaflet": "~1.3.1" + "leaflet": "^1.3.1" } }, "node_modules/leven": { @@ -17433,9 +17436,9 @@ "jquery": "^3.2.1", "jquery-serializejson": "2.9.0", "js-cookie": "^3.0.1", - "leaflet": "1.3.1", - "leaflet-tilelayer-here": "1.0.2", - "leaflet.markercluster": "1.4.1", + "leaflet": "^1.9.4", + "leaflet-tilelayer-here": "^2.0.1", + "leaflet.markercluster": "^1.5.3", "morphdom": "2.6.1", "prop-types": "^15.7.2", "quill": "1.3.7", @@ -20067,9 +20070,9 @@ "jquery": "^3.2.1", "jquery-serializejson": "2.9.0", "js-cookie": "^3.0.1", - "leaflet": "1.3.1", - "leaflet-tilelayer-here": "1.0.2", - "leaflet.markercluster": "1.4.1", + "leaflet": "^1.9.4", + "leaflet-tilelayer-here": "^2.0.1", + "leaflet.markercluster": "^1.5.3", "morphdom": "2.6.1", "prop-types": "^15.7.2", "quill": "1.3.7", @@ -28016,16 +28019,19 @@ } }, "leaflet": { - "version": "1.3.1", - "integrity": "sha512-adQOIzh+bfdridLM1xIgJ9VnJbAUY3wqs/ueF+ITla+PLQ1z47USdBKUf+iD9FuUA8RtlT6j6hZBfZoA6mW+XQ==" + "version": "1.9.4", + "resolved": "https://registry.npmjs.org/leaflet/-/leaflet-1.9.4.tgz", + "integrity": "sha512-nxS1ynzJOmOlHp+iL3FyWqK89GtNL8U8rvlMOsQdTTssxZwCXh8N2NB3GDQOL+YR3XnWyZAxwQixURb+FA74PA==" }, "leaflet-tilelayer-here": { - "version": "1.0.2", - "integrity": "sha512-PQytY0goCZLANGabPCPQJDhCrXrwdVP6F5NEgw/zjunrfFhQ1XwnBUNCWi0irUWQsETNntcwfkomikhlQ7uCRQ==" + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/leaflet-tilelayer-here/-/leaflet-tilelayer-here-2.0.1.tgz", + "integrity": "sha512-lujfnFt7TuEk3bHGsWt/w01XBfrU9zy7B6C8fzJDr8txhNmVNA00kRRrEJPaLaFyVeSwwA5vWS6zDg2W13DCIA==" }, "leaflet.markercluster": { - "version": "1.4.1", - "integrity": "sha512-ZSEpE/EFApR0bJ1w/dUGwTSUvWlpalKqIzkaYdYB7jaftQA/Y2Jav+eT4CMtEYFj+ZK4mswP13Q2acnPBnhGOw==", + "version": "1.5.3", + "resolved": "https://registry.npmjs.org/leaflet.markercluster/-/leaflet.markercluster-1.5.3.tgz", + "integrity": "sha512-vPTw/Bndq7eQHjLBVlWpnGeLa3t+3zGiuM7fJwCkiMFq+nmRuG3RI3f7f4N4TDX7T4NpbAXpR2+NTRSEGfCSeA==", "requires": {} }, "leven": { diff --git a/packages/core/package.json b/packages/core/package.json index 424c520705cc4..e8ebde7e545fc 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -28,9 +28,9 @@ "jquery": "^3.2.1", "jquery-serializejson": "2.9.0", "js-cookie": "^3.0.1", - "leaflet": "1.3.1", - "leaflet-tilelayer-here": "1.0.2", - "leaflet.markercluster": "1.4.1", + "leaflet": "^1.9.4", + "leaflet-tilelayer-here": "^2.0.1", + "leaflet.markercluster": "^1.5.3", "morphdom": "2.6.1", "prop-types": "^15.7.2", "quill": "1.3.7", From 76d883e358c5a74ba1384d062bef4fd9724cda12 Mon Sep 17 00:00:00 2001 From: decidim-bot Date: Tue, 30 Apr 2024 11:24:33 +0200 Subject: [PATCH 49/88] New Crowdin updates (#12695) * New translations en.yml (Bulgarian) * New translations en.yml (Bulgarian) * New translations en.yml (Bulgarian) * New translations en.yml (Bulgarian) * New translations en.yml (Bulgarian) * New translations en.yml (Bulgarian) * New translations en.yml (Bulgarian) * New translations en.yml (Bulgarian) * New translations en.yml (Bulgarian) * New translations en.yml (Bulgarian) * New translations en.yml (Bulgarian) * New translations en.yml (Bulgarian) * New translations en.yml (Arabic) * New translations en.yml (Danish) * New translations en.yml (Slovak) * New translations en.yml (Chinese Simplified) * New translations en.yml (Indonesian) * New translations en.yml (Latvian) * New translations en.yml (Luxembourgish) * New translations en.yml (Sinhala) * New translations en.yml (Serbian (Latin)) * New translations en.yml (Ukrainian with many plural form) * New translations en.yml (Russian with many plural form) * New translations en.yml (Bulgarian) * New translations en.yml (Portuguese) * New translations en.yml (Bulgarian) * New translations en.yml (Czech) * New translations en.yml (Bulgarian) * New translations en.yml (Bulgarian) * New translations en.yml (Bulgarian) * New translations en.yml (Bulgarian) * New translations en.yml (Bulgarian) * New translations en.yml (Spanish) * New translations en.yml (Spanish) * New translations en.yml (Spanish) * New translations en.yml (Spanish) * New translations en.yml (Spanish) * New translations en.yml (Catalan) * New translations en.yml (Spanish) * New translations en.yml (Catalan) * New translations en.yml (Bulgarian) * New translations en.yml (Spanish) * New translations en.yml (Spanish) * New translations en.yml (Spanish) * New translations en.yml (Spanish) * New translations en.yml (Spanish) * New translations en.yml (Spanish) * New translations en.yml (Spanish) * New translations en.yml (Spanish) * New translations en.yml (Spanish) * New translations en.yml (Spanish) * New translations en.yml (Bulgarian) * New translations en.yml (Catalan) * New translations en.yml (Bulgarian) * New translations en.yml (Spanish) * New translations en.yml (Catalan) * New translations en.yml (Catalan) * New translations en.yml (Catalan) * New translations en.yml (Bulgarian) * New translations en.yml (Bulgarian) * New translations en.yml (Bulgarian) * New translations en.yml (Albanian) * New translations en.yml (Albanian) * New translations en.yml (Albanian) * New translations en.yml (Albanian) * New translations en.yml (Albanian) * New translations en.yml (Albanian) * New translations en.yml (Albanian) * New translations en.yml (Albanian) * New translations en.yml (Basque) * New translations en.yml (Bulgarian) * New translations en.yml (Bulgarian) * New translations en.yml (Bulgarian) * New translations en.yml (Bulgarian) * New translations en.yml (Bulgarian) * New translations en.yml (Bulgarian) * New translations en.yml (Bulgarian) * New translations en.yml (Catalan) * New translations en.yml (Catalan) * New translations en.yml (Catalan) * New translations en.yml (Catalan) * New translations en.yml (Catalan) * New translations en.yml (Basque) * New translations en.yml (Catalan) * New translations en.yml (Spanish, Mexico) * New translations en.yml (Spanish, Paraguay) * New translations en.yml (Catalan) * New translations en.yml (Catalan) * New translations en.yml (Catalan) * New translations en.yml (Spanish, Mexico) * New translations en.yml (Spanish, Paraguay) * New translations en.yml (Catalan) * New translations en.yml (Catalan) --- decidim-accountability/config/locales/ar.yml | 2 +- decidim-accountability/config/locales/ca.yml | 2 +- decidim-accountability/config/locales/da.yml | 1 - decidim-accountability/config/locales/es.yml | 4 +- .../config/locales/id-ID.yml | 1 - decidim-accountability/config/locales/lb.yml | 2 +- decidim-accountability/config/locales/lv.yml | 1 - decidim-accountability/config/locales/pt.yml | 1 + decidim-accountability/config/locales/ru.yml | 1 - .../config/locales/si-LK.yml | 1 + decidim-accountability/config/locales/sk.yml | 1 - .../config/locales/sr-CS.yml | 1 - decidim-accountability/config/locales/uk.yml | 1 - .../config/locales/zh-CN.yml | 1 - decidim-admin/config/locales/bg.yml | 148 ++++++++++++++++++ decidim-admin/config/locales/sq-AL.yml | 67 ++++++++ decidim-assemblies/config/locales/bg.yml | 67 ++++++++ decidim-assemblies/config/locales/sq-AL.yml | 84 ++++++++++ decidim-blogs/config/locales/bg.yml | 27 ++++ decidim-blogs/config/locales/ca.yml | 2 +- decidim-blogs/config/locales/sq-AL.yml | 79 ++++++++++ decidim-budgets/config/locales/bg.yml | 116 ++++++++++++++ decidim-budgets/config/locales/ca.yml | 2 +- decidim-budgets/config/locales/es.yml | 2 +- decidim-budgets/config/locales/sq-AL.yml | 52 ++++++ decidim-comments/config/locales/bg.yml | 23 +++ decidim-comments/config/locales/ca.yml | 14 +- decidim-comments/config/locales/es.yml | 14 +- decidim-comments/config/locales/sq-AL.yml | 38 +++++ decidim-conferences/config/locales/bg.yml | 84 ++++++++++ decidim-conferences/config/locales/ca.yml | 2 +- decidim-consultations/config/locales/bg.yml | 20 +++ decidim-core/config/locales/bg.yml | 73 +++++++++ decidim-core/config/locales/ca.yml | 40 ++--- decidim-core/config/locales/es.yml | 38 ++--- decidim-debates/config/locales/bg.yml | 31 +++- decidim-debates/config/locales/ca.yml | 6 +- decidim-debates/config/locales/es-MX.yml | 2 +- decidim-debates/config/locales/es-PY.yml | 2 +- decidim-debates/config/locales/es.yml | 8 +- decidim-elections/config/locales/bg.yml | 13 ++ decidim-elections/config/locales/ca.yml | 8 +- decidim-elections/config/locales/es.yml | 10 +- decidim-initiatives/config/locales/bg.yml | 2 + decidim-initiatives/config/locales/ca.yml | 22 +-- decidim-initiatives/config/locales/es.yml | 16 +- decidim-meetings/config/locales/ca.yml | 6 +- decidim-meetings/config/locales/es.yml | 8 +- .../config/locales/ca.yml | 4 +- .../config/locales/es.yml | 2 +- decidim-proposals/config/locales/ca.yml | 38 ++--- decidim-proposals/config/locales/cs.yml | 2 + decidim-proposals/config/locales/es-MX.yml | 6 +- decidim-proposals/config/locales/es-PY.yml | 6 +- decidim-proposals/config/locales/es.yml | 26 +-- decidim-sortitions/config/locales/ca.yml | 2 +- decidim-surveys/config/locales/ca.yml | 4 +- decidim-surveys/config/locales/es.yml | 4 +- decidim-system/config/locales/bg.yml | 138 ++++++++++++++++ decidim-templates/config/locales/bg.yml | 51 ++++++ decidim-verifications/config/locales/bg.yml | 128 ++++++++++++++- 61 files changed, 1390 insertions(+), 167 deletions(-) diff --git a/decidim-accountability/config/locales/ar.yml b/decidim-accountability/config/locales/ar.yml index 292e357a2de69..76d79f8dd1e82 100644 --- a/decidim-accountability/config/locales/ar.yml +++ b/decidim-accountability/config/locales/ar.yml @@ -221,7 +221,7 @@ ar: stats: attendees: الحضور back_to_resource: العودة إلى النتيجة - comments: تعليقات + comments: التعليقات contributions: مساهمات last_edited_by: التعديل الأخير تم بواسطة last_updated_at: آخر تحديث في diff --git a/decidim-accountability/config/locales/ca.yml b/decidim-accountability/config/locales/ca.yml index dd740705070ad..b21b78ea42f80 100644 --- a/decidim-accountability/config/locales/ca.yml +++ b/decidim-accountability/config/locales/ca.yml @@ -260,7 +260,7 @@ ca: notification_title: La proposta %{proposal_title} s'ha inclòs al resultat %{resource_title}. result_progress_updated: email_intro: 'El resultat "%{resource_title}", que inclou la proposta "%{proposal_title}", s''ha completat en un %{progress}%. Pots veure-ho des d''aquesta pàgina:' - email_outro: Has rebut aquesta notificació perquè estàs seguint "%{proposal_title}", i aquesta proposta s'inclou al resultat "%{resource_title}". Pots deixar de rebre notificacions seguint l'enllaç anterior. + email_outro: Has rebut aquesta notificació perquè estàs seguint la proposta "%{proposal_title}", i aquesta s'inclou al resultat "%{resource_title}". Pots deixar de rebre notificacions seguint l'enllaç anterior. email_subject: Una actualització sobre el progrés de %{resource_title} notification_title: El resultat %{resource_title}, que inclou la proposta %{proposal_title}, s'ha completat en un %{progress}%. metrics: diff --git a/decidim-accountability/config/locales/da.yml b/decidim-accountability/config/locales/da.yml index 2799c6e1ac06d..444111335fa08 100644 --- a/decidim-accountability/config/locales/da.yml +++ b/decidim-accountability/config/locales/da.yml @@ -167,7 +167,6 @@ da: stats: attendees: Mødedeltagere back_to_resource: Tilbage til resultater - comments: Kommentarer contributions: Bidrag last_edited_by: Sidst redigeret af last_updated_at: Senest opdateret den diff --git a/decidim-accountability/config/locales/es.yml b/decidim-accountability/config/locales/es.yml index b074263ca8a57..896770a96ef34 100644 --- a/decidim-accountability/config/locales/es.yml +++ b/decidim-accountability/config/locales/es.yml @@ -255,12 +255,12 @@ es: accountability: proposal_linked: email_intro: 'La propuesta "%{proposal_title}" se ha incluido en un resultado. Puedes verlo desde esta página:' - email_outro: Has recibido esta notificación porque estás siguiendo "%{proposal_title}". Puedes dejar de recibir notificaciones siguiendo el enlace anterior. + email_outro: Has recibido esta notificación porque estás siguiendo la propuesta "%{proposal_title}". Puedes dejar de recibir notificaciones siguiendo el enlace anterior. email_subject: Una actualización en %{proposal_title} notification_title: Se ha incluido la propuesta %{proposal_title} en el resultado %{resource_title}. result_progress_updated: email_intro: 'El resultado "%{resource_title}", que incluye la propuesta "%{proposal_title}", está completado al %{progress}%. Puedes verlo desde esta página:' - email_outro: Has recibido esta notificación porque estás siguiendo "%{proposal_title}" y esta propuesta se incluye en el resultado "%{resource_title}". Puedes dejar de recibir notificaciones siguiendo el enlace anterior. + email_outro: Has recibido esta notificación porque estás siguiendo la propuesta "%{proposal_title}" y esta se incluye en el resultado "%{resource_title}". Puedes dejar de recibir notificaciones siguiendo el enlace anterior. email_subject: Una actualización sobre el progreso de %{resource_title} notification_title: El resultado %{resource_title}, que incluye la propuesta %{proposal_title}, ahora está completado al %{progress}%. metrics: diff --git a/decidim-accountability/config/locales/id-ID.yml b/decidim-accountability/config/locales/id-ID.yml index aa6f0bbb71917..2a63dbd242b57 100644 --- a/decidim-accountability/config/locales/id-ID.yml +++ b/decidim-accountability/config/locales/id-ID.yml @@ -150,7 +150,6 @@ id: stats: attendees: Hadirin back_to_resource: Kembali ke hasil - comments: Komentar contributions: Kontribusi last_edited_by: Terakhir diedit oleh last_updated_at: Terakhir diperbarui pada diff --git a/decidim-accountability/config/locales/lb.yml b/decidim-accountability/config/locales/lb.yml index 37bddea6bf7c8..6457e11ae2d9e 100644 --- a/decidim-accountability/config/locales/lb.yml +++ b/decidim-accountability/config/locales/lb.yml @@ -182,7 +182,7 @@ lb: stats: attendees: Teilnehmer back_to_resource: Gehe zurück zum Ergebnis - comments: Bemerkungen + comments: Kommentarer contributions: Beiträge last_edited_by: Zuletzt bearbeitet von last_updated_at: Zuletzt aktualisiert am diff --git a/decidim-accountability/config/locales/lv.yml b/decidim-accountability/config/locales/lv.yml index cf45ffb071b4f..4cd36e46b73fc 100644 --- a/decidim-accountability/config/locales/lv.yml +++ b/decidim-accountability/config/locales/lv.yml @@ -165,7 +165,6 @@ lv: stats: attendees: Apmeklētāji back_to_resource: Atgriezties pie rezultātiem - comments: Komentāri contributions: Papildinājumi last_edited_by: Pēdējo reizi labojis last_updated_at: Pēdējo reizi atjaunināts plkst. diff --git a/decidim-accountability/config/locales/pt.yml b/decidim-accountability/config/locales/pt.yml index 4b8e0c1571eaa..f6cacd754a579 100644 --- a/decidim-accountability/config/locales/pt.yml +++ b/decidim-accountability/config/locales/pt.yml @@ -22,6 +22,7 @@ pt: timeline_entry: description: Descrição entry_date: Data + title: Título models: decidim/accountability/proposal_linked_event: Proposta incluída em um resultado decidim/accountability/result_progress_updated_event: Progresso do resultado atualizado diff --git a/decidim-accountability/config/locales/ru.yml b/decidim-accountability/config/locales/ru.yml index c75064b790696..78a64ae223c78 100644 --- a/decidim-accountability/config/locales/ru.yml +++ b/decidim-accountability/config/locales/ru.yml @@ -156,7 +156,6 @@ ru: stats: attendees: Участники back_to_resource: Вернуться к итогу - comments: Комментарии contributions: Внесенные предложения last_edited_by: Последний раз редактировалось last_updated_at: Последнее обновление diff --git a/decidim-accountability/config/locales/si-LK.yml b/decidim-accountability/config/locales/si-LK.yml index 620b1f12cb083..e3f6ee0fd32ed 100644 --- a/decidim-accountability/config/locales/si-LK.yml +++ b/decidim-accountability/config/locales/si-LK.yml @@ -61,4 +61,5 @@ si: results: show: stats: + comments: අදහස් meetings: රැස්වීම් diff --git a/decidim-accountability/config/locales/sk.yml b/decidim-accountability/config/locales/sk.yml index 49cd6ca2e75a0..ca4ce468b13d6 100644 --- a/decidim-accountability/config/locales/sk.yml +++ b/decidim-accountability/config/locales/sk.yml @@ -178,7 +178,6 @@ sk: stats: attendees: Účastníci back_to_resource: Naspať na výsledky - comments: Komentáre contributions: Príspevky last_edited_by: Naposledy editoval last_updated_at: Naposledy aktualizované diff --git a/decidim-accountability/config/locales/sr-CS.yml b/decidim-accountability/config/locales/sr-CS.yml index 1243ad749ed5a..ae5cd02cfb50d 100644 --- a/decidim-accountability/config/locales/sr-CS.yml +++ b/decidim-accountability/config/locales/sr-CS.yml @@ -154,7 +154,6 @@ sr: stats: attendees: Učesnici back_to_resource: Vrati se na rezultat - comments: Komentari contributions: Doprinosi last_edited_by: Poslednji put izmenjeno od strane last_updated_at: Poslеdnji put ažurirano diff --git a/decidim-accountability/config/locales/uk.yml b/decidim-accountability/config/locales/uk.yml index dd62dc26c6b0b..2b6aa8e566540 100644 --- a/decidim-accountability/config/locales/uk.yml +++ b/decidim-accountability/config/locales/uk.yml @@ -153,7 +153,6 @@ uk: stats: attendees: Учасники back_to_resource: Повернутися до підсумків - comments: Коментарів contributions: Внесені пропозиції last_edited_by: Останній раз редагувалося last_updated_at: Останній раз оновлювалося diff --git a/decidim-accountability/config/locales/zh-CN.yml b/decidim-accountability/config/locales/zh-CN.yml index f7e36b78d2292..f52e12373c273 100644 --- a/decidim-accountability/config/locales/zh-CN.yml +++ b/decidim-accountability/config/locales/zh-CN.yml @@ -165,7 +165,6 @@ zh-CN: stats: attendees: 参与者 back_to_resource: 返回结果 - comments: 评论 contributions: 二. 捐款 last_edited_by: 最后编辑者 last_updated_at: 最后更新于 diff --git a/decidim-admin/config/locales/bg.yml b/decidim-admin/config/locales/bg.yml index db5ffd07cebca..1e1271983d975 100644 --- a/decidim-admin/config/locales/bg.yml +++ b/decidim-admin/config/locales/bg.yml @@ -30,6 +30,7 @@ bg: body: Тяло subject: Тема organization: + admin_terms_of_use_body: Съдържание на административните условия за ползване alert_color: Аларма badges_enabled: Включи значките comments_max_length: Максимална дължина на коментарите (Оставете 0 за стойност по подразбиране) @@ -103,12 +104,21 @@ bg: file: Файл errors: models: + newsletter: + attributes: + base: + at_least_one_space: Изберете поне едно място за участие organization: attributes: official_img_footer: allowed_file_content_types: Невалиден файл на изображението official_img_header: allowed_file_content_types: Невалиден файл на изображението + new_import: + attributes: + file: + invalid_file: Предоставен е невалиден файл, моля, проверете дали файлът е правилно форматиран + invalid_mime_type: Невалиден мим формат activerecord: attributes: decidim/static_page: @@ -117,15 +127,153 @@ bg: title: Заглавие decidim: admin: + actions: + attachment_collection: + new: Нова колекция от прикачени файлове + manage: Управление + new: Ново %{name} + admin_terms_of_use: + accept: + error: Възникна грешка при приемането на административните условия за ползване. + success: Чудесно! Приехте административните условия за ползване. + actions: + are_you_sure: Сигурни ли сте, че искате да откажете административните условия за ползване? + title: Съгласявам се с правилата и условията за ползване + required_review: + alert: 'Задължително: Прегледайте административните условия за ползване' + callout: Моля, отделете малко време, за да прегледате административните условия за ползване. В противен случай няма да можете да администрирате платформата. + title: Административни условия за ползване + area_types: + destroy: + success: Типът област е премахнат успешно + update: + success: Типът област е актуализиран успешно + areas: + destroy: + success: Областта е премахната успешно + update: + success: Областта е актуализирана успешно + attachment_collections: + index: + attachment_collection_used: Тази папка не може да бъде премахната, защото се използва. + autocomplete: + search_prompt: Въведете поне три символа, за да търсите + categories: + index: + category_used: Тази категория не може да бъде премахната, защото се използва. + conflicts: + transfer: + error: Възникна проблем при прехвърлянето на текущия участник към управляван участник. + dashboard: + show: + welcome: Добре дошли в Административния панел. + domain_whitelist: + update: + error: Неуспешно актуализиране на белия списък на домейни + success: Белият списък на домейни е актуализиран успешно + exports: + notice: Заявеното от Вас експортиране е в процес. Ще получите имейл, когато приключи. filters: + search_placeholder: + user_name_or_user_email_cont: Търси в %{collection} по име или имейл. state_eq: label: Състояние values: rejected: Отхвърлен + help_sections: + error: Възникна проблем при актуализирането на помощните раздели + success: Помощните раздели бяха актуализирани успешно + impersonatable_users: + index: + filter_by: Филтрирай по + imports: + error: Възникна проблем по време на импортирането + example_error: Не можа да се създаде пример за дадения тип + notice: "%{count} %{resource_name} успешно импортирани" + logs: + logs_list: + no_logs_yet: Все още няма регистри + menu: + reported_users: Докладвани потребители + models: + user: + fields: + last_sign_in_at: Дата на последно влизане + newsletters: + send: + no_recipients: Няма получатели за тази селекция + officializations: + block: + error: Възникна грешка при блокиране на участника + success: Участникът беше блокиран успешно + create: + success: Участникът е официализиран успешно + destroy: + success: Официализирането на участника е премахнато успешно + show_email_modal: + close_modal: Затвори прозореца + unblock: + error: Възникна грешка при отблокиране на участника + success: Участникът беше отблокиран успешно organization_appearance: form: colors: colors_title: Цветове на организацията + colors_warning_html: Внимание! Промяната на тези цветове може да наруши контрастите на достъпността. Можете да проверите контраста на Вашия избор с WebAIM Contrast Checker или други подобни инструменти. header_snippets_help: Използвайте това поле, за да добавите нещо в HTML заглавието. Най-често се използва за интеграция на външни услуги, които изискват допълнителни JavaScript или CSS. Освен това, можете да го ползвате за добавяне на допълнителни метатагове в HTML. Обърнете внимание, че ще се визуализира само в публичните страници, но не и в администраторския раздел. images: layout_appearance_title: Редактиране външния вид шаблона + organization_external_domain_whitelist: + form: + add: Добави към белия списък + title: Бял списък с външни домейни + participatory_space_private_users_csv_imports: + create: + success: Файлът във формат CSV беше качен успешно; изпращаме имейл с покана на участниците. Това може да отнеме известно време. + new: + destroy: + confirm: Сигурни ли сте, че искате да изтриете всички частни участници? Това действие не може да бъде отменено, няма да можете да ги възстановите. + explanation: 'Качете своя CSV файл. Трябва да има две колони с имейл в първата колона на файла и име в последната колона на файла (имейл, име) на потребителите, които искате да добавите към пространството за участие, без заглавки. Избягвайте използването на невалидни знаци като `<>?%&^*#@()[]=+:;"{}\|` в потребителското име.' + scopes: + destroy: + success: Обхватът беше премахнат успешно + share_tokens: + share_tokens: + empty: Няма активни маркери + shared: + gallery: + delete_image: Изтриване на изображение + static_page_topics: + destroy: + success: Темата беше премахната успешно + static_pages: + edit: + changed_notably_help: Ако бъде поставена отметка, участниците ще получат известие да приемат новите Правила и условия за ползване. + index: + last_notable_change: Последна значима промяна + topic: + destroy: Премахни темата + empty: Няма страници с тази тема + update: + success: Страницата беше актуализирана успешно + titles: + edit_external_domains: Бял списък с външни домейни + user_group: + csv_verify: + success: Файлът във формат CSV беше качен успешно, проверяваме групите, които отговарят на критериите. Това може да отнеме известно време. + reject: + success: Групата беше отхвърлена успешно + verify: + success: Групата беше проверена успешно + users_statistics: + users_count: + no_users_count_statistics_yet: Все още няма статистика за броя на потребителите + forms: + errors: + impersonate_user: + reason: Трябва да предоставите причина, когато управлявате участник, който не е управляван + moderations: + models: + moderation: + fields: + report_count: Брой diff --git a/decidim-admin/config/locales/sq-AL.yml b/decidim-admin/config/locales/sq-AL.yml index 9e0121baf81ae..efeca3120497c 100644 --- a/decidim-admin/config/locales/sq-AL.yml +++ b/decidim-admin/config/locales/sq-AL.yml @@ -51,16 +51,83 @@ sq: description: Përshkrimi enable_omnipresent_banner: Shfaq banerin e gjithëpranishëm enable_participatory_space_filters: Aktivizo filtrat e hapësirës së pjesëmarrjes + facebook_handler: Emri i përdoruesit Facebook favicon: Ikona force_authentication: Sforco autentikimin + force_users_to_authenticate_before_access_organization: Detyro përdoruesit të autentikohen para se të aksesojnë organizatën + from: Adresa email e dërguesit + github_handler: Emri i përdoruesit Github highlight_color: Theksim + highlighted_content_banner_image: Imazhi highlighted_content_banner_short_description: Përshkrim i shkurtër highlighted_content_banner_title: Titulli host: Organizatori + instagram_handler: Emri i përdoruesit Instagram + logo: Logo + machine_translation_display_priority: Prioriteti i shfaqjes së përkthimit automatik + machine_translation_display_priority_original: Teksti origjinal i pari + machine_translation_display_priority_translation: Teksti i përkthyer i pari + name: Emri + official_url: Adresa zyrtare e organizatës + omnipresent_banner_short_description: Përshkrim i shkurtër + omnipresent_banner_title: Titulli + omnipresent_banner_url: URL + organization_admin_email: Emaili i adminit të organizatës + organization_admin_name: Emri i adminit të organizatës + organization_locales: Gjuhët e organizatës + primary_color: Ngjyra parësore + rich_text_editor_in_public_views: Aktivizo editorin kompleks për pjesëmarrësit + secondary_color: Ngjyra dytësore + send_welcome_notification: Dërgo njoftim mirëseardhjeje + success_color: Sukses + time_zone: Zona orare + tos_version: Versioni i kushteve të shërbimit + twitter_handler: Emri i përdoruesit X + user_groups_enabled: Aktivizo grupet + users_registration_mode: Mënyra e regjistrimit të përdoruesve + warning_color: Kujdes + welcome_notification_body: Përmbajtja e njoftimit të mirëseardhjes + welcome_notification_subject: Tema e njoftimit të mirëseardhjes + youtube_handler: Emri i përdoruesit Youtube + participatory_space_private_user: + email: Email + name: Emri + scope: + code: Kodi + name: Emri + organization: Organizata + scope_type: + name: Emri + organization: Organizata + plural: Shumësi + static_page: + allow_public_access: Lejo akses të paautentikuar + content: Përmbajtja + organization: Organizata + slug: Slug i adresës URL + title: Titulli + activerecord: + attributes: + decidim/static_page: + content: Përmbajtje + slug: Slug i adresës URL + title: Titulli decidim: admin: + models: + share_token: + fields: + last_used_at: Hera e fundit që u përdor + times_used: Sa herë është përdorur newsletters: select_recipients_to_deliver: send_to_all_users: Dërgo të gjithë përdoruesve send_to_followers: Dërgo ndjekësve send_to_participants: Dërgo pjesëmarrësve + organization: + form: + social_handlers: Rrjetet sociale + organization_appearance: + form: + colors: + colors_title: Ngjyrat e organizatës diff --git a/decidim-assemblies/config/locales/bg.yml b/decidim-assemblies/config/locales/bg.yml index 4fb1019831eed..98b6f080cdc6e 100644 --- a/decidim-assemblies/config/locales/bg.yml +++ b/decidim-assemblies/config/locales/bg.yml @@ -2,11 +2,78 @@ bg: activemodel: attributes: + assemblies_setting: + enable_organization_chart: Активиране на организационна диаграма assembly: area_id: Район assembly_type: Тип събрание assembly_type_other: Друг тип събрание + errors: + models: + assembly: + attributes: + document: + allowed_file_content_types: 'Невалиден файлов формат. Разрешени са само файлове със следните разширения: %{types}' decidim: + admin: + assemblies: + index: + not_published: Не публикувано + assemblies_settings: + update: + error: Възникна проблем при актуализирането на настройките. + success: Настройките са актуализирани успешно. + assembly_members: + edit: + title: Актуализиране на член на събранието. + new: + title: Нов член на събранието. + assembly_user_roles: + edit: + title: Актуализиране на администратора на събранието. + new: + title: Нов администратор на събранието. + menu: + assemblies_settings: Настройки + assemblies_submenu: + info: Информация assemblies: + admin: + assemblies_settings: + form: + title: Настройки за събрания + assembly_imports: + form: + document_legend: Добавяне на документ + assembly_members: + form: + image_guide: За предпочитане използвайте хоризонтално изображение без текст. + index: + filter: + all: Всички + filter_by: Филтрирай по + search: Търсене + pages: + home: + highlighted_assemblies: + assemblies_button_title: Връзка към страницата „Събрания“, на която се показват всички събрания show: area: Район + is_transparent: + 'false': непрозрачно + 'true': прозрачно + read_less: Скрийте + read_more: Прочетете повече + social_networks: Социални мрежи + errors: + messages: + cannot_be_blank: не може да остане празно + layouts: + decidim: + assemblies: + index: + children: 'Събрания: ' + organizational_chart: Организационна диаграма + reset_chart: Начално състояние + assembly_navigation: + assembly_menu_item: Събранието diff --git a/decidim-assemblies/config/locales/sq-AL.yml b/decidim-assemblies/config/locales/sq-AL.yml index 44ddadc95a8f3..543e6c3ff37c4 100644 --- a/decidim-assemblies/config/locales/sq-AL.yml +++ b/decidim-assemblies/config/locales/sq-AL.yml @@ -1 +1,85 @@ +--- sq: + activemodel: + attributes: + assemblies_type: + title: Titulli + assembly: + announcement: Njoftim + area_id: Zona + assembly_type: Lloji i asamblesë + assembly_type_other: Lloji i asamblesë tjetër + closing_date: Data e mbylljes + closing_date_reason: Arsyeja e datës së mbylljes + composition: Përbërja + copy_categories: Kopjo kategoritë + created_by: Krijuar nga + created_by_other: Krijuar nga tjetër + creation_date: Data e krijimit + decidim_area_id: Zona + decidim_assemblies_type_id: Lloji i asamblesë + decidim_scope_id: Qëllimi + description: Përshkrimi + developer_group: Grupi promovues + document: Dokument + domain: Domeini + duration: Kohëzgjatja + facebook: Facebook + github: Github + hashtag: Hashtag + hero_image: Imazhi kryesor + import_attachments: Importoni bashkëngjitjet + import_categories: Importoni kategoritë + import_components: Importoni përbërësit + included_at: Përfshirë në + instagram: Instagram + internal_organisation: Organizatë e brëndshme + is_transparent: Është transparente + local_area: Zona e organizatës + parent_id: Asambleja e përgjithshme + participatory_scope: Çfarë u vendos + participatory_structure: Si u vendos + private_space: Hapësirë private + promoted: Në pah + published_at: Publikuar në + purpose_of_action: Qëllimi i aksionit + scope_id: Qëllimi + scopes_enabled: Fushveprimet e aktivizuara + short_description: Përshkrim i shkurtër + show_statistics: Trego statistikat + slug: Identifikues URL-je + special_features: Karaktersitika të veçanta + subtitle: Nëntitull + target: Kush merr pjesë + title: Titulli + twitter: X + youtube: YouTube + assembly_member: + birthday: Datëlindje + birthplace: Vendi i lindjes + full_name: Emri i plotë + gender: Gjinia + non_user_avatar: Avatar + position: Pozicioni + user_id: Perdorues ose grup + assembly_user_role: + email: Email + name: Emri + role: Roli + decidim: + assemblies: + show: + area: Zona + closing_date: Data e mbylljes + composition: Përbërja + created_by: Krijuar nga + creation_date: Data e krijimit + developer_group: Grupi promovues + included_at: Përfshirë në + internal_organisation: Organizatë e brëndshme + local_area: Zona e organizatës + participatory_scope: Çfarë u vendos + participatory_structure: Si u vendos + purpose_of_action: Qëllimi i aksionit + scope: Qëllimi + target: Kush merr pjesë diff --git a/decidim-blogs/config/locales/bg.yml b/decidim-blogs/config/locales/bg.yml index 3b89e84a44541..8032d6b8adaa0 100644 --- a/decidim-blogs/config/locales/bg.yml +++ b/decidim-blogs/config/locales/bg.yml @@ -12,3 +12,30 @@ bg: blogs: actions: confirm_destroy: Сигурни ли сте, че желаете да изтриете тази публикация? + admin: + models: + post: + name: Публикация + posts: + create: + invalid: Възникна проблем при създаването на тази публикация + success: Публикацията беше създадена успешно + destroy: + success: Публикацията беше изтрита успешно + update: + success: Публикацията беше запазена успешно + last_activity: + new_post_at_html: "Нова публикация на %{link}" + models: + post: + fields: + created_at: Създадена на + posts: + show: + back: Назад към списъка + comments: Коментари + view: Преглед + sidebar_blog: + comments: коментари + most_commented_posts: Най-коментирани публикации + read_more: Прочетете повече diff --git a/decidim-blogs/config/locales/ca.yml b/decidim-blogs/config/locales/ca.yml index 6fd6091870a2e..3cc64c63a514c 100644 --- a/decidim-blogs/config/locales/ca.yml +++ b/decidim-blogs/config/locales/ca.yml @@ -93,7 +93,7 @@ ca: blogs: post_created: email_intro: La publicació "%{resource_title}" s'ha publicat al "%{participatory_space_title}", el qual segueixes. - email_outro: Has rebut aquesta notificació perquè estàs seguint "%{participatory_space_title}". Pots deixar de seguir-lo des de l'enllaç anterior. + email_outro: Has rebut aquesta notificació perquè estàs seguint l'espai "%{participatory_space_title}". Pots deixar de seguir-lo des de l'enllaç anterior. email_subject: Nova publicació publicada a %{participatory_space_title} notification_title: La publicació %{resource_title} ha estat publicada a %{participatory_space_title} statistics: diff --git a/decidim-blogs/config/locales/sq-AL.yml b/decidim-blogs/config/locales/sq-AL.yml index 44ddadc95a8f3..20a75156d4b0a 100644 --- a/decidim-blogs/config/locales/sq-AL.yml +++ b/decidim-blogs/config/locales/sq-AL.yml @@ -1 +1,80 @@ +--- sq: + activemodel: + attributes: + post: + body: Përmbajtja + decidim_author_id: Autor + published_at: Koha e publikimit + title: Titulli + models: + decidim/blogs/create_post_event: Postim i ri + activerecord: + models: + decidim/blogs/post: + one: Postim + other: Postimet + decidim: + blogs: + actions: + author_id: Krijo postimin si + confirm_destroy: Je i sigurt që dëshiron ta fshish këtë postim? + destroy: Fshij + edit: Përpuno + new: Postim i ri + title: Veprime + admin: + posts: + edit: + save: Përditëso + title: Përpuno postimin + index: + title: Postimet + new: + create: Krijo + title: Krijo postimin + update: + invalid: Ndodhi një problem gjatë krijimit të këtij postimi. + admin_log: + post: + create: "%{user_name} krijoi postimin %{resource_name} në %{space_name}" + delete: "%{user_name} fshiu postimin %{resource_name} nga %{space_name}" + update: "%{user_name} përditësoi postimin %{resource_name} në %{space_name}" + models: + post: + fields: + author: Autor + body: Përmbajtja + official_blog_post: Postimi zyrtar + title: Titulli + posts: + index: + empty: Nuk ka ende postime. + components: + blogs: + actions: + comment: Koment + create: Krijo + destroy: Fshij + endorse: Mirato + update: Përditëso + name: Blog + settings: + global: + announcement: Njoftim + comments_enabled: Komentet janë aktivizuar + comments_max_length: Gjatësia maksimale e komenteve (Lëre 0 për vlerën e paracaktuar) + step: + announcement: Njoftim + comments_blocked: Komentet të bllokuara + endorsements_blocked: Mbështetjet të bllokuara + endorsements_enabled: Mbështetjet të aktivizuara + events: + blogs: + post_created: + email_intro: Postimi "%{resource_title}" është publikuar në "%{participatory_space_title}" që ju po ndiqni. + email_outro: Ju e keni marrë këtë njoftim sepse po ndiqni %{participatory_space_title}. Mund t'i ndaloni njoftimet me anë të linkut të mëparshëm. + email_subject: Postimi i ri i publikuar në %{participatory_space_title} + notification_title: Postimi %{resource_title} është publikuar në %{participatory_space_title} + statistics: + posts_count: Postimet diff --git a/decidim-budgets/config/locales/bg.yml b/decidim-budgets/config/locales/bg.yml index f3e54121ea951..7d2271338bcc2 100644 --- a/decidim-budgets/config/locales/bg.yml +++ b/decidim-budgets/config/locales/bg.yml @@ -7,7 +7,123 @@ bg: decidim_scope_id: Сфера decidim: budgets: + actions: + new: Ново %{name} + admin: + budgets: + create: + invalid: Възникна проблем при създаването на този бюджет + success: Бюджетът беше създаден успешно + destroy: + invalid: Възникна проблем при изтриването на този бюджет + success: Бюджетът беше изтрит успешно + update: + invalid: Възникна проблем при актуализирането на този бюджет + success: Бюджетът беше актуализиран успешно + projects: + create: + invalid: Възникна проблем при създаването на този проект + success: Проектът беше създаден успешно + destroy: + success: Проектът беше изтрит успешно + update: + invalid: Възникна проблем при актуализирането на този проект + success: Проектът беше актуализиран успешно + update_category: + select_a_category: Моля, изберете категория + select_a_project: Моля, изберете проект + update_scope: + select_a_project: Моля, изберете проект + select_a_scope: Моля, изберете обхват + update_selected: + select_a_project: Моля, изберете проект + select_a_selection: Моля, изберете състояние на внедряване + proposals_imports: + create: + invalid: Възникна проблем при импортирането на предложенията в проектите + success: "%{number} предложения бяха импортирани успешно в проекти" + new: + title: Импортиране на предложения + budget: + view: Преглед на всички бюджетни проекти + budget_list_item: + voting_finished: Вие гласувахте този бюджет + voting_started: Вие започнахте да гласувате за този бюджет + budgets_list: + finished_message: Завършихте процеса на гласуване. Благодарим Ви за участието! + if_change_opinion: Ако сте размислили, имате възможност + my_budgets: Моите бюджети + voted_on: Гласувахте на %{links} + last_activity: + new_vote_at_html: "Ново бюджетно гласуване на %{link}" + limit_announcement: + cant_vote: Не можете да гласувате за този бюджет. Опитайте с друг бюджет. models: project: fields: scope: Сфера + projects: + budget_excess: + budget_excess: + description: Този проект надвишава максималния бюджет и не може да бъде добавен. Ако искате, можете да изтриете проект, който вече сте избрали, за да може да се гласува отново, според вашите предпочитания. + close: Затвори + description: Този проект надвишава максималния бюджет и не може да бъде добавен. Ако искате, можете да изтриете проект, който вече сте избрали, за да може да се гласува отново, според вашите предпочитания. + budget_summary: + assigned: 'Възложен:' + cancel_order: изтрийте гласа си и започнете отначало + checked_out: + description: Вече сте гласували за бюджета. Ако сте размислили, имате възможност %{cancel_link}. + minimum_projects_rule: + description: За кои проекти смятате, че трябва да осигурим бюджет? Изберете най-малко %{minimum_number} желани от Вас проекта и гласувайте, според предпочитанията си за дефиниране на бюджета. + instruction: "

  • Изберете поне %{minimum_number} желани от Вас проекта и гласувайте, според предпочитанията си за дефиниране на бюджета.
  • " + projects_rule: + description: За какви проекти смятате, че трябва да отделим бюджет? Изберете най-малко %{minimum_number}, но не повече от %{maximum_number} желани от Вас проекта и гласувайте, според предпочитанията си за дефиниране на бюджета. + instruction: "
  • Изберете най-малко %{minimum_number}, но не повече от %{maximum_number} желани от Вас проекта и гласувайте, според предпочитанията си за дефиниране на бюджета.
  • " + projects_rule_maximum_only: + description: За кои проекти смятате, че трябва да осигурим бюджет? Изберете не повече от %{maximum_number} желани от Вас проекта и гласувайте, според предпочитанията си за дефиниране на бюджета. + instruction: "
  • Изберете не повече от %{maximum_number} желани от Вас проекта и гласувайте, според предпочитанията си за дефиниране на бюджета.
  • " + rules: + title: Бюджетни правила + title: Вие решавате бюджета + total_projects: Общ брой гласове + vote_threshold_percent_rule: + description: За кои проекти смятате, че трябва да осигурим бюджет? Присъеденете най-малко %{minimum_budget} към желаните от Вас проекти и гласувайте, според предпочитанията си за дефиниране на бюджета. + instruction: "
  • Присъеденете поне %{minimum_budget} към желаните от вас проекти и гласувайте, според предпочитанията си за дефиниране на бюджета.
  • " + filters_small_view: + filter: Филтър + filter_by: Филтрирай по + unfold: Разгъване + index: + view_project: Преглед на проекта + order_selected_projects: + remove: Премахни + selected_projects: + one: избран проект + other: избрани проекти + view: Преглед + project: + add: Добавяне на проект %{resource_name} към Вашето гласуване + remove: Премахване на проекта %{resource_name} от Вашето гласуване + view: Преглед + project_budget_button: + add: Добавяне към гласуването Ви + add_descriptive: Добавяне на проект %{resource_name} към Вашето гласуване + added: Добавено към Вашето гласуване + added_descriptive: Проектът %{resource_name} е добавен към Вашето гласуване + show: + view_all_projects: Преглед на всички проекти + components: + budgets: + settings: + global: + form: + errors: + budget_voting_rule_only_one: Трябва да бъде активирано само едно правило за гласуване + budget_voting_rule_required: Изисква се едно правило за гласуване + orders: + checkout: + error: Възникна проблем при обработването на Вашия глас + success: Вашият глас е приет успешно + destroy: + error: Възникна проблем при отмяната на гласа Ви + success: Вашият глас беше отменен успешно diff --git a/decidim-budgets/config/locales/ca.yml b/decidim-budgets/config/locales/ca.yml index 28941a1e6aa8f..c4c1a60b07a50 100644 --- a/decidim-budgets/config/locales/ca.yml +++ b/decidim-budgets/config/locales/ca.yml @@ -368,7 +368,7 @@ ca: budgets: budget_published: email_intro: 'Ja està activa la fase %{resource_title} per a %{participatory_space_title}. Pots veure-la des d''aquesta pàgina:' - email_outro: Has rebut aquesta notificació perquè estàs seguint l'espai %{participatory_space_title}. Pots deixar de rebre notificacions a través de l'enllaç anterior. + email_outro: Has rebut aquesta notificació perquè estàs seguint l'espai "%{participatory_space_title}". Pots deixar de rebre notificacions a través de l'enllaç anterior. email_subject: El component %{resource_title} ja està actiu per %{participatory_space_title}. notification_title: El pressupost %{resource_title} a %{participatory_space_title} ja està actiu. orders: diff --git a/decidim-budgets/config/locales/es.yml b/decidim-budgets/config/locales/es.yml index d68a1f8af810e..9be6fb7319498 100644 --- a/decidim-budgets/config/locales/es.yml +++ b/decidim-budgets/config/locales/es.yml @@ -368,7 +368,7 @@ es: budgets: budget_published: email_intro: 'Ya está activa la fase %{resource_title} para %{participatory_space_title}. Puedes verla desde esta página:' - email_outro: Has recibido esta notificación porque estás siguiendo %{participatory_space_title}. Puedes dejar de recibir notificaciones siguiendo el enlace anterior. + email_outro: Has recibido esta notificación porque estás siguiendo el espacio "%{participatory_space_title}". Puedes dejar de recibir notificaciones siguiendo el enlace anterior. email_subject: El componente %{resource_title} está ahora activo para %{participatory_space_title}. notification_title: El presupuesto %{resource_title} en %{participatory_space_title} ya está activo. orders: diff --git a/decidim-budgets/config/locales/sq-AL.yml b/decidim-budgets/config/locales/sq-AL.yml index 44ddadc95a8f3..a980761781955 100644 --- a/decidim-budgets/config/locales/sq-AL.yml +++ b/decidim-budgets/config/locales/sq-AL.yml @@ -1 +1,53 @@ +--- sq: + activemodel: + attributes: + budget: + decidim_scope_id: Fushëveprimi + description: Përshkrimi + title: Titulli + total_budget: Buxheti total + weight: Rendit pozicionet + project: + budget_amount: Shuma buxhetore + decidim_category_id: Kategori + decidim_scope_id: Fushëveprim + description: Përshkrimi + proposal_ids: Propozime të ngjashme + proposals: Propozimet + selected: Përzgjedhur për zbatim + title: Titulli + proposals_import: + scope_id: Fushëveprim + activerecord: + models: + decidim/budgets/project: + one: Projekt + other: Projektet + decidim: + admin: + filters: + projects: + category_id_eq: + label: Kategori + scope_id_eq: + label: Qëllimi + selected_at_null: + label: E përzgjedhur + values: + 'false': Përzgjedhur për zbatim + 'true': Nuk është përzgjedhur për zbatim + budgets: + actions: + attachment_collections: Dosjet + attachments: Bashkëngjitjet + confirm_destroy: A je i sigurt që do ta fshish këtë projekt? + destroy: Fshi + edit: Përpuno + edit_projects: Menaxho projektet + import: Importo propozimet ne projekte + preview: Pamje paraprake + models: + project: + fields: + scope: Fushëveprim diff --git a/decidim-comments/config/locales/bg.yml b/decidim-comments/config/locales/bg.yml index 4b19db46b4ab8..1e0f417c279ad 100644 --- a/decidim-comments/config/locales/bg.yml +++ b/decidim-comments/config/locales/bg.yml @@ -5,3 +5,26 @@ bg: decidim/comments/comment_by_followed_user_event: Коментар decidim/comments/comment_created_event: Коментар decidim/comments/reply_created_event: Отговор на коментар + decidim: + comments: + comments: + delete: + error: Коментарът не можа да бъде изтрит. + comments_count: Брой коментари + last_activity: + new_comment_at_html: "Нов коментар на %{link}" + view: Преглед + components: + add_comment_form: + account_message: Влезте с Вашия профил или се регистрирайте, за да добавите коментара си. + form: + form_error: Текстът е задължителен и не може да е по-дълъг от %{length} символа. + comment: + report: + reasons: + does_not_belong: Съдържа незаконни дейности, заплахи за самоубийство, лична информация или нещо друго, което считате, че е неподходящо за %{organization_name}. + comment_thread: + title: Разговор с %{authorName} + errors: + messages: + cannot_have_comments: не може да има коментари diff --git a/decidim-comments/config/locales/ca.yml b/decidim-comments/config/locales/ca.yml index 06cc7f994be7f..f75a8d72ed94a 100644 --- a/decidim-comments/config/locales/ca.yml +++ b/decidim-comments/config/locales/ca.yml @@ -125,27 +125,27 @@ ca: comments: comment_by_followed_user: email_intro: "%{author_name} ha deixat un comentari a %{resource_title}. Podeu llegir-lo en aquesta pàgina:" - email_outro: Has rebut aquesta notificació perquè estàs seguint %{author_name}. Pots deixar de seguir a aquesta participant des de la seva pàgina de perfil. + email_outro: Has rebut aquesta notificació perquè estàs seguint el comentari "%{author_name}". Pots deixar de seguir a aquesta participant des de la seva pàgina de perfil. email_subject: Hi ha un nou comentari de %{author_name} en %{resource_title} notification_title: Hi ha un nou comentari per %{author_name} %{author_nickname} a %{resource_title}. comment_by_followed_user_group: email_intro: '%{author_name} ha deixat un comentari a%{resource_title}. Pots llegir-lo en aquesta pàgina:' - email_outro: Reps aquesta notificació perquè segueixes a %{author_name}. Pots deixar de seguir aquest grup des de la seva pàgina de perfil. + email_outro: Reps aquesta notificació perquè segueixes a "%{author_name}". Pots deixar de seguir aquest grup des de la seva pàgina de perfil. email_subject: Hi ha un nou comentari de %{author_name} en %{resource_title} notification_title: Hi ha un nou comentari per %{author_name} %{author_nickname} a %{resource_title}. comment_created: email_intro: "S'ha comentat %{resource_title}. Pots llegir el comentari d'aquesta pàgina:" - email_outro: Has rebut aquesta notificació perquè estàs seguint "%{resource_title}" o la seva autora. Pots deixar de seguir-la des de l'enllaç anterior. + email_outro: Has rebut aquesta notificació perquè estàs seguint el comentari "%{resource_title}" o la seva autora. Pots deixar de seguir-la des de l'enllaç anterior. email_subject: Hi ha un nou comentari de %{author_name} a %{resource_title} notification_title: Hi ha un nou comentari de %{author_name} %{author_nickname} en %{resource_title} comment_downvoted: email_intro: El teu comentari a "%{resource_title}" ha rebut un vot negatiu. Ara té un total de %{upvotes} vots positius i %{downvotes} vots negatius. - email_outro: Has rebut aquesta notificació perquè ets autora d'aquest comentari. + email_outro: Has rebut aquesta notificació perquè vas fer aquest comentari. email_subject: El teu comentari a "%{resource_title}" ha rebut un vot negatiu. notification_title: El teu comentari a "%{resource_title}" ha rebut un vot negatiu. Ara té un total de %{upvotes} vots positius i %{downvotes} vots negatius. comment_upvoted: email_intro: El teu comentari a "%{resource_title}" ha rebut un vot positiu. Ara té un total de %{upvotes} vots positius i %{downvotes} vots negatius. - email_outro: Has rebut aquesta notificació perquè ets autora d'aquest comentari. + email_outro: Has rebut aquesta notificació perquè vas fer aquest comentari. email_subject: El teu comentari a "%{resource_title}" ha rebut un vot positiu. notification_title: El teu comentari a "%{resource_title}" ha rebut un vot positiu. Ara té un total de %{upvotes} vots positius i %{downvotes} vots negatius. reply_created: @@ -155,12 +155,12 @@ ca: notification_title: %{author_name} %{author_nickname} ha respost el teu comentari a %{resource_title} user_group_mentioned: email_intro: Un grup al qual pertanys ha estat esmentat - email_outro: Has rebut aquesta notificació perquè formes part del grup %{group_name} que ha estat esmentat a %{resource_title}. + email_outro: Has rebut aquesta notificació perquè formes part del grup "%{group_name}" que ha estat esmentat a %{resource_title}. email_subject: T'han esmentat a %{resource_title} com a membre de %{group_name} notification_title: %{author_name} %{author_nickname} t'ha esmentat com a membre de %{group_name} %{group_nickname} a %{resource_title} user_mentioned: email_intro: Has estat esmentada - email_outro: Has rebut aquesta notificació perquè has estat esmentada a %{resource_title}. + email_outro: Has rebut aquesta notificació perquè t'han esmentat al comentari "%{resource_title}". email_subject: Has estat esmentada a %{resource_title} notification_title: Has estat esmentada a %{resource_title} per %{author_name} %{author_nickname} metrics: diff --git a/decidim-comments/config/locales/es.yml b/decidim-comments/config/locales/es.yml index c333da146be93..87b2c481a7c9d 100644 --- a/decidim-comments/config/locales/es.yml +++ b/decidim-comments/config/locales/es.yml @@ -125,7 +125,7 @@ es: comments: comment_by_followed_user: email_intro: "%{author_name} ha dejado un comentario en %{resource_title}. Puedes leerlo en esta página:" - email_outro: Has recibido esta notificación porque sigues "%{author_name}". Puedes dejar de seguir a esta participante desde su página de perfil. + email_outro: Has recibido esta notificación porque sigues a "%{author_name}". Puedes dejar de seguir a esta participante desde su página de perfil. email_subject: Hay un nuevo comentario de %{author_name} en %{resource_title} notification_title: Hay un nuevo comentario de %{author_name} %{author_nickname} en %{resource_title}. comment_by_followed_user_group: @@ -135,32 +135,32 @@ es: notification_title: Hay un nuevo comentario de %{author_name} %{author_nickname} en %{resource_title}. comment_created: email_intro: "%{resource_title} ha sido comentado. Puedes leer el comentario en esta página:" - email_outro: Has recibido esta notificación porque está siguiendo "%{resource_title}" o su autora. Puedes dejar de seguirla desde el enlace anterior. + email_outro: Has recibido esta notificación porque estás siguiendo el comentario "%{resource_title}" o a su autora. Puedes dejar de seguirla desde el enlace anterior. email_subject: Hay un nuevo comentario de %{author_name} en %{resource_title} notification_title: Hay un nuevo comentario de %{author_name} %{author_nickname} en %{resource_title} comment_downvoted: email_intro: Tu comentario en "%{resource_title}" ha sido votado negativamente. Ahora tiene un total de %{upvotes} votos positivos y %{downvotes} votos negativos. - email_outro: Has recibido esta notificación porque eres la autora de este comentario. + email_outro: Has recibido esta notificación porque hiciste este comentario. email_subject: Su comentario en "%{resource_title}" ha sido votado negativamente. notification_title: Tu comentario en "%{resource_title}" ha sido votado negativamente. Ahora tiene un total de %{upvotes} votos positivos y %{downvotes} votos negativos. comment_upvoted: email_intro: Tu comentario en "%{resource_title}" ha sido votado postivamente. Ahora tiene un total de %{upvotes} votos positivos y %{downvotes} votos negativos. - email_outro: Has recibido esta notificación porque eres la autora de este comentario. + email_outro: Has recibido esta notificación porque hiciste este comentario. email_subject: Tu comentario en "%{resource_title}" ha sido votado positivamente. notification_title: Tu comentario en "%{resource_title}" ha sido votado positivamente. Ahora tiene un total de %{upvotes} votos positivos y %{downvotes} votos negativos. reply_created: email_intro: "%{author_name} ha respondido a tu comentario en %{resource_title}. Puedes leerlo en esta página:" - email_outro: Has recibido esta notificación porque tu comentario fue respondido. + email_outro: Has recibido esta notificación porque han respondido a tu comentario. email_subject: "%{author_name} ha respondido a tu comentario en %{resource_title}" notification_title: %{author_name} %{author_nickname} ha respondido a tu comentario en %{resource_title} user_group_mentioned: email_intro: Se ha mencionado un grupo al que perteneces - email_outro: Has recibido esta notificación porque formas parte del grupo %{group_name} que ha sido mencionado en %{resource_title}. + email_outro: Has recibido esta notificación porque formas parte del grupo "%{group_name}" que ha sido mencionado en "%{resource_title}". email_subject: Te han mencionado en %{resource_title} como miembro de %{group_name} notification_title: %{author_name} %{author_nickname} te ha mencionado en %{resource_title} como miembro de %{group_name} %{group_nickname} user_mentioned: email_intro: Has sido mencionada - email_outro: Has recibido esta notificación porque has sido mencionada en %{resource_title}. + email_outro: Has recibido esta notificación porque te han mencionado en el comentario "%{resource_title}". email_subject: Has sido mencionada en %{resource_title} notification_title: Has sido mencionada en %{resource_title} por %{author_name} %{author_nickname} metrics: diff --git a/decidim-comments/config/locales/sq-AL.yml b/decidim-comments/config/locales/sq-AL.yml index 44ddadc95a8f3..5acebda500f73 100644 --- a/decidim-comments/config/locales/sq-AL.yml +++ b/decidim-comments/config/locales/sq-AL.yml @@ -1 +1,39 @@ +--- sq: + decidim: + components: + add_comment_form: + form: + user_group_id: + label: Komento si + opinion: + label: Mendimi jot mbi këtë temë + negative: Negativ + negative_selected: Mendimi jot mbi këtë temë është negativ + neutral: Neutral + neutral_selected: Mendimi jot mbi këtë temë është neutral + positive: Pozitiv + positive_selected: Mendimi jot mbi këtë temë është pozitiv + remaining_characters: "%{count} karaktere të mbetura" + remaining_characters_1: "%{count} karakter i mbetur" + title: Shto komentin tënd + comment: + alignment: + against: Kundër + in_favor: Pro + confirm_destroy: A je i sigurt që do ta fshish këtë koment? + delete: Fshi + deleted_at: Komenti u fshi në datën %{date} + edit: Përpuno + edited: Ndryshuar + hide_replies: Fshih përgjigjet + moderated_at: Komenti u moderua në datën %{date} + reply: Përgjigju + report: + action: Raporto + already_reported: Kjo përmbajtje është raportuar nga të tjerë dhe do rishikohet nga administratorët. + close: Mbyll + description: Përmbajtje e papërshtatshme? + details: Komente të tjera + reasons: + offensive: Përmban racizëm, seksizëm, ofendime, sulme personale, kërcënime me vdekje, shtyrje për vetëvrasje apo forma të tjera të gjuhës së urrejtjes. diff --git a/decidim-conferences/config/locales/bg.yml b/decidim-conferences/config/locales/bg.yml index b024f8164a24a..4a1a346480a7b 100644 --- a/decidim-conferences/config/locales/bg.yml +++ b/decidim-conferences/config/locales/bg.yml @@ -6,3 +6,87 @@ bg: assemblies_ids: Свързани събрания banner_image: Банер изображение consultations_ids: Свързани консултации + errors: + models: + conference_registration_invite: + attributes: + email: + already_invited: На този имейл вече е изпратена покана + decidim: + admin: + actions: + new_conference: Нова конференция + conferences: + index: + not_published: Не публикувано + menu: + conferences_submenu: + info: Информация + conferences: + admin: + conference_invites: + index: + filter: + accepted: Прието + all: Всички + rejected: Отхвърлен + filter_by: Филтрирай по + new: + explanation: Участникът ще бъде поканен да се присъедини към конференция. Дори имейлът му да не е регистриран, той също ще бъде поканен в организацията. + conference: + show: + free: Свободно + conference_program: + program_meeting: + content: Съдържание + streaming: Стриймване + show: + day: Ден + conference_registrations: + create: + unauthorized: Трябва да влезете в акаунта си, преди да се регистрирате за конференцията. + decline_invitation: + unauthorized: Трябва да влезете в акаунта си, преди да откажете поканата. + conference_speaker_cell: + twitter_handle: + go_to_twitter: Към Twitter + conferences: + show: + make_conference_registration: 'Регистрирайте се за конференцията:' + mailer: + conference_registration_mailer: + confirmation: + subject: Регистрацията Ви за конференцията е потвърдена + pending_validation: + subject: Регистрацията Ви за конференцията очаква потвърждение + pages: + home: + highlighted_conferences: + active_conferences: Активни конференции + conferences_button_title: Връзка към страницата „Конференции“, на която се показват всички конференции + photo: + image: + attributes: + alt: Медийно изображение + show: + close_modal: Затвори прозореца + photo: Изображение + photos_list: + show: + related_photos: Изображения + shared: + conference_user_login: + already_account: Имате ли вече профил в CivilPower? + new_user: Нов потребител? + sign_in: Влезте в профила си, за да се регистрирате за конференцията + sign_up: Създайте си профил в CivilPower, за да се регистрирате за конференцията + show: + related_consultations: Свързани консултации + log: + value_types: + conference_presenter: + not_found: 'Конференцията не бе намерена в базата данни (Идент. №: %{id})' + layouts: + decidim: + conferences_nav: + conference_menu_item: Информация diff --git a/decidim-conferences/config/locales/ca.yml b/decidim-conferences/config/locales/ca.yml index fd2fa87117e7a..3c96849d85326 100644 --- a/decidim-conferences/config/locales/ca.yml +++ b/decidim-conferences/config/locales/ca.yml @@ -546,7 +546,7 @@ ca: notification_title: La teva inscripció a jornada %{resource_title} està pendent de confirmació. conference_registrations_over_percentage: email_intro: Les places ocupades per a la jornada "%{resource_title}" superen el %{percentage}%. - email_outro: Has rebut aquesta notificació perquè ets administradora de l'espai participatiu de la jornada. + email_outro: Has rebut aquesta notificació perquè administres l'espai participatiu de la jornada. email_subject: Les places ocupades per a la jornada "%{resource_title}" superen el %{percentage}% notification_title: Les places ocupades per a la jornada %{resource_title} superen el %{percentage}%. conference_updated: diff --git a/decidim-consultations/config/locales/bg.yml b/decidim-consultations/config/locales/bg.yml index d0e375da96f10..e301e5694d7ac 100644 --- a/decidim-consultations/config/locales/bg.yml +++ b/decidim-consultations/config/locales/bg.yml @@ -1 +1,21 @@ +--- bg: + activerecord: + errors: + models: + decidim/consultations/vote: + attributes: + question: + invalid_num_votes: Броят на гласовете е невалиден + decidim: + admin: + consultations: + deprecation_warning: Модулът за консултации ще бъде отхвърлен в близко бъдеще. Работим върху следващата криптографски защитена версия, наречена Гласувания. + question_configuration: + disable_external_voting: Моля, деактивирайте външното гласуване за разширени конфигурации + consultations: + last_activity: + new_question_at_html: "Нов въпрос в(ъв) %{link}" + question_votes: + create: + error: Възникна проблем с гласуването по въпроса diff --git a/decidim-core/config/locales/bg.yml b/decidim-core/config/locales/bg.yml index 50e1aa8bf88c6..b908e0a189ce8 100644 --- a/decidim-core/config/locales/bg.yml +++ b/decidim-core/config/locales/bg.yml @@ -23,6 +23,7 @@ bg: password_confirmation: Потвърдете паролата си personal_url: Персонален URL remove_avatar: Премахни аватара + tos_agreement: Договор за правилата и условията на ползване models: decidim/attachment_created_event: Прикачени файлове decidim/component_published_event: Активен компонент @@ -59,6 +60,9 @@ bg: booleans: 'false': 'Не' 'true': 'Да' + carrierwave: + errors: + file_size_too_large: Размерът на файла е твърде голям date: formats: decidim_short: "%d/%m/%Y" @@ -71,7 +75,9 @@ bg: logo: "Официално лого на %{organization}" skip_button: Към съдържанието account: + blocked: Този акаунт е блокиран поради нарушение на Правилата и условията за ползване delete: + alert: Това действие не може да бъде върнато. Ако изтриете акаунта си, няма да можете да влезете с идентификационните си данни. Изтриването на вашия акаунт ще доведе до анонимизиране на вашите приноси. Все пак ще можете да създадете нов акаунт, но тези приноси няма да бъдат свързани с него. confirm: close: Затвори прозореца ok: Да, желая да изтрия профила си @@ -84,7 +90,11 @@ bg: download_your_data_export: file_no_exists: Файлът не съществува notice: Свалянето на Вашите данни е в процес. Ще получите ел. писмо когато приключи. + email_change: + body1: Изпратихме имейл на %{unconfirmed_email}, за да потвърдим новия ви имейл адрес. + resend_successfully: Имейлът за потвърждение е препратен успешно на %{unconfirmed_email} show: + available_locales_helper: Изберете езика, който искате да използвате, за да разглеждате и получавате известия в платформата change_password: Смяна на паролата update_account: Обнови профил update: @@ -94,6 +104,8 @@ bg: admin: actions: cancel: Отказ + password_change: + alert: Трябва да промените паролата си, за да продължите по-нататък admin_log: area: create: "%{user_name} създаде район %{resource_name}" @@ -232,9 +244,12 @@ bg: download: Изтегли файл documents: related_documents: Свързани документи + geocoding: + geocoded_address: Адрес photos: related_photos: Свързани изображения author: + avatar_multiuser: Аватар за множество потребители comments: one: коментар other: коментари @@ -264,6 +279,7 @@ bg: foo: Нещо2 name: Нещо1 идентификация granted_at: Предоставено на %{timestamp} + renew: Подновете верификацията sms: explanation: Предоставете мобилният си номер, за да проверим идентичността Ви. name: Код чрез SMS @@ -284,6 +300,8 @@ bg: authorize: Идентифицирайте се чрез "%{authorization}" explanation: За да изпълните това действие е необходима идентификация чрез "%{authorization}". title: Необходима е идентификация + ok: + title: Бяхте оторизиран, докато сте на тази страница. Моля, презаредете страницата, за да изпълните действието си pending: explanation: За да изпълните това действие е необходима идентификация чрез "%{authorization}", но Вашата идентификация все още не е завършена resume: Проверете напредъка на Вашата "%{authorization}" идентификация @@ -401,6 +419,8 @@ bg: register: Създай профил sign_in_disabled: Може да влезете с външен профил sign_up_disabled: Регистрацията е забранена, може да ползвате съществуващ профил за достъп + user: + timed_out: Бяхте неактивни твърде дълго и автоматично сте разлогнати от услугата. Ако искате да продължите да използвате услугата, моля, влезте отново. shared: newsletter_modal: buttons: @@ -430,7 +450,14 @@ bg: ready: Готов show: download_data: Изтегляне на данни + download_data_description: Файл, съдържащ цялата информация, свързана с вашия акаунт, ще бъде изпратен до %{user_email}. Този имейл ще съдържа .zip файл и парола за отварянето му.

    За да разархивирате файла, ще ви трябва 7-Zip (for Windows) или Keka (for MacOS). Ако използвате Linux, през повечето време ще го имате инсталиран по подразбиране. Ако не, можете да използвате File Roller или PeaZip). request_data: Заяви данни + editor_images: + create: + error: Грешка при качването на изображението + success: Изображението е качено успешно + endorsable: + endorsements_count: Брой одобрения endorsement_buttons_cell: already_endorsed: Одобрен endorse: Одобрявам @@ -566,6 +593,8 @@ bg: email_outro: Получавате това известие, защото сте администратор на платформата. email_subject: Група от участници обнови профила си notification_title: Групата %{user_group_name} обнови профила си, което я прави "непроверена". Проверете я на админ панел. + nickname_event: + notification_body: Коригирахме начина, по който се използват прякорите, така че да няма дублиращи се имена и затова премахнахме правилото за чувствителност към главни и малки букви.
    Вашият псевдоним е създаден след друг със същото име, така че автоматично го преименувахме. Можете да го промените от настройките на вашия акаунт. notification_event: notification_title: Настъпи събитие в %{resource_title}. resource_endorsed: @@ -610,6 +639,7 @@ bg: create: button: Следвай error: Възникна проблем със следването на този ресурс. + participatory_space: Следвате %{resource_name} destroy: button: Спри следването error: Възникна проблем с отказа от следване на този ресурс. @@ -621,10 +651,17 @@ bg: password: Паролата е твърде къса. password_confirmation: Паролата и потвърждението на паролата трябва да съвпадат. error: В това поле има грешка. + file_help: + file: + message_2: Относно изображенията, препотъчваме използването на пейзажно-ориентирани изображения, системата изрязва изображението (при портретна ориентация). + image: + message_1: За предпочитане пейзажно-ориентирано изображение, което няма текст. upload: labels: cancel: Отказ save: Запази + upload_help: + dropzone: Тук пуснете файлове с влачене или просто щракнете за избор на файл за качване gamification: all_badges_link: Виж всички достъпни значки. badges: @@ -713,6 +750,7 @@ bg: success: Заявката за присъединяване е създадена успешно. Администраторът ще прегледа вашата заявка, преди да ви приеме в групата. leave: error: Възникна проблем при напускане на групата + last_admin: Не можете да премахнете себе си от тази група, тъй като сте последният администратор. Направете друг член администратор, за да напуснете групата. success: Групата е напусната успешно. members: accept_or_reject_join_requests: 'Следните участници кандидатстват за присъединяване към групата. Приемете или отхвърлете техните заявки:' @@ -812,6 +850,8 @@ bg: modal_title: Нов разговор no_results: Няма резултати participant_with_disabled_message_reception: Участника е забранил получаването на съобщения + conversation: + show: Показване на разговора с %{sender} create: error: Разговора не започна. Опитайте по-късно index: @@ -823,16 +863,20 @@ bg: next: Напред no_conversations: Все още нямате разговори title: Разговори + to: До reply: placeholder: Вашият отговор... send: Изпрати title: Отговори show: chat_with: Разговор с + deleted_accounts: Не можете да водите разговор с изтрити акаунти. title: Разговор с %{usernames} start: send: Изпрати title: Започни разговор + update: + error: Съобщението не е изпратено, поради възникнала грешка. Моля, опитайте отново по-късно. metrics: followers: description: Брой участници, които следват това пространство @@ -849,6 +893,7 @@ bg: newsletter_mailer: newsletter: note: Получихте това писмо, защото сте абонирани за бюлетини на %{organization_name}. Можете да промените вашите настройки на страницата "известия". + see_on_website: Не виждате това писмо правилно? Вижте го на сайта. unsubscribe: За да се откажете от получаването на такъв тип писма Отпишете се. newsletter_templates: basic_only_text: @@ -895,16 +940,21 @@ bg: notifications_settings: show: allow_public_contact: Позволявам на всеки да ми изпраща директно съобщение, дори и да не го следвам. + allow_push_notifications: Получавайте насочени известия, за да разберете какво се случва, когато не сте на платформата. Можете да ги изключите по всяко време. direct_messages: Получавайте директни съобщения от всеки everything_followed: Всичко, което следвам newsletter_notifications: Желая да получавам бюлетин newsletters: Бюлетин с новости own_activity: Моята дейност, например когато някой коментира мое предложение или ме спомене + push_notifications_reminder: За да получавате известия от платформата, първо трябва да ги разрешите в настройките на браузъра си. receive_notifications_about: Искам да получавам известия за update_notifications_settings: Запази промените update: error: Има проблем с обновяването на настройките Ви за известия. success: Настройките Ви за известия са обновени успешно. + offline: + show: + message: Изглежда, че в момента сте офлайн. Моля, опитайте отново по-късно. open_data: not_available_yet: Файловете с отворени данни все още не са налице. Опитайте отново след няколко минути. own_user_groups: @@ -956,6 +1006,7 @@ bg: form: legend: Съгласявам се с общите условия за ползване refuse: + modal_body: Ако откажете, няма да можете да използвате платформата, но можете да изтеглите данните си и/или да изтриете вашия акаунт. modal_btn_exit: Ще ги прегледам по-късно modal_title: Наистина ли отказвате обновените Общи условия? required_review: @@ -963,8 +1014,13 @@ bg: body: Моля, отделете време за да прегледате обновените Общи условия. В противен случай не може да използвате платформата. participatory_space_private_users: not_allowed: Нямате права да преглеждате това съдържание + passwords: + update: + error: Възникна проблем при актуализирането на паролата + success: Паролата е успешно променена profile: deleted: Участника е изтрит + inaccessible_message: Този профил е недостъпен поради нарушение на Правилата и условията за ползване! view: Изглед profiles: default_officialization_text_for_user_groups: Тази група е публично проверена, нейното име е потвърдено, че съответства на истинското и име @@ -1058,7 +1114,10 @@ bg: report: Доклад spam: Съдържа клик-байт, реклама, измами или скриптове. title: Съобщи за проблем + flag_user_modal: + does_not_belong: Съдържа незаконни дейности, заплахи за самоубийство, лична информация или нещо друго, което считате, че е неподходящо за %{organization_name}. floating_help: + close: Затваряне на помощта help: Помощ follow_button: sign_in_before_follow: Моля влезте, преди да извършите това действие @@ -1083,6 +1142,9 @@ bg: share_link: Сподели връзка statistics: comments_count: Коментари + user_activity: + index: + no_activities_warning: Този участник все още няма активности. user_contact_disabled: Този участник не приема директни съобщения. user_conversations: create: @@ -1110,6 +1172,8 @@ bg: send: Изпрати title_reply: Отговори show: + back: Покажи всички разговори + deleted_accounts: Не можете да водите разговор с изтрити акаунти. not_allowed: Този участник не приема вече директни съобщения. title: Разговор с %{usernames} update: @@ -1148,6 +1212,7 @@ bg: number_of_versions: Версии title: Версии versions_list_item: + back: Покажи всички версии show: version_index: Версия %{index} welcome_notification: @@ -1248,6 +1313,7 @@ bg: confirm_new_password: Потвърди нова парола new_password: Нова парола password_help: "Минимум %{minimun_characters} символа, не трябва да са разпространени (например, 123456) и трябва да са различни от вашите име и ел. поща." + password_help_admin: "Минимум %{minimun_characters} символа, не трябва да са разпространени (например, 123456) и трябва да са различни от вашите име и ел. поща." new: forgot_your_password: Забравили сте паролата си? send_me_reset_password_instructions: Изпрати ми инструкции за възстановяване на паролата @@ -1307,6 +1373,7 @@ bg: not_saved: one: 'При обработката на заявката Ви възникна грешка:' other: 'При обработката на заявката Ви имаше няколко грешки:' + password_confirmation_message: 'Написаното в „Потвърдете паролата си“ не съответства на паролата' too_many_marks: използва твърде много последователни препинателни знаци (напр. ! и ?) too_much_caps: използва твърде много главни букви (над 25% от текста) forms: @@ -1336,6 +1403,10 @@ bg: expire_time_html: Вашата сесия изтича след %{minutes} минути. notifications_dashboard: mark_all_as_read: Маркирай всичко като прочетено + offline_banner: + cache_version_page: Уви! Вашата мрежа е офлайн. Това е предишна кеширана версия на страницата, която посещавате, възможно е съдържанието да не е актуално. + timeout_modal: + sign_out: Изход user_menu: admin_dashboard: Администраторски панел conversations: Разговори @@ -1357,6 +1428,7 @@ bg: locale: name: български език password_validator: + blacklisted: е в черния списък domain_included_in_password: е твърде подобно на името на домейна email_included_in_password: е твърде подобно на Вашата ел. поща fallback: не е валидно @@ -1413,6 +1485,7 @@ bg: dropdown: choose_diff_view_html: 'HTML режим на изглед:' choose_diff_view_mode: 'Сравни режим на изглед:' + choose_diff_view_mode_menu: Изберете режим на сравнение option_escaped: Escaped option_split: Един до друг option_unescaped: Unescaped diff --git a/decidim-core/config/locales/ca.yml b/decidim-core/config/locales/ca.yml index 6381713b55449..fabd4845cf0df 100644 --- a/decidim-core/config/locales/ca.yml +++ b/decidim-core/config/locales/ca.yml @@ -621,29 +621,29 @@ ca: amendment_accepted: affected_user: email_intro: 'S''ha acceptat una esmena per %{amendable_title}. Pots veure-ho des d''aquesta pàgina:' - email_outro: Has rebut aquesta notificació perquè ets una autora de %{amendable_title}. + email_outro: Has rebut aquesta notificació perquè s'ha acceptat una esmena presentada a l'apartat "%{amendable_title}" que administres. email_subject: Esmena acceptada per %{amendable_title} a %{emendation_author_nickname} notification_title: L'esmena creada per %{emendation_author_nickname} ha estat acceptada per %{amendable_title}. follower: email_intro: 'S''ha acceptat una esmena per %{amendable_title}. Pots veure-ho en aquesta pàgina:' - email_outro: Has rebut aquesta notificació perquè estàs seguint %{amendable_title}. Pots deixar de rebre notificacions seguint l'enllaç anterior. + email_outro: Has rebut aquesta notificació perquè estàs seguint l'esmena "%{amendable_title}". Pots deixar de rebre notificacions seguint l'enllaç anterior. email_subject: Esmena acceptada per %{amendable_title} de %{emendation_author_nickname} notification_title: L'esmena creada per %{emendation_author_nickname} ha estat acceptada per %{amendable_title}. amendment_created: affected_user: email_intro: 'S''ha creat una nova esmena per a %{amendable_title}. La pots veure des d''aquesta pàgina:' - email_outro: Has rebut aquesta notificació perquè ets autora de %{amendable_title}. + email_outro: Has rebut aquesta notificació perquè s'ha presentat una esmena a l'apartat "%{amendable_title}" que administres. email_subject: Nova esmena per a %{amendable_title} notification_title: S'ha creat una nova esmena per a %{amendable_title}. follower: email_intro: 'S''ha creat una nova esmena per a %{amendable_title}. La pots veure des d''aquesta pàgina:' - email_outro: Has rebut aquesta notificació perquè estàs seguint %{amendable_title}. Pots deixar de rebre notificacions seguint l'enllaç anterior. + email_outro: Has rebut aquesta notificació perquè estàs seguint l'esmena "%{amendable_title}". Pots deixar de rebre notificacions seguint l'enllaç anterior. email_subject: Nova esmena per a %{amendable_title} notification_title: S'ha creat una nova esmena per a %{amendable_title}. amendment_promoted: affected_user: email_intro: 'Una esmena rebutjada per %{amendable_title} ha estat publicada com una nova %{amendable_type}. La pots veure des d''aquesta pàgina:' - email_outro: Has rebut aquesta notificació perquè ets autora de %{amendable_title}. + email_outro: Has rebut aquesta notificació perquè s'ha promogut una esmena a l'apartat "%{amendable_title}" que administres. email_subject: Una nova esmena feta per %{emendation_author_nickname} s'ha publicat com a nova %{amendable_type} notification_title: Una esmena rebutjada per %{amendable_title} ha estat publicada com un nou %{amendable_type} per %{emendation_author_nickname}. follower: @@ -654,7 +654,7 @@ ca: amendment_rejected: affected_user: email_intro: 'Una esmena s''ha rebutjat per %{amendable_title}. La pots veure des d''aquesta pàgina:' - email_outro: Has rebut aquesta notificació perquè ets autora de %{amendable_title}. + email_outro: Has rebut aquesta notificació perquè s'ha rebutjat una esmena a l'apartat "%{amendable_title}" que administres. email_subject: Esmena rebutjada per %{amendable_title} a %{emendation_author_nickname} notification_title: L'esmena creada per %{emendation_author_nickname} ha estat rebutjada per %{amendable_title}. follower: @@ -665,13 +665,13 @@ ca: attachments: attachment_created: email_intro: 'S''ha afegit un nou document a %{resource_title}. Pots veure''l des d''aquesta pàgina:' - email_outro: Has rebut aquesta notificació perquè estàs seguint %{resource_title}. Pots deixar de rebre notificacions seguint l'enllaç anterior. + email_outro: Has rebut aquesta notificació perquè estàs seguint "%{resource_title}". Pots deixar de rebre notificacions seguint l'enllaç anterior. email_subject: S'ha produït una actualització per a %{resource_title} notification_title: S'ha afegit un nou document a %{resource_title} components: component_published: email_intro: 'Ja està actiu el component %{resource_title} per %{participatory_space_title}. Pots veure''l des d''aquesta pàgina:' - email_outro: Has rebut aquesta notificació perquè estàs seguint %{participatory_space_title}. Pots deixar de rebre notificacions seguint l'enllaç anterior. + email_outro: Has rebut aquesta notificació perquè estàs seguint l'espai "%{participatory_space_title}". Pots deixar de rebre notificacions seguint l'enllaç anterior. email_subject: Una actualització a %{participatory_space_title} notification_title: Ja està actiu el component %{resource_title} per %{participatory_space_title} email_event: @@ -703,17 +703,17 @@ ca: notification_title: T'han convidat a unir-te al grup %{user_group_name}. Comprova els grups de la pàgina en el teu perfil per acceptar la invitació! join_request_accepted: email_intro: Felicitats! Una administradora del grup %{user_group_name} ha acceptat la teva sol·licitud per unir-te. - email_outro: Has rebut aquesta notificació perquè s'ha actualitzat la teva sol·licitud per a formar-ne part. + email_outro: Has rebut aquesta notificació perquè s'ha actualitzat la teva sol·licitud per a formar part del grup. email_subject: La teva sol·licitud per a unir-te al grup %{user_group_name} ha estat acceptada! notification_title: Has estat acceptada al grup %{user_group_name}. join_request_created: email_intro: Algú ha sol·licitat unir-se al grup %{user_group_name}. Pots acceptar-la o rebutjar-la des de la pàgina de membres. - email_outro: Has rebut aquesta notificació perquè ets administradora del grup %{user_group_name}. + email_outro: Has rebut aquesta notificació perquè administres el grup "%{user_group_name}". email_subject: Algú ha sol·licitat unir-se al grup %{user_group_name}! notification_title: Algú ha sol·licitat unir-se al grup %{user_group_name}. Pots acceptar o rebutjar la sol·licitud des de els membres del grup de la pàgina. join_request_rejected: email_intro: Una administradora del grup %{user_group_name} ha rebutjat la teva sol·licitud per unir-te. - email_outro: Has rebut aquesta notificació perquè la teva sol·licitud d'incorporació s'ha actualitzat. + email_outro: Has rebut aquesta notificació perquè la teva sol·licitud d'incorporació al grup s'ha actualitzat. email_subject: La teva sol·licitud per unir-te al grup %{user_group_name} ha estat rebutjada! notification_title: La teva sol·licitud per unir-te al grup %{user_group_name} ha estat rebutjada. promoted_to_admin: @@ -733,7 +733,7 @@ ca: notification_title: S'ha creat el grup d'usuàries %{user_group_name}. Ara pots verificar-ho al taulell d'administració. user_group_updated: email_intro: El grup d'usuàries %{user_group_name} ha actualitzat el seu perfil perdent-ne la verificació. Pots tornar a verificar-lo a través del taulell d'administració. - email_outro: Has rebut aquesta notificació perquè ets una de les administradores de la plataforma. + email_outro: Has rebut aquesta notificació perquè admnistres la plataforma. email_subject: Un grup d'usuàries ha actualitzat el seu perfil notification_title: El grup d'usuàries %{user_group_name} ha actualitzat el seu perfil perdent-ne la verificació. Pots tornar a verificar-lo a través del taulell d'administració. nickname_event: @@ -743,25 +743,25 @@ ca: reports: resource_hidden: email_intro: Una administradora ha eliminat el teu %{resource_type} degut a que has estat reportada com a %{report_reasons}. - email_outro: Has rebut aquesta notificació perquè ets autora d'un contingut eliminat. + email_outro: Has rebut aquesta notificació perquè s'ha eliminiat un contingut que havies creat. email_subject: S'ha eliminat el/la teu/teva %{resource_type} notification_title: |- Una administradora ha eliminat el teu %{resource_type} degut a que has estat reportada com a %{report_reasons}..
    %{resource_content} resource_endorsed: email_intro: '%{endorser_name} %{endorser_nickname}, a qui segueixes, acaba d''adherir-se a "%{resource_title}" que et pot resultar interessant, revisa-la i contribueix:' - email_outro: Has rebut aquesta notificació perquè estàs seguint a %{endorser_nickname}. Pots deixar de rebre notificacions seguint l'enllaç anterior. + email_outro: Has rebut aquesta notificació perquè estàs seguint a "%{endorser_nickname}". Pots deixar de rebre notificacions seguint l'enllaç anterior. email_subject: "%{endorser_nickname} s'ha adherit a una proposta" notification_title: %{endorser_name} %{endorser_nickname} s'ha adherit a %{resource_title} (%{resource_type}). users: profile_updated: email_intro: La pàgina de perfil de %{name} (%{nickname}), a qui estàs seguint, s'ha actualitzat. - email_outro: Has rebut aquesta notificació perquè estàs seguint a %{nickname}. Pots deixar de rebre notificacions seguint l'enllaç anterior. + email_outro: Has rebut aquesta notificació perquè estàs seguint a "%{nickname}". Pots deixar de rebre notificacions seguint l'enllaç anterior. email_subject: "%{nickname} ha actualitzat el seu perfil" notification_title: El perfi l de %{name} (%{nickname}), a qui estàs seguint, s'ha actualitzat. user_officialized: email_intro: La participant %{name} (%{nickname}) ha estat oficialitzada. - email_outro: Has rebut aquesta notificació perquè ets una de les administradores de la plataforma. + email_outro: Has rebut aquesta notificació perquè administres la plataforma. email_subject: "S'ha oficialitzat a %{name}" notification_title: La participant %{name} (%{nickname}) ha estat oficialitzada. export_mailer: @@ -1019,13 +1019,13 @@ ca: messaging: conversation_mailer: comanagers_new_conversation: - admin_in_group: Reps aquesta notificació perquè ets administradora de %{group}. + admin_in_group: Reps aquesta notificació perquè administres el grup "%{group}". greeting: Hola, %{recipient}! intro: "%{manager} ha iniciat una nova conversa en nom de %{group}. Fes clic aquí per veure-la:" outro: Gaudeix de Decidim! subject: "%{manager} ha iniciat una nova conversa com a %{group}" comanagers_new_message: - admin_in_group: Reps aquesta notificació perquè ets administradora de %{group}. + admin_in_group: Reps aquesta notificació perquè administres el grup "%{group}". greeting: Hola, %{recipient}! intro: "%{manager} ha publicat nous missatge a una conversa en nom de %{group}. Fes clic aquí per veure-la:" outro: Gaudeix de Decidim! @@ -1036,13 +1036,13 @@ ca: outro: Gaudeix de Decidim! subject: "%{sender} ha iniciat una conversa amb tu" new_group_conversation: - admin_in_group: Reps aquesta notificació perquè ets administradora de %{group}. + admin_in_group: Reps aquesta notificació perquè administres el grup "%{group}". greeting: Hola, %{recipient}! intro: "%{sender} ha iniciat una nova conversa amb el %{group}. Fes clic aquí per veure-la:" outro: Gaudeix de Decidim! subject: "%{sender} ha iniciat una nova conversa amb %{group}" new_group_message: - admin_in_group: Reps aquesta notificació perquè ets administradora de %{group}. + admin_in_group: Reps aquesta notificació perquè administres el grup "%{group}". greeting: Hola, %{recipient}! intro: "%{sender} ha publicat nous missatge a una conversa amb el grup %{group}. Fes clic aquí per veure-la:" outro: Gaudeix de Decidim! diff --git a/decidim-core/config/locales/es.yml b/decidim-core/config/locales/es.yml index bcbd85362ba3b..53a02a50f6bdd 100644 --- a/decidim-core/config/locales/es.yml +++ b/decidim-core/config/locales/es.yml @@ -621,57 +621,57 @@ es: amendment_accepted: affected_user: email_intro: 'Se ha aceptado una enmienda para %{amendable_title}. Puedes verla desde esta página:' - email_outro: Has recibido esta notificación porque eres una autora de %{amendable_title}. + email_outro: Has recibido esta notificación porque se ha aceptado una enmienda al apartado "%{amendable_title}" que administras. email_subject: Enmienda aceptada para %{amendable_title} de %{emendation_author_nickname} notification_title: La enmienda creada por %{emendation_author_nickname} ha sido aceptada para %{amendable_title}. follower: email_intro: 'Se ha aceptado una enmienda para %{amendable_title}. Puedes verla desde esta página:' - email_outro: Has recibido esta notificación porque estás siguiendo a %{amendable_title}. Puedes dejar de recibir notificaciones siguiendo el enlace anterior. + email_outro: Has recibido esta notificación porque estás siguiendo la enmienda "%{amendable_title}". Puedes dejar de recibir notificaciones siguiendo el enlace anterior. email_subject: Enmienda aceptada para %{amendable_title} de %{emendation_author_nickname} notification_title: La enmienda creada por %{emendation_author_nickname} ha sido aceptada para %{amendable_title}. amendment_created: affected_user: email_intro: 'Se ha creado una nueva enmienda para %{amendable_title}. Puedes verla desde esta página:' - email_outro: Has recibido esta notificación porque eres una autora de %{amendable_title}. + email_outro: Has recibido esta notificación porque se ha presentado una esmena al apartado "%{amendable_title}" que administras. email_subject: Nueva enmienda para %{amendable_title} notification_title: Se ha creado una nueva enmienda para %{amendable_title}. follower: email_intro: 'Se ha creado una nueva enmienda para %{amendable_title}. Puedes verla desde esta página:' - email_outro: Has recibido esta notificación porque estás siguiendo a %{amendable_title}. Puedes dejar de recibir notificaciones siguiendo el enlace anterior. + email_outro: Has recibido esta notificación porque estás siguiendo la enmienda "%{amendable_title}". Puedes dejar de recibir notificaciones siguiendo el enlace anterior. email_subject: Nueva enmienda para %{amendable_title} notification_title: Se ha creado una nueva enmienda para %{amendable_title}. amendment_promoted: affected_user: email_intro: 'Una enmienda rechazada para %{amendable_title} ha sido publicada como una nueva %{amendable_type}. Puedes verla desde esta página:' - email_outro: Has recibido esta notificación porque eres una autora de %{amendable_title}. + email_outro: Has recibido esta notificación porque se ha promocionado una esmena al apartado "%{amendable_title}" que administras. email_subject: Se ha publicado una enmienda de %{emendation_author_nickname} como nuevo %{amendable_type} notification_title: Un rechazó la enmienda para %{amendable_title} se ha publicado como un nuevo %{amendable_type} por %{emendation_author_nickname}. follower: email_intro: 'Una enmienda rechazada para %{amendable_title} ha sido publicada como nueva %{amendable_type}. Puedes verla desde esta página:' - email_outro: Has recibido esta notificación porque estás siguiendo a %{amendable_title}. Puedes dejar de recibir notificaciones siguiendo el enlace anterior. + email_outro: Has recibido esta notificación porque estás siguiendo la enmienda "%{amendable_title}". Puedes dejar de recibir notificaciones siguiendo el enlace anterior. email_subject: Se ha publicado una enmienda de %{emendation_author_nickname} como nuevo %{amendable_type} notification_title: Un rechazó la enmienda para %{amendable_title} se ha publicado como un nuevo %{amendable_type} por %{emendation_author_nickname}. amendment_rejected: affected_user: email_intro: 'Una enmienda ha sido rechazada por %{amendable_title}. Puedes verla desde esta página:' - email_outro: Has recibido esta notificación porque eres autora de %{amendable_title}. + email_outro: Has recibido esta notificación porque se ha rechazado una enmienda al apartado "%{amendable_title}" que administras. email_subject: Enmienda rechazada por %{amendable_title} de %{emendation_author_nickname} notification_title: La enmienda creada por %{emendation_author_nickname} ha sido rechazada por %{amendable_title}. follower: email_intro: 'Una enmienda ha sido rechazada por %{amendable_title}. Puedes verla desde esta página:' - email_outro: Has recibido esta notificación porque estás siguiendo a %{amendable_title}. Puedes dejar de recibir notificaciones siguiendo el enlace anterior. + email_outro: Has recibido esta notificación porque estás siguiendo la enmienda "%{amendable_title}". Puedes dejar de recibir notificaciones siguiendo el enlace anterior. email_subject: Una enmienda rechazada por %{amendable_title} de %{emendation_author_nickname} notification_title: La enmienda creada por %{emendation_author_nickname} ha sido rechazada por %{amendable_title}. attachments: attachment_created: email_intro: 'Se ha añadido un nuevo documento a %{resource_title}. Puedes verlo desde esta página:' - email_outro: Has recibido esta notificación porque estás siguiendo %{resource_title}. Puedes dejar de recibir notificaciones siguiendo el enlace anterior. + email_outro: Has recibido esta notificación porque estás siguiendo "%{resource_title}". Puedes dejar de recibir notificaciones siguiendo el enlace anterior. email_subject: Se ha producido una actualización para %{resource_title} notification_title: Se ha añadido un nuevo documento a %{resource_title} components: component_published: email_intro: 'Ya está activo el componente %{resource_title} para %{participatory_space_title}. Puedes verlo desde esta página:' - email_outro: Has recibido esta notificación porque estás siguiendo %{participatory_space_title}. Puedes dejar de recibir notificaciones siguiendo el enlace anterior. + email_outro: Has recibido esta notificación porque estás siguiendo el espacio "%{participatory_space_title}". Puedes dejar de recibir notificaciones siguiendo el enlace anterior. email_subject: Una actualización en %{participatory_space_title} notification_title: Ya está activo el componente %{resource_title} para %{participatory_space_title} email_event: @@ -703,17 +703,17 @@ es: notification_title: Te han invitado a unirte al grupo %{user_group_name} . Revisa la pestaña Grupos en tu perfil para aceptar la invitación! join_request_accepted: email_intro: '¡Felicidades! Una administradora del grupo %{user_group_name} ha aceptado tu solicitud para unirte a él.' - email_outro: Has recibido esta notificación porque tu solicitud de incorporación se ha actualizado. + email_outro: Has recibido esta notificación porque tu solicitud de incorporación al grupo se ha actualizado. email_subject: Tu solicitud para unirte al grupo %{user_group_name} ha sido aceptada! notification_title: Has sido aceptada al grupo %{user_group_name}. join_request_created: email_intro: Alguien pidió unirse al grupo %{user_group_name}. Puedes aceptarla o rechazarla desde miembros del grupo en la página. - email_outro: Has recibido esta notificación porque eres administradora del grupo %{user_group_name}. + email_outro: Has recibido esta notificación porque administras el grupo "%{user_group_name}". email_subject: Alguien ha solicitado unirse al grupo %{user_group_name} notification_title: Alguien ha solicitado unirse al grupo %{user_group_name}. Puedes aceptar o rechazar la solicitud desde la página de miembros del grupo. join_request_rejected: email_intro: Una administradora del grupo %{user_group_name} ha rechazado tu solicitud para unirte a él. - email_outro: Has recibido esta notificación porque tu solicitud de incorporación se ha actualizado. + email_outro: Has recibido esta notificación porque tu solicitud de incorporación al grupo se ha actualizado. email_subject: Tu solicitud para unirte al grupo %{user_group_name} ha sido rechazada! notification_title: Tu solicitud para unirte al grupo %{user_group_name} ha sido rechazada. promoted_to_admin: @@ -728,12 +728,12 @@ es: notification_title: Has sido eliminado del grupo %{user_group_name}. user_group_created: email_intro: Se ha creado un nuevo grupo con el nombre %{user_group_name}. Ahora puedes verificarlo, si procede, en el panel de administración. - email_outro: Has recibido esta notificación porque eres una de las administradoras de la plataforma. + email_outro: Has recibido esta notificación porque administras la plataforma. email_subject: Se ha creado un nuevo grupo notification_title: Se ha creado el grupo %{user_group_name}. Ahora puedes verificarlo en el panel de administración. user_group_updated: email_intro: El grupo %{user_group_name} ha actualizado su perfil perdiendo la verificación. Puedes volver a verificarlo a través del panel de administración. - email_outro: Has recibido esta notificación porque eres una de las administradoras de la plataforma. + email_outro: Has recibido esta notificación porque administras la plataforma. email_subject: Un grupo ha actualizado su perfil notification_title: El grupo %{user_group_name} ha actualizado su perfil perdiendo la verificación. Puedes volver a verificarlo a través del panel de administración. nickname_event: @@ -743,25 +743,25 @@ es: reports: resource_hidden: email_intro: Una administradora eliminó su %{resource_type} porque ha sido reportado como %{report_reasons}. - email_outro: Has recibido esta notificación porque eres un autora del contenido eliminado. + email_outro: Has recibido esta notificación porque se ha eliminado un contenido que creaste. email_subject: Tu %{resource_type} ha sido eliminado notification_title: |- Una administradora eliminó tu %{resource_type} porque ha sido reportado como %{report_reasons}.
    %{resource_content} resource_endorsed: email_intro: '%{endorser_name} %{endorser_nickname}, a quien sigues, acaba de adherirse a "%{resource_title}" que puede ser interesante para ti, compruébalo y contribuye:' - email_outro: Has recibido esta notificación porque estás siguiendo a %{endorser_nickname}. Puedes dejar de recibir notificaciones siguiendo el enlace anterior. + email_outro: Has recibido esta notificación porque estás siguiendo a "%{endorser_nickname}". Puedes dejar de recibir notificaciones siguiendo el enlace anterior. email_subject: "%{endorser_nickname} se ha adherido a una propuesta" notification_title: %{endorser_name} %{endorser_nickname} se ha adherido a la propuesta %{resource_title} (%{resource_type}). users: profile_updated: email_intro: La página de perfil de %{name} (%{nickname}), a quien estás siguiendo, se ha actualizado. - email_outro: Has recibido esta notificación porque estás siguiendo a %{nickname}. Puedes dejar de recibir notificaciones siguiendo el enlace anterior. + email_outro: Has recibido esta notificación porque estás siguiendo a "%{nickname}". Puedes dejar de recibir notificaciones siguiendo el enlace anterior. email_subject: "%{nickname} ha actualizado su perfil" notification_title: La página de perfil de %{name} (%{nickname}), a quien estás siguiendo, se ha actualizado. user_officialized: email_intro: La participante %{name} (%{nickname}) ha sido oficializada. - email_outro: Has recibido esta notificación porque eres una de las administradoras de la plataforma. + email_outro: Has recibido esta notificación porque administras la plataforma. email_subject: "Se ha oficializado a %{name}" notification_title: La participante %{name} (%{nickname}) ha sido oficializada. export_mailer: diff --git a/decidim-debates/config/locales/bg.yml b/decidim-debates/config/locales/bg.yml index 23ce88924f778..788c5dcd58840 100644 --- a/decidim-debates/config/locales/bg.yml +++ b/decidim-debates/config/locales/bg.yml @@ -8,11 +8,40 @@ bg: description: Описание decidim: debates: + actions: + new: Ново %{name} debates: + debate: + participate: Участвайте filters: user_groups: Групи + filters_small_view: + close_modal: Затвори прозореца + filter: Филтър + filter_by: Филтрирай по + unfold: Разгъване show: + back: Назад към списъка + date: Дата groups_count: Групи - last_comment_by: Последно коментиран от + last_comment_by: Последен коментар от no_comments_yet: Все още няма коментари participants_count: Участници + versions: + debates: + back_to_resource: Назад към дебата + index: + title: Версии + versions_list: + back_to_resource: Назад към дебата + last_activity: + debate_updated_at_html: "Дебатът беше актуализиран на: %{link}" + new_debate_at_html: "Нов дебат на адрес: %{link}" + events: + debates: + creation_enabled: + notification_title: Вече можете да създавате нови дебати в(ъв) %{participatory_space_title} + gamification: + badges: + commented_debates: + unearned_own: Все още не сте участвали в нито един дебат. diff --git a/decidim-debates/config/locales/ca.yml b/decidim-debates/config/locales/ca.yml index a82798b131010..5f41a276ee5bc 100644 --- a/decidim-debates/config/locales/ca.yml +++ b/decidim-debates/config/locales/ca.yml @@ -193,7 +193,7 @@ ca: email_intro: |- Hola, S'ha creat un nou debat "%{resource_title}" a l'espai participatiu %{participatory_space_title}, dona-hi una ullada i contribueix-hi: - email_outro: Has rebut aquesta notificació perquè estàs seguint %{participatory_space_title}. Pots deixar de rebre notificacions des de l'enllaç anterior. + email_outro: Has rebut aquesta notificació perquè estàs seguint l'espai "%{participatory_space_title}". Pots deixar de rebre notificacions des de l'enllaç anterior. email_subject: Nou debat "%{resource_title}" a %{participatory_space_title} notification_title: S'ha creat el debat %{resource_title} a %{participatory_space_title}. user_followers: @@ -205,12 +205,12 @@ ca: notification_title: %{author_name} %{author_nickname} ha creat el debat %{resource_title}. creation_disabled: email_intro: 'La creació de debats ja no està activa a %{participatory_space_title}. Encara pots participar en debats oberts des d''aquesta pàgina:' - email_outro: Has rebut aquesta notificació perquè estàs seguint l'espai %{participatory_space_title}. Pots deixar de rebre notificacions seguint l'enllaç anterior. + email_outro: Has rebut aquesta notificació perquè estàs seguint l'espai "%{participatory_space_title}". Pots deixar de rebre notificacions seguint l'enllaç anterior. email_subject: S'ha desactivat la creació de debats a %{participatory_space_title} notification_title: La creació de debats està deshabilitada a l'espai %{participatory_space_title} creation_enabled: email_intro: 'Ja pots crear nous debats a %{participatory_space_title}! Comença a participar en aquesta pàgina:' - email_outro: Has rebut aquesta notificació perquè estàs seguint %{participatory_space_title}. Pots deixar de rebre notificacions seguint l'enllaç anterior. + email_outro: Has rebut aquesta notificació perquè estàs seguint l'espai "%{participatory_space_title}". Pots deixar de rebre notificacions seguint l'enllaç anterior. email_subject: Els debats ja estan disponibles a %{participatory_space_title} notification_title: Ja pots començar nous debats a %{participatory_space_title} debate_closed: diff --git a/decidim-debates/config/locales/es-MX.yml b/decidim-debates/config/locales/es-MX.yml index 010d63b42c277..9529e8cb515b1 100644 --- a/decidim-debates/config/locales/es-MX.yml +++ b/decidim-debates/config/locales/es-MX.yml @@ -193,7 +193,7 @@ es-MX: email_intro: |- Hola, Se ha creado un nuevo debate "%{resource_title}" en el espacio participativo %{participatory_space_title}, échale un vistazo y contribuye: - email_outro: Has recibido esta notificación porque estás siguiendo a %{participatory_space_title}. Puedes dejar de recibir notificaciones desde el enlace anterior. + email_outro: Has recibido esta notificación porque estás siguiendo el espacio "%{participatory_space_title}". Puedes dejar de recibir notificaciones desde el enlace anterior. email_subject: Nuevo debate "%{resource_title}" en %{participatory_space_title} notification_title: Se ha creado el debate %{resource_title} en %{participatory_space_title}. user_followers: diff --git a/decidim-debates/config/locales/es-PY.yml b/decidim-debates/config/locales/es-PY.yml index 7e33a64d2ec59..293646321b927 100644 --- a/decidim-debates/config/locales/es-PY.yml +++ b/decidim-debates/config/locales/es-PY.yml @@ -189,7 +189,7 @@ es-PY: email_intro: |- Hola, Se ha creado un nuevo debate "%{resource_title}" en el espacio participativo %{participatory_space_title}, échale un vistazo y contribuye: - email_outro: Has recibido esta notificación porque estás siguiendo a %{participatory_space_title}. Puedes dejar de recibir notificaciones desde el enlace anterior. + email_outro: Has recibido esta notificación porque estás siguiendo el espacio "%{participatory_space_title}". Puedes dejar de recibir notificaciones desde el enlace anterior. email_subject: Nuevo debate "%{resource_title}" en %{participatory_space_title} notification_title: Se ha creado el debate %{resource_title} en %{participatory_space_title}. user_followers: diff --git a/decidim-debates/config/locales/es.yml b/decidim-debates/config/locales/es.yml index dd4b2855ed0ca..f3dade5b389b1 100644 --- a/decidim-debates/config/locales/es.yml +++ b/decidim-debates/config/locales/es.yml @@ -193,24 +193,24 @@ es: email_intro: |- Hola, Se ha creado un nuevo debate "%{resource_title}" en el espacio participativo %{participatory_space_title}, échale un vistazo y contribuye: - email_outro: Has recibido esta notificación porque estás siguiendo a %{participatory_space_title}. Puedes dejar de recibir notificaciones desde el enlace anterior. + email_outro: Has recibido esta notificación porque estás siguiendo el espacio "%{participatory_space_title}". Puedes dejar de recibir notificaciones desde el enlace anterior. email_subject: Nuevo debate "%{resource_title}" en %{participatory_space_title} notification_title: Se ha creado el debate %{resource_title} en %{participatory_space_title}. user_followers: email_intro: |- Hola, %{author_name} %{author_nickname}, a quien estás siguiendo, ha creado un nuevo debate "%{resource_title}". Échale un vistazo y contribuye: - email_outro: Has recibido esta notificación porque estás siguiendo a %{author_nickname}. Puedes dejar de recibir notificaciones siguiendo el enlace anterior. + email_outro: Has recibido esta notificación porque estás siguiendo a "%{author_nickname}". Puedes dejar de recibir notificaciones siguiendo el enlace anterior. email_subject: Nuevo debate "%{resource_title}" de %{author_nickname} notification_title: %{author_name} %{author_nickname} creó el debate %{resource_title}. creation_disabled: email_intro: 'La creación de debates ya no está activa en %{participatory_space_title}. Aún puedes participar en debates abiertos desde esta página:' - email_outro: Has recibido esta notificación porque estás siguiendo el espacio %{participatory_space_title}. Puedes dejar de recibir notificaciones siguiendo el enlace anterior. + email_outro: Has recibido esta notificación porque estás siguiendo el espacio "%{participatory_space_title}". Puedes dejar de recibir notificaciones siguiendo el enlace anterior. email_subject: Se ha desactivado la creación de debates en %{participatory_space_title} notification_title: La creación de debates ahora está deshabilitada en el espacio %{participatory_space_title} creation_enabled: email_intro: '¡Ya puedes crear nuevos debates en %{participatory_space_title}! Comienza a participar en esta página:' - email_outro: Has recibido esta notificación porque estás siguiendo %{participatory_space_title}. Puedes dejar de recibir notificaciones siguiendo el enlace anterior. + email_outro: Has recibido esta notificación porque estás siguiendo el espacio "%{participatory_space_title}". Puedes dejar de recibir notificaciones siguiendo el enlace anterior. email_subject: Los debates ya estan disponibles en %{participatory_space_title} notification_title: Ya puedes empezar nuevos debates en %{participatory_space_title} debate_closed: diff --git a/decidim-elections/config/locales/bg.yml b/decidim-elections/config/locales/bg.yml index 657836f68d02c..a07f4f9a1514d 100644 --- a/decidim-elections/config/locales/bg.yml +++ b/decidim-elections/config/locales/bg.yml @@ -359,3 +359,16 @@ bg: no_census_contact_information: Все още няма контактна информация send_access_code: invalid: Възникна проблем при изпращането на Кода за достъп + success: Вашият код за достъп беше изпратен успешно + votings_m: + footer_button_text: + participate: Участвайте + layouts: + decidim: + election_votes_header: + exit: Изход + voting_navigation: + voting_menu_item: Гласуването + votings: + promoted_voting: + more_info: Повече информация diff --git a/decidim-elections/config/locales/ca.yml b/decidim-elections/config/locales/ca.yml index 749c73b1f9f76..6e02a84ebb50c 100644 --- a/decidim-elections/config/locales/ca.yml +++ b/decidim-elections/config/locales/ca.yml @@ -740,18 +740,18 @@ ca: elections: election_published: email_intro: 'La votació %{resource_title} ja està activa a %{participatory_space_title}. Pots veure-la des d''aquesta pàgina:' - email_outro: Has rebut aquesta notificació perquè estàs seguint l'espai %{participatory_space_title}. Pots deixar de rebre notificacions seguint l'enllaç anterior. + email_outro: Has rebut aquesta notificació perquè estàs seguint l'espai "%{participatory_space_title}". Pots deixar de rebre notificacions seguint l'enllaç anterior. email_subject: La votació %{resource_title} ja està activa a %{participatory_space_title}. notification_title: La votació %{resource_title} a %{participatory_space_title} ja està activa. trustees: new_election: email_intro: Has estat afegit com a garant de l'elecció %{resource_title}. - email_outro: Has rebut aquesta notificació perquè t'han afegit com a garant de l'elecció %{resource_title}. + email_outro: Has rebut aquesta notificació perquè t'han afegit com a garant de l'elecció "%{resource_title}". email_subject: Ets un garant de l'elecció %{resource_title}.. notification_title: Ets un garant de l'elecció %{resource_title}. new_trustee: email_intro: Una administradora t'ha afegit com a garant de %{resource_name}. Hauries de crear la teva clau pública a la teva zona de garants - email_outro: Has rebut aquesta notificació perquè t'han afegit com a garant de %{resource_name}. + email_outro: Has rebut aquesta notificació perquè t'han afegit com a garant de l'elecció "%{resource_name}". email_subject: Ets garant de %{resource_name}. notification_title: Ets garant de %{resource_name}. votes: @@ -764,7 +764,7 @@ ca: polling_officers: polling_station_assigned: email_intro: T'han assignat com %{role} del punt de votació %{polling_station_name} a %{resource_title}. Pots gestionar el punt de votació accedint a la Zona de gestors de mesa. - email_outro: Has rebut aquesta notificació perquè t'han assignat com %{role} de %{polling_station_name}. + email_outro: Has rebut aquesta notificació perquè t'han assignat com %{role} de "%{polling_station_name}". email_subject: Ets %{role} del punt de votació %{polling_station_name}. notification_title: Ets %{role} del punt de votació %{polling_station_name} a la votació %{resource_title}. send_access_code: diff --git a/decidim-elections/config/locales/es.yml b/decidim-elections/config/locales/es.yml index c4ea1966df6a8..4c26316b2fd02 100644 --- a/decidim-elections/config/locales/es.yml +++ b/decidim-elections/config/locales/es.yml @@ -740,31 +740,31 @@ es: elections: election_published: email_intro: 'La votación %{resource_title} ya está activa en %{participatory_space_title}. Puedes verla desde esta página:' - email_outro: Has recibido esta notificación porque estás siguiendo %{participatory_space_title}. Puedes dejar de recibir notificaciones siguiendo el enlace anterior. + email_outro: Has recibido esta notificación porque estás siguiendo el espacio "%{participatory_space_title}". Puedes dejar de recibir notificaciones siguiendo el enlace anterior. email_subject: La votación %{resource_title} en %{participatory_space_title} ya está activa. notification_title: La votación %{resource_title} ya está activa en %{participatory_space_title}. trustees: new_election: email_intro: Has sido añadido como garante para la elección de %{resource_title}. - email_outro: Has recibido esta notificación porque has sido añadido como garante para la elección %{resource_title}. + email_outro: Has recibido esta notificación porque has sido añadido como garante para la elección "%{resource_title}". email_subject: Eres garante para la elección de %{resource_title}.. notification_title: Eres garante para la elección de %{resource_title}. new_trustee: email_intro: Un administrador te ha añadido como garante para %{resource_name}. Debes crear tu clave pública en tu zona de garantes - email_outro: Has recibido esta notificación porque has sido añadido como garante para %{resource_name}. + email_outro: Has recibido esta notificación porque has sido añadido como garante para la elección "%{resource_name}". email_subject: Eres garante de %{resource_name}. notification_title: Eres garante de %{resource_name}. votes: accepted_votes: email_intro: '¡Tu voto ha sido aceptado! Utilizando tu token de voto: %{encrypted_vote_hash}, puedes verificar tu voto aquí.' - email_outro: Has recibido esta notificación porque has votado en la elección %{resource_name}. + email_outro: Has recibido esta notificación porque has votado en la elección "%{resource_name}". email_subject: Tu voto para %{resource_name} ha sido aceptado. notification_title: 'Tu voto ha sido aceptado. Verifica tu voto aquí usando tu token de voto: %{encrypted_vote_hash}' votings: polling_officers: polling_station_assigned: email_intro: Se te ha asignado como %{role} del punto de votación %{polling_station_name} en %{resource_title}. Puedes administrar el punto de votación desde el espacio Zona de gestores de mesa. - email_outro: Has recibido esta notificación porque has sido asignado como %{role} de %{polling_station_name}. + email_outro: Has recibido esta notificación porque has sido asignado como %{role} de "%{polling_station_name}". email_subject: Eres %{role} del punto de votación %{polling_station_name}. notification_title: Eres %{role} del punto de votación %{polling_station_name} en la votación %{resource_title}. send_access_code: diff --git a/decidim-initiatives/config/locales/bg.yml b/decidim-initiatives/config/locales/bg.yml index 6bb4cbdc389c9..6fd792ebb8371 100644 --- a/decidim-initiatives/config/locales/bg.yml +++ b/decidim-initiatives/config/locales/bg.yml @@ -124,6 +124,8 @@ bg: follow_description: Получавайте известия, когато има новини за тази инициатива offline_method: За тази гражданска инициатива се събират подписи само лично. print: Отпечатай инициативата + vote_cabin: + supports_required: "Необходими са %{total_supports} подписа" votes_count: most_popular_initiative: Най-популярна инициатива need_more_votes: Има нужда от повече подписи diff --git a/decidim-initiatives/config/locales/ca.yml b/decidim-initiatives/config/locales/ca.yml index 43d01d912e3a6..94b0735c9b1a6 100644 --- a/decidim-initiatives/config/locales/ca.yml +++ b/decidim-initiatives/config/locales/ca.yml @@ -153,33 +153,33 @@ ca: admin: initiative_sent_to_technical_validation: email_intro: La iniciativa "%{resource_title}" s'ha enviat a validació tècnica. Comprova-ho a través del taullel d'administració - email_outro: Has rebut aquesta notificació perquè ets una de les administradores de la plataforma. + email_outro: Has rebut aquesta notificació perquè admnistres la plataforma. email_subject: La iniciativa %{resource_title} ha sol·licitat validació tècnica. notification_title: La iniciativa "%{resource_title}" s'ha enviat a validació tècnica. Comprova-ho a través del taullel d'administració initiative_extended: email_intro: La data de finalització de recollida de signatures per a la iniciativa %{resource_title} s'ha ampliat! - email_outro: Has rebut aquesta notificació perquè estàs seguint %{resource_title}. Pots deixar de rebre notificacions seguint l'enllaç anterior. + email_outro: Has rebut aquesta notificació perquè estàs seguint la iniciativa "%{resource_title}". Pots deixar de rebre notificacions seguint l'enllaç anterior. email_subject: S'ha ampliat la data de finalització de la recollida de signatura de la iniciativa! notification_title: El termini de recollida de signatures per a la iniciativa %{resource_title} s'ha ampliat. initiative_sent_to_technical_validation: email_intro: La iniciativa "%{resource_title}" s'ha enviat a validació tècnica. Comprova-ho a través del taulell d'administració - email_outro: Has rebut aquesta notificació perquè ets una de les administradores de la plataforma. + email_outro: Has rebut aquesta notificació perquè admnistres la plataforma. email_subject: La iniciativa %{resource_title} ha sol·licitat validació tècnica. notification_title: La iniciativa "%{resource_title}" s'ha enviat a validació tècnica. Comprova-ho a través del taullel d'administració milestone_completed: affected_user: email_intro: La teva iniciativa %{resource_title} ha aconseguit un %{percentage}% de les signatures necessàries! - email_outro: Has rebut aquesta notificació perquè ets l'autora de la iniciativa %{resource_title}. + email_outro: Has rebut aquesta notificació perquè promous la iniciativa "%{resource_title}". email_subject: S'ha completat una nova fita! notification_title: La teva iniciativa %{resource_title} ha aconseguit el %{percentage}% de les signatures. follower: email_intro: La iniciativa %{resource_title} ha aconseguit el %{percentage}% de les signatures! - email_outro: Has rebut aquesta notificació perquè estàs seguint %{resource_title}. Pots deixar de rebre notificacions seguint l'enllaç anterior. + email_outro: Has rebut aquesta notificació perquè estàs seguint la inciativa "%{resource_title}". Pots deixar de rebre notificacions seguint l'enllaç anterior. email_subject: S'ha completat una nova fita! notification_title: La iniciativa %{resource_title} ha aconseguit el %{percentage}% de les signatures. support_threshold_reached: email_intro: La iniciativa %{resource_title} ha arribat al llindar de signatures - email_outro: Has rebut aquesta notificació perquè ets una de les administradores de la plataforma. + email_outro: Has rebut aquesta notificació perquè admnistres la plataforma. email_subject: Llindar de signatures aconseguit notification_title: La iniciativa %{resource_title} ha arribat al llindar de signatures gamification: @@ -416,27 +416,27 @@ ca: events: approve_membership_request: email_intro: "%{author_nickname} ha acceptat la teva sol·licitud per formar part de la comissió promotora de la iniciativa %{resource_title}." - email_outro: 'Has rebut aquesta notificació perquè has sol·licitat formar part de la iniciativa %{resource_title}' + email_outro: 'Has rebut aquesta notificació perquè has sol·licitat formar part de la iniciativa: "%{resource_title}"' email_subject: "%{author_nickname} ha acceptat la teva sol·licitud per formar part de la comissió promotora" notification_title: %{author_nickname} ha acceptat la teva sol·licitud per formar part de la comissió promotora per la següent iniciativa %{resource_title}. create_initiative_event: email_intro: "%{author_name} %{author_nickname}, a qui segueixes, ha creat una nova iniciativa. Comprova-la i contribueix:" - email_outro: Has rebut aquesta notificació perquè estàs seguint %{author_nickname}. Pots deixar de rebre notificacions seguint l'enllaç anterior. + email_outro: Has rebut aquesta notificació perquè estàs seguint a "%{author_nickname}". Pots deixar de rebre notificacions seguint l'enllaç anterior. email_subject: Nova iniciativa de %{author_nickname} notification_title: La iniciativa %{resource_title} va ser creada per %{author_name} %{author_nickname}. endorse_initiative_event: email_intro: "%{author_name} %{author_nickname}, a qui segueixes, ha donat suport a la següent iniciativa. Potser vols contribuir a la conversa:" - email_outro: Has rebut aquesta notificació perquè estàs seguint %{author_nickname}. Pots deixar de rebre notificacions seguint l'enllaç anterior. + email_outro: Has rebut aquesta notificació perquè estàs seguint a "%{author_nickname}". Pots deixar de rebre notificacions seguint l'enllaç anterior. email_subject: Iniciativa adherida per %{author_nickname} notification_title: La iniciativa %{resource_title} va ser adherida per %{author_name} %{author_nickname}. revoke_membership_request: email_intro: "%{author_nickname} ha rebutjat la teva sol·licitud per formar part de la comissió promotora per la iniciativa %{resource_title}." - email_outro: 'Has rebut aquesta notificació perquè has sol·licitat formar part de la iniciativa %{resource_title}.' + email_outro: 'Has rebut aquesta notificació perquè has sol·licitat formar part de la iniciativa: "%{resource_title}".' email_subject: "%{author_nickname} ha rebutjat la teva sol·licitud per formar part de la comissió promotora" notification_title: %{author_nickname} ha rebutjat la teva sol·licitud per formar part de la comissió promotora per la següent iniciativa %{resource_title}. spawn_committee_request_event: email_intro: "%{applicant_nickname} ha sol·licitat formar part de la comissió promotora de la teva iniciativa %{resource_title}. Per a acceptar o rebutjar la sol·licitud, vés al formulari d'edició de la teva iniciativa." - email_outro: 'Has rebut aquesta notificació perquè ets l''autora de la iniciativa %{resource_title}' + email_outro: 'Has rebut aquesta notificació perquè promous la iniciativa: "%{resource_title}"' email_subject: "%{applicant_nickname} vol unir-se a la teva iniciativa" notification_title: %{applicant_nickname} ha sol·licitat formar part de la comissió promotora de la teva iniciativa %{resource_title}. Per acceptar-ho o rebutjar-ho fes clic aquí. form: diff --git a/decidim-initiatives/config/locales/es.yml b/decidim-initiatives/config/locales/es.yml index 0ee915b29397d..5d4fca1f63995 100644 --- a/decidim-initiatives/config/locales/es.yml +++ b/decidim-initiatives/config/locales/es.yml @@ -153,33 +153,33 @@ es: admin: initiative_sent_to_technical_validation: email_intro: La iniciativa "%{resource_title}" ha sido enviada a validación técnica. Compruébalo a través del panel de administración - email_outro: Has recibido esta notificación porque eres una de las administradoras de la plataforma. + email_outro: Has recibido esta notificación porque administras la plataforma. email_subject: La iniciativa %{resource_title} ha solicitado validación técnica. notification_title: La iniciativa "%{resource_title}" ha sido enviada a validación técnica. Compruébalo a través del panel de administración initiative_extended: email_intro: '¡El plazo de finalización de la iniciativa %{resource_title} se ha ampliado!' - email_outro: Has recibido esta notificación porque está siguiendo %{resource_title}. Puedes dejar de recibir notificaciones siguiendo el enlace anterior. + email_outro: Has recibido esta notificación porque está siguiendo la iniciactiva "%{resource_title}". Puedes dejar de recibir notificaciones siguiendo el enlace anterior. email_subject: '¡Ampliado el términio de recogida de firmas para esta iniciativa!' notification_title: El plazo de recogida de firmas para la iniciativa %{resource_title} se ha ampliado. initiative_sent_to_technical_validation: email_intro: La iniciativa "%{resource_title}" ha sido enviada a la validación técnica. Compruébala en el panel de administración - email_outro: Has recibido esta notificación porque eres una administradora de la plataforma. + email_outro: Has recibido esta notificación porque administras la plataforma. email_subject: La iniciativa "%{resource_title}" fue enviada a validación técnica. notification_title: La iniciativa "%{resource_title}" ha sido enviada a validación técnica. Compruébalo en el panel de administración milestone_completed: affected_user: email_intro: '¡Tu iniciativa %{resource_title} ha conseguido el %{percentage}% de las firmas necesarias!' - email_outro: Has recibido esta notificación porque eres la autora de la iniciativa %{resource_title}. + email_outro: Has recibido esta notificación porque promueves la iniciativa "%{resource_title}". email_subject: '¡Nuevo hito completado!' notification_title: Tu iniciativa %{resource_title} ha conseguido el %{percentage}% de firmas. follower: email_intro: '¡La iniciativa %{resource_title} ha logrado el %{percentage}% de firmas!' - email_outro: Has recibido esta notificación porque estás siguiendo a %{resource_title}. Puedes dejar de recibir notificaciones siguiendo el enlace anterior. + email_outro: Has recibido esta notificación porque estás siguiendo la iniciativa "%{resource_title}". Puedes dejar de recibir notificaciones siguiendo el enlace anterior. email_subject: '¡Nuevo hito completado!' notification_title: La iniciativa %{resource_title} ha logrado el %{percentage}% de las firmas. support_threshold_reached: email_intro: La iniciativa %{resource_title} ha alcanzado el umbral de firmas - email_outro: Has recibido esta notificación porque eres una de las administradoras de la plataforma. + email_outro: Has recibido esta notificación porque administras la plataforma. email_subject: Umbral de firmas alcanzado notification_title: La iniciativa %{resource_title} ha alcanzado el umbral de firmas gamification: @@ -431,12 +431,12 @@ es: notification_title: La iniciativa %{resource_title} fue adherida por %{author_name} %{author_nickname}. revoke_membership_request: email_intro: "%{author_nickname} rechazó tu solicitud para formar parte del comité promotor de la siguiente iniciativa %{resource_title}." - email_outro: 'Has recibido esta notificación porque has solicitado unirte a esta iniciativa: %{resource_title}.' + email_outro: 'Has recibido esta notificación porque has solicitado unirte a esta iniciativa: "%{resource_title}".' email_subject: "%{author_nickname} rechazó tu solicitud para unirte al comité promotor" notification_title: %{author_nickname} rechazó tu solicitud para formar parte del comité promotor de la siguiente iniciativa %{resource_title}. spawn_committee_request_event: email_intro: "%{applicant_nickname} ha solicitado unirse al comité promotor de tu iniciativa %{resource_title}. Para aceptar o rechazar la solicitud, ve al formulario de edición de tu iniciativa." - email_outro: 'Has recibido esta notificación porque eres la autora de la iniciativa %{resource_title}' + email_outro: 'Has recibido esta notificación porque promueves esta iniciativa: "%{resource_title}"' email_subject: "%{applicant_nickname} quiere unirse a tu iniciativa" notification_title: %{applicant_nickname} ha solicitado unirse al comité promotor de tu iniciativa %{resource_title}. Para aceptar o rechazar la solicitud haz clic aquí. form: diff --git a/decidim-meetings/config/locales/ca.yml b/decidim-meetings/config/locales/ca.yml index 5a47240d16301..484704dc7ecc6 100644 --- a/decidim-meetings/config/locales/ca.yml +++ b/decidim-meetings/config/locales/ca.yml @@ -165,14 +165,14 @@ ca: meeting_created: button_text: Inscriu-te a la trobada email_intro: S'ha afegit la trobada "%{resource_title}" a l'espai "%{participatory_space_title}" que estàs seguint. - email_outro: Has rebut aquesta notificació perquè estàs seguint "%{participatory_space_title}". Pots deixar de seguir-lo des de l'enllaç anterior. + email_outro: Has rebut aquesta notificació perquè estàs seguint l'espai "%{participatory_space_title}". Pots deixar de seguir-lo des de l'enllaç anterior. email_subject: Nova trobada afegida a %{participatory_space_title} notification_title: S'ha afegit la trobada %{resource_title} a %{participatory_space_title} meeting_registration_confirmed: notification_title: S'ha confirmat el teu registre per a la trobada %{resource_title}. El teu codi de registre és %{registration_code}. meeting_registrations_over_percentage: email_intro: Les inscripcions per la trobada "%{resource_title}" superen el %{percentage}%. - email_outro: Has rebut aquesta notificació perquè ets administradora de l'espai participatiu de la trobada. + email_outro: Has rebut aquesta notificació perquè administres l'espai participatiu de la trobada. email_subject: Les inscripcions per la trobada "%{resource_title}" superen el %{percentage}% notification_title: Les inscripcions per la trobada %{resource_title} superen el %{percentage}%. meeting_updated: @@ -419,7 +419,7 @@ ca: body: La trobada "%{meeting_title}" està pendent de tancar-se. Si us plau, afegiu un informe de la reunió fent servir el botó "Tancar trobada". greetings: Hola,
    %{organization_name}
    %{organization_url} hello: Hola %{username}, - subject: Ara pots tancar la trobada amb un informe a la plataforma %{organization_name} + subject: Està pendent tancar la trobada "%{meeting_title}" amb un informe conference_venues: Seus de les jornades content_blocks: upcoming_meetings: diff --git a/decidim-meetings/config/locales/es.yml b/decidim-meetings/config/locales/es.yml index 23a4021142d4a..7c11d83692ce7 100644 --- a/decidim-meetings/config/locales/es.yml +++ b/decidim-meetings/config/locales/es.yml @@ -154,7 +154,7 @@ es: meeting_closed: affected_user: email_intro: 'Tu encuentro "%{resource_title}" se ha cerrado. Puedes leer las conclusiones desde su página:' - email_outro: Has recibido esta notificación porque has organizaco el encuentro "%{resource_title}". + email_outro: Has recibido esta notificación porque organizaste el encuentro "%{resource_title}". email_subject: Se ha cerrado el encuentro "%{resource_title}" notification_title: El encuentro %{resource_title} ha sido cerrada. follower: @@ -165,14 +165,14 @@ es: meeting_created: button_text: Inscribirse en el encuentro email_intro: Se ha añadido el encuentro "%{resource_title}" al espacio "%{participatory_space_title}" que estás siguiendo. - email_outro: Has recibido esta notificación porque sigues "%{participatory_space_title}". Puedes dejar de seguirlo en el enlace anterior. + email_outro: Has recibido esta notificación porque sigues el espacio "%{participatory_space_title}". Puedes dejar de seguirlo en el enlace anterior. email_subject: Nuevo encuentro añadido en %{participatory_space_title} notification_title: Se ha añadido el encuentro %{resource_title} en %{participatory_space_title} meeting_registration_confirmed: notification_title: Tu inscripción al encuentro %{resource_title} ha sido confirmada. Tu código de registro es %{registration_code}. meeting_registrations_over_percentage: email_intro: Las inscripciones para el encuentro "%{resource_title}" superan el %{percentage}%. - email_outro: Has recibido esta notificación porque eres administradora del espacio participativo del encuentro. + email_outro: Has recibido esta notificación porque administras el espacio participativo del encuentro. email_subject: Las inscripciones para el encuentro "%{resource_title}" superan el %{percentage}% notification_title: Las inscripciones para el encuentro %{resource_title} superan el %{percentage}%. meeting_updated: @@ -419,7 +419,7 @@ es: body: El encuentro "%{meeting_title}" está pendiente de cerrarse. Por favor, agrega un informe de la reunión usando el botón "Cerrar encuentro". greetings: Hola,
    %{organization_name}
    %{organization_url} hello: Hola %{username}, - subject: Ahora puedes cerrar el encuentro con un informe en la plataforma %{organization_name} + subject: Está pendiente cerrar el encuentro "%{meeting_title}" con un informe conference_venues: Sedes de las jornadas content_blocks: upcoming_meetings: diff --git a/decidim-participatory_processes/config/locales/ca.yml b/decidim-participatory_processes/config/locales/ca.yml index c4b0cf0955bf7..2301a85b23dd7 100644 --- a/decidim-participatory_processes/config/locales/ca.yml +++ b/decidim-participatory_processes/config/locales/ca.yml @@ -337,12 +337,12 @@ ca: notification_title: Se t'ha assignat el rol de %{role} al procés participatiu %{resource_title}. step_activated: email_intro: 'Ja està activa la fase %{resource_title} per a %{participatory_space_title}. Pots veure-ho des d''aquesta pàgina:' - email_outro: Has rebut aquesta notificació perquè estàs seguint %{participatory_space_title}. Pots deixar de rebre notificacions seguint l'enllaç anterior. + email_outro: Has rebut aquesta notificació perquè estàs seguint l'espai "%{participatory_space_title}". Pots deixar de rebre notificacions seguint l'enllaç anterior. email_subject: Una actualització a %{participatory_space_title} notification_title: Ja està activa la fase %{resource_title} per a %{participatory_space_title} step_changed: email_intro: 'S''han actualitzat les dates de la fase %{resource_title} a %{participatory_space_title}. Pots veure-ho des d''aquesta pàgina:' - email_outro: Has rebut aquesta notificació perquè estàs seguint %{participatory_space_title}. Pots deixar de rebre notificacions seguint l'enllaç anterior. + email_outro: Has rebut aquesta notificació perquè estàs seguint l'espai "%{participatory_space_title}". Pots deixar de rebre notificacions seguint l'enllaç anterior. email_subject: Una actualització a %{participatory_space_title} notification_title: Les dates de la fase %{resource_title} a %{participatory_space_title} s'han actualitzat. help: diff --git a/decidim-participatory_processes/config/locales/es.yml b/decidim-participatory_processes/config/locales/es.yml index 93b7be9260e9a..c0d41cd52f78e 100644 --- a/decidim-participatory_processes/config/locales/es.yml +++ b/decidim-participatory_processes/config/locales/es.yml @@ -337,7 +337,7 @@ es: notification_title: Se te ha asignado el rol de %{role} en el proceso participativo %{resource_title}. step_activated: email_intro: 'Ya está activa la fase %{resource_title} para %{participatory_space_title}. Puedes verla desde esta página:' - email_outro: Has recibido esta notificación porque estás siguiendo %{participatory_space_title}. Puedes dejar de recibir notificaciones siguiendo el enlace anterior. + email_outro: Has recibido esta notificación porque estás siguiendo el espacio "%{participatory_space_title}". Puedes dejar de recibir notificaciones siguiendo el enlace anterior. email_subject: Una actualización en %{participatory_space_title} notification_title: Ya está activa la fase %{resource_title} para %{participatory_space_title} step_changed: diff --git a/decidim-proposals/config/locales/ca.yml b/decidim-proposals/config/locales/ca.yml index f76e94df1023e..7271bb6da0163 100644 --- a/decidim-proposals/config/locales/ca.yml +++ b/decidim-proposals/config/locales/ca.yml @@ -231,48 +231,48 @@ ca: notification_title: Algú ha deixat una nota a la proposta %{resource_title}. Revisa-la ara a través del taulell d'admistració collaborative_draft_access_accepted: email_intro: 'S''ha acceptat %{requester_name} per accedir com a contribuidora de l''esborrany col·laboratiu %{resource_title}.' - email_outro: Has rebut aquesta notificació perquè ets una contribuïdora de %{resource_title}. + email_outro: Has rebut aquesta notificació perquè vas contribuir a la proposta "%{resource_title}". email_subject: "S'ha acceptat %{requester_name} per accedir com a contribuidora del %{resource_title}." notification_title: %{requester_name} %{requester_nickname} ha estat acceptat per accedir com a contribuidora de l'esborrany col·laboratiu %{resource_title}. collaborative_draft_access_rejected: email_intro: 'S''ha rebutjat que %{requester_name} accedeixi com a contribuidora de l''esborrany col·laboratiu %{resource_title}.' - email_outro: Has rebut aquesta notificació perquè ets una contribuïdora de %{resource_title}. + email_outro: Has rebut aquesta notificació perquè vas contribuir a la proposta "%{resource_title}". email_subject: "S'ha rebutjat %{requester_name} per accedir com a contribuïdora de l'esborrany col·laboratiu %{resource_title}." notification_title: %{requester_name} %{requester_nickname} ha estat rebutjat per accedir com a contribuïdora de l'esborrany col·laboratiu %{resource_title}. collaborative_draft_access_requested: email_intro: '%{requester_name} ha sol·licitat accés com a contribuïdora. Pots acceptar o rebutjar la sol·licitud de l''esborrany col·laboratiu %{resource_title}.' - email_outro: Has rebut aquesta notificació perquè ets contribuïdora de %{resource_title}. + email_outro: Has rebut aquesta notificació perquè vas contribuir a la proposta "%{resource_title}". email_subject: "%{requester_name} ha demanat accés per contribuir a %{resource_title}." notification_title: %{requester_name} %{requester_nickname} ha sol·licitat accés per contribuir a l'esborrany col·laboratiu de %{resource_title}. Si us plau, accepta o rebutja la sol·licitud. collaborative_draft_access_requester_accepted: email_intro: Has estat acceptada com a contribuïdora de l'esborrany col·laboratiu %{resource_title}. - email_outro: Has rebut aquesta notificació perquè has sol·licitat ser contribuïdora de %{resource_title}. + email_outro: Has rebut aquesta notificació perquè has sol·licitat poder contribuïr a la proposta "%{resource_title}". email_subject: Has estat acceptada com a contribuïdora de %{resource_title}. notification_title: Has estat acceptada com a contribuïdora de l'esborrany col·laboratiu %{resource_title}. collaborative_draft_access_requester_rejected: email_intro: Has estat rebutjada per accedir com a contribuïdora de l'esborrany col·laboratiu %{resource_title}. - email_outro: Has rebut aquesta notificació perquè has sol·licitat ser contribuïdora de %{resource_title}. + email_outro: Has rebut aquesta notificació perquè has sol·licitat poder contribuïr a la proposta "%{resource_title}". email_subject: Has estat rebutjada com a contribuïdora de %{resource_title}. notification_title: Has estat rebutjada per accedir com a contribuïdora de l'esborrany col·laboratiu %{resource_title}. collaborative_draft_withdrawn: email_intro: %{author_name} %{author_nickname} ha retirat l'esborrany col·laboratiu %{resource_title}. - email_outro: Has rebut aquesta notificació perquè ets contribuïdora de %{resource_title}. + email_outro: Has rebut aquesta notificació perquè vas contribuir a la proposta "%{resource_title}". email_subject: "%{author_name} %{author_nickname} ha retirat l'esborrany col·laboratiu %{resource_title}." notification_title: %{author_name} %{author_nickname} ha retirat l'esborrany col·laboratiu %{resource_title}. creation_enabled: email_intro: 'Ara pots crear noves propostes a %{participatory_space_title}! Comença a participar a aquesta pàgina:' - email_outro: Has rebut aquesta notificació perquè estàs seguint %{participatory_space_title}. Pots deixar de rebre notificacions seguint l'enllaç anterior. + email_outro: Has rebut aquesta notificació perquè estàs seguint l'espai "%{participatory_space_title}". Pots deixar de rebre notificacions seguint l'enllaç anterior. email_subject: Les propostes ja estan disponibles a %{participatory_space_title} notification_title: Ara pots presentar noves propostes a %{participatory_space_title} endorsing_enabled: email_intro: 'Pots adherir-te a les propostes a %{participatory_space_title}. Comença a participar en aquesta pàgina:' - email_outro: Has rebut aquesta notificació perquè estàs seguint %{participatory_space_title}. Pots deixar de rebre notificacions seguint l'enllaç anterior. + email_outro: Has rebut aquesta notificació perquè estàs seguint l'espai "%{participatory_space_title}". Pots deixar de rebre notificacions seguint l'enllaç anterior. email_subject: L'adhesió a les propostes de %{participatory_space_title} ha començat notification_title: Ara ja pots començar a adherir-te a propostes a %{participatory_space_title} proposal_accepted: affected_user: email_intro: 'S''ha acceptat la teva proposta "%{resource_title}". Pots llegir la resposta en aquesta pàgina:' - email_outro: Has rebut aquesta notificació perquè ets autora de "%{resource_title}". + email_outro: Has rebut aquesta notificació perquè vas presentar aquesta proposta "%{resource_title}". email_subject: S'ha acceptat la teva proposta notification_title: S'ha acceptat la teva proposta %{resource_title}. follower: @@ -283,7 +283,7 @@ ca: proposal_evaluating: affected_user: email_intro: 'La teva proposta "%{resource_title}" s''està avaluant. Pots consultar la resposta en aquesta pàgina:' - email_outro: Has rebut aquesta notificació perquè ets autora de "%{resource_title}". + email_outro: Has rebut aquesta notificació perquè vas presentar aquesta proposta "%{resource_title}". email_subject: S'està avaluant la teva proposta notification_title: S'està avaluant la teva proposta %{resource_title}. follower: @@ -293,24 +293,24 @@ ca: notification_title: S'ha avaluat la proposta %{resource_title}. proposal_mentioned: email_intro: La teva proposta "%{mentioned_proposal_title}" ha estat esmentada als comentaris en aquest espai. - email_outro: Has rebut aquesta notificació perquè ets autora de "%{resource_title}". + email_outro: Has rebut aquesta notificació perquè vas presentar aquesta proposta "%{resource_title}". email_subject: S'ha mencionat la teva proposta "%{mentioned_proposal_title}" notification_title: La teva proposta "%{mentioned_proposal_title}" ha estat esmentada en aquest espai als comentaris. proposal_published: email_intro: '%{author_name} %{author_nickname}, a qui segueixes, ha publicat una nova proposta anomenada "%{resource_title}". Consulta i contribueix:' - email_outro: Has rebut aquesta notificació perquè estàs seguint %{author_nickname}. Pots deixar de rebre notificacions seguint l'enllaç anterior. + email_outro: Has rebut aquesta notificació perquè estàs seguint a "%{author_nickname}". Pots deixar de rebre notificacions seguint l'enllaç anterior. email_subject: Nova proposta "%{resource_title}" de %{author_nickname} notification_title: La proposta %{resource_title} ha estat publicada per %{author_name} %{author_nickname}. proposal_published_for_space: - email_intro: La proposta "%{resource_title}" s'ha afegit a "%{participatory_space_title}", que segueixes. - email_outro: Has rebut aquesta notificació perquè estàs seguint "%{participatory_space_title}". Pots deixar de rebre notificacions seguint l'enllaç anterior. + email_intro: La proposta "%{resource_title}" s'ha afegit a l'espai "%{participatory_space_title}", que segueixes. + email_outro: Has rebut aquesta notificació perquè estàs seguint l'espai "%{participatory_space_title}". Pots deixar de rebre notificacions seguint l'enllaç anterior. email_subject: Nova proposta "%{resource_title}" afegida a %{participatory_space_title} notification_title: '%{author} ha afegit la proposta %{resource_title} a %{participatory_space_title}' notification_title_official: S'ha afegit la proposta oficial %{resource_title} a %{participatory_space_title} proposal_rejected: affected_user: email_intro: 'La teva proposta "%{resource_title}" ha estat rebutjada. Pots llegir la resposta en aquesta pàgina:' - email_outro: Has rebut aquesta notificació perquè ets autora de "%{resource_title}". + email_outro: Has rebut aquesta notificació perquè vas presentar aquesta proposta "%{resource_title}". email_subject: La teva proposta ha estat rebutjada notification_title: La teva proposta %{resource_title} ha estat rebutjada. follower: @@ -320,18 +320,18 @@ ca: notification_title: S'ha rebutjat la proposta %{resource_title}. proposal_update_category: email_intro: 'Una administradora ha actualitzat la categoria de la teva proposta "%{resource_title}", fes-hi una ullada:' - email_outro: Has rebut aquesta notificació perquè ets autora de la proposta. + email_outro: Has rebut aquesta notificació perquè vas presentar aquesta proposta. email_subject: S'ha actualitzat la categoria de la proposta %{resource_title} notification_title: La categoria de la proposta %{resource_title} ha estat actualitzada per una administradora. proposal_update_scope: email_intro: 'Una administradora ha actualitzat l''àmbit de la teva proposta "%{resource_title}", fes-hi una ullada:' - email_outro: Has rebut aquesta notificació perquè ets autora de la proposta. + email_outro: Has rebut aquesta notificació perquè vas presentar aquesta proposta. email_subject: S'ha actualitzat l'àmbit de la proposta %{resource_title} notification_title: L'àmbit de la proposta %{resource_title} ha estat actualitzat per una administradora. voting_enabled: email_intro: 'Pots començar a donar suports a les propostes de %{participatory_space_title}! Comença a participar en aquesta pàgina:' - email_outro: Has rebut aquesta notificació perquè estàs seguint %{participatory_space_title}. Pots deixar de rebre notificacions seguint l'enllaç anterior. - email_subject: El recolzament a propostes ha començat per a %{participatory_space_title} + email_outro: Has rebut aquesta notificació perquè estàs seguint l'espai "%{participatory_space_title}". Pots deixar de rebre notificacions seguint l'enllaç anterior. + email_subject: El recolzament a propostes ha començat per a l'espai "%{participatory_space_title}" notification_title: Ja pots començar a donar suports a propostes a %{participatory_space_title} gamification: badges: diff --git a/decidim-proposals/config/locales/cs.yml b/decidim-proposals/config/locales/cs.yml index 319654a1ad5ed..73a841b44097a 100644 --- a/decidim-proposals/config/locales/cs.yml +++ b/decidim-proposals/config/locales/cs.yml @@ -12,6 +12,8 @@ cs: state: Stav title: Titul user_group_id: Vytvořit návrh spolupráce jako + import_participatory_text: + document: Textový dokument k participaci proposal: address: Adresa answer: Odpovědět diff --git a/decidim-proposals/config/locales/es-MX.yml b/decidim-proposals/config/locales/es-MX.yml index 11e7650d9cbce..cc30f1317aed5 100644 --- a/decidim-proposals/config/locales/es-MX.yml +++ b/decidim-proposals/config/locales/es-MX.yml @@ -277,7 +277,7 @@ es-MX: notification_title: Su propuesta %{resource_title} ha sido aceptada. follower: email_intro: 'La propuesta "%{resource_title}" ha sido aceptada. Puedes leer la respuesta en esta página:' - email_outro: Has recibido esta notificación porque estás siguiendo "%{resource_title}". Puedes dejar de seguirlo desde el enlace anterior. + email_outro: Has recibido esta notificación porque estás siguiendo el espacio "%{resource_title}". Puedes dejar de seguirlo desde el enlace anterior. email_subject: Una propuesta que estás siguiendo ha sido aceptada notification_title: La propuesta %{resource_title} ha sido aceptada. proposal_evaluating: @@ -288,7 +288,7 @@ es-MX: notification_title: Su propuesta %{resource_title} está siendo evaluada. follower: email_intro: 'La propuesta "%{resource_title}" se está evaluando actualmente. Puedes encontrar la respuesta en esta página:' - email_outro: Has recibido esta notificación porque estás siguiendo "%{resource_title}". Puedes dejar de seguirlo desde el enlace anterior. + email_outro: Has recibido esta notificación porque estás siguiendo el espacio "%{resource_title}". Puedes dejar de seguirlo desde el enlace anterior. email_subject: Una propuesta que estás siguiendo está siendo evaluada notification_title: La propuesta %{resource_title} está siendo evaluada. proposal_mentioned: @@ -315,7 +315,7 @@ es-MX: notification_title: Su propuesta %{resource_title} ha sido rechazada. follower: email_intro: 'La propuesta "%{resource_title}" ha sido rechazada. Puedes leer la respuesta en esta página:' - email_outro: Has recibido esta notificación porque estás siguiendo "%{resource_title}". Puedes dejar de seguirlo desde el enlace anterior. + email_outro: Has recibido esta notificación porque estás siguiendo el espacio "%{resource_title}". Puedes dejar de seguirlo desde el enlace anterior. email_subject: Una propuesta que estás siguiendo ha sido rechazada notification_title: La propuesta %{resource_title} ha sido rechazada. proposal_update_category: diff --git a/decidim-proposals/config/locales/es-PY.yml b/decidim-proposals/config/locales/es-PY.yml index 24ef8b8ca9705..cc3b41fdb918a 100644 --- a/decidim-proposals/config/locales/es-PY.yml +++ b/decidim-proposals/config/locales/es-PY.yml @@ -277,7 +277,7 @@ es-PY: notification_title: Su propuesta %{resource_title} ha sido aceptada. follower: email_intro: 'La propuesta "%{resource_title}" ha sido aceptada. Puedes leer la respuesta en esta página:' - email_outro: Has recibido esta notificación porque estás siguiendo "%{resource_title}". Puedes dejar de seguirlo desde el enlace anterior. + email_outro: Has recibido esta notificación porque estás siguiendo el espacio "%{resource_title}". Puedes dejar de seguirlo desde el enlace anterior. email_subject: Una propuesta que estás siguiendo ha sido aceptada notification_title: La propuesta %{resource_title} ha sido aceptada. proposal_evaluating: @@ -288,7 +288,7 @@ es-PY: notification_title: Su propuesta %{resource_title} está siendo evaluada. follower: email_intro: 'La propuesta "%{resource_title}" se está evaluando actualmente. Puedes encontrar la respuesta en esta página:' - email_outro: Has recibido esta notificación porque estás siguiendo "%{resource_title}". Puedes dejar de seguirlo desde el enlace anterior. + email_outro: Has recibido esta notificación porque estás siguiendo el espacio "%{resource_title}". Puedes dejar de seguirlo desde el enlace anterior. email_subject: Una propuesta que estás siguiendo está siendo evaluada notification_title: La propuesta %{resource_title} está siendo evaluada. proposal_mentioned: @@ -315,7 +315,7 @@ es-PY: notification_title: Su propuesta %{resource_title} ha sido rechazada. follower: email_intro: 'La propuesta "%{resource_title}" ha sido rechazada. Puedes leer la respuesta en esta página:' - email_outro: Has recibido esta notificación porque estás siguiendo "%{resource_title}". Puedes dejar de seguirlo desde el enlace anterior. + email_outro: Has recibido esta notificación porque estás siguiendo el espacio "%{resource_title}". Puedes dejar de seguirlo desde el enlace anterior. email_subject: Una propuesta que estás siguiendo ha sido rechazada notification_title: La propuesta %{resource_title} ha sido rechazada. proposal_update_category: diff --git a/decidim-proposals/config/locales/es.yml b/decidim-proposals/config/locales/es.yml index 0d43cb78224b2..f341ce476681e 100644 --- a/decidim-proposals/config/locales/es.yml +++ b/decidim-proposals/config/locales/es.yml @@ -236,22 +236,22 @@ es: notification_title: %{requester_name} %{requester_nickname} ha sido aceptada para acceder como contribuidora del borrador colaborativo %{resource_title}. collaborative_draft_access_rejected: email_intro: 'Se ha denegado que %{requester_name} acceda como contribuidora del borrador colaborativo %{resource_title}.' - email_outro: Has recibido esta notificación porque eres una contribuidora de %{resource_title}. + email_outro: Has recibido esta notificación porque has contribuido en la propuesta "%{resource_title}". email_subject: "%{requester_name} ha sido rechazado para acceder como contribuidora del borrador colaborativo %{resource_title}." notification_title: %{requester_name} %{requester_nickname} ha sido rechazado para acceder como contribuidora del borrador colaborativo %{resource_title}. collaborative_draft_access_requested: email_intro: '%{requester_name} ha solicitado acceso como contribuidora. Puede aceptar o rechazar la solicitud de la página de borrador colaborativo de %{resource_title}.' - email_outro: Has recibido esta notificación porque eres contribuidora de %{resource_title}. + email_outro: Has recibido esta notificación porque has contribuido en la propuesta "%{resource_title}". email_subject: "%{requester_name} ha solicitado acceso para contribuir a %{resource_title}." notification_title: %{requester_name} %{requester_nickname} solicitó acceso para contribuir al borrador colaborativo %{resource_title}. Por favor, acepta o rechaza la solicitud. collaborative_draft_access_requester_accepted: email_intro: Has sido aceptada para acceder como contribuidora del borrador colaborativo %{resource_title}. - email_outro: Has recibido esta notificación porque has solicitado ser contribuidora de %{resource_title}. + email_outro: Has recibido esta notificación porque has solicitado contribuir en la propuesta "%{resource_title}". email_subject: Has sido aceptada como contribuidora de %{resource_title}. notification_title: Has sido aceptada acceder como contribuidora del borrador colaborativo %{resource_title}. collaborative_draft_access_requester_rejected: email_intro: Ha sido rechazada para acceder como contribuidora del borrador colaborativo %{resource_title}. - email_outro: Has recibido esta notificación porque has solicitado ser contribuidora de %{resource_title}. + email_outro: Has recibido esta notificación porque has solicitado contribuir en la propuesta "%{resource_title}". email_subject: Has sido rechazada como contribuidora de %{resource_title}. notification_title: Has sido rechazada como contribuidora del borrador colaborativo %{resource_title}. collaborative_draft_withdrawn: @@ -272,28 +272,28 @@ es: proposal_accepted: affected_user: email_intro: 'Tu propuesta "%{resource_title}" ha sido aceptada. Puedes leer la respuesta en esta página:' - email_outro: Has recibido esta notificación porque eres autora de "%{resource_title}". + email_outro: Has recibido esta notificación porque presentaste la propuesta "%{resource_title}". email_subject: Tu propuesta ha sido aceptada notification_title: Tu propuesta %{resource_title} ha sido aceptada. follower: email_intro: 'La propuesta "%{resource_title}" ha sido aceptada. Puedes leer la respuesta en esta página:' - email_outro: Has recibido esta notificación porque estás siguiendo "%{resource_title}". Puedes dejar de seguirlo desde el enlace anterior. + email_outro: Has recibido esta notificación porque estás siguiendo el espacio "%{resource_title}". Puedes dejar de seguirlo desde el enlace anterior. email_subject: Una propuesta que estás siguiendo ha sido aceptada notification_title: La propuesta %{resource_title} ha sido aceptada. proposal_evaluating: affected_user: email_intro: 'Tu propuesta "%{resource_title}" está siendo evaluada. Puedes consultar la respuesta en esta página:' - email_outro: Has recibido esta notificación porque eres autora de "%{resource_title}". + email_outro: Has recibido esta notificación porque presentaste la propuesta "%{resource_title}". email_subject: Tu propuesta está siendo evaluada notification_title: Tu propuesta %{resource_title} está siendo evaluada. follower: email_intro: 'La propuesta "%{resource_title}" se está evaluando actualmente. Puedes encontrar la respuesta en esta página:' - email_outro: Has recibido esta notificación porque estás siguiendo "%{resource_title}". Puedes dejar de seguirlo desde el enlace anterior. + email_outro: Has recibido esta notificación porque estás siguiendo el espacio "%{resource_title}". Puedes dejar de seguirlo desde el enlace anterior. email_subject: Una propuesta que estás siguiendo está siendo evaluada notification_title: La propuesta %{resource_title} está siendo evaluada. proposal_mentioned: email_intro: Tu propuesta "%{mentioned_proposal_title}" se ha mencionado en este espacio en los comentarios. - email_outro: Has recibido esta notificación porque eres autora de "%{resource_title}". + email_outro: Has recibido esta notificación porque presentaste la propuesta "%{resource_title}". email_subject: Tu propuesta "%{mentioned_proposal_title}" ha sido mencionada notification_title: Tu propuesta "%{mentioned_proposal_title}" se ha mencionado en este espacio en los comentarios. proposal_published: @@ -302,20 +302,20 @@ es: email_subject: Nueva propuesta "%{resource_title}" de %{author_nickname} notification_title: La propuesta %{resource_title} ha sido publicada por %{author_name} %{author_nickname}. proposal_published_for_space: - email_intro: La propuesta "%{resource_title}" se ha añadido en "%{participatory_space_title}", que estás siguiendo. - email_outro: Recibiste esta notificación porque estás siguiendo "%{participatory_space_title}". Puedes dejar de recibir notificaciones siguiendo el enlace anterior. + email_intro: La propuesta "%{resource_title}" se ha añadido en el espacio "%{participatory_space_title}", que estás siguiendo. + email_outro: Recibiste esta notificación porque estás siguiendo el espacio "%{participatory_space_title}". Puedes dejar de recibir notificaciones siguiendo el enlace anterior. email_subject: Nueva propuesta "%{resource_title}" añadida a %{participatory_space_title} notification_title: La propuesta %{resource_title} ha sido añadida a %{participatory_space_title} por %{author} notification_title_official: Se ha añadido la propuesta oficial %{resource_title} en %{participatory_space_title} proposal_rejected: affected_user: email_intro: 'Tu propuesta "%{resource_title}" ha sido rechazada. Puedes leer la respuesta en esta página:' - email_outro: Has recibido esta notificación porque eres autora de "%{resource_title}". + email_outro: Has recibido esta notificación porque presentaste la propuesta "%{resource_title}". email_subject: Tu propuesta ha sido rechazada notification_title: Tu propuesta %{resource_title} ha sido rechazada. follower: email_intro: 'La propuesta "%{resource_title}" ha sido rechazada. Puedes leer la respuesta en esta página:' - email_outro: Has recibido esta notificación porque estás siguiendo "%{resource_title}". Puedes dejar de seguirlo desde el enlace anterior. + email_outro: Has recibido esta notificación porque estás siguiendo el espacio "%{resource_title}". Puedes dejar de seguirlo desde el enlace anterior. email_subject: Una propuesta que estás siguiendo ha sido rechazada notification_title: La propuesta %{resource_title} ha sido rechazada. proposal_update_category: diff --git a/decidim-sortitions/config/locales/ca.yml b/decidim-sortitions/config/locales/ca.yml index 8053bc32561f0..172c9384e9540 100644 --- a/decidim-sortitions/config/locales/ca.yml +++ b/decidim-sortitions/config/locales/ca.yml @@ -31,7 +31,7 @@ ca: sortitions: sortition_created: email_intro: El sorteig "%{resource_title}" s'ha afegit a "%{participatory_space_title}" que segueixes. - email_outro: Has rebut aquesta notificació perquè estàs seguint "%{participatory_space_title}". Pots deixar de seguir-lo des de l'enllaç anterior. + email_outro: Has rebut aquesta notificació perquè estàs seguint l'espai "%{participatory_space_title}". Pots deixar de seguir-lo des de l'enllaç anterior. email_subject: Nou sorteig afegit a %{participatory_space_title} notification_title: El sorteig %{resource_title} s'ha afegit a %{participatory_space_title} sortitions: diff --git a/decidim-surveys/config/locales/ca.yml b/decidim-surveys/config/locales/ca.yml index 3ed8c3c68fb7e..eeea31c7441c1 100644 --- a/decidim-surveys/config/locales/ca.yml +++ b/decidim-surveys/config/locales/ca.yml @@ -37,12 +37,12 @@ ca: surveys: survey_closed: email_intro: L'enquesta %{resource_title} a %{participatory_space_title} ha estat tancada. - email_outro: Has rebut aquesta notificació perquè estàs seguint %{participatory_space_title}. Pots deixar de rebre notificacions seguint l'enllaç anterior. + email_outro: Has rebut aquesta notificació perquè estàs seguint l'espai "%{participatory_space_title}". Pots deixar de rebre notificacions seguint l'enllaç anterior. email_subject: S'ha acabat una enquesta a %{participatory_space_title} notification_title: L'enquesta %{resource_title} a %{participatory_space_title} ha acabat. survey_opened: email_intro: 'L''enquesta %{resource_title} a %{participatory_space_title} ja està oberta. Pots participar-hi des d''aquesta pàgina:' - email_outro: Has rebut aquesta notificació perquè estàs seguint %{participatory_space_title}. Pots deixar de rebre notificacions seguint l'enllaç anterior. + email_outro: Has rebut aquesta notificació perquè estàs seguint l'espai "%{participatory_space_title}". Pots deixar de rebre notificacions seguint l'enllaç anterior. email_subject: Una nova enquesta a %{participatory_space_title} notification_title: L'enquesta %{resource_title} en %{participatory_space_title} ja està oberta. metrics: diff --git a/decidim-surveys/config/locales/es.yml b/decidim-surveys/config/locales/es.yml index 13626362ac785..d67dc9be02b4b 100644 --- a/decidim-surveys/config/locales/es.yml +++ b/decidim-surveys/config/locales/es.yml @@ -37,12 +37,12 @@ es: surveys: survey_closed: email_intro: La encuesta %{resource_title} en %{participatory_space_title} se ha cerrado. - email_outro: Has recibido esta notificación porqué estás siguiendo %{participatory_space_title}. Puedes dejar de recibir notificaciones siguiendo el enlace anterior. + email_outro: Has recibido esta notificación porqué estás siguiendo el espacio "%{participatory_space_title}". Puedes dejar de recibir notificaciones siguiendo el enlace anterior. email_subject: Ha terminado una encuesta en %{participatory_space_title} notification_title: La encuesta %{resource_title} en %{participatory_space_title} ha terminado. survey_opened: email_intro: 'Ya está abierta la encuesta %{resource_title} en %{participatory_space_title}. Puedes participar desde esta página:' - email_outro: Has recibido esta notificación porque estás siguiendo %{participatory_space_title}. Puedes dejar de recibir notificaciones siguiendo el enlace anterior. + email_outro: Has recibido esta notificación porque estás siguiendo el espacio "%{participatory_space_title}". Puedes dejar de recibir notificaciones siguiendo el enlace anterior. email_subject: Nueva encuesta en %{participatory_space_title} notification_title: Ya está abierta la encuesta %{resource_title} en %{participatory_space_title}. metrics: diff --git a/decidim-system/config/locales/bg.yml b/decidim-system/config/locales/bg.yml index 688dab6a8b7ad..d9b92e149d393 100644 --- a/decidim-system/config/locales/bg.yml +++ b/decidim-system/config/locales/bg.yml @@ -2,11 +2,36 @@ bg: activemodel: attributes: + oauth_application: + name: Име на приложението за OAuth + organization_logo: Лого на организацията (квадратно) + organization_name: Организация + organization_url: URL адрес на организацията + redirect_uri: URI за пренасочване organization: address: Име на SMTP хост + from_email: Имейл адрес + from_label: Етикет password: Парола port: Порт user_name: Потребителско име + organization_file_uploads: + allowed_content_types: + admin: Администраторски MIME типове + default: MIME типове по подразбиране + allowed_file_extensions: + admin: Административни файлови разширения + default: Файлови разширения по подразбиране + image: Разширения на файлове с изображения + maximum_file_size: + avatar: Размер на файла на аватара + default: Размер на файла по подразбиране + errors: + models: + oauth_application: + attributes: + redirect_uri: + must_be_ssl: URI адресът за пренасочване трябва да бъде SSL URI decidim: system: actions: @@ -14,26 +39,139 @@ bg: destroy: Изтрий edit: Редактирай new: Нов + save: Запази + title: Действия admins: create: + error: Възникна проблем при създаването на нов администратор. success: Администраторът беше създаден успешно destroy: success: Администраторът беше изтрит успешно + edit: + title: Редактиране на администратора + update: Обновяване + index: + title: Администратори + new: + create: Създаване + title: Нов администратор show: destroy: Унищожи edit: Редактирай update: + error: Възникна проблем при актуализирането на този администратор. success: Администраторът беше актуализиран успешно + dashboard: + show: + current_organizations: Текущи организации + default_pages: + placeholders: + content: Моля, добавете важно съдържание на статичната страница %{page} в администраторското табло. + title: Заглавие по подразбиране за %{page} + devise: + passwords: + edit: + change_your_password: Промени паролата си + minimum_characters: "(%{minimum} символа минимум)" + new: + forgot_your_password: Забравили сте паролата си + send_me_reset_password_instructions: Изпратете ми инструкции за възстановяване на паролата + shared: + links: + did_not_receive_confirmation_instructions?: Не сте ли получили указания за потвърждение? + did_not_receive_unlock_instructions?: Не сте получили инструкции за отключване? + forgot_your_password?: Забравили сте паролата си? + log_in: Вход + sign_up: Регистрация + menu: + admins: Администратори + dashboard: Табло за управление + oauth_applications: Приложения за OAuth + organizations: Организации models: admin: + fields: + created_at: Създаден на + email: Имейл name: Администратор + validations: + email_uniqueness: вече съществува друг администратор със същия имейл oauth_application: + fields: + created_at: Създаден на + name: Име на приложението за OAuth + organization_name: Организация name: Приложение за OAuth + organization: + actions: + save_and_invite: Създаване на организация и покана на администратор + fields: + created_at: Създадено на + file_upload_settings: Настройки за качване на файл + name: Име + omniauth_settings: Настройки за Omniauth + smtp_settings: SMTP Настройки + name: Организация + oauth_applications: + create: + error: Възникна проблем при създаването на това приложение. + success: Приложението беше създадено успешно. + destroy: + error: Възникна проблем при премахването на това приложение. + success: Приложението беше премахнато успешно. + edit: + save: Запази + title: Редактиране на приложението + form: + select_organization: Избор на организация + index: + confirm_delete: Сигурни ли сте, че искате да изтриете това приложение? + title: Приложения за OAuth + new: + save: Запази + title: Ново приложение + update: + error: Възникна проблем при актуализирането на това приложение. + success: Приложението беше актуализирано успешно. organizations: + advanced_settings: + hide: Скрий разширените настройки + show: Показване на разширените настройки create: + error: Възникна проблем при създаването на нова организация. success: Организацията беше създадена успешно. + edit: + secondary_hosts_hint: Въведете всяка от тях на нов ред + title: Редактиране на организацията + file_upload_settings: + content_types: + admin_hint: Тези типове MIME са разрешени за качвания в администраторския раздел. Потребителите с администратори трябва да са наясно с рисковете при качването на някои формати на документи, така че можете да очаквате да бъдат по-предпазливи при качването на файлове. + default_hint: Тези типове MIME са разрешени за всички потребители по подразбиране. + intro_html: Добавяте заместващи символи със знака звездичка за MIME типовете, напр. изображение/*. smtp_settings: + fieldsets: + sender: Подател instructions: from_label: 'Подателят на имейла ще бъде: „името-на-организацията-ви “. Оставете празно, за да използвате „имейл адресът“ като етикет' + placeholder: + from_email: your-organization@example.org + from_label: your-organization-name + update: + error: Възникна проблем при актуализирането на тази организация. + success: Организацията беше актуализирана успешно. users_registration_mode: + disabled: Достъпът е възможен само с външни профили + enabled: Разрешете на участниците да се регистрират и да влизат в профилите си existing: Не разрешавайте на участниците да се регистрират, но разрешете на съществуващите участници да влизат в профила си + shared: + notices: + no_organization_warning_html: Трябва да създадете организация, за да започнете. Уверете се, че сте прочели %{guide}, преди да продължите. + our_getting_started_guide: нашето стартово ръководство + titles: + dashboard: Табло за управление + decidim: Civil Power + layouts: + decidim: + system: + login_items: + logout: Изход diff --git a/decidim-templates/config/locales/bg.yml b/decidim-templates/config/locales/bg.yml index 80fbe5980b13a..86d148de4a43c 100644 --- a/decidim-templates/config/locales/bg.yml +++ b/decidim-templates/config/locales/bg.yml @@ -1,23 +1,74 @@ --- bg: + activemodel: + attributes: + questionnaire: + title: Заглавие + template: + description: Описание + name: Име decidim: admin: + menu: + templates: Шаблони templates: apply: + error: Възникна проблем при прилагането на този шаблон. success: Шаблонът е приложен успешно copy: + error: Възникна проблем при копирането на този шаблон. success: Шаблонът е копиран успешно create: + error: Възникна проблем при създаването на този шаблон. success: Шаблонът е създаден успешно destroy: success: Шаблонът е изтрит успешно + empty: Все още няма шаблони. update: + error: Възникна проблем при обновяването на този шаблон. success: Шаблонът е обновен успешно + titles: + template_types: + questionnaires: Шаблони за въпросници + templates: Шаблони + models: + questionnaire_template: + fields: + questions: Брой въпроси + title: Заглавие на въпросник + template: + fields: + created_at: Създаден на + name: Шаблон templates: admin: questionnaire_templates: + choose: + create_from_template: Създайте от шаблон + description: На път сте да създадете нов въпросник. Можете да изберете предварително дефиниран шаблон и да го промените след това. + label: Избор на шаблон + placeholder: Избор на шаблон + skip_template: Пропусни edit: + edit: Редактирай empty: Все още няма въпроси + questionnaire: Въпросник form: save: Запази template_title: Информация за шаблона + title: Шаблон за въпросник %{questionnaire_for} + index: + confirm_delete: Сигурни ли сте, че желаете да изтриете този шаблон? + title: Шаблони за въпросници + preview: + current_step: Стъпка %{step} + of_total_steps: от %{total_steps} + tos_agreement: С участието си приемате Условията на услугата + admin_log: + template: + create: "%{user_name} създаде шаблона на въпросника %{resource_name}" + delete: "%{user_name} изтри шаблона на въпросника %{resource_name}" + duplicate: "%{user_name} дублира шаблона на въпросника %{resource_name}" + update: "%{user_name} актуализира шаблона на въпросника %{resource_name}" + template_types: + questionnaires: Въпросници diff --git a/decidim-verifications/config/locales/bg.yml b/decidim-verifications/config/locales/bg.yml index 81ac9eb23f8a6..30c928daa02cb 100644 --- a/decidim-verifications/config/locales/bg.yml +++ b/decidim-verifications/config/locales/bg.yml @@ -3,10 +3,10 @@ bg: activemodel: attributes: config: - available_methods: Достъпни методи - offline: Извън линия - offline_explanation: Инструкции за проверка извън линия - online: На линия + available_methods: Възможни методи + offline: Офлайн + offline_explanation: Инструкции за офлайн верификация + online: Онлайн confirmation: verification_code: Код за потвърждение id_document_information: @@ -71,73 +71,174 @@ bg: help: - Участниците искат да им бъде изпратен код за потвърждение на техния адрес. - Изпращате писмото до техния адрес с кода за потвърждение. - - - - + - Маркирате писмото като "изпратено". + - След като маркирате писмото като изпратено, участникът ще може да въведе кода и да бъде потвърден. csv_census: explanation: Потвърждение чрез преброяването на участниците в организацията + name: Преброяване на участниците в организацията + direct: Директен + help: Помощ id_documents: explanation: Качете документите си за самоличност, за да можем да проверим самоличността Ви + name: Документи за самоличност + multistep: Много-стъпков + name: Име postal_letter: explanation: Ще Ви изпратим писмо по пощата с код, който ще трябва да въведете, за да потвърдим адреса Ви + name: Код с писмо по пощата events: verifications: verify_with_managed_user: email_intro: Участникът %{resource_title} се е опитал да се удостовери с данните на друг участник (%{managed_user_name}). + email_outro: Проверете Списък с конфликти при верификация и се свържете с участника, за да потвърдите данните му и да разрешите проблема. + email_subject: Неуспешен опит за проверка към друг участник notification_title: Участникът %{resource_title} се е опитал да се удостовери с данните на друг участник (%{managed_user_name}). verifications: authorizations: + authorization_metadata: + info: 'Това са данните от текущото потвърждение:' + no_data_stored: Няма съхранени данни. create: + error: Възникна проблем при създаването на оторизацията. success: Успешно се удостоверихте. + unconfirmed: Трябва да потвърдите имейла си, с оглед на Вашата оторизация. destroy: + error: Възникна проблем при изтриването на оторизацията. success: Успешно изтрихте удостоверяването. + first_login: + actions: + another_dummy_authorization_handler: Проверка спрямо друг манипулатор на оторизации + csv_census: Проверка спрямо преброяването на участниците в организацията + dummy_authorization_handler: Проверка спрямо примерния инструмент за оторизация + dummy_authorization_workflow: Проверка спрямо примерния работен процес за оторизиране + id_documents: Потвърдете самоличността си, като качите документ за самоличност + postal_letter: Верифицирайте се, чрез получаване на оторизационен код по пощата + sms: Верифицирайте се, чрез получаване на оторизационен код с SMS + title: Потвърждение на Вашата самоличност + verify_with_these_options: 'Това са възможните опции, с които да потвърдите самоличността си:' index: + expired_verification: Изтекло потвърждение + pending_verification: Очаква проверка + show_renew_info: Щракнете, за да подновите верификацията unauthorized_verification: Ново потвърждение + new: + authorize: Изпрати + authorize_with: Потвърждение чрез %{authorizer} renew_modal: + cancel: Отмяна close: затваряне + continue: Продължи info_renew: Ако искате да актуализирате данните, продължете с подновяването + title: Подновяване на верификацията + skip_verification: Можете да пропуснете това засега и %{link} + start_exploring: започнете да разглеждате csv_census: admin: census: create: + error: Възникна грешка при импортирането на преброяването. success: Успешно бяха импортирани %{count} елемента (%{errors} грешки) destroy_all: success: Всички данни от преброяването бяха изтрити destroy: confirm: Изтриването на преброяването е действие, което не може да бъде отменено. Сигурни ли сте, че искате да продължите? + title: Изтриване на всички данни от преброяването index: data: Заредени са общо %{count} записа. Датата на последното качване е на %{due_date} + empty: Няма данни от преброяването. Използвайте формуляра по-долу, за да ги импортирате чрез файл във формат CSV. + title: Текущи данни от преброяването + instructions: + body: За тази цел трябва да влезете в администрацията на системата и да добавите оторизация за csv_census в организацията + title: Трябва да активирате преброяването чрез файл във формат CSV за тази организация + new: + file: "файл във формат .csv с данни за електронните пощи" + info: 'Трябва да бъде файл във формат CSV, съдържащ само една колона с електронната поща:' + submit: Качване на файл + title: Качване на ново преброяване + authorizations: + new: + error: Не можахме да потвърдим вашия акаунт или не сте в преброяването на организацията. + success: Профилът Ви беше потвърден успешно. dummy_authorization: extra_explanation: postal_codes: one: Участието е ограничено до участници с пощенски код %{postal_codes}. other: 'Участието е ограничено до участници с пощенски кодове %{postal_codes}.' + scope: Участието е ограничено до участници в обхвата %{scope_name}. + user_postal_codes: + one: Участието е ограничено до участници с пощенски код %{postal_codes}, а вашият пощенски код е %{user_postal_code}. + other: 'Участието е ограничено до участници с някой от следните пощенски кодове: %{postal_codes}. Вашият пощенски код е %{user_postal_code}.' + user_scope: Участието е ограничено до участници с обхват %{scope_name}, а вашият обхват е %{user_scope_name}. id_documents: admin: config: + edit: + title: Конфигурация на документите за самоличност + update: Обновяване update: + error: Възникна проблем при актуализирането на конфигурацията. success: Конфигурирането е успешно обновено confirmations: create: error: Потвърждението не съвпада. Моля, опитайте отново или отхвърлете потвърждението, за да може участникът да го коригира. success: Участникът беше потвърден успешно + new: + introduce_user_data: Въведете данните от изображението + reject: Откажи + verify: Провери offline_confirmations: create: error: Потвърждението не съвпада. Моля, опитайте отново или кажете на участника да го коригира success: Участникът беше потвърден успешно + new: + cancel: Отказ + introduce_user_data: Въведете електронната поща на участника и данните от документа + verify: Провери + pending_authorizations: + index: + config: Конфигуриране + offline_verification: Офлайн проверка + title: Изчакващи онлайн проверки + verification_number: 'Верификация #%{n}' rejections: create: success: Потвърждението беше отхвърлено. Участниците ще получат напомняне да коригират документите си authorizations: + choose: + choose_a_type: 'Моля, изберете как искате да бъдете проверен:' + offline: Офлайн + online: Онлайн + title: Потвърдете личноста си, чрез документ за самоличност create: error: Възникна грешка при качването на документа Ви success: Документът беше качен успешно edit: being_reviewed: Преглеждаме документите Ви. Скоро ще потвърдим самоличността Ви. + offline: Използване на офлайн верификация + online: Използване на онлайн верификация rejection_clarity: Уверете се, че информацията се вижда ясно в каченото изображение rejection_correctness: Уверете се, че въведената информация е правилна rejection_notice: Възникна проблем с потвърждението на самоличността Ви. Моля, опитайте отново + send: Заявете верификация отново + new: + send: Заявете верификация + title: Качете Вашия документ за самоличност + update: + error: Възникна грешка при повторното качване на документа Ви. + success: Документът беше успешно качен повторно. + identification_number: ЕГН + passport: Паспорт/лична карта postal_letter: admin: + pending_authorizations: + index: + address: Адрес + letter_sent_at: Писмо изпратено на + mark_as_sent: Маркирй като "изпратено" + not_yet_sent: Все още не е изпратено + title: Изходящи верификации + username: Псевдоним + verification_code: Код за потвърждение postages: create: error: Грешка при обозначаването на писмото като "изпратено". @@ -147,7 +248,12 @@ bg: error: Възникна проблем със заявката Ви success: Благодарим Ви! Ще изпратим код за потвърждение на Вашия адрес edit: + send: Потвърди + title: Въведете кода за потвърждение, който получихте waiting_for_letter: Скоро ще изпратим писмо с код за потвърждение на Вашия адрес + new: + send: Изпратете ми писмо + title: Заявете кода си за потвърждение update: error: Кодът Ви за потвърждение не съвпада с нашия. Моля, проверете отново писмото, което Ви изпратихме success: Поздравления! Успешно потвърдихте самоличността си. @@ -159,7 +265,17 @@ bg: destroy: success: Кодът за потвърждение беше успешно презареден. Моля, въведете повторно телефонния си номер. edit: + confirm_destroy: Сигурни ли сте, че желаете да преиздадете кода за потвърждение? + destroy: Преиздаване на код за потвърждение resend: Не получихте ли кода за потвърждение? + send: Потвърди + title: Въведете кода за потвърждение, който получихте + new: + send: Изпратете ми SMS + title: Заявете кода си за потвърждение update: error: Кодът Ви за потвърждение не съвпада с нашия. Моля, проверете отново съобщението, което Ви изпратихме със SMS. success: Поздравления. Успешно потвърдихте самоличността си. + errors: + messages: + uppercase_only_letters_numbers: трябва да бъде само с главни букви и да съдържа само букви и/или цифри From 946427a5464b44e866282f7436a9497c55a50c66 Mon Sep 17 00:00:00 2001 From: decidim-bot Date: Tue, 30 Apr 2024 14:17:47 +0200 Subject: [PATCH 50/88] New Crowdin updates (#12811) --- decidim-system/config/locales/bg.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/decidim-system/config/locales/bg.yml b/decidim-system/config/locales/bg.yml index d9b92e149d393..180e487180c3f 100644 --- a/decidim-system/config/locales/bg.yml +++ b/decidim-system/config/locales/bg.yml @@ -148,6 +148,7 @@ bg: admin_hint: Тези типове MIME са разрешени за качвания в администраторския раздел. Потребителите с администратори трябва да са наясно с рисковете при качването на някои формати на документи, така че можете да очаквате да бъдат по-предпазливи при качването на файлове. default_hint: Тези типове MIME са разрешени за всички потребители по подразбиране. intro_html: Добавяте заместващи символи със знака звездичка за MIME типовете, напр. изображение/*. + title: Разрешени MIME типове smtp_settings: fieldsets: sender: Подател From 6718a41638606a31868361a1ea38320cdb1d345e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20Pereira=20de=20Lucena?= Date: Tue, 30 Apr 2024 16:00:07 +0200 Subject: [PATCH 51/88] Backport 'Allow deletion of categories when there are no resources associated' to v0.27 (#12808) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Allow deletion of categories when there are no resources associated * Destroy categorization when resource is being destroyed * Add rake task and RELEASE NOTES * Fix template * Prevent destroy command to remove categories in use * Apply suggestions from code review Co-authored-by: Andrés Pereira de Lucena * Update decidim-core/lib/decidim/core/test/shared_examples/has_category.rb Co-authored-by: Andrés Pereira de Lucena * Running linters --------- Co-authored-by: Andrés Pereira de Lucena * Fix ruby syntax for this version * Fix conditional order Suggested in code review * Fix conditional order (part 2) Co-authored-by: Alexandru Emil Lupu --------- Co-authored-by: Alexandru Emil Lupu --- CHANGELOG.md | 10 +++++++ .../decidim/admin/destroy_category.rb | 2 +- .../decidim/admin/categories/index.html.erb | 8 +++++- .../commands/destroy_category_examples.rb | 9 +++++++ .../core/test/shared_examples/has_category.rb | 27 +++++++++++++++++++ decidim-core/lib/decidim/has_category.rb | 2 +- .../upgrade/decidim_fix_categorization.rake | 15 +++++++++++ 7 files changed, 70 insertions(+), 3 deletions(-) create mode 100644 decidim-core/lib/tasks/upgrade/decidim_fix_categorization.rake diff --git a/CHANGELOG.md b/CHANGELOG.md index 977c8742bd8ac..56a5f6cc097a0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -50,6 +50,16 @@ en: You can read more about this change on PR [\#12306](https://github.com/decidim/decidim/pull/12306) +#### Allow removal of orphan categories + +A bug was identified that prevented the deletion of categories lacking associated resources. This action is a one-time task that must be performed directly in the production database. + +```console +bin/rails decidim:upgrade:fix_orphan_categorizations +``` + +You can read more about this change on PR [\#12143](https://github.com/decidim/decidim/pull/12143). + ### Added Nothing. diff --git a/decidim-admin/app/commands/decidim/admin/destroy_category.rb b/decidim-admin/app/commands/decidim/admin/destroy_category.rb index f5c198fa19a36..7fff9db526985 100644 --- a/decidim-admin/app/commands/decidim/admin/destroy_category.rb +++ b/decidim-admin/app/commands/decidim/admin/destroy_category.rb @@ -20,7 +20,7 @@ def initialize(category, user) # # Returns nothing. def call - return broadcast(:invalid) if category.nil? || category.subcategories.any? + return broadcast(:invalid) if category.nil? || category.subcategories.any? || !category.unused? destroy_category broadcast(:ok) diff --git a/decidim-admin/app/views/decidim/admin/categories/index.html.erb b/decidim-admin/app/views/decidim/admin/categories/index.html.erb index 6610948383fc0..44b2d0b6b6fd5 100644 --- a/decidim-admin/app/views/decidim/admin/categories/index.html.erb +++ b/decidim-admin/app/views/decidim/admin/categories/index.html.erb @@ -52,7 +52,13 @@ <% end %> <% if allowed_to? :destroy, :category, category: subcategory %> - <%= icon_link_to "circle-x", category_path(current_participatory_space, subcategory), t("actions.destroy", scope: "decidim.admin"), class: "action-icon--remove", method: :delete, data: { confirm: t("actions.confirm_destroy", scope: "decidim.admin") } %> + <% if subcategory.unused? %> + <%= icon_link_to "circle-x", category_path(current_participatory_space, subcategory), t("actions.destroy", scope: "decidim.admin"), class: "action-icon--remove", method: :delete, data: { confirm: t("actions.confirm_destroy", scope: "decidim.admin") } %> + <% else %> + " data-tooltip="true" data-disable-hover="false"> + <%= icon "delete-bin-line", class: "action-icon action-icon--disabled", role: "img", "aria-hidden": true %> + + <% end %> <% end %> diff --git a/decidim-admin/lib/decidim/admin/test/commands/destroy_category_examples.rb b/decidim-admin/lib/decidim/admin/test/commands/destroy_category_examples.rb index f369262777db6..9b28e08e2f710 100644 --- a/decidim-admin/lib/decidim/admin/test/commands/destroy_category_examples.rb +++ b/decidim-admin/lib/decidim/admin/test/commands/destroy_category_examples.rb @@ -19,6 +19,15 @@ module Admin end end + context "when the category is being used by a resource" do + let(:component) { create(:dummy_component, participatory_space: participatory_space) } + let!(:resource) { create(:dummy_resource, component: component, category: category) } + + it "broadcasts invalid" do + expect { command.call }.to broadcast(:invalid) + end + end + context "when the category is not empty" do let!(:subcategory) { create :subcategory, parent: category } diff --git a/decidim-core/lib/decidim/core/test/shared_examples/has_category.rb b/decidim-core/lib/decidim/core/test/shared_examples/has_category.rb index e86c5618c0ddf..083c177350aaa 100644 --- a/decidim-core/lib/decidim/core/test/shared_examples/has_category.rb +++ b/decidim-core/lib/decidim/core/test/shared_examples/has_category.rb @@ -1,6 +1,8 @@ # frozen_string_literal: true shared_examples_for "has category" do + let(:participatory_space) { subject.participatory_space } + context "when the category is from another organization" do before do subject.category = create(:category) @@ -8,4 +10,29 @@ it { is_expected.not_to be_valid } end + + context "when the category is from the same organization" do + before do + subject.category = create(:category, participatory_space: participatory_space) + end + + it { is_expected.to be_valid } + end + + context "when the resource is being deleted" do + before do + subject.category = create(:category, participatory_space: participatory_space) + subject.save! + end + + it "persists the categorization" do + expect(subject.categorization).to be_persisted + end + + it "deletes the categorization" do + expect(Decidim::Categorization.count).to eq(1) + expect { subject.destroy }.to change(Decidim::Categorization, :count).by(-1) + expect(Decidim::Categorization.count).to eq(0) + end + end end diff --git a/decidim-core/lib/decidim/has_category.rb b/decidim-core/lib/decidim/has_category.rb index f779436d1eaf4..6fb7f190809c9 100644 --- a/decidim-core/lib/decidim/has_category.rb +++ b/decidim-core/lib/decidim/has_category.rb @@ -8,7 +8,7 @@ module HasCategory extend ActiveSupport::Concern included do - has_one :categorization, as: :categorizable + has_one :categorization, as: :categorizable, class_name: "Decidim::Categorization", dependent: :destroy has_one :category, through: :categorization scope :with_category, lambda { |category| diff --git a/decidim-core/lib/tasks/upgrade/decidim_fix_categorization.rake b/decidim-core/lib/tasks/upgrade/decidim_fix_categorization.rake new file mode 100644 index 0000000000000..9885d94056f81 --- /dev/null +++ b/decidim-core/lib/tasks/upgrade/decidim_fix_categorization.rake @@ -0,0 +1,15 @@ +# frozen_string_literal: true + +namespace :decidim do + namespace :upgrade do + desc "Remove orphan categorizations" + task fix_orphan_categorizations: :environment do + logger = Logger.new($stdout) + logger.info("Removing orphan categorizations...") + + Decidim::Categorization.find_each do |categorization| + categorization.destroy if categorization.categorizable.nil? + end + end + end +end From 4c6ab09a94d5692571636fa85fa1991a890f2131 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20Pereira=20de=20Lucena?= Date: Tue, 30 Apr 2024 18:30:56 +0200 Subject: [PATCH 52/88] Bump to v0.27.6 version (#12814) * Prepare 0.27.6 release * Fix spec with new translation from Crowdin --- .decidim-version | 2 +- Gemfile.lock | 282 +++++++++--------- .../lib/decidim/accountability/version.rb | 2 +- decidim-admin/lib/decidim/admin/version.rb | 2 +- decidim-api/lib/decidim/api/version.rb | 2 +- .../lib/decidim/assemblies/version.rb | 2 +- decidim-blogs/lib/decidim/blogs/version.rb | 2 +- .../lib/decidim/budgets/version.rb | 2 +- .../lib/decidim/comments/version.rb | 2 +- .../lib/decidim/conferences/version.rb | 2 +- .../lib/decidim/consultations/version.rb | 2 +- decidim-core/lib/decidim/core/version.rb | 2 +- decidim-core/spec/system/locales_spec.rb | 2 +- .../lib/decidim/debates/version.rb | 2 +- decidim-dev/lib/decidim/dev/version.rb | 2 +- .../lib/decidim/elections/version.rb | 2 +- decidim-forms/lib/decidim/forms/version.rb | 2 +- decidim-generators/Gemfile.lock | 262 ++++++++-------- .../lib/decidim/generators/version.rb | 2 +- .../lib/decidim/initiatives/version.rb | 2 +- .../lib/decidim/meetings/version.rb | 2 +- decidim-pages/lib/decidim/pages/version.rb | 2 +- .../participatory_processes/version.rb | 2 +- .../lib/decidim/proposals/version.rb | 2 +- .../lib/decidim/sortitions/version.rb | 2 +- .../lib/decidim/surveys/version.rb | 2 +- decidim-system/lib/decidim/system/version.rb | 2 +- .../lib/decidim/templates/version.rb | 2 +- .../lib/decidim/verifications/version.rb | 2 +- decidim_app-design/Gemfile.lock | 256 ++++++++-------- decidim_app-design/package-lock.json | 14 +- .../packages/browserslist-config/package.json | 2 +- decidim_app-design/packages/core/package.json | 2 +- decidim_app-design/packages/dev/package.json | 2 +- .../packages/elections/package.json | 2 +- .../packages/eslint-config/package.json | 2 +- .../packages/stylelint-config/package.json | 2 +- .../packages/webpacker/package.json | 2 +- lib/decidim/version.rb | 2 +- package-lock.json | 14 +- packages/browserslist-config/package.json | 2 +- packages/core/package.json | 2 +- packages/dev/package.json | 2 +- packages/elections/package.json | 2 +- packages/eslint-config/package.json | 2 +- packages/stylelint-config/package.json | 2 +- packages/webpacker/package.json | 2 +- 47 files changed, 460 insertions(+), 452 deletions(-) diff --git a/.decidim-version b/.decidim-version index 69bf493e50986..e9e87efa685c7 100644 --- a/.decidim-version +++ b/.decidim-version @@ -1 +1 @@ -0.27.5 +0.27.6 \ No newline at end of file diff --git a/Gemfile.lock b/Gemfile.lock index a250329a29fb7..75b1ebc009035 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,63 +1,63 @@ PATH remote: . specs: - decidim (0.27.5) - decidim-accountability (= 0.27.5) - decidim-admin (= 0.27.5) - decidim-api (= 0.27.5) - decidim-assemblies (= 0.27.5) - decidim-blogs (= 0.27.5) - decidim-budgets (= 0.27.5) - decidim-comments (= 0.27.5) - decidim-core (= 0.27.5) - decidim-debates (= 0.27.5) - decidim-forms (= 0.27.5) - decidim-generators (= 0.27.5) - decidim-meetings (= 0.27.5) - decidim-pages (= 0.27.5) - decidim-participatory_processes (= 0.27.5) - decidim-proposals (= 0.27.5) - decidim-sortitions (= 0.27.5) - decidim-surveys (= 0.27.5) - decidim-system (= 0.27.5) - decidim-templates (= 0.27.5) - decidim-verifications (= 0.27.5) - decidim-accountability (0.27.5) - decidim-comments (= 0.27.5) - decidim-core (= 0.27.5) - decidim-admin (0.27.5) + decidim (0.27.6) + decidim-accountability (= 0.27.6) + decidim-admin (= 0.27.6) + decidim-api (= 0.27.6) + decidim-assemblies (= 0.27.6) + decidim-blogs (= 0.27.6) + decidim-budgets (= 0.27.6) + decidim-comments (= 0.27.6) + decidim-core (= 0.27.6) + decidim-debates (= 0.27.6) + decidim-forms (= 0.27.6) + decidim-generators (= 0.27.6) + decidim-meetings (= 0.27.6) + decidim-pages (= 0.27.6) + decidim-participatory_processes (= 0.27.6) + decidim-proposals (= 0.27.6) + decidim-sortitions (= 0.27.6) + decidim-surveys (= 0.27.6) + decidim-system (= 0.27.6) + decidim-templates (= 0.27.6) + decidim-verifications (= 0.27.6) + decidim-accountability (0.27.6) + decidim-comments (= 0.27.6) + decidim-core (= 0.27.6) + decidim-admin (0.27.6) active_link_to (~> 1.0) - decidim-core (= 0.27.5) + decidim-core (= 0.27.6) devise (~> 4.7) devise-i18n (~> 1.2) devise_invitable (~> 2.0, >= 2.0.9) - decidim-api (0.27.5) - decidim-core (= 0.27.5) + decidim-api (0.27.6) + decidim-core (= 0.27.6) graphql (~> 1.12, < 1.13) graphql-docs (~> 2.1.0) rack-cors (~> 1.0) - decidim-assemblies (0.27.5) - decidim-core (= 0.27.5) - decidim-blogs (0.27.5) - decidim-admin (= 0.27.5) - decidim-comments (= 0.27.5) - decidim-core (= 0.27.5) - decidim-budgets (0.27.5) - decidim-comments (= 0.27.5) - decidim-core (= 0.27.5) - decidim-comments (0.27.5) - decidim-core (= 0.27.5) + decidim-assemblies (0.27.6) + decidim-core (= 0.27.6) + decidim-blogs (0.27.6) + decidim-admin (= 0.27.6) + decidim-comments (= 0.27.6) + decidim-core (= 0.27.6) + decidim-budgets (0.27.6) + decidim-comments (= 0.27.6) + decidim-core (= 0.27.6) + decidim-comments (0.27.6) + decidim-core (= 0.27.6) redcarpet (~> 3.5, >= 3.5.1) - decidim-conferences (0.27.5) - decidim-core (= 0.27.5) - decidim-meetings (= 0.27.5) + decidim-conferences (0.27.6) + decidim-core (= 0.27.6) + decidim-meetings (= 0.27.6) wicked_pdf (~> 2.1) wkhtmltopdf-binary (~> 0.12) - decidim-consultations (0.27.5) - decidim-admin (= 0.27.5) - decidim-comments (= 0.27.5) - decidim-core (= 0.27.5) - decidim-core (0.27.5) + decidim-consultations (0.27.6) + decidim-admin (= 0.27.6) + decidim-comments (= 0.27.6) + decidim-core (= 0.27.6) + decidim-core (0.27.6) active_link_to (~> 1.0) acts_as_list (~> 0.9) batch-loader (~> 1.2) @@ -106,15 +106,15 @@ PATH webpacker (= 6.0.0.rc.5) webpush (~> 1.1) wisper (~> 2.0) - decidim-debates (0.27.5) - decidim-comments (= 0.27.5) - decidim-core (= 0.27.5) - decidim-dev (0.27.5) + decidim-debates (0.27.6) + decidim-comments (= 0.27.6) + decidim-core (= 0.27.6) + decidim-dev (0.27.6) axe-core-rspec (~> 4.1.0) byebug (~> 11.0) capybara (~> 3.24) db-query-matchers (~> 0.10.0) - decidim (= 0.27.5) + decidim (= 0.27.6) erb_lint (~> 0.0.35) factory_bot_rails (~> 4.8) i18n-tasks (~> 0.9.18) @@ -137,62 +137,62 @@ PATH w3c_rspec_validators (~> 0.3.0) webmock (~> 3.6) wisper-rspec (~> 1.0) - decidim-elections (0.27.5) + decidim-elections (0.27.6) decidim-bulletin_board (= 0.23) - decidim-core (= 0.27.5) - decidim-forms (= 0.27.5) - decidim-proposals (= 0.27.5) + decidim-core (= 0.27.6) + decidim-forms (= 0.27.6) + decidim-proposals (= 0.27.6) rack-attack (~> 6.0) voting_schemes-dummy (= 0.23) voting_schemes-electionguard (= 0.23) - decidim-forms (0.27.5) - decidim-core (= 0.27.5) + decidim-forms (0.27.6) + decidim-core (= 0.27.6) wicked_pdf (~> 2.1) wkhtmltopdf-binary (~> 0.12) - decidim-generators (0.27.5) - decidim-core (= 0.27.5) - decidim-initiatives (0.27.5) - decidim-admin (= 0.27.5) - decidim-comments (= 0.27.5) - decidim-core (= 0.27.5) - decidim-verifications (= 0.27.5) + decidim-generators (0.27.6) + decidim-core (= 0.27.6) + decidim-initiatives (0.27.6) + decidim-admin (= 0.27.6) + decidim-comments (= 0.27.6) + decidim-core (= 0.27.6) + decidim-verifications (= 0.27.6) origami (~> 2.1) rexml (~> 3.2.5) wicked (~> 1.3) wicked_pdf (~> 2.1) wkhtmltopdf-binary (~> 0.12) - decidim-meetings (0.27.5) - decidim-core (= 0.27.5) - decidim-forms (= 0.27.5) + decidim-meetings (0.27.6) + decidim-core (= 0.27.6) + decidim-forms (= 0.27.6) icalendar (~> 2.5) - decidim-pages (0.27.5) - decidim-core (= 0.27.5) - decidim-participatory_processes (0.27.5) - decidim-core (= 0.27.5) - decidim-proposals (0.27.5) - decidim-comments (= 0.27.5) - decidim-core (= 0.27.5) + decidim-pages (0.27.6) + decidim-core (= 0.27.6) + decidim-participatory_processes (0.27.6) + decidim-core (= 0.27.6) + decidim-proposals (0.27.6) + decidim-comments (= 0.27.6) + decidim-core (= 0.27.6) doc2text (~> 0.4.5) redcarpet (~> 3.5, >= 3.5.1) - decidim-sortitions (0.27.5) - decidim-admin (= 0.27.5) - decidim-comments (= 0.27.5) - decidim-core (= 0.27.5) - decidim-proposals (= 0.27.5) - decidim-surveys (0.27.5) - decidim-core (= 0.27.5) - decidim-forms (= 0.27.5) - decidim-system (0.27.5) + decidim-sortitions (0.27.6) + decidim-admin (= 0.27.6) + decidim-comments (= 0.27.6) + decidim-core (= 0.27.6) + decidim-proposals (= 0.27.6) + decidim-surveys (0.27.6) + decidim-core (= 0.27.6) + decidim-forms (= 0.27.6) + decidim-system (0.27.6) active_link_to (~> 1.0) - decidim-core (= 0.27.5) + decidim-core (= 0.27.6) devise (~> 4.7) devise-i18n (~> 1.2) devise_invitable (~> 2.0, >= 2.0.9) - decidim-templates (0.27.5) - decidim-core (= 0.27.5) - decidim-forms (= 0.27.5) - decidim-verifications (0.27.5) - decidim-core (= 0.27.5) + decidim-templates (0.27.6) + decidim-core (= 0.27.6) + decidim-forms (= 0.27.6) + decidim-verifications (0.27.6) + decidim-core (= 0.27.6) GEM remote: https://rubygems.org/ @@ -264,7 +264,7 @@ GEM addressable (2.8.6) public_suffix (>= 2.0.2, < 6.0) ast (2.4.2) - axe-core-api (4.8.0) + axe-core-api (4.9.0) dumb_delegator virtus axe-core-rspec (4.1.0) @@ -275,8 +275,9 @@ GEM descendants_tracker (~> 0.0.4) ice_nine (~> 0.11.0) thread_safe (~> 0.3, >= 0.3.1) + base64 (0.2.0) batch-loader (1.5.0) - bcrypt (3.1.19) + bcrypt (3.1.20) better_html (1.0.16) actionview (>= 4.0) activesupport (>= 4.0) @@ -285,6 +286,7 @@ GEM html_tokenizer (~> 0.0.6) parser (>= 2.4) smart_properties + bigdecimal (3.1.7) bindex (0.8.1) bootsnap (1.10.3) msgpack (~> 1.2) @@ -292,16 +294,16 @@ GEM browser (2.7.1) builder (3.2.4) byebug (11.1.3) - capybara (3.39.2) + capybara (3.40.0) addressable matrix mini_mime (>= 0.1.3) - nokogiri (~> 1.8) + nokogiri (~> 1.11) rack (>= 1.6.0) rack-test (>= 0.6.3) regexp_parser (>= 1.5, < 3.0) xpath (~> 3.2) - carrierwave (2.2.5) + carrierwave (2.2.6) activemodel (>= 5.0.0) activesupport (>= 5.0.0) addressable (~> 2.6) @@ -321,7 +323,7 @@ GEM actionpack (>= 5.0) cells (>= 4.1.6, < 5.0.0) charlock_holmes (0.7.7) - chef-utils (18.3.0) + chef-utils (18.4.12) concurrent-ruby childprocess (4.1.0) coercible (1.0.0) @@ -336,10 +338,11 @@ GEM colorize (0.8.1) commonmarker (0.23.10) concurrent-ruby (1.2.3) - crack (0.4.5) + crack (1.0.0) + bigdecimal rexml crass (1.0.6) - css_parser (1.16.0) + css_parser (1.17.1) addressable date (3.3.3) date_validator (0.12.0) @@ -359,7 +362,7 @@ GEM declarative-option (0.1.0) descendants_tracker (0.0.4) thread_safe (~> 0.3, >= 0.3.1) - devise (4.9.3) + devise (4.9.4) bcrypt (~> 3.0) orm_adapter (~> 0.1) railties (>= 4.1.0) @@ -370,13 +373,13 @@ GEM devise_invitable (2.0.9) actionmailer (>= 5.0) devise (>= 4.6) - diff-lcs (1.5.0) + diff-lcs (1.5.1) diffy (3.4.2) - doc2text (0.4.6) - nokogiri (>= 1.13.2, < 1.15.0) + doc2text (0.4.7) + nokogiri (>= 1.13.2, < 1.17.0) rubyzip (~> 2.3.0) docile (1.4.0) - doorkeeper (5.6.6) + doorkeeper (5.7.0) railties (>= 5) doorkeeper-i18n (4.0.1) dumb_delegator (1.0.0) @@ -392,7 +395,7 @@ GEM temple erubi (1.12.0) escape_utils (1.3.0) - excon (0.104.0) + excon (0.110.0) execjs (2.9.1) extended-markdown-filter (0.7.0) html-pipeline (~> 2.9) @@ -432,7 +435,7 @@ GEM file_validators (3.0.0) activemodel (>= 3.2) mime-types (>= 1.0) - fog-core (2.3.0) + fog-core (2.4.0) builder excon (~> 0.71) formatador (>= 0.2, < 2.0) @@ -454,7 +457,7 @@ GEM faraday_middleware graphql-client graphql (1.12.24) - graphql-client (0.18.0) + graphql-client (0.19.0) activesupport (>= 3.0) graphql graphql-docs (2.1.0) @@ -465,14 +468,14 @@ GEM graphql (~> 1.12) html-pipeline (~> 2.9) sass (~> 3.4) - hashdiff (1.0.1) + hashdiff (1.1.0) hashie (5.0.0) - highline (2.1.0) + highline (3.0.1) hkdf (0.3.0) html-pipeline (2.14.3) activesupport (>= 2) nokogiri (>= 1.4) - html_tokenizer (0.0.7) + html_tokenizer (0.0.8) htmlentities (4.3.4) i18n (1.14.1) concurrent-ruby (~> 1.0) @@ -486,7 +489,7 @@ GEM rails-i18n rainbow (>= 2.2.2, < 4.0) terminal-table (>= 1.5.1) - icalendar (2.10.0) + icalendar (2.10.1) ice_cube (~> 0.16) ice_cube (0.16.4) ice_nine (0.11.2) @@ -495,7 +498,7 @@ GEM ruby-vips (>= 2.0.17, < 3) invisible_captcha (0.13.0) rails (>= 3.2.0) - json (2.6.3) + json (2.7.2) jwt (2.2.3) kaminari (1.2.2) activesupport (>= 4.1.0) @@ -533,7 +536,7 @@ GEM net-imap net-pop net-smtp - marcel (1.0.2) + marcel (1.0.4) matrix (0.4.2) mdl (0.13.0) kramdown (~> 2.3) @@ -542,9 +545,9 @@ GEM mixlib-config (>= 2.2.1, < 4) mixlib-shellout method_source (1.0.0) - mime-types (3.5.1) + mime-types (3.5.2) mime-types-data (~> 3.2015) - mime-types-data (3.2023.1003) + mime-types-data (3.2024.0305) mini_magick (4.12.0) mini_mime (1.1.5) mini_portile2 (2.8.5) @@ -556,7 +559,7 @@ GEM chef-utils msgpack (1.4.5) multi_xml (0.6.0) - multipart-post (2.3.0) + multipart-post (2.4.0) net-imap (0.4.4) date net-protocol @@ -583,17 +586,17 @@ GEM rack (>= 1.2, < 4) snaky_hash (~> 2.0) version_gem (~> 1.1) - omniauth (2.1.1) + omniauth (2.1.2) hashie (>= 3.4.6) rack (>= 2.2.3) rack-protection omniauth-facebook (5.0.0) omniauth-oauth2 (~> 1.2) - omniauth-google-oauth2 (1.1.1) + omniauth-google-oauth2 (1.1.2) jwt (>= 2.0) - oauth2 (~> 2.0.6) + oauth2 (~> 2.0) omniauth (~> 2.0) - omniauth-oauth2 (~> 1.8.0) + omniauth-oauth2 (~> 1.8) omniauth-oauth (1.2.0) oauth omniauth (>= 1.0, < 3) @@ -621,7 +624,7 @@ GEM pg_search (2.3.6) activerecord (>= 5.2) activesupport (>= 5.2) - premailer (1.21.0) + premailer (1.23.0) addressable css_parser (>= 1.12.0) htmlentities (>= 4.0.0) @@ -638,7 +641,8 @@ GEM rack (>= 1.0, < 4) rack-cors (1.1.1) rack (>= 2.0.0) - rack-protection (3.1.0) + rack-protection (3.2.0) + base64 (>= 0.1.0) rack (~> 2.2, >= 2.2.4) rack-proxy (0.7.7) rack @@ -696,24 +700,24 @@ GEM actionpack (>= 5.2) railties (>= 5.2) rexml (3.2.5) - rspec (3.12.0) - rspec-core (~> 3.12.0) - rspec-expectations (~> 3.12.0) - rspec-mocks (~> 3.12.0) - rspec-cells (0.3.8) + rspec (3.13.0) + rspec-core (~> 3.13.0) + rspec-expectations (~> 3.13.0) + rspec-mocks (~> 3.13.0) + rspec-cells (0.3.9) cells (>= 4.0.0, < 6.0.0) - rspec-rails (>= 3.0.0, < 6.1.0) - rspec-core (3.12.2) - rspec-support (~> 3.12.0) - rspec-expectations (3.12.3) + rspec-rails (>= 3.0.0, < 6.2.0) + rspec-core (3.13.0) + rspec-support (~> 3.13.0) + rspec-expectations (3.13.0) diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.12.0) + rspec-support (~> 3.13.0) rspec-html-matchers (0.9.4) nokogiri (~> 1) rspec (>= 3.0.0.a, < 4) - rspec-mocks (3.12.6) + rspec-mocks (3.13.0) diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.12.0) + rspec-support (~> 3.13.0) rspec-rails (4.1.2) actionpack (>= 4.2) activesupport (>= 4.2) @@ -724,7 +728,7 @@ GEM rspec-support (~> 3.10) rspec-retry (0.6.2) rspec-core (> 3.3) - rspec-support (3.12.1) + rspec-support (3.13.1) rspec_junit_formatter (0.3.0) rspec-core (>= 2, < 4, != 2.12.0) rubocop (1.28.2) @@ -748,10 +752,10 @@ GEM rubocop-rspec (2.11.1) rubocop (~> 1.19) ruby-progressbar (1.11.0) - ruby-vips (2.2.0) + ruby-vips (2.2.1) ffi (~> 1.12) ruby2_keywords (0.0.5) - rubyXL (3.4.25) + rubyXL (3.4.27) nokogiri (>= 1.10.8) rubyzip (>= 1.3.0) rubyzip (2.3.2) @@ -808,7 +812,7 @@ GEM valid_email2 (2.3.1) activemodel (>= 3.2) mail (~> 2.5) - version_gem (1.1.3) + version_gem (1.1.4) virtus (2.0.0) axiom-types (~> 0.1) coercible (~> 1.0) @@ -832,7 +836,7 @@ GEM activemodel (>= 6.0.0) bindex (>= 0.4.0) railties (>= 6.0.0) - webmock (3.19.1) + webmock (3.23.0) addressable (>= 2.8.0) crack (>= 0.3.2) hashdiff (>= 0.4.0, < 2.0.0) @@ -849,7 +853,7 @@ GEM websocket-extensions (0.1.5) wicked (1.4.0) railties (>= 3.0.7) - wicked_pdf (2.7.0) + wicked_pdf (2.8.0) activesupport wisper (2.0.1) wisper-rspec (1.1.0) diff --git a/decidim-accountability/lib/decidim/accountability/version.rb b/decidim-accountability/lib/decidim/accountability/version.rb index b864c7197ff39..c8ace659d9016 100644 --- a/decidim-accountability/lib/decidim/accountability/version.rb +++ b/decidim-accountability/lib/decidim/accountability/version.rb @@ -4,7 +4,7 @@ module Decidim # This holds decidim-accountability version. module Accountability def self.version - "0.27.5" + "0.27.6" end end end diff --git a/decidim-admin/lib/decidim/admin/version.rb b/decidim-admin/lib/decidim/admin/version.rb index d285f98a89d5a..f6f069fbb3259 100644 --- a/decidim-admin/lib/decidim/admin/version.rb +++ b/decidim-admin/lib/decidim/admin/version.rb @@ -4,7 +4,7 @@ module Decidim # This holds the decidim-admin version. module Admin def self.version - "0.27.5" + "0.27.6" end end end diff --git a/decidim-api/lib/decidim/api/version.rb b/decidim-api/lib/decidim/api/version.rb index b9d1b448a73b7..d7b2b97c25745 100644 --- a/decidim-api/lib/decidim/api/version.rb +++ b/decidim-api/lib/decidim/api/version.rb @@ -4,7 +4,7 @@ module Decidim # This holds the decidim-api version. module Api def self.version - "0.27.5" + "0.27.6" end end end diff --git a/decidim-assemblies/lib/decidim/assemblies/version.rb b/decidim-assemblies/lib/decidim/assemblies/version.rb index eeaf05eb5cda7..3b3d57e9dde7d 100644 --- a/decidim-assemblies/lib/decidim/assemblies/version.rb +++ b/decidim-assemblies/lib/decidim/assemblies/version.rb @@ -4,7 +4,7 @@ module Decidim # This holds the decidim-assemblies version. module Assemblies def self.version - "0.27.5" + "0.27.6" end end end diff --git a/decidim-blogs/lib/decidim/blogs/version.rb b/decidim-blogs/lib/decidim/blogs/version.rb index 150109209348e..e73e11274e73c 100644 --- a/decidim-blogs/lib/decidim/blogs/version.rb +++ b/decidim-blogs/lib/decidim/blogs/version.rb @@ -4,7 +4,7 @@ module Decidim # This holds the decidim-pages version. module Blogs def self.version - "0.27.5" + "0.27.6" end end end diff --git a/decidim-budgets/lib/decidim/budgets/version.rb b/decidim-budgets/lib/decidim/budgets/version.rb index 711b5eef49b0d..b0e7907de0b3e 100644 --- a/decidim-budgets/lib/decidim/budgets/version.rb +++ b/decidim-budgets/lib/decidim/budgets/version.rb @@ -4,7 +4,7 @@ module Decidim # This holds the decidim-budgets version. module Budgets def self.version - "0.27.5" + "0.27.6" end end end diff --git a/decidim-comments/lib/decidim/comments/version.rb b/decidim-comments/lib/decidim/comments/version.rb index 521ee69d5d8aa..3cb23ffa203cb 100644 --- a/decidim-comments/lib/decidim/comments/version.rb +++ b/decidim-comments/lib/decidim/comments/version.rb @@ -4,7 +4,7 @@ module Decidim # This holds the decidim-comments version. module Comments def self.version - "0.27.5" + "0.27.6" end end end diff --git a/decidim-conferences/lib/decidim/conferences/version.rb b/decidim-conferences/lib/decidim/conferences/version.rb index b5cadeee9bae0..dc8a33bb86586 100644 --- a/decidim-conferences/lib/decidim/conferences/version.rb +++ b/decidim-conferences/lib/decidim/conferences/version.rb @@ -4,7 +4,7 @@ module Decidim # This holds the decidim-conferences version. module Conferences def self.version - "0.27.5" + "0.27.6" end end end diff --git a/decidim-consultations/lib/decidim/consultations/version.rb b/decidim-consultations/lib/decidim/consultations/version.rb index 593b3cba5e8fd..a908fff3db09d 100644 --- a/decidim-consultations/lib/decidim/consultations/version.rb +++ b/decidim-consultations/lib/decidim/consultations/version.rb @@ -3,7 +3,7 @@ module Decidim module Consultations def self.version - "0.27.5" + "0.27.6" end end end diff --git a/decidim-core/lib/decidim/core/version.rb b/decidim-core/lib/decidim/core/version.rb index 491654ebdf4c7..759e78ae39871 100644 --- a/decidim-core/lib/decidim/core/version.rb +++ b/decidim-core/lib/decidim/core/version.rb @@ -4,7 +4,7 @@ module Decidim # This holds the decidim-core version. module Core def self.version - "0.27.5" + "0.27.6" end end end diff --git a/decidim-core/spec/system/locales_spec.rb b/decidim-core/spec/system/locales_spec.rb index b011c3c97e158..f3f07ed51510c 100644 --- a/decidim-core/spec/system/locales_spec.rb +++ b/decidim-core/spec/system/locales_spec.rb @@ -59,7 +59,7 @@ click_button "Entra" - expect(page).to have_content("Email o la contrasenya no són vàlids.") + expect(page).to have_content("El Correu electrònic o la contrasenya no són vàlids.") end context "with a signed in user" do diff --git a/decidim-debates/lib/decidim/debates/version.rb b/decidim-debates/lib/decidim/debates/version.rb index 31f710a0015da..98e4a50fe1cbe 100644 --- a/decidim-debates/lib/decidim/debates/version.rb +++ b/decidim-debates/lib/decidim/debates/version.rb @@ -4,7 +4,7 @@ module Decidim # This holds the decidim-debates version. module Debates def self.version - "0.27.5" + "0.27.6" end end end diff --git a/decidim-dev/lib/decidim/dev/version.rb b/decidim-dev/lib/decidim/dev/version.rb index b51b6451fd52e..a359bc7d4b0d8 100644 --- a/decidim-dev/lib/decidim/dev/version.rb +++ b/decidim-dev/lib/decidim/dev/version.rb @@ -4,7 +4,7 @@ module Decidim # This holds the decidim-dev version. module Dev def self.version - "0.27.5" + "0.27.6" end end end diff --git a/decidim-elections/lib/decidim/elections/version.rb b/decidim-elections/lib/decidim/elections/version.rb index 4fe27dd09af74..4e090e118787a 100644 --- a/decidim-elections/lib/decidim/elections/version.rb +++ b/decidim-elections/lib/decidim/elections/version.rb @@ -4,7 +4,7 @@ module Decidim # This holds the decidim-meetings version. module Elections def self.version - "0.27.5" + "0.27.6" end end end diff --git a/decidim-forms/lib/decidim/forms/version.rb b/decidim-forms/lib/decidim/forms/version.rb index 9773c11cd75fd..b36dd710e58db 100644 --- a/decidim-forms/lib/decidim/forms/version.rb +++ b/decidim-forms/lib/decidim/forms/version.rb @@ -4,7 +4,7 @@ module Decidim # This holds the decidim-forms version. module Forms def self.version - "0.27.5" + "0.27.6" end end end diff --git a/decidim-generators/Gemfile.lock b/decidim-generators/Gemfile.lock index f036537959a5c..bf09d0646be6a 100644 --- a/decidim-generators/Gemfile.lock +++ b/decidim-generators/Gemfile.lock @@ -1,63 +1,63 @@ PATH remote: .. specs: - decidim (0.27.5) - decidim-accountability (= 0.27.5) - decidim-admin (= 0.27.5) - decidim-api (= 0.27.5) - decidim-assemblies (= 0.27.5) - decidim-blogs (= 0.27.5) - decidim-budgets (= 0.27.5) - decidim-comments (= 0.27.5) - decidim-core (= 0.27.5) - decidim-debates (= 0.27.5) - decidim-forms (= 0.27.5) - decidim-generators (= 0.27.5) - decidim-meetings (= 0.27.5) - decidim-pages (= 0.27.5) - decidim-participatory_processes (= 0.27.5) - decidim-proposals (= 0.27.5) - decidim-sortitions (= 0.27.5) - decidim-surveys (= 0.27.5) - decidim-system (= 0.27.5) - decidim-templates (= 0.27.5) - decidim-verifications (= 0.27.5) - decidim-accountability (0.27.5) - decidim-comments (= 0.27.5) - decidim-core (= 0.27.5) - decidim-admin (0.27.5) + decidim (0.27.6) + decidim-accountability (= 0.27.6) + decidim-admin (= 0.27.6) + decidim-api (= 0.27.6) + decidim-assemblies (= 0.27.6) + decidim-blogs (= 0.27.6) + decidim-budgets (= 0.27.6) + decidim-comments (= 0.27.6) + decidim-core (= 0.27.6) + decidim-debates (= 0.27.6) + decidim-forms (= 0.27.6) + decidim-generators (= 0.27.6) + decidim-meetings (= 0.27.6) + decidim-pages (= 0.27.6) + decidim-participatory_processes (= 0.27.6) + decidim-proposals (= 0.27.6) + decidim-sortitions (= 0.27.6) + decidim-surveys (= 0.27.6) + decidim-system (= 0.27.6) + decidim-templates (= 0.27.6) + decidim-verifications (= 0.27.6) + decidim-accountability (0.27.6) + decidim-comments (= 0.27.6) + decidim-core (= 0.27.6) + decidim-admin (0.27.6) active_link_to (~> 1.0) - decidim-core (= 0.27.5) + decidim-core (= 0.27.6) devise (~> 4.7) devise-i18n (~> 1.2) devise_invitable (~> 2.0, >= 2.0.9) - decidim-api (0.27.5) - decidim-core (= 0.27.5) + decidim-api (0.27.6) + decidim-core (= 0.27.6) graphql (~> 1.12, < 1.13) graphql-docs (~> 2.1.0) rack-cors (~> 1.0) - decidim-assemblies (0.27.5) - decidim-core (= 0.27.5) - decidim-blogs (0.27.5) - decidim-admin (= 0.27.5) - decidim-comments (= 0.27.5) - decidim-core (= 0.27.5) - decidim-budgets (0.27.5) - decidim-comments (= 0.27.5) - decidim-core (= 0.27.5) - decidim-comments (0.27.5) - decidim-core (= 0.27.5) + decidim-assemblies (0.27.6) + decidim-core (= 0.27.6) + decidim-blogs (0.27.6) + decidim-admin (= 0.27.6) + decidim-comments (= 0.27.6) + decidim-core (= 0.27.6) + decidim-budgets (0.27.6) + decidim-comments (= 0.27.6) + decidim-core (= 0.27.6) + decidim-comments (0.27.6) + decidim-core (= 0.27.6) redcarpet (~> 3.5, >= 3.5.1) - decidim-conferences (0.27.5) - decidim-core (= 0.27.5) - decidim-meetings (= 0.27.5) + decidim-conferences (0.27.6) + decidim-core (= 0.27.6) + decidim-meetings (= 0.27.6) wicked_pdf (~> 2.1) wkhtmltopdf-binary (~> 0.12) - decidim-consultations (0.27.5) - decidim-admin (= 0.27.5) - decidim-comments (= 0.27.5) - decidim-core (= 0.27.5) - decidim-core (0.27.5) + decidim-consultations (0.27.6) + decidim-admin (= 0.27.6) + decidim-comments (= 0.27.6) + decidim-core (= 0.27.6) + decidim-core (0.27.6) active_link_to (~> 1.0) acts_as_list (~> 0.9) batch-loader (~> 1.2) @@ -106,15 +106,15 @@ PATH webpacker (= 6.0.0.rc.5) webpush (~> 1.1) wisper (~> 2.0) - decidim-debates (0.27.5) - decidim-comments (= 0.27.5) - decidim-core (= 0.27.5) - decidim-dev (0.27.5) + decidim-debates (0.27.6) + decidim-comments (= 0.27.6) + decidim-core (= 0.27.6) + decidim-dev (0.27.6) axe-core-rspec (~> 4.1.0) byebug (~> 11.0) capybara (~> 3.24) db-query-matchers (~> 0.10.0) - decidim (= 0.27.5) + decidim (= 0.27.6) erb_lint (~> 0.0.35) factory_bot_rails (~> 4.8) i18n-tasks (~> 0.9.18) @@ -137,62 +137,62 @@ PATH w3c_rspec_validators (~> 0.3.0) webmock (~> 3.6) wisper-rspec (~> 1.0) - decidim-elections (0.27.5) + decidim-elections (0.27.6) decidim-bulletin_board (= 0.23) - decidim-core (= 0.27.5) - decidim-forms (= 0.27.5) - decidim-proposals (= 0.27.5) + decidim-core (= 0.27.6) + decidim-forms (= 0.27.6) + decidim-proposals (= 0.27.6) rack-attack (~> 6.0) voting_schemes-dummy (= 0.23) voting_schemes-electionguard (= 0.23) - decidim-forms (0.27.5) - decidim-core (= 0.27.5) + decidim-forms (0.27.6) + decidim-core (= 0.27.6) wicked_pdf (~> 2.1) wkhtmltopdf-binary (~> 0.12) - decidim-generators (0.27.5) - decidim-core (= 0.27.5) - decidim-initiatives (0.27.5) - decidim-admin (= 0.27.5) - decidim-comments (= 0.27.5) - decidim-core (= 0.27.5) - decidim-verifications (= 0.27.5) + decidim-generators (0.27.6) + decidim-core (= 0.27.6) + decidim-initiatives (0.27.6) + decidim-admin (= 0.27.6) + decidim-comments (= 0.27.6) + decidim-core (= 0.27.6) + decidim-verifications (= 0.27.6) origami (~> 2.1) rexml (~> 3.2.5) wicked (~> 1.3) wicked_pdf (~> 2.1) wkhtmltopdf-binary (~> 0.12) - decidim-meetings (0.27.5) - decidim-core (= 0.27.5) - decidim-forms (= 0.27.5) + decidim-meetings (0.27.6) + decidim-core (= 0.27.6) + decidim-forms (= 0.27.6) icalendar (~> 2.5) - decidim-pages (0.27.5) - decidim-core (= 0.27.5) - decidim-participatory_processes (0.27.5) - decidim-core (= 0.27.5) - decidim-proposals (0.27.5) - decidim-comments (= 0.27.5) - decidim-core (= 0.27.5) + decidim-pages (0.27.6) + decidim-core (= 0.27.6) + decidim-participatory_processes (0.27.6) + decidim-core (= 0.27.6) + decidim-proposals (0.27.6) + decidim-comments (= 0.27.6) + decidim-core (= 0.27.6) doc2text (~> 0.4.5) redcarpet (~> 3.5, >= 3.5.1) - decidim-sortitions (0.27.5) - decidim-admin (= 0.27.5) - decidim-comments (= 0.27.5) - decidim-core (= 0.27.5) - decidim-proposals (= 0.27.5) - decidim-surveys (0.27.5) - decidim-core (= 0.27.5) - decidim-forms (= 0.27.5) - decidim-system (0.27.5) + decidim-sortitions (0.27.6) + decidim-admin (= 0.27.6) + decidim-comments (= 0.27.6) + decidim-core (= 0.27.6) + decidim-proposals (= 0.27.6) + decidim-surveys (0.27.6) + decidim-core (= 0.27.6) + decidim-forms (= 0.27.6) + decidim-system (0.27.6) active_link_to (~> 1.0) - decidim-core (= 0.27.5) + decidim-core (= 0.27.6) devise (~> 4.7) devise-i18n (~> 1.2) devise_invitable (~> 2.0, >= 2.0.9) - decidim-templates (0.27.5) - decidim-core (= 0.27.5) - decidim-forms (= 0.27.5) - decidim-verifications (0.27.5) - decidim-core (= 0.27.5) + decidim-templates (0.27.6) + decidim-core (= 0.27.6) + decidim-forms (= 0.27.6) + decidim-verifications (0.27.6) + decidim-core (= 0.27.6) GEM remote: https://rubygems.org/ @@ -264,7 +264,7 @@ GEM addressable (2.8.6) public_suffix (>= 2.0.2, < 6.0) ast (2.4.2) - axe-core-api (4.8.0) + axe-core-api (4.9.0) dumb_delegator virtus axe-core-rspec (4.1.0) @@ -286,6 +286,7 @@ GEM html_tokenizer (~> 0.0.6) parser (>= 2.4) smart_properties + bigdecimal (3.1.7) bindex (0.8.1) bootsnap (1.10.3) msgpack (~> 1.2) @@ -293,16 +294,16 @@ GEM browser (2.7.1) builder (3.2.4) byebug (11.1.3) - capybara (3.39.2) + capybara (3.40.0) addressable matrix mini_mime (>= 0.1.3) - nokogiri (~> 1.8) + nokogiri (~> 1.11) rack (>= 1.6.0) rack-test (>= 0.6.3) regexp_parser (>= 1.5, < 3.0) xpath (~> 3.2) - carrierwave (2.2.5) + carrierwave (2.2.6) activemodel (>= 5.0.0) activesupport (>= 5.0.0) addressable (~> 2.6) @@ -322,7 +323,7 @@ GEM actionpack (>= 5.0) cells (>= 4.1.6, < 5.0.0) charlock_holmes (0.7.7) - chef-utils (18.3.0) + chef-utils (18.4.12) concurrent-ruby childprocess (4.1.0) coercible (1.0.0) @@ -337,10 +338,11 @@ GEM colorize (0.8.1) commonmarker (0.23.10) concurrent-ruby (1.2.3) - crack (0.4.5) + crack (1.0.0) + bigdecimal rexml crass (1.0.6) - css_parser (1.16.0) + css_parser (1.17.1) addressable date (3.3.4) date_validator (0.12.0) @@ -360,7 +362,7 @@ GEM declarative-option (0.1.0) descendants_tracker (0.0.4) thread_safe (~> 0.3, >= 0.3.1) - devise (4.9.3) + devise (4.9.4) bcrypt (~> 3.0) orm_adapter (~> 0.1) railties (>= 4.1.0) @@ -371,13 +373,13 @@ GEM devise_invitable (2.0.9) actionmailer (>= 5.0) devise (>= 4.6) - diff-lcs (1.5.0) + diff-lcs (1.5.1) diffy (3.4.2) doc2text (0.4.7) nokogiri (>= 1.13.2, < 1.17.0) rubyzip (~> 2.3.0) docile (1.4.0) - doorkeeper (5.6.8) + doorkeeper (5.7.0) railties (>= 5) doorkeeper-i18n (4.0.1) dumb_delegator (1.0.0) @@ -393,7 +395,7 @@ GEM temple erubi (1.12.0) escape_utils (1.3.0) - excon (0.109.0) + excon (0.110.0) execjs (2.9.1) extended-markdown-filter (0.7.0) html-pipeline (~> 2.9) @@ -455,7 +457,7 @@ GEM faraday_middleware graphql-client graphql (1.12.24) - graphql-client (0.18.0) + graphql-client (0.19.0) activesupport (>= 3.0) graphql graphql-docs (2.1.0) @@ -468,12 +470,12 @@ GEM sass (~> 3.4) hashdiff (1.1.0) hashie (5.0.0) - highline (2.1.0) + highline (3.0.1) hkdf (0.3.0) html-pipeline (2.14.3) activesupport (>= 2) nokogiri (>= 1.4) - html_tokenizer (0.0.7) + html_tokenizer (0.0.8) htmlentities (4.3.4) i18n (1.14.1) concurrent-ruby (~> 1.0) @@ -496,7 +498,7 @@ GEM ruby-vips (>= 2.0.17, < 3) invisible_captcha (0.13.0) rails (>= 3.2.0) - json (2.7.1) + json (2.7.2) jwt (2.2.3) kaminari (1.2.2) activesupport (>= 4.1.0) @@ -534,7 +536,7 @@ GEM net-imap net-pop net-smtp - marcel (1.0.2) + marcel (1.0.4) matrix (0.4.2) mdl (0.13.0) kramdown (~> 2.3) @@ -545,7 +547,7 @@ GEM method_source (1.0.0) mime-types (3.5.2) mime-types-data (~> 3.2015) - mime-types-data (3.2024.0206) + mime-types-data (3.2024.0305) mini_magick (4.12.0) mini_mime (1.1.5) mini_portile2 (2.8.5) @@ -590,11 +592,11 @@ GEM rack-protection omniauth-facebook (5.0.0) omniauth-oauth2 (~> 1.2) - omniauth-google-oauth2 (1.1.1) + omniauth-google-oauth2 (1.1.2) jwt (>= 2.0) - oauth2 (~> 2.0.6) + oauth2 (~> 2.0) omniauth (~> 2.0) - omniauth-oauth2 (~> 1.8.0) + omniauth-oauth2 (~> 1.8) omniauth-oauth (1.2.0) oauth omniauth (>= 1.0, < 3) @@ -616,14 +618,14 @@ GEM parallel (1.24.0) parallel_tests (3.13.0) parallel - parser (3.2.2.4) + parser (3.3.1.0) ast (~> 2.4.1) racc pg (1.1.4) pg_search (2.3.6) activerecord (>= 5.2) activesupport (>= 5.2) - premailer (1.22.0) + premailer (1.23.0) addressable css_parser (>= 1.12.0) htmlentities (>= 4.0.0) @@ -692,31 +694,31 @@ GEM ffi (~> 1.0) redcarpet (3.6.0) redis (4.8.1) - regexp_parser (2.8.3) + regexp_parser (2.9.0) request_store (1.5.1) rack (>= 1.4) responders (3.1.1) actionpack (>= 5.2) railties (>= 5.2) rexml (3.2.5) - rspec (3.12.0) - rspec-core (~> 3.12.0) - rspec-expectations (~> 3.12.0) - rspec-mocks (~> 3.12.0) + rspec (3.13.0) + rspec-core (~> 3.13.0) + rspec-expectations (~> 3.13.0) + rspec-mocks (~> 3.13.0) rspec-cells (0.3.9) cells (>= 4.0.0, < 6.0.0) rspec-rails (>= 3.0.0, < 6.2.0) - rspec-core (3.12.2) - rspec-support (~> 3.12.0) - rspec-expectations (3.12.3) + rspec-core (3.13.0) + rspec-support (~> 3.13.0) + rspec-expectations (3.13.0) diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.12.0) + rspec-support (~> 3.13.0) rspec-html-matchers (0.9.4) nokogiri (~> 1) rspec (>= 3.0.0.a, < 4) - rspec-mocks (3.12.6) + rspec-mocks (3.13.0) diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.12.0) + rspec-support (~> 3.13.0) rspec-rails (4.1.2) actionpack (>= 4.2) activesupport (>= 4.2) @@ -727,7 +729,7 @@ GEM rspec-support (~> 3.10) rspec-retry (0.6.2) rspec-core (> 3.3) - rspec-support (3.12.1) + rspec-support (3.13.1) rspec_junit_formatter (0.3.0) rspec-core (>= 2, < 4, != 2.12.0) rubocop (1.28.2) @@ -739,8 +741,8 @@ GEM rubocop-ast (>= 1.17.0, < 2.0) ruby-progressbar (~> 1.7) unicode-display_width (>= 1.4.0, < 3.0) - rubocop-ast (1.30.0) - parser (>= 3.2.1.0) + rubocop-ast (1.31.3) + parser (>= 3.3.1.0) rubocop-rails (2.15.2) activesupport (>= 4.2.0) rack (>= 1.1) @@ -748,10 +750,10 @@ GEM rubocop-rspec (2.11.1) rubocop (~> 1.19) ruby-progressbar (1.13.0) - ruby-vips (2.2.0) + ruby-vips (2.2.1) ffi (~> 1.12) ruby2_keywords (0.0.5) - rubyXL (3.4.25) + rubyXL (3.4.27) nokogiri (>= 1.10.8) rubyzip (>= 1.3.0) rubyzip (2.3.2) @@ -808,7 +810,7 @@ GEM valid_email2 (2.3.1) activemodel (>= 3.2) mail (~> 2.5) - version_gem (1.1.3) + version_gem (1.1.4) virtus (2.0.0) axiom-types (~> 0.1) coercible (~> 1.0) @@ -832,7 +834,7 @@ GEM activemodel (>= 6.0.0) bindex (>= 0.4.0) railties (>= 6.0.0) - webmock (3.19.1) + webmock (3.23.0) addressable (>= 2.8.0) crack (>= 0.3.2) hashdiff (>= 0.4.0, < 2.0.0) diff --git a/decidim-generators/lib/decidim/generators/version.rb b/decidim-generators/lib/decidim/generators/version.rb index b98b011d418cc..4172ce98460ca 100644 --- a/decidim-generators/lib/decidim/generators/version.rb +++ b/decidim-generators/lib/decidim/generators/version.rb @@ -4,7 +4,7 @@ module Decidim module Generators def self.version - "0.27.5" + "0.27.6" end end end diff --git a/decidim-initiatives/lib/decidim/initiatives/version.rb b/decidim-initiatives/lib/decidim/initiatives/version.rb index c9e1c01fd7a85..9f9db2813572c 100644 --- a/decidim-initiatives/lib/decidim/initiatives/version.rb +++ b/decidim-initiatives/lib/decidim/initiatives/version.rb @@ -4,7 +4,7 @@ module Decidim # This holds the decidim-initiatives version. module Initiatives def self.version - "0.27.5" + "0.27.6" end end end diff --git a/decidim-meetings/lib/decidim/meetings/version.rb b/decidim-meetings/lib/decidim/meetings/version.rb index 97c9df0f01b1f..73d9fec2cde37 100644 --- a/decidim-meetings/lib/decidim/meetings/version.rb +++ b/decidim-meetings/lib/decidim/meetings/version.rb @@ -4,7 +4,7 @@ module Decidim # This holds the decidim-meetings version. module Meetings def self.version - "0.27.5" + "0.27.6" end end end diff --git a/decidim-pages/lib/decidim/pages/version.rb b/decidim-pages/lib/decidim/pages/version.rb index df0039df141e4..41c6fc511f8d6 100644 --- a/decidim-pages/lib/decidim/pages/version.rb +++ b/decidim-pages/lib/decidim/pages/version.rb @@ -4,7 +4,7 @@ module Decidim # This holds the decidim-pages version. module Pages def self.version - "0.27.5" + "0.27.6" end end end diff --git a/decidim-participatory_processes/lib/decidim/participatory_processes/version.rb b/decidim-participatory_processes/lib/decidim/participatory_processes/version.rb index 1f0950d608856..f8bef1603efaa 100644 --- a/decidim-participatory_processes/lib/decidim/participatory_processes/version.rb +++ b/decidim-participatory_processes/lib/decidim/participatory_processes/version.rb @@ -4,7 +4,7 @@ module Decidim # This holds the decidim-participatory_processes version. module ParticipatoryProcesses def self.version - "0.27.5" + "0.27.6" end end end diff --git a/decidim-proposals/lib/decidim/proposals/version.rb b/decidim-proposals/lib/decidim/proposals/version.rb index 44009dfd7a2f8..6ea553fee5dcd 100644 --- a/decidim-proposals/lib/decidim/proposals/version.rb +++ b/decidim-proposals/lib/decidim/proposals/version.rb @@ -4,7 +4,7 @@ module Decidim # This holds decidim-proposals version. module Proposals def self.version - "0.27.5" + "0.27.6" end end end diff --git a/decidim-sortitions/lib/decidim/sortitions/version.rb b/decidim-sortitions/lib/decidim/sortitions/version.rb index 597a9adbc24e9..fc103a5353c33 100644 --- a/decidim-sortitions/lib/decidim/sortitions/version.rb +++ b/decidim-sortitions/lib/decidim/sortitions/version.rb @@ -3,7 +3,7 @@ module Decidim module Sortitions def self.version - "0.27.5" + "0.27.6" end end end diff --git a/decidim-surveys/lib/decidim/surveys/version.rb b/decidim-surveys/lib/decidim/surveys/version.rb index faed65770bfdf..b876805034d29 100644 --- a/decidim-surveys/lib/decidim/surveys/version.rb +++ b/decidim-surveys/lib/decidim/surveys/version.rb @@ -4,7 +4,7 @@ module Decidim # This holds the decidim-surveys version. module Surveys def self.version - "0.27.5" + "0.27.6" end end end diff --git a/decidim-system/lib/decidim/system/version.rb b/decidim-system/lib/decidim/system/version.rb index 83820294c3b0e..579f1863d3933 100644 --- a/decidim-system/lib/decidim/system/version.rb +++ b/decidim-system/lib/decidim/system/version.rb @@ -4,7 +4,7 @@ module Decidim # This holds the decidim-system version. module System def self.version - "0.27.5" + "0.27.6" end end end diff --git a/decidim-templates/lib/decidim/templates/version.rb b/decidim-templates/lib/decidim/templates/version.rb index 966f103ae7a30..8fb03be24eeb5 100644 --- a/decidim-templates/lib/decidim/templates/version.rb +++ b/decidim-templates/lib/decidim/templates/version.rb @@ -4,7 +4,7 @@ module Decidim # This holds the decidim-templates version. module Templates def self.version - "0.27.5" + "0.27.6" end end end diff --git a/decidim-verifications/lib/decidim/verifications/version.rb b/decidim-verifications/lib/decidim/verifications/version.rb index 687770f719ba7..4b06e62e62f42 100644 --- a/decidim-verifications/lib/decidim/verifications/version.rb +++ b/decidim-verifications/lib/decidim/verifications/version.rb @@ -4,7 +4,7 @@ module Decidim # This holds the decidim-verifications version. module Verifications def self.version - "0.27.5" + "0.27.6" end end end diff --git a/decidim_app-design/Gemfile.lock b/decidim_app-design/Gemfile.lock index f3e2752fc1b30..1529531b5f5bf 100644 --- a/decidim_app-design/Gemfile.lock +++ b/decidim_app-design/Gemfile.lock @@ -1,63 +1,63 @@ PATH remote: .. specs: - decidim (0.27.5) - decidim-accountability (= 0.27.5) - decidim-admin (= 0.27.5) - decidim-api (= 0.27.5) - decidim-assemblies (= 0.27.5) - decidim-blogs (= 0.27.5) - decidim-budgets (= 0.27.5) - decidim-comments (= 0.27.5) - decidim-core (= 0.27.5) - decidim-debates (= 0.27.5) - decidim-forms (= 0.27.5) - decidim-generators (= 0.27.5) - decidim-meetings (= 0.27.5) - decidim-pages (= 0.27.5) - decidim-participatory_processes (= 0.27.5) - decidim-proposals (= 0.27.5) - decidim-sortitions (= 0.27.5) - decidim-surveys (= 0.27.5) - decidim-system (= 0.27.5) - decidim-templates (= 0.27.5) - decidim-verifications (= 0.27.5) - decidim-accountability (0.27.5) - decidim-comments (= 0.27.5) - decidim-core (= 0.27.5) - decidim-admin (0.27.5) + decidim (0.27.6) + decidim-accountability (= 0.27.6) + decidim-admin (= 0.27.6) + decidim-api (= 0.27.6) + decidim-assemblies (= 0.27.6) + decidim-blogs (= 0.27.6) + decidim-budgets (= 0.27.6) + decidim-comments (= 0.27.6) + decidim-core (= 0.27.6) + decidim-debates (= 0.27.6) + decidim-forms (= 0.27.6) + decidim-generators (= 0.27.6) + decidim-meetings (= 0.27.6) + decidim-pages (= 0.27.6) + decidim-participatory_processes (= 0.27.6) + decidim-proposals (= 0.27.6) + decidim-sortitions (= 0.27.6) + decidim-surveys (= 0.27.6) + decidim-system (= 0.27.6) + decidim-templates (= 0.27.6) + decidim-verifications (= 0.27.6) + decidim-accountability (0.27.6) + decidim-comments (= 0.27.6) + decidim-core (= 0.27.6) + decidim-admin (0.27.6) active_link_to (~> 1.0) - decidim-core (= 0.27.5) + decidim-core (= 0.27.6) devise (~> 4.7) devise-i18n (~> 1.2) devise_invitable (~> 2.0, >= 2.0.9) - decidim-api (0.27.5) - decidim-core (= 0.27.5) + decidim-api (0.27.6) + decidim-core (= 0.27.6) graphql (~> 1.12, < 1.13) graphql-docs (~> 2.1.0) rack-cors (~> 1.0) - decidim-assemblies (0.27.5) - decidim-core (= 0.27.5) - decidim-blogs (0.27.5) - decidim-admin (= 0.27.5) - decidim-comments (= 0.27.5) - decidim-core (= 0.27.5) - decidim-budgets (0.27.5) - decidim-comments (= 0.27.5) - decidim-core (= 0.27.5) - decidim-comments (0.27.5) - decidim-core (= 0.27.5) + decidim-assemblies (0.27.6) + decidim-core (= 0.27.6) + decidim-blogs (0.27.6) + decidim-admin (= 0.27.6) + decidim-comments (= 0.27.6) + decidim-core (= 0.27.6) + decidim-budgets (0.27.6) + decidim-comments (= 0.27.6) + decidim-core (= 0.27.6) + decidim-comments (0.27.6) + decidim-core (= 0.27.6) redcarpet (~> 3.5, >= 3.5.1) - decidim-conferences (0.27.5) - decidim-core (= 0.27.5) - decidim-meetings (= 0.27.5) + decidim-conferences (0.27.6) + decidim-core (= 0.27.6) + decidim-meetings (= 0.27.6) wicked_pdf (~> 2.1) wkhtmltopdf-binary (~> 0.12) - decidim-consultations (0.27.5) - decidim-admin (= 0.27.5) - decidim-comments (= 0.27.5) - decidim-core (= 0.27.5) - decidim-core (0.27.5) + decidim-consultations (0.27.6) + decidim-admin (= 0.27.6) + decidim-comments (= 0.27.6) + decidim-core (= 0.27.6) + decidim-core (0.27.6) active_link_to (~> 1.0) acts_as_list (~> 0.9) batch-loader (~> 1.2) @@ -106,15 +106,15 @@ PATH webpacker (= 6.0.0.rc.5) webpush (~> 1.1) wisper (~> 2.0) - decidim-debates (0.27.5) - decidim-comments (= 0.27.5) - decidim-core (= 0.27.5) - decidim-dev (0.27.5) + decidim-debates (0.27.6) + decidim-comments (= 0.27.6) + decidim-core (= 0.27.6) + decidim-dev (0.27.6) axe-core-rspec (~> 4.1.0) byebug (~> 11.0) capybara (~> 3.24) db-query-matchers (~> 0.10.0) - decidim (= 0.27.5) + decidim (= 0.27.6) erb_lint (~> 0.0.35) factory_bot_rails (~> 4.8) i18n-tasks (~> 0.9.18) @@ -137,62 +137,62 @@ PATH w3c_rspec_validators (~> 0.3.0) webmock (~> 3.6) wisper-rspec (~> 1.0) - decidim-elections (0.27.5) + decidim-elections (0.27.6) decidim-bulletin_board (= 0.23) - decidim-core (= 0.27.5) - decidim-forms (= 0.27.5) - decidim-proposals (= 0.27.5) + decidim-core (= 0.27.6) + decidim-forms (= 0.27.6) + decidim-proposals (= 0.27.6) rack-attack (~> 6.0) voting_schemes-dummy (= 0.23) voting_schemes-electionguard (= 0.23) - decidim-forms (0.27.5) - decidim-core (= 0.27.5) + decidim-forms (0.27.6) + decidim-core (= 0.27.6) wicked_pdf (~> 2.1) wkhtmltopdf-binary (~> 0.12) - decidim-generators (0.27.5) - decidim-core (= 0.27.5) - decidim-initiatives (0.27.5) - decidim-admin (= 0.27.5) - decidim-comments (= 0.27.5) - decidim-core (= 0.27.5) - decidim-verifications (= 0.27.5) + decidim-generators (0.27.6) + decidim-core (= 0.27.6) + decidim-initiatives (0.27.6) + decidim-admin (= 0.27.6) + decidim-comments (= 0.27.6) + decidim-core (= 0.27.6) + decidim-verifications (= 0.27.6) origami (~> 2.1) rexml (~> 3.2.5) wicked (~> 1.3) wicked_pdf (~> 2.1) wkhtmltopdf-binary (~> 0.12) - decidim-meetings (0.27.5) - decidim-core (= 0.27.5) - decidim-forms (= 0.27.5) + decidim-meetings (0.27.6) + decidim-core (= 0.27.6) + decidim-forms (= 0.27.6) icalendar (~> 2.5) - decidim-pages (0.27.5) - decidim-core (= 0.27.5) - decidim-participatory_processes (0.27.5) - decidim-core (= 0.27.5) - decidim-proposals (0.27.5) - decidim-comments (= 0.27.5) - decidim-core (= 0.27.5) + decidim-pages (0.27.6) + decidim-core (= 0.27.6) + decidim-participatory_processes (0.27.6) + decidim-core (= 0.27.6) + decidim-proposals (0.27.6) + decidim-comments (= 0.27.6) + decidim-core (= 0.27.6) doc2text (~> 0.4.5) redcarpet (~> 3.5, >= 3.5.1) - decidim-sortitions (0.27.5) - decidim-admin (= 0.27.5) - decidim-comments (= 0.27.5) - decidim-core (= 0.27.5) - decidim-proposals (= 0.27.5) - decidim-surveys (0.27.5) - decidim-core (= 0.27.5) - decidim-forms (= 0.27.5) - decidim-system (0.27.5) + decidim-sortitions (0.27.6) + decidim-admin (= 0.27.6) + decidim-comments (= 0.27.6) + decidim-core (= 0.27.6) + decidim-proposals (= 0.27.6) + decidim-surveys (0.27.6) + decidim-core (= 0.27.6) + decidim-forms (= 0.27.6) + decidim-system (0.27.6) active_link_to (~> 1.0) - decidim-core (= 0.27.5) + decidim-core (= 0.27.6) devise (~> 4.7) devise-i18n (~> 1.2) devise_invitable (~> 2.0, >= 2.0.9) - decidim-templates (0.27.5) - decidim-core (= 0.27.5) - decidim-forms (= 0.27.5) - decidim-verifications (0.27.5) - decidim-core (= 0.27.5) + decidim-templates (0.27.6) + decidim-core (= 0.27.6) + decidim-forms (= 0.27.6) + decidim-verifications (0.27.6) + decidim-core (= 0.27.6) GEM remote: https://rubygems.org/ @@ -264,7 +264,7 @@ GEM addressable (2.8.6) public_suffix (>= 2.0.2, < 6.0) ast (2.4.2) - axe-core-api (4.8.0) + axe-core-api (4.9.0) dumb_delegator virtus axe-core-rspec (4.1.0) @@ -286,6 +286,7 @@ GEM html_tokenizer (~> 0.0.6) parser (>= 2.4) smart_properties + bigdecimal (3.1.7) bindex (0.8.1) bootsnap (1.10.3) msgpack (~> 1.2) @@ -293,16 +294,16 @@ GEM browser (2.7.1) builder (3.2.4) byebug (11.1.3) - capybara (3.39.2) + capybara (3.40.0) addressable matrix mini_mime (>= 0.1.3) - nokogiri (~> 1.8) + nokogiri (~> 1.11) rack (>= 1.6.0) rack-test (>= 0.6.3) regexp_parser (>= 1.5, < 3.0) xpath (~> 3.2) - carrierwave (2.2.5) + carrierwave (2.2.6) activemodel (>= 5.0.0) activesupport (>= 5.0.0) addressable (~> 2.6) @@ -322,7 +323,7 @@ GEM actionpack (>= 5.0) cells (>= 4.1.6, < 5.0.0) charlock_holmes (0.7.7) - chef-utils (18.3.0) + chef-utils (18.4.12) concurrent-ruby childprocess (4.1.0) coercible (1.0.0) @@ -337,10 +338,11 @@ GEM colorize (0.8.1) commonmarker (0.23.10) concurrent-ruby (1.2.3) - crack (0.4.5) + crack (1.0.0) + bigdecimal rexml crass (1.0.6) - css_parser (1.16.0) + css_parser (1.17.1) addressable date (3.3.4) date_validator (0.12.0) @@ -360,7 +362,7 @@ GEM declarative-option (0.1.0) descendants_tracker (0.0.4) thread_safe (~> 0.3, >= 0.3.1) - devise (4.9.3) + devise (4.9.4) bcrypt (~> 3.0) orm_adapter (~> 0.1) railties (>= 4.1.0) @@ -371,13 +373,13 @@ GEM devise_invitable (2.0.9) actionmailer (>= 5.0) devise (>= 4.6) - diff-lcs (1.5.0) + diff-lcs (1.5.1) diffy (3.4.2) doc2text (0.4.7) nokogiri (>= 1.13.2, < 1.17.0) rubyzip (~> 2.3.0) docile (1.4.0) - doorkeeper (5.6.9) + doorkeeper (5.7.0) railties (>= 5) doorkeeper-i18n (4.0.1) dumb_delegator (1.0.0) @@ -393,7 +395,7 @@ GEM temple erubi (1.12.0) escape_utils (1.3.0) - excon (0.109.0) + excon (0.110.0) execjs (2.9.1) extended-markdown-filter (0.7.0) html-pipeline (~> 2.9) @@ -455,7 +457,7 @@ GEM faraday_middleware graphql-client graphql (1.12.24) - graphql-client (0.18.0) + graphql-client (0.19.0) activesupport (>= 3.0) graphql graphql-docs (2.1.0) @@ -468,12 +470,12 @@ GEM sass (~> 3.4) hashdiff (1.1.0) hashie (5.0.0) - highline (2.1.0) + highline (3.0.1) hkdf (0.3.0) html-pipeline (2.14.3) activesupport (>= 2) nokogiri (>= 1.4) - html_tokenizer (0.0.7) + html_tokenizer (0.0.8) htmlentities (4.3.4) i18n (1.14.1) concurrent-ruby (~> 1.0) @@ -496,7 +498,7 @@ GEM ruby-vips (>= 2.0.17, < 3) invisible_captcha (0.13.0) rails (>= 3.2.0) - json (2.7.1) + json (2.7.2) jwt (2.2.3) kaminari (1.2.2) activesupport (>= 4.1.0) @@ -534,7 +536,7 @@ GEM net-imap net-pop net-smtp - marcel (1.0.2) + marcel (1.0.4) matrix (0.4.2) mdl (0.13.0) kramdown (~> 2.3) @@ -545,7 +547,7 @@ GEM method_source (1.0.0) mime-types (3.5.2) mime-types-data (~> 3.2015) - mime-types-data (3.2024.0206) + mime-types-data (3.2024.0305) mini_magick (4.12.0) mini_mime (1.1.5) mini_portile2 (2.8.5) @@ -590,11 +592,11 @@ GEM rack-protection omniauth-facebook (5.0.0) omniauth-oauth2 (~> 1.2) - omniauth-google-oauth2 (1.1.1) + omniauth-google-oauth2 (1.1.2) jwt (>= 2.0) - oauth2 (~> 2.0.6) + oauth2 (~> 2.0) omniauth (~> 2.0) - omniauth-oauth2 (~> 1.8.0) + omniauth-oauth2 (~> 1.8) omniauth-oauth (1.2.0) oauth omniauth (>= 1.0, < 3) @@ -622,7 +624,7 @@ GEM pg_search (2.3.6) activerecord (>= 5.2) activesupport (>= 5.2) - premailer (1.22.0) + premailer (1.23.0) addressable css_parser (>= 1.12.0) htmlentities (>= 4.0.0) @@ -698,24 +700,24 @@ GEM actionpack (>= 5.2) railties (>= 5.2) rexml (3.2.5) - rspec (3.12.0) - rspec-core (~> 3.12.0) - rspec-expectations (~> 3.12.0) - rspec-mocks (~> 3.12.0) + rspec (3.13.0) + rspec-core (~> 3.13.0) + rspec-expectations (~> 3.13.0) + rspec-mocks (~> 3.13.0) rspec-cells (0.3.9) cells (>= 4.0.0, < 6.0.0) rspec-rails (>= 3.0.0, < 6.2.0) - rspec-core (3.12.2) - rspec-support (~> 3.12.0) - rspec-expectations (3.12.3) + rspec-core (3.13.0) + rspec-support (~> 3.13.0) + rspec-expectations (3.13.0) diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.12.0) + rspec-support (~> 3.13.0) rspec-html-matchers (0.9.4) nokogiri (~> 1) rspec (>= 3.0.0.a, < 4) - rspec-mocks (3.12.6) + rspec-mocks (3.13.0) diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.12.0) + rspec-support (~> 3.13.0) rspec-rails (4.1.2) actionpack (>= 4.2) activesupport (>= 4.2) @@ -726,7 +728,7 @@ GEM rspec-support (~> 3.10) rspec-retry (0.6.2) rspec-core (> 3.3) - rspec-support (3.12.1) + rspec-support (3.13.1) rspec_junit_formatter (0.3.0) rspec-core (>= 2, < 4, != 2.12.0) rubocop (1.28.2) @@ -750,10 +752,10 @@ GEM rubocop-rspec (2.11.1) rubocop (~> 1.19) ruby-progressbar (1.11.0) - ruby-vips (2.2.0) + ruby-vips (2.2.1) ffi (~> 1.12) ruby2_keywords (0.0.5) - rubyXL (3.4.25) + rubyXL (3.4.27) nokogiri (>= 1.10.8) rubyzip (>= 1.3.0) rubyzip (2.3.2) @@ -810,7 +812,7 @@ GEM valid_email2 (2.3.1) activemodel (>= 3.2) mail (~> 2.5) - version_gem (1.1.3) + version_gem (1.1.4) virtus (2.0.0) axiom-types (~> 0.1) coercible (~> 1.0) @@ -834,7 +836,7 @@ GEM activemodel (>= 6.0.0) bindex (>= 0.4.0) railties (>= 6.0.0) - webmock (3.19.1) + webmock (3.23.0) addressable (>= 2.8.0) crack (>= 0.3.2) hashdiff (>= 0.4.0, < 2.0.0) @@ -851,7 +853,7 @@ GEM websocket-extensions (0.1.5) wicked (1.4.0) railties (>= 3.0.7) - wicked_pdf (2.7.0) + wicked_pdf (2.8.0) activesupport wisper (2.0.1) wisper-rspec (1.1.0) diff --git a/decidim_app-design/package-lock.json b/decidim_app-design/package-lock.json index 4188fa4497507..b69344dfbe5e2 100644 --- a/decidim_app-design/package-lock.json +++ b/decidim_app-design/package-lock.json @@ -17410,12 +17410,12 @@ }, "packages/browserslist-config": { "name": "@decidim/browserslist-config", - "version": "0.27.5", + "version": "0.27.6", "license": "AGPL-3.0" }, "packages/core": { "name": "@decidim/core", - "version": "0.27.5", + "version": "0.27.6", "license": "AGPL-3.0", "dependencies": { "@joeattardi/emoji-button": "^4.6.2", @@ -17470,7 +17470,7 @@ }, "packages/dev": { "name": "@decidim/dev", - "version": "0.27.5", + "version": "0.27.6", "dev": true, "license": "AGPL-3.0", "dependencies": { @@ -17479,7 +17479,7 @@ }, "packages/elections": { "name": "@decidim/elections", - "version": "0.27.5", + "version": "0.27.6", "license": "AGPL-3.0", "dependencies": { "@decidim/decidim-bulletin_board": "0.23.0", @@ -17489,7 +17489,7 @@ }, "packages/eslint-config": { "name": "@decidim/eslint-config", - "version": "0.27.5", + "version": "0.27.6", "dev": true, "license": "AGPL-3.0", "peerDependencies": { @@ -17506,7 +17506,7 @@ }, "packages/stylelint-config": { "name": "@decidim/stylelint-config", - "version": "0.27.5", + "version": "0.27.6", "dev": true, "license": "AGPL-3.0", "peerDependencies": { @@ -17515,7 +17515,7 @@ }, "packages/webpacker": { "name": "@decidim/webpacker", - "version": "0.27.5", + "version": "0.27.6", "license": "AGPL-3.0", "dependencies": { "@babel/core": "^7.15.5", diff --git a/decidim_app-design/packages/browserslist-config/package.json b/decidim_app-design/packages/browserslist-config/package.json index 277db1c27cd3e..0b5480a8c2c30 100644 --- a/decidim_app-design/packages/browserslist-config/package.json +++ b/decidim_app-design/packages/browserslist-config/package.json @@ -1,7 +1,7 @@ { "name": "@decidim/browserslist-config", "description": "The Browserslist configuration for Decidim", - "version": "0.27.5", + "version": "0.27.6", "repository": { "url": "git@github.com:decidim/decidim.git", "type": "git", diff --git a/decidim_app-design/packages/core/package.json b/decidim_app-design/packages/core/package.json index e8ebde7e545fc..4f90f50dd4238 100644 --- a/decidim_app-design/packages/core/package.json +++ b/decidim_app-design/packages/core/package.json @@ -1,7 +1,7 @@ { "name": "@decidim/core", "description": "The core dependencies for Decidim", - "version": "0.27.5", + "version": "0.27.6", "repository": { "url": "git@github.com:decidim/decidim.git", "type": "git", diff --git a/decidim_app-design/packages/dev/package.json b/decidim_app-design/packages/dev/package.json index 5091e66b32c4c..1d31808bf7191 100644 --- a/decidim_app-design/packages/dev/package.json +++ b/decidim_app-design/packages/dev/package.json @@ -1,7 +1,7 @@ { "name": "@decidim/dev", "description": "The dev dependencies for Decidim", - "version": "0.27.5", + "version": "0.27.6", "repository": { "url": "git@github.com:decidim/decidim.git", "type": "git", diff --git a/decidim_app-design/packages/elections/package.json b/decidim_app-design/packages/elections/package.json index 2c16f548377e0..c2d8e2f070ebc 100644 --- a/decidim_app-design/packages/elections/package.json +++ b/decidim_app-design/packages/elections/package.json @@ -1,7 +1,7 @@ { "name": "@decidim/elections", "description": "The elections and votings dependencies for Decidim", - "version": "0.27.5", + "version": "0.27.6", "repository": { "url": "git@github.com:decidim/decidim.git", "type": "git", diff --git a/decidim_app-design/packages/eslint-config/package.json b/decidim_app-design/packages/eslint-config/package.json index 470f44cfb5989..ad1e3ff5e6f2e 100644 --- a/decidim_app-design/packages/eslint-config/package.json +++ b/decidim_app-design/packages/eslint-config/package.json @@ -1,7 +1,7 @@ { "name": "@decidim/eslint-config", "description": "The eslint configuration for Decidim", - "version": "0.27.5", + "version": "0.27.6", "repository": { "url": "git@github.com:decidim/decidim.git", "type": "git", diff --git a/decidim_app-design/packages/stylelint-config/package.json b/decidim_app-design/packages/stylelint-config/package.json index 98d2b578553d2..2588384b6a274 100644 --- a/decidim_app-design/packages/stylelint-config/package.json +++ b/decidim_app-design/packages/stylelint-config/package.json @@ -1,7 +1,7 @@ { "name": "@decidim/stylelint-config", "description": "The stylelint configuration for Decidim", - "version": "0.27.5", + "version": "0.27.6", "repository": { "url": "git@github.com:decidim/decidim.git", "type": "git", diff --git a/decidim_app-design/packages/webpacker/package.json b/decidim_app-design/packages/webpacker/package.json index 093f691ff94d8..5da61013352b3 100644 --- a/decidim_app-design/packages/webpacker/package.json +++ b/decidim_app-design/packages/webpacker/package.json @@ -1,7 +1,7 @@ { "name": "@decidim/webpacker", "description": "The webpacker dependencies for Decidim", - "version": "0.27.5", + "version": "0.27.6", "repository": { "url": "git@github.com:decidim/decidim.git", "type": "git", diff --git a/lib/decidim/version.rb b/lib/decidim/version.rb index 411688aa6cd2f..33312e17e28b8 100644 --- a/lib/decidim/version.rb +++ b/lib/decidim/version.rb @@ -3,6 +3,6 @@ # This holds the decidim version and the faker version it uses. module Decidim def self.version - "0.27.5" + "0.27.6" end end diff --git a/package-lock.json b/package-lock.json index 4188fa4497507..b69344dfbe5e2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -17410,12 +17410,12 @@ }, "packages/browserslist-config": { "name": "@decidim/browserslist-config", - "version": "0.27.5", + "version": "0.27.6", "license": "AGPL-3.0" }, "packages/core": { "name": "@decidim/core", - "version": "0.27.5", + "version": "0.27.6", "license": "AGPL-3.0", "dependencies": { "@joeattardi/emoji-button": "^4.6.2", @@ -17470,7 +17470,7 @@ }, "packages/dev": { "name": "@decidim/dev", - "version": "0.27.5", + "version": "0.27.6", "dev": true, "license": "AGPL-3.0", "dependencies": { @@ -17479,7 +17479,7 @@ }, "packages/elections": { "name": "@decidim/elections", - "version": "0.27.5", + "version": "0.27.6", "license": "AGPL-3.0", "dependencies": { "@decidim/decidim-bulletin_board": "0.23.0", @@ -17489,7 +17489,7 @@ }, "packages/eslint-config": { "name": "@decidim/eslint-config", - "version": "0.27.5", + "version": "0.27.6", "dev": true, "license": "AGPL-3.0", "peerDependencies": { @@ -17506,7 +17506,7 @@ }, "packages/stylelint-config": { "name": "@decidim/stylelint-config", - "version": "0.27.5", + "version": "0.27.6", "dev": true, "license": "AGPL-3.0", "peerDependencies": { @@ -17515,7 +17515,7 @@ }, "packages/webpacker": { "name": "@decidim/webpacker", - "version": "0.27.5", + "version": "0.27.6", "license": "AGPL-3.0", "dependencies": { "@babel/core": "^7.15.5", diff --git a/packages/browserslist-config/package.json b/packages/browserslist-config/package.json index 277db1c27cd3e..0b5480a8c2c30 100644 --- a/packages/browserslist-config/package.json +++ b/packages/browserslist-config/package.json @@ -1,7 +1,7 @@ { "name": "@decidim/browserslist-config", "description": "The Browserslist configuration for Decidim", - "version": "0.27.5", + "version": "0.27.6", "repository": { "url": "git@github.com:decidim/decidim.git", "type": "git", diff --git a/packages/core/package.json b/packages/core/package.json index e8ebde7e545fc..4f90f50dd4238 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,7 +1,7 @@ { "name": "@decidim/core", "description": "The core dependencies for Decidim", - "version": "0.27.5", + "version": "0.27.6", "repository": { "url": "git@github.com:decidim/decidim.git", "type": "git", diff --git a/packages/dev/package.json b/packages/dev/package.json index 5091e66b32c4c..1d31808bf7191 100644 --- a/packages/dev/package.json +++ b/packages/dev/package.json @@ -1,7 +1,7 @@ { "name": "@decidim/dev", "description": "The dev dependencies for Decidim", - "version": "0.27.5", + "version": "0.27.6", "repository": { "url": "git@github.com:decidim/decidim.git", "type": "git", diff --git a/packages/elections/package.json b/packages/elections/package.json index 2c16f548377e0..c2d8e2f070ebc 100644 --- a/packages/elections/package.json +++ b/packages/elections/package.json @@ -1,7 +1,7 @@ { "name": "@decidim/elections", "description": "The elections and votings dependencies for Decidim", - "version": "0.27.5", + "version": "0.27.6", "repository": { "url": "git@github.com:decidim/decidim.git", "type": "git", diff --git a/packages/eslint-config/package.json b/packages/eslint-config/package.json index 470f44cfb5989..ad1e3ff5e6f2e 100644 --- a/packages/eslint-config/package.json +++ b/packages/eslint-config/package.json @@ -1,7 +1,7 @@ { "name": "@decidim/eslint-config", "description": "The eslint configuration for Decidim", - "version": "0.27.5", + "version": "0.27.6", "repository": { "url": "git@github.com:decidim/decidim.git", "type": "git", diff --git a/packages/stylelint-config/package.json b/packages/stylelint-config/package.json index 98d2b578553d2..2588384b6a274 100644 --- a/packages/stylelint-config/package.json +++ b/packages/stylelint-config/package.json @@ -1,7 +1,7 @@ { "name": "@decidim/stylelint-config", "description": "The stylelint configuration for Decidim", - "version": "0.27.5", + "version": "0.27.6", "repository": { "url": "git@github.com:decidim/decidim.git", "type": "git", diff --git a/packages/webpacker/package.json b/packages/webpacker/package.json index 093f691ff94d8..5da61013352b3 100644 --- a/packages/webpacker/package.json +++ b/packages/webpacker/package.json @@ -1,7 +1,7 @@ { "name": "@decidim/webpacker", "description": "The webpacker dependencies for Decidim", - "version": "0.27.5", + "version": "0.27.6", "repository": { "url": "git@github.com:decidim/decidim.git", "type": "git", From 928259cd7f5711b70d71d2d7b14a260b4d74afdd Mon Sep 17 00:00:00 2001 From: decidim-bot Date: Tue, 30 Apr 2024 19:27:49 +0200 Subject: [PATCH 53/88] New Crowdin updates (#12818) * New translations en.yml (Bulgarian) * New translations en.yml (Spanish) * New translations en.yml (Catalan) --- decidim-meetings/config/locales/ca.yml | 2 +- decidim-meetings/config/locales/es.yml | 2 +- decidim-system/config/locales/bg.yml | 33 ++++++++++++++++++++++++++ 3 files changed, 35 insertions(+), 2 deletions(-) diff --git a/decidim-meetings/config/locales/ca.yml b/decidim-meetings/config/locales/ca.yml index 484704dc7ecc6..6cbc89e8f7292 100644 --- a/decidim-meetings/config/locales/ca.yml +++ b/decidim-meetings/config/locales/ca.yml @@ -419,7 +419,7 @@ ca: body: La trobada "%{meeting_title}" està pendent de tancar-se. Si us plau, afegiu un informe de la reunió fent servir el botó "Tancar trobada". greetings: Hola,
    %{organization_name}
    %{organization_url} hello: Hola %{username}, - subject: Està pendent tancar la trobada "%{meeting_title}" amb un informe + subject: Està pendent tancar la trobada amb un informe a la plataforma %{organization_name} conference_venues: Seus de les jornades content_blocks: upcoming_meetings: diff --git a/decidim-meetings/config/locales/es.yml b/decidim-meetings/config/locales/es.yml index 7c11d83692ce7..5efca7994af8b 100644 --- a/decidim-meetings/config/locales/es.yml +++ b/decidim-meetings/config/locales/es.yml @@ -419,7 +419,7 @@ es: body: El encuentro "%{meeting_title}" está pendiente de cerrarse. Por favor, agrega un informe de la reunión usando el botón "Cerrar encuentro". greetings: Hola,
    %{organization_name}
    %{organization_url} hello: Hola %{username}, - subject: Está pendiente cerrar el encuentro "%{meeting_title}" con un informe + subject: Está pendiente cerrar el encuentro con un informe en la plataforma %{organization_name} conference_venues: Sedes de las jornadas content_blocks: upcoming_meetings: diff --git a/decidim-system/config/locales/bg.yml b/decidim-system/config/locales/bg.yml index 180e487180c3f..9653cbf3c59e2 100644 --- a/decidim-system/config/locales/bg.yml +++ b/decidim-system/config/locales/bg.yml @@ -149,6 +149,39 @@ bg: default_hint: Тези типове MIME са разрешени за всички потребители по подразбиране. intro_html: Добавяте заместващи символи със знака звездичка за MIME типовете, напр. изображение/*. title: Разрешени MIME типове + file_extensions: + admin_hint: Тези файлови разширения са разрешени за качване в раздела за администриране. Администраторите трябва да са наясно с рисковете при качването на някои формати документи, така че можете да очаквате да бъдат по-предпазливи при качването на файлове. + default_hint: Тези файлови разширения са разрешени за всички потребители по подразбиране. + image_hint: Тези файлови разширения са разрешени за всякакъв вид качване на изображения. + title: Разрешени файлови разширения + file_sizes: + avatar_hint: Мегабайти (MB). Това ограничение за размера на файла се използва за качване на изображения на аватар. + default_hint: Мегабайти (MB). Това ограничение за размера на файла е по подразбиране, което се използва за всички качвания на файлове, освен ако не е посочено друго. + title: Максимална големина на файловете + intro: | + Моля, бъдете изключително внимателни, когато обмисляте да промените тези настройки. Колкото по-малко позволявате, толкова по-добре. + Разрешаването на конкретни файлови разширения или типове MIME може да изложи потребителите на системата на рискове за сигурността и може също да повлияе на достъпността на уебсайта. + index: + title: Организации + new: + default: По подразбиране? + enabled: Активно + locale: Локално + reference_prefix_hint: Референтният префикс се използва за уникално идентифициране на ресурсите в цялата организация. + secondary_hosts_hint: Въведете всеки един от тях на нов ред. + title: Нова организация + omniauth_settings: + decidim: + client_id: ID на клиента + client_secret: Тайна на клиента + site_url: Уебсайт URL + enabled: Активно + enabled_by_default: Този доставчик е активиран по подразбиране. Може да бъде редактиран, но не и деактивиран. + facebook: + app_id: Идентификатор (ID) на приложението + app_secret: Тайна на приложението + google_oauth2: + client_id: ID на клиента smtp_settings: fieldsets: sender: Подател From e2c9ab996bfa8c6b23357d46fdb35e9c1c9e12ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20Pereira=20de=20Lucena?= Date: Mon, 6 May 2024 22:18:29 +0200 Subject: [PATCH 54/88] Add missing changelog from v0.27.6 releases notes (#12823) * Add missing changelog from v0.27.6 releases notes * Add tag link in releases notes Suggested in code review --- CHANGELOG.md | 86 ++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 83 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 56a5f6cc097a0..20057e579f2cf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## [0.27.6](https://github.com/decidim/decidim/tree/0.27.6) + ### Upgrade notes #### Verifications documents configurations @@ -60,6 +62,8 @@ bin/rails decidim:upgrade:fix_orphan_categorizations You can read more about this change on PR [\#12143](https://github.com/decidim/decidim/pull/12143). +## Detailed changes + ### Added Nothing. @@ -70,7 +74,79 @@ Nothing. ### Fixed -Nothing. +- **decidim-participatory processes**: Fix using CTA image on promoted process group [\#12202](https://github.com/decidim/decidim/pull/12202) +- **decidim-proposals**: Backport 'Add answered_at field in proposals' export' to v0.27 [\#12297](https://github.com/decidim/decidim/pull/12297) +- Backport 'Use git instead of filesystem for releases files' to v0.27 [\#12303](https://github.com/decidim/decidim/pull/12303) +- Backport 'Lock Ruby to Decidim supported version' to v0.27 [\#12299](https://github.com/decidim/decidim/pull/12299) +- **decidim-admin**: Backport 'Fix favicons in admin panel' to v0.27 [\#12315](https://github.com/decidim/decidim/pull/12315) +- **decidim-budgets**: Backport 'Change the selected column in budgets' projects' to v0.27 [\#12296](https://github.com/decidim/decidim/pull/12296) +- **decidim-admin**: Backport 'Add admin permissions for conflicts and logs controllers' to v0.27 [\#12300](https://github.com/decidim/decidim/pull/12300) +- **decidim-core**: Backport 'Allow passing a blob object to `AssetRouter::Storage`' to v0.27 [\#12304](https://github.com/decidim/decidim/pull/12304) +- Backport 'Fix webpack generation on cells specs' to v0.27 [\#12335](https://github.com/decidim/decidim/pull/12335) +- **decidim-proposals**: Backport 'Protect participatory text buttons under authorization' to v0.27 [\#12353](https://github.com/decidim/decidim/pull/12353) +- **decidim-meetings**: Do not display dates for upcoming moderated meetings [\#12295](https://github.com/decidim/decidim/pull/12295) +- **decidim-proposals**: Add participatory text missing attribute [\#12330](https://github.com/decidim/decidim/pull/12330) +- **decidim-core**: Backport 'Properly handle the category name in tags cell' to v0.27 [\#12298](https://github.com/decidim/decidim/pull/12298) +- Pinning chrome version to v119 [\#12420](https://github.com/decidim/decidim/pull/12420) +- Backport 'Fix Proposals bulk action form' to v0.27 [\#12444](https://github.com/decidim/decidim/pull/12444) +- **decidim-elections**: Backport 'Fix voting data migration for AddFollowableCounterCacheToVotings' to v0.27 [\#12443](https://github.com/decidim/decidim/pull/12443) +- Backport 'Fix authorization handler in OmniauthRegistrations' to v0.27 [\#12445](https://github.com/decidim/decidim/pull/12445) +- Backport 'Generate component Gemfile template when releasing' to v0.27 [\#12450](https://github.com/decidim/decidim/pull/12450) +- **decidim-budgets**: Backport 'Pass the budget context to the admin new and edit actions for projects' to v0.27 [\#12448](https://github.com/decidim/decidim/pull/12448) +- **decidim-admin**, **decidim-system**: Backport 'Fix exception when presenting oauth application in admin log' to v0.27 [\#12447](https://github.com/decidim/decidim/pull/12447) +- Backport 'Bump stringio and carrierwave' to v0.27 [\#12449](https://github.com/decidim/decidim/pull/12449) +- **decidim-verifications**: Backport 'Allow apps to configure the document types in the verifications module' to v0.27 [\#12451](https://github.com/decidim/decidim/pull/12451) +- **decidim-dev**: Backport 'Disable shm usage in Capybara' to v0.27 [\#12506](https://github.com/decidim/decidim/pull/12506) +- **decidim-admin**: Backport 'Fix deleted and blocked users display from impersonations participant list' to v0.27 [\#12505](https://github.com/decidim/decidim/pull/12505) +- Backport 'Fix decidim-core and decidim-api dependency tree' to v0.27 [\#12512](https://github.com/decidim/decidim/pull/12512) +- **decidim-api**: Backport 'Add note about the unescaped contents of the GraphQL API' to v0.27 [\#12510](https://github.com/decidim/decidim/pull/12510) +- **decidim-core**: Backport 'Refactor of events specs' to v0.27 [\#12507](https://github.com/decidim/decidim/pull/12507) +- **decidim-core**: Backport 'Refactor of events specs (part 2)' to v0.27 [\#12508](https://github.com/decidim/decidim/pull/12508) +- **decidim-core**: Backport 'Implement push notifications for conversations' messages' to v0.27 [\#12511](https://github.com/decidim/decidim/pull/12511) +- Backport 'Standardize the way resources are being listed ...' to v0.27 [\#12533](https://github.com/decidim/decidim/pull/12533) +- Backport 'Fix decidim-templates usage' to v0.27 [\#12600](https://github.com/decidim/decidim/pull/12600) +- **decidim-admin**: Backport 'Fix images URL in newsletters' to v0.27 [\#12612](https://github.com/decidim/decidim/pull/12612) +- Fix embeds for resources and spaces that shouldn't be embedded [\#12528](https://github.com/decidim/decidim/pull/12528) +- **decidim-comments**: Backport 'Restrict comments replies tree including polymorphism' to v0.27 [\#12305](https://github.com/decidim/decidim/pull/12305) +- Backport 'Patch participatory spaces factories' to v0.27 [\#12647](https://github.com/decidim/decidim/pull/12647) +- Backport 'Patch events on the new format' to v0.27 [\#12648](https://github.com/decidim/decidim/pull/12648) +- Backport 'Patch components and spaces factories' to v0.27 [\#12547](https://github.com/decidim/decidim/pull/12547) +- **decidim-core**: Backport 'Fix user profile current tab' to v0.27 [\#12729](https://github.com/decidim/decidim/pull/12729) +- Backport 'Add description for the decidim:reminders:all task' to v0.27 [\#12733](https://github.com/decidim/decidim/pull/12733) +- Backport 'Add matrix for Decidim/Ruby/Node versions in manual guide' to v0.27 [\#12759](https://github.com/decidim/decidim/pull/12759) +- **decidim-admin**, **decidim-core**, **decidim-generators**: Backport 'Fix bug in welcome notifications when the organization has weird characters' to v0.27 [\#12784](https://github.com/decidim/decidim/pull/12784) +- **decidim-comments**: Backport 'Add votes count to comment caches' to v0.27 [\#12782](https://github.com/decidim/decidim/pull/12782) +- **decidim-budgets**: Backport 'Fix DOM text reinterpreted as HTML in budgets' exit handler' to v0.27 [\#12769](https://github.com/decidim/decidim/pull/12769) +- **decidim-initiatives**: Backport 'Fix potential unsafe external link in initiatives' to v0.27 [\#12780](https://github.com/decidim/decidim/pull/12780) +- **decidim-api**: Backport 'Fix graphiql initial query escaping' to v0.27 [\#12779](https://github.com/decidim/decidim/pull/12779) +- **decidim-core**: Backport 'Fix clear-text storage of sensitive information in omniauth registration' to v0.27 [\#12773](https://github.com/decidim/decidim/pull/12773) +- **decidim-accountability**: Backport 'Remove ComponentInterface from the ResultType in the API' to v0.27 [\#12774](https://github.com/decidim/decidim/pull/12774) +- **decidim-core**: Backport 'Fix flaky spec on join user group command spec' to v0.27 [\#12776](https://github.com/decidim/decidim/pull/12776) +- **decidim-core**: Backport 'Fix flaky spec on endorsements controller' to v0.27 [\#12777](https://github.com/decidim/decidim/pull/12777) +- **decidim-core**: Backport 'Fix overly permissive regular expression range in "has reference" specs' to v0.27 [\#12770](https://github.com/decidim/decidim/pull/12770) +- **decidim-proposals**: Backport 'Add counter cache for proposals' ValuationAssignments' to v0.27 [\#12771](https://github.com/decidim/decidim/pull/12771) +- **decidim-admin**, **decidim-core**: Backport 'Fix API paths when deploying decidim in folder' to v0.27 [\#12775](https://github.com/decidim/decidim/pull/12775) +- **decidim-core**: Backport 'Improve testing on address cell' to v0.27 [\#12788](https://github.com/decidim/decidim/pull/12788) +- **decidim-core**: Backport 'Fix illogical heading order on registration page' to v0.27 [\#12791](https://github.com/decidim/decidim/pull/12791) +- **decidim-proposals**: Backport 'Fix flaky specs in proposals' to v0.27 [\#12795](https://github.com/decidim/decidim/pull/12795) +- **decidim-core**, **decidim-dev**: Backport 'Fix flaky shakapacker compilation' to v0.27 [\#12781](https://github.com/decidim/decidim/pull/12781) +- **decidim-core**: Backport 'Fix performance issue with attribute encryption/decryption' to v0.27 [\#12793](https://github.com/decidim/decidim/pull/12793) +- **decidim-core**: Backport 'Improve premailer HTML parsing' to v0.27 [\#12789](https://github.com/decidim/decidim/pull/12789) +- **decidim-comments**: Backport 'Fix flaky spec on CommentVote model spec' to v0.27 [\#12790](https://github.com/decidim/decidim/pull/12790) +- **decidim-assemblies**, **decidim-conferences**, **decidim-core**, **decidim-initiatives**, **decidim-meetings**, **decidim-participatory processes**: Backport 'Don't add the slug of the space in some links' to v0.27 [\#12792](https://github.com/decidim/decidim/pull/12792) +- Backport 'Fix flaky generator spec with missing `package.json`' to v0.27 [\#12772](https://github.com/decidim/decidim/pull/12772) +- **decidim-core**: Backport 'Fix duplicate ActiveSupport notifications' to v0.27 [\#12801](https://github.com/decidim/decidim/pull/12801) +- **decidim-comments**: Backport 'Improve performance on comment rendering' to v0.27 [\#12799](https://github.com/decidim/decidim/pull/12799) +- **decidim-templates**: Backport 'Skip authenticity token in questionnaire templates' to v0.27 [\#12798](https://github.com/decidim/decidim/pull/12798) +- **decidim-meetings**: Backport 'Fix selection of polls with two answers and single options questions' to v0.27 [\#12803](https://github.com/decidim/decidim/pull/12803) +- Backport 'Add patch_generators task to maintainers' releases instructions' to v0.27 [\#12800](https://github.com/decidim/decidim/pull/12800) +- **decidim-admin**, **decidim-budgets**: Backport 'Do not show scopes column in budgets if there isn't subscopes' to v0.27 [\#12802](https://github.com/decidim/decidim/pull/12802) +- **decidim-core**: Backport 'Show extended information when a new comment is in a digest email' to v0.27 [\#12805](https://github.com/decidim/decidim/pull/12805) +- **decidim-core**: Backport 'Prevent malformed URLs in the general search' to v0.27 [\#12807](https://github.com/decidim/decidim/pull/12807) +- **decidim-budgets**, **decidim-dev**: Backport 'Prevent multiple requests from creating multiple orders at budgets' to v0.27 [\#12804](https://github.com/decidim/decidim/pull/12804) +- **decidim-proposals**: Backport 'Attempt to fix flaky spec on proposals' ammends' to v0.27 [\#12796](https://github.com/decidim/decidim/pull/12796) +- **decidim-core**: Backport 'Update Leaflet and related NPM packages' to v0.27 [\#12794](https://github.com/decidim/decidim/pull/12794) +- **decidim-admin**, **decidim-core**: Backport 'Allow deletion of categories when there are no resources associated' to v0.27 [\#12808](https://github.com/decidim/decidim/pull/12808) ### Removed @@ -78,11 +154,15 @@ Nothing. ### Developer improvements -Nothing. +- Backport 'Improve testing on address cell' to v0.27 [\#12788](https://github.com/decidim/decidim/pull/12788) +- Backport 'Improve premailer HTML parsing' to v0.27 [\#12789](https://github.com/decidim/decidim/pull/12789) ### Internal -Nothing. +- **decidim-elections**: Remove elections pipeline in 0.27 [\#12456](https://github.com/decidim/decidim/pull/12456) +- Backport 'Patch participatory spaces factories' to v0.27 [\#12647](https://github.com/decidim/decidim/pull/12647) +- Backport 'Patch events on the new format' to v0.27 [\#12648](https://github.com/decidim/decidim/pull/12648) +- **decidim-accountability**, **decidim-admin**, **decidim-api**, **decidim-assemblies**, **decidim-blogs**, **decidim-budgets**, **decidim-comments**, **decidim-conferences**, **decidim-consultations**, **decidim-core**, **decidim-debates**, **decidim-dev**, **decidim-elections**, **decidim-forms**, **decidim-generators**, **decidim-initiatives**, **decidim-meetings**, **decidim-pages**, **decidim-participatory processes**, **decidim-proposals**, **decidim-sortitions**, **decidim-surveys**, **decidim-system**, **decidim-templates**, **decidim-verifications**: Bump to v0.27.6 version [\#12814](https://github.com/decidim/decidim/pull/12814) ## [0.27.5](https://github.com/decidim/decidim/tree/0.27.5) From 8f3c8aba51592a2cc2b834ec8c3fe179a36743cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20Pereira=20de=20Lucena?= Date: Tue, 7 May 2024 17:43:56 +0200 Subject: [PATCH 55/88] Fix lighthouse URLs (#12839) Co-authored-by: Alexandru Emil Lupu --- decidim-dev/lib/tasks/lighthouse_report.rake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/decidim-dev/lib/tasks/lighthouse_report.rake b/decidim-dev/lib/tasks/lighthouse_report.rake index 4f019a96b9db6..e208f02b89965 100644 --- a/decidim-dev/lib/tasks/lighthouse_report.rake +++ b/decidim-dev/lib/tasks/lighthouse_report.rake @@ -16,8 +16,8 @@ namespace :decidim do host = "http://localhost:3000" urls = ["/"] urls << ::Decidim::ResourceLocatorPresenter.new(Decidim::ParticipatoryProcess.published.first).path - urls << ::Decidim::ResourceLocatorPresenter.new(Decidim::Meetings::Meeting.published.first).path - urls << ::Decidim::ResourceLocatorPresenter.new(Decidim::Proposals::Proposal.published.first).path + urls << ::Decidim::ResourceLocatorPresenter.new(Decidim::Meetings::Meeting.published.not_hidden.first).path + urls << ::Decidim::ResourceLocatorPresenter.new(Decidim::Proposals::Proposal.published.not_hidden.first).path # Update lighthouse configuration with the urls lighthouse_rc_path = Rails.root.join("../.lighthouserc.json") From 954238f7909e2a4a6495be5d7a100059779d0e04 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=20Bol=C3=ADvar?= Date: Mon, 27 May 2024 08:01:04 +0200 Subject: [PATCH 56/88] Backport 'Order users by term similarity within admin dashboard selectors' to v0.27 (#12885) --- .../decidim/admin/organization_controller.rb | 11 ++-- .../organizations_controller_spec.rb | 65 ++++++++++++++++++- 2 files changed, 69 insertions(+), 7 deletions(-) diff --git a/decidim-admin/app/controllers/decidim/admin/organization_controller.rb b/decidim-admin/app/controllers/decidim/admin/organization_controller.rb index b5d566b68c723..890023587e863 100644 --- a/decidim-admin/app/controllers/decidim/admin/organization_controller.rb +++ b/decidim-admin/app/controllers/decidim/admin/organization_controller.rb @@ -44,13 +44,16 @@ def search(relation) respond_to do |format| format.json do if (term = params[:term].to_s).present? - query = relation.order(name: :asc) query = if term.start_with?("@") - query.where("nickname ILIKE ?", "#{term.delete("@")}%") + nickname = term.delete("@") + relation.where("nickname ILIKE ?", "#{nickname}%") + .order(Arel.sql(ActiveRecord::Base.sanitize_sql_array("similarity(nickname, '#{nickname}') DESC"))) else - query.where("name ILIKE ?", "%#{term}%").or( - query.where("email ILIKE ?", "%#{term}%") + relation.where("name ILIKE ?", "%#{term}%").or( + relation.where("email ILIKE ?", "%#{term}%") ) + .order(Arel.sql(ActiveRecord::Base.sanitize_sql_array("GREATEST(similarity(name, '#{term}'), similarity(email, '#{term}')) DESC"))) + .order(Arel.sql(ActiveRecord::Base.sanitize_sql_array("(similarity(name, '#{term}') + similarity(email, '#{term}')) / 2 DESC"))) end render json: query.all.collect { |u| { value: u.id, label: "#{u.name} (@#{u.nickname})" } } else diff --git a/decidim-admin/spec/controllers/organizations_controller_spec.rb b/decidim-admin/spec/controllers/organizations_controller_spec.rb index a27c0a3b55d52..cc6adea0df65e 100644 --- a/decidim-admin/spec/controllers/organizations_controller_spec.rb +++ b/decidim-admin/spec/controllers/organizations_controller_spec.rb @@ -9,6 +9,11 @@ module Admin let(:organization) { create :organization } let(:current_user) { create(:user, :admin, :confirmed, organization: organization) } + let(:parsed_response) { JSON.parse(response.body).map(&:symbolize_keys) } + + shared_context "with daisy" do + let!(:daisy) { create(:user, name: "Daisy", nickname: "daisy", organization: organization, email: "daisy@example.org") } + end before do request.env["decidim.current_organization"] = organization @@ -32,9 +37,18 @@ module Admin organization: organization ) end - let(:parsed_response) { JSON.parse(response.body).map(&:symbolize_keys) } context "when searching by name" do + context "when finding by full name" do + include_context "with daisy" + + it "returns the results ordered by similarity" do + get :user_entities, format: :json, params: { term: "Daisy" } + expect(parsed_response.count).to eq(3) + expect(parsed_response.first[:value]).to eq(daisy.id) + end + end + it "returns the id, name and nickname for filtered users and user groups" do get :user_entities, format: :json, params: { term: "daisy" } expect(parsed_response).to include({ value: user.id, label: "#{user.name} (@#{user.nickname})" }) @@ -56,6 +70,16 @@ module Admin expect(parsed_response).not_to include({ value: deleted_user.id, label: "#{deleted_user.name} (@#{deleted_user.nickname})" }) expect(parsed_response).not_to include({ value: managed_user.id, label: "#{managed_user.name} (@#{managed_user.nickname})" }) end + + context "when finding by full nickname" do + include_context "with daisy" + + it "returns the results ordered by similarity" do + get :user_entities, format: :json, params: { term: "@daisy" } + expect(parsed_response.count).to eq(3) + expect(parsed_response.first[:value]).to eq(daisy.id) + end + end end context "when searching by email" do @@ -68,6 +92,16 @@ module Admin expect(parsed_response).not_to include({ value: deleted_user.id, label: "#{deleted_user.name} (@#{deleted_user.nickname})" }) expect(parsed_response).not_to include({ value: managed_user.id, label: "#{managed_user.name} (@#{managed_user.nickname})" }) end + + context "when finding by full email" do + include_context "with daisy" + + it "returns the results ordered by similarity" do + get :user_entities, format: :json, params: { term: "daisy@example.org" } + expect(parsed_response.count).to eq(1) + expect(parsed_response.first[:value]).to eq(daisy.id) + end + end end context "when user is blocked" do @@ -112,8 +146,6 @@ module Admin ) end - let(:parsed_response) { JSON.parse(response.body).map(&:symbolize_keys) } - context "when no search term is provided" do it "returns an empty result set" do get :users, format: :json, params: {} @@ -133,6 +165,15 @@ module Admin get :users, format: :json, params: { term: "daisy" } expect(parsed_response).to eq([{ value: user.id, label: "#{user.name} (@#{user.nickname})" }]) end + + context "when there is more than one result" do + include_context "with daisy" + + it "returns the results ordered by similarity" do + get :users, format: :json, params: { term: "daisy" } + expect(parsed_response).to eq([{ value: daisy.id, label: "#{daisy.name} (@#{daisy.nickname})" }, { value: user.id, label: "#{user.name} (@#{user.nickname})" }]) + end + end end context "when searching by nickname" do @@ -140,6 +181,15 @@ module Admin get :users, format: :json, params: { term: "@daisy" } expect(parsed_response).to eq([{ value: user.id, label: "#{user.name} (@#{user.nickname})" }]) end + + context "when there is more than one result" do + include_context "with daisy" + + it "returns the results ordered by similarity" do + get :users, format: :json, params: { term: "@daisy" } + expect(parsed_response).to eq([{ value: daisy.id, label: "#{daisy.name} (@#{daisy.nickname})" }, { value: user.id, label: "#{user.name} (@#{user.nickname})" }]) + end + end end context "when searching by email" do @@ -147,6 +197,15 @@ module Admin get :users, format: :json, params: { term: user.email } expect(parsed_response).to eq([{ value: user.id, label: "#{user.name} (@#{user.nickname})" }]) end + + context "when there is more than one result" do + include_context "with daisy" + + it "returns the results ordered by similarity" do + get :users, format: :json, params: { term: "daisy@example.org" } + expect(parsed_response).to eq([{ value: daisy.id, label: "#{daisy.name} (@#{daisy.nickname})" }]) + end + end end context "when user is blocked" do From 455b9a7c5e0c6a4974c89ba7fb33ebf739abdc83 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=20Bol=C3=ADvar?= Date: Thu, 30 May 2024 10:31:36 +0200 Subject: [PATCH 57/88] Backport 'Use values from secrets to set default max attachment and avatar size' to v0.27 (#12907) * Use values from secrets to set default max attachment and avatar size * Fix test * Fallback to default values --- decidim-core/lib/decidim/organization_settings.rb | 12 ++++++++++-- .../spec/lib/organization_settings_spec.rb | 15 +++++++++++++++ 2 files changed, 25 insertions(+), 2 deletions(-) diff --git a/decidim-core/lib/decidim/organization_settings.rb b/decidim-core/lib/decidim/organization_settings.rb index dada025fccc56..ac71ff4812d12 100644 --- a/decidim-core/lib/decidim/organization_settings.rb +++ b/decidim-core/lib/decidim/organization_settings.rb @@ -130,12 +130,20 @@ def defaults_hash ) }, "maximum_file_size" => { - "default" => 10.0, - "avatar" => 5.0 + "default" => default_maximum_attachment_size, + "avatar" => default_maximum_avatar_size } } } end + + def default_maximum_attachment_size + (Rails.application.secrets.decidim[:maximum_attachment_size].presence || 10).to_f + end + + def default_maximum_avatar_size + (Rails.application.secrets.decidim[:maximum_avatar_size].presence || 5).to_f + end end def initialize(organization) diff --git a/decidim-core/spec/lib/organization_settings_spec.rb b/decidim-core/spec/lib/organization_settings_spec.rb index a80373b1cb510..dbfd1cef9163a 100644 --- a/decidim-core/spec/lib/organization_settings_spec.rb +++ b/decidim-core/spec/lib/organization_settings_spec.rb @@ -145,6 +145,21 @@ module Decidim expect(subject).to be_a(described_class) expect(struct_to_hash(subject)).to eq("upload" => default_settings) end + + context "when the configuration from the secret has changed" do + let(:maximum_attachment_size) { 20 } + + before do + allow(Rails.application.secrets.decidim).to receive(:[]).and_call_original + allow(Rails.application.secrets.decidim).to receive(:[]).with(:maximum_attachment_size).and_return(maximum_attachment_size) + # defaults method is memoized, we need to reset it to make sure it uses the stubbed values + described_class.instance_variable_set(:@defaults, nil) + end + + it "returns a new instance using the values from the secrets" do + expect(subject.upload_maximum_file_size).to eq(maximum_attachment_size.megabytes.to_f) + end + end end describe "#wrap_upload_maximum_file_size" do From 012ea05576f24f934a9b190739a5d68da4f3de98 Mon Sep 17 00:00:00 2001 From: decidim-bot Date: Thu, 30 May 2024 12:36:57 +0200 Subject: [PATCH 58/88] New Crowdin updates (#12826) * New translations en.yml (Romanian) * New translations en.yml (French) * New translations en.yml (Spanish) * New translations en.yml (Arabic) * New translations en.yml (Bulgarian) * New translations en.yml (Catalan) * New translations en.yml (Czech) * New translations en.yml (German) * New translations en.yml (Greek) * New translations en.yml (Basque) * New translations en.yml (Finnish) * New translations en.yml (Hungarian) * New translations en.yml (Italian) * New translations en.yml (Japanese) * New translations en.yml (Lithuanian) * New translations en.yml (Dutch) * New translations en.yml (Norwegian) * New translations en.yml (Polish) * New translations en.yml (Portuguese) * New translations en.yml (Slovak) * New translations en.yml (Swedish) * New translations en.yml (Turkish) * New translations en.yml (Chinese Simplified) * New translations en.yml (Chinese Traditional) * New translations en.yml (Portuguese, Brazilian) * New translations en.yml (Spanish, Mexico) * New translations en.yml (Latvian) * New translations en.yml (French, Canada) * New translations en.yml (Luxembourgish) * New translations en.yml (Spanish, Paraguay) * New translations en.yml (Finnish (plain)) * New translations en.yml (Romanian) * New translations en.yml (French) * New translations en.yml (Spanish) * New translations en.yml (Arabic) * New translations en.yml (Bulgarian) * New translations en.yml (Catalan) * New translations en.yml (Czech) * New translations en.yml (German) * New translations en.yml (Greek) * New translations en.yml (Basque) * New translations en.yml (Finnish) * New translations en.yml (Hungarian) * New translations en.yml (Italian) * New translations en.yml (Japanese) * New translations en.yml (Lithuanian) * New translations en.yml (Dutch) * New translations en.yml (Norwegian) * New translations en.yml (Polish) * New translations en.yml (Portuguese) * New translations en.yml (Slovak) * New translations en.yml (Swedish) * New translations en.yml (Turkish) * New translations en.yml (Chinese Simplified) * New translations en.yml (Chinese Traditional) * New translations en.yml (Galician) * New translations en.yml (Icelandic) * New translations en.yml (Portuguese, Brazilian) * New translations en.yml (Indonesian) * New translations en.yml (Spanish, Mexico) * New translations en.yml (Latvian) * New translations en.yml (French, Canada) * New translations en.yml (Spanish, Paraguay) * New translations en.yml (Ukrainian with many plural form) * New translations en.yml (Russian with many plural form) * New translations en.yml (Finnish (plain)) * New translations en.yml (Romanian) * New translations en.yml (French) * New translations en.yml (Spanish) * New translations en.yml (Catalan) * New translations en.yml (Romanian) * New translations en.yml (French) * New translations en.yml (Spanish) * New translations en.yml (Catalan) * New translations en.yml (Spanish, Mexico) * New translations en.yml (French, Canada) * New translations en.yml (Spanish, Paraguay) * New translations en.yml (Spanish, Mexico) * New translations en.yml (French, Canada) * New translations en.yml (Spanish, Paraguay) * New translations en.yml (Polish) * New translations en.yml (Polish) * New translations en.yml (Polish) * New translations en.yml (Polish) * New translations en.yml (Polish) * New translations en.yml (Polish) * New translations en.yml (Polish) * New translations en.yml (Polish) * New translations en.yml (Polish) * New translations en.yml (Polish) * New translations en.yml (Polish) * New translations en.yml (Polish) * New translations en.yml (Polish) * New translations en.yml (Polish) * New translations en.yml (Polish) * New translations en.yml (Polish) * New translations en.yml (Polish) * New translations en.yml (Polish) * New translations en.yml (Polish) * New translations en.yml (Polish) * New translations en.yml (Polish) * New translations en.yml (Polish) * New translations en.yml (Polish) * New translations en.yml (Basque) * New translations en.yml (Basque) * New translations en.yml (German) * New translations en.yml (German) * New translations en.yml (Japanese) * New translations en.yml (Japanese) * New translations en.yml (Bulgarian) * New translations en.yml (Bulgarian) * New translations en.yml (Bulgarian) * New translations en.yml (Bulgarian) * New translations en.yml (Bulgarian) * New translations en.yml (Finnish) * New translations en.yml (Finnish) * New translations en.yml (Bulgarian) * New translations en.yml (Bulgarian) * New translations en.yml (Bulgarian) * New translations en.yml (Bulgarian) * New translations en.yml (Bulgarian) * New translations en.yml (Bulgarian) * New translations en.yml (Bulgarian) * New translations en.yml (Bulgarian) * New translations en.yml (Bulgarian) * New translations en.yml (Bulgarian) * New translations en.yml (Bulgarian) * New translations en.yml (Bulgarian) * New translations en.yml (Bulgarian) * New translations en.yml (Finnish (plain)) * New translations en.yml (Finnish (plain)) * New translations en.yml (Bulgarian) * New translations en.yml (Bulgarian) * New translations en.yml (Bulgarian) * New translations en.yml (Bulgarian) * New translations en.yml (Bulgarian) * New translations en.yml (Bulgarian) * New translations en.yml (Thai) * New translations en.yml (Thai) * New translations en.yml (Thai) * New translations en.yml (Thai) * New translations en.yml (Bulgarian) * New translations en.yml (Bulgarian) * New translations en.yml (Bulgarian) * New translations en.yml (Bulgarian) * New translations en.yml (Bulgarian) * New translations en.yml (Bulgarian) * New translations en.yml (Bulgarian) * New translations en.yml (Bulgarian) * New translations en.yml (Bulgarian) --- .../config/locales/th-TH.yml | 140 ++++ decidim-admin/config/locales/bg.yml | 624 ++++++++++++++++++ decidim-admin/config/locales/th-TH.yml | 100 +++ decidim-core/config/locales/ar.yml | 1 - decidim-core/config/locales/bg.yml | 1 - decidim-core/config/locales/cs.yml | 1 - decidim-core/config/locales/de.yml | 2 +- decidim-core/config/locales/el.yml | 1 - decidim-core/config/locales/es-MX.yml | 2 +- decidim-core/config/locales/es-PY.yml | 2 +- decidim-core/config/locales/es.yml | 2 +- decidim-core/config/locales/hu.yml | 1 - decidim-core/config/locales/it.yml | 1 - decidim-core/config/locales/ja.yml | 2 +- decidim-core/config/locales/lb.yml | 1 - decidim-core/config/locales/lt.yml | 1 - decidim-core/config/locales/lv.yml | 1 - decidim-core/config/locales/nl.yml | 1 - decidim-core/config/locales/no.yml | 1 - decidim-core/config/locales/pl.yml | 13 + decidim-core/config/locales/pt-BR.yml | 1 - decidim-core/config/locales/pt.yml | 1 - decidim-core/config/locales/sk.yml | 1 - decidim-core/config/locales/sv.yml | 1 - decidim-core/config/locales/tr-TR.yml | 1 - decidim-core/config/locales/zh-CN.yml | 1 - decidim-core/config/locales/zh-TW.yml | 1 - decidim-debates/config/locales/pl.yml | 7 + decidim-elections/config/locales/pl.yml | 58 ++ decidim-initiatives/config/locales/pl.yml | 24 + decidim-meetings/config/locales/pl.yml | 41 ++ .../config/locales/pl.yml | 24 + decidim-proposals/config/locales/ar.yml | 3 +- decidim-proposals/config/locales/bg.yml | 450 ++++++++++++- decidim-proposals/config/locales/ca.yml | 2 +- decidim-proposals/config/locales/cs.yml | 1 - decidim-proposals/config/locales/de.yml | 2 +- decidim-proposals/config/locales/el.yml | 1 - decidim-proposals/config/locales/es-MX.yml | 4 +- decidim-proposals/config/locales/es-PY.yml | 2 +- decidim-proposals/config/locales/eu.yml | 2 +- decidim-proposals/config/locales/fr-CA.yml | 4 +- decidim-proposals/config/locales/fr.yml | 4 +- decidim-proposals/config/locales/gl.yml | 3 +- decidim-proposals/config/locales/hu.yml | 3 +- decidim-proposals/config/locales/id-ID.yml | 1 - decidim-proposals/config/locales/is-IS.yml | 2 - decidim-proposals/config/locales/it.yml | 3 +- decidim-proposals/config/locales/lt.yml | 1 - decidim-proposals/config/locales/lv.yml | 1 - decidim-proposals/config/locales/nl.yml | 3 +- decidim-proposals/config/locales/no.yml | 1 - decidim-proposals/config/locales/pl.yml | 39 +- decidim-proposals/config/locales/pt-BR.yml | 1 - decidim-proposals/config/locales/pt.yml | 1 - decidim-proposals/config/locales/ru.yml | 2 - decidim-proposals/config/locales/sk.yml | 1 - decidim-proposals/config/locales/sv.yml | 1 - decidim-proposals/config/locales/tr-TR.yml | 3 +- decidim-proposals/config/locales/uk.yml | 2 - decidim-proposals/config/locales/zh-CN.yml | 1 - decidim-proposals/config/locales/zh-TW.yml | 1 - decidim-sortitions/config/locales/bg.yml | 109 ++- decidim-sortitions/config/locales/pl.yml | 4 + decidim-surveys/config/locales/bg.yml | 56 +- decidim-system/config/locales/bg.yml | 6 + decidim-system/config/locales/pl.yml | 17 + decidim-templates/config/locales/pl.yml | 7 + decidim-verifications/config/locales/pl.yml | 10 + 69 files changed, 1746 insertions(+), 67 deletions(-) diff --git a/decidim-accountability/config/locales/th-TH.yml b/decidim-accountability/config/locales/th-TH.yml index a4431912a8299..7b29b706083c7 100644 --- a/decidim-accountability/config/locales/th-TH.yml +++ b/decidim-accountability/config/locales/th-TH.yml @@ -1 +1,141 @@ +--- th: + activemodel: + attributes: + result: + decidim_accountability_status_id: สถานะ + decidim_category_id: หมวดหมู่ + decidim_scope_id: ขอบเขต + description: คำอธิบาย + end_date: วันสิ้นสุด + progress: ความคืบหน้า + project_ids: รวมโครงการ + proposals: รวมข้อเสนอ + start_date: วันที่เริ่มต้น + title: ชื่อ + updated_at: อัปเดตที่ + status: + description: คำอธิบาย + key: สำคัญ + name: ชื่อ + progress: ความคืบหน้า + timeline_entry: + description: คำอธิบาย + entry_date: วันที่ + title: ชื่อ + models: + decidim/accountability/proposal_linked_event: ข้อเสนอที่รวมอยู่ในผลลัพธ์ + decidim/accountability/result_progress_updated_event: อัปเดตความคืบหน้าของผลลัพธ์แล้ว + activerecord: + models: + decidim/accountability/result: + other: ผลลัพธ์ + decidim: + accountability: + actions: + attachment_collections: โฟลเดอร์ + attachments: ไฟล์แนบ + confirm_destroy: คุณแน่ใจหรือไม่ว่าต้องการลบ %{name} นี้ + destroy: ลบ + edit: แก้ไข + preview: ดูตัวอย่าง + timeline_entries: วิวัฒนาการของโครงการ + title: การดำเนินการ + admin: + exports: + result_comments: ความคิดเห็น + results: ผลลัพธ์ + import_results: + new: + download_export: ดาวน์โหลดการส่งออกด้วยรูปแบบ CSV + import: นำเข้า + models: + result: + name: ผลลัพธ์ + status: + name: สถานะ + results: + edit: + title: แก้ไขผลลัพธ์ + update: อัพเดทผลครับ + index: + title: ผลลัพธ์ + new: + create: สร้างผลลัพธ์ + title: ผลลัพธ์ใหม่ + shared: + subnav: + statuses: สถานะ + statuses: + edit: + title: แก้ไขสถานะ + update: อัพเดตสถานะ + index: + title: สถานะ + new: + create: Create status + title: สถานะใหม่ + results: + home: + categories_label: หมวดหมู่ + subcategories_label: หมวดหมู่ย่อย + home_header: + global_status: สถานะการดำเนินการทั่วโลก + nav_breadcrumb: + global: การดำเนินการระดับโลก + search: + search: ค้นหาการกระทำ + show: + stats: + back_to_resource: กลับไปหาผลลัพธ์ + comments: ความคิดเห็น + timeline: + title: วิวัฒนาการของโครงการ + admin: + filters: + results: + category_id_eq: + label: หมวดหมู่ + scope_id_eq: + label: ขอบเขต + status_id_eq: + label: สถานะ + components: + accountability: + actions: + comment: ความคิดเห็น + name: ความรับผิดชอบ + settings: + global: + comments_enabled: เปิดใช้งานความคิดเห็นแล้ว + comments_max_length: ความคิดเห็นความยาวสูงสุด (ปล่อยให้ 0 เป็นค่าเริ่มต้น) + display_progress_enabled: แสดงความคืบหน้า + intro: คำแนะนำ + scope_id: ขอบเขต + scopes_enabled: เปิดใช้งานขอบเขตแล้ว + step: + comments_blocked: ความคิดเห็นถูกบล็อก + events: + accountability: + proposal_linked: + email_intro: 'ข้อเสนอ "%{proposal_title}" ถูกรวมไว้ในผลลัพธ์แล้ว คุณสามารถดูได้จากหน้านี้:' + email_outro: คุณได้รับการแจ้งเตือนนี้เนื่องจากคุณกำลังติดตาม "%{proposal_title}" คุณสามารถหยุดรับการแจ้งเตือนได้ตามลิงก์ก่อนหน้า + email_subject: การอัปเดตเป็น %{proposal_title} + notification_title: ข้อเสนอ %{proposal_title} ถูกรวมไว้ในผลลัพธ์ %{resource_title} แล้ว + result_progress_updated: + email_intro: 'ผลลัพธ์ "%{resource_title}" ซึ่งรวมถึงข้อเสนอ "%{proposal_title}" ขณะนี้เสร็จสมบูรณ์แล้ว %{progress}% คุณสามารถดูได้จากหน้านี้:' + email_outro: คุณได้รับการแจ้งเตือนนี้เนื่องจากคุณกำลังติดตาม "%{proposal_title}" และข้อเสนอนี้รวมอยู่ในผลลัพธ์ "%{resource_title}" คุณสามารถหยุดรับการแจ้งเตือนได้ตามลิงก์ก่อนหน้า + email_subject: การอัปเดตความคืบหน้าของ %{resource_title} + notification_title: ผลลัพธ์ %{resource_title} ซึ่งรวมถึงข้อเสนอ %{proposal_title} อยู่ในขณะนี้ %{ ความคืบหน้า}% เสร็จสมบูรณ์ + metrics: + results: + description: จำนวนผลลัพธ์ที่สร้างขึ้น + object: ผลลัพธ์ + title: ผลลัพธ์ + resource_links: + included_projects: + result_project: โครงการที่รวมอยู่ในผลลัพธ์นี้ + included_proposals: + result_proposal: โครงการที่รวมอยู่ในผลลัพธ์นี้ + statistics: + results_count: ผลลัพธ์ diff --git a/decidim-admin/config/locales/bg.yml b/decidim-admin/config/locales/bg.yml index 1e1271983d975..66150ae7f432c 100644 --- a/decidim-admin/config/locales/bg.yml +++ b/decidim-admin/config/locales/bg.yml @@ -15,23 +15,34 @@ bg: description: Описание file: Файл title: Име на прикрепен файл или изображение + weight: Нареди позиция attachment_collection: description: Описание name: Име + weight: Нареди позиция category: description: Описание name: Име parent_id: Родител + weight: Нареди позиция component: name: Име published_at: Публикувано на + weight: Нареди позиция + external_domain: + value: Стойност + help_section: + content: Съдържание id: ID + import: + user_group_id: Създаване на импорта като newsletter: body: Тяло subject: Тема organization: admin_terms_of_use_body: Съдържание на административните условия за ползване alert_color: Аларма + available_authorizations: Активни оторизации badges_enabled: Включи значките comments_max_length: Максимална дължина на коментарите (Оставете 0 за стойност по подразбиране) cta_button_path: Път на бутона "призив към действие" @@ -40,8 +51,12 @@ bg: default_locale: Език по подразбиране description: Описание enable_omnipresent_banner: Показвай всепоказван банер + enable_participatory_space_filters: Активиране на филтри за пространство за участие facebook_handler: Манипулатор на Facebook favicon: Икона + force_authentication: Принудително оторизиране + force_users_to_authenticate_before_access_organization: Принуждавайте потребителите да се оторизират, преди достъп до организацията + from: Адрес на е-поща на изпращача github_handler: Манипулатор на GitHub header_snippets: Части на HTML заглавката highlight_alternative_color: Подчертаване, алтернативен @@ -53,6 +68,7 @@ bg: highlighted_content_banner_image: Изображение highlighted_content_banner_short_description: Кратко описание highlighted_content_banner_title: Заглавие + host: Хост instagram_handler: Манипулатор на Instagram logo: Лого machine_translation_display_priority: Приоритет за показване на машинен превод @@ -65,19 +81,28 @@ bg: omnipresent_banner_short_description: Кратко описание omnipresent_banner_title: Заглавие omnipresent_banner_url: URL адрес + organization_admin_email: Имейл на администратора на организацията + organization_admin_name: Име на администратора на организацията + organization_locales: Местоположение на организацията primary_color: Основен reference_prefix: Префикс на препратка rich_text_editor_in_public_views: Разреши редактора на rich text за участниците secondary_color: Вторичен + secondary_hosts: Вторични хостове send_welcome_notification: Изпращай приветствия success_color: Успешно time_zone: Часова зона tos_version: Версия на условия за ползване + twitter_handler: X манипулатор user_groups_enabled: Разреши групи + users_registration_mode: Режим на регистрация на потребители warning_color: Предупреждение welcome_notification_body: Тяло на приветствието welcome_notification_subject: Тема на приветствието youtube_handler: Манипулатор на YouTube + participatory_space_private_user: + email: Имейл + name: Име scope: code: Код name: Име @@ -89,17 +114,23 @@ bg: name: Име organization: Организация plural: Множествено число + settings: + scope_id: Обхват static_page: + allow_public_access: Разрешаване на достъп без оторизация changed_notably: Настъпиха значителни промени. content: Съдържание organization: Организация show_in_footer: Покажи в долния колонтитул slug: Съкратен URL title: Заглавие + topic_id: Тема + weight: Нареди позиция static_page_topic: description: Описание show_in_footer: Покажи в долния колонтитул title: Заглавие + weight: Нареди позиция user_group_csv_verification: file: Файл errors: @@ -114,6 +145,14 @@ bg: allowed_file_content_types: Невалиден файл на изображението official_img_header: allowed_file_content_types: Невалиден файл на изображението + participatory_space_private_user_csv_import: + attributes: + file: + malformed: Неправилен файл за импортиране, моля, прочетете внимателно инструкциите и се уверете, че файлът е UTF-8 кодиран. + user_group_csv_verification: + attributes: + file: + malformed: Неправилен файл за импортиране, моля, прочетете внимателно инструкциите и се уверете, че файлът е UTF-8 кодиран. new_import: attributes: file: @@ -125,42 +164,182 @@ bg: content: Съдържание slug: Съкратен URL title: Заглавие + doorkeeper/application: + authorize_url: Оторизиране на URL адрес + client_id: ID на клиента + client_secret: Клиентска тайна + organization_name: Наименование на организацията + organization_url: URL адрес на организацията + redirect_uri: Пренасочващ URL адрес + site: Уебсайт decidim: admin: actions: + add: Добавяне + attachment: + new: Нов прикачен файл attachment_collection: new: Нова колекция от прикачени файлове + browse: Разглеждане + category: + new: Нова категория + export: Експорт на всички + export-selection: Експорт на селекцията + import: Импортиране manage: Управление new: Ново %{name} + newsletter: + new: Нов бюлетин + participatory_space_private_user: + new: Нов частен потребител на пространство за участие + per_page: За страница + permissions: Разрешения + reject: Откажи + share: Сподели + user: + new: Нов администратор + verify: Провери admin_terms_of_use: accept: error: Възникна грешка при приемането на административните условия за ползване. success: Чудесно! Приехте административните условия за ползване. actions: + accept: Приемам условията are_you_sure: Сигурни ли сте, че искате да откажете административните условия за ползване? + refuse: Отхвърляне на административните условия title: Съгласявам се с правилата и условията за ползване required_review: alert: 'Задължително: Прегледайте административните условия за ползване' callout: Моля, отделете малко време, за да прегледате административните условия за ползване. В противен случай няма да можете да администрирате платформата. + cta: Прегледайте ги сега. title: Административни условия за ползване area_types: + create: + error: Възникна проблем при създаването на нов тип област. + success: Типът област е създаден успешно. destroy: success: Типът област е премахнат успешно + edit: + title: Редактиране на типа област + update: Актуализация + new: + create: Създаване на тип област + title: Нов тип област update: + error: Възникна проблем при актуализирането на този тип област. success: Типът област е актуализиран успешно areas: + create: + error: Възникна проблем при създаването на нова област. + success: Областта е създадена успешно. destroy: + has_spaces: Тази зона има зависими пространства. Моля, уверете се, че нито едно пространство за участие не споменава тази област, преди да я изтриете. success: Областта е премахната успешно + edit: + title: Редактиране на областта + update: Актуализация + new: + create: Създаване на област + title: Нова област + no_areas: Няма области update: + error: Възникна проблем при актуализирането на тази област. success: Областта е актуализирана успешно attachment_collections: + create: + error: Възникна проблем при създаването на нова папка. + success: Папката е създадена успешно. + destroy: + success: Папката е премахната успешно. + edit: + title: Редактиране на папка + update: Актуализация index: attachment_collection_used: Тази папка не може да бъде премахната, защото се използва. + attachment_collections_title: Папки с прикачени файлове + new: + create: Създаване + title: Нова папка + update: + error: Възникна проблем при актуализирането на тази папка. + success: Папката беше актуализирана успешно. + attachments: + create: + error: Възникна проблем при създаването на нов прикачен файл. + success: Прикаченият файл беше създаден успешно. + destroy: + success: Прикаченият файл беше премахнат успешно. + edit: + title: Редактиране на прикачения файл + update: Актуализация + index: + attachments_title: Прикачени файлове + new: + create: Създаване на прикачен файл + title: Нов прикачен файл + update: + error: Възникна проблем при актуализирането на този прикачен файл. + success: Прикаченият файл беше актуализиран успешно. + attachments_privacy_warning: + message: Бъдете внимателни, когато работите с прикачени файлове в лично пространство. Всеки участник може да сподели този документ с други. autocomplete: + no_results: Няма намерени резултати search_prompt: Въведете поне три символа, за да търсите + block_user: + new: + action: Блокирайте акаунта и изпратете обосновка + description: Блокирането на потребител ще направи акаунта му неизползваем. Можете да предоставите във вашата обосновка всякакви насоки относно начините, по които бихте обмислили деблокирането на потребителя. + justification: Обосновка + title: Блокиране на потребител %{name} categories: + create: + error: Възникна проблем при създаването на тази категория. + success: Категорията беше създадена успешно. + destroy: + error: Възникна проблем при изтриването на тази категория. Моля, първо изтрийте всички подкатегории, уверете се, че към тази категория не принадлежат други елементи, след което опитайте отново. + success: Категорията беше изтрита успешно. + edit: + title: Редактиране на категория + update: Актуализация index: + categories_title: Категории category_used: Тази категория не може да бъде премахната, защото се използва. + new: + create: Създаване на категория + title: Нова категория + update: + error: Възникна проблем при актуализирането на тази категория. + success: Категорията е обновена. + component_permissions: + update: + error: Възникна проблем при актуализирането на разрешенията на този компонент. + success: Разрешенията бяха актуализирани успешно. + components: + create: + error: Възникна проблем при създаването на този компонент. + success: Компонентът беше създаден успешно. + destroy: + error: Възникна проблем при премахването на този компонент. + success: Компонентът беше изтрит успешно. + edit: + title: Редактиране на компонента + update: Актуализация + form: + default_step_settings: Настройки на стъпките по подразбиране + global_settings: Глобални настройки + step_settings: Настройки на стъпките + index: + add: Добавяне на компонент + headers: + actions: Активности + name: Име на компонент + scope: Обхват на компонента + type: Тип на компонента + new: + add: Добавяне на компонент + title: 'Добавяне на компонент: %{name}' + publish: + success: Компонентът беше публикуван успешно. conflicts: transfer: error: Възникна проблем при прехвърлянето на текущия участник към управляван участник. @@ -174,34 +353,297 @@ bg: exports: notice: Заявеното от Вас експортиране е в процес. Ще получите имейл, когато приключи. filters: + moderated_users: + reports_reason_eq: + values: + does_not_belong: Не принадлежи + offensive: Обидно + spam: Спам + moderations: + reportable_type_string_eq: + label: Тип + officialized_at_null: + label: Състояние + values: + 'false': Официализирано + 'true': Неофициализирано + participatory_space_private_users: + user_invitation_accepted_at_not_null: + label: Поканата е приета + values: + 'false': Не се приема + 'true': Прието + user_invitation_sent_at_not_null: + label: Поканата е изпратена + values: + 'false': Не е изпратено + 'true': Изпратено + private_space_eq: + label: Частни + values: + 'false': Публични + 'true': Частни + published_at_null: + label: Публикувано + values: + 'false': Публикувано + 'true': Непубликувано + scope_id_eq: + label: Обхват + search_label: Търсене search_placeholder: + name_or_nickname_or_email_cont: Търсене на %{collection} по имейл, име или псевдоним. + report_count_eq: Отчитане на броя + reported_id_string_or_reported_content_cont: Търсете в %{collection} по ID или съдържание, което може да бъде отчетено. + title_cont: Търсене на %{collection} по заглавие. user_name_or_user_email_cont: Търси в %{collection} по име или имейл. + user_name_or_user_nickname_or_user_email_cont: Търсене на %{collection} по имейл, име или псевдоним. state_eq: label: Състояние values: + all: Всички + pending: Изчакване rejected: Отхвърлен + verified: Проверен + forms: + file_help: + import: + explanation: 'Указания за файла:' + message_1: Поддържат се CSV, JSON и Excel (.xlsx) файлове + message_2: За CSV файлове разделителят между колоните трябва да е точка и запетая (";") help_sections: error: Възникна проблем при актуализирането на помощните раздели + form: + save: Запази success: Помощните раздели бяха актуализирани успешно impersonatable_users: index: + filter: + all: Всички + managed: Управляван(и) + not_managed: Неуправляван(и) filter_by: Филтрирай по + impersonate: Имитирай + impersonate_new_managed_user: Управление на нов участник + managed: Управляван(и) + name: Име + needs_authorization_warning: Нуждатете се от поне една активирана оторизация за тази организация. + not_managed: Неуправляван(и) + promote: Промотиране + search: Търсене + status: Статус + view_logs: Преглед на регистрите + impersonations: + close_session: + error: Възникна проблем при затварянето на текущата сесия за управление на участника. + success: Текущата сесия за имитиране на потребител беше прекратена успешно. + create: + error: Възникна проблем при управлението на участника. + success: Управляваният участник беше създаден успешно. + form: + authorization_method: Метод на оторизация + name: Име + reason: Причина + new: + impersonate: Имитирай + impersonate_existing_managed_user: Управление на участник „%{name}“ + impersonate_existing_user: Управление на участник „%{name}“ + impersonate_new_managed_user: Управление на нов участник imports: + and: и + data_errors: + duplicate_headers: + detail: Моля, проверете дали файлът съдържа необходимите колони или заглавки само веднъж. + message: + one: Дублирана колона %{columns}. + other: Дублирани колони %{columns}. + invalid_indexes: + lines: + detail: Моля, проверете дали тези редове са форматирани правилно и съдържат валидни записи. + message: + one: Открих грешка във файла за импортиране на ред %{indexes}. + other: Открити са грешки във файла за импортиране на редове %{indexes}. + records: + detail: Моля, проверете дали тези записи са форматирани правилно и съдържат валидни записи. + message: + one: Намерена е грешка във файла за импортиране на записи с поредни номера %{indexes}. + other: Открити са грешки във файла за импортиране за записи с поредни номера %{indexes}. + missing_headers: + detail: Моля, проверете дали файлът съдържа необходимите колони. + message: + one: Липсваща колона %{columns}. + other: Липсващи колони %{columns}. error: Възникна проблем по време на импортирането example_error: Не можа да се създаде пример за дадения тип + new: + accepted_mime_types: + csv: CSV + json: JSON + xlsx: Excel (.xlsx) + actions: + back: Назад + download_example: Изтегляне на пример + download_example_format: Пример като %{name} + file_legend: Добавете файл за импортиране, който ще бъде анализиран. + import: Импортиране notice: "%{count} %{resource_name} успешно импортирани" logs: logs_list: no_logs_yet: Все още няма регистри + managed_users: + promotion: + error: Възникна проблем при повишаването на управлявания участник. + success: Управляваният участник беше повишен успешно. + promotions: + new: + explanation: Управляваните участници могат да бъдат повишавани до стандартни участници. Това означава, че ще бъдат поканени в приложението и повече няма да можете да ги управлявате. Поканеният участник ще получи имейл, за да приеме поканата Ви. + new_managed_user_promotion: Ново повишение на управляван участник + promote: Повишаване menu: + admin_log: Регистър на дейността на администраторите + admins: Администратори + appearance: Външен вид + area_types: Типове области + areas: Области + configuration: Конфигурация + external_domain_whitelist: Лист с позволени външни домейни + help_sections: Помощни раздели + homepage: Начална страница + impersonations: Имитация + moderation: Глобални модерации + newsletters: Бюлетин с новости + participants: Участници reported_users: Докладвани потребители + scope_types: Типове на обхвата + scopes: Обхвати + settings: Настройки + static_pages: Страници + user_groups: Групи + users: Участници + metrics: + metrics: + see_more_metrics: Показване на повече индикатори models: + area: + fields: + area_type: Тип район + name: Име + area_type: + fields: + name: Име + plural: Множествено число + attachment: + fields: + collection: Папка + content_type: Тип + file_size: Размер + title: Заглавие + name: Прикачен файл + attachment_collection: + name: Папка + category: + name: Категория + impersonation_log: + fields: + admin: Администратор + ended_at: Приключило на + expired_at: Изтекло на + reason: Причина + started_at: Започнало в + user: Участник + newsletter: + fields: + created_at: Създадено на + progress: Прогрес + sent_at: Изпратено в + sent_to: Изпратено до + subject: Относно + name: Бюлетин + participatory_space_private_user: + name: Пространство за участие на частен участник + scope: + fields: + name: Име + scope_type: Тип на обхвата + scope_type: + fields: + name: Име + plural: Множествено число + share_token: + fields: + created_at: Създадено на + expires_at: Изтича на + last_used_at: Последно използвано + times_used: Брой използвания + token: Токен + user: Създадено от + static_page: + fields: + created_at: Създадено на + title: Заглавие user: fields: + created_at: Дата на създаване last_sign_in_at: Дата на последно влизане + newsletter_templates: + show: + use_template: Използване на този шаблон newsletters: + create: + error: Възникна проблем при създаването на този бюлетин. + success: Бюлетинът беше създаден успешно. Моля, прегледайте го, преди да го изпратите. + deliver: + error: Възникна проблем при доставянето на този бюлетин. + success: Бюлетинът беше доставен успешно. + destroy: + error_already_sent: 'Бюлетинът не може да се премахне: Вече е изпратен.' + success: Бюлетинът беше премахнат успешно. + edit: + save_and_preview: Запази и прегледай + title: Редактирай бюлетин + index: + all: всички + all_users: 'Всички потребители ' + and: 'и ' + confirm_delete: Наистина ли искате да изтриете този бюлетин? + followers: 'последователи ' + has_been_sent_to: 'Беше изпратено до: ' + no_scopes: Няма обхвати + not_sent: Не е изпратено + participants: 'участници ' + segmented_to: 'Сегментирано за %{subject}: ' + subscribed_count: 'Абонирани:' + title: Бюлетини + new: + save: Запази + title: Нов бюлетин + select_recipients_to_deliver: + all_spaces: Всички + all_users_help: Изпраща бюлетина на всички потвърдени потребители. + confirm_deliver: Наистина ли искате да доставите този бюлетин? Това действие не може да бъде отменено. + deliver: Доставяне на бюлетина + followers_help: Изпраща бюлетина до всички потвърдени потребители, които следят някое от избраните пространства за участие в списъка. + none: Няма + participants_help: Изпраща бюлетина до всички потвърдени потребители, които са участвали в някое от избраните пространства за участие в списъка. + recipients_count: Този бюлетин ще бъде изпратен на %{count} потребители. + scopes_help: Изпраща бюлетина на потребителите, които са активирали някой от избраните обхвати в настройките за „Моите интереси“ в профила си. + select_scopes: Филтрирайте по потребители, които са активирали някой от изброените обхвати в настройките за „Моите интереси“ в профила си. + select_spaces: Изберете пространства, за да сегментирате бюлетина + select_users: Изберете до кои потребители искате да изпратите бюлетина + send_to_all_users: Изпращане до всички потребители + send_to_followers: Изпращане до последователите + send_to_participants: Изпращане до участниците + title: Изберете получатели, на които да бъде изпратено + warning: "Внимание: Този бюлетин ще бъде изпратен само на потребители, които са включили Искам да получавам бюлетини в настройките си за известия." send: no_recipients: Няма получатели за тази селекция + show: + preview: Преглед + select_recipients_to_deliver: Изберете получатели, на които да бъде доставено + subject: Относно + update: + error: Възникна проблем при актуализирането на този бюлетин. + success: Бюлетинът беше актуализиран успешно. Моля, прегледайте го, преди да го изпратите. officializations: block: error: Възникна грешка при блокиране на участника @@ -210,31 +652,144 @@ bg: success: Участникът е официализиран успешно destroy: success: Официализирането на участника е премахнато успешно + index: + actions: Активности + badge: Бадж + block: Блокиране на потребител + created_at: Създадено на + name: Име + nickname: Псевдоним + not_officialized: Неофициализирано + officialize: Официализиране + officialized: Официализирано + reofficialize: Повторно официализиране + reports: Доклади + show_email: Показване на електронната поща + status: Статус + unblock: Разблокирай Потребител + unofficialize: Премахване на официализирането + new: + badge: Бадж за официализиране + officialize: Официализиране + title: Официализиране на участника „%{name}“ show_email_modal: close_modal: Затвори прозореца + description: Ако искате да се свържете директно с участник, можете да щракнете върху бутона „Показване“, за да видите електронната поща. Това действие ще бъде регистрирано. + email_address: Имейл адрес + full_name: Три имена + hidden: скрито + show: Покажи + title: Показване на електронната поща на участника unblock: error: Възникна грешка при отблокиране на участника success: Участникът беше отблокиран успешно + organization: + edit: + title: Редактиране на организацията + update: Актуализация + form: + facebook: Facebook + github: GitHub + instagram: Instagram + rich_text_editor_in_public_views_help: В някои текстови области участниците ще могат да вмъкнат някои HTML тагове с помощта на редактора за обогатен текст. + social_handlers: Социални мрежи + twitter: X + url: URL + youtube: YouTube + update: + error: Възникна проблем при актуализирането на тази организация. + success: Организацията беше актуализирана успешно. organization_appearance: + edit: + update: Актуализация form: colors: colors_title: Цветове на организацията colors_warning_html: Внимание! Промяната на тези цветове може да наруши контрастите на достъпността. Можете да проверите контраста на Вашия избор с WebAIM Contrast Checker или други подобни инструменти. header_snippets_help: Използвайте това поле, за да добавите нещо в HTML заглавието. Най-често се използва за интеграция на външни услуги, които изискват допълнителни JavaScript или CSS. Освен това, можете да го ползвате за добавяне на допълнителни метатагове в HTML. Обърнете внимание, че ще се визуализира само в публичните страници, но не и в администраторския раздел. + homepage_highlighted_content_banner_title: Банер с подчертано съдържание images: layout_appearance_title: Редактиране външния вид шаблона + preview: Преглед + omnipresent_banner_appearance_title: Редактиране на присъстващия навсякъде банер organization_external_domain_whitelist: + edit: + update: Актуализация + external_domain: + down: Надолу + external_domain: Външен домейн + remove: Премахни + up: Горе form: add: Добави към белия списък title: Бял списък с външни домейни + organization_homepage_content_blocks: + edit: + update: Актуализация + participatory_space_private_users: + create: + error: Възникна проблем при добавянето на частен участник за това пространство за участие. + success: Достъпът на частния участник до пространството за участие беше създаден успешно. + destroy: + error: Възникна проблем при изтриването на частен участник за това пространство за участие. + success: Достъпът на частния участник до пространството за участие беше премахнат успешно. + index: + import_via_csv: Импортиране чрез CSV + title: Пространство за участие на частен участник + new: + create: Създаване + title: Ново пространство за участие на частен участник. participatory_space_private_users_csv_imports: create: + invalid: Възникна проблем при прочитането на CSV файла. success: Файлът във формат CSV беше качен успешно; изпращаме имейл с покана на участниците. Това може да отнеме известно време. new: destroy: + button: Изтрийте всички частни участници confirm: Сигурни ли сте, че искате да изтриете всички частни участници? Това действие не може да бъде отменено, няма да можете да ги възстановите. + empty: Нямате частни участници. + explanation: Имате %{count} частни участници. + title: Изтрийте частни участници explanation: 'Качете своя CSV файл. Трябва да има две колони с имейл в първата колона на файла и име в последната колона на файла (имейл, име) на потребителите, които искате да добавите към пространството за участие, без заглавки. Избягвайте използването на невалидни знаци като `<>?%&^*#@()[]=+:;"{}\|` в потребителското име.' + title: Качете своя CSV файл + upload: Качване + reminders: + create: + error: Възникна проблем при създаването на напомняния. + success: + one: "%{count} потребител ще получи напомняне." + other: "%{count} потребители ще получат напомняне." + new: + submit: Изпрати + resource_permissions: + edit: + submit: Подаване + title: Редактирай разрешенията + update: + success: Разрешенията бяха актуализирани успешно. + resources: + index: + headers: + scope: Обхват + scope_types: + create: + error: Възникна проблем при създаването на нов тип обхват. + success: Типът обхват е създаден успешно. + destroy: + success: Типът обхват е премахнат успешно + edit: + title: Редактиране на типа на обхвата + update: Актуализация + new: + create: Създаване на тип обхват + title: Нов тип обхват + update: + error: Възникна проблем при актуализирането на този тип обхват. + success: Типът обхват е актуализиран успешно scopes: + create: + error: Възникна проблем при създаването на нов обхват. + success: Обхватът беше създаден успешно. destroy: success: Обхватът беше премахнат успешно share_tokens: @@ -258,22 +813,91 @@ bg: success: Страницата беше актуализирана успешно titles: edit_external_domains: Бял списък с външни домейни + edit_organization_appearance: Редактиране на външния вид на началната страница + impersonatable_users: Управляеми участници + impersonations: Управление на участниците + metrics: Метрики + pages: Страници + panel: Администратор + participants: Участници + scope_types: Типове на обхвата + scopes: Обхвати + static_pages: Страници + statistics: Активност + user_groups: Групи + users: Администратори user_group: csv_verify: + invalid: Възникна проблем при прочитането на CSV файла. success: Файлът във формат CSV беше качен успешно, проверяваме групите, които отговарят на критериите. Това може да отнеме известно време. reject: + invalid: Възникна проблем с отхвърлянето на тази група. success: Групата беше отхвърлена успешно verify: + invalid: Възникна проблем с проверката на тази група. success: Групата беше проверена успешно + user_groups: + index: + state: + pending: Изчакване + rejected: Отхвърлено + verified: Проверен + verify_via_csv: Проверка чрез CSV + user_groups_csv_verifications: + new: + explanation: Качете своя файл във формат CSV. Трябва да съдържа официалните електронни пощи на групите в организацията Ви в първата колона от файла, без заглавки. Ще бъдат валидирани само групите с потвърдена електронна поща и с адрес на електронната поща във файла във формат CSV. + title: Качете своя CSV файл + upload: Качване + users: + create: + error: Възникна проблем с поканата на този администратор. + success: Участника е поканен успешно. + destroy: + error: Възникна проблем при опита за изтриване на този администратор. + success: Участникът вече не е администратор. + form: + email: Имейл + name: Име + role: Роля + new: + create: Покани + title: Поканете нов администратор users_statistics: users_count: + admins: Администратори + last_day: Предният ден + last_month: Миналия месец + last_week: Последната седмица no_users_count_statistics_yet: Все още няма статистика за броя на потребителите + participants: Участници forms: errors: impersonate_user: reason: Трябва да предоставите причина, когато управлявате участник, който не е управляван + metrics: + blocked_users: + object: блокирани потребители + title: Блокирани потребители + reported_users: + object: докладвани потребители + title: Докладвани потребители + user_reports: + object: доклади на потребители moderations: models: moderation: fields: + created_at: Дата на създаване report_count: Брой + reports: Доклади + layouts: + decidim: + admin: + global_moderations: + title: Глобални модерации + newsletters: + title: Бюлетин с новости + settings: + title: Настройки + users: + title: Участници diff --git a/decidim-admin/config/locales/th-TH.yml b/decidim-admin/config/locales/th-TH.yml index a4431912a8299..55c2e3810d9fa 100644 --- a/decidim-admin/config/locales/th-TH.yml +++ b/decidim-admin/config/locales/th-TH.yml @@ -1 +1,101 @@ +--- th: + activemodel: + attributes: + area: + area_type: ประเภทพื้นที่ + name: ชื่อ + organization: องค์กร + area_type: + name: ชื่อ + organization: องค์กร + plural: พหูพจน์ + attachment: + attachment_collection_id: โฟลเดอร์ + description: คำอธิบาย + file: ไฟล์ + title: ชื่อไฟล์แนบหรือรูปภาพ + weight: ตำแหน่งการสั่งซื้อ + attachment_collection: + description: คำอธิบาย + name: ชื่อ + organization: + machine_translation_display_priority_translation: แปลข้อความก่อน + name: ชื่อ + official_img_footer: ส่วนท้ายของโลโก้อย่างเป็นทางการ + official_url: URL องค์กรอย่างเป็นทางการ + omnipresent_banner_short_description: คำอธิบายสั้น + omnipresent_banner_title: ชื่อ + omnipresent_banner_url: URL + organization_admin_email: อีเมลผู้ดูแลระบบองค์กร + organization_admin_name: อีเมลผู้ดูแลระบบองค์กร + organization_locales: สถานที่ขององค์กร + primary_color: หลัก + reference_prefix: คำนำหน้าอ้างอิง + rich_text_editor_in_public_views: เปิดใช้งานโปรแกรมแก้ไขข้อความแบบ Rich Text สำหรับผู้เข้าร่วม + secondary_color: รอง + secondary_hosts: เจ้าภาพรอง + send_welcome_notification: ส่งการแจ้งเตือนยินดีต้อนรับ + success_color: ความสำเร็จ + time_zone: เขตเวลา + tos_version: เงื่อนไขการให้บริการเวอร์ชัน + twitter_handler: ตัวจัดการเอ็กซ์ + user_groups_enabled: เปิดใช้งานกลุ่ม + users_registration_mode: โหมดการลงทะเบียนผู้ใช้ + warning_color: คำเตือน + welcome_notification_body: ยินดีต้อนรับเนื้อหาการแจ้งเตือน + welcome_notification_subject: ยินดีต้อนรับเรื่องการแจ้งเตือน + youtube_handler: ตัวจัดการ YouTube + participatory_space_private_user: + email: อีเมล + name: ชื่อ + scope: + code: รหัส + name: ชื่อ + organization: องค์กร + parent_id: พ่อแม่ + scope_type: ประเภทขอบเขต + scope_type_id: ประเภทขอบเขต + scope_type: + name: ชื่อ + organization: องค์กร + plural: พหูพจน์ + settings: + scope_id: ขอบเขต + static_page: + allow_public_access: อนุญาตการเข้าถึงโดยไม่ต้องตรวจสอบสิทธิ์ + changed_notably: มีการเปลี่ยนแปลงที่เห็นได้ชัดเจน + content: เนื้อหา + organization: องค์กร + show_in_footer: แสดงในส่วนท้าย + slug: บุ้ง URL + title: ชื่อ + topic_id: หัวข้อ + weight: ตำแหน่งการสั่งซื้อ + static_page_topic: + description: คำอธิบาย + decidim: + admin: + area_types: + edit: + title: แก้ไขประเภทพื้นที่ + update: อัปเดต + new: + create: สร้างประเภทพื้นที่ + title: ประเภทพื้นที่ใหม่ + update: + error: เกิดปัญหาในการอัปเดตประเภทพื้นที่นี้ + areas: + create: + error: เกิดปัญหาในการสร้างพื้นที่ใหม่ + success: สร้างพื้นที่สำเร็จแล้ว + destroy: + has_spaces: พื้นที่นี้มีช่องว่างที่ต้องพึ่งพา โปรดตรวจสอบให้แน่ใจว่าไม่มี Participatory Space อ้างอิงถึงพื้นที่นี้ก่อนที่จะลบออก + edit: + title: แก้ไขพื้นที่ + organization_external_domain_whitelist: + edit: + update: อัปเดต + organization_homepage_content_blocks: + edit: + update: อัปเดต diff --git a/decidim-core/config/locales/ar.yml b/decidim-core/config/locales/ar.yml index b4bcb26e013e0..2eb271cca9511 100644 --- a/decidim-core/config/locales/ar.yml +++ b/decidim-core/config/locales/ar.yml @@ -333,7 +333,6 @@ ar: '1': إنشاء التعديل الخاص بك '2': قارن تعديلك '3': اكمل تعديلك - '4': انشر تعديلك anonymous_user: مجهول application: collection: diff --git a/decidim-core/config/locales/bg.yml b/decidim-core/config/locales/bg.yml index b908e0a189ce8..94a2263754c8b 100644 --- a/decidim-core/config/locales/bg.yml +++ b/decidim-core/config/locales/bg.yml @@ -233,7 +233,6 @@ bg: '1': Създайте Ваша поправка '2': Сравнете Вашите поправки '3': Завършете Вашите поправки - '4': Публикувайте Вашите поправки anonymous_user: Анонимен application: collection: diff --git a/decidim-core/config/locales/cs.yml b/decidim-core/config/locales/cs.yml index 724182bc569ee..b80715e732321 100644 --- a/decidim-core/config/locales/cs.yml +++ b/decidim-core/config/locales/cs.yml @@ -359,7 +359,6 @@ cs: '1': Vytvořte svůj pozměňovací návrh '2': Porovnejte váš pozměňovací návrh '3': Dokončete váš pozměňovací návrh - '4': Zveřejněte svůj pozměňovací návrh anonymous_user: Anonymní application: collection: diff --git a/decidim-core/config/locales/de.yml b/decidim-core/config/locales/de.yml index 85dc9e93c5713..39860837cd063 100644 --- a/decidim-core/config/locales/de.yml +++ b/decidim-core/config/locales/de.yml @@ -333,7 +333,7 @@ de: '1': Erstellen Sie Ihre Änderung '2': Vergleichen Sie Ihren Änderungsvorschlag '3': Vervollständigen Sie Ihren Änderungsvorschlag - '4': Veröffentlichen Sie Ihren Änderungsvorschlag + '4': Änderung veröffentlichen anonymous_user: Anonym application: collection: diff --git a/decidim-core/config/locales/el.yml b/decidim-core/config/locales/el.yml index b0e4ab3b7aa1d..e237276d067b4 100644 --- a/decidim-core/config/locales/el.yml +++ b/decidim-core/config/locales/el.yml @@ -288,7 +288,6 @@ el: '1': Δημιουργήστε την τροποποίησή σας '2': Συγκρίνετε την τροποποίησή σας '3': Ολοκληρώστε την τροποποίησή σας - '4': Δημοσιεύστε την τροποποίησή σας anonymous_user: Ανώνυμη application: collection: diff --git a/decidim-core/config/locales/es-MX.yml b/decidim-core/config/locales/es-MX.yml index f252017e4b5d1..9ba6f6f556ec5 100644 --- a/decidim-core/config/locales/es-MX.yml +++ b/decidim-core/config/locales/es-MX.yml @@ -333,7 +333,7 @@ es-MX: '1': Crea tu enmienda '2': Compara tu enmienda '3': Completa tu enmienda - '4': Publicar tu enmienda + '4': Publica tu enmienda anonymous_user: Anónimo application: collection: diff --git a/decidim-core/config/locales/es-PY.yml b/decidim-core/config/locales/es-PY.yml index aefdb034de457..06366819dab9f 100644 --- a/decidim-core/config/locales/es-PY.yml +++ b/decidim-core/config/locales/es-PY.yml @@ -333,7 +333,7 @@ es-PY: '1': Crea tu enmienda '2': Compara tu enmienda '3': Completa tu enmienda - '4': Publicar tu enmienda + '4': Publica tu enmienda anonymous_user: Anónimo application: collection: diff --git a/decidim-core/config/locales/es.yml b/decidim-core/config/locales/es.yml index 53a02a50f6bdd..33cd5ec2c33f6 100644 --- a/decidim-core/config/locales/es.yml +++ b/decidim-core/config/locales/es.yml @@ -330,7 +330,7 @@ es: '1': Crea tu enmienda '2': Compara tu enmienda '3': Completa tu enmienda - '4': Publicar tu enmienda + '4': Publica tu enmienda anonymous_user: Anónima application: collection: diff --git a/decidim-core/config/locales/hu.yml b/decidim-core/config/locales/hu.yml index 7ef73ba91ee36..20c46f47b81d6 100644 --- a/decidim-core/config/locales/hu.yml +++ b/decidim-core/config/locales/hu.yml @@ -316,7 +316,6 @@ hu: '1': Készítse el a módosítását '2': Módosításod összehasonlítása '3': Módosításod befejezése - '4': Módosításod publikálása anonymous_user: Névtelen application: collection: diff --git a/decidim-core/config/locales/it.yml b/decidim-core/config/locales/it.yml index d1731a5203585..19737b0a4439c 100644 --- a/decidim-core/config/locales/it.yml +++ b/decidim-core/config/locales/it.yml @@ -243,7 +243,6 @@ it: '1': Crea il tuo emendamento '2': Confronta il tuo emendamento '3': Completa il tuo emendamento - '4': Pubblica il tuo emendamento anonymous_user: Anonimo application: collection: diff --git a/decidim-core/config/locales/ja.yml b/decidim-core/config/locales/ja.yml index edc58cf0fe277..03d069b342e31 100644 --- a/decidim-core/config/locales/ja.yml +++ b/decidim-core/config/locales/ja.yml @@ -320,7 +320,7 @@ ja: '1': 修正を作成する '2': 修正内容を比較 '3': 修正を完了する - '4': 修正内容を公開 + '4': 修正を公開 anonymous_user: 匿名です application: collection: diff --git a/decidim-core/config/locales/lb.yml b/decidim-core/config/locales/lb.yml index 9508da264d1f9..ea896519d2be4 100644 --- a/decidim-core/config/locales/lb.yml +++ b/decidim-core/config/locales/lb.yml @@ -243,7 +243,6 @@ lb: '1': Erstell deng Ännerung '2': Vergläich deng Ännerungsvirschléi '3': Vervollstänneg deng Ännerungsvirschléi - '4': Verëffentlech deng Ännerungsvirschléi anonymous_user: Anonym application: collection: diff --git a/decidim-core/config/locales/lt.yml b/decidim-core/config/locales/lt.yml index ce20dc7313951..a497a59a00117 100644 --- a/decidim-core/config/locales/lt.yml +++ b/decidim-core/config/locales/lt.yml @@ -353,7 +353,6 @@ lt: '1': Sukurkite savo pataisą '2': Palyginkite savo pataisą '3': Užbaikite savo pataisą - '4': Paskalbkite savo pataisą anonymous_user: Anonimas application: collection: diff --git a/decidim-core/config/locales/lv.yml b/decidim-core/config/locales/lv.yml index a2b387195efb9..495c365a84776 100644 --- a/decidim-core/config/locales/lv.yml +++ b/decidim-core/config/locales/lv.yml @@ -222,7 +222,6 @@ lv: '1': Izveidot savu grozījumu '2': Salīdzināt savu grozījumu '3': Pabeigt savu grozījumu - '4': Publicēt savu grozījumu anonymous_user: Anonīms application: collection: diff --git a/decidim-core/config/locales/nl.yml b/decidim-core/config/locales/nl.yml index de17397f1ffb2..2008bb19edd23 100644 --- a/decidim-core/config/locales/nl.yml +++ b/decidim-core/config/locales/nl.yml @@ -246,7 +246,6 @@ nl: '1': Maak uw amendement '2': Vergelijk uw amendement '3': Voltooi uw amendement - '4': Publiceer uw amendement anonymous_user: Anoniem application: collection: diff --git a/decidim-core/config/locales/no.yml b/decidim-core/config/locales/no.yml index 80ecd74a81ff6..3b4cee53cbde7 100644 --- a/decidim-core/config/locales/no.yml +++ b/decidim-core/config/locales/no.yml @@ -249,7 +249,6 @@ '1': Opprett endringen din '2': Sammenlign endringen din '3': Fullfør endringen din - '4': Publiser endringen din anonymous_user: Anonym application: collection: diff --git a/decidim-core/config/locales/pl.yml b/decidim-core/config/locales/pl.yml index 2632588968b5c..b0cebd4f04d5c 100644 --- a/decidim-core/config/locales/pl.yml +++ b/decidim-core/config/locales/pl.yml @@ -1676,6 +1676,7 @@ pl: public: Twoje informacje publiczne. errors: messages: + allowed_file_content_types: 'dozwolone są tylko pliki z następującymi rozszerzeniami: %{types}' already_confirmed: zostało już potwierdzone confirmation_period_expired: musi być potwierdzone w ciągu %{period}, proszę poprosić o nowy content_type_allowlist_error: typ pliku jest nieprawidłowy @@ -1693,8 +1694,11 @@ pl: few: 'Podczas przetwarzania Twojego żądania wystąpiły błędy:' many: 'Podczas przetwarzania Twojego żądania wystąpiły błędy:' other: 'Podczas przetwarzania Twojego żądania wystąpiły błędy:' + password_confirmation_message: '"Potwierdź hasło" nie pasuje do hasła' too_many_marks: używa zbyt wielu kolejnych znaków interpunkcyjnych (np.! i?) too_much_caps: używa zbyt dużej liczby wielkich liter (ponad 25% tekstu) + too_short: jest za krótkie (poniżej %{count} znaków) + url_format: Ten adres URL jest w niepoprawnym formacie forms: correct_errors: Wystąpiły błędy w formularzu, popraw je, aby kontynuować. length_validator: @@ -1713,9 +1717,16 @@ pl: data_consent: details: columns: + description: Opis + name: Nazwa + service: Usługa type: Typ items: + _session_id: + description: Pozwala witrynom na zapamiętanie użytkownika w witrynie internetowej, gdy przenoszą się między stronami internetowymi. + service: Ta strona internetowa decidim-consent: + description: Przechowuje informacje o ciasteczkach dozwolonych przez użytkownika na tej stronie. service: Ta strona internetowa pwaInstallPromptSeen: description: Zachowuje status, jeśli powiadomienie o instalacji progresywnej aplikacji internetowej (PWA) zostało już wyświetlone przez użytkownika. @@ -1776,6 +1787,8 @@ pl: notifications_dashboard: mark_all_as_read: Oznacz wszystkie jako przeczytane mark_as_read: Oznacz jako przeczytane + offline_banner: + cache_version_page: Ups! Twoja sieć jest offline. Jest to poprzednio buforowana wersja strony, którą odwiedzasz, być może zawartość nie jest aktualna. social_media_links: facebook: "%{organization} na Facebooku" github: "%{organization} na GitHubie" diff --git a/decidim-core/config/locales/pt-BR.yml b/decidim-core/config/locales/pt-BR.yml index 56603e616df3a..bfcc5081b80ee 100644 --- a/decidim-core/config/locales/pt-BR.yml +++ b/decidim-core/config/locales/pt-BR.yml @@ -333,7 +333,6 @@ pt-BR: '1': Crie sua emenda '2': Compare sua alteração '3': Completar sua alteração - '4': Publique sua alteração anonymous_user: Anônimo application: collection: diff --git a/decidim-core/config/locales/pt.yml b/decidim-core/config/locales/pt.yml index 5c81f5966aabd..2878eeb82f7fa 100644 --- a/decidim-core/config/locales/pt.yml +++ b/decidim-core/config/locales/pt.yml @@ -242,7 +242,6 @@ pt: '1': Criar a sua modificação '2': Comparar a sua modificação '3': Concluir a sua modificação - '4': Publicar a sua modificação anonymous_user: Anônimo application: collection: diff --git a/decidim-core/config/locales/sk.yml b/decidim-core/config/locales/sk.yml index 4518994c136d1..1b6da756e7ff5 100644 --- a/decidim-core/config/locales/sk.yml +++ b/decidim-core/config/locales/sk.yml @@ -227,7 +227,6 @@ sk: '1': Vytvorte svoj pozmeňovací návrh '2': Porovnajte váš pozmeňovací návrh '3': Dokončite váš pozmeňovací návrh - '4': Zverejniť svoj pozmeňovací návrh anonymous_user: Anonymné application: collection: diff --git a/decidim-core/config/locales/sv.yml b/decidim-core/config/locales/sv.yml index a1ef2825b53de..c893d66e12d9e 100644 --- a/decidim-core/config/locales/sv.yml +++ b/decidim-core/config/locales/sv.yml @@ -287,7 +287,6 @@ sv: '1': Skapa ändringsförslag '2': Jämför ändringsförslag '3': Slutför ändringsförslaget - '4': Publicera ändringsförslaget anonymous_user: Anonym application: collection: diff --git a/decidim-core/config/locales/tr-TR.yml b/decidim-core/config/locales/tr-TR.yml index b31c1514005a8..6d5236f50f8dd 100644 --- a/decidim-core/config/locales/tr-TR.yml +++ b/decidim-core/config/locales/tr-TR.yml @@ -235,7 +235,6 @@ tr: '1': Değişikliğinizi oluşturun '2': Değişikliğinizi karşılaştırın '3': Değişikliğinizi tamamlayın - '4': Değişikliğinizi yayınlayın anonymous_user: Anonim application: collection: diff --git a/decidim-core/config/locales/zh-CN.yml b/decidim-core/config/locales/zh-CN.yml index 0195d53ce7316..0062921182f64 100644 --- a/decidim-core/config/locales/zh-CN.yml +++ b/decidim-core/config/locales/zh-CN.yml @@ -212,7 +212,6 @@ zh-CN: '1': 创建您的修改 '2': 比较您的修改 '3': 完成您的修改 - '4': 发布您的修改 anonymous_user: 匿名的 application: collection: diff --git a/decidim-core/config/locales/zh-TW.yml b/decidim-core/config/locales/zh-TW.yml index 45a7296c81cae..04d51ea13aa78 100644 --- a/decidim-core/config/locales/zh-TW.yml +++ b/decidim-core/config/locales/zh-TW.yml @@ -314,7 +314,6 @@ zh-TW: '1': 創建您的修正案 '2': 比較您的修正案 '3': 完成您的修正案 - '4': 發佈您的修正案 anonymous_user: 匿名 application: collection: diff --git a/decidim-debates/config/locales/pl.yml b/decidim-debates/config/locales/pl.yml index 3bf5129ab69cd..28efd05798c21 100644 --- a/decidim-debates/config/locales/pl.yml +++ b/decidim-debates/config/locales/pl.yml @@ -193,6 +193,13 @@ pl: events: debates: create_debate_event: + space_followers: + email_intro: |- + Cześć, + Nowa debata "%{resource_title}" została utworzona na przestrzeni partycypacyjnej %{participatory_space_title}, sprawdź ją i pomóż: + email_outro: Otrzymujesz to powiadomienie, ponieważ obserwujesz przestrzeń partycypacyjną %{participatory_space_title}. Możesz wyłączyć powiadomienia, klikając poprzedni link. + email_subject: Nowa debata "%{resource_title}" w %{participatory_space_title} + notification_title: Debata %{resource_title} została utworzona w %{participatory_space_title}. user_followers: email_intro: |- Cześć, diff --git a/decidim-elections/config/locales/pl.yml b/decidim-elections/config/locales/pl.yml index e2b311c9ea088..d3b365452eb54 100644 --- a/decidim-elections/config/locales/pl.yml +++ b/decidim-elections/config/locales/pl.yml @@ -7,11 +7,16 @@ pl: image: Obraz proposals: Powiązane propozycje title: Tytuł + ballot_style: + code: Kod election: description: Opis end_time: Głosowanie kończy się o start_time: Głosowanie rozpoczyna się o title: Tytuł + monitoring_committee_member: + email: E-mail + name: Imię question: max_selections: Maksymalna liczba opcji do wybrania min_selections: Żadna z powyższych opcji @@ -19,6 +24,7 @@ pl: voting: banner_image: Banner end_time: Głosowanie kończy się + scope_id: Zakres start_time: Głosowanie rozpoczyna się voting_type: Typ głosowania errors: @@ -203,6 +209,7 @@ pl: trustee_mailer: body: "

    Cześć, %{user_name},

    Dodano cię jako mąż zaufania do %{resource_name}.

    " subject: Dodano cię jako mąż zaufania do %{resource_name} + trustee_zone: Zabierz mnie do strefy powiernika menu: trustees: Mężowie (osoby) zaufania models: @@ -244,11 +251,17 @@ pl: success: Pytanie zostało pomyślnie zaktualizowane steps: create_election: + census: Lista wyborców errors: + census_codes_generated: Kody dostępu do listy wyborców nie są generowane. + census_frozen: Kody dostępu do listy wyborców nie są wyeksportowane. + census_uploaded: Nie ma spisu wyborców wgranego podczas tych wyborów. + component_published: Komponent wyborczy nie został opublikowany. max_selections: Maksymalna liczba opcji do wybrania nie jest odpowiednia do pytania minimum_answers: Pytania muszą mieć co najmniej dwie odpowiedzi. minimum_questions: Wybory muszą mieć co najmniej jedno pytanie. published: Wybory nie zostały opublikowane. + time_before: Godzina rozpoczęcia jest mniej niż 3 godziny przed rozpoczęciem wyborów. trustees_number: Przestrzeń partycypacyjna musi mieć co najmniej %{number} mężów (osób) zaufania z kluczem publicznym. invalid: Wystąpił problem z konfiguracją tych wyborów no_trustees: Nie skonfigurowano mężów (osób) zaufania dla tej przestrzeni partycypacyjnej @@ -257,6 +270,10 @@ pl: 'false': nie posiada klucza publicznego 'true': posiada klucz publiczny requirements: + census_codes_generated: Kody dostępu do listy wyborców są generowane. + census_frozen: Kody dostępu do listy wyborców są wyeksportowane, a spis podlega zamrożeniu. + census_uploaded: Lista wyborców została wgrana. + component_published: Komponent wyborczy został opublikowany. max_selections: Maksymalna liczby opcji do wybrania jest odpowiednia dla wszystkich pytań. minimum_answers: Pytania muszą mieć co najmniej dwie odpowiedzi. minimum_questions: Wybory muszą mieć co najmniej jedno pytanie. @@ -304,11 +321,13 @@ pl: success: Prośba o publikację wyników została pomyślnie przesłana do Tablicy danych wyborczych title: Obliczone wyniki tally_started: + continue: Kontynuuj invalid: Wystąpił błąd podczas usuwania męża (osoby) zaufania mark_as_missing: Oznacz jako brakujący mark_as_missing_description: Wszyscy mężowie zaufania powinni uczestniczyć w tym procesie, ale jeśli nie może wziąć udziału w tym procesie, możesz oznaczyć go jako brakujący. success: Brakująca uwaga męża zaufania została pomyślnie wysłana do Tablicy tally_completion: 'Proces zostanie zakończony, gdy wszyscy mężowie zaufania będą aktywni lub zostaną oznaczeni jako brakujący. Wymagana ilość mężów zaufania: %{quorum}.' + title: Proces prowadzenia rejestru undo_mark_as_missing: Przed zakończeniem procesu będzie mógł uczestniczyć mąż zaufania oznaczony jako brakujący omyłkowo. Mężowie zaufania mogą postępować jak zwykle, a oznaczenie jako "brakujący" zostanie zignorowane. vote: errors: @@ -587,6 +606,8 @@ pl: upload_error: invalid_format: Wgrany plik nie zawiera żadnego klucza identyfikacyjnego. invalid_key: Nie można załadować kluczy identyfikacyjnych z przesłanego pliku. + invalid_public_key: Klucze identyfikacyjne w przesłanym pliku nie pasują do zapisanego publicznego klucza identyfikacyjnego. + upload_legend: Serwer posiada Twoje publiczne klucze identyfikacyjne, ale Twoja przeglądarka nadal nie ma takich kluczy. Musisz zaimportować plik z kluczami identyfikacyjnymi do komputera z kopii zapasowej, którą utworzyłeś po ich wygenerowaniu. not_supported_browser_description: Wygląda na to, że używasz przeglądarki internetowej, która nie może być użyta do działań męża (osoby) zaufania. Upewnij się, że używasz najnowszej wersji przeglądarki, lub spróbuj użyć dowolnej z najpopularniejszych przeglądarek, aby móc wykonać zadania męża (osoby) zaufania. not_supported_browser_title: Aktualizuj przeglądarkę by działać jako mąż (osoba) zaufania update: @@ -674,6 +695,7 @@ pl: continue: Dalej warnings: no_elections_warning: Brak wyborów spełniających kryteria wyszukiwania lub nie ma żadnych zaplanowanych wyborów. + no_scheduled_elections_warning: Obecnie nie ma żadnych zaplanowanych wyborów, ale możesz zobaczyć wszystkie zakończone już wybory. events: elections: election_published: @@ -756,8 +778,28 @@ pl: highlighted_votings: max_results: Maksymalna ilość elementów do wyświetlenia landing_page: + attachments_and_folders: + name: Załączniki i foldery do głosowania description: name: Opis głosowania + elections: + name: Wybory + header: + name: Nagłówek głosowania + html_block_1: + name: Pierwszy blok html głosowania + html_block_2: + name: Drugi blok html głosowania + html_block_3: + name: Trzeci blok html głosowania + metrics: + name: Metryki głosowania + polling_stations: + name: Lokale wyborcze + stats: + name: Statystyki głosowania + timeline: + name: Oś czasu głosowania index: published: Opublikowano landing_page: @@ -871,6 +913,7 @@ pl: edit: change_polling_station: Wróć do lokali wyborczych monitoring_committee_notes: Uwagi + monitoring_committee_notes_placeholder: Zgłoś każdy incydent tutaj title: Wyniki głosowania %{election_title} w lokalu wyborczym %{polling_station_title} elections: title: Wybierz wybory, które chcesz zatwierdzić @@ -956,6 +999,7 @@ pl: update: Aktualizuj form: select_a_voting_type: Wybierz typ głosowania + show_check_census_help: Czy pokazać link "Czy mogę głosować?" w menu głosów publicznych title: Tytuł voting_type: hybrid: Hybrydowe @@ -982,6 +1026,7 @@ pl: census: create: invalid: Wystąpił błąd przy przesyłaniu listy wyborców. Spróbuj ponownie później. + invalid_csv_header: Nagłówki CSV są brakujące lub nie są poprawne — przeczytaj uważnie instrukcję delete: button: Usuń wszystkie dane listy wyborców destroy: @@ -1036,6 +1081,8 @@ pl: highlighted_votings: name: Wyróżnione głosowania landing_page: + description: + title: O tym głosowaniu metrics: heading: Partycypacja w liczbach polling_stations: @@ -1052,6 +1099,8 @@ pl: pages: home: highlighted_votings: + active_votings: Aktywne głosowania + see_all_votings: Zobacz wszystkie głosowania votings_button_title: Link do strony Głosowań wyświetla wszystkie głosowania polling_officer_zone: closures: @@ -1059,6 +1108,7 @@ pl: certify: add_images: Dodaj obrazy error: Wystąpił błąd podczas dołączania certyfikatu, spróbuj ponownie. + form_legend: Prześlij zdjęcie certyfikatu zamknięcia wyborów heading: Przeliczanie głosów - Prześlij certyfikat info_text: Prześlij zdjęcie certyfikatu zamknięcia wyborów. submit: Prześlij certyfikat @@ -1085,6 +1135,7 @@ pl: modal_ballots_count_error: btn_validate_total: Sprawdź sumę przeliczonych głosów close_modal: Zamknij + info_explanation_text: 'Sprawdź całkowitą liczbę kart. Jeśli całkowita liczba jest nieprawidłowa, należy podać wyjaśnienie dla komitetu monitorującego:' info_text: Całkowita liczba kart wyborczych (kopert) nie odpowiada liczbie osób, które zagłosowały w tym lokalu wyborczym. message_for_monitoring_committee: Wiadomość dla Komisji Wyborczej review_recount: Zweryfikuje przeliczenie głosów @@ -1115,9 +1166,12 @@ pl: in_person_votes: complete_voting: available_answers: 'Możliwe odpowiedzi:' + census_verified: Ten uczestnik nie głosował jeszcze osobiście. + census_verified_with_online_vote: Ten uczestnik głosował już online. Jeśli głosuje osobiście, poprzednie głosy zostaną unieważnione i będzie to głosowanie ostateczne. complete_voting: Zakończ głosowanie identify_another: Zidentyfikuj innego uczestnika questions_title: 'Ma prawo do głosowania w następujących kwestiach:' + questions_title_voted: 'Ten uczestnik głosował już online i ma prawo głosować w następujących pytaniach:' voted: Uczestnik zagłosował create: error: Głos nie został zarejestrowany. Spróbuj ponownie. @@ -1208,9 +1262,11 @@ pl: description: Tutaj masz możliwość sprawdzenia danych umieszczonych na liście wyborców, aby wiedzieć, czy masz prawo uczestniczyć w tym głosowaniu. Powinieneś mieć już kod dostępu, ale jeśli go zgubiłeś, możesz ponownie o ten kod poprosić, gdy Twoje dane są poprawne. error: info: 'Spróbuj ponownie. Jeśli uważasz, że dane w systemie są nieprawidłowe, możesz je zgłosić tutaj: %{census_contact_information}' + title: Wprowadzone przez Ciebie dane nie są na liście wyborców dla tego głosowania form_title: 'Wypełnij formularz, aby sprawdzić Twoje dane na liście wyborców:' invalid: Wystąpił błąd przy sprawdzaniu listy wyborców. success: + access_link: pocztą elektroniczną. access_link_with_sms: poprzez SMS lub e-mail. info: Powinieneś był już otrzymać swój kod dostępu pocztą. Jeśli go nie posiadasz, możesz poprosić o to tutaj title: Twoje dane z listy wyborców nie są prawidłowe! @@ -1221,6 +1277,7 @@ pl: day_placeholder: DD document_number: Numer dokumentu document_number_placeholder: Numer ID + document_type: Typ dokumentu month: Miesiąc month_placeholder: MM postal_code: Kod pocztowy @@ -1242,6 +1299,7 @@ pl: filters: active: Aktywne all: Wszystko + date: Data finished: Zakończone search: Szukaj upcoming: Nadchodzące diff --git a/decidim-initiatives/config/locales/pl.yml b/decidim-initiatives/config/locales/pl.yml index 529f9b8ae34a2..3e3d46780ae35 100644 --- a/decidim-initiatives/config/locales/pl.yml +++ b/decidim-initiatives/config/locales/pl.yml @@ -3,8 +3,13 @@ pl: activemodel: attributes: initiative: + answer: Odpowiedź + answer_url: Adres URL odpowiedzi + area_id: Obszar + decidim_scope_id: Zakres decidim_user_group_id: Autor description: Opis + hashtag: Hashtag offline_votes: Podpisy na piśmie offline_votes_for_scope: Podpisy dla %{scope_name} scope_id: Zakres @@ -17,14 +22,18 @@ pl: online: Online state: Stan title: Tytuł + type_id: Typ initiatives_committee_member: user: Członek Komisji + initiatives_settings: + initiatives_order: Kolejność initiatives_type: area_enabled: Pozwól autorom na wybór kategorii dla ich inicjatyw attachments_enabled: Pozwól na załączniki banner_image: Baner child_scope_threshold_enabled: Włącz podpisy dla elementów podrzędnych collect_user_extra_fields: Zbierz dane osobowe użytkowników przy zbiórce podpisów + comments_enabled: Włącz komentarze custom_signature_end_date_enabled: Pozwól autorom na wybór końca okresu zbierania podpisów description: Opis document_number_authorization_handler: Zezwolenie na weryfikację numeru dokumentu przy zbiórce podpisów @@ -33,9 +42,13 @@ pl: online_signature_enabled: Pozwól na podpisy online only_global_scope_enabled: Pozwól tylko na tworzenie inicjatyw o zasięgu globalnym promoting_committee_enabled: Włącz komitet organizacyjny + signature_type: Typ podpisu title: Tytuł undo_online_signatures_enabled: Pozwól użytkownikom na wycofanie ich podpisów online validate_sms_code_on_votes: Dodaj krok weryfikacji kodem SMS przy zbiórce podpisów + initiatives_type_scope: + decidim_scopes_id: Zakresy + supports_required: Wymagane wsparcie initiatives_vote: date_of_birth: Data urodzenia document_number: Numer dokumentu @@ -101,6 +114,7 @@ pl: components: Komponenty information: Informacja initiatives: Inicjatywy + initiatives_settings: Ustawienia initiatives_types: Typy inicjatyw moderations: Moderacja models: @@ -252,6 +266,16 @@ pl: update: error: Wystąpił błąd success: Inicjatywa została zaktualizowana + initiatives_settings: + edit: + update: Aktualizuj + form: + comments: Najczęściej komentowane + date: Najnowsze + publication_date: Ostatnio opublikowane + random: Losowo + signatures: Najczęściej podpisane + title: Ustawienia dla inicjatyw initiatives_type_scopes: create: error: Wystąpił błąd diff --git a/decidim-meetings/config/locales/pl.yml b/decidim-meetings/config/locales/pl.yml index 58ced97daff73..9d71948cecc1a 100644 --- a/decidim-meetings/config/locales/pl.yml +++ b/decidim-meetings/config/locales/pl.yml @@ -28,21 +28,37 @@ pl: organizer_gid: Utwórz jako organizer_id: Organizator private_meeting: Prywatne spotkanie + registration_email_custom_content: Niestandardowa treści rejestracyjnego e-maila registration_form_enabled: Włączono formularz rejestracyjny registration_terms: Warunki rejestracji + registration_type: Typ rejestracji registration_url: Adres URL rejestracji registrations_enabled: Rejestracje włączone + reserved_slots: Zastrzeżone miejsca na to spotkanie + start_time: Godzina rozpoczęcia title: Tytuł transparent: Transparentny type_of_meeting: Typ + meeting_agenda: + title: Tytuł + visible: Widoczna meeting_agenda_items: + description: Opis duration: Czas trwania + title: Tytuł + meeting_registration_invite: + email: E-mail + name: Nazwa + validate_registration_code: + code: Kod errors: models: meeting: attributes: iframe_embed_type: not_embeddable: Ten adres URL nie może być osadzony na stronie spotkania lub wydarzenia na żywo + online_meeting_url: + url_format: Adres URL musi być prawidłowy meeting_agenda: attributes: base: @@ -85,16 +101,27 @@ pl: closed_at_present: label: Państwo values: + 'false': Otwarte 'true': Zamknięte is_upcoming_true: label: Data + values: + 'false': Przeszłe + 'true': Nadchodzące + scope_id_eq: + label: Zakres with_any_origin: + label: Źródło values: + official: Oficjalny + participants: Uczestnik user_group: Grupy użytkowników with_any_type: label: Rodzaj spotkania values: + hybrid: Hybrydowe in_person: Osobiste + online: Online meeting_copies: create: error: Wystąpił błąd podczas duplikowania tego spotkania. @@ -106,6 +133,7 @@ pl: components: meetings: actions: + comment: Skomentuj join: Dołącz name: Spotkania settings: @@ -261,7 +289,9 @@ pl: select_user: Wybierz użytkownika index: filter: + accepted: Zaakceptowano all: Wszystkie + rejected: Odrzucono sent: Wysłano filter_by: Filtruj według invite_attendee: Zaproś uczestnika @@ -574,11 +604,21 @@ pl: questions: closed_question: question_results: Wyniki wyborów + index_admin: + edit: Edytuj w panelu administratora + question: Pytanie + received_answer: otrzymana odpowiedź + received_answers: otrzymane odpowiedzi + results: Wyniki + send: Wyślij + sent: Wysłano published_question: max_choices_alert: Wybrano zbyt wiele opcji question: Pytanie question_replied: Odpowiedziano na pytanie reply_question: Odpowiedz na pytanie + public_participants_list: + attending_participants: Uczestnicy biorący udział read_more: "(zobacz więcej)" registration_mailer: confirmation: @@ -606,6 +646,7 @@ pl: types: private_meeting: Prywatne spotkanie transparent: Transparentne + withdraw: Wycofany versions: back_to_resource: Wróć do spotkania withdraw: diff --git a/decidim-participatory_processes/config/locales/pl.yml b/decidim-participatory_processes/config/locales/pl.yml index 98ef3f4d0f945..1a16eec3c4d50 100644 --- a/decidim-participatory_processes/config/locales/pl.yml +++ b/decidim-participatory_processes/config/locales/pl.yml @@ -12,15 +12,22 @@ pl: decidim_area_id: Kategoria description: Opis developer_group: Grupa inicjatorów + document: Dokument domain: Domena end_date: Data zakończenia hashtag: Hashtag hero_image: Obraz główny + import_attachments: Importuj załączniki + import_categories: Importuj kategorie + import_components: Importuj komponenty + import_steps: Importuj kroki local_area: Obszar organizacji meta_scope: Zakres metadanych participatory_process_group_id: Grupa procesów + participatory_process_type_id: Typ procesów participatory_scope: Zaproponowano participatory_structure: Jak decydowano + private_space: Proces prywatny promoted: Promowany published_at: Opublikowano related_process_ids: Powiązane procesy @@ -57,10 +64,18 @@ pl: short_description: Krótki opis start_date: Data rozpoczęcia title: Tytuł + participatory_process_type: + title: Tytuł participatory_process_user_role: email: Adres e-mail name: Imię role: Rola + errors: + models: + participatory_process: + attributes: + document: + allowed_file_content_types: 'Nieprawidłowy typ dokumentu. Dozwolone są tylko pliki z następującymi rozszerzeniami: %{types}' models: decidim/participatory_process_step_activated_event: Aktualny etap decidim/participatory_process_step_changed_event: Zmieniono etap @@ -108,6 +123,7 @@ pl: participatory_process_groups_submenu: info: Informacje landing_page: Strona startowa + participatory_process_types: Typy procesu participatory_processes: Procesy participatory_processes_submenu: attachment_collections: Foldery @@ -139,6 +155,11 @@ pl: start_date: Data rozpoczęcia title: Tytuł name: Etap procesu partycypacyjnego + participatory_process_type: + fields: + created_at: Utworzono + title: Tytuł + name: Typ procesu participatory_process_user_role: fields: email: Adres e-mail @@ -470,6 +491,7 @@ pl: no_active: Brak aktualnych procesów no_active_nor_upcoming: Brak aktualnych i nadchodzących procesów no_active_nor_upcoming_callout: Nie ma aktualnych ani nadchodzących procesów. Oto lista poprzednich procesów. + filter_by: Pokaż names: active: Aktualne all: Wszystko @@ -478,6 +500,8 @@ pl: see: Zobacz index: loading: Ładowanie wyników... + show: + title: O tym procesie show: area: Kategoria belongs_to_group: Ten proces należy do diff --git a/decidim-proposals/config/locales/ar.yml b/decidim-proposals/config/locales/ar.yml index 0d69f40d2c501..5f40165b7904f 100644 --- a/decidim-proposals/config/locales/ar.yml +++ b/decidim-proposals/config/locales/ar.yml @@ -191,7 +191,6 @@ ar: proposal_wizard_step_1_help_text: اقتراح الاقتراح "إنشاء" نص مساعدة الخطوة proposal_wizard_step_2_help_text: اقتراح الاقتراح "قارن" نص خطوة المساعدة proposal_wizard_step_3_help_text: نص اقتراح "إكمال" تعليمات نص المعالج - proposal_wizard_step_4_help_text: اقتراح الاقتراح "نشر" نص تعليمات الخطوة resources_permissions_enabled: يمكن تعيين أذونات الإجراءات لكل اقتراح scope_id: نطاق scopes_enabled: النطاقات مفعلة @@ -989,7 +988,7 @@ ar: step_1: إنشاء اقتراحك step_2: قارن step_3: إكمال - step_4: انشر اقتراحك + step_4: نشر اقتراحك step_of: الخطوة %{current_step_num} من %{total_steps} title: خطوات إنشاء الاقتراحات proposals_picker: diff --git a/decidim-proposals/config/locales/bg.yml b/decidim-proposals/config/locales/bg.yml index 4621e05b67293..3cfefef9aa163 100644 --- a/decidim-proposals/config/locales/bg.yml +++ b/decidim-proposals/config/locales/bg.yml @@ -8,6 +8,7 @@ bg: category_id: Категория decidim_scope_id: Сфера has_address: Има адрес + scope_id: Обхват state: Състояние title: Заглавие user_group_id: Създай съвместна чернова като @@ -22,23 +23,32 @@ bg: category_id: Категория decidim_scope_id: Сфера has_address: Има адрес + scope_id: Обхват state: Състояние suggested_hashtags: Предложени хаштагове title: Заглавие user_group_id: Създай предложение като proposal_answer: answer: Отговор + cost: Разход + cost_report: Доклад за разходите + execution_period: Период на изпълнение proposals_copy: copy_proposals: Разбирам, че това ще вмъкне всички предложения от избрания компонент към текущия и това действие не е обратимо. origin_component_id: Компонент, от който да се копират предложенията proposals_import: import_proposals: Копиране на предложения + keep_answers: Запазете състоянието и отговорите keep_authors: Запази автора на оригинала valuation_assignment: admin_log: valuator_role_id: Име на проверяващ errors: models: + participatory_text: + attributes: + document: + allowed_file_content_types: 'Невалиден файлов формат. Позволени са само файлове със следните разширения: %{types}' proposal: attributes: add_documents: @@ -50,6 +60,16 @@ bg: identical: И заглавието не може да е еднакво title: identical: И основния текст не може да е еднакъв + proposals_merge: + attributes: + base: + not_official: Не са официални + supported: Получили са подкрепа или одобрения + proposals_split: + attributes: + base: + not_official: Не са официални + supported: Получили са подкрепа или одобрения models: decidim/proposals/accepted_proposal_event: Предложението е прието decidim/proposals/admin/update_proposal_category_event: Категорията на предложението е променена @@ -79,8 +99,28 @@ bg: admin: filters: proposals: + category_id_eq: + label: Категория + is_emendation_true: + label: Тип + values: + 'false': Предложения + 'true': Изменения + scope_id_eq: + label: Обхват + state_eq: + label: Състояние + values: + accepted: Прието + evaluating: Оценяване + published: Публикувано + rejected: Отхвърлено + validating: Техническа проверка + withdrawn: Оттеглено state_null: label: Състояние + values: + 'true': Не отговорено valuator_role_ids_has: label: Прикрепено към проверяващ search_placeholder: @@ -89,9 +129,11 @@ bg: proposals: actions: amend: Промяна + comment: Коментар create: Създай endorse: Одобри vote: Поддръжка + vote_comment: Оцени коментара withdraw: Оттегляне name: Предложения settings: @@ -104,6 +146,18 @@ bg: can_accumulate_supports_beyond_threshold: Може да събира поддръжка над прага collaborative_drafts_enabled: Съвместните чернови са разрешени comments_enabled: Коментарите са разрешени + comments_max_length: Максимална дължина на коментарите (Оставете 0 за стойност по подразбиране) + default_sort_order: Сортиране на предложения по подразбиране + default_sort_order_help: '"По подразбиране" означава, че ако подрепата е активирана, предложенията ще се показват сортирани по произволен ред, а ако подкрепата е блокирана, тогава те ще бъдат сортирани по най-подкрепяни.' + default_sort_order_options: + default: По подразбиране + most_commented: Най-коментирани + most_endorsed: Най-препоръчвани + most_followed: Най-следвани + most_voted: Най-подкрепяни + random: Произволно + recent: Скорошни + with_more_authors: С повече автори geocoding_enabled: Координатите са разрешени minimum_votes_per_user: Минимална поддръжка за потребител new_proposal_body_template: Шаблон за основен текст на предложение @@ -114,13 +168,19 @@ bg: participatory_texts_enabled_readonly: Тази настройка не е активна, ако има съществуващи предложения. Моля, създайте нов компонент „Предложения“, ако желаете да активирате тази функция или изчистете всички внесени предложения в менюто „Текст на участници“, ако искате да я деактивирате. proposal_answering_enabled: Отговора на предложение е разрешен proposal_edit_before_minutes: Предложенията могат да бъдат редактирани от авторите преди да минат толкова минути + proposal_edit_time: Редактиране на предложение + proposal_edit_time_choices: + infinite: Разрешаване на редактиране на предложения за безкраен период от време + limited: Позволете редактиране на предложения в рамките на определен период от време proposal_length: Максимална дължина на основния текст на предложението proposal_limit: Максимален брой предложения на участник proposal_wizard_step_1_help_text: Текст на помощника за стъпка "Създай" proposal_wizard_step_2_help_text: Текст на помощника за стъпка "Сравни" proposal_wizard_step_3_help_text: Текст на помощника за стъпка "Завърши" - proposal_wizard_step_4_help_text: Текст на помощника за стъпка "Публикувай" + proposal_wizard_step_4_help_text: Помощен текст на стъпка "Публикуване" на съветника за предложения resources_permissions_enabled: Позволените действия могат да се задават за всяко предложение + scope_id: Обхват + scopes_enabled: Обхватите са активирани threshold_per_proposal: Праг за предложенията vote_limit: Максимален брой поддръжки на участник step: @@ -139,6 +199,19 @@ bg: answers_with_costs: Активиране на "тежест" за отговорите на предложение automatic_hashtags: Добавени са хаштагове на всички предложения comments_blocked: Коментарите са блокирани + creation_enabled: Участниците могат да създават предложения + creation_enabled_readonly: Тази настройка е деактивирана, когато активирате функцията "Текстове за участие". За да качите предложения като текст за участие, щракнете върху бутона "Текстове за участие" и следвайте инструкциите. + default_sort_order: Сортиране на предложения по подразбиране + default_sort_order_help: '"По подразбиране" означава, че ако подрепата е активирана, предложенията ще се показват сортирани по произволен ред, а ако подкрепата е блокирана, тогава те ще бъдат сортирани по най-подкрепяни.' + default_sort_order_options: + default: По подразбиране + most_commented: Най-коментирани + most_endorsed: Най-препоръчвани + most_followed: Най-следвани + most_voted: Най-подкрепяни + random: Произволно + recent: Скорошни + with_more_authors: С повече автори endorsements_blocked: Одобряване забранено endorsements_enabled: Одобряване разрешено proposal_answering_enabled: Отговора на предложение е разрешен @@ -157,21 +230,33 @@ bg: email_subject: Някой е направил бележка в предложението %{resource_title}. notification_title: Някой е направил бележка в предложението %{resource_title}. Вижте я в администраторския панел collaborative_draft_access_accepted: + email_intro: '%{requester_name} получи достъп като сътрудник в съвместната чернова %{resource_title}.' + email_outro: Получихте известие, защото сте сътрудник в %{resource_title}. email_subject: "%{requester_name} получи достъп като сътрудник в %{resource_title}." notification_title: %{requester_name} %{requester_nickname} получи достъп като сътрудник в съвместната чернова %{resource_title}. collaborative_draft_access_rejected: + email_intro: '%{requester_name} е отхвърлен като сътрудник в съвместната чернова %{resource_title}.' + email_outro: Получихте известие, защото сте сътрудник в %{resource_title}. email_subject: "%{requester_name} е отхвърлен като сътрудник в съвместната чернова %{resource_title}." notification_title: %{requester_name} %{requester_nickname} е отхвърлен като сътрудник в съвместната чернова %{resource_title}. collaborative_draft_access_requested: + email_intro: '%{requester_name} заяви достъп като сътрудник. Можете да приемете или отхвърлите от сраницата на колективната чернова %{resource_title}.' + email_outro: Получихте известие, защото сте сътрудник в %{resource_title}. email_subject: "%{requester_name} заяви достъп като сътрудник в %{resource_title}." notification_title: %{requester_name} %{requester_nickname} заяви достъп като сътрудник в колективната чернова %{resource_title}. Моля, приемете или отхвърлете заявката. collaborative_draft_access_requester_accepted: + email_intro: Получихте достъп като сътрудник в колективната чернова %{resource_title}. + email_outro: Получихте известие, защото заявихте да бъдете сътрудник в %{resource_title}. email_subject: Приет сте като сътрудник в %{resource_title}. notification_title: Получихте достъп като сътрудник в колективната чернова %{resource_title}. collaborative_draft_access_requester_rejected: + email_intro: Отказан Ви е достъп като сътрудник в колективната чернова %{resource_title}. + email_outro: Получихте известие, защото заявихте да бъдете сътрудник в %{resource_title}. email_subject: Отхвърлен сте като сътрудник в %{resource_title}. notification_title: Отказан Ви е достъп като сътрудник в колективната чернова %{resource_title}. collaborative_draft_withdrawn: + email_intro: %{author_name} %{author_nickname} оттегли колективната чернова %{resource_title}. + email_outro: Получихте известие, защото сте сътрудник в %{resource_title}. email_subject: "%{author_name} %{author_nickname} оттегли колективната чернова %{resource_title}." notification_title: %{author_name} %{author_nickname} оттегли колективната чернова %{resource_title}. creation_enabled: @@ -192,6 +277,7 @@ bg: notification_title: Вашето предложение %{resource_title} е одобрено. follower: email_intro: 'Предложението "%{resource_title}" е одобрено. Прочетете отговора на страницата:' + email_outro: Получавате това известие, защото следвате "%{resource_title}". Може да премахнете следването чрез предната връзка. email_subject: Предложение, което следвате е одобрено notification_title: Предложението %{resource_title} беше одобрено. proposal_evaluating: @@ -202,6 +288,7 @@ bg: notification_title: Вашето предложение %{resource_title} се разглежда. follower: email_intro: 'Предложението "%{resource_title}" се разглежда в момента. Прочетете отговора на страницата:' + email_outro: Получавате това известие, защото следвате "%{resource_title}". Може да премахнете следването чрез предната връзка. email_subject: Предложение, което следвате се разглежда notification_title: Предложението %{resource_title} се разглежда. proposal_mentioned: @@ -217,6 +304,7 @@ bg: proposal_published_for_space: email_intro: Предложението "%{resource_title}" беше добавено в "%{participatory_space_title}", което следвате. email_outro: Получавате това известие, защото следвате "%{participatory_space_title}". Може да прекратите известията чрез предната връзка. + email_subject: Ново предложение „%{resource_title}“ беше добавено в(ъв) %{participatory_space_title} notification_title: Предложениетоl %{resource_title} е добавено към %{participatory_space_title} от %{author} notification_title_official: Официалното предложение %{resource_title} е добавено към %{participatory_space_title} proposal_rejected: @@ -227,33 +315,177 @@ bg: notification_title: Вашето предложение %{resource_title} беше отхвърлено. follower: email_intro: 'Предложението „%{resource_title}“ беше отхвърлено. Можете да прочетете отговора на тази страница:' + email_outro: Получавате това известие, защото следвате "%{resource_title}". Може да премахнете следването чрез предната връзка. email_subject: Предложение, което следвате, беше отхвърлено notification_title: Предложението %{resource_title} беше отхвърлено. + proposal_update_category: + email_intro: 'Администратор актуализира категорията на Вашето предложение „%{resource_title}“. Вижте повече на тази страница:' + email_outro: Получавате това известие, защото сте авторът на предложението. + email_subject: Категорията на предложението %{resource_title} беше актуализирана + notification_title: Категорията на предложението %{resource_title} беше актуализирана от администратор. + proposal_update_scope: + email_intro: 'Администратор актуализира обхвата на Вашето предложение „%{resource_title}“. Вижте повече на тази страница:' + email_outro: Получавате това известие, защото сте авторът на предложението. + email_subject: Обхватът на предложението %{resource_title} беше актуализиран + notification_title: Обхватът на предложението %{resource_title} беше актуализиран от администратор. + voting_enabled: + email_intro: 'Можете да подкрепяте нови предложения в(ъв) %{participatory_space_title}! Започнете да участвате на следната страница:' + email_outro: Получавате това известие, защото следвате %{participatory_space_title}. Може да прекратите известията чрез предходния линк. + email_subject: Предоставянето на подкрепа за предложения започна за %{participatory_space_title} + notification_title: Вече можете да започнете да подкрепяте предложения в(ъв) %{participatory_space_title} gamification: badges: + accepted_proposals: + conditions: + - Изберете пространството за участие, което ви интересува, с подаване на активни предложения + - Опитайте се да правите предложения, които могат да бъдат изпълнени. По този начин е по-вероятно те да бъдат приети. + description: Тази значка се дава, когато участвате активно с нови предложения и те са приети. + description_another: Този участник има %{score} приети предложения. + description_own: Имате %{score} приети предложения. + name: Приети предложения + next_level_in: Нужни са Ви още %{score} приети предложения, за да достигнете следващото ниво! + unearned_another: Все още не е прието нито едно предложение на този участник. + unearned_own: Все нямате прието предложение. proposal_votes: + conditions: + - Разгледайте и прекарайте известно време, за да се запознаете с предложенията на други хора + - Подкрепете предложенията, които харесвате или намирате за интересни + description: Тази значка се предоставя, когато подкрепяте предложения на други хора. + description_another: Този участник е подкрепил %{score} предложения. + description_own: Подкрепили сте %{score} предложения. + name: Подкрепяния на предложение + next_level_in: Подкрепете още %{score} предложения, за да достигнете следващото ниво! unearned_another: Този участник все още не е подкрепил нито едно предложение. + unearned_own: Все още не сте подкрепили нито едно предложение. proposals: + conditions: + - Изберете пространството за участие, което ви интересува, с подаване на активни предложения + - Създайте ноео предложение + description: Тази значка се предоставя, когато участвате активно с нови предложения. + description_another: Този участник е създал %{score} предложения. + description_own: Създали сте %{score} предложения. + name: Предложения + next_level_in: Създайте още %{score} предложения, за да достигнете следващото ниво! unearned_another: Този участник все още не е създал нито едно предложение. + unearned_own: Все още не сте създали нито едно предложение. + metrics: + accepted_proposals: + description: Брой на приетите предложения + object: предложения + title: Приети предложения + endorsements: + description: Брой одобрения на предложения + object: одобрения + title: Одобрения + proposals: + description: Брой предложения + object: предложения + title: Предложения + votes: + description: Брой на подкрепяния за предложения + object: подкрепа + title: Подкрепа participatory_spaces: highlighted_proposals: see_all: Виж всички предложения (%{count}) proposals: + actions: + answer_proposal: Отговор на предложение + edit_proposal: Редактиране на предложение + import: Импортиране на предложения от друг компонент + new: Ново предложение + participatory_texts: Текстове на участници + show: Показване на предложението + title: Активности admin: + actions: + preview: Преглед + exports: + proposal_comments: Коментари + proposals: Предложения imports: + help: + answers: | + Документът за импортиране трябва да съдържа следните имена на колони в случай на CSV или Excel файлове или имена на ключове в случай на JSON файлове: +
      +
    • id: ID на предложението за отговор
    • +
    • състояние: Едно от „прието“, „оценява“ или „отхвърлено“
    • +
    • answer/en: Отговор на английски език. Това ще зависи от езиковата конфигурация на вашата платформа.
    • +
    + proposals: | + Файлът трябва да има следните имена на колони в случай на CSV или Excel файлове или имена на ключове в случай на JSON файлове: +
      +
    • title/en: Заглавие на английски език. Това ще зависи от езиковата конфигурация на вашата платформа.
    • +
    • body/en: Основен текст на английски език. Това ще зависи от езиковата конфигурация на вашата платформа.
    • +
    • scope/id: ID за обхвата
    • +
    • category/id: ID за категорията
    • +
    + label: + answers: Импортиране на отговори от файл + proposals: Импортиране на предложения от файл + resources: + answers: + one: отговор на предложение + other: отговори на предложение + proposals: + one: предложение + other: предложения title: answers: Импортиране на отговори на предложения proposals: Копиране на предложения + models: + proposal: + name: Предложение participatory_texts: + bulk-actions: + are_you_sure: Наистина ли искате да отхвърлите цялата чернова на текста за участие? + discard_all: Отхвърли всички + import_doc: Импортиране на документ + discard: + success: Всички чернови на текстове за участие бяха отхвърлени. + import: + invalid: Формулярът е невалиден! + invalid_file: Файлът съдържа грешка, моля, опитайте да редактирате съдържанието на файла и го качете повторно. + success: Поздравления, следните раздели бяха преобразувани в предложения. Вече можете да ги прегледате и да ги коригирате, преди да ги публикувате. + index: + info_1: Следните раздели бяха преобразувани в предложения. Вече можете да ги прегледате и да ги коригирате, преди да ги публикувате. + publish_document: Публикуване на Документ + save_draft: Запазване на чернова + title: Преглед на текста за участие new_import: + accepted_mime_types: + md: Маркиране + odt: ODT + bottom_hint: "(Ще имате възможност да прегледате и сортирате секциите с документи)" document_legend: 'Добавете документ с големина до 2 Mb, като всеки раздел до 3 нива надолу в структурата ще бъде анализиран в „Предложения“. Поддържаните формати са: %{valid_mime_types}' + title: Добави документ + upload_document: Качване на документ publish: invalid: Неуспешно публикуване на предложения success: Всички предложения бяха публикувани + sections: + article: "Член" + section: "Раздел: %{title}" + sub-section: "Подраздел: %{title}" + update: + success: Текстът за участие беше актуализиран успешно. + proposal_answers: + form: + accepted: Прието + answer_proposal: Отговор + evaluating: Оценяване + not_answered: Не отговорено + rejected: Отхвърлено + title: Отговор на предложение %{title} proposal_notes: create: error: Възникна проблем при създаването на тази бележка за предложението success: Бележката за предложението беше създадена успешно + form: + note: Бележка + submit: Подаване + leave_your_note: Оставете Вашата бележка + title: Лични бележки proposals: answer: invalid: Възникна проблем при отговарянето на това предложение @@ -261,30 +493,96 @@ bg: create: invalid: Възникна проблем при създаването на това предложение success: Предложението беше създадено успешно + edit: + title: Актуализиране на предложението + update: Актуализация + form: + attachment_legend: "(Незадължително) Добавяне на прикачен файл" + created_in_meeting: Това предложение е резултат от среща + delete_attachment: Изтриване на прикачен файл + select_a_category: Изберете категория + select_a_meeting: Избор на среща + index: + actions: Активности + assign_to_valuator: Възлагане на оценител + assign_to_valuator_button: Възлагане + cancel: Отказ + change_category: Промяна на категория + change_scope: Промяна на обхвата + merge: Сливане в едно ново + merge_button: Сливане + publish: Публикувай + publish_answers: Публикуване на отговори + select_component: Избери компонент + selected: избрани + split: Разделяне на предложения + split_button: Разделяне + title: Предложения + unassign_from_valuator: Отнемане възложеното на оценителя + unassign_from_valuator_button: Отнемане на възложеното + update: Актуализация + update_scope_button: Актуализиране на обхвата + new: + create: Създаване + title: Създаване на предложение publish_answers: number_of_proposals: Отговорите на %{number} предложения ще бъдат публикувани. select_a_proposal: Моля, изберете предложение show: + amendments_count: Брой изменения + assigned_valuators: Присъеденени оценители authors: Автори + body: Основен текст + comments_count: Брой коментари comments_negative_count: Против comments_neutral_count: Неутрален comments_positive_count: Подкрепям created_at: Дата на създаване + documents: Документи + endorsements_count: Брой препоръки endorsements_ranking: Класиране по препоръки + endorsers: Препоръчали link: Връзка + n_more_endorsers: + one: и още 1 + other: и още %{count} + photos: Снимки proposals: Предложения + ranking: "%{ranking} от %{total}" + related_meetings: Свързани срещи + remove_assignment: Премахване на възлагане + remove_assignment_confirmation: Наистина ли искате да премахнете оценителя от това предложение? + valuators: Оценители + votes_count: Брой подкрепяния votes_ranking: Класиране по подкрепяния update_category: + invalid: 'Тези предложения вече имат категорията %{subject_name}: %{proposals}.' + select_a_category: Моля, изберете категория select_a_proposal: Моля, изберете предложение + success: 'Предложенията бяха актуализирани успешно в категорията %{subject_name}: %{proposals}.' update_scope: + invalid: 'Тези предложения вече имат обхват %{subject_name}: %{proposals}.' select_a_proposal: Моля, изберете предложение select_a_scope: Моля, изберете обхват + success: 'Предложенията бяха актуализирани успешно в обхвата %{subject_name}: %{proposals}.' proposals_imports: create: invalid: Възникна проблем при импортирането на предложенията success: "%{number} предложения бяха импортирани успешно" new: + create: Импортиране на предложения + no_components: Няма други компоненти на предложения в това пространство за участие, от които да се импортират предложенията. + select_component: Моля, изберете компонент + select_states: Проверете състоянието на предложенията за импортиране title: Копиране на предложения + proposals_merges: + create: + invalid: 'Възникна проблем при обединяването на избраните предложения, заради някои от тези:' + success: Предложенията бяха обединени успешно в ново предложение. + proposals_splits: + create: + invalid: 'Възникна проблем при сливането на избраните предложения, заради някои от тези:' + success: Предложенията бяха разделени успешно в нови предложения. valuation_assignments: create: invalid: Възникна грешка при възлагането на предложенията на оценител @@ -292,36 +590,151 @@ bg: delete: invalid: Възникна грешка при отмяна на възлагането на предложения към оценител success: Оценителят бе успешно премахнат от предложенията + admin_log: + proposal: + answer: "%{user_name} отговори на предложението %{resource_name} в пространството %{space_name}" + create: "%{user_name} създаде предложението %{resource_name} в пространството %{space_name} като официално предложение" + publish_answer: "%{user_name} публикува отговора на предложението %{resource_name} в пространството %{space_name}" + update: "%{user_name} актуализира официалното предложение %{resource_name} в пространството %{space_name}" + proposal_note: + create: "%{user_name} остави частна бележка в предложението %{resource_name} в пространството %{space_name}" + valuation_assignment: + create: "%{user_name} възложи предложението %{resource_name} на оценител" + delete: "%{user_name} премахна възлагането на предложението %{proposal_title} на оценител" + answers: + accepted: Прието + evaluating: Оценяване + not_answered: Не отговорено + rejected: Отхвърлено + withdrawn: Оттеглено + application_helper: + filter_category_values: + all: Всички + filter_origin_values: + all: Всички + meetings: Срещи + official: Официално + participants: Участници + user_groups: Групи + filter_scope_values: + all: Всички + filter_state_values: + accepted: Прието + all: Всички + evaluating: Оценяване + not_answered: Не отговорено + rejected: Отхвърлено + filter_type_values: + all: Всички + amendments: Изменения + proposals: Предложения collaborative_drafts: collaborative_draft: publish: + error: Възникна проблем при публикуването на съвместната чернова. irreversible_action_modal: body: След като черновата бъде публикувана като предложение, тя повече няма да може да се редактира. За предложението няма да могат да се приемат нови автори или добавки. + cancel: Отказ + ok: Публикувай като предложение + title: Следното действие е необратимо + success: Съвместната чернова беше публикувана успешно като предложение. view_collaborative_draft: Преглед на съвместна чернова withdraw: + error: Възникна проблем при затварянето на съвместната чернова. irreversible_action_modal: body: След като черновата бъде затворена, тя повече няма да може да се редактира. За черновата няма да могат да се приемат нови автори или добавки. + cancel: Отказ + ok: Оттегляне на съвместната чернова + title: Следното действие е необратимо + success: Съвместната чернова беше оттеглена успешно. count: drafts_count: one: "Съвместна чернова" other: "Съвместни чернови" + create: + error: Възникна проблем при създаването на тази съвместна чернова. + success: Съвместната чернова беше създадена успешно. + edit: + attachment_legend: "(Незадължително) Добавяне на прикачен файл" + back: Назад + select_a_category: Моля, изберете категория + send: Изпрати + title: Редактиране на съвместната чернова + filters: + all: Всички + amendment: Изменения + category: Категория + open: Отворен + published: Публикувано + related_to: Свързано с + scope: Обхват + search: Търсене + state: Статус + withdrawn: Оттеглено + filters_small_view: + close_modal: Затвори прозореца + filter: Филтър + filter_by: Филтрирай по + unfold: Разгъване + new: + add_file: Добави файл + edit_file: Редактирай файл + send: Продължи + new_collaborative_draft_button: + new_collaborative_draft: Нова съвместна чернова + orders: + label: 'Подреждане на черновите по:' + most_contributed: Най-допринесли + random: Произволно + recent: Скорошни requests: accepted_request: + error: Неуспешно приемане като сътрудник, моля, опитайте отново по-късно. success: "@%{user} беше приет(а) успешно като сътрудник" access_requested: + error: Заявката Ви не беше изпълнена успешно, моля, опитайте отново по-късно. success: Вашата заявка за сътрудничество беше изпратена успешно + collaboration_requests: + accept_request: Приеми + reject_request: Отхвърли + title: Заявки за сътрудничество rejected_request: + error: Неуспешно отхвърляне като сътрудник, моля, опитайте отново по-късно. success: "@%{user} беше отхвърлен(а) успешно като сътрудник" show: + back: Назад + edit: Редактиране на съвместната чернова final_proposal: окончателно предложение + final_proposal_help_text: Тази чернова е завършена. Вижте окончателното предложение + hidden_authors_count: + one: и още %{count} + other: и още %{count} души info-message: Това е съвместна чернова за предложение. Това означава, че можете да помогнете на авторите да оформят предложението си, като използвате раздела за коментари по-долу, или да го подобрите директно, като поискате редакторски достъп. След като авторите Ви предоставят достъп, ще можете да извършвате промени в черновата. + publish: Публикувай + publish_info: Публикуване на тази версия на черновата или published_proposal: публикувано предложение + request_access: Заявка за достъп + requested_access: Изпратена е заявка за достъп version_history: вижте хронологията на версиите за това предложение + withdraw: оттеглете черновата + states: + open: Отвори + published: Публикувано + withdrawn: Оттеглено + update: + error: Възникна проблем при запазването на съвместната чернова. + success: Съвместната чернова беше актуализирана успешно. wizard_aside: + back_from_collaborative_draft: Назад към съвместните чернови info: Създавате съвместна чернова. + wizard_header: + title: Създайте своята съвместна чернова content_blocks: highlighted_proposals: proposals: Предложения + create: + error: Възникна проблем при запазването на предложението. + success: Предложението беше създадено успешно. Запазено като чернова. last_activity: new_proposal_at_html: "Ново предложение на адрес: %{link}" proposal_updated_at_html: "Предложение беше актуализирано на: %{link}" @@ -333,6 +746,10 @@ bg: new: limit_reached: Не можете да създавате нови предложения, докато сте надхвърлили ограничението. proposals: + compare: + continue: Продължи + complete: + send: Изпрати count: proposals_count: one: "%{count} предложение" @@ -341,15 +758,45 @@ bg: add_image: Добавяне на изображение edit_image: Редактиране на изображение gallery_legend: "(Незадължително) Добавете изображение към картата с предложението" + filters_small_view: + close_modal: Затвори прозореца + filter: Филтър + filter_by: Филтрирай по + unfold: Разгъване index: + click_here: Виж всички предложения + collaborative_drafts_list: Достъп до съвместни чернови + new_proposal: Ново предложение + see_all: Виж всички предложения + see_all_withdrawn: Вижте всички оттеглени предложения + text_banner: Разглеждате списъка с предложения, оттеглени от своите автори. %{go_back_link}. view_proposal: Преглед на предложението linked_proposals: proposal_votes: one: поддръжка other: поддръжки + new: + send: Продължи + title: Създайте Ваше предложение + orders: + label: 'Подреждане на предложенията по:' + most_commented: Най-коментирани + most_endorsed: Най-препоръчвани + most_followed: Най-следвани + most_voted: Най-подкрепяни + random: Произволно + recent: Скорошни + with_more_authors: С повече автори participatory_texts: + index: + document_index: Индекс на документ view_index: see_index: Вижте индекса + placeholder: + address: 37 Homewood Drive Brownsburg, IN 46112 + preview: + announcement_body: Вашето предложение е запазено като чернова. Трябва да се публикува, за да се появи на сайта. + announcement_title: Вашето предложение все още не е публикувано proposal: creation_date: 'Създадено на:' view_proposal: Преглед на предложението @@ -375,6 +822,7 @@ bg: description: За да бъдат валидирани, предложенията трябва да съберат %{limit} подкрепяния vote_limit: left: Оставащи + votes: Подкрепа wizard_aside: info: Вие създавате предложение. wizard_steps: diff --git a/decidim-proposals/config/locales/ca.yml b/decidim-proposals/config/locales/ca.yml index 7271bb6da0163..64da725ca1c87 100644 --- a/decidim-proposals/config/locales/ca.yml +++ b/decidim-proposals/config/locales/ca.yml @@ -779,7 +779,7 @@ ca: no_similars_found: Ben fet! No s'han trobat propostes semblants title: Propostes similars complete: - send: Enviar + send: Envia title: Completa la teva proposta count: proposals_count: diff --git a/decidim-proposals/config/locales/cs.yml b/decidim-proposals/config/locales/cs.yml index 73a841b44097a..256cf5a960a24 100644 --- a/decidim-proposals/config/locales/cs.yml +++ b/decidim-proposals/config/locales/cs.yml @@ -185,7 +185,6 @@ cs: proposal_wizard_step_1_help_text: Text průvodce kroku nápovědy "Vytvořit" Návrh proposal_wizard_step_2_help_text: Text průvodce kroku nápovědy "Porovnat" návrhy proposal_wizard_step_3_help_text: Text průvodce kroku nápovědy „Dokončit“ Návrh - proposal_wizard_step_4_help_text: Text průvodce kroku nápovědy "Publikovat" Návrh resources_permissions_enabled: Pro každý návrh lze nastavit oprávnění akce scope_id: Oblast působnosti scopes_enabled: Oblasti působnosti povoleny diff --git a/decidim-proposals/config/locales/de.yml b/decidim-proposals/config/locales/de.yml index b44d81a0f5c25..718f201f04a47 100644 --- a/decidim-proposals/config/locales/de.yml +++ b/decidim-proposals/config/locales/de.yml @@ -779,7 +779,7 @@ de: no_similars_found: Gut gemacht! Keine ähnlichen Vorschläge gefunden title: Ähnliche Vorschläge complete: - send: Senden + send: Abschicken title: Vorschlag vervollständigen count: proposals_count: diff --git a/decidim-proposals/config/locales/el.yml b/decidim-proposals/config/locales/el.yml index 30951ef5d6559..501a174b9d5f7 100644 --- a/decidim-proposals/config/locales/el.yml +++ b/decidim-proposals/config/locales/el.yml @@ -175,7 +175,6 @@ el: proposal_wizard_step_1_help_text: Κείμενο βοήθειας βήματος «Δημιουργίας» του οδηγού πρότασης proposal_wizard_step_2_help_text: Κείμενο βοήθειας βήματος «Σύγκρισης» του οδηγού πρότασης proposal_wizard_step_3_help_text: Κείμενο βοήθειας βήματος «Ολοκλήρωσης» του οδηγού πρότασης - proposal_wizard_step_4_help_text: Κείμενο βοήθειας βήματος «Δημοσίευσης» του οδηγού πρότασης resources_permissions_enabled: Μπορούν να οριστούν δικαιώματα ενεργειών για κάθε πρόταση scope_id: Πεδίο εφαρμογής scopes_enabled: Τα πεδία εφαρμογής ενεργοποιήθηκαν diff --git a/decidim-proposals/config/locales/es-MX.yml b/decidim-proposals/config/locales/es-MX.yml index cc30f1317aed5..8f36d7b6cea3f 100644 --- a/decidim-proposals/config/locales/es-MX.yml +++ b/decidim-proposals/config/locales/es-MX.yml @@ -177,7 +177,7 @@ es-MX: proposal_wizard_step_1_help_text: Texto de ayuda para el paso "Crear" del asistente de propuesta proposal_wizard_step_2_help_text: Texto de ayuda para el paso "Comparar" del asistente de propuesta proposal_wizard_step_3_help_text: Texto de ayuda para el paso "Comparar" del asistente de propuesta - proposal_wizard_step_4_help_text: 'Asistente de propuesta: texto de ayuda paso "Publicar"' + proposal_wizard_step_4_help_text: Texto de ayuda para el paso "Publicar" del asistente de propuestas resources_permissions_enabled: Se pueden establecer permisos de acciones para cada propuesta scope_id: Ámbito scopes_enabled: Ámbitos habilitados @@ -941,7 +941,7 @@ es-MX: step_1: Crear tu propuesta step_2: Comparar step_3: Completar - step_4: Publicar tu propuesta + step_4: Publica tu propuesta step_of: Paso %{current_step_num} de %{total_steps} title: Pasos de creación de una propuesta proposals_picker: diff --git a/decidim-proposals/config/locales/es-PY.yml b/decidim-proposals/config/locales/es-PY.yml index cc3b41fdb918a..bb8c8cb2d4f97 100644 --- a/decidim-proposals/config/locales/es-PY.yml +++ b/decidim-proposals/config/locales/es-PY.yml @@ -177,7 +177,7 @@ es-PY: proposal_wizard_step_1_help_text: Asistente de propuesta "Crear" paso texto de ayuda proposal_wizard_step_2_help_text: Asistente de propuesta "Comparar" texto de ayuda paso proposal_wizard_step_3_help_text: Texto de ayuda al paso "Completar" de propuestas - proposal_wizard_step_4_help_text: Asistente de propuesta Texto de ayuda paso "Publicar" + proposal_wizard_step_4_help_text: Texto de ayuda para el paso "Publicar" del asistente de propuestas resources_permissions_enabled: Los permisos sobre acciones pueden establecerse para cada propuesta scope_id: Ámbito scopes_enabled: Ámbitos habilitados diff --git a/decidim-proposals/config/locales/eu.yml b/decidim-proposals/config/locales/eu.yml index ca62d0ebce38a..ddb32d7cc29ff 100644 --- a/decidim-proposals/config/locales/eu.yml +++ b/decidim-proposals/config/locales/eu.yml @@ -177,7 +177,7 @@ eu: proposal_wizard_step_1_help_text: Proposamen laguntzailea "Sortu" urrats laguntza testua proposal_wizard_step_2_help_text: Proposamen laguntzailea "Konparatu" urrats laguntza testua proposal_wizard_step_3_help_text: Proposamen laguntzailea "Bete" urrats laguntza testua - proposal_wizard_step_4_help_text: Proposamen laguntzailea "Argitaratu" urrats laguntza testua + proposal_wizard_step_4_help_text: Proposamen laguntzailea "Argitaratu" urrats-laguntza testua resources_permissions_enabled: Ekintza-baimenak proposamen bakoitzerako ezarri daitezke scope_id: Esparrua scopes_enabled: Esparruak gaituta diff --git a/decidim-proposals/config/locales/fr-CA.yml b/decidim-proposals/config/locales/fr-CA.yml index 6e435fcb89cee..f482dde12ccbb 100644 --- a/decidim-proposals/config/locales/fr-CA.yml +++ b/decidim-proposals/config/locales/fr-CA.yml @@ -177,7 +177,7 @@ fr-CA: proposal_wizard_step_1_help_text: Texte d'aide à l'étape "Créer" de la création de proposition proposal_wizard_step_2_help_text: Texte d'aide à l'étape "Comparer" de la création de proposition proposal_wizard_step_3_help_text: Texte d'aide à l'étape "Compléter" de la création de proposition - proposal_wizard_step_4_help_text: Texte d'aide à l'étape "Publier" de la création de proposition + proposal_wizard_step_4_help_text: Texte d'aide à l'étape "Publier" de l'assistant de proposition resources_permissions_enabled: Les autorisations d'actions peuvent être définies pour chaque proposition scope_id: Secteur scopes_enabled: Secteurs activés @@ -941,7 +941,7 @@ fr-CA: step_1: Créer une proposition step_2: Comparer aux autres propositions step_3: Compléter votre proposition - step_4: Publier votre proposition + step_4: Publier la proposition step_of: Étape %{current_step_num} sur %{total_steps} title: Étapes de création de proposition proposals_picker: diff --git a/decidim-proposals/config/locales/fr.yml b/decidim-proposals/config/locales/fr.yml index ebe8c7f83413d..304494022decd 100644 --- a/decidim-proposals/config/locales/fr.yml +++ b/decidim-proposals/config/locales/fr.yml @@ -177,7 +177,7 @@ fr: proposal_wizard_step_1_help_text: Texte d'aide à l'étape "Créer" de la création de proposition proposal_wizard_step_2_help_text: Texte d'aide à l'étape "Comparer" de la création de proposition proposal_wizard_step_3_help_text: Texte d'aide à l'étape "Compléter" de la création de proposition - proposal_wizard_step_4_help_text: Texte d'aide à l'étape "Publier" de la création de proposition + proposal_wizard_step_4_help_text: Texte d'aide à l'étape "Publier" de l'assistant de proposition resources_permissions_enabled: Les autorisations d'actions peuvent être définies pour chaque proposition scope_id: Secteur scopes_enabled: Secteurs activés @@ -941,7 +941,7 @@ fr: step_1: Créer une proposition step_2: Comparer aux autres propositions step_3: Compléter votre proposition - step_4: Publier votre proposition + step_4: Publier la proposition step_of: Étape %{current_step_num} sur %{total_steps} title: Étapes de création de proposition proposals_picker: diff --git a/decidim-proposals/config/locales/gl.yml b/decidim-proposals/config/locales/gl.yml index 35bc4e48c0ba7..56bcaf6de216a 100644 --- a/decidim-proposals/config/locales/gl.yml +++ b/decidim-proposals/config/locales/gl.yml @@ -157,7 +157,6 @@ gl: proposal_wizard_step_1_help_text: Asistente de propostas "Crear" texto de axuda paso a paso proposal_wizard_step_2_help_text: Asistente de propostas "Comparar" texto de axuda paso a paso proposal_wizard_step_3_help_text: Asistente de propostas Texto de axuda de paso "Completo" - proposal_wizard_step_4_help_text: Asistente de propostas "Publica" o texto de axuda paso a paso resources_permissions_enabled: Os permisos de acción pódense establecer para cada proposta scope_id: Ámbito scopes_enabled: Ámbitos habilitados @@ -663,7 +662,7 @@ gl: error: Houbo erros ao votar a proposta. proposals: compare: - continue: Continúe + continue: Continuar no_similars_found: Ben feito! Non se atoparon propostas similares title: Propostas similares complete: diff --git a/decidim-proposals/config/locales/hu.yml b/decidim-proposals/config/locales/hu.yml index 440832c25c0ff..e2df13699af96 100644 --- a/decidim-proposals/config/locales/hu.yml +++ b/decidim-proposals/config/locales/hu.yml @@ -148,7 +148,6 @@ hu: proposal_wizard_step_1_help_text: Javaslat varázsló "Létrehozás" gomb súgójának szövege proposal_wizard_step_2_help_text: Javaslat varázsló "Összehasonlítás" gomb súgójának szövege proposal_wizard_step_3_help_text: Javaslat varázsló "Teljesítés" gomb súgójának szövege - proposal_wizard_step_4_help_text: Javaslat varázsló "Közzététel" gomb súgójának szövege resources_permissions_enabled: Egyes javaslatokhoz műveleti engedélyeket állíthatsz be threshold_per_proposal: Küszöbérték javaslatonként vote_limit: Támogatási limit felhasználónként @@ -705,7 +704,7 @@ hu: error: Hiba történt a javaslatra való szavazás során. proposals: compare: - continue: Folytatás + continue: Tovább no_similars_found: Szép munka! Nincsen hasonló javaslat title: Hasonló javaslatok complete: diff --git a/decidim-proposals/config/locales/id-ID.yml b/decidim-proposals/config/locales/id-ID.yml index 4a8ff4422a5d0..9a9004eadfd9c 100644 --- a/decidim-proposals/config/locales/id-ID.yml +++ b/decidim-proposals/config/locales/id-ID.yml @@ -99,7 +99,6 @@ id: proposal_wizard_step_1_help_text: Panduan proposal "Buat" teks bantuan langkah proposal_wizard_step_2_help_text: Proposal wizard "Bandingkan" langkah bantuan teks proposal_wizard_step_3_help_text: Panduan proposal, selesaikan langkah bantuan teks - proposal_wizard_step_4_help_text: Panduan proposal "Publikasikan" langkah bantuan teks resources_permissions_enabled: Izin tindakan dapat diatur untuk setiap proposal threshold_per_proposal: Ambang batas per proposal vote_limit: Batas suara per pengguna diff --git a/decidim-proposals/config/locales/is-IS.yml b/decidim-proposals/config/locales/is-IS.yml index 251e4a8ea2c5f..bd211ccd5b69f 100644 --- a/decidim-proposals/config/locales/is-IS.yml +++ b/decidim-proposals/config/locales/is-IS.yml @@ -45,7 +45,6 @@ is: proposal_wizard_step_1_help_text: Tillaga töframaður "Búa til" skref hjálpartexta proposal_wizard_step_2_help_text: Tillaga töframaður "Bera saman" skref hjálpartexta proposal_wizard_step_3_help_text: Tillaga töframaður "Complete" skref hjálpartexta - proposal_wizard_step_4_help_text: Tillaga "Birta" skref hjálpartexti threshold_per_proposal: Gildi fyrir hverja tillögu step: announcement: Tilkynning @@ -206,7 +205,6 @@ is: no_similars_found: Vel gert! Engar svipaðar tillögur fundust title: Svipaðar tillögur complete: - send: Senda title: Ljúka tillögu þinni edit: back: Til baka diff --git a/decidim-proposals/config/locales/it.yml b/decidim-proposals/config/locales/it.yml index 3d3aa745bc15a..093518ab2e9c0 100644 --- a/decidim-proposals/config/locales/it.yml +++ b/decidim-proposals/config/locales/it.yml @@ -161,7 +161,6 @@ it: proposal_wizard_step_1_help_text: Procedura guidata proposta "Crea" testo guida passo proposal_wizard_step_2_help_text: Procedura guidata di proposta "Confronta" il testo della guida del passo proposal_wizard_step_3_help_text: Procedura guidata "Completa" del testo della guida guidata della proposta - proposal_wizard_step_4_help_text: Procedura guidata "Pubblica" del testo della guida per la procedura guidata resources_permissions_enabled: Le autorizzazioni delle azioni possono essere impostate per ogni proposta scope_id: Ambito scopes_enabled: Ambiti abilitati @@ -697,7 +696,7 @@ it: error: Ci sono stati errori durante la votazione della proposta. proposals: compare: - continue: Prosegui + continue: Continua no_similars_found: Molto bene! Non sono state trovate proposte simili title: Proposte simili complete: diff --git a/decidim-proposals/config/locales/lt.yml b/decidim-proposals/config/locales/lt.yml index 58f993d50a86e..683c206ef815f 100644 --- a/decidim-proposals/config/locales/lt.yml +++ b/decidim-proposals/config/locales/lt.yml @@ -183,7 +183,6 @@ lt: proposal_wizard_step_1_help_text: Pasiūlymo vedlio etapo „Sukurti“ pagalbos tekstas proposal_wizard_step_2_help_text: Pasiūlymo vedlio etapo „Palyginti“ pagalbos tekstas proposal_wizard_step_3_help_text: Pasiūlymo vedlio etapo „Užbaigti“ pagalbos tekstas - proposal_wizard_step_4_help_text: Pasiūlymo vedlio etapo „Paskelbti“ pagalbos tekstas resources_permissions_enabled: Kiekvienam pasiūlymui galima nustatyti leistinus veiksmus scope_id: Apimtis scopes_enabled: Sritys įjungtos diff --git a/decidim-proposals/config/locales/lv.yml b/decidim-proposals/config/locales/lv.yml index ec78715de33f8..a26d19e3b72c4 100644 --- a/decidim-proposals/config/locales/lv.yml +++ b/decidim-proposals/config/locales/lv.yml @@ -123,7 +123,6 @@ lv: proposal_wizard_step_1_help_text: Priekšlikumu vedņa „Izveidot” soļa palīdzības teksts proposal_wizard_step_2_help_text: Priekšlikumu vedņa "Salīdzināt" soļa palīdzības teksts proposal_wizard_step_3_help_text: Priekšlikuma vedņa „Pabeigt” soļa palīdzības teksts - proposal_wizard_step_4_help_text: Priekšlikumu vedņa „Publicēt” soļa palīdzības teksts resources_permissions_enabled: Katram priekšlikumam var iestatīt darbības atļaujas threshold_per_proposal: Slieksnis vienam priekšlikumam vote_limit: Atbalsta limits vienam dalībniekam diff --git a/decidim-proposals/config/locales/nl.yml b/decidim-proposals/config/locales/nl.yml index 2fcfcb3450e3a..a7f0681b9d3d9 100644 --- a/decidim-proposals/config/locales/nl.yml +++ b/decidim-proposals/config/locales/nl.yml @@ -153,7 +153,6 @@ nl: proposal_wizard_step_1_help_text: Helptekst "Maak" bij het maken van een nieuw voorstel proposal_wizard_step_2_help_text: Helptekst "Vergelijk" bij het maken van een nieuw voorstel proposal_wizard_step_3_help_text: Voorstel wizard "Complete" stap helptekst - proposal_wizard_step_4_help_text: Helptekst "Publiceren" bij het maken van een nieuw voorstel resources_permissions_enabled: Actiemachtigingen kunnen voor elk voorstel worden ingesteld scope_id: Scope scopes_enabled: Scopes ingeschakeld @@ -870,7 +869,7 @@ nl: step_1: Maak je voorstel step_2: Vergelijk step_3: Compleet - step_4: Publiceer uw voorstel + step_4: Publiceer je voorstel step_of: Stap %{current_step_num} van %{total_steps} title: Voorstel creatie stappen proposals_picker: diff --git a/decidim-proposals/config/locales/no.yml b/decidim-proposals/config/locales/no.yml index 9a5d907abc0b3..091c4cca225a5 100644 --- a/decidim-proposals/config/locales/no.yml +++ b/decidim-proposals/config/locales/no.yml @@ -166,7 +166,6 @@ proposal_wizard_step_1_help_text: Forslags veiviseren "Opprett" trinn-hjelpeteksten proposal_wizard_step_2_help_text: Forslags veiviseren "Sammenlign" trinn-hjelpeteksten proposal_wizard_step_3_help_text: Forslags veiviseren "Fullfør " trinn-hjelpeteksten - proposal_wizard_step_4_help_text: Forslags veiviseren "Publiser" trinn-hjelpeteksten resources_permissions_enabled: Handlings tillatelser kan settes for hvert forslag scope_id: Tema scopes_enabled: Aktiverte temaer diff --git a/decidim-proposals/config/locales/pl.yml b/decidim-proposals/config/locales/pl.yml index 8e10889d7add3..6c07b601825cd 100644 --- a/decidim-proposals/config/locales/pl.yml +++ b/decidim-proposals/config/locales/pl.yml @@ -38,12 +38,17 @@ pl: origin_component_id: Komponent z którego kopiuję propozycję proposals_import: import_proposals: Importuj propozycje + keep_answers: Zachowaj stan i odpowiedzi keep_authors: Zachowaj oryginalnych autorów valuation_assignment: admin_log: valuator_role_id: Imię weryfikatora errors: models: + participatory_text: + attributes: + document: + allowed_file_content_types: 'Nieprawidłowy typ dokumentu. Dozwolone są tylko pliki z następującymi rozszerzeniami: %{types}' proposal: attributes: add_documents: @@ -59,9 +64,11 @@ pl: attributes: base: not_official: Nieoficjalne + supported: Otrzymano wsparcie lub poparcie proposals_split: attributes: base: + not_official: Nie są oficjalne supported: Otrzymano wsparcie lub potwierdzenia models: decidim/proposals/accepted_proposal_event: Wniosek został przyjęty @@ -148,6 +155,17 @@ pl: collaborative_drafts_enabled: Zezwalaj na wspólne szkice comments_enabled: Komentarze włączone comments_max_length: Maksymalna długość komentarzy (Pozostaw 0 dla wartości domyślnej) + default_sort_order: Domyślne sortowanie propozycji + default_sort_order_help: Domyślnie oznacza, że jeśli wsparcie jest włączone, propozycje będą wyświetlane w kolejności losowej, a jeśli wsparcie jest zablokowane, zostaną posortowane według najbardziej popieranych. + default_sort_order_options: + default: Domyślne + most_commented: Najczęściej komentowane + most_endorsed: Najbardziej popierane + most_followed: Najczęściej obserwowane + most_voted: Najbardziej wspierane + random: Losowo + recent: Ostatnie + with_more_authors: Z większą liczbą autorów geocoding_enabled: Włączono geokodowanie minimum_votes_per_user: Minimalna liczba wsparć na użytkownika new_proposal_body_template: Szablon treści nowej propozycji @@ -167,7 +185,7 @@ pl: proposal_wizard_step_1_help_text: 'Tekst pomocy Kreatora - krok: "Utwórz"' proposal_wizard_step_2_help_text: 'Tekst pomocy Kreatora - krok: "Porównaj"' proposal_wizard_step_3_help_text: 'Tekst pomocy Kreatora - krok: "Dokończ"' - proposal_wizard_step_4_help_text: 'Tekst pomocy Kreatora - krok: "Publikuj"' + proposal_wizard_step_4_help_text: Tekst pomocy kroku „Opublikuj” kreatora propozycji resources_permissions_enabled: Uprawnienia działań można ustawić dla każdej propozycji scope_id: Zakres scopes_enabled: Zakresy włączone @@ -189,12 +207,16 @@ pl: answers_with_costs: Zezwalaj na koszty w odpowiedziach na propozycje automatic_hashtags: Hashtagi dodane do wszystkich propozycji comments_blocked: Komentarze zablokowane + creation_enabled: Uczestnicy mogą tworzyć propozycje + creation_enabled_readonly: To ustawienie jest wyłączone, gdy aktywujesz funkcjonalność tekstów partycypacyjnych. Aby przesłać propozycje jako tekst partycypacyjny, kliknij przycisk "Tekst partycypacyjny" i postępuj zgodnie z instrukcjami. + default_sort_order: Domyślne sortowanie propozycji default_sort_order_options: most_voted: Najwiecej wsparć endorsements_blocked: Rekomendacje zostały zablokowane endorsements_enabled: Rekomendacje włączone proposal_answering_enabled: Włączono odpowiadanie na propozycję publish_answers_immediately: Natychmiast publikuj odpowiedzi na propozycje + publish_answers_immediately_help_html: 'Pamiętaj, że jeśli odpowiesz na dowolną propozycję bez włączonej tej opcji, musisz ją opublikować ręcznie, wybierając ją i korzystając z akcji do publikacji. Aby uzyskać więcej informacji na temat tego, jak to działa, zobacz stronę z dokumentacją odpowiedzi na propozycje.' suggested_hashtags: Hashtagi sugerowane użytkownikom dodającym nowe propozycje votes_blocked: Wspieranie zablokowane votes_enabled: Wspieranie włączone @@ -271,6 +293,8 @@ pl: email_intro: Propozycja "%{resource_title}" została dodana do przestrzeni "%{participatory_space_title}", którą obserwujesz. email_outro: Otrzymałeś to powiadomienie, ponieważ obserwujesz "%{participatory_space_title}". Aby przestać otrzymywać powiadomienia kliknij w powyższy link, a następnie na stronie kliknij w przycisk obserwowania. email_subject: Nowa propozycja "%{resource_title}" została dodana do %{participatory_space_title} + notification_title: Propozycja %{resource_title} została dodana do %{participatory_space_title} przez %{author} + notification_title_official: Oficjalna propozycja %{resource_title} została dodana do %{participatory_space_title} proposal_rejected: affected_user: email_intro: 'Twoja propozycja "%{resource_title}" została odrzucona. Możesz przeczytać odpowiedź na tej stronie:' @@ -394,6 +418,7 @@ pl: many: odpowiedzi na propozycję other: odpowiedzi na propozycję title: + answers: Importuj odpowiedzi do propozycji proposals: Importuj propozycje models: proposal: @@ -751,10 +776,15 @@ pl: few: "%{count} propozycji" many: "%{count} propozycji" other: "%{count} propozycji" + dynamic_map_instructions: + description: Współrzędne zostaną zaktualizowane po kliknięciu przycisku 'podgląd'. Jednakże adres nie ulegnie zmianie. + instructions: Możesz przenieść punkt na mapie. edit: + add_documents: Dodaj dokumenty add_image: Dodaj obraz attachment_legend: "(Opcjonalnie) Dodaj załącznik" back: Wróć + edit_documents: Edytuj dokumenty edit_image: Edytuj obraz gallery_legend: "(Opcjonalnie) Dodaj obraz do karty propozycji" select_a_category: Wybierz kategorię @@ -784,9 +814,12 @@ pl: filter_by: Filtruj według unfold: Rozwiń index: + click_here: Zobacz wszystkie propozycje collaborative_drafts_list: Wspólne szkice new_proposal: Nowa propozycja + see_all: Zobacz wszystkie propozycje see_all_withdrawn: Zobacz wszystkie wycofane propozycje + text_banner: Oglądasz listę propozycji wycofanych przez ich autorów. %{go_back_link}. view_proposal: Zobacz propozycję linked_proposals: proposal_votes: @@ -796,6 +829,7 @@ pl: other: wsparcia new: send: Dalej + title: Utwórz swoją propozycję orders: label: 'Sortuj propozycje według:' most_commented: Najczęściej komentowane @@ -806,6 +840,8 @@ pl: recent: Najnowsze with_more_authors: Z większą liczbą autorów participatory_texts: + index: + document_index: Indeks dokumentu view_index: see_index: Zobacz indeks placeholder: @@ -944,3 +980,4 @@ pl: statistics: proposals_accepted: Przyjęte propozycje proposals_count: Propozycje + supports_count: Głosy poparcia diff --git a/decidim-proposals/config/locales/pt-BR.yml b/decidim-proposals/config/locales/pt-BR.yml index d5fed22024ab3..8379f2d808e07 100644 --- a/decidim-proposals/config/locales/pt-BR.yml +++ b/decidim-proposals/config/locales/pt-BR.yml @@ -156,7 +156,6 @@ pt-BR: proposal_wizard_step_1_help_text: Assistente de propostas "Criar" passo ajuda texto proposal_wizard_step_2_help_text: Assistente de proposta "Comparar" passo ajuda texto proposal_wizard_step_3_help_text: Texto de ajuda da etapa "Completa" do assistente de proposta - proposal_wizard_step_4_help_text: Assistente de propostas "Publicar" passo ajuda texto resources_permissions_enabled: Permissões de ações podem ser definidas para cada proposta scope_id: Escopo scopes_enabled: Escopos habilitados diff --git a/decidim-proposals/config/locales/pt.yml b/decidim-proposals/config/locales/pt.yml index 57c86f7c206ee..ab4cf2b770fd3 100644 --- a/decidim-proposals/config/locales/pt.yml +++ b/decidim-proposals/config/locales/pt.yml @@ -171,7 +171,6 @@ pt: proposal_wizard_step_1_help_text: Texto de ajuda do passo "Criar" do Assistente de Propostas proposal_wizard_step_2_help_text: Texto de ajuda do passo "Comparar" do Assistente de Propostas proposal_wizard_step_3_help_text: Texto de ajuda do passo "Concluir" do Assistente de Propostas - proposal_wizard_step_4_help_text: Texto de ajuda do passo "Publicar" do Assistente de Propostas resources_permissions_enabled: As permissões de ações podem ser definidas para cada proposta scope_id: Âmbito scopes_enabled: Âmbitos activados diff --git a/decidim-proposals/config/locales/ru.yml b/decidim-proposals/config/locales/ru.yml index 8701bcb991905..d1b6e981b6f30 100644 --- a/decidim-proposals/config/locales/ru.yml +++ b/decidim-proposals/config/locales/ru.yml @@ -83,7 +83,6 @@ ru: proposal_wizard_step_1_help_text: Справка мастера предложений о шаге "Создать" proposal_wizard_step_2_help_text: Справка мастера предложений о шаге "Сравнить" proposal_wizard_step_3_help_text: Справка мастера предложений о шаге "Завершить" - proposal_wizard_step_4_help_text: Справка мастера предложений о шаге "Обнародовать" resources_permissions_enabled: Для каждого предложения можно задать те или иные разрешения на действия threshold_per_proposal: Порог для каждого предложения vote_limit: Предельное количество голосов для одного участника @@ -271,7 +270,6 @@ ru: no_similars_found: Хорошая работа! Подобных предложений не найдено title: Похожие предложения complete: - send: Отправить title: Завершите свое предложение edit: attachment_legend: "(Необязательно) Добавить вложение" diff --git a/decidim-proposals/config/locales/sk.yml b/decidim-proposals/config/locales/sk.yml index e024423eddc52..865f47da337b9 100644 --- a/decidim-proposals/config/locales/sk.yml +++ b/decidim-proposals/config/locales/sk.yml @@ -130,7 +130,6 @@ sk: proposal_wizard_step_1_help_text: Pomocný text Sprievodcu "Vytvoriť" návrh proposal_wizard_step_2_help_text: Pomocný text Sprievodcu "Porovnať" návrhu proposal_wizard_step_3_help_text: Pomocný text Sprievodcu "Dokončiť" návrh - proposal_wizard_step_4_help_text: Pomocný text Sprievodcu "Publikovať" návrh resources_permissions_enabled: Pre každý návrh možno nastaviť povolenia akcie threshold_per_proposal: Maximálny limit na návrh vote_limit: Počet hlasov na užívateľa diff --git a/decidim-proposals/config/locales/sv.yml b/decidim-proposals/config/locales/sv.yml index 30a8e75da7a4b..448ebdc5438da 100644 --- a/decidim-proposals/config/locales/sv.yml +++ b/decidim-proposals/config/locales/sv.yml @@ -171,7 +171,6 @@ sv: proposal_wizard_step_1_help_text: Hjälptext till steget "Skapa" i förslagsguiden proposal_wizard_step_2_help_text: Hjälptext till steget "Jämför" i förslagsguiden proposal_wizard_step_3_help_text: Hjälptext till steget "Komplettera" i förslagsguiden - proposal_wizard_step_4_help_text: Förslagsguidens hjälptext för steg "Publicera" resources_permissions_enabled: Åtgärdsbehörigheter kan ställas in för varje förslag scope_id: Omfång scopes_enabled: Omfång aktiverade diff --git a/decidim-proposals/config/locales/tr-TR.yml b/decidim-proposals/config/locales/tr-TR.yml index d7df8b6d4eeaa..fac609ae32a2c 100644 --- a/decidim-proposals/config/locales/tr-TR.yml +++ b/decidim-proposals/config/locales/tr-TR.yml @@ -143,7 +143,6 @@ tr: proposal_wizard_step_1_help_text: Teklif sihirbazı "Oluştur" adımı yardım metni proposal_wizard_step_2_help_text: Teklif sihirbazı "Karşılaştır" adımı yardım metni proposal_wizard_step_3_help_text: Teklif sihirbazı "Tamamlandı" adımı yardım metni - proposal_wizard_step_4_help_text: Teklif sihirbazı "Yayınla" adımı yardım metni resources_permissions_enabled: Her teklif için işlem izinleri ayarlanabilir scope_id: Kapsam scopes_enabled: Kapsamlar etkinleştirildi @@ -818,7 +817,7 @@ tr: wizard_aside: back: Geri back_from_step_1: Teklifte geri dön - back_from_step_2: Tekliflere geri dön + back_from_step_2: Teklifte geri dön back_from_step_3: Teklifleri karşılaştırmaya geri dön back_from_step_4: Taslağı düzenlemeye dön info: teklif. diff --git a/decidim-proposals/config/locales/uk.yml b/decidim-proposals/config/locales/uk.yml index 17891a12c8d09..5c902a31d0367 100644 --- a/decidim-proposals/config/locales/uk.yml +++ b/decidim-proposals/config/locales/uk.yml @@ -83,7 +83,6 @@ uk: proposal_wizard_step_1_help_text: Довідка майстра пропозицій щодо кроку "Створити" proposal_wizard_step_2_help_text: Довідка майстра пропозицій щодо кроку "Порівняти" proposal_wizard_step_3_help_text: Довідка майстра пропозицій щодо кроку "Завершити" - proposal_wizard_step_4_help_text: Довідка майстра пропозицій щодо кроку "Оприлюднити" resources_permissions_enabled: Для кожної пропозиції можна встановити ті чи інші дозволи на дії threshold_per_proposal: Поріг на кожну пропозицію vote_limit: Гранична кількість голосів від одного учасника @@ -271,7 +270,6 @@ uk: no_similars_found: Гарна робота! Не знайдено схожий пропозицій title: Подібні пропозиції complete: - send: Надіслати title: Завершіть свою пропозицію edit: attachment_legend: "(Необов'язково) Додати вкладений файл" diff --git a/decidim-proposals/config/locales/zh-CN.yml b/decidim-proposals/config/locales/zh-CN.yml index 39c125b08106b..1105e7d9e4c2c 100644 --- a/decidim-proposals/config/locales/zh-CN.yml +++ b/decidim-proposals/config/locales/zh-CN.yml @@ -136,7 +136,6 @@ zh-CN: proposal_wizard_step_1_help_text: 建议向导“创建”步骤帮助文本 proposal_wizard_step_2_help_text: 建议向导“Compare”步骤帮助文本 proposal_wizard_step_3_help_text: 建议向导“完成”步骤帮助文本 - proposal_wizard_step_4_help_text: 建议向导"发布"步骤帮助文本 resources_permissions_enabled: 每个提案都可以设置动作权限 scope_id: 范围 scopes_enabled: 范围已启用 diff --git a/decidim-proposals/config/locales/zh-TW.yml b/decidim-proposals/config/locales/zh-TW.yml index 7ea2b862ef8b5..e96d58b33dec8 100644 --- a/decidim-proposals/config/locales/zh-TW.yml +++ b/decidim-proposals/config/locales/zh-TW.yml @@ -171,7 +171,6 @@ zh-TW: proposal_wizard_step_1_help_text: 提案向導「創建」步驟說明文字 proposal_wizard_step_2_help_text: 提案向導「比較」步驟說明文字 proposal_wizard_step_3_help_text: 提案向導「完成」步驟說明文字 - proposal_wizard_step_4_help_text: 提案向導「發佈」步驟說明文字 resources_permissions_enabled: 每個提案都可以設定行動權限 scope_id: 範圍 scopes_enabled: 啟用範圍 diff --git a/decidim-sortitions/config/locales/bg.yml b/decidim-sortitions/config/locales/bg.yml index 6e47c5e15b511..ef7ef0a7a7edd 100644 --- a/decidim-sortitions/config/locales/bg.yml +++ b/decidim-sortitions/config/locales/bg.yml @@ -3,42 +3,149 @@ bg: activemodel: attributes: sortition: - additional_info: Сортиране на информация + additional_info: Информация за сортировката decidim_category_id: Категории от набора от предложения, в които искате да приложите жребий decidim_proposals_component_id: Предложенията са зададени + dice: Резултат от хвърлянето на зара. Хвърлете 6-странен зар или потърсете друг произволен начин за генериране на число от 1 до 6 и въведете тук полученото число пред няколко свидетели. Това допринася за качеството и гаранции за случайността на резултата + target_items: Брой на предложенията, които да бъдат избрани (указва броя на предложенията, които искате да бъдат избрани чрез хвърляне на жребий от групата предложения, които сте избрали по-рано) + title: Заглавие + witnesses: Свидетели + models: + decidim/sortitions/create_sortition_event: Сортиране + activerecord: + models: + decidim/sortitions/sortition: + one: Сортиране + other: Сортирания decidim: + components: + sortitions: + actions: + comment: Коментар + name: Сортирания + settings: + global: + comments_enabled: Коментарите са разрешени + comments_max_length: Максимална дължина на коментарите (Оставете 0 за стойност по подразбиране) + events: + sortitions: + sortition_created: + email_intro: Сортировката „%{resource_title}“ беше добавена към пространството за участие „%{participatory_space_title}“, което следвате. + email_outro: Получавате това известие, защото следвате "%{participatory_space_title}". Може да премахнете следването чрез предходния линк. + email_subject: Беше добавена нова сортировка в(ъв) %{participatory_space_title} + notification_title: Сортировката %{resource_title} беше добавена в(ъв) %{participatory_space_title} sortitions: admin: + actions: + destroy: Отмяна на сортировката + edit: Редактирай + new: Нова сортировка + show: Детайли за сортировката + models: + sortition: + fields: + category: Категория + created_at: Дата на създаване + decidim_proposals_component: Компонент Предложения + dice: Зар + reference: Препоръка + request_timestamp: Време за теглене на жребий + seed: Seed + target_items: Елементи за селектиране + title: Заглавие + name: + one: Сортиране + other: Сортирания sortitions: + confirm_destroy: + confirm_destroy: Наистина ли искате да отмените тази сортировка? + destroy: Отмяна на сортировка + title: Отменяне на сортировката create: + error: Възникна проблем при създаването на нова сортировка. success: Жребият беше създаден успешно destroy: error: Жребият не може да се отмени. success: Жребият беше отменен успешно + edit: + title: Актуализирайте информацията за сортировката + update: Актуализация form: + all_categories: Всички категории + select_proposal_component: Изберете набора от предложения title: Нов жребий за предложения + index: + title: Сортировки new: confirm: Когато натиснете бутона „Напред“, системата ще запише датата и часа (с точност до секунди) и заедно с хвърлянето на зара тази информация ще се използва за генериране на избор на случаен принцип. Действието няма да може да бъде отменено — когато щракнете върху бутона, резултатът от жребия ще бъде публикуван заедно с въведените в този формуляр данни и няма да подлежи на промяна. Моля, прегледайте съдържанието внимателно + create: Създаване + title: Нова сортировка + show: + selected_proposals: Избрани предложения за жребия update: + error: Възникна проблем при актуализирането на сортировката. success: Жребият беше актуализиран успешно + admin_log: + sortition: + create: "%{user_name} създаде сортировка %{resource_name} в пространството %{space_name}" + delete: "%{user_name} отмени сортировката %{resource_name} в пространството %{space_name}" + update: "%{user_name} актуализира сортировката %{resource_name} в пространството %{space_name}" sortitions: + count: + proposals_count: + one: 1 предложение + other: "%{count} предложения" filters: + active: Активно + all: Всички + cancelled: Отменено + category: Категория category_prompt: Изберете категория search: Търсене + state: Статус filters_small_view: close_modal: Затвори прозореца filter: Филтър filter_by: Филтрирай по unfold: Разгъване + linked_sortitions: + selected_proposals: Избрани предложения + orders: + label: 'Подреждане на сортировките по:' + random: Случаен + recent: Скорошни results_count: count: one: избрано предложение other: избрани предложения show: + algorithm: Код на алгоритъма за жребия в сортировката + any_category: от всички категории back: Назад към списъка + cancelled: Отменена сортировка + candidate_proposal_ids: Ред и ID номерата на предложенията в сортировката + candidate_proposals_info: 'Сортирането беше извършено сред следните предложения (%{category_label}), със следните идентификатори (с удебелен шрифт избраните предложения) ' + category: от категорията %{category} dice_result: "(1) Резултат от жребия" + introduction: 'Тази страница съдържа резултатите от сортирането %{reference}. Чрез това сортиране, %{target_items} брой резултати са избрани на случаен принцип и с равно вероятностно разпределение от набора от предложения, показани по-долу. Заедно с резултатите, информацията, показана на тази страница, предоставя цялата информация, необходима за максимизиране на гаранциите и за възпроизвеждане на резултатите. Ключът към качеството на това сортиране е двойната случайност, осигурена от хвърлянето на зарове (потвърдено от свидетели) и точното време на сортирането, което осигурява вход за алгоритъм, който генерира случаен избор. Времето за начало за сортирането е толкова точно (секунди), че е невъзможно да се контролира от хора, като по този начин се осигурява двоен „неконтролируем“ вход, за да се гарантира справедлив резултат. ' mathematical_result: Резултат (1) x (2) + proposals_selected_by_sortition: Избрани чрез (жребий) сортировка предложения sortition_reproducibility_details: Подробности за възпроизвеждане на жребия time_seed: "(2) Време за зареждане" + witnesses: Свидетели sortition: + random_seed: Случаен подбор + selected_proposals: + one: избрано предложение + other: избрани предложения view: Изглед + sortition_author: + deleted: Изтрит участник + sortition_cancel_author: + deleted: Изтрит участник + sortitions_count: + count: + one: 1 сортировка + other: "%{count} сортировки" + statistics: + sortitions_count: Сортировки diff --git a/decidim-sortitions/config/locales/pl.yml b/decidim-sortitions/config/locales/pl.yml index 463636ccafbd5..fad5b0f93dd29 100644 --- a/decidim-sortitions/config/locales/pl.yml +++ b/decidim-sortitions/config/locales/pl.yml @@ -22,6 +22,8 @@ pl: decidim: components: sortitions: + actions: + comment: Skomentuj name: Wybory losowe settings: global: @@ -157,3 +159,5 @@ pl: few: "%{count} wyborów losowych" many: "%{count} wybory losowe" other: "%{count} wybory losowe" + statistics: + sortitions_count: Wybory przez losowanie diff --git a/decidim-surveys/config/locales/bg.yml b/decidim-surveys/config/locales/bg.yml index 3c3cb5103fc14..8d786cc66cc8f 100644 --- a/decidim-surveys/config/locales/bg.yml +++ b/decidim-surveys/config/locales/bg.yml @@ -2,17 +2,71 @@ bg: activemodel: models: - decidim/surveys/closed_survey_event: Анкетата завърши + decidim/surveys/closed_survey_event: Анкетата приключи decidim/surveys/opened_survey_event: Анкетата започна activerecord: models: decidim/surveys/survey: one: Анкета other: Анкети + decidim/surveys/survey_answer: + one: Отговор + other: Отговори decidim: + components: + surveys: + actions: + answer: Отговор + name: Анкета + settings: + global: + announcement: Съобщение + clean_after_publish: Изтриване на отговорите при публикуване на проучването + ends_at: Отговорите се приемат до + ends_at_help: Оставете празно при липса на конкретна дата + scope_id: Обхват + scopes_enabled: Обхватите са активирани + starts_at: Отговорите се приемат от + starts_at_help: Оставете празно при липса на конкретна дата + step: + allow_answers: Разрешаване на отговори + allow_unregistered: Разрешаване на нерегистрирани потребители да отговарят на въпросите в проучването + allow_unregistered_help: Ако е активно, няма да се изисква влизане, за да се отговори на анкетата. Това може да доведе до лоши или ненадеждни данни и ще e по-уязвимo на автоматизирани атаки. Използвайте с повишено внимание! Имайте предвид, че участник може да отговори на едно и също проучване няколко пъти, като използва различни браузъри или функцията за „частно сърфиране“ на своя уеб браузър. + announcement: Съобщение + events: + surveys: + survey_closed: + email_intro: Анкетата %{resource_title} в(ъв) %{participatory_space_title} беше затворена. + email_outro: Получавате това известие, защото следвате %{participatory_space_title}. Може да прекратите известията чрез предходния линк. + email_subject: Приключи анкетата в(ъв) %{participatory_space_title} + notification_title: Анкетата %{resource_title} в(ъв) %{participatory_space_title} приключи. + survey_opened: + email_intro: 'Анкетата %{resource_title} в(ъв) %{participatory_space_title} вече е отворена. Можете да участвате в нея от тази страница:' + email_outro: Получавате това известие, защото следвате %{participatory_space_title}. Може да прекратите известията чрез предходния линк. + email_subject: Нова анкета в(ъв) %{participatory_space_title} + notification_title: Анкетата %{resource_title} в(ъв) %{participatory_space_title} вече е отворена. + metrics: + survey_answers: + description: Брой на анкетите с отговори от участници + object: отговори на анкети + title: Отговори на анкети + statistics: + answers_count: Отговори surveys: + admin: + component: + actions: + answers_alert: Ако публикувате компонента, всички резултати ще бъдат премахнати. + exports: + survey_user_answers: Отговори на участник в анкети + surveys: + update: + invalid: Възникна проблем при запазването на анкетата. + success: Анкетата беше запазена успешно. last_activity: new_survey_at_html: "Ново допитване на %{link}" surveys: answer: + invalid: Възникна проблем при попълването на отговорите на анкетата. spam_detected: Възникна проблем при попълването на отговорите във формуляра. Навярно сте били твърде бързи, бихте ли опитали отново? + success: Отговорите на анкетата са попълнени успешно. diff --git a/decidim-system/config/locales/bg.yml b/decidim-system/config/locales/bg.yml index 9653cbf3c59e2..38d510adeebcc 100644 --- a/decidim-system/config/locales/bg.yml +++ b/decidim-system/config/locales/bg.yml @@ -182,6 +182,12 @@ bg: app_secret: Тайна на приложението google_oauth2: client_id: ID на клиента + client_secret: Тайна на клиента + icon: Икона + icon_path: Път до иконата + twitter: + api_key: API ключ + api_secret: Тайна на API smtp_settings: fieldsets: sender: Подател diff --git a/decidim-system/config/locales/pl.yml b/decidim-system/config/locales/pl.yml index e08ab9714db87..643089da18840 100644 --- a/decidim-system/config/locales/pl.yml +++ b/decidim-system/config/locales/pl.yml @@ -56,14 +56,31 @@ pl: create: Utwórz title: Nowy administrator show: + destroy: Zniszcz edit: Edytuj update: error: Podczas aktualizowania tego administratora wystąpił błąd. success: Administrator został zaktualizowany + dashboard: + show: + current_organizations: Bieżące organizacje default_pages: placeholders: content: Proszę dodać istotne treści do strony statycznej %{page} w panelu administratora. title: Domyślny tytuł dla %{page} + devise: + passwords: + edit: + change_your_password: Zmień swoje hasło + minimum_characters: "(Minimum %{minimum} znaków)" + new: + forgot_your_password: Zapomniałeś hasła + send_me_reset_password_instructions: Wyślij mi instrukcje resetowania hasła + shared: + links: + did_not_receive_confirmation_instructions?: Nie otrzymałeś(aś) instrukcji potwierdzenia? + did_not_receive_unlock_instructions?: Nie dotarła instrukcja odblokowania? + forgot_your_password?: Nie pamiętasz hasła? menu: admins: Administratorzy dashboard: Panel diff --git a/decidim-templates/config/locales/pl.yml b/decidim-templates/config/locales/pl.yml index f154b3042b1ab..1e81d8e6ea1a1 100644 --- a/decidim-templates/config/locales/pl.yml +++ b/decidim-templates/config/locales/pl.yml @@ -1,5 +1,12 @@ --- pl: + activemodel: + attributes: + questionnaire: + title: Tytuł + template: + description: Opis + name: Nazwa decidim: admin: menu: diff --git a/decidim-verifications/config/locales/pl.yml b/decidim-verifications/config/locales/pl.yml index 311549bcdbb12..18e4275bda73a 100644 --- a/decidim-verifications/config/locales/pl.yml +++ b/decidim-verifications/config/locales/pl.yml @@ -76,6 +76,13 @@ pl: postal_letter: explanation: Wyślemy Ci list pocztowy z kodem, który musisz wprowadzić, abyśmy mogli zweryfikować twój adres name: Kod listem pocztowym + events: + verifications: + verify_with_managed_user: + email_intro: Uczestnik %{resource_title} próbował zweryfikować siebie z danymi innego uczestnika (%{managed_user_name}). + email_outro: Sprawdź listę konfliktów weryfikacji i skontaktuj się z uczestnikiem, aby zweryfikować jego dane i rozwiązać problem. + email_subject: Nieudana próba weryfikacji względem innego uczestnika + notification_title: Uczestnik %{resource_title} próbował zweryfikować siebie z danymi innego uczestnika (%{managed_user_name}). verifications: authorizations: authorization_metadata: @@ -210,6 +217,9 @@ pl: new: send: Poproś o weryfikację title: Prześlij swój dokument tożsamości + update: + error: Podczas ponownego ładowania dokumentu wystąpił błąd. + success: Ponowne przesyłanie dokumentu się powiodło. identification_number: Numer identyfikacyjny passport: Paszport postal_letter: From 8af2c826a38c6515223b7e5cfcc9e16b9231489a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20Pereira=20de=20Lucena?= Date: Mon, 3 Jun 2024 11:23:45 +0200 Subject: [PATCH 59/88] Fix organization multitenant issue with meeting's reminders (#12927) Co-authored-by: Alexandru Emil Lupu --- .../close_meeting_reminder_generator.rb | 16 ++++--- .../close_meeting_reminder_generator_spec.rb | 44 +++++++++++++++++-- 2 files changed, 52 insertions(+), 8 deletions(-) diff --git a/decidim-meetings/app/services/decidim/meetings/close_meeting_reminder_generator.rb b/decidim-meetings/app/services/decidim/meetings/close_meeting_reminder_generator.rb index 7a1224084e687..7a470d470eab0 100644 --- a/decidim-meetings/app/services/decidim/meetings/close_meeting_reminder_generator.rb +++ b/decidim-meetings/app/services/decidim/meetings/close_meeting_reminder_generator.rb @@ -38,11 +38,9 @@ def finder_query(component_id, interval) def send_reminders(component) intervals = Array(reminder_manifest.settings.attributes[:reminder_times].default) - space_admins = Decidim::ParticipatoryProcessUserRole.where(decidim_participatory_process_id: component.participatory_space_id, role: "admin").collect(&:user) - space_admins = (global_admins + space_admins).uniq intervals.each do |interval| finder_query(component.id, interval).find_each do |meeting| - authors = meeting.official? ? space_admins : [meeting.author] + authors = meeting.official? ? space_admins(component) : [meeting.author] authors.each do |author| send_notif = author.notification_settings.fetch("close_meeting_reminder", "1") next unless send_notif == "1" @@ -60,8 +58,16 @@ def send_reminders(component) end end - def global_admins - @global_admins ||= Decidim::User.where(admin: true).all + def space_admins(component) + @space_admins ||= begin + space_admins = if component.participatory_space.respond_to?(:user_roles) + component.participatory_space.user_roles(:admin).collect(&:user) + else + [] + end + global_admins = component.organization.admins + (global_admins + space_admins).uniq + end end end end diff --git a/decidim-meetings/spec/services/decidim/meetings/close_meeting_reminder_generator_spec.rb b/decidim-meetings/spec/services/decidim/meetings/close_meeting_reminder_generator_spec.rb index e8dfa9f4eee80..a28d3e2c6345f 100644 --- a/decidim-meetings/spec/services/decidim/meetings/close_meeting_reminder_generator_spec.rb +++ b/decidim-meetings/spec/services/decidim/meetings/close_meeting_reminder_generator_spec.rb @@ -17,10 +17,11 @@ module Decidim::Meetings end let(:intervals) { [3.days, 7.days] } let(:organization) { create(:organization) } - let(:participatory_process) { create(:participatory_process, organization: organization) } - let!(:component) { create(:component, :published, manifest_name: "meetings", participatory_space: participatory_process) } + let(:participatory_space) { create(:participatory_process, organization: organization) } + let!(:component) { create(:component, :published, manifest_name: "meetings", participatory_space: participatory_space) } let(:user) { create(:user, :admin, organization: organization, email: "user@example.org") } let!(:meeting) { create(:meeting, :published, component: component, author: user, start_time: start_time, end_time: end_time, closed_at: closed_at) } + let(:closed_at) { nil } before do @@ -42,12 +43,49 @@ module Decidim::Meetings end end - context "and the meeting is not closed" do + context "and the user meeting is not closed" do + it "sends reminder" do + expect(Decidim::Meetings::SendCloseMeetingReminderJob).to receive(:perform_later) + + expect { subject.generate }.to change(Decidim::Reminder, :count).by(1) + end + end + + context "and the official meeting is not closed" do + let(:other_organization) { create(:organization) } + let!(:user) { create(:user, :admin, organization: organization, email: "user@example.org") } + let!(:other_admin) { create(:user, :admin, organization: other_organization, email: "user@example.org") } + let!(:meeting) { create(:meeting, :published, :official, component: component, start_time: start_time, end_time: end_time, closed_at: closed_at) } + it "sends reminder" do expect(Decidim::Meetings::SendCloseMeetingReminderJob).to receive(:perform_later) expect { subject.generate }.to change(Decidim::Reminder, :count).by(1) end + + context "and there are space admins" do + context "and space admin is Participatory Process" do + let(:participatory_space) { create(:participatory_process, organization: organization) } + let!(:process_admin) { create(:process_admin, participatory_process: participatory_space) } + + it "sends reminder" do + expect(Decidim::Meetings::SendCloseMeetingReminderJob).to receive(:perform_later).twice + + expect { subject.generate }.to change(Decidim::Reminder, :count).by(2) + end + end + + context "and space admin is Assembly" do + let(:participatory_space) { create(:assembly, organization: organization) } + let!(:process_admin) { create(:assembly_admin, assembly: participatory_space) } + + it "sends reminder" do + expect(Decidim::Meetings::SendCloseMeetingReminderJob).to receive(:perform_later).twice + + expect { subject.generate }.to change(Decidim::Reminder, :count).by(2) + end + end + end end end From 1800a8fe5c61072368aa01b000a83b97bfbbe106 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20Pereira=20de=20Lucena?= Date: Fri, 7 Jun 2024 16:16:49 +0200 Subject: [PATCH 60/88] Backport 'Fix impersonnating users' to v0.27 (#12972) * Fix impersonnating users * test(admin): adding test for impersonating with existing user in other org * feat(admin): allowing impersonations when existing user in other org * Fix ruby syntax for this version --------- Co-authored-by: derayo94 <163147956+derayo94@users.noreply.github.com> --- .../admin/impersonations_controller.rb | 1 + .../impersonations_controller_spec.rb | 87 +++++++++++++++++++ 2 files changed, 88 insertions(+) diff --git a/decidim-admin/app/controllers/decidim/admin/impersonations_controller.rb b/decidim-admin/app/controllers/decidim/admin/impersonations_controller.rb index edb9948ea5dda..c05d7cd262d7d 100644 --- a/decidim-admin/app/controllers/decidim/admin/impersonations_controller.rb +++ b/decidim-admin/app/controllers/decidim/admin/impersonations_controller.rb @@ -82,6 +82,7 @@ def existing_managed_user return nil unless handler.unique_id existing_authorization = Authorization.find_by( + user: User.where(organization: current_organization), name: handler_name, unique_id: handler.unique_id ) diff --git a/decidim-admin/spec/controllers/impersonations_controller_spec.rb b/decidim-admin/spec/controllers/impersonations_controller_spec.rb index 32c195c84ac66..259d7ba8051ab 100644 --- a/decidim-admin/spec/controllers/impersonations_controller_spec.rb +++ b/decidim-admin/spec/controllers/impersonations_controller_spec.rb @@ -158,6 +158,46 @@ module Admin end end + context "with existing managed user with the same identity in another organization" do + let(:other_organization) do + create( + :organization, + available_authorizations: ["dummy_authorization_handler"] + ) + end + + before do + user = create( + :user, + :managed, + organization: other_organization, + name: managed_user_name + ) + Decidim::Authorization.create!( + user: user, + name: authorization_params[:handler_name], + unique_id: authorization_params[:document_number], + metadata: { + document_number: "9999X", + postal_code: "99999" + } + ) + end + + it_behaves_like "successful authorization" + + it "creates a new managed user" do + post(:create, params: params) + + expect( + Decidim::User.where( + name: managed_user_name, + managed: true + ).count + ).to eq(2) + end + end + context "with existing non-managed user with the same identity" do before do user = create( @@ -190,6 +230,53 @@ module Admin expect(subject).to render_template(:new) end end + + context "with existing non-managed user with the same identity in another organization" do + let(:other_organization) do + create( + :organization, + available_authorizations: ["dummy_authorization_handler"] + ) + end + + before do + user = create( + :user, + organization: other_organization, + name: managed_user_name + ) + Decidim::Authorization.create!( + user: user, + name: authorization_params[:handler_name], + unique_id: authorization_params[:document_number], + metadata: { + document_number: authorization_params[:document_number], + postal_code: "99999" + } + ) + end + + it_behaves_like "successful authorization" + + it "creates a new managed user" do + post(:create, params: params) + + expect( + Decidim::User.where( + organization: organization, + name: managed_user_name, + managed: true + ).count + ).to eq(1) + + expect( + Decidim::User.where( + organization: other_organization, + name: managed_user_name + ).count + ).to eq(1) + end + end end end end From 8446659cdf1e27725a257989a99876a24000bb14 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20Pereira=20de=20Lucena?= Date: Fri, 7 Jun 2024 16:23:50 +0200 Subject: [PATCH 61/88] Add organization or application name in emails' From header (#12970) * Fix "From" header in emails sent by the application - Add organization name in emails' from in core and admin modules - Add application name in emails' from in system module * Change gotham.gov to example.org in specs * Remove unecessary ApplicationMailer for admin module * Improve how we generate the mail from While reviewing, it was found that if the from was defined in the System settings, then the From header wasn't set correctly. To prevent this bug we set-up the from only once in the after_action, and make some checks if we should actually redefine this From or not. * Remove unecessary ApplicationMailer for system module * Remove unecessary parameter and rename methods * Fix bug when there's defined a name in the mailer_sender config_accessor * Make the organization an attr_reader * Fix rubocop offenses * Fix spec --------- Co-authored-by: Alexandru Emil Lupu --- .../decidim/admin/application_mailer.rb | 12 ---- .../app/mailers/decidim/application_mailer.rb | 46 +++++++++++++-- .../spec/mailers/application_mailer_spec.rb | 56 +++++++++++++++++-- .../decidim/system/application_mailer.rb | 12 ---- decidim-system/config/locales/en.yml | 2 +- .../system/register_organization_spec.rb | 34 +++++------ .../system/update_organization_spec.rb | 20 +++---- .../system/update_organization_form_spec.rb | 14 ++--- 8 files changed, 125 insertions(+), 71 deletions(-) delete mode 100644 decidim-admin/app/mailers/decidim/admin/application_mailer.rb delete mode 100644 decidim-system/app/mailers/decidim/system/application_mailer.rb diff --git a/decidim-admin/app/mailers/decidim/admin/application_mailer.rb b/decidim-admin/app/mailers/decidim/admin/application_mailer.rb deleted file mode 100644 index 0d1127bd9ccf8..0000000000000 --- a/decidim-admin/app/mailers/decidim/admin/application_mailer.rb +++ /dev/null @@ -1,12 +0,0 @@ -# frozen_string_literal: true - -module Decidim - module Admin - # Custom application mailer, scoped to the admin mailer. - # - class ApplicationMailer < ActionMailer::Base - default from: Decidim.config.mailer_sender - layout "mailer" - end - end -end diff --git a/decidim-core/app/mailers/decidim/application_mailer.rb b/decidim-core/app/mailers/decidim/application_mailer.rb index 253ab2173c9b3..f334811eec2a3 100644 --- a/decidim-core/app/mailers/decidim/application_mailer.rb +++ b/decidim-core/app/mailers/decidim/application_mailer.rb @@ -7,23 +7,57 @@ class ApplicationMailer < ActionMailer::Base include LocalisedMailer include MultitenantAssetHost after_action :set_smtp + after_action :set_from default from: Decidim.config.mailer_sender layout "decidim/mailer" private + attr_reader :organization + def set_smtp - return if @organization.nil? || @organization.smtp_settings.blank? + return if organization.nil? || organization.smtp_settings.blank? - mail.from = @organization.smtp_settings["from"].presence || mail.from mail.reply_to = mail.reply_to || Decidim.config.mailer_reply mail.delivery_method.settings.merge!( - address: @organization.smtp_settings["address"], - port: @organization.smtp_settings["port"], - user_name: @organization.smtp_settings["user_name"], - password: Decidim::AttributeEncryptor.decrypt(@organization.smtp_settings["encrypted_password"]) + address: organization.smtp_settings["address"], + port: organization.smtp_settings["port"], + user_name: organization.smtp_settings["user_name"], + password: Decidim::AttributeEncryptor.decrypt(organization.smtp_settings["encrypted_password"]) ) { |_k, o, v| v.presence || o }.compact_blank! end + + def set_from + return if organization.nil? + return if already_defined_name_in_mail?(mail.from.first) + + mail.from = sender + end + + def sender + return Decidim.config.mailer_sender if return_mailer_sender? + return default_sender if organization.smtp_settings.blank? + return default_sender if organization.smtp_settings["from"].nil? + return default_sender if organization.smtp_settings["from"].empty? + + smtp_settings_from = organization.smtp_settings["from"] + return smtp_settings_from if already_defined_name_in_mail?(smtp_settings_from) + + email_address_with_name(smtp_settings_from, organization.name) + end + + def default_sender + email_address_with_name(Decidim.config.mailer_sender, organization.name) + end + + def already_defined_name_in_mail?(mail_address) + # if there is an space, there is already a name in the address + mail_address.match?(/ /) + end + + def return_mailer_sender? + already_defined_name_in_mail?(Decidim.config.mailer_sender) && organization.smtp_settings.present? + end end end diff --git a/decidim-core/spec/mailers/application_mailer_spec.rb b/decidim-core/spec/mailers/application_mailer_spec.rb index 10159c55e89fa..aa05b058c757b 100644 --- a/decidim-core/spec/mailers/application_mailer_spec.rb +++ b/decidim-core/spec/mailers/application_mailer_spec.rb @@ -6,10 +6,10 @@ module Decidim describe Decidim::DummyResources::DummyResourceMailer, type: :mailer do describe "smtp_settings" do let(:user) { create(:user, organization: organization) } - let(:organization) { create(:organization, smtp_settings: smtp_settings) } + let(:organization) { create(:organization, name: "My Organization", smtp_settings: smtp_settings) } let(:smtp_settings) do { - "address" => "mail.gotham.gov", + "address" => "mail.example.org", "port" => "25", "user_name" => "f.laguardia", "encrypted_password" => Decidim::AttributeEncryptor.encrypt("password"), @@ -24,7 +24,7 @@ module Decidim let(:mail_subject) { "Test subject" } it "update correctly mail.delivery_method.settings" do - expect(mail.delivery_method.settings[:address]).to eq("mail.gotham.gov") + expect(mail.delivery_method.settings[:address]).to eq("mail.example.org") expect(mail.delivery_method.settings[:port]).to eq("25") expect(mail.delivery_method.settings[:user_name]).to eq("f.laguardia") expect(mail.delivery_method.settings[:password]).to eq("password") @@ -46,22 +46,66 @@ module Decidim it "returns default values" do expect(mail.from).to eq(["change-me@example.org"]) end + + it "returns the organization with the name" do + expect(mail.header[:from].value).to eq("My Organization ") + end end context "when from is not set" do let(:from) { nil } - it "set default values for mail.from" do - expect(mail.from).to eq(["change-me@example.org"]) + before do + allow(Decidim.config).to receive(:mailer_sender).and_return(mailer_sender) + end + + context "when the mailer_sender config_accessor does not have a name" do + let(:mailer_sender) { "changed@example.org" } + + it "uses this email" do + expect(mail.from).to eq(["changed@example.org"]) + end + + it "returns the organization with the name" do + expect(mail.header[:from].value).to eq("My Organization ") + end + end + + context "when the mailer_sender config_accessor has a name" do + let(:mailer_sender) { "ACME " } + + it "uses this email" do + expect(mail.from).to eq(["changed@example.org"]) + end + + it "returns the name defined in the mailer_sender" do + expect(mail.header[:from].value).to eq("ACME ") + end end end - context "when from is set" do + context "when from is set with a name" do let(:from) { "Bruce Wayne " } it "set default values for mail.from and mail.reply_to" do expect(mail.from).to eq(["decide@gotham.org"]) end + + it "returns the organization with the name" do + expect(mail.header[:from].value).to eq("Bruce Wayne ") + end + end + + context "when from is set without a name" do + let(:from) { "decide@gotham.org" } + + it "set default values for mail.from and mail.reply_to" do + expect(mail.from).to eq(["decide@gotham.org"]) + end + + it "returns the organization with the name" do + expect(mail.header[:from].value).to eq("My Organization ") + end end context "when reply_to is set" do diff --git a/decidim-system/app/mailers/decidim/system/application_mailer.rb b/decidim-system/app/mailers/decidim/system/application_mailer.rb deleted file mode 100644 index 5f92460e49102..0000000000000 --- a/decidim-system/app/mailers/decidim/system/application_mailer.rb +++ /dev/null @@ -1,12 +0,0 @@ -# frozen_string_literal: true - -module Decidim - module System - # Custom application mailer, scoped to the system mailer. - # - class ApplicationMailer < ActionMailer::Base - default from: Decidim.config.mailer_sender - layout "mailer" - end - end -end diff --git a/decidim-system/config/locales/en.yml b/decidim-system/config/locales/en.yml index cd6fb45dc18a5..35556763f64bd 100644 --- a/decidim-system/config/locales/en.yml +++ b/decidim-system/config/locales/en.yml @@ -192,7 +192,7 @@ en: fieldsets: sender: Sender instructions: - from_label: 'Email sender will be: "your-organization-name ". Leave blank to use the ''Email address'' as label' + from_label: 'Email sender will be: "your-organization-name ". Leave blank to use the same name as the defined for the organization.' placeholder: from_email: your-organization@example.org from_label: your-organization-name diff --git a/decidim-system/spec/commands/decidim/system/register_organization_spec.rb b/decidim-system/spec/commands/decidim/system/register_organization_spec.rb index 7dc169d410058..b828449bc9f6a 100644 --- a/decidim-system/spec/commands/decidim/system/register_organization_spec.rb +++ b/decidim-system/spec/commands/decidim/system/register_organization_spec.rb @@ -17,21 +17,21 @@ module System let(:params) do { name: "Gotham City", - host: "decide.gotham.gov", - secondary_hosts: "foo.gotham.gov\r\n\r\nbar.gotham.gov", + host: "decide.example.org", + secondary_hosts: "foo.example.org\r\n\r\nbar.example.org", reference_prefix: "JKR", organization_admin_name: "Fiorello Henry La Guardia", - organization_admin_email: "f.laguardia@gotham.gov", + organization_admin_email: "f.laguardia@example.org", available_locales: ["en"], default_locale: "en", users_registration_mode: "enabled", force_users_to_authenticate_before_access_organization: "false", smtp_settings: { - "address" => "mail.gotham.gov", + "address" => "mail.example.org", "port" => "25", "user_name" => "f.laguardia", "password" => Decidim::AttributeEncryptor.encrypt("password"), - "from_email" => "decide@gotham.gov", + "from_email" => "decide@example.org", "from_label" => from_label }, omniauth_settings_facebook_enabled: true, @@ -53,11 +53,11 @@ module System organization = Organization.last expect(organization.name).to eq("Gotham City") - expect(organization.host).to eq("decide.gotham.gov") - expect(organization.secondary_hosts).to match_array(["foo.gotham.gov", "bar.gotham.gov"]) - expect(organization.external_domain_whitelist).to match_array(["decidim.org", "github.com"]) - expect(organization.smtp_settings["from"]).to eq("Decide Gotham ") - expect(organization.smtp_settings["from_email"]).to eq("decide@gotham.gov") + expect(organization.host).to eq("decide.example.org") + expect(organization.secondary_hosts).to contain_exactly("foo.example.org", "bar.example.org") + expect(organization.external_domain_whitelist).to contain_exactly("decidim.org", "github.com") + expect(organization.smtp_settings["from"]).to eq("Decide Gotham ") + expect(organization.smtp_settings["from_email"]).to eq("decide@example.org") expect(organization.omniauth_settings["omniauth_settings_facebook_enabled"]).to be(true) expect(organization.file_upload_settings).to eq(upload_settings) expect( @@ -72,7 +72,7 @@ module System expect { command.call }.to change(User, :count).by(1) admin = User.last - expect(admin.email).to eq("f.laguardia@gotham.gov") + expect(admin.email).to eq("f.laguardia@example.org") expect(admin.organization.name).to eq("Gotham City") expect(admin).to be_admin expect(admin).to be_created_by_invite @@ -115,10 +115,10 @@ module System organization = Organization.last - expect(organization.smtp_settings["from"]).to eq("Decide Gotham ") + expect(organization.smtp_settings["from"]).to eq("Decide Gotham ") expect(organization.smtp_settings["from_label"]).to eq("Decide Gotham") - expect(organization.smtp_settings["from_email"]).to eq("decide@gotham.gov") - expect(last_email.From.value).to eq("Decide Gotham ") + expect(organization.smtp_settings["from_email"]).to eq("decide@example.org") + expect(last_email.From.value).to eq("Decide Gotham ") end context "when from_label is empty" do @@ -131,9 +131,9 @@ module System organization = Organization.last - expect(organization.smtp_settings["from"]).to eq("decide@gotham.gov") - expect(organization.smtp_settings["from_email"]).to eq("decide@gotham.gov") - expect(last_email.From.value).to eq("decide@gotham.gov") + expect(organization.smtp_settings["from"]).to eq("decide@example.org") + expect(organization.smtp_settings["from_email"]).to eq("decide@example.org") + expect(last_email.From.value).to eq("Gotham City ") end end end diff --git a/decidim-system/spec/commands/decidim/system/update_organization_spec.rb b/decidim-system/spec/commands/decidim/system/update_organization_spec.rb index ed8b694acca0a..16ec181b82f55 100644 --- a/decidim-system/spec/commands/decidim/system/update_organization_spec.rb +++ b/decidim-system/spec/commands/decidim/system/update_organization_spec.rb @@ -18,16 +18,16 @@ module System let(:params) do { name: "Gotham City", - host: "decide.gotham.gov", - secondary_hosts: "foo.gotham.gov\r\n\r\nbar.gotham.gov", + host: "decide.example.org", + secondary_hosts: "foo.example.org\r\n\r\nbar.example.org", force_users_to_authenticate_before_access_organization: false, users_registration_mode: "existing", smtp_settings: { - "address" => "mail.gotham.gov", + "address" => "mail.example.org", "port" => "25", "user_name" => "f.laguardia", "password" => Decidim::AttributeEncryptor.encrypt("password"), - "from_email" => "decide@gotham.gov", + "from_email" => "decide@example.org", "from_label" => from_label }, omniauth_settings_facebook_enabled: true, @@ -49,11 +49,11 @@ module System organization = Organization.last expect(organization.name).to eq("Gotham City") - expect(organization.host).to eq("decide.gotham.gov") - expect(organization.secondary_hosts).to match_array(["foo.gotham.gov", "bar.gotham.gov"]) + expect(organization.host).to eq("decide.example.org") + expect(organization.secondary_hosts).to contain_exactly("foo.example.org", "bar.example.org") expect(organization.users_registration_mode).to eq("existing") - expect(organization.smtp_settings["from"]).to eq("Decide Gotham ") - expect(organization.smtp_settings["from_email"]).to eq("decide@gotham.gov") + expect(organization.smtp_settings["from"]).to eq("Decide Gotham ") + expect(organization.smtp_settings["from_email"]).to eq("decide@example.org") expect(organization.omniauth_settings["omniauth_settings_facebook_enabled"]).to be(true) expect(organization.file_upload_settings).to eq(upload_settings) expect( @@ -72,8 +72,8 @@ module System command.call organization = Organization.last - expect(organization.smtp_settings["from"]).to eq("decide@gotham.gov") - expect(organization.smtp_settings["from_email"]).to eq("decide@gotham.gov") + expect(organization.smtp_settings["from"]).to eq("decide@example.org") + expect(organization.smtp_settings["from_email"]).to eq("decide@example.org") end end end diff --git a/decidim-system/spec/forms/decidim/system/update_organization_form_spec.rb b/decidim-system/spec/forms/decidim/system/update_organization_form_spec.rb index e2f7331207f72..76e731f2f24ef 100644 --- a/decidim-system/spec/forms/decidim/system/update_organization_form_spec.rb +++ b/decidim-system/spec/forms/decidim/system/update_organization_form_spec.rb @@ -7,11 +7,11 @@ module Decidim::System subject do described_class.new( name: "Gotham City", - host: "decide.gotham.gov", - secondary_hosts: "foo.gotham.gov\r\n\r\nbar.gotham.gov", + host: "decide.example.org", + secondary_hosts: "foo.example.org\r\n\r\nbar.example.org", reference_prefix: "JKR", organization_admin_name: "Fiorello Henry La Guardia", - organization_admin_email: "f.laguardia@gotham.gov", + organization_admin_email: "f.laguardia@example.org", available_locales: ["en"], default_locale: "en", users_registration_mode: "enabled", @@ -27,11 +27,11 @@ module Decidim::System let(:smtp_settings) do { - "address" => "mail.gotham.gov", + "address" => "mail.example.org", "port" => 25, "user_name" => "f.laguardia", "password" => password, - "from_email" => "decide@gotham.gov", + "from_email" => "decide@example.org", "from_label" => from_label } end @@ -69,7 +69,7 @@ module Decidim::System it "concatenates from_label and from_email" do from = subject.set_from - expect(from).to eq("Decide Gotham ") + expect(from).to eq("Decide Gotham ") end context "when from_label is empty" do @@ -78,7 +78,7 @@ module Decidim::System it "returns the email" do from = subject.set_from - expect(from).to eq("decide@gotham.gov") + expect(from).to eq("decide@example.org") end end end From fc876f68a87cc8213978a553f2ed19471d9b6182 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20Pereira=20de=20Lucena?= Date: Fri, 7 Jun 2024 16:26:41 +0200 Subject: [PATCH 62/88] Backport 'Fix 500 error when creating or updating an organization without a secret key' to v0.27 (#12971) * Fix 500 error when creating or updating an organization without a secret key * Fix spec for this version --- .../system/update_organization_form.rb | 9 +++++ decidim-system/config/locales/en.yml | 4 +++ .../spec/system/organizations_spec.rb | 33 +++++++++++++++++++ 3 files changed, 46 insertions(+) diff --git a/decidim-system/app/forms/decidim/system/update_organization_form.rb b/decidim-system/app/forms/decidim/system/update_organization_form.rb index eb6e18645ecaa..d433296700282 100644 --- a/decidim-system/app/forms/decidim/system/update_organization_form.rb +++ b/decidim-system/app/forms/decidim/system/update_organization_form.rb @@ -46,6 +46,7 @@ class UpdateOrganizationForm < Form validates :name, :host, :users_registration_mode, presence: true validate :validate_organization_uniqueness + validate :validate_secret_key_base_for_encryption validates :users_registration_mode, inclusion: { in: Decidim::Organization.users_registration_modes } def map_model(model) @@ -96,6 +97,14 @@ def validate_organization_uniqueness errors.add(:name, :taken) if Decidim::Organization.where(name: name).where.not(id: id).exists? errors.add(:host, :taken) if Decidim::Organization.where(host: host).where.not(id: id).exists? end + + # We need a valid secret key base for encrypting the SMTP password with it + # It is also necessary for other things in Rails (like Cookies encryption) + def validate_secret_key_base_for_encryption + return if Rails.application.secrets.secret_key_base&.length == 128 + + errors.add(:password, I18n.t("activemodel.errors.models.organization.attributes.password.secret_key")) + end end end end diff --git a/decidim-system/config/locales/en.yml b/decidim-system/config/locales/en.yml index 35556763f64bd..4d9cf7f45c62e 100644 --- a/decidim-system/config/locales/en.yml +++ b/decidim-system/config/locales/en.yml @@ -32,6 +32,10 @@ en: attributes: redirect_uri: must_be_ssl: The redirect URI must be a SSL URI + organization: + attributes: + password: + secret_key: You need to define the SECRET_KEY_BASE environment variable to be able to save this field decidim: system: actions: diff --git a/decidim-system/spec/system/organizations_spec.rb b/decidim-system/spec/system/organizations_spec.rb index 5ce62a6f3c505..dd3f86e3b558b 100644 --- a/decidim-system/spec/system/organizations_spec.rb +++ b/decidim-system/spec/system/organizations_spec.rb @@ -53,6 +53,24 @@ expect(page).to have_content("There's an error in this field") end end + + context "without the secret key defined" do + before do + allow(Rails.application.secrets).to receive(:secret_key_base).and_return(nil) + end + + it "does not create an organization" do + fill_in "Name", with: "Citizen Corp" + fill_in "Host", with: "www.example.org" + fill_in "Reference prefix", with: "CCORP" + fill_in "Organization admin name", with: "City Mayor" + fill_in "Organization admin email", with: "mayor@example.org" + click_on "Create organization & invite admin" + + click_on "Show advanced settings" + expect(page).to have_content("You need to define the SECRET_KEY_BASE environment variable to be able to save this field") + end + end end describe "showing an organization with different locale than user" do @@ -102,6 +120,21 @@ expect(page).to have_css("div.flash.success") expect(page).to have_content("Citizens Rule!") end + + context "without the secret key defined" do + before do + allow(Rails.application.secrets).to receive(:secret_key_base).and_return(nil) + end + + it "shows the error message" do + fill_in "Name", with: "Citizens Rule!" + fill_in "Host", with: "www.example.org" + click_on "Save" + + click_on "Show advanced settings" + expect(page).to have_content("You need to define the SECRET_KEY_BASE environment variable to be able to save this field") + end + end end describe "editing an organization with disabled OmniAuth provider" do From 271a220213cc9bb7b68b5e9570909a775dd29141 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20Pereira=20de=20Lucena?= Date: Fri, 7 Jun 2024 17:28:18 +0200 Subject: [PATCH 63/88] Fix incomplete regexp in webmock configuration (#12973) --- decidim-dev/lib/decidim/dev/test/rspec_support/webmock.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/decidim-dev/lib/decidim/dev/test/rspec_support/webmock.rb b/decidim-dev/lib/decidim/dev/test/rspec_support/webmock.rb index 109a4bc014c78..ad3aedfc13c9d 100644 --- a/decidim-dev/lib/decidim/dev/test/rspec_support/webmock.rb +++ b/decidim-dev/lib/decidim/dev/test/rspec_support/webmock.rb @@ -2,4 +2,4 @@ require "webmock/rspec" -WebMock.disable_net_connect!(allow_localhost: true, allow: %r{https://validator.w3.org/}) +WebMock.disable_net_connect!(allow_localhost: true, allow: %r{https://validator\.w3\.org/}) From ccdd40c0260663a9a10eb138e8649ef309cb2e90 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20Pereira=20de=20Lucena?= Date: Fri, 7 Jun 2024 17:41:53 +0200 Subject: [PATCH 64/88] Fix external URL with a fragment (#12976) * Fix external URL with a fragment * Add page title for external URL warning page --- .../app/controllers/decidim/links_controller.rb | 14 +++++++++++++- decidim-core/app/views/decidim/links/new.html.erb | 2 ++ .../spec/system/external_domain_warning_spec.rb | 12 ++++++++++++ 3 files changed, 27 insertions(+), 1 deletion(-) diff --git a/decidim-core/app/controllers/decidim/links_controller.rb b/decidim-core/app/controllers/decidim/links_controller.rb index 05d686838f399..6455d19df1d8b 100644 --- a/decidim-core/app/controllers/decidim/links_controller.rb +++ b/decidim-core/app/controllers/decidim/links_controller.rb @@ -35,7 +35,19 @@ def parse_url end def external_url - @external_url ||= URI.parse(URI::Parser.new.escape(params[:external_url])) + @external_url ||= URI.parse(escape_url(params[:external_url])) + end + + def escape_url(external_url) + before_fragment, fragment = external_url.split("#", 2) + escaped_before_fragment = URI::Parser.new.escape(before_fragment) + + if fragment + escaped_fragment = URI::Parser.new.escape(fragment) + "#{escaped_before_fragment}##{escaped_fragment}" + else + escaped_before_fragment + end end end end diff --git a/decidim-core/app/views/decidim/links/new.html.erb b/decidim-core/app/views/decidim/links/new.html.erb index 7944fa0a9913f..d1e0dd2af6c3c 100644 --- a/decidim-core/app/views/decidim/links/new.html.erb +++ b/decidim-core/app/views/decidim/links/new.html.erb @@ -1,3 +1,5 @@ +<% add_decidim_page_title t("decidim.links.warning.title") %> +