decidim-comments 0.28.0 → 0.28.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/cells/decidim/comments/comment/actions.erb +4 -5
- data/app/cells/decidim/comments/comment/show.erb +7 -5
- data/app/cells/decidim/comments/comment_cell.rb +24 -4
- data/app/cells/decidim/comments/comment_thread/show.erb +1 -1
- data/app/cells/decidim/comments/comments/order_control.erb +2 -1
- data/app/cells/decidim/comments/comments/show.erb +1 -1
- data/app/cells/decidim/comments/comments/user_comments_blocked_warning.erb +2 -2
- data/app/cells/decidim/comments/comments_cell.rb +5 -1
- data/app/events/decidim/comments/comment_event.rb +4 -0
- data/app/models/decidim/comments/comment.rb +2 -2
- data/app/models/decidim/comments/comment_vote.rb +10 -0
- data/app/packs/src/decidim/comments/comments.component.test.js +4 -4
- data/app/packs/src/decidim/comments/comments.component_for_testing.js +1 -0
- data/config/locales/ar.yml +0 -1
- data/config/locales/bg.yml +169 -0
- data/config/locales/ca.yml +13 -8
- data/config/locales/cs.yml +3 -1
- data/config/locales/de.yml +6 -1
- data/config/locales/el.yml +0 -1
- data/config/locales/en.yml +6 -1
- data/config/locales/es-MX.yml +6 -1
- data/config/locales/es-PY.yml +6 -1
- data/config/locales/es.yml +14 -9
- data/config/locales/eu.yml +3 -1
- data/config/locales/fi-plain.yml +6 -1
- data/config/locales/fi.yml +6 -1
- data/config/locales/fr-CA.yml +6 -1
- data/config/locales/fr.yml +6 -1
- data/config/locales/gl.yml +0 -1
- data/config/locales/he-IL.yml +1 -0
- data/config/locales/hu.yml +5 -1
- data/config/locales/it.yml +0 -1
- data/config/locales/ja.yml +5 -1
- data/config/locales/lb.yml +0 -1
- data/config/locales/lt.yml +0 -1
- data/config/locales/lv.yml +0 -1
- data/config/locales/nl.yml +0 -1
- data/config/locales/no.yml +0 -1
- data/config/locales/pl.yml +5 -1
- data/config/locales/pt-BR.yml +0 -1
- data/config/locales/pt.yml +0 -1
- data/config/locales/ro-RO.yml +7 -4
- data/config/locales/sk.yml +0 -1
- data/config/locales/sq-AL.yml +41 -0
- data/config/locales/sr-CS.yml +0 -2
- data/config/locales/sv.yml +0 -1
- data/config/locales/tr-TR.yml +3 -1
- data/config/locales/zh-CN.yml +0 -1
- data/config/locales/zh-TW.yml +0 -1
- data/db/migrate/20240304092558_add_comment_vote_counter_cache_to_comments.rb +21 -0
- data/decidim-comments.gemspec +40 -0
- data/lib/decidim/api/comment_type.rb +2 -2
- data/lib/decidim/comments/test/factories.rb +20 -7
- data/lib/decidim/comments/test/shared_examples/comment_event.rb +34 -1
- data/lib/decidim/comments/test/shared_examples/comment_voted_event.rb +1 -1
- data/lib/decidim/comments/version.rb +1 -1
- metadata +14 -12
- data/config/environment.rb +0 -3
data/config/locales/es-PY.yml
CHANGED
@@ -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:
|
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:
|
data/config/locales/es.yml
CHANGED
@@ -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:
|
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
|
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
|
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
|
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
|
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
|
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:
|
data/config/locales/eu.yml
CHANGED
@@ -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:
|
data/config/locales/fi-plain.yml
CHANGED
@@ -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:
|
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:
|
data/config/locales/fi.yml
CHANGED
@@ -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:
|
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:
|
data/config/locales/fr-CA.yml
CHANGED
@@ -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:
|
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:
|
data/config/locales/fr.yml
CHANGED
@@ -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:
|
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:
|
data/config/locales/gl.yml
CHANGED
@@ -0,0 +1 @@
|
|
1
|
+
he:
|
data/config/locales/hu.yml
CHANGED
@@ -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:
|
data/config/locales/it.yml
CHANGED
data/config/locales/ja.yml
CHANGED
@@ -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:
|
data/config/locales/lb.yml
CHANGED
data/config/locales/lt.yml
CHANGED
data/config/locales/lv.yml
CHANGED
data/config/locales/nl.yml
CHANGED
data/config/locales/no.yml
CHANGED
data/config/locales/pl.yml
CHANGED
@@ -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
|
-
|
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ść
|
data/config/locales/pt-BR.yml
CHANGED
data/config/locales/pt.yml
CHANGED
data/config/locales/ro-RO.yml
CHANGED
@@ -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:
|
71
|
-
edited:
|
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:
|
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:
|
data/config/locales/sk.yml
CHANGED
data/config/locales/sq-AL.yml
CHANGED
@@ -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.
|
data/config/locales/sr-CS.yml
CHANGED
data/config/locales/sv.yml
CHANGED
data/config/locales/tr-TR.yml
CHANGED
@@ -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
|
data/config/locales/zh-CN.yml
CHANGED
data/config/locales/zh-TW.yml
CHANGED
@@ -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.
|
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.
|
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
|
-
|
8
|
-
|
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
|
-
|
43
|
-
|
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
|