decidim-comments 0.28.1 → 0.28.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/app/cells/decidim/comments/comment/actions.erb +4 -5
- data/app/cells/decidim/comments/comment/show.erb +4 -2
- data/app/cells/decidim/comments/comment_cell.rb +18 -0
- 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/packs/src/decidim/comments/comments.component.test.js +2 -2
- data/config/locales/ar.yml +0 -1
- data/config/locales/bg.yml +169 -0
- data/config/locales/ca.yml +6 -1
- 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 +7 -2
- 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/hu.yml +0 -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 +3 -1
- data/config/locales/pt-BR.yml +0 -1
- data/config/locales/pt.yml +0 -1
- data/config/locales/ro-RO.yml +0 -1
- data/config/locales/sk.yml +0 -1
- data/config/locales/sq-AL.yml +0 -1
- 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/lib/decidim/comments/test/factories.rb +6 -0
- data/lib/decidim/comments/test/shared_examples/comment_event.rb +33 -0
- data/lib/decidim/comments/version.rb +1 -1
- metadata +12 -12
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 24cf379816e56d8d02c96af8dfd596b8946c7098f2c672f305a97fb563861248
|
4
|
+
data.tar.gz: 361246cb66e6171732029b68e1a51edabf47bd1d605d26f698144fb148006eb3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b649d92b1c7cff28097d16eaee1ab6e3d08b5600c72a180e9e83cf4556730f0a5b62223a23051d61fa160fea8b2925d9161da05e7b600e4439c973ea1fcb9a58
|
7
|
+
data.tar.gz: fef878987f09ba7d4156bc86b573d59db4c030d67f69cabca6f271ea66b1fe44288bef6e615cbf1cd423fb2e363dfa7d87a273b98fee46d7990209235b5d6467
|
@@ -1,14 +1,13 @@
|
|
1
1
|
<div class="comment__actions">
|
2
2
|
<% if depth.zero? && has_replies_in_children? %>
|
3
|
-
<button class="button button__sm button__text-secondary comment__hide" data-controls="comment-<%= model.id %>-replies">
|
3
|
+
<button class="button button__sm button__text-secondary comment__hide" data-controls="comment-<%= model.id %>-replies" data-open="true" id="comment-<%= model.id %>-replies-trigger">
|
4
|
+
<span class="show-comment-replies font-normal"><%= t("decidim.components.comment.show_replies", count: replies.size) %></span>
|
4
5
|
<%= icon "arrow-up-s-line" %>
|
5
|
-
<span class="hide-comment-replies font-normal"><%= t("decidim.components.comment.hide_replies") %></span>
|
6
|
-
<%= icon "arrow-down-s-line" %>
|
7
|
-
<span class="show-comment-replies font-normal"><%= t("decidim.components.comment.show_replies", count: replies.size, replies_count: replies.size ) %></span>
|
6
|
+
<span class="hide-comment-replies font-normal"><%= t("decidim.components.comment.hide_replies", count: replies.size) %></span>
|
8
7
|
</button>
|
9
8
|
<% end %>
|
10
9
|
<% if can_reply? %>
|
11
|
-
<button class="button button__sm button__text-secondary" data-controls="panel-<%= reply_id %>">
|
10
|
+
<button class="button button__sm button__text-secondary" data-controls="panel-<%= reply_id %>" id="panel-<%= reply_id %>-trigger">
|
12
11
|
<%= icon "chat-1-line" %>
|
13
12
|
<span class="font-normal"><%= t("decidim.components.comment.reply") %></span>
|
14
13
|
<%= icon "close-circle-line" %>
|
@@ -1,10 +1,12 @@
|
|
1
|
-
<%= content_tag :div, id: "comment_#{model.id}", class: "comment relative", data: { comment_id: model.id } do %>
|
1
|
+
<%= content_tag :div, id: "comment_#{model.id}", class: "comment relative", role: "comment", data: { comment_id: model.id, parent: parent_element_id } do %>
|
2
2
|
<% if model.hidden? %>
|
3
3
|
<%= render :moderation_data %>
|
4
4
|
<% elsif model.deleted? %>
|
5
5
|
<%= render :deletion_data %>
|
6
6
|
<% else %>
|
7
7
|
<div class="comment__header">
|
8
|
+
<div class="sr-only"><%= comment_label %></div>
|
9
|
+
|
8
10
|
<span class="font-bold">
|
9
11
|
<%== cell("decidim/author", author_presenter) %>
|
10
12
|
</span>
|
@@ -18,7 +20,7 @@
|
|
18
20
|
<% end %>
|
19
21
|
|
20
22
|
<div class="relative ml-auto">
|
21
|
-
<button id="dropdown-trigger-<%= context_menu_id %>" data-component="dropdown" data-target="dropdown-menu-<%= context_menu_id %>">
|
23
|
+
<button id="dropdown-trigger-<%= context_menu_id %>" data-component="dropdown" data-target="dropdown-menu-<%= context_menu_id %>" aria-label="<%= t("decidim.components.comment.controls_label") %>">
|
22
24
|
…
|
23
25
|
</button>
|
24
26
|
|
@@ -39,6 +39,24 @@ module Decidim
|
|
39
39
|
|
40
40
|
private
|
41
41
|
|
42
|
+
def parent_element_id
|
43
|
+
return unless reply?
|
44
|
+
|
45
|
+
"comment_#{model.decidim_commentable_id}"
|
46
|
+
end
|
47
|
+
|
48
|
+
def comment_label
|
49
|
+
if reply?
|
50
|
+
t("decidim.components.comment.comment_label_reply", comment_id: model.id, parent_comment_id: model.decidim_commentable_id)
|
51
|
+
else
|
52
|
+
t("decidim.components.comment.comment_label", comment_id: model.id)
|
53
|
+
end
|
54
|
+
end
|
55
|
+
|
56
|
+
def reply?
|
57
|
+
model.decidim_commentable_type == model.class.name
|
58
|
+
end
|
59
|
+
|
42
60
|
def cache_hash
|
43
61
|
return @hash if defined?(@hash)
|
44
62
|
|
@@ -5,7 +5,8 @@
|
|
5
5
|
t("decidim.components.comment_order_selector.order.#{order_value}"),
|
6
6
|
decidim_comments.comments_path(commentable_gid: model.to_signed_global_id.to_s, order: order_value, reload: 1),
|
7
7
|
class: "button button__sm button__text-secondary only:m-auto comment-order-by__item inline-block #{order_value == order ? "underline font-bold" : ""}",
|
8
|
-
remote: true
|
8
|
+
remote: true,
|
9
|
+
aria: { controls: threads_node_id }
|
9
10
|
) %>
|
10
11
|
</div>
|
11
12
|
<% end %>
|
@@ -16,7 +16,7 @@
|
|
16
16
|
</div>
|
17
17
|
<%= single_comment_warning %>
|
18
18
|
<%= blocked_comments_warning %>
|
19
|
-
<div class="comment-threads">
|
19
|
+
<div class="comment-threads" id="<%= threads_node_id %>" aria-live="polite">
|
20
20
|
<%= comments_loading %>
|
21
21
|
<% comments.each do |comment| %>
|
22
22
|
<%= cell("decidim/comments/comment_thread", comment, order:) %>
|
@@ -1,10 +1,10 @@
|
|
1
1
|
<%# We cannot use the AnnouncementCell directly here as the link is escaped and it would not work %>
|
2
2
|
<div class="flash warning" data-announcement="">
|
3
|
-
<
|
3
|
+
<div class="flash__message">
|
4
4
|
<% if comment_permissions? %>
|
5
5
|
<p><%= blocked_comments_for_unauthorized_user_warning_link %></p>
|
6
6
|
<% else %>
|
7
7
|
<p><%= t("decidim.components.comments.blocked_comments_for_user_warning") %></p>
|
8
8
|
<% end %>
|
9
|
-
</
|
9
|
+
</div>
|
10
10
|
</div>
|
@@ -30,7 +30,7 @@ module Decidim
|
|
30
30
|
|
31
31
|
def blocked_comments_warning
|
32
32
|
return unless comments_blocked?
|
33
|
-
return
|
33
|
+
return if user_comments_blocked?
|
34
34
|
|
35
35
|
render :blocked_comments_warning
|
36
36
|
end
|
@@ -88,6 +88,10 @@ module Decidim
|
|
88
88
|
"comments-for-#{commentable_type.demodulize}-#{model.id}"
|
89
89
|
end
|
90
90
|
|
91
|
+
def threads_node_id
|
92
|
+
"#{node_id}-threads"
|
93
|
+
end
|
94
|
+
|
91
95
|
def commentable_type
|
92
96
|
model.commentable_type
|
93
97
|
end
|
@@ -344,9 +344,9 @@ describe("CommentsComponent", () => {
|
|
344
344
|
${generateCommentForm("Dummy", 123)}
|
345
345
|
</div>
|
346
346
|
<div class="flash primary loading-comments hidden">
|
347
|
-
<
|
347
|
+
<div class="flash__message">
|
348
348
|
Loading comments ...
|
349
|
-
</
|
349
|
+
</div>
|
350
350
|
</div>
|
351
351
|
</div>
|
352
352
|
</div>
|
data/config/locales/ar.yml
CHANGED
data/config/locales/bg.yml
CHANGED
@@ -4,4 +4,173 @@ bg:
|
|
4
4
|
models:
|
5
5
|
decidim/comments/comment_by_followed_user_event: Коментар
|
6
6
|
decidim/comments/comment_created_event: Коментар
|
7
|
+
decidim/comments/comment_upvoted_event: Коментарът е одобрен
|
7
8
|
decidim/comments/reply_created_event: Отговор на коментар
|
9
|
+
decidim/comments/user_group_mentioned_event: Споменаване
|
10
|
+
decidim/comments/user_mentioned_event: Споменаване
|
11
|
+
activerecord:
|
12
|
+
models:
|
13
|
+
decidim/comments/comment:
|
14
|
+
one: Коментар
|
15
|
+
other: Коментари
|
16
|
+
decidim/comments/comment_vote:
|
17
|
+
one: Глас
|
18
|
+
other: Гласове
|
19
|
+
decidim:
|
20
|
+
comments:
|
21
|
+
admin:
|
22
|
+
shared:
|
23
|
+
availability_fields:
|
24
|
+
enabled: Коментарите са активирани
|
25
|
+
end_time: Коментарите са активирани до
|
26
|
+
start_time: Коментарите са активирани от
|
27
|
+
comments:
|
28
|
+
create:
|
29
|
+
error: Възникна проблем при създаването на коментара.
|
30
|
+
delete:
|
31
|
+
error: Коментарът не може да бъде изтрит.
|
32
|
+
update:
|
33
|
+
error: Възникна проблем при актуализирането на коментара.
|
34
|
+
comments_title: Коментар
|
35
|
+
last_activity:
|
36
|
+
new_comment: 'Нов коментар:'
|
37
|
+
votes:
|
38
|
+
create:
|
39
|
+
error: Възникна проблем с гласуването за коментара.
|
40
|
+
components:
|
41
|
+
add_comment_form:
|
42
|
+
account_message: <a href="%{sign_in_url}">Влезте в профила си</a> или <a href="%{sign_up_url}">се регистрирайте</a>, за да добавите Вашия коментар.
|
43
|
+
form:
|
44
|
+
body:
|
45
|
+
label: Коментар
|
46
|
+
placeholder: Какво мислите за това?
|
47
|
+
form_error: Текстът е задължителен и не може да е по-дълъг от %{length} символа.
|
48
|
+
submit_reply: Публикуване на отговор
|
49
|
+
submit_root_comment: Публикуване на коментар
|
50
|
+
user_group_id:
|
51
|
+
label: Коментирайте като
|
52
|
+
opinion:
|
53
|
+
label: Вашето мнение по тази тема
|
54
|
+
negative: Негативно
|
55
|
+
negative_selected: Вашето мнение по тази тема е негативно
|
56
|
+
neutral: Неутрално
|
57
|
+
neutral_selected: Вашето мнение по тази тема е неутрално
|
58
|
+
positive: Позитивно
|
59
|
+
positive_selected: Вашето мнение по тази тема е позитивно
|
60
|
+
remaining_characters: "Оставащи символи: %{count}"
|
61
|
+
remaining_characters_1: "%{count} оставащ символ"
|
62
|
+
title: Добавете Вашия коментар
|
63
|
+
comment:
|
64
|
+
alignment:
|
65
|
+
against: Против
|
66
|
+
in_favor: Подкрепям
|
67
|
+
cancel_reply: Отказ от отговор
|
68
|
+
comment_label: Коментар %{comment_id}
|
69
|
+
comment_label_reply: Коментар %{comment_id} (отговор на коментар %{parent_comment_id})
|
70
|
+
confirm_destroy: Сигурни ли сте, че искате да изтриете този коментар?
|
71
|
+
controls_label: Контроли за коментари
|
72
|
+
delete: Изтрий
|
73
|
+
deleted_at: Коментарът е изтрит на %{date}
|
74
|
+
deleted_user: Изтрит участник
|
75
|
+
edit: Редактирай
|
76
|
+
edited: Редактирано
|
77
|
+
hide_replies:
|
78
|
+
one: Скриване на отговора
|
79
|
+
other: Скриване на %{count} отговора
|
80
|
+
moderated_at: Коментарът е модериран на %{date}
|
81
|
+
reply: Отговори
|
82
|
+
report:
|
83
|
+
action: Доклад
|
84
|
+
already_reported: Това съдържание вече е докладвано и ще бъде прегледано от администратор.
|
85
|
+
close: Затвори
|
86
|
+
description: Това съдържание неподходящо ли е?
|
87
|
+
details: Допълнителни коментари
|
88
|
+
reasons:
|
89
|
+
does_not_belong: Съдържа незаконна дейност, заплахи за самоубийство, лична информация или нещо друго, което смятате, че не принадлежи на %{organization_name}.
|
90
|
+
offensive: Съдържа расизъм, сексизъм, злословия, лични атаки, заплахи за смърт, заявки за самоубийство или всякаква форма на омраза.
|
91
|
+
spam: Съдържа примамка за кликване, реклама, измами или скриптове.
|
92
|
+
title: Докладване за неподходящо съдържание
|
93
|
+
show_replies:
|
94
|
+
one: Показване на отговора
|
95
|
+
other: Показване на %{count} отговора
|
96
|
+
single_comment_link_title: Вземете линка
|
97
|
+
comment_order_selector:
|
98
|
+
order:
|
99
|
+
best_rated: С най-висока оценка
|
100
|
+
most_discussed: Най-обсъждани
|
101
|
+
older: По-старо
|
102
|
+
recent: Скорошни
|
103
|
+
title: 'Подреди по:'
|
104
|
+
comments:
|
105
|
+
blocked_comments_for_unauthorized_user_warning: Трябва да сте верифицирани, за да коментирате в този момент, но можете да прочетете предишните.
|
106
|
+
blocked_comments_for_user_warning: Понастоящем не можете да коментирате, но можете да прочетете предходните коментари.
|
107
|
+
blocked_comments_warning: Коментарите в момента са деактивирани, но можете да прочетете предишните.
|
108
|
+
comment_details_title: Детайли за коментара
|
109
|
+
loading: Коментарите се зареждат...
|
110
|
+
single_comment_warning: <a href="%{url}">Вижте всички коментари</a>
|
111
|
+
single_comment_warning_title: Виждате единичен коментар
|
112
|
+
title:
|
113
|
+
one: "%{count} коментар"
|
114
|
+
other: "%{count} коментари"
|
115
|
+
down_vote_button:
|
116
|
+
text: Не съм съгласен с този коментар
|
117
|
+
edit_comment_modal_form:
|
118
|
+
close: Затвори
|
119
|
+
form:
|
120
|
+
body:
|
121
|
+
label: Коментар
|
122
|
+
placeholder: Какво мислите за това?
|
123
|
+
submit: Изпрати
|
124
|
+
title: Редактирайте Вашия коментар
|
125
|
+
up_vote_button:
|
126
|
+
text: Съгласен съм с този коментар
|
127
|
+
events:
|
128
|
+
comments:
|
129
|
+
comment_by_followed_user:
|
130
|
+
email_intro: "%{author_name} остави коментар в %{resource_title}. Можете да го прочетете на тази страница:"
|
131
|
+
email_outro: Получихте това известие, защото следвате %{author_name}. Можете да спрете да следвате този потребител от страницата на неговия профил.
|
132
|
+
email_subject: Има нов коментар от %{author_name} в(ъв) %{resource_title}
|
133
|
+
notification_title: Има нов коментар от <a href="%{author_path}">%{author_name} %{author_nickname}</a> в(ъв) <a href="%{resource_path}">%{resource_title}</a>.
|
134
|
+
comment_by_followed_user_group:
|
135
|
+
email_intro: 'Групата %{author_name} остави коментар в(ъв) %{resource_title}. Можете да го прочетете на следната страница:'
|
136
|
+
email_outro: Получавате това известие, защото следвате %{author_name}. Можете да спрете да следвате тази група от страницата на профила ѝ.
|
137
|
+
email_subject: Има нов коментар от %{author_name} в(ъв) %{resource_title}
|
138
|
+
notification_title: Има нов коментар от <a href="%{author_path}">%{author_name} %{author_nickname}</a> в(ъв) <a href="%{resource_path}">%{resource_title}</a>.
|
139
|
+
comment_created:
|
140
|
+
email_intro: "%{resource_title} получи коментар. Можете да прочетете коментара на тази страница:"
|
141
|
+
email_outro: Получавате това известие, защото следвате „%{resource_title}“ или неговия автор. Можете да прекратите следването от предходната връзка.
|
142
|
+
email_subject: Има нов коментар от %{author_name} по %{resource_title}
|
143
|
+
notification_title: Има нов коментар от <a href="%{author_path}">%{author_name} %{author_nickname}</a> по <a href="%{resource_path}">%{resource_title}</a>
|
144
|
+
comment_downvoted:
|
145
|
+
email_intro: Вашият коментар в „%{resource_title}“ беше гласуван против. Вече има общо %{upvotes} гласа за и %{downvotes} гласа против.
|
146
|
+
email_outro: Получихте това известие, защото вие сте авторът на този коментар.
|
147
|
+
email_subject: Вашият коментар в „%{resource_title}“ беше гласуван против.
|
148
|
+
notification_title: Вашият <a href="%{resource_path}">коментар</a> в „%{resource_title}“ беше гласуван против. Вече има общо %{upvotes} гласа за и %{downvotes} гласа против.
|
149
|
+
comment_upvoted:
|
150
|
+
email_intro: Коментарът ви в „%{resource_title}“ беше гласуван в подкрепа. Вече има общо %{upvotes} гласа за и %{downvotes} гласа против.
|
151
|
+
email_outro: Получихте това известие, защото вие сте авторът на този коментар.
|
152
|
+
email_subject: Коментарът ви в „%{resource_title}“ беше гласуван в подкрепа.
|
153
|
+
notification_title: Вашият <a href="%{resource_path}">коментар</a> в „%{resource_title}“ получи положителен глас. Вече има общо %{upvotes} гласа за и %{downvotes} гласа против.
|
154
|
+
reply_created:
|
155
|
+
email_intro: "%{author_name} отговори на вашия коментар в %{resource_title}. Можете да го прочетете на тази страница:"
|
156
|
+
email_outro: Получавате това известие, защото някой отговори на коментара Ви.
|
157
|
+
email_subject: "%{author_name} отговори на коментара Ви по %{resource_title}"
|
158
|
+
notification_title: <a href="%{author_path}">%{author_name} %{author_nickname}</a> отговори на коментара Ви по <a href="%{resource_path}">%{resource_title}</a>
|
159
|
+
user_group_mentioned:
|
160
|
+
email_intro: Група, към която принадлежите, беше спомената
|
161
|
+
email_outro: Получавате това известие, защото сте член на групата %{group_name}, която беше спомената в(ъв) %{resource_title}.
|
162
|
+
email_subject: Бяхте споменати в(ъв) %{resource_title} като член на %{group_name}
|
163
|
+
notification_title: <a href="%{author_path}">%{author_name} %{author_nickname}</a> Ви спомена в(ъв) <a href="%{resource_path}">%{resource_title}</a> като член на <a href="%{group_path}">%{group_name} %{group_nickname}</a>
|
164
|
+
user_mentioned:
|
165
|
+
email_intro: Бяхте споменати
|
166
|
+
email_outro: Получавате това известие, защото бяхте споменати в(ъв) %{resource_title}.
|
167
|
+
email_subject: Бяхте споменати в(ъв) %{resource_title}
|
168
|
+
notification_title: <a href="%{author_path}">%{author_name} %{author_nickname}</a> Ви спомена в(ъв) <a href="%{resource_path}">%{resource_title}</a>
|
169
|
+
metrics:
|
170
|
+
comments:
|
171
|
+
description: Брой коментари генерирани от участници
|
172
|
+
object: коментари
|
173
|
+
title: Коментари
|
174
|
+
errors:
|
175
|
+
messages:
|
176
|
+
cannot_have_comments: не може да има коментари
|
data/config/locales/ca.yml
CHANGED
@@ -65,13 +65,18 @@ ca:
|
|
65
65
|
against: En contra
|
66
66
|
in_favor: A favor
|
67
67
|
cancel_reply: Cancel·lar resposta
|
68
|
+
comment_label: Comentari %{comment_id}
|
69
|
+
comment_label_reply: Comentari %{comment_id} (respon al comentari %{parent_comment_id})
|
68
70
|
confirm_destroy: Segur que vols esborrar aquest comentari?
|
71
|
+
controls_label: Controls de comentaris
|
69
72
|
delete: Esborrar
|
70
73
|
deleted_at: Comentari esborrat el %{date}
|
71
74
|
deleted_user: Participant eliminada
|
72
75
|
edit: Editar
|
73
76
|
edited: Editat
|
74
|
-
hide_replies:
|
77
|
+
hide_replies:
|
78
|
+
one: Amagar resposta
|
79
|
+
other: Amagar %{count} respostes
|
75
80
|
moderated_at: Comentari moderat el %{date}
|
76
81
|
reply: Respondre
|
77
82
|
report:
|
data/config/locales/cs.yml
CHANGED
@@ -69,13 +69,15 @@ cs:
|
|
69
69
|
against: Proti
|
70
70
|
in_favor: Ve prospěch
|
71
71
|
cancel_reply: Zrušit odpověď
|
72
|
+
comment_label: Komentář %{comment_id}
|
73
|
+
comment_label_reply: Komentář %{comment_id} (odpověď na komentář %{parent_comment_id})
|
72
74
|
confirm_destroy: Opravdu chcete odstranit tento komentář?
|
75
|
+
controls_label: Ovládání komentářů
|
73
76
|
delete: Smazat
|
74
77
|
deleted_at: Komentář byl smazán dne %{date}
|
75
78
|
deleted_user: Vymazaný účastník
|
76
79
|
edit: Upravit
|
77
80
|
edited: Upraveno
|
78
|
-
hide_replies: Skrýt odpovědi
|
79
81
|
moderated_at: Komentář moderován dne %{date}
|
80
82
|
reply: Odpověď
|
81
83
|
report:
|
data/config/locales/de.yml
CHANGED
@@ -65,13 +65,18 @@ de:
|
|
65
65
|
against: Gegen
|
66
66
|
in_favor: Zugunsten
|
67
67
|
cancel_reply: Antwort abbrechen
|
68
|
+
comment_label: Kommentar %{comment_id}
|
69
|
+
comment_label_reply: Kommentar %{comment_id} (Antwort auf Kommentar %{parent_comment_id})
|
68
70
|
confirm_destroy: Sind Sie sich sicher, dass Sie diesen Kommentar löschen möchten?
|
71
|
+
controls_label: Kommentarsteuerung
|
69
72
|
delete: Löschen
|
70
73
|
deleted_at: Kommentar gelöscht am %{date}
|
71
74
|
deleted_user: Gelöschter Benutzer
|
72
75
|
edit: Bearbeiten
|
73
76
|
edited: Bearbeitet
|
74
|
-
hide_replies:
|
77
|
+
hide_replies:
|
78
|
+
one: Antwort verbergen
|
79
|
+
other: '%{count} Antworten verbergen'
|
75
80
|
moderated_at: Kommentar moderiert am %{date}
|
76
81
|
reply: Antworten
|
77
82
|
report:
|
data/config/locales/el.yml
CHANGED
data/config/locales/en.yml
CHANGED
@@ -65,13 +65,18 @@ en:
|
|
65
65
|
against: Against
|
66
66
|
in_favor: In favor
|
67
67
|
cancel_reply: Cancel reply
|
68
|
+
comment_label: Comment %{comment_id}
|
69
|
+
comment_label_reply: Comment %{comment_id} (reply to comment %{parent_comment_id})
|
68
70
|
confirm_destroy: Are you sure you want to delete this comment?
|
71
|
+
controls_label: Comment controls
|
69
72
|
delete: Delete
|
70
73
|
deleted_at: Comment deleted on %{date}
|
71
74
|
deleted_user: Deleted participant
|
72
75
|
edit: Edit
|
73
76
|
edited: Edited
|
74
|
-
hide_replies:
|
77
|
+
hide_replies:
|
78
|
+
one: Hide reply
|
79
|
+
other: Hide %{count} replies
|
75
80
|
moderated_at: Comment moderated on %{date}
|
76
81
|
reply: Reply
|
77
82
|
report:
|
data/config/locales/es-MX.yml
CHANGED
@@ -65,13 +65,18 @@ es-MX:
|
|
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-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:
|
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
data/config/locales/hu.yml
CHANGED
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,15 @@ pl:
|
|
69
69
|
against: Negatywny
|
70
70
|
in_favor: Pozytywny
|
71
71
|
cancel_reply: Anuluj odpowiedź
|
72
|
+
comment_label: Komentarz %{comment_id}
|
73
|
+
comment_label_reply: Komentarz %{comment_id} (odpowiedź na komentarz %{parent_comment_id})
|
72
74
|
confirm_destroy: Czy na pewno chcesz usunąć ten komentarz?
|
75
|
+
controls_label: Kontrolki komentarzy
|
73
76
|
delete: Usuń
|
74
77
|
deleted_at: Komentarz usunięty %{date}
|
75
78
|
deleted_user: Usunięty użytkownik
|
76
79
|
edit: Edytuj
|
77
80
|
edited: Edytowany
|
78
|
-
hide_replies: Ukryj odpowiedzi
|
79
81
|
moderated_at: Komentarz moderowany dnia %{date}
|
80
82
|
reply: Odpowiedz
|
81
83
|
report:
|
data/config/locales/pt-BR.yml
CHANGED
data/config/locales/pt.yml
CHANGED
data/config/locales/ro-RO.yml
CHANGED
data/config/locales/sk.yml
CHANGED
data/config/locales/sq-AL.yml
CHANGED
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
@@ -40,6 +40,12 @@ FactoryBot.define do
|
|
40
40
|
end
|
41
41
|
root_commentable { build(:dummy_resource, skip_injection:) }
|
42
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
|
48
|
+
end
|
43
49
|
end
|
44
50
|
|
45
51
|
factory :comment_vote, class: "Decidim::Comments::CommentVote" do
|
@@ -42,4 +42,37 @@ shared_examples_for "a comment event" do
|
|
42
42
|
expect(subject.resource_text).to eq comment.formatted_body
|
43
43
|
end
|
44
44
|
end
|
45
|
+
|
46
|
+
describe "hidden_resource?" do
|
47
|
+
context "when comment is not moderated" do
|
48
|
+
it "returns false" do
|
49
|
+
expect(subject.hidden_resource?).to be false
|
50
|
+
end
|
51
|
+
end
|
52
|
+
|
53
|
+
context "when comment is moderated" do
|
54
|
+
let(:comment) { create(:comment, :moderated) }
|
55
|
+
|
56
|
+
it "returns true" do
|
57
|
+
expect(subject.hidden_resource?).to be true
|
58
|
+
end
|
59
|
+
end
|
60
|
+
|
61
|
+
context "when resource is not moderated" do
|
62
|
+
it "returns false" do
|
63
|
+
expect(subject.hidden_resource?).to be false
|
64
|
+
end
|
65
|
+
end
|
66
|
+
|
67
|
+
context "when resource is moderated" do
|
68
|
+
before do
|
69
|
+
create(:moderation, reportable: resource, hidden_at: 2.days.ago)
|
70
|
+
resource.reload
|
71
|
+
end
|
72
|
+
|
73
|
+
it "returns true" do
|
74
|
+
expect(subject.hidden_resource?).to be true
|
75
|
+
end
|
76
|
+
end
|
77
|
+
end
|
45
78
|
end
|
metadata
CHANGED
@@ -1,16 +1,16 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: decidim-comments
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.28.
|
4
|
+
version: 0.28.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Josep Jaume Rey Peroy
|
8
8
|
- Marc Riera Casals
|
9
9
|
- Oriol Gual Oliva
|
10
|
-
autorequire:
|
10
|
+
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2024-
|
13
|
+
date: 2024-07-16 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.28.
|
21
|
+
version: 0.28.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.28.
|
28
|
+
version: 0.28.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.28.
|
55
|
+
version: 0.28.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.28.
|
62
|
+
version: 0.28.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.28.
|
69
|
+
version: 0.28.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.28.
|
76
|
+
version: 0.28.2
|
77
77
|
description: Pluggable comments system for some components.
|
78
78
|
email:
|
79
79
|
- josepjaume@gmail.com
|
@@ -306,7 +306,7 @@ metadata:
|
|
306
306
|
funding_uri: https://opencollective.com/decidim
|
307
307
|
homepage_uri: https://decidim.org
|
308
308
|
source_code_uri: https://github.com/decidim/decidim
|
309
|
-
post_install_message:
|
309
|
+
post_install_message:
|
310
310
|
rdoc_options: []
|
311
311
|
require_paths:
|
312
312
|
- lib
|
@@ -321,8 +321,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
321
321
|
- !ruby/object:Gem::Version
|
322
322
|
version: '0'
|
323
323
|
requirements: []
|
324
|
-
rubygems_version: 3.
|
325
|
-
signing_key:
|
324
|
+
rubygems_version: 3.3.7
|
325
|
+
signing_key:
|
326
326
|
specification_version: 4
|
327
327
|
summary: Decidim comments module
|
328
328
|
test_files: []
|