decidim-proposals 0.23.3 → 0.23.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 407b694b48340b459b9487e1b7680f71c7f39fd120acb8f953253f0e6f6131b3
4
- data.tar.gz: b5af213b89c045c25c5c3e65958938f9ccd61b8dcc2b092a399c34de39290827
3
+ metadata.gz: 637cdd20a4aaaaa7cbba8c154c6d0dfb7f2dbbe955473cc62873925c3272741c
4
+ data.tar.gz: 48646382d74a0dd40410dd89b595ffafce42ff3099c6202fe023658bb930fc2d
5
5
  SHA512:
6
- metadata.gz: 0151a8ebc561f6c2b00f05315770f7dd18c80230a5562d8a7ac02d6d6efaaefea1eeb2f40cd335a17e7c1148753ad659050593ebd2db8d16900283096558995e
7
- data.tar.gz: 9c07d17862f60743fee23f7662bd7e5d9681c23e7674ba2ef6ce7fb61b035399c5ea58c132a82821702051ad1a7555798f878cb695f976a8ea69c22c00e99187
6
+ metadata.gz: '0779bca6ce193269caef33d769c9104a74564b0612e127130aad29d71a3f1d7c6683105b1ba82920f01cfe5f744bf9ea4910ed27a5104728ce2ceda78f3327d1'
7
+ data.tar.gz: 00b88574a67ceddb64df0610bf879b40d467536bacaad9f3df78c87be5044a7057f5c19e309efea9166afdb2a5876c78be806c85dc210bb652b1da6da9107aba
@@ -2,13 +2,21 @@
2
2
 
3
3
  module Decidim
4
4
  module Proposals
5
- # A cell to display when a proposal has been published.
5
+ # A cell to display when actions happen on a proposal.
6
6
  class ProposalActivityCell < ActivityCell
7
7
  def title
8
- I18n.t(
9
- "decidim.proposals.last_activity.new_proposal_at_html",
10
- link: participatory_space_link
11
- )
8
+ case action
9
+ when "update"
10
+ I18n.t(
11
+ "decidim.proposals.last_activity.proposal_updated_at_html",
12
+ link: participatory_space_link
13
+ )
14
+ else
15
+ I18n.t(
16
+ "decidim.proposals.last_activity.new_proposal_at_html",
17
+ link: participatory_space_link
18
+ )
19
+ end
12
20
  end
13
21
 
14
22
  def resource_link_text
@@ -18,7 +18,6 @@ module Decidim
18
18
  maximum: ->(record) { record.component.settings.proposal_length }
19
19
  }
20
20
 
21
- validate :proposal_length
22
21
  validate :body_is_not_bare_template
23
22
 
24
23
  alias component current_component
@@ -32,13 +31,6 @@ module Decidim
32
31
 
33
32
  private
34
33
 
35
- def proposal_length
36
- return unless body.presence
37
-
38
- length = current_component.settings.proposal_length
39
- errors.add(:body, :too_long, count: length) if body.length > length
40
- end
41
-
42
34
  def body_is_not_bare_template
43
35
  return if body_template.blank?
44
36
 
@@ -20,7 +20,8 @@ class ProposalLengthValidator < ActiveModel::EachValidator
20
20
  if min && min.positive? && value.length < min
21
21
  record.errors.add(
22
22
  attribute,
23
- options[:message] || :too_short
23
+ options[:message] || :too_short,
24
+ count: min
24
25
  )
25
26
  end
26
27
  end
@@ -31,7 +32,8 @@ class ProposalLengthValidator < ActiveModel::EachValidator
31
32
  if max && max.positive? && value.length > max
32
33
  record.errors.add(
33
34
  attribute,
34
- options[:message] || :too_long
35
+ options[:message] || :too_long,
36
+ count: max
35
37
  )
36
38
  end
37
39
  end
@@ -136,7 +136,7 @@ ca:
136
136
  participatory_texts_enabled: Texts participatius habilitats
137
137
  participatory_texts_enabled_readonly: No es pot interactuar amb aquesta configuració si hi ha propostes existents. Si us plau, crea un nou 'component de propostes' si vols habilitar aquesta característica o descarta totes les propostes importades al menú "textos participatius" si vols deshabilitar-lo.
