decidim-comments 0.29.3 → 0.30.0.rc1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (83) hide show
  1. checksums.yaml +4 -4
  2. data/app/cells/decidim/comments/comment/actions.erb +0 -8
  3. data/app/cells/decidim/comments/comment/show.erb +41 -5
  4. data/app/cells/decidim/comments/comment_cell.rb +37 -1
  5. data/app/cells/decidim/comments/comment_form/comment_as.erb +24 -6
  6. data/app/cells/decidim/comments/comment_form/opinion.erb +0 -4
  7. data/app/cells/decidim/comments/comment_form/show.erb +31 -29
  8. data/app/cells/decidim/comments/comment_form_cell.rb +7 -2
  9. data/app/cells/decidim/comments/comment_thread/show.erb +2 -2
  10. data/app/cells/decidim/comments/comments/add_comment.erb +12 -14
  11. data/app/cells/decidim/comments/comments/comments_in_single_column.erb +6 -0
  12. data/app/cells/decidim/comments/comments/order_control.erb +32 -9
  13. data/app/cells/decidim/comments/comments/show.erb +7 -7
  14. data/app/cells/decidim/comments/comments_cell.rb +56 -12
  15. data/app/cells/decidim/comments/edit_comment_modal_form_cell.rb +1 -1
  16. data/app/cells/decidim/comments/two_columns_comments/column.erb +20 -0
  17. data/app/cells/decidim/comments/two_columns_comments/show.erb +11 -0
  18. data/app/cells/decidim/comments/two_columns_comments_cell.rb +86 -0
  19. data/app/controllers/decidim/comments/comments_controller.rb +1 -2
  20. data/app/forms/decidim/comments/comment_form.rb +14 -0
  21. data/app/models/decidim/comments/comment.rb +10 -8
  22. data/app/packs/entrypoints/decidim_comments.js +1 -0
  23. data/app/packs/src/decidim/comments/comments.component.js +151 -24
  24. data/app/packs/src/decidim/comments/comments.component.test.js +2 -1
  25. data/app/packs/src/decidim/comments/comments.js +95 -12
  26. data/app/packs/src/decidim/comments/comments_dropdown.js +57 -0
  27. data/app/packs/src/decidim/comments/comments_mobile_modal.js +46 -0
  28. data/app/packs/stylesheets/comments.scss +203 -50
  29. data/app/queries/decidim/comments/metrics/comment_participants_metric_measure.rb +1 -1
  30. data/app/queries/decidim/comments/metrics/comments_metric_manage.rb +22 -17
  31. data/app/views/decidim/comments/comments/create.js.erb +9 -1
  32. data/config/locales/ar.yml +0 -1
  33. data/config/locales/bg.yml +0 -1
  34. data/config/locales/ca.yml +35 -4
  35. data/config/locales/cs.yml +37 -2
  36. data/config/locales/de.yml +35 -4
  37. data/config/locales/el.yml +0 -1
  38. data/config/locales/en.yml +35 -4
  39. data/config/locales/es-MX.yml +35 -4
  40. data/config/locales/es-PY.yml +35 -4
  41. data/config/locales/es.yml +35 -4
  42. data/config/locales/eu.yml +55 -24
  43. data/config/locales/fi-plain.yml +35 -2
  44. data/config/locales/fi.yml +36 -3
  45. data/config/locales/fr-CA.yml +8 -4
  46. data/config/locales/fr.yml +8 -4
  47. data/config/locales/gl.yml +0 -1
  48. data/config/locales/hu.yml +0 -1
  49. data/config/locales/id-ID.yml +0 -1
  50. data/config/locales/is-IS.yml +0 -1
  51. data/config/locales/it.yml +1 -2
  52. data/config/locales/ja.yml +34 -4
  53. data/config/locales/lb.yml +0 -1
  54. data/config/locales/lt.yml +1 -2
  55. data/config/locales/lv.yml +0 -1
  56. data/config/locales/nl.yml +0 -1
  57. data/config/locales/no.yml +0 -1
  58. data/config/locales/pl.yml +1 -3
  59. data/config/locales/pt-BR.yml +0 -1
  60. data/config/locales/pt.yml +0 -1
  61. data/config/locales/ro-RO.yml +57 -60
  62. data/config/locales/ru.yml +0 -1
  63. data/config/locales/sk.yml +0 -1
  64. data/config/locales/sv.yml +19 -4
  65. data/config/locales/tr-TR.yml +1 -2
  66. data/config/locales/uk.yml +0 -1
  67. data/config/locales/zh-CN.yml +0 -1
  68. data/config/locales/zh-TW.yml +0 -1
  69. data/decidim-comments.gemspec +1 -1
  70. data/lib/decidim/api/comment_mutation_type.rb +2 -2
  71. data/lib/decidim/api/comment_type.rb +12 -45
  72. data/lib/decidim/api/commentable_interface.rb +4 -16
  73. data/lib/decidim/api/commentable_mutation_type.rb +2 -3
  74. data/lib/decidim/comments/commentable.rb +11 -0
  75. data/lib/decidim/comments/engine.rb +7 -1
  76. data/lib/decidim/comments/test/factories.rb +8 -0
  77. data/lib/decidim/comments/test/shared_examples/comment_event.rb +1 -1
  78. data/lib/decidim/comments/test/shared_examples/comment_voted_event.rb +2 -2
  79. data/lib/decidim/comments/test/shared_examples/create_comment_context.rb +1 -1
  80. data/lib/decidim/comments/test/shared_examples/translatable_comment.rb +2 -2
  81. data/lib/decidim/comments/version.rb +1 -1
  82. metadata +16 -11
  83. data/config/locales/ca-IT.yml +0 -178
