decidim-proposals 0.26.1 → 0.26.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (51) hide show
  1. checksums.yaml +4 -4
  2. data/app/commands/decidim/proposals/admin/answer_proposal.rb +7 -2
  3. data/app/commands/decidim/proposals/admin/create_proposal.rb +1 -1
  4. data/app/commands/decidim/proposals/admin/update_proposal.rb +1 -1
  5. data/app/commands/decidim/proposals/hashtags_methods.rb +1 -1
  6. data/app/events/decidim/proposals/collaborative_draft_withdrawn_event.rb +5 -1
  7. data/app/forms/decidim/proposals/admin/proposal_answer_form.rb +1 -1
  8. data/app/helpers/decidim/proposals/application_helper.rb +1 -1
  9. data/app/models/decidim/proposals/proposal.rb +6 -0
  10. data/app/permissions/decidim/proposals/admin/permissions.rb +3 -0
  11. data/app/views/decidim/proposals/admin/proposal_answers/_form.html.erb +1 -1
  12. data/app/views/decidim/proposals/proposals/_proposal_similar.html.erb +1 -1
  13. data/config/locales/ar.yml +3 -13
  14. data/config/locales/bg.yml +0 -12
  15. data/config/locales/ca.yml +14 -12
  16. data/config/locales/cs.yml +14 -12
  17. data/config/locales/de.yml +0 -13
  18. data/config/locales/el.yml +0 -13
  19. data/config/locales/en.yml +15 -13
  20. data/config/locales/es-MX.yml +14 -12
  21. data/config/locales/es-PY.yml +14 -12
  22. data/config/locales/es.yml +15 -13
  23. data/config/locales/eu.yml +0 -13
  24. data/config/locales/fi-plain.yml +14 -12
  25. data/config/locales/fi.yml +15 -13
  26. data/config/locales/fr-CA.yml +13 -12
  27. data/config/locales/fr.yml +28 -27
  28. data/config/locales/gl.yml +0 -13
  29. data/config/locales/hu.yml +1 -13
  30. data/config/locales/id-ID.yml +0 -13
  31. data/config/locales/is-IS.yml +0 -1
  32. data/config/locales/it.yml +0 -13
  33. data/config/locales/ja.yml +14 -12
  34. data/config/locales/lv.yml +0 -13
  35. data/config/locales/nl.yml +0 -13
  36. data/config/locales/no.yml +0 -13
  37. data/config/locales/pl.yml +0 -13
  38. data/config/locales/pt-BR.yml +0 -13
  39. data/config/locales/pt.yml +0 -13
  40. data/config/locales/ro-RO.yml +0 -13
  41. data/config/locales/ru.yml +0 -1
  42. data/config/locales/sk.yml +0 -13
  43. data/config/locales/sv.yml +0 -13
  44. data/config/locales/tr-TR.yml +0 -13
  45. data/config/locales/uk.yml +0 -1
  46. data/config/locales/zh-CN.yml +0 -12
  47. data/lib/decidim/content_parsers/proposal_parser.rb +7 -63
  48. data/lib/decidim/content_renderers/proposal_renderer.rb +3 -19
  49. data/lib/decidim/proposals/component.rb +8 -8
  50. data/lib/decidim/proposals/version.rb +1 -1
  51. metadata +18 -18
@@ -199,33 +199,21 @@ pl:
199
199
  email_subject: Ktoś zostawił notatkę do propozycji %{resource_title}.
200
200
  notification_title: Ktoś zostawił notatkę do propozycji <a href="%{resource_path}">%{resource_title}</a>. Sprawdź ją w <a href="%{admin_proposal_info_path}">panelu administratora</a>
201
201
  collaborative_draft_access_accepted:
202
- email_intro: '%{requester_name} otrzymał(a) dostęp jako współtwórca wspólnego szkicu <a href="%{resource_path}">%{resource_title}</a>.'
203
- email_outro: Otrzymałeś to powiadomienie, ponieważ jesteś współtwórcą <a href="%{resource_path}">%{resource_title}</a>.
204
202
  email_subject: "%{requester_name} otrzymał(a) dostęp jako współtwórca %{resource_title}."
205
203
  notification_title: <a href="%{requester_path}">%{requester_name} %{requester_nickname}</a> otrzymał(a) <strong>dostęp jako współtwórca</strong> wspólnego szkicu <a href="%{resource_path}">%{resource_title}</a>.
206
204
  collaborative_draft_access_rejected:
207
- email_intro: '%{requester_name} nie otrzymał(a) dostępu jako współtwórca wspólnego szkicu <a href="%{resource_path}">%{resource_title}</a>.'
208
- email_outro: Otrzymałeś to powiadomienie, ponieważ jesteś współtwórcą <a href="%{resource_path}">%{resource_title}</a>.
209
205
  email_subject: "%{requester_name} nie otrzymał(a) dostępu jako współtwórca wspólnego szkicu %{resource_title}."
210
206
  notification_title: <a href="%{requester_path}">%{requester_name} %{requester_nickname}</a> <strong>nie otrzymał(a) dostępu jako współtwórca</strong> wspólnego szkicu <a href="%{resource_path}">%{resource_title}</a>.
211
207
  collaborative_draft_access_requested:
212
- email_intro: '%{requester_name} poprosił(a) o dostęp jako współtwórca. Możesz <strong>zaakceptować lub odrzucić prośbę</strong> na stronie wspólnego szkicu <a href="%{resource_path}">%{resource_title}</a>.'
213
- email_outro: Otrzymałeś to powiadomienie, ponieważ jesteś współtwórcą <a href="%{resource_path}">%{resource_title}</a>.
214
208
  email_subject: "%{requester_name} prosi o dostęp do współtworzenia %{resource_title}."
215
209
  notification_title: <a href="%{requester_path}">%{requester_name} %{requester_nickname}</a> prosi o dostęp do współtworzenia wspólnego szkicu <a href="%{resource_path}">%{resource_title}</a>. <strong>Zaakceptuj lub odrzuć prośbę</strong>.
216
210
  collaborative_draft_access_requester_accepted:
217
- email_intro: Zostałeś zaakceptowany jak współtwórca wspólnego szkicu <a href="%{resource_path}">%{resource_title}</a>.
218
- email_outro: Otrzymałeś to powiadomienie, ponieważ poprosiłeś o dostęp jako współtwórca <a href="%{resource_path}">%{resource_title}</a>.
219
211
  email_subject: Zostałeś zaakceptowany jak współtwórca %{resource_title}.
