decidim-consultations 0.14.4 → 0.15.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (44) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/images/decidim/consultations/icon.svg +2 -69
  3. data/app/cells/decidim/consultation_activity_cell.rb +10 -0
  4. data/app/cells/decidim/consultations/content_blocks/highlighted_consultations/show.erb +32 -0
  5. data/app/cells/decidim/consultations/content_blocks/highlighted_consultations_cell.rb +41 -0
  6. data/app/cells/decidim/consultations/content_blocks/highlighted_consultations_settings_form/show.erb +3 -0
  7. data/app/cells/decidim/consultations/content_blocks/highlighted_consultations_settings_form_cell.rb +19 -0
  8. data/app/cells/decidim/consultations/question_activity_cell.rb +15 -0
  9. data/app/commands/decidim/consultations/admin/publish_consultation.rb +8 -3
  10. data/app/commands/decidim/consultations/admin/publish_question.rb +7 -2
  11. data/app/controllers/decidim/consultations/admin/consultation_publications_controller.rb +1 -1
  12. data/app/controllers/decidim/consultations/admin/question_publications_controller.rb +1 -1
  13. data/app/forms/decidim/consultations/admin/consultation_form.rb +2 -2
  14. data/app/models/decidim/consultation.rb +3 -0
  15. data/app/models/decidim/consultations/question.rb +5 -0
  16. data/app/models/decidim/consultations/vote.rb +10 -1
  17. data/app/views/layouts/decidim/admin/consultation.html.erb +1 -0
  18. data/app/views/layouts/decidim/admin/question.html.erb +1 -0
  19. data/config/locales/ca.yml +19 -0
  20. data/config/locales/de.yml +19 -0
  21. data/config/locales/en.yml +19 -0
  22. data/config/locales/es-PY.yml +19 -0
  23. data/config/locales/es.yml +19 -0
  24. data/config/locales/eu.yml +19 -0
  25. data/config/locales/fi.yml +19 -0
  26. data/config/locales/fr.yml +19 -0
  27. data/config/locales/gl.yml +19 -0
  28. data/config/locales/hu.yml +19 -0
  29. data/config/locales/it.yml +19 -0
  30. data/config/locales/nl.yml +19 -0
  31. data/config/locales/pl.yml +21 -0
  32. data/config/locales/pt-BR.yml +19 -0
  33. data/config/locales/pt.yml +19 -0
  34. data/config/locales/ru.yml +4 -0
  35. data/config/locales/sv.yml +19 -0
  36. data/config/locales/uk.yml +4 -0
  37. data/db/migrate/20181003082318_fix_user_groups_ids_on_consultations.rb +16 -0
  38. data/db/seeds/city.jpeg +0 -0
  39. data/db/seeds/city2.jpeg +0 -0
  40. data/lib/decidim/consultations/engine.rb +12 -0
  41. data/lib/decidim/consultations/participatory_space.rb +46 -10
  42. data/lib/decidim/consultations/test/factories.rb +10 -10
  43. data/lib/decidim/consultations/version.rb +1 -1
  44. metadata +18 -11
@@ -174,6 +174,10 @@ fr:
174
174
  questions: Questions
175
175
  responses: Réponses
176
176
  consultations:
177
+ admin:
178
+ content_blocks:
179
+ highlighted_consultations:
180
+ max_results: Quantité maximale d'éléments à afficher
177
181
  consultation:
178
182
  start_voting_date: Le vote commence le
179
183
  view_results: Voir les résultats
@@ -184,6 +188,9 @@ fr:
184
188
  label: 'Trier les votations par :'
185
189
  random: Aléatoire
186
190
  recent: Les plus récentes
191
+ content_blocks:
192
+ highlighted_consultations:
193
+ name: Consultations surlignées
187
194
  count:
188
195
  title:
189
196
  one: "%{count} votation"
@@ -204,6 +211,18 @@ fr:
204
211
  title: Questions de %{scope_name}
205
212
  index:
206
213
  title: Votations