@@ -59,7 +59,6 @@ lv:
59
59
  title: 'Sakārtot pēc:'
60
60
  comments:
61
61
  blocked_comments_for_user_warning: Pašlaik jūs nevarat komentēt, bet jūs varat izlasīt iepriekšējos komentārus.
62
- blocked_comments_warning: Komentāri šobrīd ir atspējoti, bet jūs varat lasīt iepriekšējos komentārus.
63
62
  comment_details_title: Komentāra informācija
64
63
  loading: Notiek komentāru ielāde ...
65
64
  single_comment_warning_title: Jūs redzat vienu komentāru
@@ -84,7 +84,6 @@ nl:
84
84
  comments:
85
85
  blocked_comments_for_unauthorized_user_warning: Je kan op dit moment geen opmerkingen toevoegen, maar je kunt de eerdere opmerkingen wel lezen.
86
86
  blocked_comments_for_user_warning: Je kunt op dit moment geen opmerkingen toevoegen, maar je kunt eerdere reacties wel lezen.
87
- blocked_comments_warning: Reacties zijn op dit moment uitgeschakeld, maar je kan de vorige berichten lezen.
88
87
  comment_details_title: Reactieonderdelen
89
88
  loading: Reacties laden...
90
89
  single_comment_warning: <a href="%{url}">Bekijk alle reacties</a>
@@ -82,7 +82,6 @@
82
82
  comments:
83
83
  blocked_comments_for_unauthorized_user_warning: Du må verifiseres for å kommentere, men du kan lese de forrige.
84
84
  blocked_comments_for_user_warning: Du kan ikke kommentere for øyeblikket, men du kan lese de forrige.
85
- blocked_comments_warning: Kommenterer er deaktivert på dette tidspunktet, men du kan lese de forrige.
86
85
  comment_details_title: Kommenter detaljer
87
86
  loading: Laster inn kommenterer ...
88
87
  single_comment_warning: <a href="%{url}">Se alle kommentarer</a>
@@ -43,7 +43,6 @@ pl:
43
43
  error: Podczas dodawania komentarza wystąpił błąd.
44
44
  components:
45
45
  add_comment_form:
46
- account_message: <a href="%{sign_in_url}">Zaloguj się</a> lub <a href="%{sign_up_url}">utwórz konto</a>, aby dodać swój komentarz.
47
46
  form:
48
47
  body:
49
48
  label: Komentarz
@@ -107,7 +106,6 @@ pl:
107
106
  comments:
108
107
  blocked_comments_for_unauthorized_user_warning: Musisz być zweryfikowany żeby teraz komentować, ale możesz przeczytać poprzednie komentarze.
109
108
  blocked_comments_for_user_warning: Nie możesz teraz komentować, ale możesz przeczytać poprzednie komentarze.
110
- blocked_comments_warning: Komentarze są w tej chwili wyłączone, ale możesz przeczytać poprzednie.
111
109
  comment_details_title: Szczegóły komentarza
112
110
  loading: Ładowanie komentarzy ...
113
111
  single_comment_warning: <a href="%{url}">Zobacz wszystkie komentarze</a>
@@ -140,7 +138,7 @@ pl:
140
138
  email_intro: 'Grupa %{author_name} dodała komentarz do %{resource_title}. Możesz go przeczytać na tej stronie:'
141
139
  email_outro: Otrzymujesz to powiadomienie, ponieważ obserwujesz %{author_name}. Możesz przestać obserwować tę grupę z poziomu jej strony profilowej.
142
140
  email_subject: Jest nowy komentarz dodany przez %{author_name} do %{resource_title}
143
- notification_title: Pojawił się nowy komentarz dodany przez <a href="%{author_path}">%{author_name} %{author_nickname}</a> do <a href="%{resource_path}">%{resource_title}</a>.
141
+ notification_title: Pojawił się nowy komentarz <a href="%{author_path}">%{author_name} %{author_nickname}</a> do <a href="%{resource_path}">%{resource_title}</a>.
144
142
  comment_created:
145
143
  email_intro: "Nowy komentarz: %{resource_title}. Możesz go przeczytać na tej stronie:"
146
144
  email_outro: Otrzymujesz to powiadomienie, ponieważ obserwujesz "%{resource_title}" lub jego autora. Możesz przestać go obserwować po kliknięciu w poprzedni link.
@@ -81,7 +81,6 @@ pt-BR:
81
81
  comments:
82
82
  blocked_comments_for_unauthorized_user_warning: Você precisa ser verificado para comentar neste momento, mas pode ler os anteriores.
83
83
  blocked_comments_for_user_warning: Você não pode comentar neste momento, mas pode ler os anteriores.
84
- blocked_comments_warning: Os comentários estão desativados neste momento, mas você pode ler os anteriores.
85
84
  comment_details_title: Detalhes do comentário
86
85
  loading: Carregando comentários ...
87
86
  single_comment_warning_title: Você está vendo um único comentário
@@ -82,7 +82,6 @@ pt:
82
82
  comments:
83
83
  blocked_comments_for_unauthorized_user_warning: Precisa de estar verificado para comentar neste momento, mas pode ler os precedentes.
84
84
  blocked_comments_for_user_warning: Não pode comentar neste momento, mas pode ler os anteriores.
85
- blocked_comments_warning: Os comentários estão desativados neste momento, mas pode ler os anteriores.
86
85
  comment_details_title: Detalhes do comentário
87
86
  loading: A carregar comentários ...
88
87
  single_comment_warning: <a href="%{url}">Ver todos os comentários</a>
@@ -3,11 +3,11 @@ ro:
3
3
  activemodel:
4
4
  models:
5
5
  decidim/comments/comment_by_followed_user_event: Comentariu
