decidim-proposals 0.27.6 → 0.27.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (42) hide show
  1. checksums.yaml +4 -4
  2. data/app/helpers/decidim/proposals/application_helper.rb +1 -1
  3. data/app/presenters/decidim/proposals/admin_log/proposal_presenter.rb +1 -5
  4. data/app/presenters/decidim/proposals/admin_log/value_types/proposal_title_body_presenter.rb +1 -3
  5. data/app/presenters/decidim/proposals/log/valuation_assignment_presenter.rb +1 -1
  6. data/config/locales/ar.yml +1 -2
  7. data/config/locales/bg.yml +594 -1
  8. data/config/locales/ca.yml +8 -8
  9. data/config/locales/cs.yml +0 -1
  10. data/config/locales/de.yml +1 -1
  11. data/config/locales/el.yml +0 -1
  12. data/config/locales/es-MX.yml +2 -2
  13. data/config/locales/es-PY.yml +1 -1
  14. data/config/locales/es.yml +4 -4
  15. data/config/locales/eu.yml +1 -1
  16. data/config/locales/fr-CA.yml +1 -1
  17. data/config/locales/fr.yml +1 -1
  18. data/config/locales/ga-IE.yml +6 -0
  19. data/config/locales/gl.yml +1 -2
  20. data/config/locales/hu.yml +1 -2
  21. data/config/locales/id-ID.yml +0 -1
  22. data/config/locales/is-IS.yml +0 -2
  23. data/config/locales/it.yml +1 -2
  24. data/config/locales/lt.yml +0 -1
  25. data/config/locales/lv.yml +0 -1
  26. data/config/locales/nl.yml +1 -2
  27. data/config/locales/no.yml +0 -1
  28. data/config/locales/pl.yml +62 -1
  29. data/config/locales/pt-BR.yml +0 -1
  30. data/config/locales/pt.yml +0 -1
  31. data/config/locales/ru.yml +1 -2
  32. data/config/locales/sk.yml +0 -1
  33. data/config/locales/sv.yml +0 -1
  34. data/config/locales/tr-TR.yml +2 -2
  35. data/config/locales/uk.yml +1 -2
  36. data/config/locales/zh-CN.yml +0 -1
  37. data/config/locales/zh-TW.yml +0 -1
  38. data/lib/decidim/proposals/proposal_serializer.rb +51 -0
  39. data/lib/decidim/proposals/test/factories.rb +13 -1
  40. data/lib/decidim/proposals/version.rb +1 -1
  41. metadata +24 -25
  42. data/app/presenters/decidim/proposals/log/resource_presenter.rb +0 -22
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 85856f36076b1726e3bfe1f049f46968909f1acd6ded28784a020abe858dddbd
4
- data.tar.gz: 9329f0d81040190473850146061ebcf3778c669cec4b22a3d1778cc01b568b03
3
+ metadata.gz: 1e291f2f0b2cac7faf278350614fa4d8eea1f12c514787a1102bc34f033c6c20
4
+ data.tar.gz: 26de14643cc5d736985bd35684628cd38b21618d5bfc065fa789f282d9fff8f5
5
5
  SHA512:
6
- metadata.gz: 2aff02ae9dfbf6e0f0d87014e79344a4ec1e995af11a4d51196702506de9cdc2c356276a096a0b25fbe96060945d56cc56a6e1dc3e06803f490d7267b5b331cf
7
- data.tar.gz: 1dd27d121005ba63c91f56db70f540f265ef3a4579e0de837a5307f2acda20a54281d0c67621deb0e0465e9c87c20a2daf901f85a4fd7e2b92ef3ebcb56f674e
6
+ metadata.gz: c80f1d038c0c260680c3186cec61780b5d1cae0d66ed946014647b84cbb0ada6f8bf98cd478b65e78d1bf059495cf0fc66eeba76f80066025451d948f45d434b
7
+ data.tar.gz: 4187a7c435fda93c5212bdcb8e7feae60c826b72b0fd5be1bda96078f94c63c538f3371b6ef5a21c89771d51d8d728fa7bb3c872b2c9ed1968c298c7e237862c
@@ -151,7 +151,7 @@ module Decidim
151
151
  end
152
152
 
153
153
  def show_voting_rules?
154
- return false unless votes_enabled?
154
+ return false if !votes_enabled? || current_settings.votes_blocked?
155
155
 
156
156
  return true if vote_limit_enabled?
157
157
  return true if threshold_per_proposal_enabled?
@@ -15,13 +15,9 @@ module Decidim
15
15
  class ProposalPresenter < Decidim::Log::BasePresenter
16
16
  private
17
17
 
18
- def resource_presenter
19
- @resource_presenter ||= Decidim::Proposals::Log::ResourcePresenter.new(action_log.resource, h, action_log.extra["resource"])
20
- end
21
-
22
18
  def diff_fields_mapping
23
19
  {
24
- title: "Decidim::Proposals::AdminLog::ValueTypes::ProposalTitleBodyPresenter",
20
+ title: :i18n,
25
21
  body: "Decidim::Proposals::AdminLog::ValueTypes::ProposalTitleBodyPresenter",
26
22
  state: "Decidim::Proposals::AdminLog::ValueTypes::ProposalStatePresenter",
27
23
  answered_at: :date,
@@ -5,12 +5,10 @@ module Decidim
5
5
  module AdminLog
6
6
  module ValueTypes
7
7
  class ProposalTitleBodyPresenter < Decidim::Log::ValueTypes::DefaultPresenter
8
- include Decidim::TranslatableAttributes
9
-
10
8
  def present
11
9
  return unless value
12
10
 
13
- translated_value = translated_attribute(value)
11
+ translated_value = h.decidim_escape_translated(value)
14
12
  return if translated_value.blank?
15
13
 
16
14
  renderer = Decidim::ContentRenderers::HashtagRenderer.new(translated_value)
@@ -11,7 +11,7 @@ module Decidim
11
11
  # Returns an HTML-safe String.
12
12
  def present_resource_name
13
13
  if resource.present?
14
- Decidim::Proposals::ProposalPresenter.new(resource.proposal).title
14
+ resource.proposal.presenter.title(html_escape: true)
15
15
  else
16
16
  super
17
17
  end
@@ -191,7 +191,6 @@ ar:
191
191
  proposal_wizard_step_1_help_text: اقتراح الاقتراح "إنشاء" نص مساعدة الخطوة
192
192
  proposal_wizard_step_2_help_text: اقتراح الاقتراح "قارن" نص خطوة المساعدة
193
193
  proposal_wizard_step_3_help_text: نص اقتراح "إكمال" تعليمات نص المعالج
194
- proposal_wizard_step_4_help_text: اقتراح الاقتراح "نشر" نص تعليمات الخطوة
195
194
  resources_permissions_enabled: يمكن تعيين أذونات الإجراءات لكل اقتراح
196
195
  scope_id: نطاق
197
196
  scopes_enabled: النطاقات مفعلة
@@ -989,7 +988,7 @@ ar:
989
988
  step_1: إنشاء اقتراحك
990
989
  step_2: قارن
991
990
  step_3: إكمال
992
- step_4: انشر اقتراحك
991
+ step_4: نشر اقتراحك
993
992
  step_of: الخطوة %{current_step_num} من %{total_steps}
994
993
  title: خطوات إنشاء الاقتراحات
995
994
  proposals_picker: