decidim-proposals 0.23.0 → 0.23.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (54) hide show
  1. checksums.yaml +4 -4
  2. data/app/cells/decidim/proposals/proposal_activity_cell.rb +13 -5
  3. data/app/commands/decidim/proposals/admin/update_proposal.rb +2 -0
  4. data/app/controllers/decidim/proposals/admin/proposals_controller.rb +1 -1
  5. data/app/forms/decidim/proposals/admin/proposal_form.rb +13 -0
  6. data/app/forms/decidim/proposals/proposal_wizard_create_step_form.rb +0 -8
  7. data/app/models/decidim/proposals/proposal.rb +3 -1
  8. data/app/presenters/decidim/proposals/admin_log/proposal_presenter.rb +2 -2
  9. data/app/presenters/decidim/proposals/admin_log/valuation_assignment_presenter.rb +2 -2
  10. data/app/presenters/decidim/proposals/proposal_presenter.rb +31 -12
  11. data/app/validators/proposal_length_validator.rb +4 -2
  12. data/app/views/decidim/proposals/admin/proposals/_form.html.erb +8 -2
  13. data/app/views/decidim/proposals/collaborative_drafts/edit.html.erb +6 -4
  14. data/app/views/decidim/proposals/collaborative_drafts/show.html.erb +6 -4
  15. data/app/views/decidim/proposals/proposals/edit.html.erb +6 -4
  16. data/app/views/decidim/proposals/proposals/show.html.erb +6 -4
  17. data/config/locales/ar.yml +1 -0
  18. data/config/locales/bg.yml +4 -0
  19. data/config/locales/ca.yml +10 -8
  20. data/config/locales/cs.yml +26 -24
  21. data/config/locales/de.yml +107 -78
  22. data/config/locales/el.yml +1 -1
  23. data/config/locales/en.yml +2 -0
  24. data/config/locales/es-MX.yml +4 -3
  25. data/config/locales/es-PY.yml +4 -3
  26. data/config/locales/es.yml +4 -3
  27. data/config/locales/eu.yml +5 -2
  28. data/config/locales/fi-plain.yml +3 -1
  29. data/config/locales/fi.yml +10 -8
  30. data/config/locales/fr-CA.yml +6 -4
  31. data/config/locales/fr.yml +6 -4
  32. data/config/locales/gl.yml +6 -3
  33. data/config/locales/hu.yml +1 -0
  34. data/config/locales/id-ID.yml +1 -0
  35. data/config/locales/is-IS.yml +4 -1
  36. data/config/locales/it.yml +3 -3
  37. data/config/locales/ja.yml +1 -1
  38. data/config/locales/lv.yml +1 -0
  39. data/config/locales/nl.yml +18 -16
  40. data/config/locales/no.yml +3 -2
  41. data/config/locales/pl.yml +9 -3
  42. data/config/locales/pt-BR.yml +2 -1
  43. data/config/locales/ro-RO.yml +5 -0
  44. data/config/locales/ru.yml +4 -1
  45. data/config/locales/si-LK.yml +1 -0
  46. data/config/locales/sk.yml +2 -1
  47. data/config/locales/sv.yml +5 -5
  48. data/config/locales/sw-KE.yml +1 -0
  49. data/config/locales/tr-TR.yml +381 -217
  50. data/config/locales/uk.yml +4 -1
  51. data/db/migrate/20200708091228_move_proposals_fields_to_i18n.rb +8 -2
  52. data/lib/decidim/proposals/version.rb +1 -1
  53. metadata +23 -22
  54. data/db/migrate/20200915151348_fix_proposals_data_to_ensure_title_and_body_are_hashes.rb +0 -37
@@ -152,7 +152,6 @@ uk:
152
152
  actions:
153
153
  preview: Попередній перегляд
154
154
  exports:
155
- comments: Коментарі
156
155
  proposals: Пропозиції
157
156
  models:
158
157
  proposal:
@@ -231,6 +230,10 @@ uk:
231
230
  official: Службове
232
231
  filter_state_values:
233
232
  not_answered: Без відповідей