138
138
  proposal_answering_enabled: Resposta a propostes habilitada
139
- proposal_edit_before_minutes: Les propostes poden ser editades per les autorrs abans que passin aquests minuts
139
+ proposal_edit_before_minutes: Les propostes poden ser editades per les autores abans que passin aquests minuts
140
140
  proposal_length: Longitud màxima del cos de la proposta
141
141
  proposal_limit: Límit de propostes per participant
142
142
  proposal_wizard_step_1_help_text: Text d'ajuda pel pas "Crear" de l'assistent de propostes
@@ -523,7 +523,7 @@ ca:
523
523
  create: "%{user_name} ha deixat una nota privada a la proposta %{resource_name} dins l'espai %{space_name}"
524
524
  valuation_assignment:
525
525
  create: "%{user_name} ha assignat la proposta %{resource_name} a una avaluadora"
526
- delete: "%{user_name} ha desfet l'assignació a una avaluadora de la proposta %{resource_name}"
526
+ delete: "%{user_name} ha desfet l'assignació a una avaluadora de la proposta %{proposal_title}"
527
527
  answers:
528
528
  accepted: Acceptades
529
529
  evaluating: En avaluació
@@ -678,6 +678,7 @@ ca:
678
678
  success: L'esborrany de proposta s'ha eliminat correctament.
679
679
  last_activity:
680
680
  new_proposal_at_html: "<span>Nova proposta a %{link}</span>"
681
+ proposal_updated_at_html: "<span>Proposta actualitzada a %{link}</span>"
681
682
  models:
682
683
  collaborative_draft:
683
684
  fields:
@@ -692,6 +692,7 @@ cs:
692
692
  success: Koncept návrhu byl úspěšně smazán.
693
693
  last_activity:
694
694
  new_proposal_at_html: "<span>Nový návrh na %{link}</span>"
695
+ proposal_updated_at_html: "<span>Návrh byl aktualizován na %{link}</span>"
695
696
  models:
696
697
  collaborative_draft:
697
698
  fields:
@@ -678,6 +678,7 @@ de:
678
678
  success: Der Vorschlagsentwurf wurde erfolgreich gelöscht.
679
679
  last_activity:
680
680
  new_proposal_at_html: "<span>Neuer Vorschlag bei %{link}</span>"
681
+ proposal_updated_at_html: "<span>Vorschlag aktualisiert unter %{link}</span>"
681
682
  models:
682
683
  collaborative_draft:
683
684
  fields:
@@ -679,6 +679,7 @@ en:
679
679
  success: Proposal draft was successfully deleted.
680
680
  last_activity:
681
681
  new_proposal_at_html: "<span>New proposal at %{link}</span>"
682
+ proposal_updated_at_html: "<span>Proposal updated at %{link}</span>"
682
683
  models:
683
684
  collaborative_draft:
684
685
  fields:
@@ -423,6 +423,7 @@ es-MX:
423
423
  form:
424
424
  attachment_legend: "(Opcional) Añadir un archivo adjunto"
425
425
  created_in_meeting: Esta propuesta procede de un encuentro
426
+ delete_attachment: Eliminar archivo adjunto
426
427
  select_a_category: Selecciona una categoría
427
428
  select_a_meeting: Selecciona un encuentro
428
429
  index:
@@ -423,6 +423,7 @@ es-PY:
423
423
  form:
424
424
  attachment_legend: "(Opcional) Añadir un archivo adjunto"
425
425
  created_in_meeting: Esta propuesta viene de una reunión.
426
+ delete_attachment: Eliminar archivo adjunto
426
427
  select_a_category: Seleccione una categoría
427
428
  select_a_meeting: Seleccione una reunion
428
429
  index:
@@ -423,6 +423,7 @@ es:
423
423
  form:
424
424
  attachment_legend: "(Opcional) Añadir un archivo adjunto"
425
425
  created_in_meeting: Esta propuesta procede de un encuentro
426
+ delete_attachment: Eliminar archivo adjunto
426
427
  select_a_category: Selecciona una categoría
427
428
  select_a_meeting: Selecciona un encuentro
428
429
  index:
@@ -678,6 +678,7 @@ fi-pl:
678
678
  success: Ehdotusluonnos poistettiin onnistuneesti.
679
679
  last_activity:
680
680
  new_proposal_at_html: "<span>Uusi ehdotus osoitteessa %{link}</span>"
681
+ proposal_updated_at_html: "<span>Ehdotus päivitetty osoitteessa %{link}</span>"
681
682
  models:
682
683
  collaborative_draft:
683
684
  fields:
@@ -678,6 +678,7 @@ fi:
678
678
  success: Ehdotusluonnoksen poistaminen onnistui.
679
679
  last_activity:
680
680
  new_proposal_at_html: "<span>Uusi ehdotus osoitteessa %{link}</span>"
681
+ proposal_updated_at_html: "<span>Ehdotus päivitetty osoitteessa %{link}</span>"
681
682
  models:
682
683
  collaborative_draft:
683
684
  fields:
@@ -678,6 +678,7 @@ fr-CA:
678
678
  success: Le brouillon de la proposition a bien été supprimé.
679
679
  last_activity:
680
680
  new_proposal_at_html: "<span>Nouvelle proposition à %{link}</span>"
681
+ proposal_updated_at_html: "<span>Débat mis à jour à %{link}</span>"
681
682
  models:
682
683
  collaborative_draft:
683
684
  fields:
@@ -678,6 +678,7 @@ fr:
678
678
  success: Le brouillon de la proposition a bien été supprimé.
679
679
  last_activity:
680
680
  new_proposal_at_html: "<span>Nouvelle proposition à %{link}</span>"
681
+ proposal_updated_at_html: "<span>Débat mis à jour à %{link}</span>"
681
682
  models:
682
683
  collaborative_draft:
683
684
  fields:
@@ -656,6 +656,7 @@ nl:
656
656
  success: Voorstel concept is succesvol verwijderd.
657
657
  last_activity:
658
658
  new_proposal_at_html: "<span>Nieuw voorstel op %{link}</span>"
659
+ proposal_updated_at_html: "<span>Voorstel bijgewerkt op %{link}</span>"
659
660
  models:
660
661
  collaborative_draft:
661
662
  fields:
@@ -411,7 +411,7 @@ pl:
411
411
  title: Odpowiedź na propozycję %{title}
412
412
  proposal_notes:
413
413
  create:
414
- error: Wystąpił problem podczas tworzenia tej notatki dotyczącej propozycji
414
+ error: Wystąpił błąd podczas tworzenia tej notatki dotyczącej propozycji
415
415
  success: Notatka dotycząca propozycji została utworzona
416
416
  form:
417
417
  note: Notatka
@@ -431,6 +431,7 @@ pl:
431
431
  form:
432
432
  attachment_legend: "(Opcjonalnie) Dodaj załącznik"
433
433
  created_in_meeting: Ta propozycja pochodzi ze spotkania
434
+ delete_attachment: Usuń załącznik
434
435
  select_a_category: Wybierz kategorię
435
436
  select_a_meeting: Wybierz spotkanie
436
437
  index:
@@ -613,7 +614,7 @@ pl:
613
614
  state: Status
614
615
  withdrawn: Wycofane
615
616
  filters_small_view:
616
- close_modal: Zamknij modalne
617
+ close_modal: Zamknij okno
617
618
  filter: Filtr
618
619
  filter_by: Filtruj według
619
620
  unfold: Rozwiń
@@ -738,8 +739,13 @@ pl:
738
739
  many: "%{count} propozycji"
739
740
  other: "%{count} propozycji"
740
741
  edit:
742
+ add_documents: Dokumenty
743
+ add_images: Plik
741
744
  attachment_legend: "(Opcjonalnie) Dodaj załącznik"
742
745
  back: Wróć
746
+ delete_document: Usuń dokument
747
+ delete_image: Usuń obraz
748
+ gallery_legend: "(Opcjonalnie) Dodaj obraz do karty propozycji"
743
749
  select_a_category: Wybierz kategorię
744
750
  send: Wyślij
745
751
  title: Edytuj propozycję
@@ -762,7 +768,7 @@ pl:
762
768
  type: Typ
763
769
  voted: Wsparte
