decidim-comments 0.28.0 → 0.28.2

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 (59) hide show
  1. checksums.yaml +4 -4
  2. data/app/cells/decidim/comments/comment/actions.erb +4 -5
  3. data/app/cells/decidim/comments/comment/show.erb +7 -5
  4. data/app/cells/decidim/comments/comment_cell.rb +24 -4
  5. data/app/cells/decidim/comments/comment_thread/show.erb +1 -1
  6. data/app/cells/decidim/comments/comments/order_control.erb +2 -1
  7. data/app/cells/decidim/comments/comments/show.erb +1 -1
  8. data/app/cells/decidim/comments/comments/user_comments_blocked_warning.erb +2 -2
  9. data/app/cells/decidim/comments/comments_cell.rb +5 -1
  10. data/app/events/decidim/comments/comment_event.rb +4 -0
  11. data/app/models/decidim/comments/comment.rb +2 -2
  12. data/app/models/decidim/comments/comment_vote.rb +10 -0
  13. data/app/packs/src/decidim/comments/comments.component.test.js +4 -4
  14. data/app/packs/src/decidim/comments/comments.component_for_testing.js +1 -0
  15. data/config/locales/ar.yml +0 -1
  16. data/config/locales/bg.yml +169 -0
  17. data/config/locales/ca.yml +13 -8
  18. data/config/locales/cs.yml +3 -1
  19. data/config/locales/de.yml +6 -1
  20. data/config/locales/el.yml +0 -1
  21. data/config/locales/en.yml +6 -1
  22. data/config/locales/es-MX.yml +6 -1
  23. data/config/locales/es-PY.yml +6 -1
  24. data/config/locales/es.yml +14 -9
  25. data/config/locales/eu.yml +3 -1
  26. data/config/locales/fi-plain.yml +6 -1
  27. data/config/locales/fi.yml +6 -1
  28. data/config/locales/fr-CA.yml +6 -1
  29. data/config/locales/fr.yml +6 -1
  30. data/config/locales/gl.yml +0 -1
  31. data/config/locales/he-IL.yml +1 -0
  32. data/config/locales/hu.yml +5 -1
  33. data/config/locales/it.yml +0 -1
  34. data/config/locales/ja.yml +5 -1
  35. data/config/locales/lb.yml +0 -1
  36. data/config/locales/lt.yml +0 -1
  37. data/config/locales/lv.yml +0 -1
  38. data/config/locales/nl.yml +0 -1
  39. data/config/locales/no.yml +0 -1
  40. data/config/locales/pl.yml +5 -1
  41. data/config/locales/pt-BR.yml +0 -1
  42. data/config/locales/pt.yml +0 -1
  43. data/config/locales/ro-RO.yml +7 -4
  44. data/config/locales/sk.yml +0 -1
  45. data/config/locales/sq-AL.yml +41 -0
  46. data/config/locales/sr-CS.yml +0 -2
  47. data/config/locales/sv.yml +0 -1
  48. data/config/locales/tr-TR.yml +3 -1
  49. data/config/locales/zh-CN.yml +0 -1
  50. data/config/locales/zh-TW.yml +0 -1
  51. data/db/migrate/20240304092558_add_comment_vote_counter_cache_to_comments.rb +21 -0
  52. data/decidim-comments.gemspec +40 -0
  53. data/lib/decidim/api/comment_type.rb +2 -2
  54. data/lib/decidim/comments/test/factories.rb +20 -7
  55. data/lib/decidim/comments/test/shared_examples/comment_event.rb +34 -1
  56. data/lib/decidim/comments/test/shared_examples/comment_voted_event.rb +1 -1
  57. data/lib/decidim/comments/version.rb +1 -1
  58. metadata +14 -12
  59. data/config/environment.rb +0 -3
@@ -65,13 +65,18 @@ es-PY:
65
65
  against: En contra
66
66
  in_favor: A favor
67
67
  cancel_reply: Cancelar respuesta
68
+ comment_label: Comentario %{comment_id}
69
+ comment_label_reply: Comentario %{comment_id} (responder al comentario %{parent_comment_id})
68
70
  confirm_destroy: '¿Seguro que quieres eliminar este comentario?'
71
+ controls_label: Controles de comentarios
69
72
  delete: Eliminar
70
73
  deleted_at: Comentario eliminado el %{date}
71
74
  deleted_user: Usuario eliminado