220
212
  notification_title: Otrzymałeś <strong>zgodę na dostęp jako współtwórca</strong> wspólnego szkicu <a href="%{resource_path}">%{resource_title}</a>.
221
213
  collaborative_draft_access_requester_rejected:
222
- email_intro: Nie otrzymałeś dostępu jako współtwórca wspólnego szkicu <a href="%{resource_path}">%{resource_title}</a>.
223
- email_outro: Otrzymałeś to powiadomienie, ponieważ poprosiłeś o dostęp jako współtwórca <a href="%{resource_path}">%{resource_title}</a>.
224
214
  email_subject: Zostałeś odrzucony jako współtwórca %{resource_title}.
225
215
  notification_title: <strong>Nie otrzymałeś dostępu jako współtwórca</strong> wspólnego szkicu <a href="%{resource_path}">%{resource_title}</a>.
226
216
  collaborative_draft_withdrawn:
227
- email_intro: <a href="%{author_path}">%{author_name} %{author_nickname}</a> wycofał(a) wspólny szkic <a href="%{resource_path}">%{resource_title}</a>.
228
- email_outro: Otrzymałeś to powiadomienie, ponieważ jesteś współtwórcą <a href="%{resource_path}">%{resource_title}</a>.
229
217
  email_subject: "%{author_name} %{author_nickname} wycofał(a) wspólny szkic %{resource_title}."
230
218
  notification_title: <a href="%{author_path}">%{author_name} %{author_nickname}</a> <strong>wycofał(a)</strong> wspólny szkic <a href="%{resource_path}">%{resource_title}</a>.
231
219
  creation_enabled:
@@ -772,7 +760,6 @@ pl:
772
760
  other: wsparcia
773
761
  new:
774
762
  send: Dalej
775
- title: Utwórz swoją propozycję
776
763
  orders:
777
764
  label: 'Sortuj propozycje według:'
778
765
  most_commented: Najczęściej komentowane
@@ -192,33 +192,21 @@ pt-BR:
192
192
  email_subject: Alguém deixou uma nota na proposta %{resource_title}.
193
193
  notification_title: Alguém deixou uma nota na proposta <a href="%{resource_path}">%{resource_title}</a>. Confira no <a href="%{admin_proposal_info_path}">painel de administração</a>
194
194
  collaborative_draft_access_accepted:
195
- email_intro: '%{requester_name} foi aceito para acessar como colaborador do rascunho colaborativo <a href="%{resource_path}">%{resource_title}</a>.'
196
- email_outro: Você recebeu esta notificação porque é colaborador de <a href="%{resource_path}">%{resource_title}</a>.
197
195
  email_subject: "%{requester_name} foi aceito para acessar como contribuidor %{resource_title}."
198
196
  notification_title: <a href="%{requester_path}">%{requester_name} %{requester_nickname}</a> foi aceito <strong>para acessar como colaborador</strong> do projeto colaborativo <a href="%{resource_path}">%{resource_title}</a>.
199
197
  collaborative_draft_access_rejected:
200
- email_intro: '%{requester_name} foi rejeitado para acessar como colaborador do projeto de colaboração <a href="%{resource_path}">%{resource_title}</a>.'
201
- email_outro: Você recebeu esta notificação porque é colaborador de <a href="%{resource_path}">%{resource_title}</a>.
202
198
  email_subject: "%{requester_name} foi rejeitado para acessar como colaborador do %{resource_title} esboço colaborativo."
203
199
  notification_title: <a href="%{requester_path}">%{requester_name} %{requester_nickname}</a> foi <strong>rejeitado para acessar como colaborador</strong> do projeto colaborativo <a href="%{resource_path}">%{resource_title}</a>.
204
200
  collaborative_draft_access_requested:
205
- email_intro: '%{requester_name} solicitou acesso como colaborador. Você pode <strong>aceitar ou rejeitar a solicitação</strong> da página de rascunho colaborativo <a href="%{resource_path}">%{resource_title}</a>.'
206
- email_outro: Você recebeu esta notificação porque é colaborador de <a href="%{resource_path}">%{resource_title}</a>.
207
201
  email_subject: "%{requester_name} solicitou acesso para contribuir com %{resource_title}."
208
202
  notification_title: <a href="%{requester_path}">%{requester_name} %{requester_nickname}</a> solicitou acesso para contribuir para o projeto de colaboração <a href="%{resource_path}">%{resource_title}</a> . Por favor, <strong>aceite ou rejeite o pedido</strong>.
209
203
  collaborative_draft_access_requester_accepted:
210
- email_intro: Você foi aceito para acessar como colaborador do rascunho colaborativo <a href="%{resource_path}">%{resource_title}</a>.
211
- email_outro: Você recebeu esta notificação porque pediu para se tornar um colaborador de <a href="%{resource_path}">%{resource_title}</a>.
212
204
  email_subject: Você foi aceito como colaborador de %{resource_title}.
213
205
  notification_title: Você foi aceito como <strong>para acessar como colaborador</strong> do projeto colaborativo <a href="%{resource_path}">%{resource_title}</a>.
214
206
  collaborative_draft_access_requester_rejected:
215
- email_intro: Você foi rejeitado para acessar como colaborador do rascunho colaborativo <a href="%{resource_path}">%{resource_title}</a>.
216
- email_outro: Você recebeu esta notificação porque pediu para se tornar um colaborador de <a href="%{resource_path}">%{resource_title}</a>.
217
207
  email_subject: Você foi rejeitado como colaborador de %{resource_title}.
218
208
  notification_title: Você foi <strong>rejeitado para acessar como colaborador</strong> do projeto colaborativo <a href="%{resource_path}">%{resource_title}</a>.
219
209
  collaborative_draft_withdrawn:
220
- email_intro: <a href="%{author_path}">%{author_name} %{author_nickname}</a> retirou o esboço de colaboração <a href="%{resource_path}">%{resource_title}</a>.
221
- email_outro: Você recebeu esta notificação porque é colaborador de <a href="%{resource_path}">%{resource_title}</a>.
222
210
  email_subject: "%{author_name} %{author_nickname} retirou o %{resource_title} rascunho colaborativo."
