decidim-proposals 0.26.0.rc2 → 0.26.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (62) hide show
  1. checksums.yaml +4 -4
  2. data/app/cells/decidim/proposals/collaborative_draft_cell.rb +1 -1
  3. data/app/cells/decidim/proposals/participatory_text_proposal_cell.rb +1 -1
  4. data/app/cells/decidim/proposals/proposal_cell.rb +1 -1
  5. data/app/cells/decidim/proposals/proposal_m_cell.rb +3 -1
  6. data/app/cells/decidim/proposals/proposals_picker_cell.rb +1 -0
  7. data/app/commands/decidim/proposals/admin/answer_proposal.rb +7 -2
  8. data/app/commands/decidim/proposals/admin/create_proposal.rb +1 -1
  9. data/app/commands/decidim/proposals/admin/update_proposal.rb +1 -1
  10. data/app/commands/decidim/proposals/hashtags_methods.rb +1 -1
  11. data/app/events/decidim/proposals/admin/proposal_note_created_event.rb +1 -1
  12. data/app/events/decidim/proposals/collaborative_draft_withdrawn_event.rb +5 -1
  13. data/app/forms/decidim/proposals/admin/proposal_answer_form.rb +1 -1
  14. data/app/forms/decidim/proposals/admin/proposal_base_form.rb +1 -1
  15. data/app/helpers/decidim/proposals/application_helper.rb +1 -1
  16. data/app/models/decidim/proposals/proposal.rb +6 -0
  17. data/app/permissions/decidim/proposals/admin/permissions.rb +3 -0
  18. data/app/views/decidim/proposals/admin/proposal_answers/_form.html.erb +1 -1
  19. data/app/views/decidim/proposals/proposals/_proposal_similar.html.erb +1 -1
  20. data/app/views/decidim/proposals/proposals/index.html.erb +2 -2
  21. data/app/views/decidim/proposals/proposals/show.html.erb +3 -3
  22. data/config/locales/ar.yml +6 -13
  23. data/config/locales/bg.yml +0 -12
  24. data/config/locales/ca.yml +14 -12
  25. data/config/locales/cs.yml +14 -12
  26. data/config/locales/de.yml +1 -14
  27. data/config/locales/el.yml +1 -13
  28. data/config/locales/en.yml +15 -13
  29. data/config/locales/es-MX.yml +14 -12
  30. data/config/locales/es-PY.yml +14 -12
  31. data/config/locales/es.yml +15 -13
  32. data/config/locales/eu.yml +0 -13
  33. data/config/locales/fi-plain.yml +14 -12
  34. data/config/locales/fi.yml +16 -14
  35. data/config/locales/fr-CA.yml +13 -12
  36. data/config/locales/fr.yml +28 -27
  37. data/config/locales/gl.yml +2 -13
  38. data/config/locales/hu.yml +3 -13
  39. data/config/locales/id-ID.yml +0 -13
  40. data/config/locales/is-IS.yml +0 -1
  41. data/config/locales/it.yml +0 -13
  42. data/config/locales/ja.yml +16 -14
  43. data/config/locales/lv.yml +1 -13
  44. data/config/locales/nl.yml +0 -13
  45. data/config/locales/no.yml +133 -13
  46. data/config/locales/pl.yml +0 -13
  47. data/config/locales/pt-BR.yml +0 -13
  48. data/config/locales/pt.yml +0 -13
  49. data/config/locales/ro-RO.yml +2 -13
  50. data/config/locales/ru.yml +0 -1
  51. data/config/locales/sk.yml +1 -13
  52. data/config/locales/sr-CS.yml +2 -0
  53. data/config/locales/sv.yml +4 -15
  54. data/config/locales/tr-TR.yml +0 -13
  55. data/config/locales/uk.yml +0 -1
  56. data/config/locales/zh-CN.yml +0 -12
  57. data/lib/decidim/content_parsers/proposal_parser.rb +7 -63
  58. data/lib/decidim/content_renderers/proposal_renderer.rb +3 -19
  59. data/lib/decidim/proposals/component.rb +9 -8
  60. data/lib/decidim/proposals/import/proposal_creator.rb +4 -1
  61. data/lib/decidim/proposals/version.rb +1 -1
  62. metadata +20 -20
@@ -200,6 +200,7 @@ ro:
200
200
  answers_with_costs: Activează opțiunea de cost în răspunsurile la propuneri
201
201
  automatic_hashtags: Hashtag-uri adăugate la toate propunerile
202
202
  comments_blocked: Comentarii blocate
203
+ creation_enabled: Participantul poate crea propuneri
203
204
  default_sort_order: Mod implicit de sortare a propunerilor
204
205
  default_sort_order_help: Implicit înseamnă că dacă este activată votarea, propunerile vor fi afișate aleatoriu, și dacă votarea este blocată, atunci vor fi sortate în funcție de cele mai multe voturi.
