decidim-consultations 0.22.0 → 0.23.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (52) hide show
  1. checksums.yaml +4 -4
  2. data/app/commands/decidim/consultations/admin/update_consultation.rb +9 -4
  3. data/app/forms/decidim/consultations/admin/consultation_form.rb +5 -6
  4. data/app/forms/decidim/consultations/admin/question_form.rb +5 -6
  5. data/app/models/decidim/consultation.rb +9 -0
  6. data/app/models/decidim/consultations/question.rb +12 -1
  7. data/app/models/decidim/consultations/response.rb +4 -0
  8. data/app/models/decidim/consultations/response_group.rb +4 -0
  9. data/app/presenters/decidim/consultations/question_stats_presenter.rb +1 -1
  10. data/app/views/decidim/consultations/consultations/_consultation_details.html.erb +1 -1
  11. data/app/views/decidim/consultations/questions/_vote_modal_confirm.html.erb +1 -1
  12. data/app/views/decidim/consultations/questions/show.html.erb +1 -1
  13. data/app/views/layouts/decidim/consultation.html.erb +1 -0
  14. data/config/locales/am-ET.yml +1 -0
  15. data/config/locales/bg.yml +1 -0
  16. data/config/locales/cs.yml +8 -8
  17. data/config/locales/da.yml +1 -0
  18. data/config/locales/de.yml +5 -5
  19. data/config/locales/eo.yml +1 -0
  20. data/config/locales/et.yml +1 -0
  21. data/config/locales/fi-plain.yml +1 -1
  22. data/config/locales/fi.yml +3 -3
  23. data/config/locales/fr.yml +2 -2
  24. data/config/locales/hr.yml +1 -0
  25. data/config/locales/is.yml +185 -0
  26. data/config/locales/ja-JP.yml +39 -39
  27. data/config/locales/ja.yml +367 -0
  28. data/config/locales/ko-KR.yml +1 -0
  29. data/config/locales/ko.yml +1 -0
  30. data/config/locales/lt.yml +1 -0
  31. data/config/locales/{lv-LV.yml → lv.yml} +0 -0
  32. data/config/locales/mt.yml +1 -0
  33. data/config/locales/nl.yml +6 -6
  34. data/config/locales/no.yml +2 -0
  35. data/config/locales/om-ET.yml +1 -0
  36. data/config/locales/pl.yml +10 -10
  37. data/config/locales/si-LK.yml +1 -0
  38. data/config/locales/sl.yml +4 -0
  39. data/config/locales/so-SO.yml +1 -0
  40. data/config/locales/sw-KE.yml +1 -0
  41. data/config/locales/ti-ER.yml +1 -0
  42. data/config/locales/tr-TR.yml +115 -40
  43. data/config/locales/vi-VN.yml +1 -0
  44. data/config/locales/vi.yml +1 -0
  45. data/config/locales/zh-CN.yml +367 -0
  46. data/config/locales/zh-TW.yml +1 -0
  47. data/db/migrate/20200827154143_add_commentable_counter_cache_to_consultations.rb +9 -0
  48. data/lib/decidim/consultations/admin_engine.rb +1 -0
  49. data/lib/decidim/consultations/participatory_space.rb +17 -17
  50. data/lib/decidim/consultations/test/factories.rb +1 -0
  51. data/lib/decidim/consultations/version.rb +1 -1
  52. metadata +38 -16