223
211
  notification_title: <a href="%{author_path}">%{author_name} %{author_nickname}</a> <strong>retirado</strong> o <a href="%{resource_path}">%{resource_title}</a> rascunho colaborativo.
224
212
  creation_enabled:
@@ -758,7 +746,6 @@ pt-BR:
758
746
  other: votos
759
747
  new:
760
748
  send: Continuar
761
- title: Crie sua proposta
762
749
  orders:
763
750
  label: 'Ordene propostas por:'
764
751
  most_commented: Mais comentados
@@ -224,33 +224,21 @@ pt:
224
224
  email_subject: Alguém deixou uma nota na proposta %{resource_title}.
225
225
  notification_title: Alguém deixou uma nota na proposta <a href="%{resource_path}">%{resource_title}</a>. Consulte-a no <a href="%{admin_proposal_info_path}">painel de administrador</a>
226
226
  collaborative_draft_access_accepted:
227
- email_intro: '%{requester_name} foi aceite para aceder como colaborador do rascunho colaborativo <a href="%{resource_path}">%{resource_title}</a>.'
228
- email_outro: Recebeu esta notificação porque é colaborador de <a href="%{resource_path}">%{resource_title}</a>.
229
227
  email_subject: "%{requester_name} foi aceite para aceder como contribuidor de %{resource_title}."
230
228
  notification_title: <a href="%{requester_path}">%{requester_name} %{requester_nickname}</a> foi aceite <strong>para aceder como colaborador</strong> do projeto colaborativo <a href="%{resource_path}">%{resource_title}</a>.
231
229
  collaborative_draft_access_rejected:
232
- email_intro: '%{requester_name} foi rejeitado para aceder como colaborador do projeto colaborativo <a href="%{resource_path}">%{resource_title}</a>.'
233
- email_outro: Recebeu esta notificação porque é colaborador de <a href="%{resource_path}">%{resource_title}</a>.
234
230
  email_subject: "%{requester_name} foi rejeitado para aceder como colaborador do rascunho colaborativo %{resource_title}."
235
231
  notification_title: <a href="%{requester_path}">%{requester_name} %{requester_nickname}</a> foi <strong>rejeitado para aceder como colaborador</strong> do rascunho colaborativo <a href="%{resource_path}">%{resource_title}</a>.
236
232
  collaborative_draft_access_requested:
237
- email_intro: '%{requester_name} solicitou acesso como colaborador. Pode <strong>aceitar ou rejeitar o pedido</strong> na página de rascunho colaborativo <a href="%{resource_path}">%{resource_title}</a>.'
238
- email_outro: Recebeu esta notificação porque é colaborador de <a href="%{resource_path}">%{resource_title}</a>.
239
233
  email_subject: "%{requester_name} solicitou acesso para contribuir em %{resource_title}."
240
234
  notification_title: <a href="%{requester_path}">%{requester_name} %{requester_nickname}</a> solicitou acesso para contribuir no rascunho colaborativo <a href="%{resource_path}">%{resource_title}</a>. Por favor, <strong>aceite ou rejeite o pedido</strong>.
241
235
  collaborative_draft_access_requester_accepted:
242
- email_intro: Foi aceite para aceder como colaborador do rascunho colaborativo <a href="%{resource_path}">%{resource_title}</a>.
243
- email_outro: Recebeu esta notificação porque pediu para se tornar um colaborador de <a href="%{resource_path}">%{resource_title}</a>.
244
236
  email_subject: Foi aceite como colaborador de %{resource_title}.
245
237
  notification_title: Foi <strong>aceite para aceder como colaborador</strong> do rascunho colaborativo <a href="%{resource_path}">%{resource_title}</a>.
246
238
  collaborative_draft_access_requester_rejected:
247
- email_intro: Foi rejeitado para aceder como colaborador do rascunho colaborativo <a href="%{resource_path}">%{resource_title}</a>.
248
- email_outro: Recebeu esta notificação porque pediu para se tornar um colaborador de <a href="%{resource_path}">%{resource_title}</a>.
249
239
  email_subject: Foi rejeitado como colaborador de %{resource_title}.
250
240
  notification_title: Foi <strong>rejeitado para aceder como colaborador</strong> do rascunho colaborativo <a href="%{resource_path}">%{resource_title}</a>.
251
241
  collaborative_draft_withdrawn:
252
- email_intro: <a href="%{author_path}">%{author_name} %{author_nickname}</a> retirou o rascunho colaborativo <a href="%{resource_path}">%{resource_title}</a>.
253
- email_outro: Recebeu esta notificação porque é colaborador de <a href="%{resource_path}">%{resource_title}</a>.
254
242
  email_subject: "%{author_name} %{author_nickname} retirou o %{resource_title} rascunho colaborativo."
255
243
  notification_title: <a href="%{author_path}">%{author_name} %{author_nickname}</a> <strong>retirou</strong> o rascunho colaborativo <a href="%{resource_path}">%{resource_title}</a>.
256
244
  creation_enabled:
@@ -795,7 +783,6 @@ pt:
795
783
  other: votos
796
784
  new:
797
785
  send: Continuar
798
- title: Criar a Sua proposta
799
786
  orders:
800
787
  label: 'Ordenar propostas por:'
801
788
  most_commented: Mais comentadas
@@ -229,33 +229,21 @@ ro:
229
229
  email_subject: Cineva a trimis o notă la propunerea %{resource_title}.
230
230
  notification_title: Cineva a lăsat o notă la propunerea <a href="%{resource_path}">%{resource_title}</a>. Verifică detaliile în <a href="%{admin_proposal_info_path}">panoul de administrare</a>
231
231
  collaborative_draft_access_accepted:
232
- email_intro: '%{requester_name} a fost acceptat drept colaborator pentru ciorna colaborativă <a href="%{resource_path}">%{resource_title}</a>.'
233
- email_outro: Ai primit această notificare deoarece ești colaborator pentru <a href="%{resource_path}">%{resource_title}</a>.
234
232
  email_subject: "Utilizatorul %{requester_name} a fost acceptat drept colaborator pentru %{resource_title}."
235
233
  notification_title: <a href="%{requester_path}">%{requester_name} %{requester_nickname}</a> a fost <strong>acceptat drept colaborator</strong> pentru ciorna colaborativă <a href="%{resource_path}">%{resource_title}</a>.
236
234
  collaborative_draft_access_rejected:
237
- email_intro: '%{requester_name} a fost respins drept colaborator pentru ciorna colaborativă <a href="%{resource_path}">%{resource_title}</a>.'
238
- email_outro: Ai primit această notificare deoarece ești colaborator pentru <a href="%{resource_path}">%{resource_title}</a>.
239
235
  email_subject: "%{requester_name} a fost respins drept colaborator pentru ciorna colaborativă %{resource_title}."
240
236
  notification_title: <a href="%{requester_path}">%{requester_name} %{requester_nickname}</a> a fost <strong>respins drept colaborator</strong> pentru ciorna colaborativă <a href="%{resource_path}">%{resource_title}</a>.
241
237
  collaborative_draft_access_requested:
242
- email_intro: '%{requester_name} a solicitat acces drept colaborator. Poți <strong>accepta sau respinge cererea</strong> din pagina ciornei colaborative <a href="%{resource_path}">%{resource_title}</a>.'
243
- email_outro: Ai primit această notificare deoarece ești colaborator pentru <a href="%{resource_path}">%{resource_title}</a>.
244
238
  email_subject: "%{requester_name} a solicitat acces pentru a contribui la %{resource_title}."
245
239
  notification_title: <a href="%{requester_path}">%{requester_name} %{requester_nickname}</a> a solicitat acces pentru a contribui la ciorna colaborativă <a href="%{resource_path}">%{resource_title}</a>. Te rugăm <strong>acceptă sau respinge cererea</strong>.
246
240
  collaborative_draft_access_requester_accepted:
247
- email_intro: Ai fost acceptat drept colaborator pentru ciorna colaborativă <a href="%{resource_path}">%{resource_title}</a>.
248
- email_outro: Ai primit această notificare deoarece ai solicitat să devii colaborator pentru <a href="%{resource_path}">%{resource_title}</a>.
249
241
  email_subject: Ai fost acceptat drept colaborator pentru %{resource_title}.
250
242
  notification_title: Ai fost <strong>acceptat drept colaborator</strong> pentru ciorna colaborativă <a href="%{resource_path}">%{resource_title}</a>.
251
243
  collaborative_draft_access_requester_rejected:
252
- email_intro: Ai fost respins drept colaborator pentru ciorna colaborativă <a href="%{resource_path}">%{resource_title}</a>.
253
- email_outro: Ai primit această notificare deoarece ai solicitat să devii colaborator pentru <a href="%{resource_path}">%{resource_title}</a>.
254
244
  email_subject: Ai fost respins drept colaborator pentru %{resource_title}.
255
245
  notification_title: Ai fost <strong>respins drept colaborator</strong> pentru ciorna colaborativă <a href="%{resource_path}">%{resource_title}</a>.
256
246
  collaborative_draft_withdrawn:
257
- email_intro: <a href="%{author_path}">%{author_name} %{author_nickname}</a> a retras ciorna colaborativă <a href="%{resource_path}">%{resource_title}</a>.
258
- email_outro: Ai primit această notificare deoarece ești colaborator pentru <a href="%{resource_path}">%{resource_title}</a>.
259
247
  email_subject: "%{author_name} %{author_nickname} a retras ciorna colaborativă %{resource_title}."
260
248
  notification_title: <a href="%{author_path}">%{author_name} %{author_nickname}</a> <strong>a retras</strong> ciorna colaborativă <a href="%{resource_path}">%{resource_title}</a>.
261
249
  creation_enabled:
@@ -825,7 +813,6 @@ ro:
825
813
  other: voturi
826
814
  new:
827
815
  send: Continuă
828
- title: Creează propunerea ta
829
816
  orders:
830
817
  label: 'Ordonează propunerile după:'
831
818
  most_commented: Cele mai comentate
@@ -292,7 +292,6 @@ ru:
292
292
  other: голоса
293
293
  new:
294
294
  send: Продолжить
295
- title: Создайте свое предложение
296
295
  orders:
297
296
  label: 'Упорядочить предложения по:'
298
297
  most_voted: С наибольшим количеством голосов
@@ -157,33 +157,21 @@ sk:
157
157
  events:
158
158
  proposals:
159
159
  collaborative_draft_access_accepted:
160
- email_intro: '%{requester_name} má prístup ako prispievateľ k <a href="%{resource_path}">%{resource_title} </a> spoločnému návrhu.'
161
- email_outro: Toto oznámenie ste dostali, pretože ste spolupracovníkom používateľa <a href="%{resource_path}"> %{resource_title} </a>.
162
160
  email_subject: "%{requester_name} bol prijatý k prístupu ako prispievateľ %{resource_title}."
163
161
  notification_title: <a href="%{requester_path}">%{requester_name} %{requester_nickname} </a> je <strong> má prístup ako prispievateľ </strong> v spoločnom návrhu <a href="%{resource_path}">%{resource_title} </a>.
164
162
  collaborative_draft_access_rejected:
165
- email_intro: '%{requester_name} mal zamietnutý prístup k projektu <a href="%{resource_path}">%{resource_title} </a>.'
166
- email_outro: Toto oznámenie ste dostali, pretože ste spolupracovníkom používateľa <a href="%{resource_path}">%{resource_title} </a>.
167
163
  email_subject: "%{requester_name} mal odmietnutý pre prístup ako prispievateľ ku %{resource_title} kolektívnemu návrhu."
168
164
  notification_title: <a href="%{requester_path}">%{requester_name}%{requester_nickname} </a><strong> mal odmietnutý prístup ako prispievateľ </strong>ku spoločnému návrhu <a href = "%{resource_path}" >%{resource_title} </a>.
169
165
  collaborative_draft_access_requested:
170
- email_intro: '%{requester_name} požadoval prístup ako prispievateľ. Môžete <strong> prijať alebo odmietnuť žiadosť </strong> na <a href="%{resource_path}">%{resource_title} </a> stránke spoločného návrhu.'
171
- email_outro: Toto oznámenie ste dostali, pretože ste spolupracovníkom používateľa <a href="%{resource_path}">%{resource_title} </a>.
172
166
  email_subject: "%{requester_name} požiadal o prístup ku spolupráci na %{resource_title}."
173
167
  notification_title: <a href="%{requester_path}">%{requester_name}%{requester_nickname} </a> požiadal o prístup ku spolupráci na <a href="%{resource_path}">%{resource_title} </a>. Prosíme <strong> prijmite alebo odmietnite žiadosť </strong>.