205
206
  default_sort_order_options:
@@ -228,33 +229,21 @@ ro:
228
229
  email_subject: Cineva a trimis o notă la propunerea %{resource_title}.
229
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>
230
231
  collaborative_draft_access_accepted:
231
- email_intro: '%{requester_name} a fost acceptat drept colaborator pentru ciorna colaborativă <a href="%{resource_path}">%{resource_title}</a>.'
232
- email_outro: Ai primit această notificare deoarece ești colaborator pentru <a href="%{resource_path}">%{resource_title}</a>.
233
232
  email_subject: "Utilizatorul %{requester_name} a fost acceptat drept colaborator pentru %{resource_title}."
234
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>.
235
234
  collaborative_draft_access_rejected:
236
- email_intro: '%{requester_name} a fost respins drept colaborator pentru ciorna colaborativă <a href="%{resource_path}">%{resource_title}</a>.'
237
- email_outro: Ai primit această notificare deoarece ești colaborator pentru <a href="%{resource_path}">%{resource_title}</a>.
238
235
  email_subject: "%{requester_name} a fost respins drept colaborator pentru ciorna colaborativă %{resource_title}."
239
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>.
240
237
  collaborative_draft_access_requested:
241
- 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>.'
242
- email_outro: Ai primit această notificare deoarece ești colaborator pentru <a href="%{resource_path}">%{resource_title}</a>.
243
238
  email_subject: "%{requester_name} a solicitat acces pentru a contribui la %{resource_title}."
244
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>.
245
240
  collaborative_draft_access_requester_accepted:
246
- email_intro: Ai fost acceptat drept colaborator pentru ciorna colaborativă <a href="%{resource_path}">%{resource_title}</a>.
247
- email_outro: Ai primit această notificare deoarece ai solicitat să devii colaborator pentru <a href="%{resource_path}">%{resource_title}</a>.
248
241
  email_subject: Ai fost acceptat drept colaborator pentru %{resource_title}.
249
242
  notification_title: Ai fost <strong>acceptat drept colaborator</strong> pentru ciorna colaborativă <a href="%{resource_path}">%{resource_title}</a>.
250
243
  collaborative_draft_access_requester_rejected:
251
- email_intro: Ai fost respins drept colaborator pentru ciorna colaborativă <a href="%{resource_path}">%{resource_title}</a>.
252
- email_outro: Ai primit această notificare deoarece ai solicitat să devii colaborator pentru <a href="%{resource_path}">%{resource_title}</a>.
253
244
  email_subject: Ai fost respins drept colaborator pentru %{resource_title}.
254
245
  notification_title: Ai fost <strong>respins drept colaborator</strong> pentru ciorna colaborativă <a href="%{resource_path}">%{resource_title}</a>.
255
246
  collaborative_draft_withdrawn:
256
- email_intro: <a href="%{author_path}">%{author_name} %{author_nickname}</a> a retras ciorna colaborativă <a href="%{resource_path}">%{resource_title}</a>.
257
- email_outro: Ai primit această notificare deoarece ești colaborator pentru <a href="%{resource_path}">%{resource_title}</a>.
258
247
  email_subject: "%{author_name} %{author_nickname} a retras ciorna colaborativă %{resource_title}."
259
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>.
260
249
  creation_enabled:
@@ -303,6 +292,7 @@ ro:
303
292
  email_intro: Propunerea "%{resource_title}" a fost adăugată la "%{participatory_space_title}", spațiu participativ pe care îl urmărești.
304
293
  email_outro: Ai primit această notificare deoarece urmărești „%{participatory_space_title}”. Poți anula aceste notificări de la link-ul anterior.
305
294
  email_subject: O nouă propunere "%{resource_title}" a fost adăugată la %{participatory_space_title}
295
+ notification_title: Propunerea <a href="%{resource_path}">%{resource_title}</a> a fost adăugată la %{participatory_space_title} de %{author}
306
296
  proposal_rejected:
307
297
  affected_user:
308
298
  email_intro: 'Propunerea ta "%{resource_title}" a fost respinsă. Poți citi răspunsul în această pagină:'
@@ -823,7 +813,6 @@ ro:
823
813
  other: voturi
824
814
  new:
825
815
  send: Continuă
826
- title: Creează propunerea ta
827
816
  orders:
828
817
  label: 'Ordonează propunerile după:'
829
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:
@@ -674,6 +662,7 @@ sk:
674
662
  many: "%{count} návrhov"
675
663
  other: "%{count} návrhov"
676
664
  edit:
665
+ add_documents: Dokumenty
677
666
  attachment_legend: "(Voliteľné) Pridanie prílohy"
678
667
  back: Zadná
679
668
  select_a_category: Vyberte kategóriu
