decidim-comments 0.25.2 → 0.26.0.rc1
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/utilities.erb +2 -2
- data/app/cells/decidim/comments/comment_cell.rb +19 -1
- data/app/cells/decidim/comments/comment_form_cell.rb +9 -0
- data/app/cells/decidim/comments/comments/order_control.erb +1 -1
- data/app/cells/decidim/comments/edit_comment_modal_form/show.erb +2 -2
- data/app/cells/decidim/comments/edit_comment_modal_form_cell.rb +8 -0
- data/app/events/decidim/comments/comment_event.rb +36 -3
- data/app/events/decidim/comments/comment_voted_event.rb +4 -0
- data/app/models/decidim/comments/comment.rb +9 -7
- data/app/packs/src/decidim/comments/comments.component.test.js +2 -3
- data/app/services/decidim/comments/new_comment_notification_creator.rb +1 -1
- data/app/views/decidim/comments/admin/shared/_availability_fields.html.erb +15 -0
- data/config/locales/ar.yml +0 -1
- data/config/locales/ca.yml +1 -1
- data/config/locales/cs.yml +7 -1
- data/config/locales/de.yml +7 -1
- data/config/locales/el.yml +0 -1
- data/config/locales/en.yml +7 -1
- data/config/locales/es-MX.yml +0 -1
- data/config/locales/es-PY.yml +0 -1
- data/config/locales/es.yml +7 -1
- data/config/locales/eu.yml +7 -1
- data/config/locales/fi-plain.yml +7 -1
- data/config/locales/fi.yml +7 -1
- data/config/locales/fr-CA.yml +7 -1
- data/config/locales/fr.yml +7 -1
- data/config/locales/gl.yml +7 -1
- data/config/locales/hu.yml +0 -1
- data/config/locales/it.yml +7 -1
- data/config/locales/ja.yml +9 -3
- data/config/locales/lb-LU.yml +161 -0
- data/config/locales/lb.yml +0 -1
- data/config/locales/lv.yml +0 -1
- data/config/locales/nl.yml +7 -1
- data/config/locales/no.yml +0 -1
- data/config/locales/pl.yml +0 -1
- data/config/locales/pt-BR.yml +1 -2
- data/config/locales/pt.yml +7 -1
- data/config/locales/ro-RO.yml +7 -1
- data/config/locales/sk.yml +0 -1
- data/config/locales/sr-CS.yml +0 -1
- data/config/locales/sv.yml +7 -1
- data/config/locales/tr-TR.yml +0 -1
- data/config/locales/val-ES.yml +1 -0
- data/config/locales/zh-CN.yml +0 -1
- data/lib/decidim/comments/has_availability_attributes.rb +23 -0
- data/lib/decidim/comments/test/shared_examples/has_comments_availability_attributes.rb +76 -0
- data/lib/decidim/comments/test/shared_examples/translatable_comment.rb +18 -0
- data/lib/decidim/comments/test.rb +2 -0
- data/lib/decidim/comments/version.rb +1 -1
- data/lib/decidim/comments.rb +1 -0
- metadata +16 -11
data/config/locales/lb-LU.yml
CHANGED
|
@@ -1 +1,162 @@
|
|
|
1
1
|
lb:
|
|
2
|
+
activemodel:
|
|
3
|
+
models:
|
|
4
|
+
decidim/comments/comment_by_followed_user_event: Kommentar
|
|
5
|
+
decidim/comments/comment_created_event: Kommentar
|
|
6
|
+
decidim/comments/reply_created_event: Kommentar Äntwert
|
|
7
|
+
decidim/comments/user_group_mentioned_event: Erwähnen
|
|
8
|
+
decidim/comments/user_mentioned_event: Erwähnen
|
|
9
|
+
activerecord:
|
|
10
|
+
models:
|
|
11
|
+
decidim/comments/comment:
|
|
12
|
+
one: Kommentar
|
|
13
|
+
other: Bemerkungen
|
|
14
|
+
decidim/comments/comment_vote:
|
|
15
|
+
one: Abstimmung
|
|
16
|
+
other: Stimmen
|
|
17
|
+
decidim:
|
|
18
|
+
comments:
|
|
19
|
+
comments:
|
|
20
|
+
create:
|
|
21
|
+
error: Beim Erstellen des Kommentars ist ein Fehler aufgetreten.
|
|
22
|
+
delete:
|
|
23
|
+
error: "Der Kommentar konnte nicht gelöscht werden.\n\n"
|
|
24
|
+
update:
|
|
25
|
+
error: Beim Aktualisieren des Kommentars ist ein Problem aufgetreten.
|
|
26
|
+
comments_count: Kommentaranzahl
|
|
27
|
+
comments_title: Kommentare
|
|
28
|
+
last_activity:
|
|
29
|
+
new_comment_at_html: "<span>Neuer Kommentar unter %{link}</span>"
|
|
30
|
+
view: Ansicht
|
|
31
|
+
votes:
|
|
32
|
+
create:
|
|
33
|
+
error: Beim Abstimmen des Kommentars sind Fehler aufgetreten.
|
|
34
|
+
components:
|
|
35
|
+
add_comment_form:
|
|
36
|
+
account_message: <a href="%{sign_in_url}">Melden Sie sich mit Ihrem Konto an</a> oder <a href="%{sign_up_url}">registrieren Sie sich</a>, um Ihren Kommentar hinzuzufügen.
|
|
37
|
+
form:
|
|
38
|
+
body:
|
|
39
|
+
label: Kommentar
|
|
40
|
+
placeholder: Was denken Sie darüber?
|
|
41
|
+
form_error: Der Text ist erforderlich und darf nicht länger als %{length} Zeichen sein.
|
|
42
|
+
submit: Senden
|
|
43
|
+
user_group_id:
|
|
44
|
+
label: Kommentieren als
|
|
45
|
+
opinion:
|
|
46
|
+
label: Ihre Meinung zu diesem Thema
|
|
47
|
+
negative: Negativ
|
|
48
|
+
negative_selected: Ihre Meinung zu diesem Thema ist negativ
|
|
49
|
+
neutral: Neutral
|
|
50
|
+
neutral_selected: Ihre Meinung zu diesem Thema ist neutral
|
|
51
|
+
positive: Positiv
|
|
52
|
+
positive_selected: Ihre Meinung zu diesem Thema ist positiv
|
|
53
|
+
remaining_characters: "%{count} Zeichen übrig"
|
|
54
|
+
remaining_characters_1: "%{count} Zeichen übrig"
|
|
55
|
+
title: Kommentar hinzufügen
|
|
56
|
+
comment:
|
|
57
|
+
alignment:
|
|
58
|
+
against: Gegen
|
|
59
|
+
in_favor: Zugunsten
|
|
60
|
+
confirm_destroy: Sidd Dir sécher datt Dir dës Bemierkung läsche wëllt?
|
|
61
|
+
delete: Läschen
|
|
62
|
+
deleted_at: Kommentar gelöscht am %{date}
|
|
63
|
+
deleted_user: Gelöschter Benutzer
|
|
64
|
+
edit: Bearbeiten
|
|
65
|
+
edited: Bearbeitet
|
|
66
|
+
hide_replies: Antworten verbergen
|
|
67
|
+
reply: Antworten
|
|
68
|
+
report:
|
|
69
|
+
action: Melden
|
|
70
|
+
already_reported: Dieser Inhalt wurde bereits gemeldet und wird von einem Administrator überprüft.
|
|
71
|
+
close: Schließen
|
|
72
|
+
description: Ist dieser Inhalt unangemessen?
|
|
73
|
+
details: Zusätzliche Kommentare
|
|
74
|
+
reasons:
|
|
75
|
+
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.
|
|
76
|
+
offensive: Enthält Rassismus, Sexismus, Verleumdungen, persönliche Angriffe, Morddrohungen, Selbstmordanträge oder jegliche Form von Hassreden.
|
|
77
|
+
spam: Enthält Clickbait, Werbung, Scams oder Script Bots.
|
|
78
|
+
title: Ungeeigneten Inhalt melden
|
|
79
|
+
show_replies: '%{replies_count} Antworten anzeigen'
|
|
80
|
+
single_comment_link_title: Link ufroen
|
|
81
|
+
comment_order_selector:
|
|
82
|
+
order:
|
|
83
|
+
best_rated: Am besten bewertet
|
|
84
|
+
most_discussed: Meist diskutiert
|
|
85
|
+
older: Chronologisch
|
|
86
|
+
recent: Kürzlich hinzugefügt
|
|
87
|
+
title: 'Sortieren nach:'
|
|
88
|
+
comment_thread:
|
|
89
|
+
title: Konversation mit %{authorName}
|
|
90
|
+
comments:
|
|
91
|
+
blocked_comments_for_unauthorized_user_warning: Sie müssen aktuell verifiziert sein um zu kommentieren, aber Sie können die bisherigen Kommentare lesen.
|
|
92
|
+
blocked_comments_for_user_warning: Sie können momentan nichts kommentieren, aber Sie können die vorherigen lesen.
|
|
93
|
+
blocked_comments_warning: Kommentare sind zu diesem Zeitpunkt deaktiviert, aber Sie können die vorherigen lesen.
|
|
94
|
+
comment_details_title: Kommentarinformationen
|
|
95
|
+
loading: Kommentare werden geladen ...
|
|
96
|
+
single_comment_warning: Sie können die restlichen Kommentare <a href="%{url}">hier</a> prüfen.
|
|
97
|
+
single_comment_warning_title: Ihnen wird ein einzelner Kommentar angezeigt
|
|
98
|
+
title:
|
|
99
|
+
one: "%{count} Kommentar"
|
|
100
|
+
other: "%{count} Kommentare"
|
|
101
|
+
down_vote_button:
|
|
102
|
+
text: Ich bin mit diesem Kommentar nicht einverstanden
|
|
103
|
+
edit_comment_modal_form:
|
|
104
|
+
close: Schließen
|
|
105
|
+
form:
|
|
106
|
+
body:
|
|
107
|
+
label: Kommentar
|
|
108
|
+
placeholder: Was denken Sie darüber?
|
|
109
|
+
submit: Senden
|
|
110
|
+
title: Bearbeiten Sie Ihren Kommentar
|
|
111
|
+
up_vote_button:
|
|
112
|
+
text: Ich stimme diesem Kommentar zu
|
|
113
|
+
events:
|
|
114
|
+
comments:
|
|
115
|
+
comment_by_followed_user:
|
|
116
|
+
email_intro: "%{author_name} hat einen Kommentar zu %{resource_title} hinterlassen. Sie können diesen auf dieser Seite lesen:"
|
|
117
|
+
email_outro: Sie haben diese Benachrichtigung erhalten, weil Sie %{author_name} folgen. Falls Sie keine solchen Benachrichtigungen mehr erhalten möchten, besuchen Sie die Profil-Seite dieses Benutzers.
|
|
118
|
+
email_subject: Neuer Kommentar von %{author_name} zu %{resource_title}
|
|
119
|
+
notification_title: Es gibt einen neuen Kommentar von <a href="%{author_path}">%{author_name} %{author_nickname}</a> zu <a href="%{resource_path}">%{resource_title}</a>.
|
|
120
|
+
comment_by_followed_user_group:
|
|
121
|
+
email_intro: 'Die Gruppe %{author_name} hat einen Kommentar in %{resource_title} hinterlassen. Sie können diesen auf dieser Seite lesen:'
|
|
122
|
+
email_outro: Sie haben diese Benachrichtigung erhalten, weil Sie %{author_name} folgen. Falls Sie keine solchen Benachrichtigungen mehr erhalten möchten, besuchen Sie die Profil-Seite dieser Gruppe.
|
|
123
|
+
email_subject: Neuer Kommentar von %{author_name} zu %{resource_title}
|
|
124
|
+
notification_title: Es gibt einen neuen Kommentar von <a href="%{author_path}">%{author_name} %{author_nickname}</a> zu <a href="%{resource_path}">%{resource_title}</a>.
|
|
125
|
+
comment_created:
|
|
126
|
+
email_intro: "%{resource_title} wurde kommentiert. Sie können den Kommentar auf dieser Seite lesen:"
|
|
127
|
+
email_outro: Sie haben diese Benachrichtigung erhalten, weil Sie "%{resource_title}" oder seinem Autor folgen. Falls Sie keine solchen Benachrichtigungen mehr erhalten möchten, besuchen Sie den obigen Link.
|
|
128
|
+
email_subject: Neuer Kommentar von %{author_name} zu %{resource_title}
|
|
129
|
+
notification_title: Es gibt einen neuen Kommentar von <a href="%{author_path}">%{author_name} %{author_nickname}</a> zu <a href="%{resource_path}">%{resource_title}</a>
|
|
130
|
+
comment_downvoted:
|
|
131
|
+
email_intro: Ihr Kommentar in "%{resource_title}" wurde negativ bewertet. Er hat nun insgesamt %{upvotes} positive und %{downvotes} negative Stimmen.
|
|
132
|
+
email_outro: Sie haben diese Benachrichtigung erhalten, weil Sie der Autor des Vorschlags sind.
|
|
133
|
+
email_subject: Ihr Kommentar in "%{resource_title}" wurde negativ bewertet.
|
|
134
|
+
notification_title: Ihr <a href="%{resource_path}">Kommentar</a> in "%{resource_title}" wurde negativ bewertet. Er hat nun insgesamt %{upvotes} positive und %{downvotes} negative Stimmen.
|
|
135
|
+
comment_upvoted:
|
|
136
|
+
email_intro: Ihr Kommentar in "%{resource_title}" wurde positiv bewertet. Er hat nun insgesamt %{upvotes} positive und %{downvotes} negative Stimmen.
|
|
137
|
+
email_outro: Sie haben diese Benachrichtigung erhalten, weil Sie der Autor des Vorschlags sind.
|
|
138
|
+
email_subject: Ihr Kommentar in "%{resource_title}" wurde positiv bewertet.
|
|
139
|
+
notification_title: Ihr <a href="%{resource_path}">Kommentar</a> in "%{resource_title}" wurde positiv bewertet. Er hat nun insgesamt %{upvotes} positive und %{downvotes} negative Stimmen.
|
|
140
|
+
reply_created:
|
|
141
|
+
email_intro: "%{author_name} hat auf Ihren Kommentar zu %{resource_title} geantwortet. Sie können das auf dieser Seite lesen:"
|
|
142
|
+
email_outro: Sie haben diese Benachrichtigung erhalten, weil Ihr Kommentar beantwortet wurde.
|
|
143
|
+
email_subject: "%{author_name} hat auf Ihren Kommentar zu %{resource_title} geantwortet"
|
|
144
|
+
notification_title: <a href="%{author_path}">%{author_name} %{author_nickname}</a> hat auf Ihren Kommentar in <a href="%{resource_path}">%{resource_title}</a> geantwortet
|
|
145
|
+
user_group_mentioned:
|
|
146
|
+
email_intro: Eine Ihrer Gruppen wurde erwähnt
|
|
147
|
+
email_outro: Sie haben diese Benachrichtigung erhalten, weil Sie ein Mitglied der Gruppe %{group_name} sind, die in %{resource_title} erwähnt wurde.
|
|
148
|
+
email_subject: Sie wurden in %{resource_title} als Mitglied von %{group_name} erwähnt
|
|
149
|
+
notification_title: Sie wurden in <a href="%{resource_path}">%{resource_title}</a> von <a href="%{author_path}">%{author_name} %{author_nickname}</a> als ein Mitglied von <a href="%{group_path}">%{group_name} %{group_nickname}</a> erwähnt
|
|
150
|
+
user_mentioned:
|
|
151
|
+
email_intro: Sie wurden erwähnt
|
|
152
|
+
email_outro: Sie haben diese Benachrichtigung erhalten, weil Sie in %{resource_title} erwähnt wurden.
|
|
153
|
+
email_subject: Sie wurden in %{resource_title} erwähnt
|
|
154
|
+
notification_title: Sie wurden in <a href="%{resource_path}">%{resource_title}</a> von <a href="%{author_path}">%{author_name} %{author_nickname}</a> erwähnt
|
|
155
|
+
metrics:
|
|
156
|
+
comments:
|
|
157
|
+
description: Anzahl der von Benutzern generierten Kommentare
|
|
158
|
+
object: Bemerkungen
|
|
159
|
+
title: Bemerkungen
|
|
160
|
+
errors:
|
|
161
|
+
messages:
|
|
162
|
+
cannot_have_comments: kann keine Kommentare haben
|
data/config/locales/lb.yml
CHANGED
|
@@ -93,7 +93,6 @@ lb:
|
|
|
93
93
|
blocked_comments_warning: Kommentare sind zu diesem Zeitpunkt deaktiviert, aber Sie können die vorherigen lesen.
|
|
94
94
|
comment_details_title: Kommentarinformationen
|
|
95
95
|
loading: Kommentare werden geladen ...
|
|
96
|
-
single_comment_warning: Sie können die restlichen Kommentare <a href="%{url}">hier</a> prüfen.
|
|
97
96
|
single_comment_warning_title: Ihnen wird ein einzelner Kommentar angezeigt
|
|
98
97
|
title:
|
|
99
98
|
one: "%{count} Kommentar"
|
data/config/locales/lv.yml
CHANGED
|
@@ -71,7 +71,6 @@ lv:
|
|
|
71
71
|
blocked_comments_warning: Komentāri šobrīd ir atspējoti, bet jūs varat lasīt iepriekšējos komentārus.
|
|
72
72
|
comment_details_title: Komentāra informācija
|
|
73
73
|
loading: Notiek komentāru ielāde ...
|
|
74
|
-
single_comment_warning: Pārējos komentārus varat aplūkot <a href="%{url}">šeit</a>.
|
|
75
74
|
single_comment_warning_title: Jūs redzat vienu komentāru
|
|
76
75
|
events:
|
|
77
76
|
comments:
|
data/config/locales/nl.yml
CHANGED
|
@@ -16,6 +16,12 @@ nl:
|
|
|
16
16
|
other: Stemmen
|
|
17
17
|
decidim:
|
|
18
18
|
comments:
|
|
19
|
+
admin:
|
|
20
|
+
shared:
|
|
21
|
+
availability_fields:
|
|
22
|
+
enabled: Reacties ingeschakeld
|
|
23
|
+
end_time: Reacties ingeschakeld tot
|
|
24
|
+
start_time: Commentaren ingeschakeld vanaf
|
|
19
25
|
comments:
|
|
20
26
|
delete:
|
|
21
27
|
error: De reactie kon niet worden verwijderd.
|
|
@@ -90,7 +96,7 @@ nl:
|
|
|
90
96
|
blocked_comments_warning: Reacties zijn op dit moment uitgeschakeld, maar je kan de vorige berichten lezen.
|
|
91
97
|
comment_details_title: Reactieonderdelen
|
|
92
98
|
loading: Reacties laden...
|
|
93
|
-
single_comment_warning:
|
|
99
|
+
single_comment_warning: <a href="%{url}">Bekijk alle reacties</a>
|
|
94
100
|
single_comment_warning_title: Je ziet een enkele reactie
|
|
95
101
|
down_vote_button:
|
|
96
102
|
text: Ik ben het niet eens met deze reactie
|
data/config/locales/no.yml
CHANGED
|
@@ -71,7 +71,6 @@
|
|
|
71
71
|
blocked_comments_warning: Kommenterer er deaktivert på dette tidspunktet, men du kan lese de forrige.
|
|
72
72
|
comment_details_title: Kommenter detaljer
|
|
73
73
|
loading: Laster inn kommenterer ...
|
|
74
|
-
single_comment_warning: Du kan sjekke resten av kommentarene <a href="%{url}">her</a>.
|
|
75
74
|
single_comment_warning_title: Du ser en enkelt kommentar
|
|
76
75
|
down_vote_button:
|
|
77
76
|
text: Jeg er uenig med denne kommentaren
|
data/config/locales/pl.yml
CHANGED
|
@@ -97,7 +97,6 @@ pl:
|
|
|
97
97
|
blocked_comments_warning: Komentarze są w tej chwili wyłączone, ale możesz przeczytać poprzednie.
|
|
98
98
|
comment_details_title: Szczegóły komentarza
|
|
99
99
|
loading: Ładowanie komentarzy ...
|
|
100
|
-
single_comment_warning: Resztę komentarzy możesz sprawdzić <a href="%{url}">tutaj</a>.
|
|
101
100
|
single_comment_warning_title: Wyświetlasz teraz pojedynczy komentarz
|
|
102
101
|
title:
|
|
103
102
|
one: "%{count} komentarz"
|
data/config/locales/pt-BR.yml
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
pt:
|
|
1
|
+
pt-BR:
|
|
2
2
|
activemodel:
|
|
3
3
|
models:
|
|
4
4
|
decidim/comments/comment_by_followed_user_event: Comente
|
|
@@ -93,7 +93,6 @@ pt:
|
|
|
93
93
|
blocked_comments_warning: Os comentários estão desativados neste momento, mas você pode ler os anteriores.
|
|
94
94
|
comment_details_title: Detalhes do comentário
|
|
95
95
|
loading: Carregando comentários ...
|
|
96
|
-
single_comment_warning: Você pode verificar o resto dos comentários <a href="%{url}">aqui</a>.
|
|
97
96
|
single_comment_warning_title: Você está vendo um único comentário
|
|
98
97
|
title:
|
|
99
98
|
one: "%{count} comentário"
|
data/config/locales/pt.yml
CHANGED
|
@@ -16,6 +16,12 @@ pt:
|
|
|
16
16
|
other: Votos
|
|
17
17
|
decidim:
|
|
18
18
|
comments:
|
|
19
|
+
admin:
|
|
20
|
+
shared:
|
|
21
|
+
availability_fields:
|
|
22
|
+
enabled: Comentários activados
|
|
23
|
+
end_time: Comentários activados até
|
|
24
|
+
start_time: Comentários activados desde
|
|
19
25
|
comments:
|
|
20
26
|
create:
|
|
21
27
|
error: Ocorreu um problema ao criar o comentário
|
|
@@ -93,7 +99,7 @@ pt:
|
|
|
93
99
|
blocked_comments_warning: Os comentários estão desativados neste momento, mas pode ler os anteriores.
|
|
94
100
|
comment_details_title: Detalhes do comentário
|
|
95
101
|
loading: A carregar comentários ...
|
|
96
|
-
single_comment_warning:
|
|
102
|
+
single_comment_warning: <a href="%{url}">Ver todos os comentários</a>
|
|
97
103
|
single_comment_warning_title: Está a ver um único comentário
|
|
98
104
|
title:
|
|
99
105
|
one: "%{count} comentário"
|
data/config/locales/ro-RO.yml
CHANGED
|
@@ -18,6 +18,12 @@ ro:
|
|
|
18
18
|
other: Voturi
|
|
19
19
|
decidim:
|
|
20
20
|
comments:
|
|
21
|
+
admin:
|
|
22
|
+
shared:
|
|
23
|
+
availability_fields:
|
|
24
|
+
enabled: Comentarii activate
|
|
25
|
+
end_time: Comentarii activate până la
|
|
26
|
+
start_time: Comentarii activate de la
|
|
21
27
|
comments:
|
|
22
28
|
create:
|
|
23
29
|
error: A apărut o problemă la crearea comentariului.
|
|
@@ -95,7 +101,7 @@ ro:
|
|
|
95
101
|
blocked_comments_warning: Comentariile sunt dezactivate în acest moment, dar le poți citi pe cele anterioare.
|
|
96
102
|
comment_details_title: Detaliile comentariului
|
|
97
103
|
loading: Se încarcă comentariile...
|
|
98
|
-
single_comment_warning:
|
|
104
|
+
single_comment_warning: <a href="%{url}">Vezi toate comentariile</a>
|
|
99
105
|
single_comment_warning_title: Poți vedea un singur comentariu
|
|
100
106
|
title:
|
|
101
107
|
one: "%{count} comentariu"
|
data/config/locales/sk.yml
CHANGED
|
@@ -73,7 +73,6 @@ sk:
|
|
|
73
73
|
blocked_comments_warning: Komentáre nie sú v súčasnosti povolené, ale môžete si prečítať predchádzajúce komentáre.
|
|
74
74
|
comment_details_title: Podrobnosti komentára
|
|
75
75
|
loading: Nahrávanie komentárov...
|
|
76
|
-
single_comment_warning: Zvyšné komentáre zobrazíte <a href="%{url}">tu</a>.
|
|
77
76
|
single_comment_warning_title: Zobrazujete jeden komentár
|
|
78
77
|
events:
|
|
79
78
|
comments:
|
data/config/locales/sr-CS.yml
CHANGED
|
@@ -6,7 +6,6 @@ sr:
|
|
|
6
6
|
show_replies: Prikaži %{replies_count} odgovora
|
|
7
7
|
comments:
|
|
8
8
|
comment_details_title: Detalji o komentaru
|
|
9
|
-
single_comment_warning: Možete videti ostale komentare <a href="%{url}">ovde</a>.
|
|
10
9
|
single_comment_warning_title: Vidite samo jedan komentar
|
|
11
10
|
events:
|
|
12
11
|
comments:
|
data/config/locales/sv.yml
CHANGED
|
@@ -16,6 +16,12 @@ sv:
|
|
|
16
16
|
other: Röster
|
|
17
17
|
decidim:
|
|
18
18
|
comments:
|
|
19
|
+
admin:
|
|
20
|
+
shared:
|
|
21
|
+
availability_fields:
|
|
22
|
+
enabled: Kommentarer aktiverade
|
|
23
|
+
end_time: Kommentarer aktiverade till
|
|
24
|
+
start_time: Kommentarer aktiverade från och med
|
|
19
25
|
comments:
|
|
20
26
|
create:
|
|
21
27
|
error: Det gick inte att skapa kommentaren.
|
|
@@ -93,7 +99,7 @@ sv:
|
|
|
93
99
|
blocked_comments_warning: Kommentarer är inaktiverade just nu, men du kan läsa de föregående.
|
|
94
100
|
comment_details_title: Kommentarsdetaljer
|
|
95
101
|
loading: Laddar kommentarer...
|
|
96
|
-
single_comment_warning:
|
|
102
|
+
single_comment_warning: <a href="%{url}">Visa alla kommentarer</a>
|
|
97
103
|
single_comment_warning_title: Du visar en enda kommentar
|
|
98
104
|
title:
|
|
99
105
|
one: "%{count} kommentarer"
|
data/config/locales/tr-TR.yml
CHANGED
|
@@ -76,7 +76,6 @@ tr:
|
|
|
76
76
|
blocked_comments_warning: Yorumlar şu anda devre dışı, ancak öncekileri okuyabilirsiniz.
|
|
77
77
|
comment_details_title: Yorum ayrıntıları
|
|
78
78
|
loading: Yorumlar yükleniyor ...
|
|
79
|
-
single_comment_warning: Yorumların geri kalanını <a href="%{url}"> buradan </a> kontrol edebilirsiniz.
|
|
80
79
|
single_comment_warning_title: Tek bir yorum görüyorsunuz
|
|
81
80
|
title:
|
|
82
81
|
one: "%{count} yorum"
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
val:
|
data/config/locales/zh-CN.yml
CHANGED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require "active_support/concern"
|
|
4
|
+
|
|
5
|
+
module Decidim
|
|
6
|
+
module Comments
|
|
7
|
+
# Shared behaviour for commentable models with enabled, start_time and
|
|
8
|
+
# end_time attributes for comments.
|
|
9
|
+
module HasAvailabilityAttributes
|
|
10
|
+
extend ActiveSupport::Concern
|
|
11
|
+
|
|
12
|
+
included do
|
|
13
|
+
# Public: Whether the object has comments allowed based on availability
|
|
14
|
+
# attributes
|
|
15
|
+
def comments_allowed?
|
|
16
|
+
(!comments_enabled.nil? && comments_enabled) &&
|
|
17
|
+
(comments_start_time.blank? || comments_start_time <= Time.current) &&
|
|
18
|
+
(comments_end_time.blank? || comments_end_time > Time.current)
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
end
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
shared_examples_for "has comments availability attributes" do
|
|
4
|
+
let(:comments_enabled) { nil }
|
|
5
|
+
let(:comments_start_time) { nil }
|
|
6
|
+
let(:comments_end_time) { nil }
|
|
7
|
+
let(:updates) do
|
|
8
|
+
{ comments_enabled: comments_enabled }.merge(
|
|
9
|
+
if subject.is_a?(Decidim::Debates::Debate)
|
|
10
|
+
{ start_time: comments_start_time, end_time: comments_end_time }
|
|
11
|
+
else
|
|
12
|
+
{ comments_start_time: comments_start_time, comments_end_time: comments_end_time }
|
|
13
|
+
end
|
|
14
|
+
)
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
describe "#comments_allowed?" do
|
|
18
|
+
before do
|
|
19
|
+
subject.update(updates)
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
context "when all attributes are blank" do
|
|
23
|
+
it { expect(subject.comments_allowed?).to be false }
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
context "when comments_enabled is false" do
|
|
27
|
+
let(:comments_enabled) { false }
|
|
28
|
+
|
|
29
|
+
context "and start time is in the past and end time in the future" do
|
|
30
|
+
let(:comments_start_time) { 1.day.ago }
|
|
31
|
+
let(:comments_end_time) { 2.days.from_now }
|
|
32
|
+
|
|
33
|
+
it { expect(subject.comments_allowed?).to be false }
|
|
34
|
+
end
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
context "when comments_enabled is true" do
|
|
38
|
+
let(:comments_enabled) { true }
|
|
39
|
+
|
|
40
|
+
context "and start and end time are blank" do
|
|
41
|
+
it { expect(subject.comments_allowed?).to be true }
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
context "and start time is present and in the past" do
|
|
45
|
+
let(:comments_start_time) { 1.day.ago }
|
|
46
|
+
|
|
47
|
+
it { expect(subject.comments_allowed?).to be true }
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
context "and start time is present and in the future" do
|
|
51
|
+
let(:comments_start_time) { 1.day.from_now }
|
|
52
|
+
|
|
53
|
+
it { expect(subject.comments_allowed?).to be false }
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
context "and end time is present and in the future" do
|
|
57
|
+
let(:comments_end_time) { 2.days.from_now }
|
|
58
|
+
|
|
59
|
+
it { expect(subject.comments_allowed?).to be true }
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
context "and end time is present and in the past" do
|
|
63
|
+
let(:comments_end_time) { 1.day.ago }
|
|
64
|
+
|
|
65
|
+
it { expect(subject.comments_allowed?).to be false }
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
context "and start time is in the past and end time in the future" do
|
|
69
|
+
let(:comments_start_time) { 1.day.ago }
|
|
70
|
+
let(:comments_end_time) { 2.days.from_now }
|
|
71
|
+
|
|
72
|
+
it { expect(subject.comments_allowed?).to be true }
|
|
73
|
+
end
|
|
74
|
+
end
|
|
75
|
+
end
|
|
76
|
+
end
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require "spec_helper"
|
|
4
|
+
|
|
5
|
+
shared_examples_for "a translated comment event" do
|
|
6
|
+
describe "translated notifications" do
|
|
7
|
+
let(:en_body) { "This is Sparta!" }
|
|
8
|
+
let(:body) { { "en": en_body, "machine_translations": { "ca": "C'est Sparta!" } } }
|
|
9
|
+
let(:participatory_process) { create :participatory_process, organization: organization }
|
|
10
|
+
let(:component) { create(:component, participatory_space: participatory_process) }
|
|
11
|
+
let(:commentable) { create(:dummy_resource, component: component) }
|
|
12
|
+
let(:comment) { create :comment, body: body, commentable: commentable }
|
|
13
|
+
let(:en_version) { "<div><p>#{comment.body["en"]}</p></div>" }
|
|
14
|
+
let(:machine_translated) { "<div><p>#{comment.body["machine_translations"]["ca"]}</p></div>" }
|
|
15
|
+
|
|
16
|
+
it_behaves_like "a translated event"
|
|
17
|
+
end
|
|
18
|
+
end
|
|
@@ -2,4 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
require "decidim/comments/test/shared_examples/create_comment_context"
|
|
4
4
|
require "decidim/comments/test/shared_examples/comment_event"
|
|
5
|
+
require "decidim/comments/test/shared_examples/translatable_comment"
|
|
5
6
|
require "decidim/comments/test/shared_examples/comment_voted_event"
|
|
7
|
+
require "decidim/comments/test/shared_examples/has_comments_availability_attributes"
|
data/lib/decidim/comments.rb
CHANGED
|
@@ -13,6 +13,7 @@ module Decidim
|
|
|
13
13
|
autoload :CommentsHelper, "decidim/comments/comments_helper"
|
|
14
14
|
autoload :Commentable, "decidim/comments/commentable"
|
|
15
15
|
autoload :CommentableWithComponent, "decidim/comments/commentable_with_component"
|
|
16
|
+
autoload :HasAvailabilityAttributes, "decidim/comments/has_availability_attributes"
|
|
16
17
|
autoload :CommentSerializer, "decidim/comments/comment_serializer"
|
|
17
18
|
autoload :CommentVoteSerializer, "decidim/comments/comment_vote_serializer"
|
|
18
19
|
autoload :Export, "decidim/comments/export"
|
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.
|
|
4
|
+
version: 0.26.0.rc1
|
|
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: 2022-01-24 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.
|
|
21
|
+
version: 0.26.0.rc1
|
|
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
|
+
version: 0.26.0.rc1
|
|
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.
|
|
55
|
+
version: 0.26.0.rc1
|
|
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.
|
|
62
|
+
version: 0.26.0.rc1
|
|
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.
|
|
69
|
+
version: 0.26.0.rc1
|
|
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.
|
|
76
|
+
version: 0.26.0.rc1
|
|
77
77
|
description: Pluggable comments system for some components.
|
|
78
78
|
email:
|
|
79
79
|
- josepjaume@gmail.com
|
|
@@ -148,6 +148,7 @@ files:
|
|
|
148
148
|
- app/scrubbers/decidim/comments/user_input_scrubber.rb
|
|
149
149
|
- app/services/decidim/comments/comment_creation.rb
|
|
150
150
|
- app/services/decidim/comments/new_comment_notification_creator.rb
|
|
151
|
+
- app/views/decidim/comments/admin/shared/_availability_fields.html.erb
|
|
151
152
|
- app/views/decidim/comments/comments/_comment.html.erb
|
|
152
153
|
- app/views/decidim/comments/comments/_comments.html.erb
|
|
153
154
|
- app/views/decidim/comments/comments/_delete.html.erb
|
|
@@ -229,6 +230,7 @@ files:
|
|
|
229
230
|
- config/locales/ti-ER.yml
|
|
230
231
|
- config/locales/tr-TR.yml
|
|
231
232
|
- config/locales/uk.yml
|
|
233
|
+
- config/locales/val-ES.yml
|
|
232
234
|
- config/locales/vi-VN.yml
|
|
233
235
|
- config/locales/vi.yml
|
|
234
236
|
- config/locales/zh-CN.yml
|
|
@@ -267,6 +269,7 @@ files:
|
|
|
267
269
|
- lib/decidim/comments/comments_helper.rb
|
|
268
270
|
- lib/decidim/comments/engine.rb
|
|
269
271
|
- lib/decidim/comments/export.rb
|
|
272
|
+
- lib/decidim/comments/has_availability_attributes.rb
|
|
270
273
|
- lib/decidim/comments/markdown.rb
|
|
271
274
|
- lib/decidim/comments/mutation_extensions.rb
|
|
272
275
|
- lib/decidim/comments/query_extensions.rb
|
|
@@ -275,6 +278,8 @@ files:
|
|
|
275
278
|
- lib/decidim/comments/test/shared_examples/comment_event.rb
|
|
276
279
|
- lib/decidim/comments/test/shared_examples/comment_voted_event.rb
|
|
277
280
|
- lib/decidim/comments/test/shared_examples/create_comment_context.rb
|
|
281
|
+
- lib/decidim/comments/test/shared_examples/has_comments_availability_attributes.rb
|
|
282
|
+
- lib/decidim/comments/test/shared_examples/translatable_comment.rb
|
|
278
283
|
- lib/decidim/comments/version.rb
|
|
279
284
|
- lib/tasks/decidim_comments.rake
|
|
280
285
|
homepage: https://github.com/decidim/decidim
|
|
@@ -292,11 +297,11 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
292
297
|
version: '2.7'
|
|
293
298
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
294
299
|
requirements:
|
|
295
|
-
- - "
|
|
300
|
+
- - ">"
|
|
296
301
|
- !ruby/object:Gem::Version
|
|
297
|
-
version:
|
|
302
|
+
version: 1.3.1
|
|
298
303
|
requirements: []
|
|
299
|
-
rubygems_version: 3.1.
|
|
304
|
+
rubygems_version: 3.1.6
|
|
300
305
|
signing_key:
|
|
301
306
|
specification_version: 4
|
|
302
307
|
summary: Decidim comments module
|