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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e65e556105c975a512cf38512249fa956e3d3cf26c3e78b5cda7af52b98383e3
4
- data.tar.gz: 03d678132d3530bdbf4ee57633da83cfd245c31e6bac7b1a131baa5ca7466fb6
3
+ metadata.gz: f0afed8636ad281b3e5cb440eb37b2080d40cb4386a9561125d209887feadba1
4
+ data.tar.gz: 6fb8da27ed3e66447361539cdafa40123e2835152d450f5fc5602ea35b5a29d7
5
5
  SHA512:
6
- metadata.gz: 0e9b996fe98034ccf8c532c285b418e13fbd83ddb5be3e6f6000215d298138442c43f4e0461b47dbcb27bfad2e64cb63b330a08583baa915578e1d5908224120
7
- data.tar.gz: 62c58afe19b0d2afc75f1d0771cc5d484c250ea94e3dd242a8a6897f0f8dd0c92b654972311a0e58e12e2c2a75c9e267d40a7bb85c612eab964ee77ba37f85b3
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:
@@ -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
@@ -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.3"
7
+ "0.26.4"
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.3
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-09-29 00:00:00.000000000 Z
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.3
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.3
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.3
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.3
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.3
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.3
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