@@ -715,7 +704,6 @@ sk:
715
704
  other: hlasov
716
705
  new:
717
706
  send: Pokračovať
718
- title: Vytvorte svoj návrh
719
707
  orders:
720
708
  label: 'Objednajte návrhy podľa:'
721
709
  most_commented: Najviac komentované
@@ -109,6 +109,8 @@ sr:
109
109
  valuator: Procenjivač
110
110
  valuators: Procenjivači
111
111
  proposals:
112
+ edit:
113
+ add_documents: Dokumenti
112
114
  show:
113
115
  back_to_list: Nazad na listu
114
116
  estimated_cost: Procenjen trošak
@@ -196,6 +196,7 @@ sv:
196
196
  answers_with_costs: Tillåt kostnader i svar på förslag
197
197
  automatic_hashtags: Hashtags läggs till i alla förslag
198
198
  comments_blocked: Kommentarer blockerade
199
+ creation_enabled: Deltagare kan skapa förslag
199
200
  default_sort_order: Förvald produkt sortering
200
201
  default_sort_order_help: Förinställt innebär att om stödet är aktiverat kommer förslagen sorteras slumpmässigt, och om stöden är blockerade kommer de att sorteras efter mest stödda.
201
202
  default_sort_order_options:
@@ -224,33 +225,21 @@ sv:
224
225
  email_subject: Någon lämnade en anteckning på förslag %{resource_title}.
225
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>
226
227
  collaborative_draft_access_accepted:
227
- 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>.'
228
- email_outro: Du har fått det här meddelandet eftersom du är bidragsgivare till <a href="%{resource_path}">%{resource_title}</a>.
229
228
  email_subject: "%{requester_name} har fått tillgång till och är accepterad som bidragsgivare till %{resource_title}."
230
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>.
231
230
  collaborative_draft_access_rejected:
232
- email_intro: '%{requester_name} har avvisats från få tillgång till det gemensamma utkastet <a href="%{resource_path}">%{resource_title}</a> som bidragsgivare.'
233
- email_outro: Du har fått det här meddelandet eftersom du är medarbetare till <a href="%{resource_path}">%{resource_title}</a>.
234
231
  email_subject: "%{requester_name} har avvisats från att få tillgång till det gemensamma utkastet %{resource_title} som bidragsgivare."
235
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.
236
233
  collaborative_draft_access_requested:
237
- 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>.'
238
- email_outro: Du har fått det här meddelandet eftersom du är bidragsgivare till <a href="%{resource_path}">%{resource_title}</a>.
239
234
  email_subject: "%{requester_name} begärde tillgång att bidra till %{resource_title}."
240
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>.
241
236
  collaborative_draft_access_requester_accepted:
242
- email_intro: Du har godkänts att få tillgång till det gemensamma utkastet <a href="%{resource_path}">%{resource_title}</a> som bidragsgivare.
243
- email_outro: Du har fått det här meddelandet eftersom du bad att bli bidragsgivare till <a href="%{resource_path}">%{resource_title}</a>.
244
237
  email_subject: Du har godkänts som bidragstagare till %{resource_title}.
245
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.
246
239
  collaborative_draft_access_requester_rejected:
247
- email_intro: Du har blivit avvisad att bli bidragsgivare till det gemensamma utkastet <a href="%{resource_path}">%{resource_title}</a>.
248
- 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>.
249
240
  email_subject: Du har blivit avvisad som bidragsgivare till %{resource_title}.
250
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.
251
242
  collaborative_draft_withdrawn:
252
- email_intro: <a href="%{author_path}">%{author_name} %{author_nickname}</a> drog tillbaka det gemensamma utkastet <a href="%{resource_path}">%{resource_title}</a>.
253
- email_outro: Du har fått det här meddelandet eftersom du är en bidragsgivare till <a href="%{resource_path}">%{resource_title}</a>.
254
243
  email_subject: "%{author_name} %{author_nickname} drog tillbaka det gemensamma utkastet %{resource_title}."
255
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>.
256
245
  creation_enabled:
@@ -299,6 +288,7 @@ sv:
299
288
  email_intro: Förslaget "%{resource_title}" har lagts till i "%{participatory_space_title}" som du följer.
300
289
  email_outro: Du har fått det här meddelandet eftersom du följer "%{participatory_space_title}". Du kan sluta att ta emot meddelanden genom att följa föregående länk.
301
290
  email_subject: Nytt förslag "%{resource_title}" lades till %{participatory_space_title}
291
+ notification_title: Förslaget <a href="%{resource_path}">%{resource_title}</a> har lagts till %{participatory_space_title} av %{author}
302
292
  proposal_rejected:
303
293
  affected_user:
304
294
  email_intro: 'Ditt förslag "%{resource_title}" har avslagits. Du kan läsa svaret på den här sidan:'