@@ -0,0 +1 @@
1
+ vi:
@@ -0,0 +1 @@
1
+ vi:
@@ -0,0 +1,367 @@
1
+ zh-CN:
2
+ activemodel:
3
+ attributes:
4
+ consultation:
5
+ banner_image: 横幅图像
6
+ decidim_highlighted_scope_id: 高亮范围
7
+ description: 描述
8
+ end_voting_date: 投票结束
9
+ introductory_image: 介绍图片
10
+ introductory_video_url: 介绍视频网址
11
+ questions: 问 题
12
+ slug: URL 名称
13
+ start_voting_date: 投票开始
14
+ subtitle: 字幕
15
+ title: 标题
16
+ question:
17
+ banner_image: 横幅图像
18
+ decidim_scope_id: 市区
19
+ hashtag: 标签
20
+ hero_image: 首页图像
21
+ i_frame_url: 外部投票系统 URL
22
+ instructions: 表决的其他指示
23
+ max_votes: 最大投票数
24
+ min_votes: 最小票数
25
+ origin_scope: 范围
26
+ origin_title: 始发地
27
+ origin_url: 起源网址
28
+ participatory_scope: 参与范围
29
+ promoter_group: 促销者组
30
+ question_context: 二. 背景
31
+ reference: 参考
32
+ scope: 市区
33
+ slug: URL 名称
34
+ subtitle: 字幕
35
+ vote: 外部投票系统
36
+ what_is_decided: 决定的内容
37
+ response:
38
+ decidim_consultations_response_group_id: 组别
39
+ errors:
40
+ models:
41
+ question:
42
+ attributes:
43
+ max_votes:
44
+ lower_than_min: 最大票数应高于或等于最小票数。
45
+ vote:
46
+ decidim_consultations_response_id:
47
+ not_found: 找不到响应。
48
+ activerecord:
49
+ errors:
50
+ models:
51
+ decidim/consultations/vote:
52
+ attributes:
53
+ question:
54
+ invalid_num_votes: 票数无效
55
+ models:
56
+ decidim/consultation:
57
+ other: 协商
58
+ decidim/consultations/question:
59
+ other: 问 题
60
+ decidim/consultations/response:
61
+ other: 回应
62
+ decidim/consultations/vote:
63
+ other: 所得票数
64
+ decidim:
65
+ admin:
66
+ actions:
67
+ back_to_responses: 回到回应
68
+ new_consultation: 新建咨询
69
+ new_question: 新问题
70
+ new_response: 新的响应
71
+ new_response_group: 新建组
72
+ publish_results: 发布结果
73
+ response_groups: 管理响应组
74
+ unpublish_results: 取消发布结果
75
+ consultation_publications:
76
+ create:
77
+ error: 发布此咨询时出现问题。
78
+ success: 审核已成功发布。
79
+ destroy:
80
+ error: 取消发布此咨询时出现问题。
81
+ success: 咨询已成功取消发布。
82
+ consultation_results_publications:
83
+ create:
84
+ error: 发布这次协商的结果时出现问题。
85
+ success: 咨询结果发布成功。
86
+ destroy:
87
+ error: 在为这次协商取消发布结果时遇到问题。
88
+ success: 咨询结果已成功取消发布。
89
+ consultations:
90
+ create:
91
+ error: 创建新咨询时出现问题。
92
+ success: 咨询已成功创建。
93
+ edit:
94
+ update: 更新
95
+ form:
96
+ slug_help: 'URL slugs 用于生成指向此咨询的URL。 只接受字母、数字和破折号,必须以字母开头。例如: %{url}'
97
+ title: 通告周知
98
+ index:
99
+ not_published: 未发布
100
+ published: 已发布
101
+ new:
102
+ create: 创建
103
+ title: 新建咨询
104
+ results:
105
+ not_visible: 当咨询结束时,结果将可用
106
+ participants: "%{count} 位参与者"
107
+ total_votes: '总计: %{count} 票'
108
+ update:
109
+ error: 更新此咨询时出现问题。
110
+ success: 咨询更新成功。
111
+ menu:
112
+ consultations: 协商
113
+ consultations_submenu:
114
+ info: 信息
115
+ questions: 问 题
116
+ results: 成果
117
+ questions_submenu:
118
+ components: 组件
119
+ configuration: 配置
120
+ consultation: Consultation
121
+ info: 信息
122
+ responses: 回应
123
+ models:
124
+ consultation:
125
+ fields:
126
+ created_at: 创建于
127
+ published: 已发布
128
+ title: 标题
129
+ name:
130
+ other: 协商
131
+ question:
132
+ fields:
133
+ created_at: 创建于
134
+ published: 已发布
135
+ title: 标题
136
+ name:
137
+ other: 问 题
138
+ response:
139
+ fields:
140
+ created_at: 创建于
141
+ response_group: 组别
142
+ title: 标题
143
+ name:
144
+ other: 回应
145
+ question_configuration:
146
+ disable_external_voting: 请禁用高级配置的外部投票
147
+ form:
148
+ help: 通过增加参与者可以选择的最大回复数量来设置多个选项问题。 默认最大值为1,意味着只能投票一个回复。
149
+ title: 高级配置
150
+ question_publications:
151
+ create:
152
+ error: 发布此问题时出现问题。
153
+ success: 问题发布成功
154
+ destroy:
155
+ error: 取消发布此问题时出现问题。
156
+ success: 问题已成功取消发布。
157
+ questions:
158
+ create:
159
+ error: 出现了一个新的问题。
160
+ success: 已成功创建问题。
161
+ destroy:
162
+ success: 问题已成功删除。
163
+ edit:
164
+ update: 更新
165
+ form:
166
+ title: 通告周知
167
+ index:
168
+ not_published: 未发布
169
+ published: 已发布
170
+ new:
171
+ create: 创建
172
+ title: 新问题
173
+ update:
174
+ error: 更新这个问题时出现问题。
175
+ success: 问题已成功更新。
176
+ response_groups:
177
+ create:
178
+ error: 创建一个新的响应组时出现问题。
179
+ success: 响应组已成功创建。
180
+ destroy:
181
+ error: 删除响应组时出现问题。请检查是否有任何响应依赖于它。
182
+ success: 响应组已成功删除。
183
+ edit:
184
+ update: 更新
185
+ form:
186
+ title: 通告周知
187
+ help: 使用组来组织软件包中的多项选择问题。
188
+ new:
189
+ create: 创建
190
+ title: 新建响应组
191
+ update:
192
+ error: 更新此响应时出现问题。
193
+ success: 响应已成功更新。
194
+ responses:
195
+ create:
196
+ error: 产生新的反应时出现问题。
197
+ success: 响应成功创建。
198
+ destroy:
199
+ error: 删除答复时出现问题。
200
+ success: 响应已成功删除。
201
+ edit:
202
+ update: 更新
203
+ form:
204
+ title: 通告周知
205
+ new:
206
+ create: 创建
207
+ title: 新的响应
208
+ update:
209
+ error: 更新此响应时出现问题。
210
+ success: 响应已成功更新。
211
+ titles:
212
+ consultations: 协商
213
+ questions: 问 题
214
+ response_groups: 响应组
215
+ responses: 回应
216
+ results: 成果
217
+ consultations:
218
+ admin:
219
+ content_blocks:
220
+ highlighted_consultations:
221
+ max_results: 显示元素的最大数量
222
+ consultation:
223
+ start_voting_date: 投票开始
224
+ view_results: 查看结果
225
+ consultation_card:
226
+ view_results: 查看结果
227
+ consultations:
228
+ orders:
229
+ label: '咨询排序方式:'
230
+ random: 随机播放
231
+ recent: 最新的
232
+ show:
233
+ dates: 日期
234
+ content_blocks:
235
+ highlighted_consultations:
236
+ name: 重点协商
237
+ count:
238
+ title:
239
+ other: "%{count} 次咨询"
240
+ filters:
241
+ active: 已启用
242
+ all: 所有的
243
+ finished: 已完成
244
+ search: 搜索
245
+ state: 状态
246
+ upcoming: 即将到来的
247
+ filters_small_view:
248
+ close_modal: 关闭窗口
249
+ filter: 筛选器
250
+ filter_by: 筛选方式
251
+ unfold: 展开...
252
+ highlighted_questions:
253
+ title: 来自 %{scope_name} 的问题
254
+ index:
255
+ title: 协商
256
+ last_activity:
257
+ new_consultation: 新建咨询
258
+ new_question_at_html: "<span>在 %{link}的新问题</span>"
259
+ pages:
260
+ home:
261
+ highlighted_consultations:
262
+ active_consultations: 积极协商
263
+ see_all_consultations: 查看所有协商
264
+ voting_ends_in:
265
+ other: 投票在 <strong>%{count} 天后结束</strong>
266
+ voting_ends_today: 今天结束 <strong></strong>
267
+ question:
268
+ take_part: 参与
269
+ view_results: 查看结果
270
+ votes_out_of:
271
+ other: 投票数
272
+ question_multiple_votes:
273
+ results_rules:
274
+ minimum_votes_per_user:
275
+ description: 参与者可以在不同的选项中至少分配 %{votes} 个选票。
276
+ title: 在这个问题中,允许的多个选择
277
+ total_participants: 共有 %{count} 人参加了投票。
278
+ vote_limit:
279
+ description: 参与者最多可以投票到 %{limit} 选项。
280
+ voting_rules:
281
+ minimum_votes_per_user:
282
+ description: 您必须在不同选项之间分配至少 %{votes} 张票。
283
+ title: '投票须遵守下列规则:'
284
+ vote_limit:
285
+ description: 您可以投票到 %{limit} 选项。
286
+ left: 剩余时间
287
+ votes: 所得票数
288
+ question_votes:
289
+ create:
290
+ error: 有一个问题被投票
291
+ success: 您可以在协商结束之前更改它。只接受最后一次投票。
292
+ title_error: 投票错误!
293
+ title_success: 投票成功注册
294
+ regular_questions:
295
+ title: 此咨询的问题
296
+ show:
297
+ badge_name:
298
+ finished: 已完成
299
+ open: 打开
300
+ open_votes: 公开投票
301
+ published_results: 结果已发布
302
+ footer_button_text:
303
+ debate: B. 辩论
304
+ view: 查看
305
+ view_results: 查看结果
306
+ vote: 投票
307
+ unspecified: 未指定
308
+ help:
309
+ participatory_spaces:
310
+ consultations:
311
+ contextual: "<p><strong>Consult</strong> 是一个空间,可以让您向所有组建组织的人提出一个明确的问题。 呼吁参加协商,引发和命令辩论支持或反对回应。 当咨询日期到达时,您可以投票并发布投票结果。</p> <p>示例:磋商可能涉及影响一个组织的几乎任何方面:一些示例正在更改该组织的名称或标志,提供几种替代品, 决定是否加入一个更大的组织,确认或拒绝一项新的战略计划或工作组的结果, 或界定这些职位是否最多应为1、2或3项任务。</p>\n"
312
+ page: "<p><strong>Consult</strong> 是一个空间,可以让您向所有组建组织的人提出一个明确的问题。 呼吁参加协商,引发和命令辩论支持或反对回应。 当咨询日期到达时,您可以投票并发布投票结果。</p> <p>示例:磋商可能涉及影响一个组织的几乎任何方面:一些示例正在更改该组织的名称或标志,提供几种替代品, 决定是否加入一个更大的组织,确认或拒绝一项新的战略计划或工作组的结果, 或界定该组织的职位是否最多应为1、2或3项任务。</p>\n"
313
+ title: 什么是协商?
314
+ menu:
315
+ consultations: 协商
316
+ pages:
317
+ home:
318
+ statistics:
319
+ consultations_count: 协商
320
+ questions:
321
+ next_button: 下一个问题
322
+ previous_button: 上一个问题
323
+ results:
324
+ title: 成果
325
+ show:
326
+ read_more: 阅读更多
327
+ statistics:
328
+ assistants_count_title: 助理
329
+ comments_count_title: 评论
330
+ meetings_count_title: 会议
331
+ supports_count_title: 所得票数
332
+ technical_info:
333
+ technical_data: 技术数据
334
+ vote_button:
335
+ already_voted: 已投票
336
+ already_voted_hover: 撤销投票
337
+ starting_from: 从 %{date} 开始
338
+ verification_required: 验证您的帐户以投票
339
+ vote: 投票
340
+ vote_modal:
341
+ close_modal: 关闭模式
342
+ contextual_help: 请选择一个选项。
343
+ title: '协商:问题表决'
344
+ vote_modal_confirm:
345
+ change: 更改
346
+ close_modal: 关闭模式
347
+ confirm: 确认
348
+ contextual_help: 请确认选中的选项。
349
+ title: '协商:确认投票'
350
+ resources:
351
+ consultations:
352
+ actions:
353
+ vote: 投票
354
+ layouts:
355
+ decidim:
356
+ admin:
357
+ question:
358
+ attachments: 附件
359
+ categories: 类别管理
360
+ consultation_voting_data:
361
+ start_voting_date: 投票开始
362
+ question_components:
363
+ question_menu_item: 问题
364
+ unfold: 展开...
365
+ question_header:
366
+ back_to_consultation: 查看所有协商
367
+ back_to_question: 回到问题
@@ -0,0 +1 @@
1
+ zh-TW:
@@ -0,0 +1,9 @@
1
+ # frozen_string_literal: true
2
+
3
+ class AddCommentableCounterCacheToConsultations < ActiveRecord::Migration[5.2]
4
+ def change
5
+ add_column :decidim_consultations_questions, :comments_count, :integer, null: false, default: 0, index: true
6
+ Decidim::Consultations::Question.reset_column_information
7
+ Decidim::Consultations::Question.find_each(&:update_comments_count)
8
+ end
9
+ end
@@ -32,6 +32,7 @@ module Decidim
32
32
  member do
33
33
  put :publish
34
34
  put :unpublish
35
+ get :share
35
36
  end
36
37
  resources :exports, only: :create
37
38
  end
@@ -49,10 +49,10 @@ Decidim.register_participatory_space(:consultations) do |participatory_space|
49
49
  published_at: Time.now.utc,
50
50
  start_voting_date: Time.zone.today,
51
51
  end_voting_date: Time.zone.today + 1.month,
52
- banner_image: File.new(File.join(seeds_root, "city2.jpeg")),
52
+ organization: organization,
53
+ banner_image: File.new(File.join(seeds_root, "city2.jpeg")), # Keep after organization
53
54
  introductory_video_url: "https://www.youtube.com/embed/zhMMW0TENNA",
54
- decidim_highlighted_scope_id: Decidim::Scope.reorder(Arel.sql("RANDOM()")).first.id,
55
- organization: organization
55
+ decidim_highlighted_scope_id: Decidim::Scope.reorder(Arel.sql("RANDOM()")).first.id
56
56
  }
57
57
 
58
58
  active_consultation = Decidim.traceability.perform_action!(
@@ -76,10 +76,10 @@ Decidim.register_participatory_space(:consultations) do |participatory_space|
76
76
  results_published_at: Time.zone.today - 1.month,
77
77
  start_voting_date: Time.zone.today - 2.months,
78
78
  end_voting_date: Time.zone.today - 1.month,
79
- banner_image: File.new(File.join(seeds_root, "city2.jpeg")),
79
+ organization: organization,
80
+ banner_image: File.new(File.join(seeds_root, "city2.jpeg")), # Keep after organization
80
81
  introductory_video_url: "https://www.youtube.com/embed/zhMMW0TENNA",
81
- decidim_highlighted_scope_id: Decidim::Scope.reorder(Arel.sql("RANDOM()")).first.id,
82
- organization: organization
82
+ decidim_highlighted_scope_id: Decidim::Scope.reorder(Arel.sql("RANDOM()")).first.id
83
83
  }