174
168
  collaborative_draft_access_requester_accepted:
175
- email_intro: Bol Vám povolený prístup ku prispeniu na spoločnom návrhu <a href="%{resource_path}">%{resource_title} </a>.
176
- email_outro: Toto oznámenie ste dostali, pretože ste požiadali, aby ste sa stal spolupracovníkom používateľa <a href="%{resource_path}">%{resource_title} </a>.
177
169
  email_subject: Boli ste prijatí ako prispievateľ%{resource_title}.
178
170
  notification_title: Máte <strong> prístup ako prispievateľ </strong> na spoločnom návrhu <a href="%{resource_path}">%{resource_title} </a>.
179
171
  collaborative_draft_access_requester_rejected:
180
- email_intro: Váš prístup ku prispeniu na spoločnom návrhu <a href="%{resource_path}">%{resource_title} </a> bol odmietnutý.
181
- email_outro: Toto oznámenie ste dostali, pretože ste požiadali, aby ste sa stal spolupracovníkom používateľa <a href="%{resource_path}">%{resource_title} </a>.
182
172
  email_subject: Bol ste odmietnutý ako prispievateľ ku %{resource_title}.
183
173
  notification_title: Boli ste <strong> odmietnutý ako prispievateľ ku </strong> spoločnému návrhu <a href="%{resource_path}">%{resource_title} </a>.
184
174
  collaborative_draft_withdrawn:
185
- email_intro: <a href="%{author_path}">%{author_name} %{author_nickname} </a> zrušil <a href="%{resource_path}">% {resource_title} </a> návrh spolupráce.
186
- email_outro: Toto oznámenie ste dostali, pretože ste spolupracovníkom používateľa <a href="%{resource_path}">%{resource_title} </a>.
187
175
  email_subject: "% {AUTHOR_NAME}% {author_nickname} stiahol% {resource_title} návrh spolupráce."
188
176
  notification_title: <a href="%{author_path}">% {AUTHOR_NAME}% {author_nickname} </a> <strong> stiahnuté </ strong> <a href="%{resource_path}">% {resource_title} </ a> návrh spolupráce.
189
177
  creation_enabled:
@@ -716,7 +704,6 @@ sk:
716
704
  other: hlasov
717
705
  new:
718
706
  send: Pokračovať
719
- title: Vytvorte svoj návrh
720
707
  orders:
721
708
  label: 'Objednajte návrhy podľa:'
722
709
  most_commented: Najviac komentované
@@ -225,33 +225,21 @@ sv:
225
225
  email_subject: Någon lämnade en anteckning på förslag %{resource_title}.
226
226
  notification_title: Någon har lämnat en anteckning om förslaget <a href="%{resource_path}">%{resource_title}</a>. Kolla in det på <a href="%{admin_proposal_info_path}">adminpanelen</a>
227
227
  collaborative_draft_access_accepted:
228
- email_intro: '%{requester_name} har nu tillgång till och är accepterad som bidragsgivare till det gemensamma utkastet <a href="%{resource_path}">%{resource_title}</a>.'
229
- email_outro: Du har fått det här meddelandet eftersom du är bidragsgivare till <a href="%{resource_path}">%{resource_title}</a>.
230
228
  email_subject: "%{requester_name} har fått tillgång till och är accepterad som bidragsgivare till %{resource_title}."
231
229
  notification_title: <a href="%{requester_path}">%{requester_name} %{requester_nickname}</a> har <strong>fått tillgång till och accepterats som bidragsgivare till</strong> det gemensamma utkastet <a href="%{resource_path}">%{resource_title}</a>.
232
230
  collaborative_draft_access_rejected:
233
- email_intro: '%{requester_name} har avvisats från få tillgång till det gemensamma utkastet <a href="%{resource_path}">%{resource_title}</a> som bidragsgivare.'
234
- email_outro: Du har fått det här meddelandet eftersom du är medarbetare till <a href="%{resource_path}">%{resource_title}</a>.
235
231
  email_subject: "%{requester_name} har avvisats från att få tillgång till det gemensamma utkastet %{resource_title} som bidragsgivare."
236
232
  notification_title: <a href="%{requester_path}">%{requester_name} %{requester_nickname}</a> har <strong>avvisats från att få tillgång till</strong> av det gemensamma utkastet <a href="%{resource_path}">%{resource_title}</a> som bidragsgivare.
237
233
  collaborative_draft_access_requested:
238
- email_intro: '%{requester_name} begärde tillgång som bidragsgivare. Du kan <strong>acceptera eller avvisa begäran</strong> från sidan för det gemensamma utkastet <a href="%{resource_path}">%{resource_title}</a>.'
239
- email_outro: Du har fått det här meddelandet eftersom du är bidragsgivare till <a href="%{resource_path}">%{resource_title}</a>.
240
234
  email_subject: "%{requester_name} begärde tillgång att bidra till %{resource_title}."
241
235
  notification_title: <a href="%{requester_path}">%{requester_name} %{requester_nickname}</a> begärde tillgång för att få bidra till det gemensamma utkastet <a href="%{resource_path}">%{resource_title}</a>. <strong>Godkänn eller avvisa begäran</strong>.
242
236
  collaborative_draft_access_requester_accepted:
243
- email_intro: Du har godkänts att få tillgång till det gemensamma utkastet <a href="%{resource_path}">%{resource_title}</a> som bidragsgivare.
244
- email_outro: Du har fått det här meddelandet eftersom du bad att bli bidragsgivare till <a href="%{resource_path}">%{resource_title}</a>.
245
237
  email_subject: Du har godkänts som bidragstagare till %{resource_title}.
246
238
  notification_title: Du har blivit <strong>accepterad för att få tillgång till </strong> av det gemensamma utkastet <a href="%{resource_path}">%{resource_title}</a> som bidragsgivare.
247
239
  collaborative_draft_access_requester_rejected:
248
- email_intro: Du har blivit avvisad att bli bidragsgivare till det gemensamma utkastet <a href="%{resource_path}">%{resource_title}</a>.
249
- email_outro: Du har fått det här meddelandet eftersom du bad om att bli bidragsgivare till <a href="%{resource_path}">%{resource_title}</a>.
250
240
  email_subject: Du har blivit avvisad som bidragsgivare till %{resource_title}.