@@ -584,7 +574,7 @@ sv:
584
574
  evaluating: Utvärderas
585
575
  not_answered: Ej besvarat
586
576
  rejected: Avvisat
587
- withdrawn: Tillbakadragna
577
+ withdrawn: Tillbakadraget
588
578
  application_helper:
589
579
  filter_category_values:
590
580
  all: Alla
@@ -812,7 +802,6 @@ sv:
812
802
  other: stöd
813
803
  new:
814
804
  send: Fortsätt
815
- title: Skapa ditt förslag
816
805
  orders:
817
806
  label: 'Ordna förslag efter:'
818
807
  most_commented: Mest kommenterade
@@ -869,7 +858,7 @@ sv:
869
858
  read_more: Läs mer
870
859
  report: Rapport
871
860
  withdraw_btn_hint: Du kan dra tillbaka ett förslag om du ändrar dig, så länge som det inte har fått något stöd. Förslaget raderas inte utan kommer att visas i listan över förslag som dragits tillbaka.
872
- withdraw_confirmation_html: Är du säker på att du vill återkalla förslaget?<br><br><strong>Denna åtgärd kan inte avbrytas!</strong>
861
+ withdraw_confirmation_html: Är du säker på att du vill dra tillbaka förslaget?<br><br><strong>Denna åtgärd kan inte ångras!</strong>
873
862
  withdraw_proposal: Dra tillbaka förslaget
874
863
  tags:
875
864
  changed_from: "(ändrad från <u>%{previous_name}</u> av en administratör)"
@@ -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
@@ -1,6 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require "decidim/components/namer"
4
+ require "decidim/meetings"
4
5
 
5
6
  Decidim.register_component(:proposals) do |component|
6
7
  component.engine = Decidim::Proposals::Engine
@@ -65,11 +66,11 @@ Decidim.register_component(:proposals) do |component|
65
66
  settings.attribute :votes_blocked, type: :boolean
66
67
  settings.attribute :votes_hidden, type: :boolean, default: false
67
68
  settings.attribute :comments_blocked, type: :boolean, default: false
68
- settings.attribute :creation_enabled, type: :boolean
69
+ settings.attribute :creation_enabled, type: :boolean, readonly: ->(context) { context[:component].settings[:participatory_texts_enabled] }
69
70
  settings.attribute :proposal_answering_enabled, type: :boolean, default: true
70
- settings.attribute :default_sort_order, type: :select, include_blank: true, choices: -> { POSSIBLE_SORT_ORDERS }
71
71
  settings.attribute :publish_answers_immediately, type: :boolean, default: true
72
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 }
73
74
  settings.attribute :amendment_creation_enabled, type: :boolean, default: true
74
75
  settings.attribute :amendment_reaction_enabled, type: :boolean, default: true
75
76
  settings.attribute :amendment_promotion_enabled, type: :boolean, default: true
@@ -283,8 +284,8 @@ Decidim.register_component(:proposals) do |component|
283
284
 
284
285
  author = Decidim::User.find_or_initialize_by(email: email)
285
286
  author.update!(
286
- password: "password1234",
287
- password_confirmation: "password1234",
287
+ password: "decidim123456",
288
+ password_confirmation: "decidim123456",
288
289
  name: name,
289
290
  nickname: Faker::Twitter.unique.screen_name,
290
291
  organization: component.organization,
@@ -349,8 +350,8 @@ Decidim.register_component(:proposals) do |component|
349
350
 
350
351
  author = Decidim::User.find_or_initialize_by(email: email)
351
352
  author.update!(
352
- password: "password1234",
353
- password_confirmation: "password1234",
353
+ password: "decidim123456",
354
+ password_confirmation: "decidim123456",
354
355
  name: name,
355
356
  nickname: Faker::Twitter.unique.screen_name,
356
357
  organization: component.organization,
@@ -371,8 +372,8 @@ Decidim.register_component(:proposals) do |component|
371
372
 
372
373
  author = Decidim::User.find_or_initialize_by(email: email)
373
374
  author.update!(
374
- password: "password1234",
375
- password_confirmation: "password1234",
375
+ password: "decidim123456",
376
+ password_confirmation: "decidim123456",
376
377
  name: name,
377
378
  nickname: Faker::Twitter.unique.screen_name,
378
379
  organization: component.organization,
@@ -33,7 +33,10 @@ module Decidim
33
33
 
34
34
  # Saves the proposal
35
35
  def finish!
36
- super # resource.save!
36
+ Decidim.traceability.perform_action!(:create, self.class.resource_klass, context[:current_user], visibility: "admin-only") do
37
+ resource.save!
38
+ resource
39
+ end
37
40
  notify(resource)
38
41
  publish(resource)
39
42
  end
@@ -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.0.rc2"
7
+ "0.26.2"
8
8
  end
9
9
  end
10
10
  end