72
75
  edit: Editar
73
76
  edited: Editado
74
- hide_replies: Ocultar respuestas
77
+ hide_replies:
78
+ one: Ocultar respuesta
79
+ other: Ocultar %{count} respuestas
75
80
  moderated_at: Comentario moderado el %{date}
76
81
  reply: Respuesta
77
82
  report:
@@ -44,7 +44,7 @@ es:
44
44
  body:
45
45
  label: Comentario
46
46
  placeholder: '¿Qué piensas sobre ésto?'
47
- form_error: El texto es necesario y no puede ser más largo de %{length}.
47
+ form_error: El texto es necesario y no puede ser más largo de %{length} caracteres.
48
48
  submit_reply: Publicar respuesta
49
49
  submit_root_comment: Publicar comentario
50
50
  user_group_id:
@@ -65,13 +65,18 @@ es:
65
65
  against: En contra
66
66
  in_favor: A favor
67
67
  cancel_reply: Cancelar respuesta
68
+ comment_label: Comentario %{comment_id}
69
+ comment_label_reply: Comentario %{comment_id} (responder al comentario %{parent_comment_id})
68
70
  confirm_destroy: '¿Seguro que quieres eliminar este comentario?'
71
+ controls_label: Controles de comentarios
69
72
  delete: Eliminar
70
73
  deleted_at: Comentario eliminado el %{date}
71
74
  deleted_user: Participante eliminada
72
75
  edit: Editar
73
76
  edited: Editado
74
- hide_replies: Ocultar respuestas
77
+ hide_replies:
78
+ one: Ocultar respuesta
79
+ other: Ocultar %{count} respuestas
75
80
  moderated_at: Comentario moderado el %{date}
76
81
  reply: Respuesta
77
82
  report:
@@ -123,7 +128,7 @@ es:
123
128
  comments:
124
129
  comment_by_followed_user:
125
130
  email_intro: "%{author_name} ha dejado un comentario en %{resource_title}. Puedes leerlo en esta página:"
126
- email_outro: Has recibido esta notificación porque sigues "%{author_name}". Puedes dejar de seguir a esta participante desde su página de perfil.
131
+ email_outro: Has recibido esta notificación porque sigues a "%{author_name}". Puedes dejar de seguir a esta participante desde su página de perfil.
127
132
  email_subject: Hay un nuevo comentario de %{author_name} en %{resource_title}
128
133
  notification_title: Hay un nuevo comentario de <a href="%{author_path}">%{author_name} %{author_nickname}</a> en <a href="%{resource_path}">%{resource_title}</a>.
129
134
  comment_by_followed_user_group:
@@ -133,32 +138,32 @@ es:
133
138
  notification_title: Hay un nuevo comentario de <a href="%{author_path}">%{author_name} %{author_nickname}</a> en <a href="%{resource_path}">%{resource_title}</a>.
134
139
  comment_created:
135
140
  email_intro: "%{resource_title} ha sido comentado. Puedes leer el comentario en esta página:"
136
- email_outro: Has recibido esta notificación porque está siguiendo "%{resource_title}" o su autora. Puedes dejar de seguirla desde el enlace anterior.
141
+ email_outro: Has recibido esta notificación porque estás siguiendo el comentario "%{resource_title}" o a su autora. Puedes dejar de seguirla desde el enlace anterior.
137
142
  email_subject: Hay un nuevo comentario de %{author_name} en %{resource_title}
138
143
  notification_title: Hay un nuevo comentario de <a href="%{author_path}">%{author_name} %{author_nickname}</a> en <a href="%{resource_path}">%{resource_title}</a>
139
144
  comment_downvoted:
140
145
  email_intro: Tu comentario en "%{resource_title}" ha sido votado negativamente. Ahora tiene un total de %{upvotes} votos positivos y %{downvotes} votos negativos.
141
- email_outro: Has recibido esta notificación porque eres la autora de este comentario.
146
+ email_outro: Has recibido esta notificación porque hiciste este comentario.
142
147
  email_subject: Su comentario en "%{resource_title}" ha sido votado negativamente.
143
148
  notification_title: Tu <a href="%{resource_path}">comentario</a> en "%{resource_title}" ha sido votado negativamente. Ahora tiene un total de %{upvotes} votos positivos y %{downvotes} votos negativos.
144
149
  comment_upvoted:
145
150
  email_intro: Tu comentario en "%{resource_title}" ha sido votado postivamente. Ahora tiene un total de %{upvotes} votos positivos y %{downvotes} votos negativos.
146
- email_outro: Has recibido esta notificación porque eres la autora de este comentario.
151
+ email_outro: Has recibido esta notificación porque hiciste este comentario.
147
152
  email_subject: Tu comentario en "%{resource_title}" ha sido votado positivamente.
148
153
  notification_title: Tu <a href="%{resource_path}">comentario</a> en "%{resource_title}" ha sido votado positivamente. Ahora tiene un total de %{upvotes} votos positivos y %{downvotes} votos negativos.
149
154
  reply_created:
150
155
  email_intro: "%{author_name} ha respondido a tu comentario en %{resource_title}. Puedes leerlo en esta página:"
151
- email_outro: Has recibido esta notificación porque tu comentario fue respondido.
156
+ email_outro: Has recibido esta notificación porque han respondido a tu comentario.
152
157
  email_subject: "%{author_name} ha respondido a tu comentario en %{resource_title}"
153
158
  notification_title: <a href="%{author_path}">%{author_name} %{author_nickname}</a> ha respondido a tu comentario en <a href="%{resource_path}">%{resource_title}</a>
154
159
  user_group_mentioned:
155
160
  email_intro: Se ha mencionado un grupo al que perteneces
156
- email_outro: Has recibido esta notificación porque formas parte del grupo %{group_name} que ha sido mencionado en %{resource_title}.
161
+ email_outro: Has recibido esta notificación porque formas parte del grupo "%{group_name}" que ha sido mencionado en "%{resource_title}".
157
162
  email_subject: Te han mencionado en %{resource_title} como miembro de %{group_name}
158
163
  notification_title: <a href="%{author_path}">%{author_name} %{author_nickname}</a> te ha mencionado en <a href="%{resource_path}">%{resource_title}</a> como miembro de <a href="%{group_path}">%{group_name} %{group_nickname}</a>
159
164
  user_mentioned:
160
165
  email_intro: Has sido mencionada
161
- email_outro: Has recibido esta notificación porque has sido mencionada en %{resource_title}.
166
+ email_outro: Has recibido esta notificación porque te han mencionado en el comentario "%{resource_title}".
162
167
  email_subject: Has sido mencionada en %{resource_title}
163
168
  notification_title: Has sido mencionada en <a href="%{resource_path}">%{resource_title}</a> por <a href="%{author_path}">%{author_name} %{author_nickname}</a>
164
169
  metrics:
@@ -65,13 +65,15 @@ eu:
65
65
  against: Aurka
66
66
  in_favor: Alde
67
67
  cancel_reply: Ezeztatu erantzuna
68
+ comment_label: Iruzkindu %{comment_id}
69
+ comment_label_reply: Iruzkindu %{comment_id} (erantzun %{parent_comment_id} iruzkinei)
68
70
  confirm_destroy: Ziur zaude iruzkin hau ezabatu nahi duzula?
71
+ controls_label: Iruzkindu kontrolak
69
72
  delete: Ezabatu
70
73
  deleted_at: Iruzkina ezabatu da data honetan %{date}
71
74
  deleted_user: Parte-hartzailea ezabatua
72
75
  edit: Editatu
73
76
  edited: Editatuta
74
- hide_replies: Ezkutatu erantzunak
75
77
  moderated_at: Iruzkina %{date}-an moderatu egin da
76
78
  reply: Erantzuna
77
79
  report:
@@ -65,13 +65,18 @@ fi-pl:
65
65
  against: Vastaan
66
66
  in_favor: Puolesta
67
67
  cancel_reply: Peruuta vastaus
68
+ comment_label: Kommentti %{comment_id}
69
+ comment_label_reply: Kommentti %{comment_id} (vastauksena kommenttiin %{parent_comment_id})
68
70
  confirm_destroy: Haluatko varmasti poistaa tämän kommentin?
71
+ controls_label: Kommenttien hallinta
69
72
  delete: Poista
70
73
  deleted_at: Kommentti poistettu %{date}
71
74
  deleted_user: Poistettu käyttäjä
72
75
  edit: Muokkaa
73
76
  edited: Muokattu
74
- hide_replies: Piilota vastaukset
77
+ hide_replies:
78
+ one: Piilota vastaus
79
+ other: Piilota %{count} vastausta
75
80
  moderated_at: Kommentti moderoitu %{date}