214
+ last_activity:
215
+ new_consultation: Nouvelle consultation
216
+ new_question_at_html: "<span>Nouvelle question à %{link}</span>"
217
+ pages:
218
+ home:
219
+ highlighted_consultations:
220
+ active_consultations: Consultations actives
221
+ see_all_consultations: Voir toutes les consultations
222
+ voting_ends_in:
223
+ one: Le vote se termine <strong>demain</strong>
224
+ other: Le vote prend fin à <strong>%{count} jour</strong>
225
+ voting_ends_today: Fin du vote <strong>aujourd'hui</strong>
207
226
  question:
208
227
  take_part: Participer
209
228
  view_results: Voir les résultats
@@ -174,6 +174,10 @@ gl:
174
174
  questions: Preguntas
175
175
  responses: Respostas
176
176
  consultations:
177
+ admin:
178
+ content_blocks:
179
+ highlighted_consultations:
180
+ max_results: Cantidade máxima de elementos para mostrar
177
181
  consultation:
178
182
  start_voting_date: Comeza a votación
179
183
  view_results: Ver resultados
@@ -184,6 +188,9 @@ gl:
184
188
  label: 'Ordenar consultas por:'
185
189
  random: Aleatorio
186
190
  recent: Máis recente
191
+ content_blocks:
192
+ highlighted_consultations:
193
+ name: Consultas destacadas
187
194
  count:
188
195
  title:
189
196
  one: "Consulta %{count}"
@@ -204,6 +211,18 @@ gl:
204
211
  title: Preguntas de %{scope_name}
205
212
  index:
206
213
  title: Consultas
214
+ last_activity:
215
+ new_consultation: Nova consulta
216
+ new_question_at_html: "<span>Nova pregunta en %{link}</span>"
217
+ pages:
218
+ home:
219
+ highlighted_consultations:
220
+ active_consultations: Consultas activas
221
+ see_all_consultations: Ver todas as consultas
222
+ voting_ends_in:
223
+ one: A votación remata o <strong>mañá</strong>
224
+ other: A votación remata en <strong>%{count} días</strong>
225
+ voting_ends_today: A votación remata en <strong>hoxe</strong>
207
226
  question:
208
227
  take_part: Tomar parte en
209
228
  view_results: Ver resultados
@@ -174,6 +174,10 @@ hu:
174
174
  questions: Kérdések
175
175
  responses: Válaszok
176
176
  consultations:
177
+ admin:
178
+ content_blocks:
179
+ highlighted_consultations:
180
+ max_results: A megjelenítendő elemek maximális száma
177
181
  consultation:
178
182
  start_voting_date: Szavazás kezdése
179
183
  view_results: Eredmények megtekintése
@@ -184,6 +188,9 @@ hu:
184
188
  label: 'Konzultációk rendezése:'
185
189
  random: Véletlenszerű
186
190
  recent: Legutóbbi
191
+ content_blocks:
192
+ highlighted_consultations:
193
+ name: Kiemelt konzultációk
187
194
  count:
188
195
  title:
189
196
  one: "%{count} konzultáció"
@@ -204,6 +211,18 @@ hu:
204
211
  title: '%{scope_name} kérdések'
205
212
  index:
206
213
  title: Konzultációk
214
+ last_activity:
215
+ new_consultation: Új konzultáció
216
+ new_question_at_html: "<span>Új kérdés: %{link}</span>"
217
+ pages:
218
+ home:
219
+ highlighted_consultations:
220
+ active_consultations: Aktív konzultációk
221
+ see_all_consultations: Lásd az összes konzultációt
222
+ voting_ends_in:
223
+ one: Szavazás <strong>vége <strong> holnap</strong>
224
+ other: A szavazás végződik <strong>%{count} nap</strong>
225
+ voting_ends_today: A szavazás végeredménye <strong>ma</strong>
207
226
  question:
208
227
  take_part: Vegyél részt
209
228
  view_results: Eredmények megtekintése
@@ -174,6 +174,10 @@ it:
174
174
  questions: Domande
175
175
  responses: risposte
176
176
  consultations:
177
+ admin:
178
+ content_blocks:
179
+ highlighted_consultations:
180
+ max_results: Quantità massima di elementi da mostrare
177
181
  consultation:
178
182
  start_voting_date: Inizia la votazione
179
183
  view_results: Vedi i risultati
@@ -184,6 +188,9 @@ it:
184
188
  label: 'Ordina le consultazioni per:'
185
189
  random: Casuale
186
190
  recent: Piu recente
191
+ content_blocks:
192
+ highlighted_consultations:
193
+ name: Consultazioni evidenziate
187
194
  count:
188
195
  title:
189
196
  one: "%{count} consultazione"
@@ -204,6 +211,18 @@ it:
204
211
  title: Domande da %{scope_name}
205
212
  index:
206
213
  title: consultazioni
214
+ last_activity:
215
+ new_consultation: Nuova consultazione
216
+ new_question_at_html: "<span>Nuova domanda al %{link}</span>"
217
+ pages:
218
+ home:
219
+ highlighted_consultations:
220
+ active_consultations: Consultazioni attive
221
+ see_all_consultations: Vedi tutte le consultazioni
222
+ voting_ends_in:
223
+ one: La votazione termina <strong>domani</strong>
224
+ other: La votazione termina tra <strong>%{count} giorni</strong>
225
+ voting_ends_today: La votazione termina <strong>oggi</strong>
207
226
  question:
208
227
  take_part: Prendere parte
209
228
  view_results: Vedi i risultati
@@ -174,6 +174,10 @@ nl:
174
174
  questions: vragen
175
175
  responses: Antwoorden
176
176
  consultations:
177
+ admin:
178
+ content_blocks:
179
+ highlighted_consultations:
180
+ max_results: Maximum aantal elementen dat kan worden weergegeven
177
181
  consultation:
178
182
  start_voting_date: Stemmen begint
179
183
  view_results: Bekijk resultaten
@@ -184,6 +188,9 @@ nl:
184
188
  label: 'Sorteer door:'
185
189
  random: Willekeurig
186
190
  recent: Meest recent
191
+ content_blocks:
192
+ highlighted_consultations:
193
+ name: Gemarkeerd consulten
187
194
  count:
188
195
  title:
189
196
  one: "%{count} overleg"
@@ -204,6 +211,18 @@ nl:
204
211
  title: Vragen vanaf %{scope_name}
205
212
  index:
206
213
  title: Burgerinspraak
214
+ last_activity:
215
+ new_consultation: Nieuw overleg
216
+ new_question_at_html: "<span>Nieuwe vraag op %{link}</span>"
217
+ pages:
218
+ home:
219
+ highlighted_consultations:
220
+ active_consultations: Huidige burgerinspraak
221
+ see_all_consultations: Zie alle raadplegingen
222
+ voting_ends_in:
223
+ one: Stemmen eindigt morgen <strong></strong>
224
+ other: Stemmen eindigt over <strong>%{count} dagen</strong>
225
+ voting_ends_today: Stemmen eindigt <strong>vandaag</strong>
207
226
  question:
208
227
  take_part: Neem deel
209
228
  view_results: Bekijk resultaten
@@ -188,6 +188,10 @@ pl:
188
188
  questions: pytania
189
189
  responses: Odpowiedzi
190
190
  consultations:
191
+ admin:
192
+ content_blocks:
193
+ highlighted_consultations:
194
+ max_results: Maksymalna ilość elementów do pokazania
191
195
  consultation:
192
196
  start_voting_date: Rozpocznie się głosowanie
193
197
  view_results: Pokaż wyniki
@@ -198,6 +202,9 @@ pl:
198
202
  label: 'Sortuj konsultacje według:'
199
203
  random: Losowy
200
204
  recent: Najnowszy
205
+ content_blocks:
206
+ highlighted_consultations:
207
+ name: Wyróżnione konsultacje
201
208
  count:
202
209
  title:
203
210
  one: "%{count} konsultacja"
@@ -220,6 +227,20 @@ pl:
220
227
  title: Pytania od %{scope_name}
221
228
  index:
222
229
  title: Konsultacje
230
+ last_activity:
231
+ new_consultation: Nowa konsultacja
232
+ new_question_at_html: "<span>Nowe pytanie o %{link}</span>"
233
+ pages:
234
+ home:
235
+ highlighted_consultations:
236
+ active_consultations: Aktywne konsultacje
237
+ see_all_consultations: Zobacz wszystkie konsultacje
238
+ voting_ends_in:
239
+ one: Głosowanie kończy się na <strong>jutro</strong>
240
+ few: Głosowanie kończy się w ciągu <strong>%{count} dni</strong>
241
+ many: Głosowanie kończy się w ciągu <strong>%{count} dni</strong>
242
+ other: Głosowanie kończy się w ciągu <strong>%{count} dni</strong>
243
+ voting_ends_today: Głosowanie kończy się dzisiaj <strong></strong>
223
244
  question:
224
245
  take_part: Wziąć udział
225
246
  view_results: Pokaż wyniki
@@ -174,6 +174,10 @@ pt-BR:
174
174
  questions: Questões
175
175
  responses: Respostas
176
176
  consultations:
177
+ admin:
178
+ content_blocks:
179
+ highlighted_consultations:
180
+ max_results: Quantidade máxima de elementos para mostrar
177
181
  consultation:
178
182
  start_voting_date: A votação começa
179
183
  view_results: Ver resultados
@@ -184,6 +188,9 @@ pt-BR:
184
188
  label: 'Ordenar consultas por:'
185
189
  random: Aleatório
186
190
  recent: Mais recente
191
+ content_blocks:
192
+ highlighted_consultations:
193
+ name: Consultas destacadas
187
194
  count:
188
195
  title:
189
196
  one: "%{count} consulta"
@@ -204,6 +211,18 @@ pt-BR:
204
211
  title: Perguntas de %{scope_name}
205
212
  index:
206
213
  title: Consultas
214
+ last_activity:
215
+ new_consultation: Nova consulta
216
+ new_question_at_html: "<span>Nova pergunta em %{link}</span>"
217
+ pages:
218
+ home:
219
+ highlighted_consultations:
220
+ active_consultations: Consultas ativas
221
+ see_all_consultations: Veja todas as consultas
222
+ voting_ends_in:
223
+ one: A votação termina <strong>amanhã</strong>
224
+ other: A votação termina em <strong>%{count} dia</strong>
225
+ voting_ends_today: A votação termina <strong>hoje</strong>
207
226
  question:
208
227
  take_part: Participar
209
228
  view_results: Ver resultados
@@ -174,6 +174,10 @@ pt:
174
174
  questions: Questões
175
175
  responses: Respostas
176
176
  consultations:
177
+ admin:
178
+ content_blocks:
179
+ highlighted_consultations:
180
+ max_results: Quantidade máxima de elementos para mostrar
177
181
  consultation:
178
182
  start_voting_date: A votação começa
179
183
  view_results: Ver resultados
@@ -184,6 +188,9 @@ pt:
184
188
  label: 'Ordenar consultas por:'
185
189
  random: Aleatória
186
190
  recent: Mais recente
191
+ content_blocks:
192
+ highlighted_consultations:
193
+ name: Consultas destacadas
187
194
  count:
188
195
  title:
189
196
  one: "%{count} consulta"
@@ -204,6 +211,18 @@ pt:
204
211
  title: Perguntas de %{scope_name}
205
212
  index:
206
213
  title: Consultas
214
+ last_activity:
215
+ new_consultation: Nova consulta
216
+ new_question_at_html: "<span>Nova pergunta em %{link}</span>"
217
+ pages:
218
+ home:
219
+ highlighted_consultations:
220
+ active_consultations: Consultas ativas
221
+ see_all_consultations: Veja todas as consultas
222
+ voting_ends_in:
223
+ one: A votação termina <strong>amanhã</strong>
224
+ other: A votação termina em <strong>%{count} dia</strong>
225
+ voting_ends_today: A votação termina <strong>hoje</strong>
207
226
  question:
208
227
  take_part: Participar