233
+ collaborative_drafts:
234
+ wizard_steps:
235
+ see_steps: переглянути кроки
236
+ step_of: '%{current_step_num}-й крок з %{total_steps} кроків'
234
237
  create:
235
238
  error: При спробі збереження цієї пропозиції сталися помилки.
236
239
  success: Пропозицію успішно створено. Збережено як чернетку.
@@ -11,7 +11,13 @@ class MoveProposalsFieldsToI18n < ActiveRecord::Migration[5.2]
11
11
  Decidim::Proposals::Proposal.find_each do |proposal|
12
12
  author = proposal.coauthorships.first.author
13
13
 
14
- locale = author.try(:locale).presence || author.try(:default_locale).presence || author.try(:organization).try(:default_locale).presence
14
+ locale = if author
15
+ author.try(:locale).presence || author.try(:default_locale).presence || author.try(:organization).try(:default_locale).presence
16
+ elsif proposal.component && proposal.component.participatory_space
17
+ proposal.component.participatory_space.organization.default_locale
18
+ else
19
+ I18n.default_locale.to_s
20
+ end
15
21
 
16
22
  proposal.new_title = {
17
23
  locale => proposal.title
@@ -20,7 +26,7 @@ class MoveProposalsFieldsToI18n < ActiveRecord::Migration[5.2]
20
26
  locale => proposal.body
21
27
  }
22
28
 
23
- proposal.save!
29
+ proposal.save(validate: false)
24
30
  end
25
31
  end
26
32
 
@@ -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.0"
7
+ "0.23.4"
8
8
  end
9
9
  end
10
10
  end
metadata CHANGED
@@ -1,16 +1,16 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: decidim-proposals
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.23.0
4
+ version: 0.23.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Josep Jaume Rey Peroy
8
8
  - Marc Riera Casals
9
9
  - Oriol Gual Oliva
10
- autorequire:
10
+ autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2020-11-05 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.0
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.0
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.0
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.0
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.0
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.0
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.0
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.0
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.0
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.0
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.0
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.0
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.0
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.0
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.0
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.0
230
+ version: 0.23.4
231
231
  description: A proposals component for decidim's participatory spaces.
232
232
  email:
233
233
  - josepjaume@gmail.com
@@ -566,12 +566,14 @@ files:
566
566
  - config/locales/pt.yml
567
567
  - config/locales/ro-RO.yml
568
568
  - config/locales/ru.yml
569
+ - config/locales/si-LK.yml
569
570
  - config/locales/sk-SK.yml
570
571
  - config/locales/sk.yml
571
572
  - config/locales/sl.yml
572
573
  - config/locales/so-SO.yml
573
574
  - config/locales/sr-CS.yml
574
575
  - config/locales/sv.yml
576
+ - config/locales/sw-KE.yml
575
577
  - config/locales/ti-ER.yml
576
578
  - config/locales/tr-TR.yml
577
579
  - config/locales/uk.yml
@@ -629,7 +631,6 @@ files:
629
631
  - db/migrate/20200708091228_move_proposals_fields_to_i18n.rb
630
632
  - db/migrate/20200730131631_move_proposal_endorsed_event_notifications_to_resource_endorsed_event.rb
631
633
  - db/migrate/20200827154156_add_commentable_counter_cache_to_proposals.rb
632
- - db/migrate/20200915151348_fix_proposals_data_to_ensure_title_and_body_are_hashes.rb
633
634
  - db/migrate/20201002085508_fix_proposals_data.rb
634
635
  - lib/decidim/content_parsers/proposal_parser.rb
635
636
  - lib/decidim/content_renderers/proposal_renderer.rb
@@ -653,7 +654,7 @@ homepage: https://github.com/decidim/decidim
653
654
  licenses:
654
655
  - AGPL-3.0
655
656
  metadata: {}
656
- post_install_message:
657
+ post_install_message:
657
658
  rdoc_options: []
658
659
  require_paths:
659
660
  - lib
@@ -669,7 +670,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
669
670
  version: '0'
670
671
  requirements: []
671
672
  rubygems_version: 3.0.3
672
- signing_key:
673
+ signing_key:
673
674
  specification_version: 4
674
675
  summary: Decidim proposals module
675
676
  test_files: []
@@ -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