decidim-comments 0.29.0 → 0.29.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.
- checksums.yaml +4 -4
- data/app/cells/decidim/comments/comment/show.erb +1 -1
- data/app/views/decidim/comments/comments/update.js.erb +6 -0
- data/config/locales/bn-BD.yml +1 -0
- data/config/locales/bs-BA.yml +15 -0
- data/config/locales/ca.yml +2 -2
- data/config/locales/de.yml +1 -1
- data/config/locales/es.yml +1 -1
- data/config/locales/eu.yml +18 -15
- data/config/locales/fi.yml +4 -4
- data/config/locales/pt-BR.yml +3 -0
- data/config/locales/ro-RO.yml +11 -8
- data/config/locales/sv.yml +41 -23
- data/decidim-comments.gemspec +1 -1
- data/lib/decidim/api/comment_type.rb +13 -0
- data/lib/decidim/api/commentable_interface.rb +7 -1
- data/lib/decidim/comments/commentable_with_component.rb +3 -1
- data/lib/decidim/comments/query_extensions.rb +1 -1
- data/lib/decidim/comments/test/factories.rb +1 -1
- data/lib/decidim/comments/version.rb +1 -1
- metadata +11 -9
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 29c4640f70896179c7d4fa2885eee4cfbe286588be5587880d018525a2772100
|
|
4
|
+
data.tar.gz: 31ac6feed2941724452c16479c4e4a88533920f6ab8a60e7b37894b18c98a0dd
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 37e85939bc6401c18b46d0b31debd195bc2b003d71099efbc26ebd2977a4241121355af7744ca555a0abc87cb01a0fe93e273a85e72cde27b2419c95d573e634
|
|
7
|
+
data.tar.gz: 41b44ef49960ffaed1d4793fdfe5de882d8818f9cb19c3e4591ba2d8a3c00ce51c713001597d1a7f5fb5853b67351149f2510a25f12ba1ecbc520aa50507ab72
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
<%== cell("decidim/author", author_presenter) %>
|
|
12
12
|
</span>
|
|
13
13
|
<span class="text-gray-2 text-sm">
|
|
14
|
-
<%= time_tag created_at,
|
|
14
|
+
<%= time_tag created_at, format: :decidim_short %>
|
|
15
15
|
</span>
|
|
16
16
|
<% if edited? %>
|
|
17
17
|
<span class="label">
|
|
@@ -10,6 +10,12 @@ $(() => {
|
|
|
10
10
|
var commentId = <%= @comment.id.to_json %>;
|
|
11
11
|
var $comment = $("#comment_<%= @comment.id %>");
|
|
12
12
|
|
|
13
|
+
var $edit_modal = document.getElementById(`editCommentModal${commentId}`)
|
|
14
|
+
|
|
15
|
+
if ($edit_modal !== undefined) {
|
|
16
|
+
$edit_modal.remove()
|
|
17
|
+
}
|
|
18
|
+
|
|
13
19
|
$comment.replaceWith(commentHtml);
|
|
14
20
|
|
|
15
21
|
// Re-create the component
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
bn:
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
---
|
|
2
|
+
bs:
|
|
3
|
+
decidim:
|
|
4
|
+
components:
|
|
5
|
+
comments:
|
|
6
|
+
comment_details_title: Detalji o komentaru
|
|
7
|
+
single_comment_warning_title: Vidite samo jedan komentar
|
|
8
|
+
events:
|
|
9
|
+
comments:
|
|
10
|
+
comment_by_followed_user_group:
|
|
11
|
+
email_intro: 'Grupa %{author_name} je ostavila komentar na %{resource_title}. Možete ga pročitati na ovoj strani:'
|
|
12
|
+
user_group_mentioned:
|
|
13
|
+
email_intro: Grupa kojoj pripadate je pomenuta
|
|
14
|
+
email_outro: Dobili ste ovo obaveštenje jer ste član grupe %{group_name} koja je pomenuta u %{resource_title}.
|
|
15
|
+
email_subject: Pomenuti ste u %{resource_title} kao član grupe %{group_name}
|
data/config/locales/ca.yml
CHANGED
|
@@ -39,7 +39,7 @@ ca:
|
|
|
39
39
|
error: S'ha produït un error en votar el comentari.
|
|
40
40
|
components:
|
|
41
41
|
add_comment_form:
|
|
42
|
-
account_message: <a href="%{sign_in_url}">Inicia sessió</a> o <a href="%{sign_up_url}">crea un compte</a>per afegir el teu comentari.
|
|
42
|
+
account_message: <a href="%{sign_in_url}">Inicia sessió</a> o <a href="%{sign_up_url}">crea un compte</a> per afegir el teu comentari.
|
|
43
43
|
form:
|
|
44
44
|
body:
|
|
45
45
|
label: Comentari
|
|
@@ -137,7 +137,7 @@ ca:
|
|
|
137
137
|
email_subject: Hi ha un nou comentari de %{author_name} en %{resource_title}
|
|
138
138
|
notification_title: Hi ha un nou comentari per <a href="%{author_path}">%{author_name} %{author_nickname}</a> a <a href="%{resource_path}">%{resource_title}</a>.
|
|
139
139
|
comment_created:
|
|
140
|
-
email_intro: "
|
|
140
|
+
email_intro: "Algú ha deixat un comentari a \"%{resource_title}\". Pots llegir el comentari a través del següent enllaç:"
|
|
141
141
|
email_outro: Has rebut aquesta notificació perquè estàs seguint el comentari "%{resource_title}" o la seva autora. Pots deixar de seguir-la des de l'enllaç anterior.
|
|
142
142
|
email_subject: Hi ha un nou comentari de %{author_name} a %{resource_title}
|
|
143
143
|
notification_title: Hi ha un nou comentari de <a href="%{author_path}">%{author_name} %{author_nickname}</a> en <a href="%{resource_path}">%{resource_title}</a>
|
data/config/locales/de.yml
CHANGED
|
@@ -87,7 +87,7 @@ de:
|
|
|
87
87
|
details: Zusätzliche Kommentare
|
|
88
88
|
reasons:
|
|
89
89
|
does_not_belong: Enthält illegale Aktivitäten, Selbstmorddrohungen, persönliche Informationen oder etwas anderes, von dem Sie denken, dass es nicht auf %{organization_name} gehört.
|
|
90
|
-
offensive: Enthält Rassismus, Sexismus, Verleumdungen, persönliche Angriffe, Morddrohungen, Selbstmordanträge oder
|
|
90
|
+
offensive: Enthält Formen von Rassismus, Sexismus, Verleumdungen, persönliche Angriffe, Morddrohungen, Selbstmordanträge oder andere Formen von seelischer Gewalt.
|
|
91
91
|
spam: Enthält Clickbait, Werbung, Scams oder Script Bots.
|
|
92
92
|
title: Ungeeigneten Inhalt melden
|
|
93
93
|
show_replies:
|
data/config/locales/es.yml
CHANGED
|
@@ -137,7 +137,7 @@ es:
|
|
|
137
137
|
email_subject: Hay un nuevo comentario de %{author_name} en %{resource_title}
|
|
138
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>.
|
|
139
139
|
comment_created:
|
|
140
|
-
email_intro: "%{resource_title}
|
|
140
|
+
email_intro: "Alguien ha dejado un comentario en \"%{resource_title}\". Puedes leer el comentario a través del siguiente enlace:"
|
|
141
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.
|
|
142
142
|
email_subject: Hay un nuevo comentario de %{author_name} en %{resource_title}
|
|
143
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>
|
data/config/locales/eu.yml
CHANGED
|
@@ -14,15 +14,15 @@ eu:
|
|
|
14
14
|
one: Iruzkina
|
|
15
15
|
other: Iruzkinak
|
|
16
16
|
decidim/comments/comment_vote:
|
|
17
|
-
one:
|
|
18
|
-
other:
|
|
17
|
+
one: Babesa
|
|
18
|
+
other: Babesak
|
|
19
19
|
decidim:
|
|
20
20
|
comments:
|
|
21
21
|
admin:
|
|
22
22
|
shared:
|
|
23
23
|
availability_fields:
|
|
24
24
|
enabled: Iruzkinak gaituta
|
|
25
|
-
end_time: Iruzkinak gaituta
|
|
25
|
+
end_time: Iruzkinak noiz arte gaituta
|
|
26
26
|
start_time: Iruzkinak noiztik aktibatuta
|
|
27
27
|
comments:
|
|
28
28
|
create:
|
|
@@ -33,10 +33,10 @@ eu:
|
|
|
33
33
|
error: Arazo bat ego da iruzkina eguneratzean.
|
|
34
34
|
comments_title: Iruzkina
|
|
35
35
|
last_activity:
|
|
36
|
-
new_comment: '
|
|
36
|
+
new_comment: 'Iruzkin berria:'
|
|
37
37
|
votes:
|
|
38
38
|
create:
|
|
39
|
-
error: Arazo bat
|
|
39
|
+
error: Arazo bat dago iruzkina bozkatzeko.
|
|
40
40
|
components:
|
|
41
41
|
add_comment_form:
|
|
42
42
|
account_message: Sortu kontu bat <a href="%{sign_in_url}">Log in</a> edo <a href="%{sign_up_url}"> </a> zure iruzkina gehitzeko.
|
|
@@ -45,8 +45,8 @@ eu:
|
|
|
45
45
|
label: Iruzkina
|
|
46
46
|
placeholder: Zer deritzozu honi?
|
|
47
47
|
form_error: Testua behar da, eta ezin du izan %{length} karaktere baino gehiago.
|
|
48
|
-
submit_reply:
|
|
49
|
-
submit_root_comment:
|
|
48
|
+
submit_reply: Erantzuna argitaratu
|
|
49
|
+
submit_root_comment: Iruzkina argitaratu
|
|
50
50
|
user_group_id:
|
|
51
51
|
label: 'Egin iruzkina honako honen gisa:'
|
|
52
52
|
opinion:
|
|
@@ -57,14 +57,14 @@ eu:
|
|
|
57
57
|
neutral_selected: Zure iritzia gai honi buruz neutroa da
|
|
58
58
|
positive: Positiboa
|
|
59
59
|
positive_selected: Zure iritzia gai honi buruz positiboa da
|
|
60
|
-
remaining_characters: "%{count}
|
|
60
|
+
remaining_characters: "%{count} kakaktere geratzen dira"
|
|
61
61
|
remaining_characters_1: "karaktere %{count} geratzen da"
|
|
62
62
|
title: Gehitu zure iruzkina
|
|
63
63
|
comment:
|
|
64
64
|
alignment:
|
|
65
65
|
against: Aurka
|
|
66
66
|
in_favor: Alde
|
|
67
|
-
cancel_reply:
|
|
67
|
+
cancel_reply: Erantzuna ezabatu
|
|
68
68
|
comment_label: Iruzkindu %{comment_id}
|
|
69
69
|
comment_label_reply: Iruzkindu %{comment_id} (erantzun %{parent_comment_id} iruzkinei)
|
|
70
70
|
confirm_destroy: Ziur zaude iruzkin hau ezabatu nahi duzula?
|
|
@@ -74,6 +74,9 @@ eu:
|
|
|
74
74
|
deleted_user: Parte-hartzailea ezabatua
|
|
75
75
|
edit: Editatu
|
|
76
76
|
edited: Editatuta
|
|
77
|
+
hide_replies:
|
|
78
|
+
one: Ezkutatu erantzuna
|
|
79
|
+
other: Ezkutatu %{count} erantzun
|
|
77
80
|
moderated_at: Iruzkina %{date}-an moderatu egin da
|
|
78
81
|
reply: Erantzuna
|
|
79
82
|
report:
|
|
@@ -107,7 +110,7 @@ eu:
|
|
|
107
110
|
single_comment_warning: <a href="%{url}">k erakusten ditu iruzkin guztiak</a>
|
|
108
111
|
single_comment_warning_title: Iruzkin bakar bat ikusten ari zara
|
|
109
112
|
title:
|
|
110
|
-
one: "
|
|
113
|
+
one: "Iruzkin bat"
|
|
111
114
|
other: "%{count} iruzkin"
|
|
112
115
|
down_vote_button:
|
|
113
116
|
text: Ez nago ados iruzkin honekin
|
|
@@ -125,7 +128,7 @@ eu:
|
|
|
125
128
|
comments:
|
|
126
129
|
comment_by_followed_user:
|
|
127
130
|
email_intro: "%{author_name} egileak iruzkin bat utzi du %{resource_title} helbidean. Orri honetan irakur dezakezu:"
|
|
128
|
-
email_outro: Jakinarazpen hau jaso duzu %{author_name}
|
|
131
|
+
email_outro: Jakinarazpen hau jaso duzu %{author_name} parte-hartzailea jarraitzen duzulako. Nahi izatekotan erabiltzaile hori bere profil-orritik jarraitzeari utz diezaiokezu.
|
|
129
132
|
email_subject: '%{author_name} k beste iruzkin bat egin du hemen: %{resource_title}'
|
|
130
133
|
notification_title: '<a href="%{author_path}">%{author_name} %{author_nickname}</a> k iruzkin berri bat egin du hemen: <a href="%{resource_path}">%{resource_title}</a>-an.'
|
|
131
134
|
comment_by_followed_user_group:
|
|
@@ -139,7 +142,7 @@ eu:
|
|
|
139
142
|
email_subject: '%{author_name} k beste iruzkin berri bat egin du hemen: %{resource_title}'
|
|
140
143
|
notification_title: '<a href="%{author_path}">%{author_name} %{author_nickname}</a> k iruzkin berri bat egin du hemen: <a href="%{resource_path}">%{resource_title}</a></a>'
|
|
141
144
|
comment_downvoted:
|
|
142
|
-
email_intro: Zure iruzkina hemen "%{resource_title}" negatiboki bozkatu da. Orain %{upvotes}
|
|
145
|
+
email_intro: Zure iruzkina hemen "%{resource_title}" negatiboki bozkatu da. Orain %{upvotes} babes positibo eta %{downvotes} boto negatibo dituzu guztira.
|
|
143
146
|
email_outro: Jakinarazpen hau jaso duzu iruzkin honen egilea zarelako.
|
|
144
147
|
email_subject: Zure iruzkina hemen "%{resource_title}" negatiboki bozkatu da.
|
|
145
148
|
notification_title: Zure <a href="%{resource_path}">iruzkina</a> hemen "%{resource_title}" negatiboki bozkatu da. Orain guztira %{upvotes} boto positibo eta %{downvotes} boto negatibo dituzu.
|
|
@@ -149,9 +152,9 @@ eu:
|
|
|
149
152
|
email_subject: Zure iruzkina hemen "%{resource_title}" positiboki bozkatu da.
|
|
150
153
|
notification_title: Zure <a href="%{resource_path}">iruzkina </a> "%{resource_title}"-an positiboki bozkatu da. Orain guztira %{upvotes} botos positibo eta %{downvotes} boto negatibo dituzu.
|
|
151
154
|
reply_created:
|
|
152
|
-
email_intro: "%{author_name}
|
|
155
|
+
email_intro: "%{author_name} egileak zure iruzkina erantzun du hemen: %{resource_title}. Orri honetan irakur dezakezu:"
|
|
153
156
|
email_outro: Jakinarazpen hau jaso duzu zure iruzkina erantzun delako.
|
|
154
|
-
email_subject: "%{author_name}
|
|
157
|
+
email_subject: "%{author_name} k zure iruzkina erantzun du hemen: %{resource_title}"
|
|
155
158
|
notification_title: <a href="%{author_path}">%{author_name} %{author_nickname}</a> -k zure iruzkinari erantzun dio <a href="%{resource_path}">%{resource_title}</a>
|
|
156
159
|
user_group_mentioned:
|
|
157
160
|
email_intro: Zure talde bat aipatu dute
|
|
@@ -165,7 +168,7 @@ eu:
|
|
|
165
168
|
notification_title: 'Hemen: <a href="%{group_path}">%{group_name} %{group_nickname}</a> egile honek: <a href="%{author_path}">%{author_name} %{author_nickname}</a> aipatu zaitu'
|
|
166
169
|
metrics:
|
|
167
170
|
comments:
|
|
168
|
-
description:
|
|
171
|
+
description: Parte-hatzaileek sortutako iruzkin kopurua
|
|
169
172
|
object: iruzkinak
|
|
170
173
|
title: Iruzkinak
|
|
171
174
|
errors:
|
data/config/locales/fi.yml
CHANGED
|
@@ -102,7 +102,7 @@ fi:
|
|
|
102
102
|
recent: Uusimmat
|
|
103
103
|
title: 'Järjestä tulokset:'
|
|
104
104
|
comments:
|
|
105
|
-
blocked_comments_for_unauthorized_user_warning: Tilisi tulee olla
|
|
105
|
+
blocked_comments_for_unauthorized_user_warning: Tilisi tulee olla vahvistettu, jotta voit kommentoida tällä hetkellä. Voit kuitenkin lukea muiden jättämiä kommentteja.
|
|
106
106
|
blocked_comments_for_user_warning: Et voi kommentoida tällä hetkellä, mutta voit lukea aikaisempia kommentteja.
|
|
107
107
|
blocked_comments_warning: Kommentit on poistettu käytöstä tällä hetkellä, mutta voit lukea aikaisempia kommentteja.
|
|
108
108
|
comment_details_title: Kommentin yksityiskohdat
|
|
@@ -128,7 +128,7 @@ fi:
|
|
|
128
128
|
comments:
|
|
129
129
|
comment_by_followed_user:
|
|
130
130
|
email_intro: "%{author_name} on jättänyt kommentin kohteessa %{resource_title}. Voit lukea sen sivulta:"
|
|
131
|
-
email_outro: Tämä ilmoitus on lähetetty sinulle, koska seuraat %{author_name}. Voit perua seuraamisen kyseisen
|
|
131
|
+
email_outro: Tämä ilmoitus on lähetetty sinulle, koska seuraat osallistujaa %{author_name}. Voit perua seuraamisen kyseisen osallistujan profiilisivulta.
|
|
132
132
|
email_subject: '%{author_name} on jättänyt uuden kommentin kohteessa %{resource_title}'
|
|
133
133
|
notification_title: <a href="%{author_path}">%{author_name} %{author_nickname}</a> on jättänyt uuden kommentin kohteessa <a href="%{resource_path}">%{resource_title}</a>.
|
|
134
134
|
comment_by_followed_user_group:
|
|
@@ -155,7 +155,7 @@ fi:
|
|
|
155
155
|
email_intro: "%{author_name} on vastannut kommentiisi kohdassa %{resource_title}. Voit lukea sen sivulta:"
|
|
156
156
|
email_outro: Tämä ilmoitus on lähetetty sinulle, koska kommenttiisi vastattiin.
|
|
157
157
|
email_subject: "%{author_name} on vastannut kommentiisi %{resource_title}"
|
|
158
|
-
notification_title: <a href="%{author_path}">%{author_name} %{author_nickname}</a> on vastannut kommentiisi
|
|
158
|
+
notification_title: <a href="%{author_path}">%{author_name} %{author_nickname}</a> on vastannut kommentiisi kohteessa <a href="%{resource_path}">%{resource_title}</a>
|
|
159
159
|
user_group_mentioned:
|
|
160
160
|
email_intro: Ryhmä, jonka jäsen olet, on mainittu
|
|
161
161
|
email_outro: Tämä ilmoitus on lähetetty sinulle, koska olet jäsenenä ryhmässä %{group_name} ja ryhmä on mainittu kohteessa %{resource_title}.
|
|
@@ -165,7 +165,7 @@ fi:
|
|
|
165
165
|
email_intro: Sinut on mainittu
|
|
166
166
|
email_outro: Tämä ilmoitus on lähetetty sinulle, koska sinut on mainittu kohteessa %{resource_title}.
|
|
167
167
|
email_subject: Sinut on mainittu kohdassa %{resource_title}
|
|
168
|
-
notification_title: <a href="%{author_path}">%{author_name} %{author_nickname}</a> on maininnut sinut
|
|
168
|
+
notification_title: <a href="%{author_path}">%{author_name} %{author_nickname}</a> on maininnut sinut kohteessa <a href="%{resource_path}">%{resource_title}</a>
|
|
169
169
|
metrics:
|
|
170
170
|
comments:
|
|
171
171
|
description: Käyttäjien kirjoittamien kommenttien määrä
|
data/config/locales/pt-BR.yml
CHANGED
|
@@ -67,6 +67,9 @@ pt-BR:
|
|
|
67
67
|
offensive: Contém racismo, sexismo, insultos, ataques pessoais, ameaças de morte, pedidos de suicídio ou qualquer tipo de discurso de ódio.
|
|
68
68
|
spam: Contém clickbait, publicidade, fraudes ou script bots.
|
|
69
69
|
title: Reportar conteúdo impróprio
|
|
70
|
+
show_replies:
|
|
71
|
+
one: Mostrar resposta
|
|
72
|
+
other: Mostrar %{count} respostas
|
|
70
73
|
single_comment_link_title: Obter o link
|
|
71
74
|
comment_order_selector:
|
|
72
75
|
order:
|
data/config/locales/ro-RO.yml
CHANGED
|
@@ -41,15 +41,16 @@ ro:
|
|
|
41
41
|
error: A apărut o problemă la votarea comentariului.
|
|
42
42
|
components:
|
|
43
43
|
add_comment_form:
|
|
44
|
+
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ă.
|
|
44
45
|
form:
|
|
45
46
|
body:
|
|
46
47
|
label: Comentariu
|
|
47
|
-
placeholder: Ce părere
|
|
48
|
+
placeholder: Ce părere aveţi despre asta?
|
|
48
49
|
form_error: Textul este obligatoriu și nu poate fi mai lung de %{length} caractere.
|
|
49
50
|
submit_reply: Publicați răspuns
|
|
50
51
|
submit_root_comment: Publicați comentariu
|
|
51
52
|
user_group_id:
|
|
52
|
-
label:
|
|
53
|
+
label: Comentați în calitate de
|
|
53
54
|
opinion:
|
|
54
55
|
label: Opinia ta despre acest subiect
|
|
55
56
|
negative: Negativ
|
|
@@ -60,16 +61,18 @@ ro:
|
|
|
60
61
|
positive_selected: Opinia ta despre acest subiect este pozitivă
|
|
61
62
|
remaining_characters: "%{count} caractere rămase"
|
|
62
63
|
remaining_characters_1: "%{count} caracter rămas"
|
|
63
|
-
title:
|
|
64
|
+
title: Adaugați comentariul dumneavoastră
|
|
64
65
|
comment:
|
|
65
66
|
alignment:
|
|
66
67
|
against: Împotrivă
|
|
67
68
|
in_favor: Pentru
|
|
68
69
|
cancel_reply: Anulează răspunsul
|
|
69
70
|
comment_label: Comentariu %{comment_id}
|
|
70
|
-
|
|
71
|
+
comment_label_reply: Comentariu %{comment_id} (răspuns la comentariul %{parent_comment_id})
|
|
72
|
+
confirm_destroy: Sigur doriți să ștergeți acest comentariu?
|
|
73
|
+
controls_label: Control comentariu
|
|
71
74
|
delete: Șterge
|
|
72
|
-
deleted_at: Comentariu șters
|
|
75
|
+
deleted_at: Comentariu șters pe %{date}
|
|
73
76
|
deleted_user: Participant șters
|
|
74
77
|
edit: Actualizare
|
|
75
78
|
edited: Actualizat
|
|
@@ -84,17 +87,17 @@ ro:
|
|
|
84
87
|
already_reported: Acest conținut este deja raportat și va fi revizuit de către un administrator.
|
|
85
88
|
close: Închide
|
|
86
89
|
description: Este acest conținut neadecvat?
|
|
87
|
-
details:
|
|
90
|
+
details: Observaţii suplimentare
|
|
88
91
|
reasons:
|
|
89
92
|
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}.
|
|
90
93
|
offensive: Conține rasism, sexism, insulte, atacuri personale, amenințări cu moartea, cereri de sinucidere sau orice formă de discurs de incitare la ură.
|
|
91
94
|
spam: Conține clickbait, publicitate, escrocherii sau script rulat de roboți.
|
|
92
|
-
title:
|
|
95
|
+
title: Raportați conținut nepotrivit
|
|
93
96
|
show_replies:
|
|
94
97
|
one: Arată răspunsul
|
|
95
98
|
few: Arată %{count} răspunsuri
|
|
96
99
|
other: Arată %{count} răspunsuri
|
|
97
|
-
single_comment_link_title:
|
|
100
|
+
single_comment_link_title: Obține linkul
|
|
98
101
|
comment_order_selector:
|
|
99
102
|
order:
|
|
100
103
|
best_rated: Cele mai apreciate
|
data/config/locales/sv.yml
CHANGED
|
@@ -4,7 +4,7 @@ sv:
|
|
|
4
4
|
models:
|
|
5
5
|
decidim/comments/comment_by_followed_user_event: Kommentar
|
|
6
6
|
decidim/comments/comment_created_event: Kommentar
|
|
7
|
-
decidim/comments/comment_upvoted_event:
|
|
7
|
+
decidim/comments/comment_upvoted_event: Uppröstad kommentarer
|
|
8
8
|
decidim/comments/reply_created_event: Svar till en kommentar
|
|
9
9
|
decidim/comments/user_group_mentioned_event: Nämn
|
|
10
10
|
decidim/comments/user_mentioned_event: Nämn
|
|
@@ -21,49 +21,63 @@ sv:
|
|
|
21
21
|
admin:
|
|
22
22
|
shared:
|
|
23
23
|
availability_fields:
|
|
24
|
-
enabled:
|
|
25
|
-
end_time: Kommentarer aktiverade till
|
|
24
|
+
enabled: Aktivera kommentarer
|
|
25
|
+
end_time: Kommentarer aktiverade till och med
|
|
26
26
|
start_time: Kommentarer aktiverade från och med
|
|
27
27
|
comments:
|
|
28
28
|
create:
|
|
29
29
|
error: Det gick inte att skapa kommentaren.
|
|
30
|
+
delete:
|
|
31
|
+
error: Kommentaren kunde inte tas bort.
|
|
30
32
|
update:
|
|
31
33
|
error: Det gick inte att uppdatera kommentaren.
|
|
32
34
|
comments_title: Kommentar
|
|
35
|
+
last_activity:
|
|
36
|
+
new_comment: 'Ny kommentar:'
|
|
33
37
|
votes:
|
|
34
38
|
create:
|
|
35
39
|
error: Det gick inte att rösta om kommentaren.
|
|
36
40
|
components:
|
|
37
41
|
add_comment_form:
|
|
42
|
+
account_message: <a href="%{sign_in_url}">Logga in</a> eller <a href="%{sign_up_url}">skapa ett konto</a> för kommentera.
|
|
38
43
|
form:
|
|
39
44
|
body:
|
|
40
45
|
label: Kommentera
|
|
41
46
|
placeholder: Vad tycker du om detta?
|
|
47
|
+
form_error: Texten är obligatorisk och får inte vara längre än %{length} tecken.
|
|
42
48
|
submit_reply: Publicera svar
|
|
49
|
+
submit_root_comment: Publicera kommentar
|
|
43
50
|
user_group_id:
|
|
44
51
|
label: Kommentera som
|
|
45
52
|
opinion:
|
|
46
|
-
label: Din åsikt om
|
|
53
|
+
label: Din åsikt om frågan
|
|
47
54
|
negative: Negativ
|
|
48
|
-
negative_selected: Din åsikt om
|
|
55
|
+
negative_selected: Din åsikt om frågan är negativ
|
|
49
56
|
neutral: Neutral
|
|
50
|
-
neutral_selected: Din åsikt om
|
|
57
|
+
neutral_selected: Din åsikt om frågan är neutral
|
|
51
58
|
positive: Positiv
|
|
52
|
-
positive_selected: Din åsikt om
|
|
59
|
+
positive_selected: Din åsikt om frågan är positiv
|
|
53
60
|
remaining_characters: "%{count} tecken kvar"
|
|
54
61
|
remaining_characters_1: "%{count} tecken kvar"
|
|
55
|
-
title:
|
|
62
|
+
title: Lämna din kommentar
|
|
56
63
|
comment:
|
|
57
64
|
alignment:
|
|
58
65
|
against: Mot
|
|
59
66
|
in_favor: För
|
|
60
|
-
|
|
67
|
+
cancel_reply: Avbryt svar
|
|
68
|
+
comment_label: Kommentar %{comment_id}
|
|
69
|
+
comment_label_reply: Kommentar %{comment_id} (svar på kommentar %{parent_comment_id})
|
|
70
|
+
confirm_destroy: Är du säker på att du vill ta bort kommentaren?
|
|
71
|
+
controls_label: Kontroller för kommentarer
|
|
61
72
|
delete: Radera
|
|
62
|
-
deleted_at: Kommentar borttagen
|
|
73
|
+
deleted_at: Kommentar borttagen %{date}
|
|
63
74
|
deleted_user: Raderad deltagare
|
|
64
75
|
edit: Redigera
|
|
65
76
|
edited: Redigerad
|
|
66
|
-
|
|
77
|
+
hide_replies:
|
|
78
|
+
one: Dölj svar
|
|
79
|
+
other: Dölj %{count} svar
|
|
80
|
+
moderated_at: Kommentar modererad %{date}
|
|
67
81
|
reply: Svara
|
|
68
82
|
report:
|
|
69
83
|
action: Rapportera
|
|
@@ -72,8 +86,9 @@ sv:
|
|
|
72
86
|
description: Är detta innehåll olämpligt?
|
|
73
87
|
details: Ytterligare kommentarer
|
|
74
88
|
reasons:
|
|
75
|
-
|
|
76
|
-
|
|
89
|
+
does_not_belong: Innehåller olaglig information, hot om självmord, personuppgifter eller något annat som inte hör hemma på %{organization_name}.
|
|
90
|
+
offensive: Innehåller rasism, sexism, personangrepp, mordhot, uppmaning att begå självmord eller hets mot folkgrupp.
|
|
91
|
+
spam: Innehåller clickbait, reklam, bedrägerier eller botar.
|
|
77
92
|
title: Rapportera olämpligt innehåll
|
|
78
93
|
show_replies:
|
|
79
94
|
one: Visa svar
|
|
@@ -83,7 +98,7 @@ sv:
|
|
|
83
98
|
order:
|
|
84
99
|
best_rated: Bästa betyg
|
|
85
100
|
most_discussed: Mest diskuterade
|
|
86
|
-
older:
|
|
101
|
+
older: Äldsta
|
|
87
102
|
recent: Senaste
|
|
88
103
|
title: 'Sortera efter:'
|
|
89
104
|
comments:
|
|
@@ -95,16 +110,16 @@ sv:
|
|
|
95
110
|
single_comment_warning: <a href="%{url}">Visa alla kommentarer</a>
|
|
96
111
|
single_comment_warning_title: Du visar en enda kommentar
|
|
97
112
|
title:
|
|
98
|
-
one: "%{count}
|
|
113
|
+
one: "%{count} kommentar"
|
|
99
114
|
other: "%{count} kommentarer"
|
|
100
115
|
down_vote_button:
|
|
101
|
-
text: Jag
|
|
116
|
+
text: Jag instämmer inte i denna kommentar
|
|
102
117
|
edit_comment_modal_form:
|
|
103
118
|
close: Stäng
|
|
104
119
|
form:
|
|
105
120
|
body:
|
|
106
121
|
label: Kommentar
|
|
107
|
-
placeholder: Vad tycker du
|
|
122
|
+
placeholder: Vad tycker du?
|
|
108
123
|
submit: Skicka
|
|
109
124
|
title: Redigera din kommentar
|
|
110
125
|
up_vote_button:
|
|
@@ -129,13 +144,13 @@ sv:
|
|
|
129
144
|
comment_downvoted:
|
|
130
145
|
email_intro: Din kommentar i "%{resource_title}" har blivit nedröstad. Den har nu totalt %{upvotes} uppröster och %{downvotes} nedröster.
|
|
131
146
|
email_outro: Du har fått det här meddelandet eftersom du är författare till denna kommentar.
|
|
132
|
-
email_subject: Din kommentar
|
|
133
|
-
notification_title: Din <a href="%{resource_path}">kommentar</a>
|
|
147
|
+
email_subject: Din kommentar till "%{resource_title}" har röstats ned.
|
|
148
|
+
notification_title: Din <a href="%{resource_path}">kommentar</a> till "%{resource_title}" har röstats ned. Den har nu totalt %{upvotes} uppröster och %{downvotes} nedröster.
|
|
134
149
|
comment_upvoted:
|
|
135
|
-
email_intro: Din kommentar i "%{resource_title}" har
|
|
136
|
-
email_outro: Du har fått det här meddelandet eftersom du är författare till
|
|
137
|
-
email_subject: Din kommentar
|
|
138
|
-
notification_title: Din <a href="%{resource_path}">kommentar</a>
|
|
150
|
+
email_intro: Din kommentar i "%{resource_title}" har röstats upp. Den har nu totalt %{upvotes} uppröster och %{downvotes} nedröster.
|
|
151
|
+
email_outro: Du har fått det här meddelandet eftersom du är författare till kommentaren.
|
|
152
|
+
email_subject: Din kommentar till "%{resource_title}" har röstats upp.
|
|
153
|
+
notification_title: Din <a href="%{resource_path}">kommentar</a> till "%{resource_title}" har röstats upp. Den har nu totalt %{upvotes} uppröster och %{downvotes} nedröster.
|
|
139
154
|
reply_created:
|
|
140
155
|
email_intro: "%{author_name} har svarat din kommentar i %{resource_title}. Du kan läsa den på den här sidan:"
|
|
141
156
|
email_outro: Du har fått denna notis eftersom din kommentar blev besvarad.
|
|
@@ -156,3 +171,6 @@ sv:
|
|
|
156
171
|
description: Antal kommentarer från deltagare
|
|
157
172
|
object: kommentarer
|
|
158
173
|
title: Kommentarer
|
|
174
|
+
errors:
|
|
175
|
+
messages:
|
|
176
|
+
cannot_have_comments: kan inte ha kommentarer
|
data/decidim-comments.gemspec
CHANGED
|
@@ -10,7 +10,7 @@ Gem::Specification.new do |s|
|
|
|
10
10
|
s.version = Decidim::Comments.version
|
|
11
11
|
s.authors = ["Josep Jaume Rey Peroy", "Marc Riera Casals", "Oriol Gual Oliva"]
|
|
12
12
|
s.email = ["josepjaume@gmail.com", "mrc2407@gmail.com", "oriolgual@gmail.com"]
|
|
13
|
-
s.license = "AGPL-3.0"
|
|
13
|
+
s.license = "AGPL-3.0-or-later"
|
|
14
14
|
s.homepage = "https://decidim.org"
|
|
15
15
|
s.metadata = {
|
|
16
16
|
"bug_tracker_uri" => "https://github.com/decidim/decidim/issues",
|
|
@@ -84,6 +84,19 @@ module Decidim
|
|
|
84
84
|
def user_allowed_to_comment
|
|
85
85
|
object.root_commentable.commentable? && object.root_commentable.user_allowed_to_comment?(context[:current_user])
|
|
86
86
|
end
|
|
87
|
+
|
|
88
|
+
def self.authorized?(object, context)
|
|
89
|
+
chain = []
|
|
90
|
+
if object.respond_to?(:commentable) && !object.commentable.is_a?(Decidim::Comments::Comment)
|
|
91
|
+
chain.unshift(allowed_to?(:read, object.commentable, object.commentable,
|
|
92
|
+
context))
|
|
93
|
+
end
|
|
94
|
+
|
|
95
|
+
chain.unshift(!object.hidden?)
|
|
96
|
+
chain.unshift(!object.deleted?)
|
|
97
|
+
|
|
98
|
+
super && chain.all?
|
|
99
|
+
end
|
|
87
100
|
end
|
|
88
101
|
end
|
|
89
102
|
end
|
|
@@ -17,7 +17,7 @@ module Decidim
|
|
|
17
17
|
|
|
18
18
|
field :comments_have_votes, GraphQL::Types::Boolean, "Whether the object comments have votes or not", method: :comments_have_votes?, null: false
|
|
19
19
|
|
|
20
|
-
field :comments, [Decidim::Comments::CommentType], null: false do
|
|
20
|
+
field :comments, [Decidim::Comments::CommentType, { null: false }], null: false do
|
|
21
21
|
argument :order_by, GraphQL::Types::String, "Order the comments", required: false
|
|
22
22
|
argument :single_comment_id, GraphQL::Types::String, "ID of the single comment to look at", required: false
|
|
23
23
|
end
|
|
@@ -45,6 +45,12 @@ module Decidim
|
|
|
45
45
|
def user_allowed_to_comment
|
|
46
46
|
object.commentable? && object.user_allowed_to_comment?(context[:current_user])
|
|
47
47
|
end
|
|
48
|
+
|
|
49
|
+
definition_methods do
|
|
50
|
+
def resolve_type(object, _context)
|
|
51
|
+
GraphQL::Types.const_get("#{object.class.name}Type")
|
|
52
|
+
end
|
|
53
|
+
end
|
|
48
54
|
end
|
|
49
55
|
end
|
|
50
56
|
end
|
|
@@ -9,6 +9,7 @@ module Decidim
|
|
|
9
9
|
module CommentableWithComponent
|
|
10
10
|
extend ActiveSupport::Concern
|
|
11
11
|
include Decidim::Comments::Commentable
|
|
12
|
+
include Decidim::UserRoleChecker
|
|
12
13
|
|
|
13
14
|
included do
|
|
14
15
|
# Public: Overrides the `commentable?` Commentable concern method.
|
|
@@ -23,7 +24,8 @@ module Decidim
|
|
|
23
24
|
|
|
24
25
|
# Public: Whether the object can have new comments or not.
|
|
25
26
|
def user_allowed_to_comment?(user)
|
|
26
|
-
return
|
|
27
|
+
return true if user_has_any_role?(user, component.participatory_space)
|
|
28
|
+
return false unless can_participate?(user)
|
|
27
29
|
|
|
28
30
|
ActionAuthorizer.new(user, "comment", component, self).authorize.ok?
|
|
29
31
|
end
|
|
@@ -11,7 +11,7 @@ module Decidim
|
|
|
11
11
|
#
|
|
12
12
|
# Returns nothing.
|
|
13
13
|
def self.included(type)
|
|
14
|
-
type.field :commentable,
|
|
14
|
+
type.field :commentable, Decidim::Comments::CommentableInterface do
|
|
15
15
|
argument :id, GraphQL::Types::String, "The commentable's ID", required: true
|
|
16
16
|
argument :type, GraphQL::Types::String, "The commentable's class name. i.e. `Decidim::ParticipatoryProcess`", required: true
|
|
17
17
|
argument :locale, GraphQL::Types::String, "The locale for which to get the comments text", required: true
|
|
@@ -8,7 +8,7 @@ FactoryBot.define do
|
|
|
8
8
|
skip_injection { false }
|
|
9
9
|
end
|
|
10
10
|
author { build(:user, organization: commentable.organization, skip_injection:) }
|
|
11
|
-
commentable { build(:dummy_resource, skip_injection:) }
|
|
11
|
+
commentable { build(:dummy_resource, :published, skip_injection:) }
|
|
12
12
|
root_commentable { commentable }
|
|
13
13
|
body { Decidim::Faker::Localized.paragraph }
|
|
14
14
|
participatory_space { commentable.try(:participatory_space) }
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: decidim-comments
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.29.
|
|
4
|
+
version: 0.29.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Josep Jaume Rey Peroy
|
|
@@ -10,7 +10,7 @@ authors:
|
|
|
10
10
|
autorequire:
|
|
11
11
|
bindir: bin
|
|
12
12
|
cert_chain: []
|
|
13
|
-
date:
|
|
13
|
+
date: 2025-02-12 00:00:00.000000000 Z
|
|
14
14
|
dependencies:
|
|
15
15
|
- !ruby/object:Gem::Dependency
|
|
16
16
|
name: decidim-core
|
|
@@ -18,14 +18,14 @@ dependencies:
|
|
|
18
18
|
requirements:
|
|
19
19
|
- - '='
|
|
20
20
|
- !ruby/object:Gem::Version
|
|
21
|
-
version: 0.29.
|
|
21
|
+
version: 0.29.2
|
|
22
22
|
type: :runtime
|
|
23
23
|
prerelease: false
|
|
24
24
|
version_requirements: !ruby/object:Gem::Requirement
|
|
25
25
|
requirements:
|
|
26
26
|
- - '='
|
|
27
27
|
- !ruby/object:Gem::Version
|
|
28
|
-
version: 0.29.
|
|
28
|
+
version: 0.29.2
|
|
29
29
|
- !ruby/object:Gem::Dependency
|
|
30
30
|
name: redcarpet
|
|
31
31
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -52,28 +52,28 @@ dependencies:
|
|
|
52
52
|
requirements:
|
|
53
53
|
- - '='
|
|
54
54
|
- !ruby/object:Gem::Version
|
|
55
|
-
version: 0.29.
|
|
55
|
+
version: 0.29.2
|
|
56
56
|
type: :development
|
|
57
57
|
prerelease: false
|
|
58
58
|
version_requirements: !ruby/object:Gem::Requirement
|
|
59
59
|
requirements:
|
|
60
60
|
- - '='
|
|
61
61
|
- !ruby/object:Gem::Version
|
|
62
|
-
version: 0.29.
|
|
62
|
+
version: 0.29.2
|
|
63
63
|
- !ruby/object:Gem::Dependency
|
|
64
64
|
name: decidim-dev
|
|
65
65
|
requirement: !ruby/object:Gem::Requirement
|
|
66
66
|
requirements:
|
|
67
67
|
- - '='
|
|
68
68
|
- !ruby/object:Gem::Version
|
|
69
|
-
version: 0.29.
|
|
69
|
+
version: 0.29.2
|
|
70
70
|
type: :development
|
|
71
71
|
prerelease: false
|
|
72
72
|
version_requirements: !ruby/object:Gem::Requirement
|
|
73
73
|
requirements:
|
|
74
74
|
- - '='
|
|
75
75
|
- !ruby/object:Gem::Version
|
|
76
|
-
version: 0.29.
|
|
76
|
+
version: 0.29.2
|
|
77
77
|
description: Pluggable comments system for some components.
|
|
78
78
|
email:
|
|
79
79
|
- josepjaume@gmail.com
|
|
@@ -173,6 +173,8 @@ files:
|
|
|
173
173
|
- config/locales/ar.yml
|
|
174
174
|
- config/locales/bg-BG.yml
|
|
175
175
|
- config/locales/bg.yml
|
|
176
|
+
- config/locales/bn-BD.yml
|
|
177
|
+
- config/locales/bs-BA.yml
|
|
176
178
|
- config/locales/ca.yml
|
|
177
179
|
- config/locales/cs-CZ.yml
|
|
178
180
|
- config/locales/cs.yml
|
|
@@ -299,7 +301,7 @@ files:
|
|
|
299
301
|
- lib/tasks/upgrade/decidim_comments.rake
|
|
300
302
|
homepage: https://decidim.org
|
|
301
303
|
licenses:
|
|
302
|
-
- AGPL-3.0
|
|
304
|
+
- AGPL-3.0-or-later
|
|
303
305
|
metadata:
|
|
304
306
|
bug_tracker_uri: https://github.com/decidim/decidim/issues
|
|
305
307
|
documentation_uri: https://docs.decidim.org/
|