decidim-comments 0.26.1 → 0.26.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 544b42507ac1c9af18e8c4d27773b626d5f7730fdcdfd8915d1d10908aa7e144
4
- data.tar.gz: f6df72a1c91e7abae34050a002dce9a00bb405e3db9b9ae4c35e7a6aa42786eb
3
+ metadata.gz: f449f8ff515ba627b30631ba707ce7269ccd13e7535ec9025cb5216e6adb4eb1
4
+ data.tar.gz: 50bf6b4217c3de8a34df821b97b590c42a8e42a2fd133caeda6f7865ad2c0d5c
5
5
  SHA512:
6
- metadata.gz: 84555f2d8fb3c8cb4454fff5d29dff6c2968743db1f995cdd12e9e74ea8658fe865e93e1d94b021ad8a9721deb3d5bd81c6a5d38aec2602d09cf8fbcfa63f37b
7
- data.tar.gz: f868fcf2a600b51870c1daa659f6a0f9a637ad4898d5e78b3c9f36fb7cb6c142ac4030696dc00d35babbe0ed409f33b4e008218f2aa11aaf67d1e4593f791ccc
6
+ metadata.gz: e3b12c153436bd614bc1175a8d542d18c50ebf46240b88d2ef1791d85c4e45daf16e59d7b219d2904469264d18002d26fb2bfcd598cc8826e569e44a6df76144
7
+ data.tar.gz: 94e537252c62d78c8725023753b40acdc664c962555b0da57ecb76c5b1fe01a62f770ea79364792ed7319bfb239332f84532e6237f1e27ad4ca091484158f85e
@@ -6,7 +6,9 @@ module Decidim
6
6
  #
7
7
  class CommentsController < Decidim::Comments::ApplicationController
8
8
  include Decidim::ResourceHelper
9
+ include Decidim::SkipTimeoutable
9
10
 
11
+ prepend_before_action :skip_timeout, only: :index
10
12
  before_action :authenticate_user!, only: [:create]
11
13
  before_action :set_commentable, except: [:destroy, :update]
12
14
  before_action :ensure_commentable!, except: [:destroy, :update]
@@ -200,17 +200,17 @@ export default class CommentsComponent {
200
200
  this._stopPolling();
201
201
 
202
202
  this.pollTimeout = setTimeout(() => {
203
- $.ajax({
203
+ Rails.ajax({
204
204
  url: this.commentsUrl,
205
- method: "GET",
206
- contentType: "application/javascript",
207
- data: {
205
+ type: "GET",
206
+ data: new URLSearchParams({
208
207
  "commentable_gid": this.commentableGid,
209
208
  "root_depth": this.rootDepth,
210
- order: this.order,
211
- after: this.lastCommentId
212
- }
213
- }).done(() => this._pollComments());
209
+ "order": this.order,
210
+ "after": this.lastCommentId
211
+ }),
212
+ success: this._pollComments()
213
+ })
214
214
  }, this.pollingInterval);
215
215
  }
216
216
 
@@ -81,6 +81,8 @@ ar:
81
81
  comment_details_title: تفاصيل التعليق
82
82
  loading: جارٍ تحميل التعليقات ...
83
83
  single_comment_warning_title: إنك ترى تعليقا واحدا
84
+ edit_comment_modal_form:
85
+ close: أغلق
84
86
  events:
85
87
  comments:
86
88
  comment_by_followed_user:
@@ -3,6 +3,7 @@ ca:
3
3
  models:
4
4
  decidim/comments/comment_by_followed_user_event: Comentari
5
5
  decidim/comments/comment_created_event: Comentari
6
+ decidim/comments/comment_upvoted_event: Comentari valorat positivament
6
7
  decidim/comments/reply_created_event: Resposta al comentari
7
8
  decidim/comments/user_group_mentioned_event: Mencionar
8
9
  decidim/comments/user_mentioned_event: Mencionar
@@ -3,6 +3,7 @@ cs:
3
3
  models:
4
4
  decidim/comments/comment_by_followed_user_event: Komentář
5
5
  decidim/comments/comment_created_event: Komentář
6
+ decidim/comments/comment_upvoted_event: Komentář podpořen výše
6
7
  decidim/comments/reply_created_event: Odpověď na komentář
7
8
  decidim/comments/user_group_mentioned_event: Zmínka