6
- decidim/comments/comment_created_event: Comentariu
7
- decidim/comments/comment_upvoted_event: Comentariu votat favorabil
6
+ decidim/comments/comment_created_event: Comentează
7
+ decidim/comments/comment_upvoted_event: Comentariu votat
8
8
  decidim/comments/reply_created_event: Răspuns la comentariu
9
- decidim/comments/user_group_mentioned_event: Menționați
10
- decidim/comments/user_mentioned_event: Menționați
9
+ decidim/comments/user_group_mentioned_event: Menționează
10
+ decidim/comments/user_mentioned_event: Menționează
11
11
  activerecord:
12
12
  models:
13
13
  decidim/comments/comment:
@@ -26,8 +26,6 @@ ro:
26
26
  enabled: Comentarii activate
27
27
  end_time: Comentarii activate până la
28
28
  start_time: Comentarii activate de la
29
- comment_thread:
30
- accessibility_label: Comentariile au fost inițiate de %{full_name} începând cu %{date}
31
29
  comments:
32
30
  create:
33
31
  error: A apărut o problemă la crearea comentariului.
@@ -43,24 +41,23 @@ ro:
43
41
  error: A apărut o problemă la votarea comentariului.
44
42
  components:
45
43
  add_comment_form:
46
- account_message: <a href="%{sign_in_url}">Autentificați-vă cu</a> sau <a href="%{sign_up_url}">creați un cont</a> pentru a adăuga comentariul dumneavoastră.
47
44
  form:
48
45
  body:
49
46
  label: Comentariu
50
- placeholder: Ce părere aveți despre asta?
47
+ placeholder: Ce părere aveţi despre asta?
51
48
  form_error: Textul este obligatoriu și nu poate fi mai lung de %{length} caractere.
52
49
  submit_reply: Publicați răspuns
53
50
  submit_root_comment: Publicați comentariu
54
51
  user_group_id:
55
52
  label: Comentați în calitate de
56
53
  opinion:
57
- label: Opinia dumneavoastră despre acest subiect
54
+ label: Opinia ta despre acest subiect
58
55
  negative: Negativ
59
- negative_selected: Opinia dumneavoastră despre acest subiect este negativă
56
+ negative_selected: Opinia ta despre acest subiect este negativă
60
57
  neutral: Neutru
61
- neutral_selected: Opinia dumneavoastră despre acest subiect este neutră
58
+ neutral_selected: Opinia ta despre acest subiect este neutră
62
59
  positive: Pozitiv
63
- positive_selected: Opinia dumneavoastră despre acest subiect este pozitivă
60
+ positive_selected: Opinia ta despre acest subiect este pozitivă
64
61
  remaining_characters: "%{count} caractere rămase"
65
62
  remaining_characters_1: "%{count} caracter rămas"
66
63
  title: Adaugați comentariul dumneavoastră
@@ -68,12 +65,12 @@ ro:
68
65
  alignment:
69
66
  against: Împotrivă
70
67
  in_favor: Pentru
71
- cancel_reply: Anulați răspunsul
68
+ cancel_reply: Anulează răspunsul
72
69
  comment_label: Comentariu %{comment_id}
73
70
  comment_label_reply: Comentariu %{comment_id} (răspuns la comentariul %{parent_comment_id})
74
71
  confirm_destroy: Sigur doriți să ștergeți acest comentariu?
75
- controls_label: Controale comentariu
76
- delete: Ștergeți
72
+ controls_label: Control comentariu
73
+ delete: Șterge
77
74
  deleted_at: Comentariu șters pe %{date}
78
75
  deleted_user: Participant șters
79
76
  edit: Actualizare
@@ -83,23 +80,23 @@ ro:
83
80
  few: Ascundeți %{count} răspunsuri
84
81
  other: Ascundeți %{count} răspunsuri
85
82
  moderated_at: Comentariu moderat pe %{date}
86
- reply: Răspundeți
83
+ reply: Răspunde
87
84
  report:
88
- action: Raportați
85
+ action: Raportează
89
86
  already_reported: Acest conținut este deja raportat și va fi revizuit de către un administrator.
90
- close: Închideți
91
- description: Acest conținut este neadecvat?
92
- details: Observații suplimentare
87
+ close: Închide
88
+ description: Este acest conținut neadecvat?
89
+ details: Observaţii suplimentare
93
90
  reasons:
94
91
  does_not_belong: Conține activitate ilegală, amenințări cu sinuciderea, informații personale sau altceva ce consideri că nu aparține de %{organization_name}.
95
92
  offensive: Conține rasism, sexism, insulte, atacuri personale, amenințări cu moartea, cereri de sinucidere sau orice formă de discurs de incitare la ură.
96
93
  spam: Conține clickbait, publicitate, escrocherii sau script rulat de roboți.
97
94
  title: Raportați conținut nepotrivit
98
95
  show_replies:
99
- one: Arătați răspunsul
100
- few: Arătați %{count} răspunsuri
101
- other: Arătați %{count} răspunsuri
102
- single_comment_link_title: Obțineți linkul
96
+ one: Arată răspunsul
97
+ few: Arată %{count} răspunsuri
98
+ other: Arată %{count} răspunsuri
99
+ single_comment_link_title: Obține linkul
103
100
  comment_order_selector:
104
101
  order:
105
102
  best_rated: Cele mai apreciate
@@ -108,13 +105,13 @@ ro:
108
105
  recent: Recente
109
106
  title: 'Ordonare după:'
110
107
  comments:
111
- blocked_comments_for_unauthorized_user_warning: Trebuie să fiți verificat pentru a face comentarii în acest moment, dar le puteți citi pe cele anterioare.
112
- blocked_comments_for_user_warning: Nu puteți comenta în acest moment, dar le puteți citi pe cele anterioare.
113
- blocked_comments_warning: Comentariile sunt dezactivate în acest moment, dar le poți citi pe cele anterioare.
108
+ blocked_comments_for_unauthorized_user_warning: Trebuie să fii verificat pentru a trimite comentarii în acest moment, dar le poți citi pe cele anterioare.
109
+ blocked_comments_for_user_warning: Nu poți comenta în acest moment, dar le poți citi pe cele anterioare.
110
+ blocked_comments_warning: Comentariile sunt momentan dezactivate, doar administratorii pot răspunde sau publica altele noi.
114
111
  comment_details_title: Detaliile comentariului
115
- loading: Comentariile se încarcă ...
116
- single_comment_warning: <a href="%{url}">Vedeți toate comentariile</a>
117
- single_comment_warning_title: Puteți vedea un singur comentariu
112
+ loading: Se încarcă comentariile...
113
+ single_comment_warning: <a href="%{url}">Vezi toate comentariile</a>
114
+ single_comment_warning_title: Poți vedea un singur comentariu
118
115
  title:
119
116
  one: "%{count} comentariu"
120
117
  few: "%{count} comentarii"
@@ -122,57 +119,57 @@ ro:
122
119
  down_vote_button:
123
120
  text: Nu sunt de acord cu acest comentariu
124
121
  edit_comment_modal_form:
125
- close: Închideți
122
+ close: Închide
126
123
  form:
127
124
  body:
128
125
  label: Comentariu
129
- placeholder: Ce părere aveţi despre asta?
130
- submit: Actualizați
131
- title: Modificați comentariul dumneavoastră
126
+ placeholder: Ce părere ai despre asta?
127
+ submit: Trimite
128
+ title: Editează comentariul tău
132
129
  up_vote_button:
133
130
  text: Sunt de acord cu acest comentariu
134
131
  events:
135
132
  comments:
136
133
  comment_by_followed_user:
137
- email_intro: "%{author_name} a lăsat un comentariu în %{resource_title}. Îl puteți citi pe această pagină:"
138
- email_outro: Ați primit această notificare deoarece urmăriți activitatea lui %{author_name}. Puteți nu urmăriți acest utilizator de pe pagina lui de profil.
134
+ email_intro: "%{author_name} a lăsat un comentariu în %{resource_title}. Îl poți citi în această pagină:"
135
+ email_outro: Ai primit această notificare deoarece urmărești pe „%{author_name}”. Poți anula abonarea de la acest utilizator de pe pagina sa de profil.
139
136
  email_subject: Există un nou comentariu de la %{author_name} pentru %{resource_title}
140
137
  notification_title: Există un comentariu nou de la <a href="%{author_path}">%{author_name} %{author_nickname}</a> pentru <a href="%{resource_path}">%{resource_title}</a>.
141
138
  comment_by_followed_user_group:
142
- email_intro: 'Grupul %{author_name} a lăsat un comentariu pentru %{resource_title}. Îl puteți citi în această pagină:'
143
- email_outro: Ați primit această notificare deoarece urmăriți activitate lui %{author_name}. Puteți nu urmăriți acest grup de pe pagina sa de profil.
139
+ email_intro: 'Grupul %{author_name} a lăsat un comentariu pentru %{resource_title}. Îl poți citi în această pagină:'
140
+ email_outro: Ai primit această notificare deoarece urmărești grupul „%{author_name}”. Poți anula abonarea de la acest grup de pe pagina sa de profil.
144
141
  email_subject: Există un nou comentariu de la %{author_name} pentru %{resource_title}
145
142
  notification_title: Există un comentariu nou de la <a href="%{author_path}">%{author_name} %{author_nickname}</a> pentru <a href="%{resource_path}">%{resource_title}</a>.
146
143
  comment_created:
147
144
  email_intro: "%{resource_title} a primit un comentariu. Poți citi comentariul pe această pagină:"
148
145
  email_outro: Ați primit această notificare deoarece urmăriți „%{resource_title}” sau pe autorii săi. Puteți anula abonarea de la link-ul anterior.
149
- email_subject: Există un comentariu nou de la %{author_name} pentru %{resource_title}
150
- notification_title: Există un comentariu nou de la <a href="%{author_path}">%{author_name} %{author_nickname}</a> pentru <a href="%{resource_path}">%{resource_title}</a>
146
+ email_subject: Există un nou comentariu de la %{author_name} pentru %{resource_title}
147
+ notification_title: Există un nou comentariu de la <a href="%{author_path}">%{author_name} %{author_nickname}</a> pentru <a href="%{resource_path}">%{resource_title}</a>
151
148
  comment_downvoted:
152
- email_intro: Comentariul dumneavoastră pentru "%{resource_title}" a primit un vot nefavorabil. Acesta are acum un total de %{upvotes} voturi favorabile și %{downvotes} voturi nefavorabile.
153
- email_outro: Ați primit această notificare deoarece sunteți autorul acestui comentariu.
154
- email_subject: Comentariul dumneavoastră pentru "%{resource_title}" a primit un vot nefavorabil.
155
- notification_title: Comentariul dumneavoastră <a href="%{resource_path}"></a> pentru "%{resource_title}" a primit un vot nefavorabil. Acum are un total de %{upvotes} voturi favorabile și %{downvotes} voturi nefavorabile.
149
+ email_intro: Comentariul tău pentru "%{resource_title}" a primit un vot nefavorabil. Acesta are acum un total de %{upvotes} voturi favorabile şi %{downvotes} voturi nefaborabile.
150
+ email_outro: Ai primit această notificare deoarece ești autorul acestui comentariu.
151
+ email_subject: Comentariul tău pentru "%{resource_title}" a primit un vot nefavorabil.
152
+ notification_title: Comentariul tău <a href="%{resource_path}"></a> pentru "%{resource_title}" a primit un vot nefavorabil. Acum are un total de %{upvotes} voturi favorabile și %{downvotes} voturi nefavorabile.
156
153
  comment_upvoted:
157
- email_intro: Comentariul dumneavoastră pentru "%{resource_title}" a primit un vot favorabil. Acesta are acum un total de %{upvotes} voturi favorabile și %{downvotes} voturi nefavorabile.
158
- email_outro: Ați primit această notificare deoarece sunteți autorul acestui comentariu.
159
- email_subject: Comentariul dumneavoastră pentru "%{resource_title}" a primit un vot favorabil.
160
- notification_title: Comentariul dumneavoastră <a href="%{resource_path}"></a> în "%{resource_title}" a primit un vot favorabil. Acum are un total de %{upvotes} voturi favorabile și %{downvotes} voturi nefavorabile.
154
+ email_intro: Comentariul tău pentru "%{resource_title}" a primit un vot favorabil. Acesta are acum un total de %{upvotes} voturi favorabile și %{downvotes} voturi nefavorabile.
155
+ email_outro: Ai primit această notificare deoarece ești autorul acestui comentariu.
156
+ email_subject: Comentariul tău pentru "%{resource_title}" a primit un vot favorabil.
157
+ notification_title: Comentariul tău <a href="%{resource_path}"></a> în "%{resource_title}" a primit un vot favorabil. Acum are un total de %{upvotes} voturi faborabile și %{downvotes} voturi nefavorabile.
161
158
  reply_created:
162
- email_intro: "%{author_name} a răspuns la comentariul dumneavoastră pentru %{resource_title}. Îl poți citi în această pagină:"
163
- email_outro: Ați primit această notificare deoarece comentariul dumneavoastră a fost răspuns.
164
- email_subject: "%{author_name} a răspuns la comentariul dumneavoastră pentru %{resource_title}"
165
- notification_title: <a href="%{author_path}">%{author_name} %{author_nickname}</a> a răspuns la comentariul dumneavoastră pentru <a href="%{resource_path}">%{resource_title}</a>
159
+ email_intro: "%{author_name} a răspuns la comentariul tău pentru %{resource_title}. Îl poți citi în această pagină:"
160
+ email_outro: Ai primit această notificare deoarece comentariul tău a primit un răspuns.
161
+ email_subject: "%{author_name} a răspuns la comentariul tău pentru %{resource_title}"
162
+ notification_title: <a href="%{author_path}">%{author_name} %{author_nickname}</a> a răspuns la comentariul tău pentru <a href="%{resource_path}">%{resource_title}</a>
166
163
  user_group_mentioned:
167
- email_intro: Un grup căruia îi aparțineți a fost menționat
168
- email_outro: Ați primit această notificare deoarece sunteți un membru al grupului %{group_name} care a fost menționat în %{resource_title}.
169
- email_subject: Ai fost menționat(ă) în %{resource_title} ca membru al %{group_name}
170
- notification_title: Ai fost menționat(ă) în <a href="%{resource_path}">%{resource_title}</a> de <a href="%{author_path}">%{author_name} %{author_nickname}</a> ca membru al <a href="%{group_path}">%{group_name} %{group_nickname}</a>
164
+ email_intro: Un grup de care aparți a fost menționat
165
+ email_outro: Ai primit această notificare deoarece ești un membru al grupului %{group_name} care a fost menționat în %{resource_title}.
166
+ email_subject: Ai fost menționat în %{resource_title} ca membru al %{group_name}
167
+ notification_title: Ai fost menționat în <a href="%{resource_path}">%{resource_title}</a> de <a href="%{author_path}">%{author_name} %{author_nickname}</a> ca membru al <a href="%{group_path}">%{group_name} %{group_nickname}</a>
171
168
  user_mentioned:
172
- email_intro: Ați fost menționat(ă)
173
- email_outro: Ați primit această notificare deoarece ați fost menționat(ă) în %{resource_title}.
174
- email_subject: Ați fost menționat(ă) în %{resource_title}
175
- notification_title: Ați fost menționat(ă) în <a href="%{resource_path}">%{resource_title}</a> de către <a href="%{author_path}">%{author_name} %{author_nickname}</a>
169
+ email_intro: Ai fost menționat(ă)
170
+ email_outro: Ai primit această notificare deoarece ai fost menționat în %{resource_title}.
171
+ email_subject: Ai fost menționat în %{resource_title}
172
+ notification_title: Ai fost menționat în <a href="%{resource_path}">%{resource_title}</a> de către <a href="%{author_path}">%{author_name} %{author_nickname}</a>
176
173
  metrics:
177
174
  comments:
178
175
  description: Numărul de comentarii generate de participanți
@@ -61,7 +61,6 @@ ru:
61
61
  title: 'Упорядочить по:'
62
62
  comments:
63
63
  blocked_comments_for_user_warning: Сейчас вам недоступно комментирование, но вы можете прочесть предыдущие комментарии.
64
- blocked_comments_warning: Комментарии сейчас отключены, но вы можете прочитать предыдущие.
65
64
  loading: Загрузка комментариев ...
66
65
  events:
67
66
  comments:
@@ -61,7 +61,6 @@ sk:
61
61
  title: 'Zoradiť podľa:'
62
62
  comments:
63
63
  blocked_comments_for_user_warning: V súčasnosti nemôžete komentovať, ale môžete si prečítať predchádzajúce komentáre.
64
- blocked_comments_warning: Komentáre nie sú v súčasnosti povolené, ale môžete si prečítať predchádzajúce komentáre.
65
64
  comment_details_title: Podrobnosti komentára