76
81
  reply: Vastaa
77
82
  report:
@@ -65,13 +65,18 @@ fi:
65
65
  against: Vastaan
66
66
  in_favor: Puolesta
67
67
  cancel_reply: Peruuta vastaus
68
+ comment_label: Kommentti %{comment_id}
69
+ comment_label_reply: Kommentti %{comment_id} (vastauksena kommenttiin %{parent_comment_id})
68
70
  confirm_destroy: Haluatko varmasti poistaa tämän kommentin?
71
+ controls_label: Kommenttien hallinta
69
72
  delete: Poista
70
73
  deleted_at: Kommentti poistettu %{date}
71
74
  deleted_user: Poistettu käyttäjä
72
75
  edit: Muokkaa
73
76
  edited: Muokattu
74
- hide_replies: Piilota vastaukset
77
+ hide_replies:
78
+ one: Piilota vastaus
79
+ other: Piilota %{count} vastausta
75
80
  moderated_at: Kommentti moderoitu %{date}
76
81
  reply: Vastaa
77
82
  report:
@@ -65,13 +65,18 @@ fr-CA:
65
65
  against: Contre
66
66
  in_favor: Pour
67
67
  cancel_reply: Annuler la réponse
68
+ comment_label: Commentaire %{comment_id}
69
+ comment_label_reply: Commentaire %{comment_id} (réponse au commentaire %{parent_comment_id})
68
70
  confirm_destroy: Êtes-vous sûr de vouloir supprimer ce commentaire?
71
+ controls_label: Contrôles du commentaire
69
72
  delete: Supprimer
70
73
  deleted_at: Commentaire supprimé le %{date}
71
74
  deleted_user: Utilisateur supprimé
72
75
  edit: Modifier
73
76
  edited: Modifié
74
- hide_replies: Cacher les réponses
77
+ hide_replies:
78
+ one: Masquer la réponse
79
+ other: Masquer {count} réponses
75
80
  moderated_at: Commentaire modéré le %{date}
76
81
  reply: Répondre
77
82
  report:
@@ -65,13 +65,18 @@ fr:
65
65
  against: Contre
66
66
  in_favor: Pour
67
67
  cancel_reply: Annuler la réponse
68
+ comment_label: Commentaire %{comment_id}
69
+ comment_label_reply: Commentaire %{comment_id} (réponse au commentaire %{parent_comment_id})
68
70
  confirm_destroy: Êtes-vous sûr de vouloir supprimer ce commentaire ?
71
+ controls_label: Contrôles du commentaire
69
72
  delete: Supprimer
70
73
  deleted_at: Commentaire supprimé le %{date}
71
74
  deleted_user: Utilisateur supprimé
72
75
  edit: Modifier
73
76
  edited: Modifié
74
- hide_replies: Cacher les réponses
77
+ hide_replies:
78
+ one: Masquer la réponse
79
+ other: Masquer {count} réponses
75
80
  moderated_at: Commentaire modéré le %{date}
76
81
  reply: Répondre
77
82
  report:
@@ -60,7 +60,6 @@ gl:
60
60
  deleted_user: Usuario eliminado
61
61
  edit: Editar
62
62
  edited: Editado
63
- hide_replies: Ocultar respostas
64
63
  moderated_at: Comentario moderado o %{date}
65
64
  reply: Responder
66
65
  report:
@@ -0,0 +1 @@
1
+ he:
@@ -32,6 +32,8 @@ hu:
32
32
  update:
33
33
  error: Hiba történt a hozzászólás frissítése során.
34
34
  comments_title: Hozzászólás
35
+ last_activity:
36
+ new_comment: 'Új megjegyzés:'
35
37
  votes:
36
38
  create:
37
39
  error: Hiba történt a megjegyzésre való szavazáskor.
@@ -42,6 +44,8 @@ hu:
42
44
  label: Megjegyzés
43
45
  placeholder: Mit gondolsz erről?
44
46
  form_error: Kötelező kitölteni, és nem lehet hosszabb, mint %{length} karakter.
47
+ submit_reply: Válasz publikálása
48
+ submit_root_comment: Megjegyzés publikálása
45
49
  user_group_id:
46
50
  label: 'Megjegyzés mint:'
47
51
  opinion:
@@ -59,13 +63,13 @@ hu:
59
63
  alignment:
60
64
  against: Ellenzem
61
65
  in_favor: Támogatom
66
+ cancel_reply: Válasz visszavonása
62
67
  confirm_destroy: Biztosan szeretné törölni ezt a hozzászólást?
63
68
  delete: Törlés
64
69
  deleted_at: 'Hozzászólás törölve ekkor: %{date}'
65
70
  deleted_user: Törölt felhasználó
66
71
  edit: Szerkesztés
67
72
  edited: Szerkesztve
68
- hide_replies: Válaszok elrejtése
69
73
  moderated_at: Hozzászólás moderálva %{date}
70
74
  reply: Válasz
71
75
  report:
@@ -60,7 +60,6 @@ it:
60
60
  deleted_user: Utente cancellato
61
61
  edit: Modifica
62
62
  edited: Modificato
63
- hide_replies: Nascondi risposte
64
63
  reply: Rispondi
65
64
  report:
66
65
  action: Report
@@ -63,13 +63,17 @@ ja:
63
63
  against: 反対
64
64
  in_favor: 賛成
65
65
  cancel_reply: 返信をキャンセル
66
+ comment_label: コメント %{comment_id}
67
+ comment_label_reply: コメント %{comment_id} (コメント %{parent_comment_id} への返信)
66
68
  confirm_destroy: コメントを削除してもよろしいですか?
69
+ controls_label: コメントコントロール
67
70
  delete: 削除
68
71
  deleted_at: '%{date} にコメントが削除されました'
69
72
  deleted_user: 退会者
70
73
  edit: 編集
71
74
  edited: 編集済み
72
- hide_replies: 返信を非表示
75
+ hide_replies:
76
+ other: '%{count} 件の返信を非表示'
73
77
  moderated_at: '%{date} にモデレートされたコメント'
74
78
  reply: 返信
75
79
  report:
@@ -54,7 +54,6 @@ lb:
54
54
  deleted_user: Gelöschter Benutzer
55
55
  edit: Bearbeiten
56
56
  edited: Bearbeitet
57
- hide_replies: Antworten verbergen
58
57
  reply: Antworten
59
58
  report:
60
59
  action: Melden
@@ -74,7 +74,6 @@ lt:
74
74
  deleted_user: Ištrintas dalyvis
75
75
  edit: Redaguoti
76
76
  edited: Redaguota
77
- hide_replies: Paslėpti atsakymus
78
77
  moderated_at: Komentaras moderuotas %{date}
79
78
  reply: Atsakyti
80
79
  report:
@@ -40,7 +40,6 @@ lv:
40
40
  against: Pret
41
41
  in_favor: Par
42
42
  deleted_user: Dzēsts dalībnieks
43
- hide_replies: Slēpt atbildes
44
43
  reply: Atbildēt
45
44
  report:
46
45
  action: Ziņot
@@ -61,7 +61,6 @@ nl:
61
61
  deleted_user: Verwijderde deelnemer
62
62
  edit: Bewerk
63
63
  edited: Bewerkt
64
- hide_replies: Antwoorden verbergen
65
64
  moderated_at: Reactie gemodereerd op %{date}
66
65
  reply: Antwoord
67
66
  report:
@@ -60,7 +60,6 @@
60
60
  deleted_user: Slettet deltaker
61
61
  edit: Rediger
62
62
  edited: Redigert
63
- hide_replies: Skjul svar
64
63
  reply: Svar
65
64
  report:
66
65
  action: Rapport
@@ -69,13 +69,16 @@ pl:
69
69
  against: Negatywny
70
70
  in_favor: Pozytywny
71
71
  cancel_reply: Anuluj odpowiedź
72
+ comment_label: Komentarz %{comment_id}
73
+ comment_label_reply: Komentarz %{comment_id} (odpowiedź na komentarz %{parent_comment_id})
72
74
  confirm_destroy: Czy na pewno chcesz usunąć ten komentarz?
75
+ controls_label: Kontrolki komentarzy
73
76
  delete: Usuń
74
77
  deleted_at: Komentarz usunięty %{date}
75
78
  deleted_user: Usunięty użytkownik
76
79
  edit: Edytuj
77
80
  edited: Edytowany
78
- hide_replies: Ukryj odpowiedzi
81
+ moderated_at: Komentarz moderowany dnia %{date}
79
82
  reply: Odpowiedz
80
83
  report:
81
84
  action: Zgłoś
