From a8ad777e1b2066807df0a24be5b2f4b6eb1a7361 Mon Sep 17 00:00:00 2001 From: Laura J <75725233+laurajaime@users.noreply.github.com> Date: Tue, 22 Oct 2024 22:54:44 +0200 Subject: [PATCH] Fix actions translations (#94) * Fix actions translations * Add test --- config/locales/ca.yml | 8 ++++++++ config/locales/de.yml | 8 ++++++++ config/locales/en.yml | 8 ++++++++ config/locales/es.yml | 8 ++++++++ ...nage_reporting_proposals_component_spec.rb | 20 +++++++++++++++++++ 5 files changed, 52 insertions(+) diff --git a/config/locales/ca.yml b/config/locales/ca.yml index 7e4cc101..da5b97b9 100644 --- a/config/locales/ca.yml +++ b/config/locales/ca.yml @@ -40,6 +40,14 @@ ca: unanswered_proposals_overdue: Quants dies després una proposta sense resposta es considera vençuda unanswered_proposals_overdue_help: Aquesta regla afegeix una alerta visual a la llista e propostes. Si no ho vols utilitzar, deixa aquest valor a zero. reporting_proposals: + actions: + amend: Esmena + comment: Comentar + create: Crear + endorse: Adherir-se + vote: Donar suport + vote_comment: Votar el comentari + withdraw: Retirar name: Propostes directes settings: global: diff --git a/config/locales/de.yml b/config/locales/de.yml index 62f4f4e1..c4038bdf 100644 --- a/config/locales/de.yml +++ b/config/locales/de.yml @@ -40,6 +40,14 @@ de: unanswered_proposals_overdue: Nach wie vielen Tagen gilt eine nicht beantwortete Meldung als überfällig unanswered_proposals_overdue_help: Falls keine zeitlichen Hinweise angezeigt werden sollen, wähle hier 0. reporting_proposals: + actions: + amend: Änderungsvorschlag + comment: Kommentieren + create: Erstellen + endorse: Unterstützung + vote: Abstimmung + vote_comment: Kommentar bewerten + withdraw: Zurückziehen name: Meldungen settings: global: diff --git a/config/locales/en.yml b/config/locales/en.yml index 164a3271..2d5bbfef 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -53,6 +53,14 @@ en: unanswered_proposals_overdue_help: This adds a visual alert to the list of proposals. Leave it to zero to disable this feature. reporting_proposals: + actions: + amend: Amend + comment: Comment + create: Create + endorse: Endorse + vote: Support + vote_comment: Vote comment + withdraw: Withdraw name: Reporting proposals settings: global: diff --git a/config/locales/es.yml b/config/locales/es.yml index 3ff5d45d..6fbcd64a 100644 --- a/config/locales/es.yml +++ b/config/locales/es.yml @@ -40,6 +40,14 @@ es: unanswered_proposals_overdue: Después de cuántos días se considera una propuesta sin respuesta atrasada unanswered_proposals_overdue_help: Esto añade una alerta visual a la lista de propuestas. Déjala a cero para desactivar esta característica. reporting_proposals: + actions: + amend: Enmendar + comment: Comentar + create: Crear + endorse: Adherirse + vote: Apoyar + vote_comment: Votar comentario + withdraw: Retirar name: Propuestas directas settings: global: diff --git a/spec/system/admin/manage_reporting_proposals_component_spec.rb b/spec/system/admin/manage_reporting_proposals_component_spec.rb index 299f12f7..263fc2f3 100644 --- a/spec/system/admin/manage_reporting_proposals_component_spec.rb +++ b/spec/system/admin/manage_reporting_proposals_component_spec.rb @@ -12,6 +12,10 @@ def edit_component_path(component) Decidim::EngineRouter.admin_proxy(component.participatory_space).edit_component_path(component.id) end + def component_path + Decidim::EngineRouter.admin_proxy(component.participatory_space).components_path(component.id) + end + before do switch_to_host(organization.host) login_as user, scope: :user @@ -62,4 +66,20 @@ def edit_component_path(component) expect(page).to have_unchecked_field("component_settings_proposal_photo_editing_enabled") end end + + context "when managing proposals permissions" do + let!(:component) { create(:proposal_component, participatory_space: participatory_process) } + + before do + visit component_path + within ".component-#{component.id}" do + click_on "Permissions" + end + end + + it "show permissions" do + expect(page).to have_content("Edit permissions") + expect(page).to have_content("Endorse") + end + end end