66
65
  loading: Nahrávanie komentárov...
67
66
  single_comment_warning_title: Zobrazujete jeden komentár
@@ -17,6 +17,10 @@ sv:
17
17
  one: Röst
18
18
  other: Röster
19
19
  decidim:
20
+ admin:
21
+ admin_log:
22
+ changeset:
23
+ comments: Kommentarer
20
24
  comments:
21
25
  admin:
22
26
  shared:
@@ -24,8 +28,6 @@ sv:
24
28
  enabled: Aktivera kommentarer
25
29
  end_time: Kommentarer aktiverade till och med
26
30
  start_time: Kommentarer aktiverade från och med
27
- comment_thread:
28
- accessibility_label: Kommentartråden startad av %{full_name} den %{date}
29
31
  comments:
30
32
  create:
31
33
  error: Det gick inte att skapa kommentaren.
@@ -41,7 +43,8 @@ sv:
41
43
  error: Det gick inte att rösta om kommentaren.
42
44
  components:
43
45
  add_comment_form:
44
- account_message: <a href="%{sign_in_url}">Logga in</a> eller <a href="%{sign_up_url}">skapa ett konto</a> för kommentera.
46
+ account_message: Logga in eller skapa ett konto för kommentera.
47
+ add_comment: Kommentera
45
48
  form:
46
49
  body:
47
50
  label: Kommentera
@@ -51,6 +54,7 @@ sv:
51
54
  submit_root_comment: Publicera kommentar
52
55
  user_group_id:
53
56
  label: Kommentera som
57
+ your_profile: Din profil
54
58
  opinion:
55
59
  label: Din åsikt om frågan
56
60
  negative: Negativ
@@ -66,6 +70,9 @@ sv:
66
70
  alignment:
67
71
  against: Mot
68
72
  in_favor: För
73
+ answers:
74
+ one: "%{count} svar"
75
+ other: "%{count} svar"
69
76
  cancel_reply: Avbryt svar
70
77
  comment_label: Kommentar %{comment_id}
71
78
  comment_label_reply: Kommentar %{comment_id} (svar på kommentar %{parent_comment_id})
@@ -96,6 +103,7 @@ sv:
96
103
  one: Visa svar
97
104
  other: Visa %{count} svar
98
105
  single_comment_link_title: Hämta länk
106
+ sort_by: 'Sortera efter: '
99
107
  comment_order_selector:
100
108
  order:
101
109
  best_rated: Bästa betyg
@@ -104,16 +112,19 @@ sv:
104
112
  recent: Senaste
105
113
  title: 'Sortera efter:'
106
114
  comments:
115
+ against: Mot
107
116
  blocked_comments_for_unauthorized_user_warning: Du behöver verifiera dig för att kunna kommentera just nu, men du kan läsa tidigare kommentarer.
108
117
  blocked_comments_for_user_warning: Du kan inte kommentera just nu, men du kan läsa tidigare kommentarer.
109
- blocked_comments_warning: Kommentarer är inaktiverade just nu, men du kan läsa de föregående.
118
+ blocked_comments_warning: Kommentarer är inaktiverade, endast administratörer kan svara eller skriva nya.
110
119
  comment_details_title: Kommentarsdetaljer
120
+ in_favor: För
111
121
  loading: Laddar kommentarer...
112
122
  single_comment_warning: <a href="%{url}">Visa alla kommentarer</a>
113
123
  single_comment_warning_title: Du visar en enda kommentar
114
124
  title:
115
125
  one: "%{count} kommentar"
116
126
  other: "%{count} kommentarer"
127
+ top_comment_label: Mest stöd
117
128
  down_vote_button:
118
129
  text: Jag instämmer inte i denna kommentar
119
130
  edit_comment_modal_form:
@@ -126,6 +137,10 @@ sv:
126
137
  title: Redigera din kommentar
127
138
  up_vote_button:
128
139
  text: Jag instämmer i denna kommentar
140
+ download_your_data:
141
+ help:
142
+ comment_votes:
143
+ comment: Id för kommentaren som gillades
129
144
  events:
130
145
  comments:
131
146
  comment_by_followed_user:
@@ -64,7 +64,6 @@ tr:
64
64
  title: 'Tarafından sipariş:'
65
65
  comments:
66
66
  blocked_comments_for_user_warning: Şu anda yorum yapamıyorsunuz, ancak öncekileri okuyabilirsiniz.
67
- blocked_comments_warning: Yorumlar şu anda devre dışı, ancak öncekileri okuyabilirsiniz.
68
67
  comment_details_title: Yorum ayrıntıları
69
68
  loading: Yorumlar yükleniyor ...
70
69
  single_comment_warning_title: Tek bir yorum görüyorsunuz
@@ -85,7 +84,7 @@ tr:
85
84
  comment_by_followed_user_group:
86
85
  email_intro: '%{author_name} grubu %{resource_title} alanında bir yorum bıraktı. Bu sayfada okuyabilirsiniz:'
87
86
  email_outro: Bu bildirimi %{author_name} adlı yazarı takip ettiğiniz için aldınız. Bu grubu profil sayfasından takip etmeyi bırakabilirsiniz.
88
- email_subject: '%{author_name} %{resource_title} alanında yeni bir yorum yaptı'
87
+ email_subject: '%{author_name}, %{resource_title} alanında yeni bir yorum yaptı'
89
88
  notification_title: <a href="%{resource_path}">%{resource_title} </a> içinde <a href="%{author_path}">%{author_name} %{author_nickname} </a> tarafından yeni bir yorum var.
90
89
  comment_created:
91
90
  email_intro: "%{resource_title} alanında yorum yapıldı. Bu sayfadaki yorumu okuyabilirsiniz:"