764
770
  filters_small_view:
765
- close_modal: Zamknij modal
771
+ close_modal: Zamknij okno
766
772
  filter: Filtr
767
773
  filter_by: Filtruj według
768
774
  unfold: Rozwiń
@@ -84,6 +84,9 @@ ro:
84
84
  admin:
85
85
  filters:
86
86
  proposals:
87
+ is_emendation_true:
88
+ values:
89
+ 'true': Modificări
87
90
  valuator_role_ids_has:
88
91
  label: Atribuit evaluatorului
89
92
  search_placeholder:
@@ -575,6 +578,8 @@ ro:
575
578
  amendment: Amendamente
576
579
  category: Categorie
577
580
  open: Deschideți
581
+ new:
582
+ title: Creare proiect colaborativ
578
583
  show:
579
584
  info-message: Acesta este un <strong>proiect de colaborare</strong> pentru o propunere. Aceasta înseamnă că îi poți ajuta pe autorii lor să modeleze propunerea folosind secțiunea de mai jos sau să o îmbunătățească direct prin solicitarea accesului la editare. Odată ce autorii vă acordă accesul, veți putea face modificări la acest proiect.
580
585
  publish: Publică
@@ -4,7 +4,7 @@ module Decidim
4
4
  # This holds decidim-proposals version.
5
5
  module Proposals
6
6
  def self.version
7
- "0.23.3"
7
+ "0.23.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-proposals
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.23.3
4
+ version: 0.23.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: 2021-02-23 00:00:00.000000000 Z
13
+ date: 2021-03-10 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: acts_as_list
@@ -60,28 +60,28 @@ dependencies:
60
60
  requirements:
61
61
  - - '='
62
62
  - !ruby/object:Gem::Version
63
- version: 0.23.3
63
+ version: 0.23.4
64
64
  type: :runtime
65
65
  prerelease: false
66
66
  version_requirements: !ruby/object:Gem::Requirement
67
67
  requirements:
68
68
  - - '='
69
69
  - !ruby/object:Gem::Version
70
- version: 0.23.3
70
+ version: 0.23.4
71
71
  - !ruby/object:Gem::Dependency
72
72
  name: decidim-core
73
73
  requirement: !ruby/object:Gem::Requirement
74
74
  requirements:
75
75
  - - '='
76
76
  - !ruby/object:Gem::Version
77
- version: 0.23.3
77
+ version: 0.23.4
78
78
  type: :runtime
79
79
  prerelease: false
80
80
  version_requirements: !ruby/object:Gem::Requirement
81
81
  requirements:
82
82
  - - '='
83
83
  - !ruby/object:Gem::Version
84
- version: 0.23.3
84
+ version: 0.23.4
85
85
  - !ruby/object:Gem::Dependency
86
86
  name: doc2text
87
87
  requirement: !ruby/object:Gem::Requirement
@@ -150,84 +150,84 @@ dependencies:
150
150
  requirements:
151
151
  - - '='
152
152
  - !ruby/object:Gem::Version
153
- version: 0.23.3
153
+ version: 0.23.4
154
154
  type: :development
155
155
  prerelease: false
156
156
  version_requirements: !ruby/object:Gem::Requirement
157
157
  requirements:
158
158
  - - '='
159
159
  - !ruby/object:Gem::Version
160
- version: 0.23.3
160
+ version: 0.23.4
161
161
  - !ruby/object:Gem::Dependency
162
162
  name: decidim-assemblies
163
163
  requirement: !ruby/object:Gem::Requirement
164
164
  requirements:
165
165
  - - '='
166
166
  - !ruby/object:Gem::Version
167
- version: 0.23.3
167
+ version: 0.23.4
168
168
  type: :development
169
169
  prerelease: false
170
170
  version_requirements: !ruby/object:Gem::Requirement
171
171
  requirements:
172
172
  - - '='
173
173
  - !ruby/object:Gem::Version
174
- version: 0.23.3
174
+ version: 0.23.4
175
175
  - !ruby/object:Gem::Dependency
176
176
  name: decidim-budgets
177
177
  requirement: !ruby/object:Gem::Requirement
178
178
  requirements:
179
179
  - - '='
180
180
  - !ruby/object:Gem::Version