209
228
  view_results: Ver resultados
@@ -220,6 +220,10 @@ ru:
220
220
  title: Вопросы из %{scope_name}
221
221
  index:
222
222
  title: Консультации
223
+ pages:
224
+ home:
225
+ highlighted_consultations:
226
+ active_consultations: Действующие консультации
223
227
  question:
224
228
  take_part: Принять участие
225
229
  view_results: Посмотреть итоги
@@ -174,6 +174,10 @@ sv:
174
174
  questions: frågor
175
175
  responses: Svar
176
176
  consultations:
177
+ admin:
178
+ content_blocks:
179
+ highlighted_consultations:
180
+ max_results: Maximal mängd element att visa
177
181
  consultation:
178
182
  start_voting_date: Röstningen börjar
179
183
  view_results: Se Resultat
@@ -184,6 +188,9 @@ sv:
184
188
  label: 'Sortera samråd med:'
185
189
  random: Slumpmässig
186
190
  recent: Senaste
191
+ content_blocks:
192
+ highlighted_consultations:
193
+ name: Markerade samråd
187
194
  count:
188
195
  title:
189
196
  one: "%{count} konsultation"
@@ -204,6 +211,18 @@ sv:
204
211
  title: Frågor från %{scope_name}
205
212
  index:
206
213
  title: samråd
214
+ last_activity:
215
+ new_consultation: Nytt samråd
216
+ new_question_at_html: "<span>Ny fråga till %{link}</span>"
217
+ pages:
218
+ home:
219
+ highlighted_consultations:
220
+ active_consultations: Aktiva samråd
221
+ see_all_consultations: Se alla samråd
222
+ voting_ends_in:
223
+ one: Röstningen slutar <strong>morgon</strong>
224
+ other: Röstningen slutar i <strong>%{count} dagar</strong>
225
+ voting_ends_today: Omröstning slutar <strong>idag</strong>
207
226
  question:
208
227
  take_part: Ta del
209
228
  view_results: Se Resultat
@@ -220,6 +220,10 @@ uk:
220
220
  title: Питання з %{scope_name}
221
221
  index:
222
222
  title: Консультації
223
+ pages:
224
+ home:
225
+ highlighted_consultations:
226
+ active_consultations: Діючі консультації
223
227
  question:
224
228
  take_part: Взяти участь
225
229
  view_results: Переглянути підсумки
@@ -0,0 +1,16 @@
1
+ # frozen_string_literal: true
2
+
3
+ class FixUserGroupsIdsOnConsultations < ActiveRecord::Migration[5.2]
4
+ # rubocop:disable Rails/SkipsModelValidations
5
+ def change
6
+ Decidim::UserGroup.find_each do |group|
7
+ old_id = group.extended_data["old_user_group_id"]
8
+ next unless old_id
9
+
10
+ Decidim::Consultations::Vote
11
+ .where(decidim_user_group_id: old_id)
12
+ .update_all(decidim_user_group_id: group.id)
13
+ end
14
+ end
15
+ # rubocop:enable Rails/SkipsModelValidations
16
+ end
data/db/seeds/city.jpeg CHANGED
Binary file
data/db/seeds/city2.jpeg CHANGED
Binary file
@@ -73,6 +73,18 @@ module Decidim
73
73
  active: :inclusive
74
74
  end
75
75
  end
76
+
77
+ initializer "decidim_consultations.content_blocks" do
78
+ Decidim.content_blocks.register(:homepage, :highlighted_consultations) do |content_block|
79
+ content_block.cell = "decidim/consultations/content_blocks/highlighted_consultations"
80
+ content_block.public_name_key = "decidim.consultations.content_blocks.highlighted_consultations.name"
81
+ content_block.settings_form_cell = "decidim/consultations/content_blocks/highlighted_consultations_settings_form"
82
+
83
+ content_block.settings do |settings|
84
+ settings.attribute :max_results, type: :integer, default: 4
85
+ end
86
+ end
87
+ end
76
88
  end
77
89
  end
78
90
  end
@@ -2,12 +2,12 @@
2
2
 