251
241
  notification_title: Du har blivit <strong>avvisad tillgång till </strong> det gemensamma förslaget <a href="%{resource_path}">%{resource_title}</a> som bidragsgivare.
252
242
  collaborative_draft_withdrawn:
253
- email_intro: <a href="%{author_path}">%{author_name} %{author_nickname}</a> drog tillbaka det gemensamma utkastet <a href="%{resource_path}">%{resource_title}</a>.
254
- email_outro: Du har fått det här meddelandet eftersom du är en bidragsgivare till <a href="%{resource_path}">%{resource_title}</a>.
255
243
  email_subject: "%{author_name} %{author_nickname} drog tillbaka det gemensamma utkastet %{resource_title}."
256
244
  notification_title: <a href="%{author_path}">%{author_name} %{author_nickname}</a> <strong>drog tillbaka</strong> det gemensamma utkastet <a href="%{resource_path}">%{resource_title}</a>.
257
245
  creation_enabled:
@@ -814,7 +802,6 @@ sv:
814
802
  other: stöd
815
803
  new:
816
804
  send: Fortsätt
817
- title: Skapa ditt förslag
818
805
  orders:
819
806
  label: 'Ordna förslag efter:'
820
807
  most_commented: Mest kommenterade
@@ -185,33 +185,21 @@ tr:
185
185
  email_subject: Birisi %{resource_title} teklifine not bıraktı.
186
186
  notification_title: Birisi teklif <a href="%{resource_path}">%{resource_title} </a> hakkında bir not bıraktı. <a href="%{admin_proposal_info_path}"> Yönetici panelinden </a> kontrol edin
187
187
  collaborative_draft_access_accepted:
188
- email_intro: '%{requester_name}, <a href="%{resource_path}">%{resource_title} </a> ortak çalışma taslağına katkıda bulunan kişi olarak erişim için kabul edildi.'
189
- email_outro: Bu bildirimi, <a href="%{resource_path}">%{resource_title} </a> ortak çalışanı olduğunuz için aldınız.
190
188
  email_subject: "%{requester_name}, %{resource_title} katkı sağlayıcısı olarak erişim için kabul edildi."
191
189
  notification_title: <a href="%{requester_path}">%{requester_name} %{requester_nickname} </a> için <strong> katkıda bulunan </strong> olarak erişim için kabul edildi <a href = "%{resource_path}">%{resource_title} </a> ortak çalışma taslağı.
192
190
  collaborative_draft_access_rejected:
193
- email_intro: '<a href="%{resource_path}">%{resource_title}</a> işbirlikçi taslağın katılımcısı olarak erişim için %{requester_name} reddedildi.'
194
- email_outro: Bu bildirimi, <a href="%{resource_path}">%{resource_title} </a> ortak çalışanı olduğunuz için aldınız.
195
191
  email_subject: "%{requester_name}, %{resource_title} ortak çalışma taslağına katkıda bulunan kişi olarak erişimi reddedildi."
196
192
  notification_title: <a href="%{requester_path}">%{requester_name} %{requester_nickname}</a> , <a href="%{resource_path}">%{resource_title}</a> işbirlikçi taslağın bir katkıcısı</strong> olarak erişmek için <strong>reddedilmiştir.
197
193
  collaborative_draft_access_requested:
198
- email_intro: '%{requester_name} katkıda bulunan olarak erişim istedi. <a href="%{resource_path}">%{resource_title} </a> ortak çalışma taslak sayfasından <strong> isteği kabul edebilir veya reddedebilirsiniz </strong>.'
199
- email_outro: Bu bildirimi, <a href="%{resource_path}">%{resource_title} </a> ortak çalışanı olduğunuz için aldınız.
200
194
  email_subject: "%{requester_name}, %{resource_title} kaynağına katkıda bulunmak için erişim istedi."
201
195
  notification_title: <a href="%{requester_path}">%{requester_name} %{requester_nickname} </a>, <a href="%{resource_path}">%{resource_title} </a> ortak çalışma taslağına katkıda bulunmak için erişim istedi. Lütfen <strong> isteği kabul edin veya reddedin </strong>.
202
196
  collaborative_draft_access_requester_accepted:
203
- email_intro: <a href="%{resource_path}">%{resource_title} </a> ortak çalışma taslağına katkıda bulunan olarak erişmeniz kabul edildi.
204
- email_outro: Bu bildirimi, <a href="%{resource_path}">%{resource_title} </a> ortak çalışanı olmayı talep ettiğiniz için aldınız.
205
197
  email_subject: '%{resource_title} katılımcısı olarak kabul edildiniz.'
206
198
  notification_title: <a href="%{resource_path}">%{resource_title} </a> ortak çalışma taslağına <strong> katkıda bulunan kişi olarak erişmeniz kabul edildi </strong>.
207
199
  collaborative_draft_access_requester_rejected:
208
- email_intro: <a href="%{resource_path}">%{resource_title} </a> ortak çalışma taslağına katkıda bulunan olarak erişiminiz reddedildi.
209
- email_outro: Bu bildirimi, <a href="%{resource_path}">%{resource_title} </a> ortak çalışanı olmayı talep ettiğiniz için aldınız.
210
200
  email_subject: '%{resource_title} katılımcısı olarak reddedildiniz.'
211
201
  notification_title: <a href="%{resource_path}">%{resource_title} </a> ortak çalışma taslağına <strong> katkıda bulunan olarak erişiminiz reddedildi </strong>.
212
202
  collaborative_draft_withdrawn:
213
- email_intro: <a href="%{author_path}">%{author_name} %{author_nickname} </a>, <a href="%{resource_path}">%{resource_title} </a> ortak çalışma taslağını geri çekti.
214
- email_outro: Bu bildirimi, <a href="%{resource_path}">%{resource_title} </a> ortak çalışanı olduğunuz için aldınız.
215
203
  email_subject: "%{author_name} %{author_nickname}, %{resource_title} ortak çalışma taslağını geri çekti."
216
204
  notification_title: <a href="%{author_path}">%{author_name} %{author_nickname} </a> <a href="%{resource_path}">%{resource_title} </a> işbirlikçi taslak öğesini <strong> geri çekti </strong>.
217
205
  creation_enabled:
@@ -746,7 +734,6 @@ tr:
746
734
  other: destekler
747
735
  new:
748
736
  send: Devam et
749
- title: Teklifinizi Oluşturun
750
737
  orders:
751
738
  label: 'Teklifleri şuna göre sırala:'