@@ -60,7 +60,6 @@ uk:
60
60
  recent: Нещодавнє
61
61
  title: 'Впорядкувати за:'
62
62
  comments:
63
- blocked_comments_warning: Коментарі зараз вимкнені, але ви можете прочитати попередні.
64
63
  loading: Завантаження коментарів...
65
64
  events:
66
65
  comments:
@@ -56,7 +56,6 @@ zh-CN:
56
56
  title: '排序方式:'
57
57
  comments:
58
58
  blocked_comments_for_user_warning: 您此时无法评论,但您可以阅读前面的评论。
59
- blocked_comments_warning: 评论此时被禁用,但您可以阅读前面的评论。
60
59
  comment_details_title: 评论详情
61
60
  loading: 正在加载评论...
62
61
  single_comment_warning_title: 您正在看到一个评论
@@ -89,7 +89,6 @@ zh-TW:
89
89
  comments:
90
90
  blocked_comments_for_unauthorized_user_warning: 目前需要驗證您的身份才能發表評論,但您可以閱讀先前的評論。
91
91
  blocked_comments_for_user_warning: 目前您無法發表評論,但您可以閱讀先前的評論。
92
- blocked_comments_warning: 目前無法發表評論,但您可以閱讀先前的評論。
93
92
  comment_details_title: 評論詳細資料
94
93
  loading: 正在加載評論…
95
94
  single_comment_warning: <a href="%{url}">查看所有評論</a>
@@ -19,7 +19,7 @@ Gem::Specification.new do |s|
19
19
  "homepage_uri" => "https://decidim.org",
20
20
  "source_code_uri" => "https://github.com/decidim/decidim"
21
21
  }
22
- s.required_ruby_version = "~> 3.2.0"
22
+ s.required_ruby_version = "~> 3.3.0"
23
23
 
24
24
  s.name = "decidim-comments"
25
25
  s.summary = "Decidim comments module"
@@ -6,14 +6,14 @@ module Decidim
6
6
  graphql_name "CommentMutation"
7
7
  description "A comment which includes its available mutations"
8
8
 
9
+ field :down_vote, Decidim::Comments::CommentType, "The comment that is downvoted", null: true
9
10
  field :id, GraphQL::Types::ID, "The Comment's unique ID", null: false
11
+ field :up_vote, Decidim::Comments::CommentType, "The comment that is upvoted", null: true
10
12
 
11
- field :up_vote, Decidim::Comments::CommentType, null: true
12
13
  def up_vote(args: {})
13
14
  VoteCommentResolver.new(weight: 1).call(object, args, context)
14
15
  end
15
16
 
16
- field :down_vote, Decidim::Comments::CommentType, null: true
17
17
  def down_vote(args: {})
18
18
  VoteCommentResolver.new(weight: -1).call(object, args, context)
19
19
  end
@@ -4,37 +4,24 @@ module Decidim
4
4
  module Comments
5
5
  # This type represents a comment on a commentable object.
6
6
  class CommentType < Decidim::Api::Types::BaseObject
7
- description "A comment"
8
-
7
+ implements Decidim::Core::TimestampsInterface
9
8
  implements Decidim::Comments::CommentableInterface
10
- field :author, Decidim::Core::AuthorInterface, "The resource author", null: false
11
-
12
- field :id, GraphQL::Types::ID, "The Comment's unique ID", null: false
13
-
14
- field :sgid, GraphQL::Types::String, "The Comment's signed global id", null: false
15
-
16
- field :body, GraphQL::Types::String, "The comment message", null: false
17
-
18
- field :formatted_body, GraphQL::Types::String, "The comment message ready to display (it is expected to include HTML)", null: false
19
9
 
20
- field :created_at, GraphQL::Types::String, "The creation date of the comment", null: false
21
-
22
- field :formatted_created_at, GraphQL::Types::String, "The creation date of the comment in relative format", null: false
10
+ description "A comment"
23
11
 
24
12
  field :alignment, GraphQL::Types::Int, "The comment's alignment. Can be 0 (neutral), 1 (in favor) or -1 (against)'", null: true
25
-
26
- field :up_votes, GraphQL::Types::Int, "The number of comment's upVotes", null: false
27
-
28
- field :up_voted, GraphQL::Types::Boolean, "Check if the current user has upvoted the comment", null: false
29
-
30
- field :down_votes, GraphQL::Types::Int, "The number of comment's downVotes", null: false
31
-
13
+ field :already_reported, GraphQL::Types::Boolean, "Check if the current user has reported the comment", null: false
14
+ field :author, Decidim::Core::AuthorInterface, "The resource author", null: false
15
+ field :body, GraphQL::Types::String, "The comment message", null: false, method: :translated_body
32
16
  field :down_voted, GraphQL::Types::Boolean, "Check if the current user has downvoted the comment", null: false
33
-
17
+ field :down_votes, GraphQL::Types::Int, "The number of comment's downVotes", null: false, method: :down_votes_count
18
+ field :formatted_body, GraphQL::Types::String, "The comment message ready to display (it is expected to include HTML)", null: false
19
+ field :formatted_created_at, GraphQL::Types::String, "The creation date of the comment in relative format", null: false, method: :friendly_created_at
34
20
  field :has_comments, GraphQL::Types::Boolean, "Check if the commentable has comments", method: :has_comments?, null: false
35
-
36
- field :already_reported, GraphQL::Types::Boolean, "Check if the current user has reported the comment", null: false
37
-
21
+ field :id, GraphQL::Types::ID, "The Comment's unique ID", null: false
22
+ field :sgid, GraphQL::Types::String, "The Comment's signed global id", null: false
23
+ field :up_voted, GraphQL::Types::Boolean, "Check if the current user has upvoted the comment", null: false
24
+ field :up_votes, GraphQL::Types::Int, "The number of comment's upVotes", null: false, method: :up_votes_count
38
25
  field :user_allowed_to_comment, GraphQL::Types::Boolean, "Check if the current user can comment", null: false