181
- version: 0.23.3
181
+ version: 0.23.4
182
182
  type: :development
183
183
  prerelease: false
184
184
  version_requirements: !ruby/object:Gem::Requirement
185
185
  requirements:
186
186
  - - '='
187
187
  - !ruby/object:Gem::Version
188
- version: 0.23.3
188
+ version: 0.23.4
189
189
  - !ruby/object:Gem::Dependency
190
190
  name: decidim-dev
191
191
  requirement: !ruby/object:Gem::Requirement
192
192
  requirements:
193
193
  - - '='
194
194
  - !ruby/object:Gem::Version
195
- version: 0.23.3
195
+ version: 0.23.4
196
196
  type: :development
197
197
  prerelease: false
198
198
  version_requirements: !ruby/object:Gem::Requirement
199
199
  requirements:
200
200
  - - '='
201
201
  - !ruby/object:Gem::Version
202
- version: 0.23.3
202
+ version: 0.23.4
203
203
  - !ruby/object:Gem::Dependency
204
204
  name: decidim-meetings
205
205
  requirement: !ruby/object:Gem::Requirement
206
206
  requirements:
207
207
  - - '='
208
208
  - !ruby/object:Gem::Version
209
- version: 0.23.3
209
+ version: 0.23.4
210
210
  type: :development
211
211
  prerelease: false
212
212
  version_requirements: !ruby/object:Gem::Requirement
213
213
  requirements:
214
214
  - - '='
215
215
  - !ruby/object:Gem::Version
216
- version: 0.23.3
216
+ version: 0.23.4
217
217
  - !ruby/object:Gem::Dependency
218
218
  name: decidim-participatory_processes
219
219
  requirement: !ruby/object:Gem::Requirement
220
220
  requirements:
221
221
  - - '='
222
222
  - !ruby/object:Gem::Version
223
- version: 0.23.3
223
+ version: 0.23.4
224
224
  type: :development
225
225
  prerelease: false
226
226
  version_requirements: !ruby/object:Gem::Requirement
227
227
  requirements:
228
228
  - - '='
229
229
  - !ruby/object:Gem::Version
230
- version: 0.23.3
230
+ version: 0.23.4
231
231
  description: A proposals component for decidim's participatory spaces.
232
232
  email:
233
233
  - josepjaume@gmail.com
@@ -631,7 +631,6 @@ files:
631
631
  - db/migrate/20200708091228_move_proposals_fields_to_i18n.rb
632
632
  - db/migrate/20200730131631_move_proposal_endorsed_event_notifications_to_resource_endorsed_event.rb
633
633
  - db/migrate/20200827154156_add_commentable_counter_cache_to_proposals.rb
634
- - db/migrate/20200915151348_fix_proposals_data_to_ensure_title_and_body_are_hashes.rb
635
634
  - db/migrate/20201002085508_fix_proposals_data.rb
636
635
  - lib/decidim/content_parsers/proposal_parser.rb
637
636
  - lib/decidim/content_renderers/proposal_renderer.rb
@@ -1,37 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- class FixProposalsDataToEnsureTitleAndBodyAreHashes < ActiveRecord::Migration[5.2]
4
- def up
5
- reset_column_information
6
-
7
- PaperTrail.request(enabled: false) do
8
- Decidim::Proposals::Proposal.find_each do |proposal|
9
- next if proposal.title.is_a?(Hash) && proposal.body.is_a?(Hash)
10
-
11
- author = proposal.coauthorships.first.author
12
-
13
- locale = author.try(:locale).presence || author.try(:default_locale).presence || author.try(:organization).try(:default_locale).presence
14
-
15
- proposal.title = {
16
- locale => proposal.title
17
- }
18
- proposal.body = {
19
- locale => proposal.body
20
- }
21
-
22
- proposal.save!
23
- end
24
- end
25
-
26
- reset_column_information
27
- end
28
-
29
- def down; end
30
-
31
- def reset_column_information
32
- Decidim::User.reset_column_information
33
- Decidim::Coauthorship.reset_column_information
34
- Decidim::Proposals::Proposal.reset_column_information
35
- Decidim::Organization.reset_column_information
36
- end
37
- end