752
739
  most_commented: En çok yorum yapılan
@@ -292,7 +292,6 @@ uk:
292
292
  other: голосів
293
293
  new:
294
294
  send: Продовжити
295
- title: Внесіть свою пропозицію
296
295
  orders:
297
296
  label: 'Впорядкувати пропозиції за:'
298
297
  most_voted: Отримали найбільше голосів
@@ -178,30 +178,19 @@ zh-CN:
178
178
  email_subject: 有人在建议 %{resource_title} 留下了一条笔记。
179
179
  notification_title: 有人在提议 <a href="%{resource_path}">%{resource_title}</a>留下了一条笔记。请在 <a href="%{admin_proposal_info_path}">管理面板</a>
180
180
  collaborative_draft_access_accepted:
181
- email_intro: '%{requester_name} 已被接受作为贡献者访问 <a href="%{resource_path}">%{resource_title}</a> 协作草案。'
182
- email_outro: 您收到此通知是因为您是 <a href="%{resource_path}">%{resource_title}的合作者</a>
183
181
  email_subject: "%{requester_name} 已被接受作为贡献者访问 %{resource_title}。"
184
182
  collaborative_draft_access_rejected:
185
- email_intro: '%{requester_name} 已被拒绝以贡献者身份访问 <a href="%{resource_path}">%{resource_title}</a> 协作草稿。'
186
- email_outro: 您收到此通知是因为您是 <a href="%{resource_path}">%{resource_title}的合作者</a>
187
183
  email_subject: "%{requester_name} 在 %{resource_title} 协作草稿中的贡献者被拒绝访问。"
188
184
  notification_title: <a href="%{requester_path}">%{requester_name} %{requester_nickname}</a> 已被 <strong>拒绝以贡献者身份访问</strong> <a href="%{resource_path}">%{resource_title}</a> 合作草稿。
189
185
  collaborative_draft_access_requested:
190
- email_outro: 您收到此通知是因为您是 <a href="%{resource_path}">%{resource_title}的合作者</a>
191
186
  email_subject: "%{requester_name} 请求访问权限为 %{resource_title} 捐款。"
192
187
  notification_title: <a href="%{requester_path}">%{requester_name} %{requester_nickname}</a> 请求访问权限以便为 <a href="%{resource_path}">%{resource_title}</a> 协作草稿。请 <strong>接受或拒绝请求</strong>
193
188
  collaborative_draft_access_requester_accepted:
194
- email_intro: 您已被接受作为 <a href="%{resource_path}">%{resource_title}</a> 协作草稿的贡献者访问权限。
195
- email_outro: 您收到此通知是因为您请求成为 <a href="%{resource_path}">%{resource_title}</a> 的合作者。
196
189
  email_subject: 您已被接受为 %{resource_title} 的贡献者。
197
190
  collaborative_draft_access_requester_rejected:
198
- email_intro: 您已被拒绝以贡献者身份访问 <a href="%{resource_path}">%{resource_title}</a> 协作草稿。
199
- email_outro: 您收到此通知是因为您请求成为 <a href="%{resource_path}">%{resource_title}</a> 的合作者。
200
191
  email_subject: 您已被拒绝为 %{resource_title} 的贡献者。
201
192
  notification_title: 您在 <a href="%{resource_path}">%{resource_title}</a> 协作草稿中的 <strong>被拒绝作为贡献者</strong> 访问。
202
193
  collaborative_draft_withdrawn:
203
- email_intro: <a href="%{author_path}">%{author_name} %{author_nickname}</a> 撤回了 <a href="%{resource_path}">%{resource_title}</a> 协作草稿。
204
- email_outro: 您收到此通知是因为您是 <a href="%{resource_path}">%{resource_title}的合作者</a>
205
194
  email_subject: "%{author_name} %{author_nickname} 撤销了 %{resource_title} 协作草稿。"
206
195
  notification_title: <a href="%{author_path}">%{author_name} %{author_nickname}</a> <strong>撤回</strong> <a href="%{resource_path}">%{resource_title}</a> 协作草稿。
207
196
  creation_enabled:
@@ -718,7 +707,6 @@ zh-CN:
718
707
  other: 支持
719
708
  new:
720
709
  send: 继续
721
- title: 创建您的提议
722
710
  orders:
723
711
  label: '排序提议:'
724
712
  most_commented: 最多评论
@@ -12,89 +12,33 @@ module Decidim
12
12
  # Also fills a `Metadata#linked_proposals` attribute.
13
13
  #
14
14
  # @see BaseParser Examples of how to use a content parser
15
- class ProposalParser < BaseParser
15
+ class ProposalParser < ResourceParser
16
16
  # Class used as a container for metadata
17
17
  #
18
18
  # @!attribute linked_proposals
19
19
  # @return [Array] an array of Decidim::Proposals::Proposal mentioned in content
20
20
  Metadata = Struct.new(:linked_proposals)
21
21
 