84
84
 
85
85
  finished_consultation = Decidim.traceability.perform_action!(
@@ -102,10 +102,10 @@ Decidim.register_participatory_space(:consultations) do |participatory_space|
102
102
  published_at: Time.zone.today + 1.month,
103
103
  start_voting_date: Time.zone.today + 1.month + 1.day,
104
104
  end_voting_date: Time.zone.today + 2.months,
105
- banner_image: File.new(File.join(seeds_root, "city2.jpeg")),
105
+ organization: organization,
106
+ banner_image: File.new(File.join(seeds_root, "city2.jpeg")), # Keep after organization
106
107
  introductory_video_url: "https://www.youtube.com/embed/zhMMW0TENNA",
107
- decidim_highlighted_scope_id: Decidim::Scope.reorder(Arel.sql("RANDOM()")).first.id,
108
- organization: organization
108
+ decidim_highlighted_scope_id: Decidim::Scope.reorder(Arel.sql("RANDOM()")).first.id
109
109
  }
110
110
 
111
111
  upcoming_consultation = Decidim.traceability.perform_action!(
@@ -132,12 +132,12 @@ Decidim.register_participatory_space(:consultations) do |participatory_space|
132
132
  question_context: Decidim::Faker::Localized.wrapped("<p>", "</p>") do
133
133
  Decidim::Faker::Localized.paragraph(3)
134
134
  end,
135
- hero_image: File.new(File.join(seeds_root, "city.jpeg")),
136
- banner_image: File.new(File.join(seeds_root, "city2.jpeg")),
135
+ organization: organization,
136
+ hero_image: File.new(File.join(seeds_root, "city.jpeg")), # Keep after organization
137
+ banner_image: File.new(File.join(seeds_root, "city2.jpeg")), # Keep after organization
137
138
  promoter_group: Decidim::Faker::Localized.sentence(3),
138
139
  participatory_scope: Decidim::Faker::Localized.sentence(3),
139
- published_at: Time.now.utc,
140
- organization: organization
140
+ published_at: Time.now.utc
141
141
  }
142
142
 
143
143
  question = Decidim.traceability.perform_action!(
@@ -161,15 +161,15 @@ Decidim.register_participatory_space(:consultations) do |participatory_space|
161
161
  Decidim::Attachment.create!(
162
162
  title: Decidim::Faker::Localized.sentence(2),
163
163
  description: Decidim::Faker::Localized.sentence(5),
164
- file: File.new(File.join(seeds_root, "city.jpeg")),
165
- attached_to: question
164
+ attached_to: question,
165
+ file: File.new(File.join(seeds_root, "city.jpeg")) # Keep after attached_to
166
166
  )
167
167
 
168
168
  Decidim::Attachment.create!(
169
169
  title: Decidim::Faker::Localized.sentence(2),
170
170
  description: Decidim::Faker::Localized.sentence(5),
171
- file: File.new(File.join(seeds_root, "Exampledocument.pdf")),
172
- attached_to: question
171
+ attached_to: question,
172
+ file: File.new(File.join(seeds_root, "Exampledocument.pdf")) # Keep after attached_to
173
173
  )
174
174
  end
175
175
  end