39
26
 
40
27
  def author
@@ -45,30 +32,10 @@ module Decidim
45
32
  object.to_sgid.to_s
46
33
  end
47
34
 
48
- def body
49
- object.translated_body
50
- end
51
-
52
- def created_at
53
- object.created_at.iso8601
54
- end
55
-
56
- def formatted_created_at
57
- object.friendly_created_at
58
- end
59
-
60
- def up_votes
61
- object.up_votes_count
62
- end
63
-
64
35
  def up_voted
65
36
  object.up_voted_by?(context[:current_user])
66
37
  end
67
38
 
68
- def down_votes
69
- object.down_votes_count
70
- end
71
-
72
39
  def down_voted
73
40
  object.down_voted_by?(context[:current_user])
74
41
  end
@@ -8,40 +8,28 @@ module Decidim
8
8
  description "A commentable interface"
9
9
 
10
10
  field :id, GraphQL::Types::ID, "The commentable's ID", null: false
11
-
12
11
  field :type, GraphQL::Types::String, "The commentable's class name. i.e. `Decidim::ParticipatoryProcess`", method: :commentable_type, null: false
13
-
14
12
  field :accepts_new_comments, GraphQL::Types::Boolean, "Whether the object can have new comments or not", method: :accepts_new_comments?, null: false
15
-
16
13
  field :comments_have_alignment, GraphQL::Types::Boolean, "Whether the object comments have alignment or not", method: :comments_have_alignment?, null: false
17
-
18
14
  field :comments_have_votes, GraphQL::Types::Boolean, "Whether the object comments have votes or not", method: :comments_have_votes?, null: false
19
-
20
- field :comments, [Decidim::Comments::CommentType, { null: false }], null: false do
15
+ field :total_comments_count, GraphQL::Types::Int, description: "The number of comments in all levels this resource holds", method: :comments_count, null: false
16
+ field :has_comments, GraphQL::Types::Boolean, "Check if the commentable has comments", null: false
17
+ field :user_allowed_to_comment, GraphQL::Types::Boolean, "Check if the current user can comment", null: false
18
+ field :comments, [Decidim::Comments::CommentType, { null: false }], "The list of replies in this comment", null: false do
21
19
  argument :order_by, GraphQL::Types::String, "Order the comments", required: false
22
20
  argument :single_comment_id, GraphQL::Types::String, "ID of the single comment to look at", required: false
23
21
  end
24
22
 
25
- field :total_comments_count, GraphQL::Types::Int, description: "The number of comments in all levels this resource holds", null: false
26
-
27
23
  def comments(order_by: nil, single_comment_id: nil)
28
24
  SortedComments.for(object, order_by:, id: single_comment_id).not_hidden
29
25
  end
30
26
 
31
- def total_comments_count
32
- object.comments_count
33
- end
34
-
35
- field :has_comments, GraphQL::Types::Boolean, "Check if the commentable has comments", null: false
36
-
37
27
  # rubocop:disable Naming/PredicateName
38
28
  def has_comments
39
29
  object.comment_threads.not_hidden.size.positive?
40
30
  end
41
31
  # rubocop:enable Naming/PredicateName
42
32
 
43
- field :user_allowed_to_comment, GraphQL::Types::Boolean, "Check if the current user can comment", null: false
44
-
45
33
  def user_allowed_to_comment
46
34
  object.commentable? && object.user_allowed_to_comment?(context[:current_user])
47
35
  end
@@ -5,13 +5,12 @@ module Decidim
5
5
  class CommentableMutationType < Decidim::Api::Types::BaseObject
6
6
  description "A commentable which includes its available mutations"
7
7
 
8
- field :id, GraphQL::Types::ID, "The Commentable's unique ID", null: false
9
-
10
8
  field :add_comment, Decidim::Comments::CommentType, description: "Add a new comment to a commentable", null: true do
11
- argument :body, GraphQL::Types::String, "The comments's body", required: true
12
9
  argument :alignment, GraphQL::Types::Int, "The comment's alignment. Can be 0 (neutral), 1 (in favor) or -1 (against)'", default_value: 0, required: false
10
+ argument :body, GraphQL::Types::String, "The comments's body", required: true
13
11
  argument :user_group_id, GraphQL::Types::ID, "The comment's user group id. Replaces the author.", required: false
14
12
  end
13
+ field :id, GraphQL::Types::ID, "The Commentable's unique ID", null: false
15
14
 
16
15
  def add_comment(body:, alignment: nil, user_group_id: nil)
17
16
  params = { "comment" => { "body" => body, "alignment" => alignment, "user_group_id" => user_group_id, "commentable" => object } }
@@ -67,6 +67,17 @@ module Decidim
67
67
  update_columns(comments_count:, updated_at: Time.current)
68
68
  end
69
69
  # rubocop:enable Rails/SkipsModelValidations
70
+
71
+ # Public: Returns an array with extra actions available for a comment and a user.
72
+ # Returns an array of hashes with the following keys:
73
+ # - label: The label to be displayed in the UI.
74
+ # - url: The action to be performed when the user clicks the label.
75
+ # - method: The HTTP method to be used when performing the action (optional).
76
+ # - icon: The icon to be displayed next to the label (optional).
77
+ # - data: Any "data-*" attributes to be included in the link (optional).
78
+ def actions_for_comment(_comment, _current_user)
79
+ []
80
+ end
70
81
  end
71
82
  end
72
83
  end