decidim-comments 0.28.5 → 0.29.0.rc1
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 -3
- data/app/cells/decidim/comments/comment/deletion_data.erb +1 -1
- data/app/cells/decidim/comments/comment/show.erb +3 -3
- data/app/cells/decidim/comments/comment_cell.rb +0 -2
- data/app/cells/decidim/comments/comment_form/opinion.erb +4 -4
- data/app/cells/decidim/comments/comment_form_cell.rb +0 -2
- data/app/cells/decidim/comments/comment_metadata_cell.rb +1 -1
- data/app/cells/decidim/comments/comments_cell.rb +0 -3
- data/app/cells/decidim/comments/edit_comment_modal_form_cell.rb +0 -1
- data/app/commands/decidim/comments/create_comment.rb +6 -6
- data/app/commands/decidim/comments/update_comment.rb +3 -4
- data/app/controllers/decidim/comments/comments_controller.rb +5 -3
- data/app/helpers/decidim/comments/comment_cells_helper.rb +1 -1
- data/app/models/decidim/comments/seed.rb +55 -5
- data/app/packs/entrypoints/decidim_comments.js +1 -1
- data/app/packs/src/decidim/comments/comments.component.js +8 -8
- data/app/packs/src/decidim/comments/comments.component.test.js +14 -14
- data/app/views/decidim/comments/comments/create.js.erb +2 -2
- data/app/views/decidim/comments/comments/delete.js.erb +5 -2
- data/app/views/decidim/comments/comments/update.js.erb +0 -6
- data/app/views/decidim/comments/votes/create.js.erb +1 -1
- data/config/locales/bg.yml +0 -1
- data/config/locales/ca.yml +2 -2
- data/config/locales/cs.yml +0 -6
- data/config/locales/de.yml +1 -2
- data/config/locales/en.yml +1 -1
- data/config/locales/es-MX.yml +1 -1
- data/config/locales/es-PY.yml +1 -1
- data/config/locales/es.yml +2 -2
- data/config/locales/eu.yml +16 -19
- data/config/locales/fi-plain.yml +1 -1
- data/config/locales/fi.yml +9 -9
- data/config/locales/fr-CA.yml +1 -1
- data/config/locales/fr.yml +1 -1
- data/config/locales/ja.yml +1 -1
- data/config/locales/pl.yml +1 -1
- data/config/locales/pt-BR.yml +0 -3
- data/config/locales/ro-RO.yml +8 -16
- data/config/locales/sv.yml +24 -42
- data/config/locales/tr-TR.yml +0 -1
- data/db/seeds.rb +1 -0
- data/decidim-comments.gemspec +2 -2
- data/lib/decidim/api/comment_type.rb +0 -13
- data/lib/decidim/api/commentable_interface.rb +1 -7
- data/lib/decidim/api/commentable_mutation_type.rb +2 -1
- data/lib/decidim/comments/commentable.rb +2 -2
- data/lib/decidim/comments/commentable_with_component.rb +1 -3
- data/lib/decidim/comments/query_extensions.rb +1 -1
- data/lib/decidim/comments/test/factories.rb +1 -1
- data/lib/decidim/comments/test/shared_examples/create_comment_context.rb +3 -2
- data/lib/decidim/comments/version.rb +1 -1
- data/lib/tasks/upgrade/decidim_comments.rake +28 -0
- metadata +14 -16
- data/config/locales/bn-BD.yml +0 -1
- data/config/locales/bs-BA.yml +0 -15
- data/lib/tasks/decidim_comments.rake +0 -26
data/config/locales/es.yml
CHANGED
@@ -39,7 +39,7 @@ es:
|
|
39
39
|
error: Se ha producido un error al votar el comentario.
|
40
40
|
components:
|
41
41
|
add_comment_form:
|
42
|
-
account_message:
|
42
|
+
account_message: <a href="%{sign_in_url}">Inicia sesión</a> o <a href="%{sign_up_url}">crea una cuenta</a> para añadir tu comentario.
|
43
43
|
form:
|
44
44
|
body:
|
45
45
|
label: Comentario
|
@@ -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: "
|
140
|
+
email_intro: "%{resource_title} ha sido comentado. Puedes leer el comentario en esta página:"
|
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: Bozkatu
|
18
|
+
other: Botoak
|
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
|
25
|
+
end_time: Iruzkinak gaituta daude
|
26
26
|
start_time: Iruzkinak noiztik aktibatuta
|
27
27
|
comments:
|
28
28
|
create:
|
@@ -33,20 +33,20 @@ 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: 'Beste iruzkin bat:'
|
37
37
|
votes:
|
38
38
|
create:
|
39
|
-
error: Arazo bat
|
39
|
+
error: Arazo bat egon da iruzkina bozkatzean.
|
40
40
|
components:
|
41
41
|
add_comment_form:
|
42
|
-
account_message: <a href="%{sign_in_url}">
|
42
|
+
account_message: Sortu kontu bat <a href="%{sign_in_url}">Log in</a> edo <a href="%{sign_up_url}"> </a> zure iruzkina gehitzeko.
|
43
43
|
form:
|
44
44
|
body:
|
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: Argitaratu erantzuna
|
49
|
+
submit_root_comment: Argitaratu iruzkina
|
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} karaktere 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: Ezeztatu erantzuna
|
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,9 +74,6 @@ 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
|
80
77
|
moderated_at: Iruzkina %{date}-an moderatu egin da
|
81
78
|
reply: Erantzuna
|
82
79
|
report:
|
@@ -110,7 +107,7 @@ eu:
|
|
110
107
|
single_comment_warning: <a href="%{url}">k erakusten ditu iruzkin guztiak</a>
|
111
108
|
single_comment_warning_title: Iruzkin bakar bat ikusten ari zara
|
112
109
|
title:
|
113
|
-
one: "
|
110
|
+
one: "%{count} iruzkin"
|
114
111
|
other: "%{count} iruzkin"
|
115
112
|
down_vote_button:
|
116
113
|
text: Ez nago ados iruzkin honekin
|
@@ -128,7 +125,7 @@ eu:
|
|
128
125
|
comments:
|
129
126
|
comment_by_followed_user:
|
130
127
|
email_intro: "%{author_name} egileak iruzkin bat utzi du %{resource_title} helbidean. Orri honetan irakur dezakezu:"
|
131
|
-
email_outro: Jakinarazpen hau jaso duzu %{author_name}
|
128
|
+
email_outro: Jakinarazpen hau jaso duzu %{author_name} erabiltzailea jarraitzen duzulako. Nahi izatekotan erabiltzaile hori bere profil-orritik jarraitzeari utz diezaiokezu.
|
132
129
|
email_subject: '%{author_name} k beste iruzkin bat egin du hemen: %{resource_title}'
|
133
130
|
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.'
|
134
131
|
comment_by_followed_user_group:
|
@@ -142,7 +139,7 @@ eu:
|
|
142
139
|
email_subject: '%{author_name} k beste iruzkin berri bat egin du hemen: %{resource_title}'
|
143
140
|
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>'
|
144
141
|
comment_downvoted:
|
145
|
-
email_intro: Zure iruzkina hemen "%{resource_title}" negatiboki bozkatu da. Orain %{upvotes}
|
142
|
+
email_intro: Zure iruzkina hemen "%{resource_title}" negatiboki bozkatu da. Orain %{upvotes} boto positibo eta %{downvotes} boto negatibo dituzu guztira.
|
146
143
|
email_outro: Jakinarazpen hau jaso duzu iruzkin honen egilea zarelako.
|
147
144
|
email_subject: Zure iruzkina hemen "%{resource_title}" negatiboki bozkatu da.
|
148
145
|
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.
|
@@ -152,9 +149,9 @@ eu:
|
|
152
149
|
email_subject: Zure iruzkina hemen "%{resource_title}" positiboki bozkatu da.
|
153
150
|
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.
|
154
151
|
reply_created:
|
155
|
-
email_intro: "%{author_name}
|
152
|
+
email_intro: "%{author_name} k zure iruzkina erantzun du hemen: %{resource_title}. Orri honetan irakur dezakezu:"
|
156
153
|
email_outro: Jakinarazpen hau jaso duzu zure iruzkina erantzun delako.
|
157
|
-
email_subject: "%{author_name}
|
154
|
+
email_subject: "%{author_name}-k zure iruzkina erantzun du hemen: %{resource_title}"
|
158
155
|
notification_title: <a href="%{author_path}">%{author_name} %{author_nickname}</a> -k zure iruzkinari erantzun dio <a href="%{resource_path}">%{resource_title}</a>
|
159
156
|
user_group_mentioned:
|
160
157
|
email_intro: Zure talde bat aipatu dute
|
@@ -168,7 +165,7 @@ eu:
|
|
168
165
|
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'
|
169
166
|
metrics:
|
170
167
|
comments:
|
171
|
-
description:
|
168
|
+
description: Erabiltzaileek sortutako iruzkin kopurua
|
172
169
|
object: iruzkinak
|
173
170
|
title: Iruzkinak
|
174
171
|
errors:
|
data/config/locales/fi-plain.yml
CHANGED
@@ -39,7 +39,7 @@ fi-pl:
|
|
39
39
|
error: Äänestettäessä kommenttia tapahtui virhe.
|
40
40
|
components:
|
41
41
|
add_comment_form:
|
42
|
-
account_message: <a href="%{sign_in_url}">Kirjaudu
|
42
|
+
account_message: <a href="%{sign_in_url}">Kirjaudu sisään</a> tai <a href="%{sign_up_url}">luo tili</a> kommentoidaksesi.
|
43
43
|
form:
|
44
44
|
body:
|
45
45
|
label: Kommentti
|
data/config/locales/fi.yml
CHANGED
@@ -26,7 +26,7 @@ fi:
|
|
26
26
|
start_time: Kommentointi sallittu alkaen
|
27
27
|
comments:
|
28
28
|
create:
|
29
|
-
error: Kommentin
|
29
|
+
error: Kommentin luotaessa tapahtui virhe.
|
30
30
|
delete:
|
31
31
|
error: Kommenttia ei voitu poistaa.
|
32
32
|
update:
|
@@ -39,7 +39,7 @@ fi:
|
|
39
39
|
error: Kommentin äänestys epäonnistui.
|
40
40
|
components:
|
41
41
|
add_comment_form:
|
42
|
-
account_message: <a href="%{sign_in_url}">Kirjaudu
|
42
|
+
account_message: <a href="%{sign_in_url}">Kirjaudu sisään</a> tai <a href="%{sign_up_url}">luo tili</a> kommentoidaksesi.
|
43
43
|
form:
|
44
44
|
body:
|
45
45
|
label: Kommentti
|
@@ -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 varmennettu, 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
|
@@ -127,8 +127,8 @@ fi:
|
|
127
127
|
events:
|
128
128
|
comments:
|
129
129
|
comment_by_followed_user:
|
130
|
-
email_intro: "%{author_name} on jättänyt kommentin kohteessa %{resource_title}. Voit lukea sen
|
131
|
-
email_outro: Tämä ilmoitus on lähetetty sinulle, koska seuraat
|
130
|
+
email_intro: "%{author_name} on jättänyt kommentin kohteessa %{resource_title}. Voit lukea sen täältä:"
|
131
|
+
email_outro: Tämä ilmoitus on lähetetty sinulle, koska seuraat %{author_name}. Voit perua seuraamisen kyseisen käyttäjän 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:
|
@@ -137,7 +137,7 @@ fi:
|
|
137
137
|
email_subject: '%{author_name} on jättänyt uuden kommentin kohteessa %{resource_title}'
|
138
138
|
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>.
|
139
139
|
comment_created:
|
140
|
-
email_intro: "%{resource_title} on kommentoitu. Voit lukea kommentin
|
140
|
+
email_intro: "%{resource_title} on kommentoitu. Voit lukea kommentin tällä sivulla:"
|
141
141
|
email_outro: Tämä ilmoitus on lähetetty sinulle, koska seuraat "%{resource_title}" tai sen kirjoittajaa. Voit lopettaa seuraamisen edellä esitetyn linkin kautta.
|
142
142
|
email_subject: '%{author_name} on jättänyt uuden kommentin kohteessa %{resource_title}'
|
143
143
|
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>
|
@@ -152,10 +152,10 @@ fi:
|
|
152
152
|
email_subject: Kommenttisi kohteessa "%{resource_title}" sai äänen.
|
153
153
|
notification_title: <a href="%{resource_path}">Kommenttisi</a> kohteessa "%{resource_title}" sai äänen. Sillä on yhteensä %{upvotes} ääntä ja %{downvotes} miinusääntä.
|
154
154
|
reply_created:
|
155
|
-
email_intro: "%{author_name} on vastannut kommentiisi kohdassa %{resource_title}. Voit lukea sen
|
155
|
+
email_intro: "%{author_name} on vastannut kommentiisi kohdassa %{resource_title}. Voit lukea sen tällä sivulla:"
|
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 kohdassa <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 kohdassa <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/fr-CA.yml
CHANGED
@@ -39,7 +39,7 @@ fr-CA:
|
|
39
39
|
error: Une erreur s'est produite lors du vote sur le commentaire.
|
40
40
|
components:
|
41
41
|
add_comment_form:
|
42
|
-
account_message: <a href="%{sign_in_url}">Connectez-vous
|
42
|
+
account_message: <a href="%{sign_in_url}">Connectez-vous</a> ou <a href="%{sign_up_url}">créez un compte</a> pour ajouter votre commentaire.
|
43
43
|
form:
|
44
44
|
body:
|
45
45
|
label: Commentaire
|
data/config/locales/fr.yml
CHANGED
@@ -39,7 +39,7 @@ fr:
|
|
39
39
|
error: Une erreur s'est produite lors du vote sur le commentaire.
|
40
40
|
components:
|
41
41
|
add_comment_form:
|
42
|
-
account_message: <a href="%{sign_in_url}">Connectez-vous
|
42
|
+
account_message: <a href="%{sign_in_url}">Connectez-vous</a> ou <a href="%{sign_up_url}">créez un compte</a> pour ajouter votre commentaire.
|
43
43
|
form:
|
44
44
|
body:
|
45
45
|
label: Commentaire
|
data/config/locales/ja.yml
CHANGED
@@ -37,7 +37,7 @@ ja:
|
|
37
37
|
error: コメントに投票中に問題がありました。
|
38
38
|
components:
|
39
39
|
add_comment_form:
|
40
|
-
account_message:
|
40
|
+
account_message: コメントを追加するには<a href="%{sign_in_url}">ログインする</a> か <a href="%{sign_up_url}">アカウントを作成</a>してください
|
41
41
|
form:
|
42
42
|
body:
|
43
43
|
label: コメント
|
data/config/locales/pl.yml
CHANGED
@@ -43,7 +43,7 @@ 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
|
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
47
|
form:
|
48
48
|
body:
|
49
49
|
label: Komentarz
|
data/config/locales/pt-BR.yml
CHANGED
@@ -67,9 +67,6 @@ 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
|
73
70
|
single_comment_link_title: Obter o link
|
74
71
|
comment_order_selector:
|
75
72
|
order:
|
data/config/locales/ro-RO.yml
CHANGED
@@ -41,16 +41,15 @@ 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}">Conectați-vă cu contul dumneavoastră</a> sau <a href="%{sign_up_url}">înregistrați-vă</a> pentru a adăuga un comentariu.
|
45
44
|
form:
|
46
45
|
body:
|
47
46
|
label: Comentariu
|
48
|
-
placeholder: Ce părere
|
47
|
+
placeholder: Ce părere ai despre asta?
|
49
48
|
form_error: Textul este obligatoriu și nu poate fi mai lung de %{length} caractere.
|
50
49
|
submit_reply: Publicați răspuns
|
51
50
|
submit_root_comment: Publicați comentariu
|
52
51
|
user_group_id:
|
53
|
-
label:
|
52
|
+
label: Comentează în calitate de
|
54
53
|
opinion:
|
55
54
|
label: Opinia ta despre acest subiect
|
56
55
|
negative: Negativ
|
@@ -61,25 +60,18 @@ ro:
|
|
61
60
|
positive_selected: Opinia ta despre acest subiect este pozitivă
|
62
61
|
remaining_characters: "%{count} caractere rămase"
|
63
62
|
remaining_characters_1: "%{count} caracter rămas"
|
64
|
-
title:
|
63
|
+
title: Adaugă comentariul tău
|
65
64
|
comment:
|
66
65
|
alignment:
|
67
66
|
against: Împotrivă
|
68
67
|
in_favor: Pentru
|
69
68
|
cancel_reply: Anulează răspunsul
|
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
|
69
|
+
confirm_destroy: Sigur dorești să ştergi acest comentariu?
|
74
70
|
delete: Șterge
|
75
|
-
deleted_at: Comentariu șters
|
71
|
+
deleted_at: Comentariu șters la %{date}
|
76
72
|
deleted_user: Participant șters
|
77
73
|
edit: Actualizare
|
78
74
|
edited: Actualizat
|
79
|
-
hide_replies:
|
80
|
-
one: Ascundeți răspunsul
|
81
|
-
few: Ascundeți %{count} răspunsuri
|
82
|
-
other: Ascundeți %{count} răspunsuri
|
83
75
|
moderated_at: Comentariu moderat pe %{date}
|
84
76
|
reply: Răspunde
|
85
77
|
report:
|
@@ -87,17 +79,17 @@ ro:
|
|
87
79
|
already_reported: Acest conținut este deja raportat și va fi revizuit de către un administrator.
|
88
80
|
close: Închide
|
89
81
|
description: Este acest conținut neadecvat?
|
90
|
-
details:
|
82
|
+
details: Comentarii suplimentare
|
91
83
|
reasons:
|
92
84
|
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}.
|
93
85
|
offensive: Conține rasism, sexism, insulte, atacuri personale, amenințări cu moartea, cereri de sinucidere sau orice formă de discurs de incitare la ură.
|
94
86
|
spam: Conține clickbait, publicitate, escrocherii sau script rulat de roboți.
|
95
|
-
title:
|
87
|
+
title: Raportează conținut nepotrivit
|
96
88
|
show_replies:
|
97
89
|
one: Arată răspunsul
|
98
90
|
few: Arată %{count} răspunsuri
|
99
91
|
other: Arată %{count} răspunsuri
|
100
|
-
single_comment_link_title:
|
92
|
+
single_comment_link_title: Obţine link
|
101
93
|
comment_order_selector:
|
102
94
|
order:
|
103
95
|
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: Kommentar uppröstad
|
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,63 +21,49 @@ sv:
|
|
21
21
|
admin:
|
22
22
|
shared:
|
23
23
|
availability_fields:
|
24
|
-
enabled:
|
25
|
-
end_time: Kommentarer aktiverade till
|
24
|
+
enabled: Kommentarer aktiverade
|
25
|
+
end_time: Kommentarer aktiverade till
|
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.
|
32
30
|
update:
|
33
31
|
error: Det gick inte att uppdatera kommentaren.
|
34
32
|
comments_title: Kommentar
|
35
|
-
last_activity:
|
36
|
-
new_comment: 'Ny kommentar:'
|
37
33
|
votes:
|
38
34
|
create:
|
39
35
|
error: Det gick inte att rösta om kommentaren.
|
40
36
|
components:
|
41
37
|
add_comment_form:
|
42
|
-
account_message: <a href="%{sign_in_url}">Logga in med ditt konto</a> eller <a href="%{sign_up_url}">registrera dig</a> för att lämna en kommentar.
|
43
38
|
form:
|
44
39
|
body:
|
45
40
|
label: Kommentera
|
46
41
|
placeholder: Vad tycker du om detta?
|
47
|
-
form_error: Texten är obligatorisk och får inte vara längre än %{length} tecken.
|
48
42
|
submit_reply: Publicera svar
|
49
|
-
submit_root_comment: Publicera kommentar
|
50
43
|
user_group_id:
|
51
44
|
label: Kommentera som
|
52
45
|
opinion:
|
53
|
-
label: Din åsikt om
|
46
|
+
label: Din åsikt om detta ämne
|
54
47
|
negative: Negativ
|
55
|
-
negative_selected: Din åsikt om
|
48
|
+
negative_selected: Din åsikt om detta ämne är negativ
|
56
49
|
neutral: Neutral
|
57
|
-
neutral_selected: Din åsikt om
|
50
|
+
neutral_selected: Din åsikt om detta ämne är neutral
|
58
51
|
positive: Positiv
|
59
|
-
positive_selected: Din åsikt om
|
52
|
+
positive_selected: Din åsikt om detta ämne är positiv
|
60
53
|
remaining_characters: "%{count} tecken kvar"
|
61
54
|
remaining_characters_1: "%{count} tecken kvar"
|
62
|
-
title:
|
55
|
+
title: Lägg till din kommentar
|
63
56
|
comment:
|
64
57
|
alignment:
|
65
58
|
against: Mot
|
66
59
|
in_favor: För
|
67
|
-
|
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
|
60
|
+
confirm_destroy: Är du säker på att du vill ta bort denna kommentar?
|
72
61
|
delete: Radera
|
73
|
-
deleted_at: Kommentar borttagen %{date}
|
62
|
+
deleted_at: Kommentar borttagen den %{date}
|
74
63
|
deleted_user: Raderad deltagare
|
75
64
|
edit: Redigera
|
76
65
|
edited: Redigerad
|
77
|
-
|
78
|
-
one: Dölj svar
|
79
|
-
other: Dölj %{count} svar
|
80
|
-
moderated_at: Kommentar modererad %{date}
|
66
|
+
moderated_at: Kommentar modererad den %{date}
|
81
67
|
reply: Svara
|
82
68
|
report:
|
83
69
|
action: Rapportera
|
@@ -86,9 +72,8 @@ sv:
|
|
86
72
|
description: Är detta innehåll olämpligt?
|
87
73
|
details: Ytterligare kommentarer
|
88
74
|
reasons:
|
89
|
-
|
90
|
-
|
91
|
-
spam: Innehåller clickbait, reklam, bedrägerier eller botar.
|
75
|
+
offensive: Innehåller rasism, sexism, skällsord, personliga attacker, dödshot, uppmaningar att begå självmord eller någon form av hatpropaganda.
|
76
|
+
spam: Innehåller clickbait, reklam, bedrägerier eller skriptrobotar.
|
92
77
|
title: Rapportera olämpligt innehåll
|
93
78
|
show_replies:
|
94
79
|
one: Visa svar
|
@@ -98,7 +83,7 @@ sv:
|
|
98
83
|
order:
|
99
84
|
best_rated: Bästa betyg
|
100
85
|
most_discussed: Mest diskuterade
|
101
|
-
older:
|
86
|
+
older: Äldre
|
102
87
|
recent: Senaste
|
103
88
|
title: 'Sortera efter:'
|
104
89
|
comments:
|
@@ -110,16 +95,16 @@ sv:
|
|
110
95
|
single_comment_warning: <a href="%{url}">Visa alla kommentarer</a>
|
111
96
|
single_comment_warning_title: Du visar en enda kommentar
|
112
97
|
title:
|
113
|
-
one: "%{count}
|
98
|
+
one: "%{count} kommentarer"
|
114
99
|
other: "%{count} kommentarer"
|
115
100
|
down_vote_button:
|
116
|
-
text: Jag
|
101
|
+
text: Jag håller inte med om denna kommentar
|
117
102
|
edit_comment_modal_form:
|
118
103
|
close: Stäng
|
119
104
|
form:
|
120
105
|
body:
|
121
106
|
label: Kommentar
|
122
|
-
placeholder: Vad tycker du?
|
107
|
+
placeholder: Vad tycker du om detta?
|
123
108
|
submit: Skicka
|
124
109
|
title: Redigera din kommentar
|
125
110
|
up_vote_button:
|
@@ -132,7 +117,7 @@ sv:
|
|
132
117
|
email_subject: Det finns en ny kommentar av %{author_name} i %{resource_title}
|
133
118
|
notification_title: Det finns en ny kommentar av <a href="%{author_path}">%{author_name} %{author_nickname}</a> i <a href="%{resource_path}">%{resource_title}</a>.
|
134
119
|
comment_by_followed_user_group:
|
135
|
-
email_intro: 'Gruppen %{author_name} har lämnat en kommentar i %{resource_title}. Du kan läsa den
|
120
|
+
email_intro: 'Gruppen %{author_name} har lämnat en kommentar i %{resource_title}. Du kan läsa den på denna sida:'
|
136
121
|
email_outro: Du har fått det här meddelandet eftersom du följer %{author_name}. Du kan sluta följa den här gruppen från dess profilsida.
|
137
122
|
email_subject: Det finns en ny kommentar av %{author_name} i %{resource_title}
|
138
123
|
notification_title: Det finns en ny kommentar av <a href="%{author_path}">%{author_name} %{author_nickname}</a> i <a href="%{resource_path}">%{resource_title}</a>.
|
@@ -144,13 +129,13 @@ sv:
|
|
144
129
|
comment_downvoted:
|
145
130
|
email_intro: Din kommentar i "%{resource_title}" har blivit nedröstad. Den har nu totalt %{upvotes} uppröster och %{downvotes} nedröster.
|
146
131
|
email_outro: Du har fått det här meddelandet eftersom du är författare till denna kommentar.
|
147
|
-
email_subject: Din kommentar
|
148
|
-
notification_title: Din <a href="%{resource_path}">kommentar</a>
|
132
|
+
email_subject: Din kommentar i "%{resource_title}" har nedröstats.
|
133
|
+
notification_title: Din <a href="%{resource_path}">kommentar</a> i "%{resource_title}" har nedröstats. Den har nu totalt %{upvotes} uppröster och %{downvotes} nedröster.
|
149
134
|
comment_upvoted:
|
150
|
-
email_intro: Din kommentar i "%{resource_title}" har
|
151
|
-
email_outro: Du har fått det här meddelandet eftersom du är författare till
|
152
|
-
email_subject: Din kommentar
|
153
|
-
notification_title: Din <a href="%{resource_path}">kommentar</a>
|
135
|
+
email_intro: Din kommentar i "%{resource_title}" har uppröstats. Den har nu totalt %{upvotes} uppröster och %{downvotes} nedröster.
|
136
|
+
email_outro: Du har fått det här meddelandet eftersom du är författare till denna kommentar.
|
137
|
+
email_subject: Din kommentar i "%{resource_title}" har uppröstats.
|
138
|
+
notification_title: Din <a href="%{resource_path}">kommentar</a> i "%{resource_title}" har uppröstats. Den har nu totalt %{upvotes} uppröster och %{downvotes} nedröster.
|
154
139
|
reply_created:
|
155
140
|
email_intro: "%{author_name} har svarat din kommentar i %{resource_title}. Du kan läsa den på den här sidan:"
|
156
141
|
email_outro: Du har fått denna notis eftersom din kommentar blev besvarad.
|
@@ -171,6 +156,3 @@ sv:
|
|
171
156
|
description: Antal kommentarer från deltagare
|
172
157
|
object: kommentarer
|
173
158
|
title: Kommentarer
|
174
|
-
errors:
|
175
|
-
messages:
|
176
|
-
cannot_have_comments: kan inte ha kommentarer
|
data/config/locales/tr-TR.yml
CHANGED
data/db/seeds.rb
CHANGED
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"
|
14
14
|
s.homepage = "https://decidim.org"
|
15
15
|
s.metadata = {
|
16
16
|
"bug_tracker_uri" => "https://github.com/decidim/decidim/issues",
|
@@ -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.
|
22
|
+
s.required_ruby_version = "~> 3.2.0"
|
23
23
|
|
24
24
|
s.name = "decidim-comments"
|
25
25
|
s.summary = "Decidim comments module"
|
@@ -84,19 +84,6 @@ 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
|
100
87
|
end
|
101
88
|
end
|
102
89
|
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
|
20
|
+
field :comments, [Decidim::Comments::CommentType], 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,12 +45,6 @@ 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
|
54
48
|
end
|
55
49
|
end
|
56
50
|
end
|
@@ -17,9 +17,10 @@ module Decidim
|
|
17
17
|
params = { "comment" => { "body" => body, "alignment" => alignment, "user_group_id" => user_group_id, "commentable" => object } }
|
18
18
|
form = Decidim::Comments::CommentForm.from_params(params).with_context(
|
19
19
|
current_organization: context[:current_organization],
|
20
|
+
current_user: context[:current_user],
|
20
21
|
current_component: object.component
|
21
22
|
)
|
22
|
-
Decidim::Comments::CreateComment.call(form
|
23
|
+
Decidim::Comments::CreateComment.call(form) do
|
23
24
|
on(:ok) do |comment|
|
24
25
|
return comment
|
25
26
|
end
|
@@ -28,7 +28,7 @@ module Decidim
|
|
28
28
|
false
|
29
29
|
end
|
30
30
|
|
31
|
-
# Public: Whether the object's comments can have
|
31
|
+
# Public: Whether the object's comments can have votes or not. It enables the
|
32
32
|
# upvote and downvote buttons for comments.
|
33
33
|
def comments_have_votes?
|
34
34
|
false
|
@@ -58,7 +58,7 @@ module Decidim
|
|
58
58
|
end
|
59
59
|
|
60
60
|
# Public: Updates the comments counter cache. We have to do it these
|
61
|
-
# way in order to properly calculate the
|
61
|
+
# way in order to properly calculate the counter with hidden
|
62
62
|
# comments.
|
63
63
|
#
|
64
64
|
# rubocop:disable Rails/SkipsModelValidations
|
@@ -9,7 +9,6 @@ module Decidim
|
|
9
9
|
module CommentableWithComponent
|
10
10
|
extend ActiveSupport::Concern
|
11
11
|
include Decidim::Comments::Commentable
|
12
|
-
include Decidim::UserRoleChecker
|
13
12
|
|
14
13
|
included do
|
15
14
|
# Public: Overrides the `commentable?` Commentable concern method.
|
@@ -24,8 +23,7 @@ module Decidim
|
|
24
23
|
|
25
24
|
# Public: Whether the object can have new comments or not.
|
26
25
|
def user_allowed_to_comment?(user)
|
27
|
-
return
|
28
|
-
return false unless can_participate?(user)
|
26
|
+
return unless can_participate?(user)
|
29
27
|
|
30
28
|
ActionAuthorizer.new(user, "comment", component, self).authorize.ok?
|
31
29
|
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, CommentableType, null: false 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
|