@@ -84,6 +87,7 @@ pl:
84
87
  description: Czy ta treść jest nieodpowiednia?
85
88
  details: Dodatkowe komentarze
86
89
  reasons:
90
+ does_not_belong: Zawiera nielegalną działalność, groźby samobójstwa, dane osobowe lub inne informacje, które są niestosowne w %{organization_name}.
87
91
  offensive: Promuje rasizm, seksizm, nienawiść, ataki osobiste, groźby śmierci, groźby samobójcze jakąkolwiek formę mowy nienawiści.
88
92
  spam: Zawiera clickbaity, reklamy, oszustwa lub skrypty botów.
89
93
  title: Zgłoś niewłaściwą treść
@@ -55,7 +55,6 @@ pt-BR:
55
55
  deleted_user: Usuário excluído
56
56
  edit: Editar
57
57
  edited: Editado
58
- hide_replies: Ocultar respostas
59
58
  moderated_at: Comentário moderado em %{date}
60
59
  reply: Resposta
61
60
  report:
@@ -60,7 +60,6 @@ pt:
60
60
  deleted_user: Participante eliminado
61
61
  edit: Editar
62
62
  edited: Editado
63
- hide_replies: Ocultar respostas
64
63
  reply: Responder
65
64
  report:
66
65
  action: Reportar
@@ -34,6 +34,8 @@ ro:
34
34
  update:
35
35
  error: A apărut o eroare la actualizarea comentariului.
36
36
  comments_title: Comentariu
37
+ last_activity:
38
+ new_comment: 'Comentariu nou:'
37
39
  votes:
38
40
  create:
39
41
  error: A apărut o problemă la votarea comentariului.
@@ -45,6 +47,8 @@ ro:
45
47
  label: Comentariu
46
48
  placeholder: Ce părere ai despre asta?
47
49
  form_error: Textul este obligatoriu și nu poate fi mai lung de %{length} caractere.
50
+ submit_reply: Publicați răspuns
51
+ submit_root_comment: Publicați comentariu
48
52
  user_group_id:
49
53
  label: Comentează în calitate de
50
54
  opinion:
@@ -67,9 +71,8 @@ ro:
67
71
  delete: Șterge
68
72
  deleted_at: Comentariu șters la %{date}
69
73
  deleted_user: Participant șters
70
- edit: Editează
71
- edited: Editat
72
- hide_replies: Ascunde răspunsurile
74
+ edit: Actualizare
75
+ edited: Actualizat
73
76
  moderated_at: Comentariu moderat pe %{date}
74
77
  reply: Răspunde
75
78
  report:
@@ -133,7 +136,7 @@ ro:
133
136
  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>.
134
137
  comment_created:
135
138
  email_intro: "%{resource_title} a primit un comentariu. Poți citi comentariul pe această pagină:"
136
- email_outro: Ai primit această notificare deoarece urmărești „%{resource_title}” sau pe autorii săi. Poți anula abonarea de la link-ul anterior.
139
+ 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.
137
140
  email_subject: Există un nou comentariu de la %{author_name} pentru %{resource_title}
138
141
  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>
139
142
  comment_downvoted:
@@ -42,7 +42,6 @@ sk:
42
42
  against: Proti
43
43
  in_favor: Za
44
44
  deleted_user: Zmazaný účastník
45
- hide_replies: Skryť odpovede
46
45
  reply: Odpovedať
47
46
  report:
48
47
  action: Nahlásiť
@@ -1 +1,42 @@
1
+ ---
1
2
  sq:
3
+ decidim:
4
+ components:
5
+ add_comment_form:
6
+ form:
7
+ submit_reply: Publiko përgjigje
8
+ submit_root_comment: Publiko koment
9
+ user_group_id:
10
+ label: Komento si
11
+ opinion:
12
+ label: Mendimi jot mbi këtë temë
13
+ negative: Negativ
14
+ negative_selected: Mendimi jot mbi këtë temë është negativ
15
+ neutral: Neutral
16
+ neutral_selected: Mendimi jot mbi këtë temë është neutral
17
+ positive: Pozitiv
18
+ positive_selected: Mendimi jot mbi këtë temë është pozitiv
19
+ remaining_characters: "%{count} karaktere të mbetura"
20
+ remaining_characters_1: "%{count} karakter i mbetur"
21
+ title: Shto komentin tënd
22
+ comment:
23
+ alignment:
24
+ against: Kundër
25
+ in_favor: Pro
26
+ cancel_reply: Anullo përgjigje
27
+ confirm_destroy: A je i sigurt që do ta fshish këtë koment?
28
+ delete: Fshi
29
+ deleted_at: Komenti u fshi në datën %{date}
30
+ edit: Përpuno
31
+ edited: Ndryshuar
32
+ moderated_at: Komenti u moderua në datën %{date}
33
+ reply: Përgjigju
34
+ report:
35
+ action: Raporto
36
+ already_reported: Kjo përmbajtje është raportuar nga të tjerë dhe do rishikohet nga administratorët.
37
+ close: Mbyll
38
+ description: Përmbajtje e papërshtatshme?
39
+ details: Komente të tjera
40
+ reasons:
41
+ does_not_belong: Përmban aktivitete të paligjshme, kërcënime për vetëvrasje, informacion personal apo diçka tjetër që mendon se nuk i përket %{organization_name}.
42
+ offensive: Përmban racizëm, seksizëm, ofendime, sulme personale, kërcënime me vdekje, shtyrje për vetëvrasje apo forma të tjera të gjuhës së urrejtjes.
@@ -2,8 +2,6 @@
2
2
  sr:
3
3
  decidim:
4
4
  components:
5
- comment:
6
- hide_replies: Sakrij odgovore
7
5
  comments:
8
6
  comment_details_title: Detalji o komentaru
9
7
  single_comment_warning_title: Vidite samo jedan komentar
@@ -63,7 +63,6 @@ sv:
63
63
  deleted_user: Raderad deltagare
64
64
  edit: Redigera
65
65
  edited: Redigerad
66
- hide_replies: Göm svar
67
66
  moderated_at: Kommentar modererad den %{date}
68
67
  reply: Svara
69
68
  report:
@@ -41,8 +41,10 @@ tr:
41
41
  alignment:
42
42
  against: Karşısında
43
43
  in_favor: Lehine
44
+ comment_label: Yorum %{comment_id}
45
+ comment_label_reply: Yorum %{comment_id} (Yoruma Yanıt %{parent_comment_id})
46
+ controls_label: Yorum Kontrolü
44
47
  deleted_user: Silinmiş katılımcı
45
- hide_replies: Yanıtları gizle
46
48
  reply: Cevapla
47
49
  report:
48
50
  action: Rapor
@@ -36,7 +36,6 @@ zh-CN:
36
36
  against: 反对的
37
37
  in_favor: 优惠的
38
38
  deleted_user: 删除参与者
39
- hide_replies: 隐藏回复
40
39
  reply: 答复
41
40
  report:
42
41
  action: 报告
@@ -63,7 +63,6 @@ zh-TW:
63
63
  deleted_user: 已刪除的參與者
64
64
  edit: 編輯
65
65
  edited: 已編輯
66
- hide_replies: 隱藏答覆
67
66
  moderated_at: 評論在%{date} 被審核
68
67
  reply: 回覆
69
68
  report:
@@ -0,0 +1,21 @@
1
+ # frozen_string_literal: true
2
+
3
+ class AddCommentVoteCounterCacheToComments < ActiveRecord::Migration[6.1]
4
+ def change
5
+ add_column :decidim_comments_comments, :up_votes_count, :integer, null: false, default: 0, index: true
6
+ add_column :decidim_comments_comments, :down_votes_count, :integer, null: false, default: 0, index: true
7
+
8
+ # We cannot use the reset_counters as up_votes and down_votes are scoped associationws
9
+ reversible do |dir|
10
+ dir.up do
11
+ Decidim::Comments::Comment.reset_column_information
12
+ Decidim::Comments::Comment.find_each do |record|
13
+ # rubocop:disable Rails/SkipsModelValidations
14
+ record.class.update_counters(record.id, up_votes_count: record.up_votes.length)
15
+ record.class.update_counters(record.id, down_votes_count: record.down_votes.length)
16
+ # rubocop:enable Rails/SkipsModelValidations
17
+ end
18
+ end
19
+ end
20
+ end
21
+ end
@@ -0,0 +1,40 @@
1
+ # frozen_string_literal: true
2
+
3
+ $LOAD_PATH.push File.expand_path("lib", __dir__)
4
+
5
+ # Maintain your gem's version:
6
+ require "decidim/comments/version"
7
+
8
+ # Describe your gem and declare its dependencies:
9
+ Gem::Specification.new do |s|
10
+ s.version = Decidim::Comments.version
11
+ s.authors = ["Josep Jaume Rey Peroy", "Marc Riera Casals", "Oriol Gual Oliva"]
12
+ s.email = ["josepjaume@gmail.com", "mrc2407@gmail.com", "oriolgual@gmail.com"]
13
+ s.license = "AGPL-3.0"
14
+ s.homepage = "https://decidim.org"
15
+ s.metadata = {
16
+ "bug_tracker_uri" => "https://github.com/decidim/decidim/issues",
17
+ "documentation_uri" => "https://docs.decidim.org/",
18
+ "funding_uri" => "https://opencollective.com/decidim",
19
+ "homepage_uri" => "https://decidim.org",
20
+ "source_code_uri" => "https://github.com/decidim/decidim"
21
+ }
22
+ s.required_ruby_version = "~> 3.1.0"
23
+
24
+ s.name = "decidim-comments"
25
+ s.summary = "Decidim comments module"
26
+ s.description = "Pluggable comments system for some components."
27
+
28
+ s.files = Dir.chdir(__dir__) do
29
+ `git ls-files -z`.split("\x0").select do |f|
30
+ (File.expand_path(f) == __FILE__) ||
31
+ f.start_with?(*%w(app/ config/ db/ lib/ Rakefile README.md))
32
+ end
33
+ end
34
+
35
+ s.add_dependency "decidim-core", Decidim::Comments.version
36
+ s.add_dependency "redcarpet", "~> 3.5", ">= 3.5.1"
37
+
38
+ s.add_development_dependency "decidim-admin", Decidim::Comments.version
39
+ s.add_development_dependency "decidim-dev", Decidim::Comments.version
40
+ end
@@ -58,7 +58,7 @@ module Decidim
58
58
  end
59
59
 
60
60
  def up_votes
61
- object.up_votes.size
61
+ object.up_votes_count
62
62
  end
63
63
 
64
64
  def up_voted
@@ -66,7 +66,7 @@ module Decidim
66
66
  end
67
67
 
68
68
  def down_votes
69
- object.down_votes.size
69
+ object.down_votes_count
70
70
  end
71
71
 
72
72
  def down_voted
@@ -4,8 +4,11 @@ require "decidim/core/test/factories"
4
4
 
5
5
  FactoryBot.define do
6
6
  factory :comment, class: "Decidim::Comments::Comment" do
7
- author { build(:user, organization: commentable.organization) }
8
- commentable { build(:dummy_resource) }
7
+ transient do
8
+ skip_injection { false }
9
+ end
10
+ author { build(:user, organization: commentable.organization, skip_injection:) }
11
+ commentable { build(:dummy_resource, skip_injection:) }
9
12
  root_commentable { commentable }
10
13
  body { Decidim::Faker::Localized.paragraph }
11
14
  participatory_space { commentable.try(:participatory_space) }
@@ -25,22 +28,32 @@ FactoryBot.define do
25
28
  end
26
29
 
27
30
  trait :comment_on_comment do
28
- author { build(:user, organization: root_commentable.organization) }
31
+ author { build(:user, organization: root_commentable.organization, skip_injection:) }
29
32
  commentable do
30
33
  build(
31
34
  :comment,
32
35
  author:,
33
36
  root_commentable:,
34
- commentable: root_commentable
37
+ commentable: root_commentable,
38
+ skip_injection:
35
39
  )
36
40
  end
37
- root_commentable { build(:dummy_resource) }
41
+ root_commentable { build(:dummy_resource, skip_injection:) }
42
+ end
43
+
44
+ trait :moderated do
45
+ after(:create) do |comment, evaluator|
46
+ create(:moderation, reportable: comment, hidden_at: 2.days.ago, skip_injection: evaluator.skip_injection)
47
+ end
38
48
  end
39
49
  end
40
50
 
41
51
  factory :comment_vote, class: "Decidim::Comments::CommentVote" do
42
- comment { build(:comment) }
43
- author { build(:user, organization: comment.organization) }
52
+ transient do
53
+ skip_injection { false }
54
+ end
55
+ comment { build(:comment, skip_injection:) }
56
+ author { build(:user, organization: comment.organization, skip_injection:) }
44
57
  weight { [-1, 1].sample }
45
58
 
46
59
  trait :up_vote do