22
- # Matches a URL
23
- URL_REGEX_SCHEME = '(?:http(s)?:\/\/)'
24
- URL_REGEX_CONTENT = '[\w.-]+[\w\-\._~:\/?#\[\]@!\$&\'\(\)\*\+,;=.]+'
25
- URL_REGEX_END_CHAR = '[\d]'
26
- URL_REGEX = %r{#{URL_REGEX_SCHEME}#{URL_REGEX_CONTENT}/proposals/#{URL_REGEX_END_CHAR}+}i.freeze
27
- # Matches a mentioned Proposal ID (~(d)+ expression)
28
- ID_REGEX = /~(\d+)/.freeze
29
-
30
22
  def initialize(content, context)
31
23
  super
32
24
  @metadata = Metadata.new([])
33
25
  end
34
26
 
35
- # Replaces found mentions matching an existing
36
- # Proposal with a global id for that Proposal. Other mentions found that doesn't
37
- # match an existing Proposal are returned as they are.
38
- #
39
- # @return [String] the content with the valid mentions replaced by a global id.
40
- def rewrite
41
- rewrited_content = parse_for_urls(content)
42
- parse_for_ids(rewrited_content)
43
- end
44
-
45
27
  # (see BaseParser#metadata)
46
28
  attr_reader :metadata
47
29
 
48
30
  private
49
31
 
50
- def parse_for_urls(content)
51
- content.gsub(URL_REGEX) do |match|
52
- proposal = proposal_from_url_match(match)
53
- if proposal
54
- @metadata.linked_proposals << proposal.id
55
- proposal.to_global_id
56
- else
57
- match
58
- end
59
- end
60
- end
61
-
62
- def parse_for_ids(content)
63
- content.gsub(ID_REGEX) do |match|
64
- proposal = proposal_from_id_match(Regexp.last_match(1))
65
- if proposal
66
- @metadata.linked_proposals << proposal.id
67
- proposal.to_global_id
68
- else
69
- match
70
- end
71
- end
72
- end
73
-
74
- def proposal_from_url_match(match)
75
- uri = URI.parse(match)
76
- return if uri.path.blank?
77
-
78
- proposal_id = uri.path.split("/").last
79
- find_proposal_by_id(proposal_id)
80
- rescue URI::InvalidURIError
81
- Rails.logger.error("#{e.message}=>#{e.backtrace}")
82
- nil
32
+ def url_regex
33
+ %r{#{URL_REGEX_SCHEME}#{URL_REGEX_CONTENT}/proposals/#{URL_REGEX_END_CHAR}+}i
83
34
  end
84
35
 
85
- def proposal_from_id_match(match)
86
- proposal_id = match
87
- find_proposal_by_id(proposal_id)
36
+ def model_class
37
+ "Decidim::Proposals::Proposal"
88
38
  end
89
39
 
90
- def find_proposal_by_id(id)
91
- if id.present?
92
- spaces = Decidim.participatory_space_manifests.flat_map do |manifest|
93
- manifest.participatory_spaces.call(context[:current_organization]).public_spaces
94
- end
95
- components = Component.where(participatory_space: spaces).published
96
- Decidim::Proposals::Proposal.where(component: components).find_by(id: id)
97
- end
40
+ def update_metadata(resource)
41
+ @metadata.linked_proposals << resource.id
98
42
  end
99
43
  end
100
44
  end
@@ -8,25 +8,9 @@ module Decidim
8
8
  # e.g. gid://<APP_NAME>/Decidim::Proposals::Proposal/1
9
9
  #
10
10
  # @see BaseRenderer Examples of how to use a content renderer
11
- class ProposalRenderer < BaseRenderer
12
- # Matches a global id representing a Decidim::User
13
- GLOBAL_ID_REGEX = %r{gid://([\w-]*/Decidim::Proposals::Proposal/(\d+))}i.freeze
14
-
15
- # Replaces found Global IDs matching an existing proposal with
16
- # a link to its show page. The Global IDs representing an
17
- # invalid Decidim::Proposals::Proposal are replaced with '???' string.
18
- #
19
- # @return [String] the content ready to display (contains HTML)
20
- def render(_options = nil)
21
- return content unless content.respond_to?(:gsub)
22
-
23
- content.gsub(GLOBAL_ID_REGEX) do |proposal_gid|
24
- proposal = GlobalID::Locator.locate(proposal_gid)
25
- Decidim::Proposals::ProposalPresenter.new(proposal).display_mention
26
- rescue ActiveRecord::RecordNotFound
27
- proposal_id = proposal_gid.split("/").last
28
- "~#{proposal_id}"
29
- end
11
+ class ProposalRenderer < ResourceRenderer
12
+ def regex
13
+ %r{gid://([\w-]*/Decidim::Proposals::Proposal/(\d+))}i
30
14
  end
31
15
  end
32
16
  end
@@ -66,11 +66,11 @@ Decidim.register_component(:proposals) do |component|
66
66
  settings.attribute :votes_blocked, type: :boolean
67
67
  settings.attribute :votes_hidden, type: :boolean, default: false
68
68
  settings.attribute :comments_blocked, type: :boolean, default: false
69
- settings.attribute :creation_enabled, type: :boolean
69
+ settings.attribute :creation_enabled, type: :boolean, readonly: ->(context) { context[:component].settings[:participatory_texts_enabled] }
70
70
  settings.attribute :proposal_answering_enabled, type: :boolean, default: true
71
- settings.attribute :default_sort_order, type: :select, include_blank: true, choices: -> { POSSIBLE_SORT_ORDERS }
72
71
  settings.attribute :publish_answers_immediately, type: :boolean, default: true
73
72
  settings.attribute :answers_with_costs, type: :boolean, default: false
73
+ settings.attribute :default_sort_order, type: :select, include_blank: true, choices: -> { POSSIBLE_SORT_ORDERS }
74
74
  settings.attribute :amendment_creation_enabled, type: :boolean, default: true
75
75
  settings.attribute :amendment_reaction_enabled, type: :boolean, default: true
76
76
  settings.attribute :amendment_promotion_enabled, type: :boolean, default: true
@@ -284,8 +284,8 @@ Decidim.register_component(:proposals) do |component|
284
284
 
285
285
  author = Decidim::User.find_or_initialize_by(email: email)
286
286
  author.update!(
287
- password: "password1234",
288
- password_confirmation: "password1234",
287
+ password: "decidim123456",
288
+ password_confirmation: "decidim123456",
289
289
  name: name,
290
290
  nickname: Faker::Twitter.unique.screen_name,
291
291
  organization: component.organization,
@@ -350,8 +350,8 @@ Decidim.register_component(:proposals) do |component|
350
350
 
351
351
  author = Decidim::User.find_or_initialize_by(email: email)
352
352
  author.update!(
353
- password: "password1234",
354
- password_confirmation: "password1234",
353
+ password: "decidim123456",
354
+ password_confirmation: "decidim123456",
355
355
  name: name,
356
356
  nickname: Faker::Twitter.unique.screen_name,
357
357
  organization: component.organization,
@@ -372,8 +372,8 @@ Decidim.register_component(:proposals) do |component|
372
372
 
373
373
  author = Decidim::User.find_or_initialize_by(email: email)
374
374
  author.update!(
375
- password: "password1234",
376
- password_confirmation: "password1234",
375
+ password: "decidim123456",
376
+ password_confirmation: "decidim123456",
377
377
  name: name,
378
378
  nickname: Faker::Twitter.unique.screen_name,
379
379
  organization: component.organization,
@@ -4,7 +4,7 @@ module Decidim
4
4
  # This holds decidim-proposals version.
5
5
  module Proposals
6
6
  def self.version
7
- "0.26.1"
7
+ "0.26.2"
8
8
  end
9
9
  end
10
10
  end