decidim-comments 0.26.3 → 0.26.4
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/models/decidim/comments/comment.rb +6 -2
- data/config/locales/gn-PY.yml +1 -0
- data/config/locales/lo-LA.yml +1 -0
- data/config/locales/ro-RO.yml +2 -0
- data/lib/decidim/comments/markdown.rb +12 -0
- data/lib/decidim/comments/version.rb +1 -1
- metadata +10 -8
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: f0afed8636ad281b3e5cb440eb37b2080d40cb4386a9561125d209887feadba1
|
|
4
|
+
data.tar.gz: 6fb8da27ed3e66447361539cdafa40123e2835152d450f5fc5602ea35b5a29d7
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 3de3452f8cbaa4b35f624a9ea896a0a3d9c7a0788eadd77e7c7e053c37b3947f586b456dfef2c7bda7785eb395b7fe9233d919b9873e0523c6ae101b3ba91581
|
|
7
|
+
data.tar.gz: 5498dd2599639550040190fe261fec3e790a078be78deb46c699e77f60782bec7e3d366e57856ad3d8d7d374727a96eab8cc6454e618e5547fcfc3d82a6356f7
|
|
@@ -53,8 +53,6 @@ module Decidim
|
|
|
53
53
|
validate :body_length
|
|
54
54
|
validate :commentable_can_have_comments
|
|
55
55
|
|
|
56
|
-
delegate :organization, to: :commentable
|
|
57
|
-
|
|
58
56
|
scope :not_deleted, -> { where(deleted_at: nil) }
|
|
59
57
|
|
|
60
58
|
translatable_fields :body
|
|
@@ -78,6 +76,10 @@ module Decidim
|
|
|
78
76
|
where(alignment: -1)
|
|
79
77
|
end
|
|
80
78
|
|
|
79
|
+
def organization
|
|
80
|
+
commentable&.organization || participatory_space&.organization
|
|
81
|
+
end
|
|
82
|
+
|
|
81
83
|
def visible?
|
|
82
84
|
participatory_space.try(:visible?) && component.try(:published?)
|
|
83
85
|
end
|
|
@@ -128,6 +130,8 @@ module Decidim
|
|
|
128
130
|
|
|
129
131
|
# Public: Overrides the `reported_content_url` Reportable concern method.
|
|
130
132
|
def reported_content_url
|
|
133
|
+
return unless root_commentable
|
|
134
|
+
|
|
131
135
|
url_params = { anchor: "comment_#{id}" }
|
|
132
136
|
|
|
133
137
|
if root_commentable&.respond_to?(:polymorphic_resource_url)
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
gn:
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
lo:
|
data/config/locales/ro-RO.yml
CHANGED
|
@@ -3,6 +3,7 @@ ro:
|
|
|
3
3
|
models:
|
|
4
4
|
decidim/comments/comment_by_followed_user_event: Comentariu
|
|
5
5
|
decidim/comments/comment_created_event: Comentează
|
|
6
|
+
decidim/comments/comment_upvoted_event: Comentariu votat
|
|
6
7
|
decidim/comments/reply_created_event: Răspuns la comentariu
|
|
7
8
|
decidim/comments/user_group_mentioned_event: Menționează
|
|
8
9
|
decidim/comments/user_mentioned_event: Menționează
|
|
@@ -72,6 +73,7 @@ ro:
|
|
|
72
73
|
edit: Editează
|
|
73
74
|
edited: Editat
|
|
74
75
|
hide_replies: Ascunde răspunsurile
|
|
76
|
+
moderated_at: Comentariu moderat pe %{date}
|
|
75
77
|
reply: Răspunde
|
|
76
78
|
report:
|
|
77
79
|
action: Raportează
|
|
@@ -50,6 +50,18 @@ module Decidim
|
|
|
50
50
|
|
|
51
51
|
"<p>#{text}</p>"
|
|
52
52
|
end
|
|
53
|
+
|
|
54
|
+
# Prevents underscores to be replaced with <em> tags in comments, such as
|
|
55
|
+
# https://github.com/org/module_with_underscores or within words such as
|
|
56
|
+
# "Look for comment_maximum_length in the code". The `no_intra_emphasis`
|
|
57
|
+
# option for Redcarpet does not apparently work for this renderer.
|
|
58
|
+
#
|
|
59
|
+
# Related issues:
|
|
60
|
+
# https://github.com/vmg/redcarpet/issues/402
|
|
61
|
+
# https://github.com/vmg/redcarpet/issues/427
|
|
62
|
+
def emphasis(text)
|
|
63
|
+
"_#{text}_"
|
|
64
|
+
end
|
|
53
65
|
end
|
|
54
66
|
end
|
|
55
67
|
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.
|
|
4
|
+
version: 0.26.4
|
|
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-
|
|
13
|
+
date: 2022-11-15 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.
|
|
21
|
+
version: 0.26.4
|
|
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.
|
|
28
|
+
version: 0.26.4
|
|
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.
|
|
55
|
+
version: 0.26.4
|
|
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.
|
|
62
|
+
version: 0.26.4
|
|
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.
|
|
69
|
+
version: 0.26.4
|
|
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.
|
|
76
|
+
version: 0.26.4
|
|
77
77
|
description: Pluggable comments system for some components.
|
|
78
78
|
email:
|
|
79
79
|
- josepjaume@gmail.com
|
|
@@ -196,6 +196,7 @@ files:
|
|
|
196
196
|
- config/locales/fr.yml
|
|
197
197
|
- config/locales/ga-IE.yml
|
|
198
198
|
- config/locales/gl.yml
|
|
199
|
+
- config/locales/gn-PY.yml
|
|
199
200
|
- config/locales/hr-HR.yml
|
|
200
201
|
- config/locales/hr.yml
|
|
201
202
|
- config/locales/hu.yml
|
|
@@ -208,6 +209,7 @@ files:
|
|
|
208
209
|
- config/locales/ko.yml
|
|
209
210
|
- config/locales/lb-LU.yml
|
|
210
211
|
- config/locales/lb.yml
|
|
212
|
+
- config/locales/lo-LA.yml
|
|
211
213
|
- config/locales/lt-LT.yml
|
|
212
214
|
- config/locales/lt.yml
|
|
213
215
|
- config/locales/lv.yml
|