8
9
  decidim/comments/user_mentioned_event: Zmínka
@@ -3,6 +3,7 @@ de:
3
3
  models:
4
4
  decidim/comments/comment_by_followed_user_event: Kommentar
5
5
  decidim/comments/comment_created_event: Kommentar
6
+ decidim/comments/comment_upvoted_event: Kommentar positiv bewertet
6
7
  decidim/comments/reply_created_event: Kommentarantwort
7
8
  decidim/comments/user_group_mentioned_event: Erwähnen
8
9
  decidim/comments/user_mentioned_event: Erwähnen
@@ -4,6 +4,7 @@ en:
4
4
  models:
5
5
  decidim/comments/comment_by_followed_user_event: Comment
6
6
  decidim/comments/comment_created_event: Comment
7
+ decidim/comments/comment_upvoted_event: Comment upvoted
7
8
  decidim/comments/reply_created_event: Comment reply
8
9
  decidim/comments/user_group_mentioned_event: Mention
9
10
  decidim/comments/user_mentioned_event: Mention
@@ -3,6 +3,7 @@ es-MX:
3
3
  models:
4
4
  decidim/comments/comment_by_followed_user_event: Comentario
5
5
  decidim/comments/comment_created_event: Comentario
6
+ decidim/comments/comment_upvoted_event: Comentario valorado positivamente
6
7
  decidim/comments/reply_created_event: Respuesta al comentario
7
8
  decidim/comments/user_group_mentioned_event: Mencionar
8
9
  decidim/comments/user_mentioned_event: Mencionar
@@ -3,6 +3,7 @@ es-PY:
3
3
  models:
4
4
  decidim/comments/comment_by_followed_user_event: Comentario
5
5
  decidim/comments/comment_created_event: Comentario
6
+ decidim/comments/comment_upvoted_event: Comentario valorado positivamente
6
7
  decidim/comments/reply_created_event: Respuesta al comentario
7
8
  decidim/comments/user_group_mentioned_event: Mencionar
8
9
  decidim/comments/user_mentioned_event: Mencionar
@@ -3,6 +3,7 @@ es:
3
3
  models:
4
4
  decidim/comments/comment_by_followed_user_event: Comentario
5
5
  decidim/comments/comment_created_event: Comentario
6
+ decidim/comments/comment_upvoted_event: Comentario valorado positivamente
6
7
  decidim/comments/reply_created_event: Respuesta al comentario
7
8
  decidim/comments/user_group_mentioned_event: Mencionar
8
9
  decidim/comments/user_mentioned_event: Mencionar
@@ -3,6 +3,7 @@ fi-pl:
3
3
  models:
4
4
  decidim/comments/comment_by_followed_user_event: Kommentti
5
5
  decidim/comments/comment_created_event: Kommentti
6
+ decidim/comments/comment_upvoted_event: Kommenttia äänestettiin
6
7
  decidim/comments/reply_created_event: Vastaus kommentiin
7
8
  decidim/comments/user_group_mentioned_event: Maininta
8
9
  decidim/comments/user_mentioned_event: Maininta
@@ -3,6 +3,7 @@ fi:
3
3
  models:
4
4
  decidim/comments/comment_by_followed_user_event: Kommentti
5
5
  decidim/comments/comment_created_event: Kommentti
6
+ decidim/comments/comment_upvoted_event: Kommenttia äänestettiin
6
7
  decidim/comments/reply_created_event: Vastaus kommentiin
7
8
  decidim/comments/user_group_mentioned_event: Maininta
8
9
  decidim/comments/user_mentioned_event: Maininta
@@ -3,6 +3,7 @@ fr-CA:
3
3
  models:
4
4
  decidim/comments/comment_by_followed_user_event: Commentaire
5
5
  decidim/comments/comment_created_event: Commentaire
6
+ decidim/comments/comment_upvoted_event: Vote favorable
6
7
  decidim/comments/reply_created_event: Réponse à un commentaire
7
8
  decidim/comments/user_group_mentioned_event: Mention
8
9
  decidim/comments/user_mentioned_event: Mention
@@ -3,6 +3,7 @@ fr:
3
3
  models:
4
4
  decidim/comments/comment_by_followed_user_event: Commentaire
5
5
  decidim/comments/comment_created_event: Commentaire
6
+ decidim/comments/comment_upvoted_event: Vote favorable
6
7
  decidim/comments/reply_created_event: Réponse à un commentaire