3
3
  Decidim.register_participatory_space(:consultations) do |participatory_space|
4
4
  participatory_space.icon = "decidim/consultations/icon.svg"
5
- participatory_space.model_class_name = "Decidim::Consultations::Question"
5
+ participatory_space.model_class_name = "Decidim::Consultation"
6
6
  participatory_space.permissions_class_name = "Decidim::Consultations::Permissions"
7
7
  participatory_space.stylesheet = "decidim/consultations/consultations"
8
8
 
9
9
  participatory_space.participatory_spaces do |organization|
10
- Decidim::Consultations::Question.where(organization: organization)
10
+ Decidim::Consultation.where(organization: organization)
11
11
  end
12
12
 
13
13
  participatory_space.context(:public) do |context|
@@ -31,7 +31,7 @@ Decidim.register_participatory_space(:consultations) do |participatory_space|
31
31
  organization = Decidim::Organization.first
32
32
 
33
33
  # Active consultation
34
- active_consultation = Decidim::Consultation.create!(
34
+ active_consultation_params = {
35
35
  slug: Faker::Internet.unique.slug(nil, "-"),
36
36
  title: Decidim::Faker::Localized.sentence(3),
37
37
  subtitle: Decidim::Faker::Localized.sentence(3),
@@ -45,9 +45,18 @@ Decidim.register_participatory_space(:consultations) do |participatory_space|
45
45
  introductory_video_url: "https://www.youtube.com/embed/zhMMW0TENNA",
46
46
  decidim_highlighted_scope_id: Decidim::Scope.reorder(Arel.sql("RANDOM()")).first.id,
47
47
  organization: organization
48
- )
48
+ }
49
49
 
50
- finished_consultation = Decidim::Consultation.create!(
50
+ active_consultation = Decidim.traceability.perform_action!(
51
+ "publish",
52
+ Decidim::Consultation,
53
+ organization.users.first,
54
+ visibility: "all"
55
+ ) do
56
+ Decidim::Consultation.create!(active_consultation_params)
57
+ end
58
+
59
+ finished_consultation_params = {
51
60
  slug: Faker::Internet.unique.slug(nil, "-"),
52
61
  title: Decidim::Faker::Localized.sentence(3),
53
62
  subtitle: Decidim::Faker::Localized.sentence(3),
@@ -62,9 +71,18 @@ Decidim.register_participatory_space(:consultations) do |participatory_space|
62
71
  introductory_video_url: "https://www.youtube.com/embed/zhMMW0TENNA",
63
72
  decidim_highlighted_scope_id: Decidim::Scope.reorder(Arel.sql("RANDOM()")).first.id,
64
73
  organization: organization
65
- )
74
+ }
66
75
 
67
- upcoming_consultation = Decidim::Consultation.create!(
76
+ finished_consultation = Decidim.traceability.perform_action!(
77
+ "publish",
78
+ Decidim::Consultation,
79
+ organization.users.first,
80
+ visibility: "all"
81
+ ) do
82
+ Decidim::Consultation.create!(finished_consultation_params)
83
+ end
84
+
85
+ upcoming_consultation_params = {
68
86
  slug: Faker::Internet.unique.slug(nil, "-"),
69
87
  title: Decidim::Faker::Localized.sentence(3),
70
88
  subtitle: Decidim::Faker::Localized.sentence(3),
@@ -78,11 +96,20 @@ Decidim.register_participatory_space(:consultations) do |participatory_space|
78
96
  introductory_video_url: "https://www.youtube.com/embed/zhMMW0TENNA",
79
97
  decidim_highlighted_scope_id: Decidim::Scope.reorder(Arel.sql("RANDOM()")).first.id,
80
98
  organization: organization
81
- )
99
+ }
100
+
101
+ upcoming_consultation = Decidim.traceability.perform_action!(
102
+ "publish",
103
+ Decidim::Consultation,
104
+ organization.users.first,
105
+ visibility: "all"
106
+ ) do
107
+ Decidim::Consultation.create!(upcoming_consultation_params)
108
+ end
82
109
 
