decidim-debates 0.17.0 → 0.17.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/app/cells/decidim/debates/debate_m_cell.rb +4 -0
- data/app/presenters/decidim/debates/debate_presenter.rb +12 -0
- data/app/views/decidim/debates/debates/show.html.erb +2 -2
- data/config/locales/ar-SA.yml +5 -5
- data/config/locales/ca.yml +12 -12
- data/config/locales/es.yml +19 -19
- data/config/locales/tr-TR.yml +1 -1
- data/lib/decidim/debates/test/factories.rb +8 -4
- data/lib/decidim/debates/version.rb +1 -1
- metadata +10 -10
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: '0910e2c2d5da8c064fc6f296ab4f1f97737ce3bbf6a4700aba489358e27bcede'
|
|
4
|
+
data.tar.gz: 9f681e0bd04e3bbf4b7f5edfbde71841729c184d9723a8922d85573055a41fbe
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 89ac020a38801974aa77b340e0e4cb9470d3d62678f9582243b4682c93f85218ed8491ca7d73df6d78f48721a86853f90874edb72890a727940d51c1d5326b04
|
|
7
|
+
data.tar.gz: 3969ab45435abd413d162d244cd107160b795ead449a5b90db40b4a64d829d76526ebecbe9923db448325c18d109832095728f6e007835d514663b129b0e0032
|
|
@@ -6,6 +6,13 @@ module Decidim
|
|
|
6
6
|
# Decorator for debates
|
|
7
7
|
#
|
|
8
8
|
class DebatePresenter < SimpleDelegator
|
|
9
|
+
include Decidim::SanitizeHelper
|
|
10
|
+
include Decidim::TranslatableAttributes
|
|
11
|
+
|
|
12
|
+
def debate
|
|
13
|
+
__getobj__
|
|
14
|
+
end
|
|
15
|
+
|
|
9
16
|
def author
|
|
10
17
|
@author ||= if official?
|
|
11
18
|
Decidim::Debates::OfficialAuthorPresenter.new
|
|
@@ -15,6 +22,11 @@ module Decidim
|
|
|
15
22
|
Decidim::UserPresenter.new(super)
|
|
16
23
|
end
|
|
17
24
|
end
|
|
25
|
+
|
|
26
|
+
def title
|
|
27
|
+
content = translated_attribute(debate.title)
|
|
28
|
+
decidim_html_escape(content)
|
|
29
|
+
end
|
|
18
30
|
end
|
|
19
31
|
end
|
|
20
32
|
end
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<% add_decidim_meta_tags({
|
|
2
2
|
description: translated_attribute(debate.description),
|
|
3
|
-
title:
|
|
3
|
+
title: present(debate).title,
|
|
4
4
|
url: debate_url(debate.id)
|
|
5
5
|
}) %>
|
|
6
6
|
|
|
@@ -15,7 +15,7 @@ edit_link(
|
|
|
15
15
|
|
|
16
16
|
<div class="row column view-header">
|
|
17
17
|
<h2 class="heading2">
|
|
18
|
-
<%==
|
|
18
|
+
<%== present(debate).title %>
|
|
19
19
|
</h2>
|
|
20
20
|
|
|
21
21
|
<%= cell "decidim/author", Decidim::Debates::DebatePresenter.new(debate).author, context: { extra_classes: ["author-data--small"] } %>
|
data/config/locales/ar-SA.yml
CHANGED
|
@@ -10,7 +10,7 @@ ar:
|
|
|
10
10
|
instructions: تعليمات للمشاركة
|
|
11
11
|
start_time: يبدأ عند
|
|
12
12
|
title: عنوان
|
|
13
|
-
user_group_id:
|
|
13
|
+
user_group_id: إنشاء النقاش كما
|
|
14
14
|
models:
|
|
15
15
|
decidim/debates/create_debate_event: النقاش
|
|
16
16
|
decidim/debates/creation_disabled_event: تم تعطيل المناقشات
|
|
@@ -28,7 +28,7 @@ ar:
|
|
|
28
28
|
components:
|
|
29
29
|
debates:
|
|
30
30
|
actions:
|
|
31
|
-
create:
|
|
31
|
+
create: إنشاء
|
|
32
32
|
name: المناقشات
|
|
33
33
|
settings:
|
|
34
34
|
global:
|
|
@@ -42,7 +42,7 @@ ar:
|
|
|
42
42
|
actions:
|
|
43
43
|
confirm_destroy: هل أنت واثق؟
|
|
44
44
|
destroy: حذف
|
|
45
|
-
edit:
|
|
45
|
+
edit: تعديل
|
|
46
46
|
new: جديد %{name}
|
|
47
47
|
title: أفعال
|
|
48
48
|
admin:
|
|
@@ -58,7 +58,7 @@ ar:
|
|
|
58
58
|
index:
|
|
59
59
|
title: المناقشات
|
|
60
60
|
new:
|
|
61
|
-
create:
|
|
61
|
+
create: إنشاء نقاش
|
|
62
62
|
title: نقاش جديد
|
|
63
63
|
update:
|
|
64
64
|
invalid: كانت هناك مشكلة في تحديث هذا النقاش.
|
|
@@ -101,7 +101,7 @@ ar:
|
|
|
101
101
|
new_debate: نقاش جديد
|
|
102
102
|
new:
|
|
103
103
|
back: الى الخلف
|
|
104
|
-
create:
|
|
104
|
+
create: إنشاء
|
|
105
105
|
select_a_category: الرجاء تحديد الفئة
|
|
106
106
|
title: نقاش جديد
|
|
107
107
|
share:
|
data/config/locales/ca.yml
CHANGED
|
@@ -13,7 +13,7 @@ ca:
|
|
|
13
13
|
user_group_id: Crea un debat com
|
|
14
14
|
models:
|
|
15
15
|
decidim/debates/create_debate_event: Debat
|
|
16
|
-
decidim/debates/creation_disabled_event: Debats
|
|
16
|
+
decidim/debates/creation_disabled_event: Debats deshabilitats
|
|
17
17
|
decidim/debates/creation_enabled_event: Debats habilitats
|
|
18
18
|
activerecord:
|
|
19
19
|
models:
|
|
@@ -33,10 +33,10 @@ ca:
|
|
|
33
33
|
step:
|
|
34
34
|
announcement: Avís
|
|
35
35
|
comments_blocked: Comentaris bloquejats
|
|
36
|
-
creation_enabled:
|
|
36
|
+
creation_enabled: Creació de debats per part de les participants habilitada
|
|
37
37
|
debates:
|
|
38
38
|
actions:
|
|
39
|
-
confirm_destroy: N'estàs
|
|
39
|
+
confirm_destroy: N'estàs segura?
|
|
40
40
|
destroy: Suprimeix
|
|
41
41
|
edit: Edita
|
|
42
42
|
new: Nou %{name}
|
|
@@ -58,14 +58,14 @@ ca:
|
|
|
58
58
|
title: Nou debat
|
|
59
59
|
update:
|
|
60
60
|
invalid: S'ha produït un error en actualitzar aquest debat.
|
|
61
|
-
success:
|
|
61
|
+
success: Debate actualizado correctament.
|
|
62
62
|
models:
|
|
63
63
|
debate:
|
|
64
64
|
name: Debat
|
|
65
65
|
admin_log:
|
|
66
66
|
debate:
|
|
67
|
-
create: "
|
|
68
|
-
update: "
|
|
67
|
+
create: "La participant %{user_name} ha creat el debat %{resource_name} a l'espai %{space_name}"
|
|
68
|
+
update: "La participant %{user_name} ha actualitzat el debat %{resource_name} a l'espai %{space_name}"
|
|
69
69
|
debates:
|
|
70
70
|
count:
|
|
71
71
|
debates_count:
|
|
@@ -92,7 +92,7 @@ ca:
|
|
|
92
92
|
index:
|
|
93
93
|
new_debate: Nou debat
|
|
94
94
|
new:
|
|
95
|
-
back:
|
|
95
|
+
back: Torna
|
|
96
96
|
create: Crear
|
|
97
97
|
select_a_category: Si us plau, selecciona una categoria
|
|
98
98
|
title: Nou debat
|
|
@@ -127,12 +127,12 @@ ca:
|
|
|
127
127
|
email_subject: Nou debat "%{resource_title}" de %{author_nickname}
|
|
128
128
|
notification_title: <a href="%{author_path}">%{author_name} %{author_nickname}</a> ha creat el debat <a href="%{resource_path}">%{resource_title}</a>.
|
|
129
129
|
creation_disabled:
|
|
130
|
-
email_intro: 'La creació de debats ja no està activa a %{participatory_space_title}. Encara pots participar en debats oberts d''aquesta pàgina:'
|
|
130
|
+
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:'
|
|
131
131
|
email_outro: Has rebut aquesta notificació perquè estàs seguint l'espai %{participatory_space_title}. Pots deixar de rebre notificacions seguint l'enllaç anterior.
|
|
132
132
|
email_subject: S'ha desactivat la creació de debats a %{participatory_space_title}
|
|
133
|
-
notification_title: La creació de debats està
|
|
133
|
+
notification_title: La creació de debats està deshabilitada a l'espai <a href="%{participatory_space_url}">%{participatory_space_title}</a>
|
|
134
134
|
creation_enabled:
|
|
135
|
-
email_intro: 'Ja pots
|
|
135
|
+
email_intro: 'Ja pots crear nous debats a %{participatory_space_title}! Comença a participar en aquesta pàgina:'
|
|
136
136
|
email_outro: Has rebut aquesta notificació perquè estàs seguint %{participatory_space_title}. Pots deixar de rebre notificacions seguint l'enllaç anterior.
|
|
137
137
|
email_subject: Els debats ja estan disponibles a %{participatory_space_title}
|
|
138
138
|
notification_title: Ja pots començar <a href="%{resource_path}">nous debats</a> a <a href="%{participatory_space_url}">%{participatory_space_title}</a>
|
|
@@ -146,8 +146,8 @@ ca:
|
|
|
146
146
|
description_own: Has participat en %{score} debats.
|
|
147
147
|
name: Debats
|
|
148
148
|
next_level_in: Participa en %{score} debats més per arribar al següent nivell!
|
|
149
|
-
unearned_another: Aquesta participant encara no ha
|
|
150
|
-
unearned_own:
|
|
149
|
+
unearned_another: Aquesta participant encara no ha participat en cap debat.
|
|
150
|
+
unearned_own: Encara no has participat a cap debat.
|
|
151
151
|
metrics:
|
|
152
152
|
debates:
|
|
153
153
|
description: Nombre de debats creats
|
data/config/locales/es.yml
CHANGED
|
@@ -5,12 +5,12 @@ es:
|
|
|
5
5
|
category_id: Categoría
|
|
6
6
|
decidim_category_id: Categoría
|
|
7
7
|
description: Descripción
|
|
8
|
-
end_time: Fecha de
|
|
8
|
+
end_time: Fecha de finalización
|
|
9
9
|
information_updates: Actualizaciones de información
|
|
10
10
|
instructions: Instrucciones para participar
|
|
11
11
|
start_time: Fecha de inicio
|
|
12
12
|
title: Título
|
|
13
|
-
user_group_id:
|
|
13
|
+
user_group_id: Crea un debate como
|
|
14
14
|
models:
|
|
15
15
|
decidim/debates/create_debate_event: Debate
|
|
16
16
|
decidim/debates/creation_disabled_event: Debates deshabilitados
|
|
@@ -28,16 +28,16 @@ es:
|
|
|
28
28
|
name: Debates
|
|
29
29
|
settings:
|
|
30
30
|
global:
|
|
31
|
-
announcement:
|
|
31
|
+
announcement: Aviso
|
|
32
32
|
comments_enabled: Comentarios habilitados
|
|
33
33
|
step:
|
|
34
|
-
announcement:
|
|
34
|
+
announcement: Aviso
|
|
35
35
|
comments_blocked: Comentarios bloqueados
|
|
36
36
|
creation_enabled: Creación de debates por parte de las participantes habilitada
|
|
37
37
|
debates:
|
|
38
38
|
actions:
|
|
39
|
-
confirm_destroy: '¿
|
|
40
|
-
destroy:
|
|
39
|
+
confirm_destroy: '¿Estás segura?'
|
|
40
|
+
destroy: Elimina
|
|
41
41
|
edit: Editar
|
|
42
42
|
new: Nuevo %{name}
|
|
43
43
|
title: Acciones
|
|
@@ -54,7 +54,7 @@ es:
|
|
|
54
54
|
index:
|
|
55
55
|
title: Debates
|
|
56
56
|
new:
|
|
57
|
-
create:
|
|
57
|
+
create: Crea un debate
|
|
58
58
|
title: Nuevo debate
|
|
59
59
|
update:
|
|
60
60
|
invalid: Se ha producido un error al actualizar este debate.
|
|
@@ -64,8 +64,8 @@ es:
|
|
|
64
64
|
name: Debate
|
|
65
65
|
admin_log:
|
|
66
66
|
debate:
|
|
67
|
-
create: "%{user_name}
|
|
68
|
-
update: "%{user_name} actualizó el debate %{resource_name} en el espacio %{space_name}"
|
|
67
|
+
create: "La participante %{user_name} ha creado el debate %{resource_name} en el espacio %{space_name}"
|
|
68
|
+
update: "La participante %{user_name} actualizó el debate %{resource_name} en el espacio %{space_name}"
|
|
69
69
|
debates:
|
|
70
70
|
count:
|
|
71
71
|
debates_count:
|
|
@@ -75,7 +75,7 @@ es:
|
|
|
75
75
|
invalid: Se ha producido un error al crear el debate.
|
|
76
76
|
success: Debate creado correctamente.
|
|
77
77
|
debate:
|
|
78
|
-
participate:
|
|
78
|
+
participate: Participa
|
|
79
79
|
filters:
|
|
80
80
|
all: Todos
|
|
81
81
|
category: Categoría
|
|
@@ -88,7 +88,7 @@ es:
|
|
|
88
88
|
close_modal: Cerrar ventana
|
|
89
89
|
filter: Filtrar
|
|
90
90
|
filter_by: Filtrar por
|
|
91
|
-
unfold:
|
|
91
|
+
unfold: Despliega
|
|
92
92
|
index:
|
|
93
93
|
new_debate: Nuevo debate
|
|
94
94
|
new:
|
|
@@ -97,7 +97,7 @@ es:
|
|
|
97
97
|
select_a_category: Por favor, selecciona una categoría
|
|
98
98
|
title: Nuevo debate
|
|
99
99
|
share:
|
|
100
|
-
close_window: Cerrar ventana
|
|
100
|
+
close_window: Cerrar la ventana
|
|
101
101
|
share: Compartir
|
|
102
102
|
share_link: Compartir enlace
|
|
103
103
|
last_activity:
|
|
@@ -128,14 +128,14 @@ es:
|
|
|
128
128
|
notification_title: <a href="%{author_path}">%{author_name} %{author_nickname}</a> creó el debate <a href="%{resource_path}">%{resource_title}</a>.
|
|
129
129
|
creation_disabled:
|
|
130
130
|
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:'
|
|
131
|
-
email_outro: Has recibido esta notificación porque estás siguiendo %{participatory_space_title}. Puedes dejar de recibir notificaciones siguiendo el enlace anterior.
|
|
132
|
-
email_subject:
|
|
133
|
-
notification_title: La creación de debates ahora está deshabilitada en <a href="%{participatory_space_url}">%{participatory_space_title}</a>
|
|
131
|
+
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.
|
|
132
|
+
email_subject: Se ha desactivado la creación de debates en %{participatory_space_title}
|
|
133
|
+
notification_title: La creación de debates ahora está deshabilitada en el espacio <a href="%{participatory_space_url}">%{participatory_space_title}</a>
|
|
134
134
|
creation_enabled:
|
|
135
|
-
email_intro: '¡
|
|
135
|
+
email_intro: '¡Ya puedes crear nuevos debates en %{participatory_space_title}! Comienza a participar en esta página:'
|
|
136
136
|
email_outro: Has recibido esta notificación porque estás siguiendo %{participatory_space_title}. Puedes dejar de recibir notificaciones siguiendo el enlace anterior.
|
|
137
|
-
email_subject:
|
|
138
|
-
notification_title:
|
|
137
|
+
email_subject: Los debates ya estan disponibles en %{participatory_space_title}
|
|
138
|
+
notification_title: Ya puedes empezar <a href="%{resource_path}">nuevos debates</a> en <a href="%{participatory_space_url}">%{participatory_space_title}</a>
|
|
139
139
|
gamification:
|
|
140
140
|
badges:
|
|
141
141
|
commented_debates:
|
|
@@ -146,7 +146,7 @@ es:
|
|
|
146
146
|
description_own: Has participado en %{score} debates.
|
|
147
147
|
name: Debates
|
|
148
148
|
next_level_in: '¡Participa en %{score} debates más para alcanzar el siguiente nivel!'
|
|
149
|
-
unearned_another: Esta participante aún no ha
|
|
149
|
+
unearned_another: Esta participante aún no ha participado en ningún debate.
|
|
150
150
|
unearned_own: Aún no has participado en ningún debate.
|
|
151
151
|
metrics:
|
|
152
152
|
debates:
|
data/config/locales/tr-TR.yml
CHANGED
|
@@ -115,7 +115,7 @@ tr:
|
|
|
115
115
|
space_followers:
|
|
116
116
|
email_intro: |-
|
|
117
117
|
Merhaba,
|
|
118
|
-
|
|
118
|
+
%{space_title} katılımcı alanda yeni bir "%{resource_title}" tartışması oluşturuldu, inceleyin ve katkıda bulunun:
|
|
119
119
|
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.'
|
|
120
120
|
email_subject: '%{space_title}yeni tartışma "%{resource_title}"'
|
|
121
121
|
notification_title: <a href="%{resource_path}">%{resource_title}</a> tartışması <a href="%{space_path}">%{space_title}</a>oluşturuldu.
|
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
+
def generate_localized_debate_title
|
|
4
|
+
Decidim::Faker::Localized.localized { "<script>alert(\"TITLE\");</script> " + generate(:title) }
|
|
5
|
+
end
|
|
6
|
+
|
|
3
7
|
FactoryBot.define do
|
|
4
8
|
factory :debate, class: "Decidim::Debates::Debate" do
|
|
5
|
-
title {
|
|
6
|
-
description { Decidim::Faker::Localized.wrapped("<p>", "</p>") {
|
|
7
|
-
information_updates { Decidim::Faker::Localized.wrapped("<p>", "</p>") {
|
|
8
|
-
instructions { Decidim::Faker::Localized.wrapped("<p>", "</p>") {
|
|
9
|
+
title { generate_localized_debate_title }
|
|
10
|
+
description { Decidim::Faker::Localized.wrapped("<p>", "</p>") { generate_localized_debate_title } }
|
|
11
|
+
information_updates { Decidim::Faker::Localized.wrapped("<p>", "</p>") { generate_localized_debate_title } }
|
|
12
|
+
instructions { Decidim::Faker::Localized.wrapped("<p>", "</p>") { generate_localized_debate_title } }
|
|
9
13
|
start_time { 1.day.from_now }
|
|
10
14
|
end_time { start_time.advance(hours: 2) }
|
|
11
15
|
component { build(:component, manifest_name: "debates") }
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: decidim-debates
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.17.
|
|
4
|
+
version: 0.17.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Josep Jaume Rey Peroy
|
|
@@ -11,7 +11,7 @@ authors:
|
|
|
11
11
|
autorequire:
|
|
12
12
|
bindir: bin
|
|
13
13
|
cert_chain: []
|
|
14
|
-
date: 2019-
|
|
14
|
+
date: 2019-05-27 00:00:00.000000000 Z
|
|
15
15
|
dependencies:
|
|
16
16
|
- !ruby/object:Gem::Dependency
|
|
17
17
|
name: decidim-comments
|
|
@@ -19,28 +19,28 @@ dependencies:
|
|
|
19
19
|
requirements:
|
|
20
20
|
- - '='
|
|
21
21
|
- !ruby/object:Gem::Version
|
|
22
|
-
version: 0.17.
|
|
22
|
+
version: 0.17.1
|
|
23
23
|
type: :runtime
|
|
24
24
|
prerelease: false
|
|
25
25
|
version_requirements: !ruby/object:Gem::Requirement
|
|
26
26
|
requirements:
|
|
27
27
|
- - '='
|
|
28
28
|
- !ruby/object:Gem::Version
|
|
29
|
-
version: 0.17.
|
|
29
|
+
version: 0.17.1
|
|
30
30
|
- !ruby/object:Gem::Dependency
|
|
31
31
|
name: decidim-core
|
|
32
32
|
requirement: !ruby/object:Gem::Requirement
|
|
33
33
|
requirements:
|
|
34
34
|
- - '='
|
|
35
35
|
- !ruby/object:Gem::Version
|
|
36
|
-
version: 0.17.
|
|
36
|
+
version: 0.17.1
|
|
37
37
|
type: :runtime
|
|
38
38
|
prerelease: false
|
|
39
39
|
version_requirements: !ruby/object:Gem::Requirement
|
|
40
40
|
requirements:
|
|
41
41
|
- - '='
|
|
42
42
|
- !ruby/object:Gem::Version
|
|
43
|
-
version: 0.17.
|
|
43
|
+
version: 0.17.1
|
|
44
44
|
- !ruby/object:Gem::Dependency
|
|
45
45
|
name: kaminari
|
|
46
46
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -75,28 +75,28 @@ dependencies:
|
|
|
75
75
|
requirements:
|
|
76
76
|
- - '='
|
|
77
77
|
- !ruby/object:Gem::Version
|
|
78
|
-
version: 0.17.
|
|
78
|
+
version: 0.17.1
|
|
79
79
|
type: :development
|
|
80
80
|
prerelease: false
|
|
81
81
|
version_requirements: !ruby/object:Gem::Requirement
|
|
82
82
|
requirements:
|
|
83
83
|
- - '='
|
|
84
84
|
- !ruby/object:Gem::Version
|
|
85
|
-
version: 0.17.
|
|
85
|
+
version: 0.17.1
|
|
86
86
|
- !ruby/object:Gem::Dependency
|
|
87
87
|
name: decidim-dev
|
|
88
88
|
requirement: !ruby/object:Gem::Requirement
|
|
89
89
|
requirements:
|
|
90
90
|
- - '='
|
|
91
91
|
- !ruby/object:Gem::Version
|
|
92
|
-
version: 0.17.
|
|
92
|
+
version: 0.17.1
|
|
93
93
|
type: :development
|
|
94
94
|
prerelease: false
|
|
95
95
|
version_requirements: !ruby/object:Gem::Requirement
|
|
96
96
|
requirements:
|
|
97
97
|
- - '='
|
|
98
98
|
- !ruby/object:Gem::Version
|
|
99
|
-
version: 0.17.
|
|
99
|
+
version: 0.17.1
|
|
100
100
|
description: A debates component for decidim's participatory spaces.
|
|
101
101
|
email:
|
|
102
102
|
- josepjaume@gmail.com
|