7
8
  decidim/comments/user_group_mentioned_event: Mention
8
9
  decidim/comments/user_mentioned_event: Mention
@@ -121,32 +122,32 @@ fr:
121
122
  comments:
122
123
  comment_by_followed_user:
123
124
  email_intro: "%{author_name} a laissé un commentaire dans %{resource_title}. Vous pouvez le lire sur la page suivante :"
124
- email_outro: Vous avez reçu cette notification, car vous suivez %{author_name}. Vous pouvez vous désabonner de cet utilisateur depuis sa page de profil.
125
+ email_outro: Vous avez reçu cette notification, car vous suivez %{author_name}. Vous pouvez vous désabonner de cet utilisateur depuis sa page de profil, ou bien vous rendre dans l'onglet “Mon compte” > “Paramètres des notifications”.
125
126
  email_subject: Un nouveau commentaire vient d'être déposé par %{author_name} dans %{resource_title}
126
127
  notification_title: Un nouveau commentaire a été publié par <a href="%{author_path}">%{author_name} %{author_nickname}</a> dans <a href="%{resource_path}">%{resource_title}</a>.
127
128
  comment_by_followed_user_group:
128
129
  email_intro: '%{author_name} a laissé un commentaire dans %{resource_title}. Vous pouvez le lire sur la page suivante :'
129
- email_outro: Vous avez reçu cette notification, car vous suivez %{author_name}. Vous pouvez vous désabonner de cet utilisateur depuis sa page de profil.
130
+ email_outro: Vous avez reçu cette notification, car vous suivez %{author_name}. Vous pouvez vous désabonner de ce groupe utilisateur depuis sa page de profil, ou bien vous rendre dans l'onglet “Mon compte” > “Paramètres des notifications”.
130
131
  email_subject: Un nouveau commentaire vient d'être déposé par %{author_name} dans %{resource_title}
131
132
  notification_title: Un nouveau commentaire a été publié par <a href="%{author_path}">%{author_name} %{author_nickname}</a> dans <a href="%{resource_path}">%{resource_title}</a>.
132
133
  comment_created:
133
134
  email_intro: "%{resource_title} a été commenté. Vous pouvez lire le commentaire sur cette page :"
134
- email_outro: Vous venez de recevoir cette notification parce que vous suivez "%{resource_title}" ou son auteur. Vous pouvez vous désabonner à partir du lien précédant.
135
+ email_outro: Vous venez de recevoir cette notification parce que vous suivez "%{resource_title}" ou son auteur. Si vous souhaitez vous désabonner des notifications, connectez-vous à la plateforme, puis rendez-vous dans l'onglet “Mon compte” > “Paramètres des notifications”.
135
136
  email_subject: Un nouveau commentaire vient d'être publié par %{author_name} dans %{resource_title}
136
137
  notification_title: Un nouveau commentaire de <a href="%{author_path}">%{author_name} %{author_nickname}</a> vient d'être publié dans <a href="%{resource_path}">%{resource_title}</a>
137
138
  comment_downvoted:
138
139
  email_intro: Votre commentaire sur "%{resource_title}" a reçu un vote défavorable. Il a maintenant un total de %{upvotes} votes positifs et %{downvotes} votes négatifs.
139
- email_outro: Vous avez reçu cette notification parce que vous êtes l'auteur de ce commentaire.
140
+ email_outro: Vous avez reçu cette notification parce que vous êtes l'auteur de ce commentaire. Si vous souhaitez vous désabonner des notifications, connectez-vous à la plateforme, puis rendez-vous dans l'onglet “Mon compte” > “Paramètres des notifications”.
140
141
  email_subject: Votre commentaire sur "%{resource_title}" a reçu un vote défavorable.
141
142
  notification_title: Votre <a href="%{resource_path}">commentaire</a> sur "%{resource_title}" a reçu un vote défavorable. Il a maintenant un total de %{upvotes} votes positifs et de %{downvotes} votes négatifs.
142
143
  comment_upvoted:
143
144
  email_intro: Votre commentaire dans "%{resource_title}" a reçu un vote favorable. Il a maintenant un total de %{upvotes} votes positifs et %{downvotes} votes négatifs.
144
- email_outro: Vous avez reçu cette notification parce que vous êtes l'auteur de ce commentaire.
145
+ email_outro: Vous avez reçu cette notification parce que vous êtes l'auteur de ce commentaire. Si vous souhaitez vous désabonner des notifications, connectez-vous à la plateforme, puis rendez-vous dans l'onglet “Mon compte” > “Paramètres des notifications”.
145
146
  email_subject: Votre commentaire sur "%{resource_title}" a reçu un vote favorable.
146
147
  notification_title: Votre <a href="%{resource_path}">commentaire</a> sur "%{resource_title}" a reçu un vote favorable. Il a maintenant un total de %{upvotes} votes positifs et de %{downvotes} votes négatifs.
147
148
  reply_created:
148
149
  email_intro: "%{author_name} a répondu à votre commentaire dans %{resource_title}. Vous pouvez le lire depuis la page suivante :"
149
- email_outro: Vous venez de recevoir une notification à votre commentaire.
150
+ email_outro: Vous avez reçu cette notification parce que votre commentaire a reçu une réponse. Si vous souhaitez vous désabonner des notifications, connectez-vous à la plateforme, puis rendez-vous dans l'onglet “Mon compte” > “Paramètres des notifications”.
150
151
  email_subject: "%{author_name} a répondu à votre commentaire dans %{resource_title}"
151
152
  notification_title: <a href="%{author_path}">%{author_name} %{author_nickname}</a> a réagi à votre commentaire sur <a href="%{resource_path}">%{resource_title}</a>
152
153
  user_group_mentioned:
@@ -156,7 +157,7 @@ fr:
156
157
  notification_title: Vous avez été mentionné dans <a href="%{resource_path}">%{resource_title}</a> par <a href="%{author_path}">%{author_name} %{author_nickname}</a> en tant que membre de <a href="%{group_path}">%{group_name} %{group_nickname}</a>
157
158
  user_mentioned:
158
159
  email_intro: Vous avez été mentionné
159
- email_outro: Vous avez reçu cette notification parce que vous avez été mentionné dans %{resource_title}.
160
+ email_outro: Vous avez reçu cette notification parce que vous avez été mentionné dans %{resource_title}. Si vous souhaitez vous désabonner des notifications, connectez-vous à la plateforme, puis rendez-vous dans l'onglet “Mon compte” > “Paramètres des notifications”.
160
161
  email_subject: Vous avez été mentionné dans %{resource_title}
161
162
  notification_title: Vous avez été mentionné dans <a href="%{resource_path}">%{resource_title}</a> par <a href="%{author_path}">%{author_name} %{author_nickname}</a>
162
163
  metrics:
@@ -3,6 +3,7 @@ ja:
3
3
  models:
4
4
  decidim/comments/comment_by_followed_user_event: コメント
5
5
  decidim/comments/comment_created_event: コメント
6
+ decidim/comments/comment_upvoted_event: 賛成票のあったコメント
6
7
  decidim/comments/reply_created_event: コメント返信
7
8
  decidim/comments/user_group_mentioned_event: メンション
8
9
  decidim/comments/user_mentioned_event: メンション
@@ -19,6 +19,11 @@ FactoryBot.define do
19
19
  comment.body = Decidim::ContentProcessor.parse_with_processor(:hashtag, comment.body, current_organization: comment.root_commentable.organization).rewrite
20
20
  end
21
21
 
22
+ trait :deleted do
23
+ created_at { 1.day.ago }
24
+ deleted_at { 1.hour.ago }
25
+ end
26
+
22
27
  trait :comment_on_comment do
23
28
  author { build(:user, organization: root_commentable.organization) }
24
29
  commentable do
@@ -4,7 +4,7 @@ module Decidim
4
4
  # This holds the decidim-comments version.
5
5
  module Comments
6
6
  def self.version
7
- "0.26.1"
7
+ "0.26.2"
8
8
  end
9
9
  end
10
10
  end
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.26.1
4
+ version: 0.26.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Josep Jaume Rey Peroy
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2022-03-25 00:00:00.000000000 Z
13
+ date: 2022-06-14 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.26.1
21
+ version: 0.26.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.26.1
28
+ version: 0.26.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.26.1
55
+ version: 0.26.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.26.1
62
+ version: 0.26.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.26.1
69
+ version: 0.26.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.26.1
76
+ version: 0.26.2
77
77
  description: Pluggable comments system for some components.
78
78
  email:
79
79
  - josepjaume@gmail.com