83
110
  [finished_consultation, active_consultation, upcoming_consultation].each do |consultation|
84
111
  4.times do
85
- question = Decidim::Consultations::Question.create!(
112
+ params = {
86
113
  consultation: consultation,
87
114
  slug: Faker::Internet.unique.slug(nil, "-"),
88
115
  decidim_scope_id: Decidim::Scope.reorder(Arel.sql("RANDOM()")).first.id,
@@ -100,7 +127,16 @@ Decidim.register_participatory_space(:consultations) do |participatory_space|
100
127
  participatory_scope: Decidim::Faker::Localized.sentence(3),
101
128
  published_at: Time.now.utc,
102
129
  organization: organization
103
- )
130
+ }
131
+
132
+ question = Decidim.traceability.perform_action!(
133
+ "publish",
134
+ Decidim::Consultations::Question,
135
+ organization.users.first,
136
+ visibility: "all"
137
+ ) do
138
+ Decidim::Consultations::Question.create!(params)
139
+ end
104
140
 
105
141
  2.times do
106
142
  Decidim::Consultations::Response.create(
@@ -15,9 +15,9 @@ FactoryBot.define do
15
15
  factory :consultation, class: "Decidim::Consultation" do
16
16
  organization
17
17
  slug { generate(:consultation_slug) }
18
- title { Decidim::Faker::Localized.sentence(3) }
19
- subtitle { Decidim::Faker::Localized.sentence(1) }
20
- description { Decidim::Faker::Localized.wrapped("<p>", "</p>") { Decidim::Faker::Localized.sentence(4) } }
18
+ title { generate_localized_title }
19
+ subtitle { generate_localized_title }
20
+ description { Decidim::Faker::Localized.wrapped("<p>", "</p>") { generate_localized_title } }
21
21
  banner_image { Decidim::Dev.test_file("city2.jpeg", "image/jpeg") }
22
22
  published_at { Time.current }
23
23
  start_voting_date { Time.zone.today }
@@ -63,12 +63,12 @@ FactoryBot.define do
63
63
  organization { consultation.organization }
64
64
  scope { create(:scope, organization: consultation.organization) }
65
65
  slug { generate(:question_slug) }
66
- title { Decidim::Faker::Localized.sentence(3) }
67
- subtitle { Decidim::Faker::Localized.sentence(3) }
68
- promoter_group { Decidim::Faker::Localized.sentence(3) }
69
- participatory_scope { Decidim::Faker::Localized.sentence(3) }
70
- question_context { Decidim::Faker::Localized.wrapped("<p>", "</p>") { Decidim::Faker::Localized.sentence(4) } }
71
- what_is_decided { Decidim::Faker::Localized.wrapped("<p>", "</p>") { Decidim::Faker::Localized.sentence(4) } }
66
+ title { generate_localized_title }
67
+ subtitle { generate_localized_title }
68
+ promoter_group { generate_localized_title }
69
+ participatory_scope { generate_localized_title }
70
+ question_context { Decidim::Faker::Localized.wrapped("<p>", "</p>") { generate_localized_title } }
71
+ what_is_decided { Decidim::Faker::Localized.wrapped("<p>", "</p>") { generate_localized_title } }
72
72
  published_at { Time.current }
73
73
  hero_image { Decidim::Dev.test_file("city.jpeg", "image/jpeg") }
74
74
  banner_image { Decidim::Dev.test_file("city2.jpeg", "image/jpeg") }
@@ -93,7 +93,7 @@ FactoryBot.define do
93
93
 
94
94
  factory :response, class: "Decidim::Consultations::Response" do
95
95
  question
96
- title { Decidim::Faker::Localized.sentence(3) }
96
+ title { generate_localized_title }
97
97
  end
98
98
 
99
99
  factory :vote, class: "Decidim::Consultations::Vote" do
@@ -3,7 +3,7 @@
3
3
  module Decidim
4
4
  module Consultations
5
5
  def self.version
6
- "0.14.4"
6
+ "0.15.0"
7
7
  end
8
8
  end
9
9
  end