decidim-budgets 0.26.7 → 0.27.0.rc1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/cells/decidim/budgets/budgets_header/show.erb +1 -1
- data/app/cells/decidim/budgets/order_activity_cell.rb +29 -0
- data/app/commands/decidim/budgets/add_line_item.rb +4 -2
- data/app/commands/decidim/budgets/admin/create_budget.rb +1 -1
- data/app/commands/decidim/budgets/admin/create_order_reminders.rb +66 -0
- data/app/commands/decidim/budgets/admin/create_project.rb +5 -2
- data/app/commands/decidim/budgets/admin/destroy_budget.rb +1 -1
- data/app/commands/decidim/budgets/admin/destroy_project.rb +1 -1
- data/app/commands/decidim/budgets/admin/import_proposals_to_budgets.rb +6 -6
- data/app/commands/decidim/budgets/admin/update_budget.rb +1 -1
- data/app/commands/decidim/budgets/admin/update_project.rb +5 -2
- data/app/commands/decidim/budgets/admin/update_project_category.rb +48 -0
- data/app/commands/decidim/budgets/admin/update_project_scope.rb +54 -0
- data/app/commands/decidim/budgets/admin/update_project_selection.rb +56 -0
- data/app/commands/decidim/budgets/cancel_order.rb +1 -1
- data/app/commands/decidim/budgets/checkout.rb +10 -3
- data/app/commands/decidim/budgets/remove_line_item.rb +1 -1
- data/app/controllers/decidim/budgets/admin/projects_controller.rb +149 -1
- data/app/controllers/decidim/budgets/projects_controller.rb +13 -13
- data/app/forms/decidim/budgets/admin/budget_form.rb +2 -2
- data/app/forms/decidim/budgets/admin/order_reminder_form.rb +75 -0
- data/app/forms/decidim/budgets/admin/project_form.rb +19 -3
- data/app/helpers/decidim/budgets/admin/project_bulk_actions_helper.rb +20 -0
- data/app/helpers/decidim/budgets/projects_helper.rb +29 -0
- data/app/jobs/decidim/budgets/send_vote_reminder_job.rb +16 -0
- data/app/mailers/decidim/budgets/vote_reminder_mailer.rb +39 -0
- data/app/models/decidim/budgets/order.rb +2 -3
- data/app/models/decidim/budgets/project.rb +12 -4
- data/app/packs/entrypoints/decidim_budgets_admin.js +1 -0
- data/app/packs/src/decidim/budgets/admin/projects.js +143 -0
- data/app/permissions/decidim/budgets/admin/permissions.rb +8 -3
- data/app/queries/decidim/budgets/filtered_projects.rb +1 -1
- data/app/serializers/decidim/budgets/{data_portability_budgets_order_serializer.rb → download_your_data_budgets_order_serializer.rb} +2 -2
- data/app/services/decidim/budgets/order_reminder_generator.rb +85 -0
- data/app/views/decidim/budgets/admin/budgets/_form.html.erb +1 -1
- data/app/views/decidim/budgets/admin/budgets/index.html.erb +3 -0
- data/app/views/decidim/budgets/admin/projects/_bulk-actions.html.erb +13 -0
- data/app/views/decidim/budgets/admin/projects/_form.html.erb +6 -0
- data/app/views/decidim/budgets/admin/projects/_project-tr.html.erb +50 -0
- data/app/views/decidim/budgets/admin/projects/bulk_actions/_change-selected.html.erb +15 -0
- data/app/views/decidim/budgets/admin/projects/bulk_actions/_dropdown.html.erb +36 -0
- data/app/views/decidim/budgets/admin/projects/bulk_actions/_recategorize.html.erb +15 -0
- data/app/views/decidim/budgets/admin/projects/bulk_actions/_scope-change.html.erb +25 -0
- data/app/views/decidim/budgets/admin/projects/index.html.erb +6 -54
- data/app/views/decidim/budgets/admin/projects/update_attribute.js.erb +26 -0
- data/app/views/decidim/budgets/order_summary_mailer/order_summary.html.erb +0 -1
- data/app/views/decidim/budgets/projects/_filters.html.erb +4 -4
- data/app/views/decidim/budgets/projects/index.html.erb +28 -1
- data/app/views/decidim/budgets/projects/show.html.erb +7 -2
- data/app/views/decidim/budgets/vote_reminder_mailer/vote_reminder.html.erb +21 -0
- data/config/assets.rb +2 -1
- data/config/locales/am-ET.yml +1 -0
- data/config/locales/ar.yml +4 -0
- data/config/locales/bg.yml +1 -0
- data/config/locales/ca.yml +47 -1
- data/config/locales/cs.yml +51 -1
- data/config/locales/da.yml +1 -0
- data/config/locales/de.yml +45 -3
- data/config/locales/el.yml +2 -0
- data/config/locales/en.yml +46 -1
- data/config/locales/eo.yml +1 -0
- data/config/locales/es-MX.yml +43 -0
- data/config/locales/es-PY.yml +46 -0
- data/config/locales/es.yml +48 -2
- data/config/locales/et.yml +1 -0
- data/config/locales/eu.yml +3 -7
- data/config/locales/fi-plain.yml +46 -0
- data/config/locales/fi.yml +91 -45
- data/config/locales/fr-CA.yml +46 -1
- data/config/locales/fr.yml +47 -2
- data/config/locales/ga-IE.yml +1 -0
- data/config/locales/gl.yml +11 -0
- data/config/locales/hr.yml +1 -0
- data/config/locales/hu.yml +19 -107
- data/config/locales/id-ID.yml +1 -0
- data/config/locales/is-IS.yml +2 -1
- data/config/locales/it.yml +2 -0
- data/config/locales/ja.yml +42 -1
- data/config/locales/ko.yml +1 -0
- data/config/locales/lb.yml +2 -0
- data/config/locales/lt.yml +1 -337
- data/config/locales/lv.yml +1 -0
- data/config/locales/mt.yml +1 -0
- data/config/locales/nl.yml +14 -28
- data/config/locales/no.yml +17 -0
- data/config/locales/om-ET.yml +1 -0
- data/config/locales/pl.yml +2 -0
- data/config/locales/pt-BR.yml +3 -1
- data/config/locales/pt.yml +2 -0
- data/config/locales/ro-RO.yml +2 -3
- data/config/locales/ru.yml +1 -0
- data/config/locales/si-LK.yml +1 -0
- data/config/locales/sk.yml +1 -0
- data/config/locales/sl.yml +1 -0
- data/config/locales/so-SO.yml +1 -0
- data/config/locales/sr-CS.yml +1 -0
- data/config/locales/sv.yml +24 -4
- data/config/locales/sw-KE.yml +1 -0
- data/config/locales/ti-ER.yml +1 -0
- data/config/locales/tr-TR.yml +2 -0
- data/config/locales/uk.yml +1 -0
- data/config/locales/val-ES.yml +1 -0
- data/config/locales/vi.yml +1 -0
- data/config/locales/zh-CN.yml +1 -0
- data/config/locales/zh-TW.yml +1 -326
- data/db/migrate/20200804175222_votes_enabled_to_votes_choices.rb +2 -2
- data/db/migrate/20220428072638_add_geolocalization_fields_to_projects.rb +9 -0
- data/lib/decidim/budgets/admin_engine.rb +3 -0
- data/lib/decidim/budgets/component.rb +7 -6
- data/lib/decidim/budgets/engine.rb +17 -0
- data/lib/decidim/budgets/test/factories.rb +11 -0
- data/lib/decidim/budgets/version.rb +1 -1
- metadata +38 -24
- data/app/services/decidim/budgets/project_search.rb +0 -45
- data/config/locales/fa-IR.yml +0 -1
- data/config/locales/gn-PY.yml +0 -1
- data/config/locales/ka-GE.yml +0 -1
- data/config/locales/kaa.yml +0 -1
- data/config/locales/lo-LA.yml +0 -1
- data/config/locales/oc-FR.yml +0 -1
data/config/locales/sv.yml
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
---
|
1
2
|
sv:
|
2
3
|
activemodel:
|
3
4
|
attributes:
|
@@ -6,7 +7,7 @@ sv:
|
|
6
7
|
description: Beskrivning
|
7
8
|
title: Titel
|
8
9
|
total_budget: Total budget
|
9
|
-
weight:
|
10
|
+
weight: Vikt
|
10
11
|
project:
|
11
12
|
budget_amount: Belopp
|
12
13
|
decidim_category_id: Kategori
|
@@ -87,10 +88,15 @@ sv:
|
|
87
88
|
title: Redigera projekt
|
88
89
|
update: Uppdatera
|
89
90
|
index:
|
91
|
+
actions: Åtgärder
|
92
|
+
cancel: Avbryt
|
93
|
+
deselect_implementation: Avmarkera
|
90
94
|
finished_orders: Avslutade omröstningar
|
91
95
|
pending_orders: Pågående omröstningar
|
96
|
+
select_for_implementation: Välj
|
92
97
|
selected: Valda
|
93
98
|
title: Projekt
|
99
|
+
update: Uppdatera
|
94
100
|
new:
|
95
101
|
create: Skapa
|
96
102
|
title: Nytt projekt
|
@@ -107,6 +113,12 @@ sv:
|
|
107
113
|
no_components: Det finns inga andra förslagskomponenter med förslag i deltagarutrymmet som kan importeras till projekt.
|
108
114
|
select_component: Välj en komponent
|
109
115
|
title: Importera förslag
|
116
|
+
reminders:
|
117
|
+
orders:
|
118
|
+
description: Användarna kommer få ett e-post med länkar till budgetar de har börjat rösta i.
|
119
|
+
title:
|
120
|
+
one: Du är på väg att skicka ett e-postpåminnelse till %{count} användare
|
121
|
+
other: Du är på väg att skicka ett e-postpåminnelse till %{count} användare
|
110
122
|
admin_log:
|
111
123
|
budget:
|
112
124
|
create: "%{user_name} skapade budgeten %{resource_name} i utrymmet %{space_name}"
|
@@ -151,6 +163,7 @@ sv:
|
|
151
163
|
fields:
|
152
164
|
category: Kategori
|
153
165
|
id: ID
|
166
|
+
scope: Omfång
|
154
167
|
title: Titel
|
155
168
|
order_summary_mailer:
|
156
169
|
order_summary:
|
@@ -167,13 +180,10 @@ sv:
|
|
167
180
|
title: Bekräfta röst
|
168
181
|
budget_excess:
|
169
182
|
budget_excess:
|
170
|
-
description: Detta projekt överstiger den maximala budgeten och kan inte tilläggas. Du måste först ta bort ett projekt innan du lägger till ett nytt.
|
171
183
|
title: Maximal budget överskriden
|
172
184
|
close: Stäng
|
173
|
-
description: Detta projekt överstiger den maximala budgeten och kan inte tilläggas. Du måste först ta bort ett projekt innan du lägger till ett nytt.
|
174
185
|
ok: OK
|
175
186
|
projects_excess:
|
176
|
-
description: Du har valt för många projekt. Du måste först ta bort ett projekt innan du lägger till ett nytt.
|
177
187
|
title: Maximalt antal projekt överskridet
|
178
188
|
budget_summary:
|
179
189
|
are_you_sure: Vill du dra tillbaka din röst?
|
@@ -246,6 +256,7 @@ sv:
|
|
246
256
|
votes:
|
247
257
|
one: röst
|
248
258
|
other: röster
|
259
|
+
you_voted: Det här är din röst
|
249
260
|
project_budget_button:
|
250
261
|
add: Lägg till i din röst
|
251
262
|
add_descriptive: Lägg till projekt %{resource_name} till din röst
|
@@ -255,6 +266,15 @@ sv:
|
|
255
266
|
show:
|
256
267
|
budget: Budget
|
257
268
|
view_all_projects: Visa alla projekt
|
269
|
+
vote_reminder_mailer:
|
270
|
+
vote_reminder:
|
271
|
+
email_budgets: 'Områden där du inte har skickat din röst:'
|
272
|
+
email_intro: Du har börjat rösta i medborgarbudgeten men inte skickat den.
|
273
|
+
email_link: Rösta klart
|
274
|
+
email_outro: Kom ihåg att slutföra omröstningen. För att rösta måste du först välja ett eller flera förslag som du vill rösta för och bekräfta din röst med knappen "Rösta".
|
275
|
+
email_subject:
|
276
|
+
one: Du har börjat rösta i medborgarbudgeten men glömt skicka din röst
|
277
|
+
other: Du har börjat rösta i medborgarbudgeten men glömt skicka dina röster
|
258
278
|
components:
|
259
279
|
budgets:
|
260
280
|
actions:
|
data/config/locales/sw-KE.yml
CHANGED
data/config/locales/ti-ER.yml
CHANGED
data/config/locales/tr-TR.yml
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
---
|
1
2
|
tr:
|
2
3
|
activemodel:
|
3
4
|
attributes:
|
@@ -209,6 +210,7 @@ tr:
|
|
209
210
|
votes:
|
210
211
|
one: oy
|
211
212
|
other: oylar
|
213
|
+
you_voted: Buna oy verdin
|
212
214
|
project_budget_button:
|
213
215
|
add: Oyunuza ekleyin
|
214
216
|
add_descriptive: Oyunuza %{resource_name} projesini ekleyin
|
data/config/locales/uk.yml
CHANGED
data/config/locales/val-ES.yml
CHANGED
data/config/locales/vi.yml
CHANGED
data/config/locales/zh-CN.yml
CHANGED
data/config/locales/zh-TW.yml
CHANGED
@@ -1,327 +1,2 @@
|
|
1
|
+
---
|
1
2
|
zh-TW:
|
2
|
-
activemodel:
|
3
|
-
attributes:
|
4
|
-
budget:
|
5
|
-
decidim_scope_id: 範圍
|
6
|
-
description: 說明
|
7
|
-
title: 標題
|
8
|
-
total_budget: 總預算
|
9
|
-
weight: 排序位置
|
10
|
-
project:
|
11
|
-
budget_amount: 預算金額
|
12
|
-
decidim_category_id: 類別
|
13
|
-
decidim_scope_id: 範圍
|
14
|
-
description: 說明
|
15
|
-
proposal_ids: 相關提案
|
16
|
-
proposals: 提案
|
17
|
-
selected: 選定實施
|
18
|
-
title: 標題
|
19
|
-
proposals_import:
|
20
|
-
scope_id: 範圍
|
21
|
-
activerecord:
|
22
|
-
models:
|
23
|
-
decidim/budgets/project:
|
24
|
-
other: 專案
|
25
|
-
decidim:
|
26
|
-
admin:
|
27
|
-
filters:
|
28
|
-
projects:
|
29
|
-
category_id_eq:
|
30
|
-
label: 類別
|
31
|
-
scope_id_eq:
|
32
|
-
label: 範圍
|
33
|
-
selected_at_null:
|
34
|
-
label: 已選取
|
35
|
-
values:
|
36
|
-
'false': 選定實施
|
37
|
-
'true': 未選擇實施
|
38
|
-
budgets:
|
39
|
-
actions:
|
40
|
-
attachment_collections: 資料夾
|
41
|
-
attachments: 附件
|
42
|
-
confirm_destroy: 你確定要刪除這個專案嗎?
|
43
|
-
destroy: 刪除
|
44
|
-
edit: 編輯
|
45
|
-
edit_projects: 管理專案
|
46
|
-
import: 將提案匯入專案
|
47
|
-
new: 新增 %{name}
|
48
|
-
preview: 預覽
|
49
|
-
title: 操作
|
50
|
-
admin:
|
51
|
-
budgets:
|
52
|
-
create:
|
53
|
-
invalid: 建立預算時發生問題
|
54
|
-
success: 預算已成功建立
|
55
|
-
destroy:
|
56
|
-
invalid: 刪除此預算時出現問題
|
57
|
-
success: 預算已成功刪除
|
58
|
-
edit:
|
59
|
-
title: 編輯預算
|
60
|
-
update: 更新預算
|
61
|
-
index:
|
62
|
-
finished_orders: 已完成投票
|
63
|
-
pending_orders: 待審核投票
|
64
|
-
title: 預算
|
65
|
-
users_with_finished_orders: 已完成投票的使用者
|
66
|
-
users_with_pending_orders: 仍在等待投票的使用者
|
67
|
-
new:
|
68
|
-
create: 建立預算
|
69
|
-
title: 新增預算
|
70
|
-
update:
|
71
|
-
invalid: 此預算更新時出了問題
|
72
|
-
success: 預算已成功更新
|
73
|
-
exports:
|
74
|
-
projects: 專案
|
75
|
-
models:
|
76
|
-
budget:
|
77
|
-
name: 預算
|
78
|
-
project:
|
79
|
-
name: 專案
|
80
|
-
projects:
|
81
|
-
create:
|
82
|
-
invalid: 這個專案創建時出了問題
|
83
|
-
success: 專案建立成功
|
84
|
-
destroy:
|
85
|
-
success: 專案刪除成功
|
86
|
-
edit:
|
87
|
-
title: 編輯專案
|
88
|
-
update: 更新
|
89
|
-
index:
|
90
|
-
finished_orders: 已完成投票
|
91
|
-
pending_orders: 待審核投票
|
92
|
-
selected: 已選取
|
93
|
-
title: 專案
|
94
|
-
new:
|
95
|
-
create: 建立
|
96
|
-
title: 新專案
|
97
|
-
update:
|
98
|
-
invalid: 更新此專案時出現問題
|
99
|
-
success: 專案更新成功
|
100
|
-
proposals_imports:
|
101
|
-
create:
|
102
|
-
invalid: 將提案匯入專案時出現問題
|
103
|
-
success: "%{number} 個提案已成功匯入專案"
|
104
|
-
new:
|
105
|
-
create: 將提案匯入專案
|
106
|
-
default_budget: 預設預算
|
107
|
-
import_all_accepted_proposals: 導入所有已接受的提案
|
108
|
-
no_components: 在此參與空間中沒有其他提案元件可以將提案匯入到專案中。
|
109
|
-
origin_component_id: 原始元件
|
110
|
-
select_component: 請選擇一個組件
|
111
|
-
title: 導入提案
|
112
|
-
admin_log:
|
113
|
-
budget:
|
114
|
-
create: "%{user_name} 在 %{space_name} 空間創建了 %{resource_name} 預算。"
|
115
|
-
delete: "%{user_name} 刪除了 %{space_name} 空間中的 %{resource_name} 預算"
|
116
|
-
update: "%{user_name} 在 %{space_name} 空間更新了 %{resource_name} 預算"
|
117
|
-
project:
|
118
|
-
create: "%{user_name} 在 %{space_name} 空間中創建了 %{resource_name} 專案"
|
119
|
-
delete: "%{user_name} 刪除了 %{space_name} 空間中的 %{resource_name} 專案。"
|
120
|
-
update: "%{user_name} 更新了 %{space_name} 空間中的 %{resource_name} 專案。"
|
121
|
-
budget:
|
122
|
-
view: 查看所有預算專案
|
123
|
-
budget_information_modal:
|
124
|
-
back_to: 返回 %{component_name}
|
125
|
-
close_modal: 關閉視窗
|
126
|
-
continue: 繼續
|
127
|
-
more_information: 更多資訊
|
128
|
-
budget_list_item:
|
129
|
-
voting_finished: 您已在此預算中投票
|
130
|
-
voting_started: 你已經開始在這個預算中投票了
|
131
|
-
budgets_list:
|
132
|
-
cancel_order:
|
133
|
-
more_than_one: 刪除您對於 %{name} 的投票並重新開始
|
134
|
-
only_one: 刪除您的投票並重新開始。
|
135
|
-
finished_message: 您已完成投票流程。感謝您的參與!
|
136
|
-
highlighted_cta: 在 %{name} 上投票
|
137
|
-
if_change_opinion: 如果您改變了主意,您可以
|
138
|
-
my_budgets: 我的預算
|
139
|
-
progress: 完成投票
|
140
|
-
show: 檢視專案
|
141
|
-
vote: 投票
|
142
|
-
voted_on: 你已經對 %{links} 投票
|
143
|
-
limit_announcement:
|
144
|
-
cant_vote: 你無法在這個預算中進行投票。<a href="%{landing_path}">嘗試在其他預算中投票</a>。
|
145
|
-
limit_reached: 您在 %{links} 上有進行中的投票。若要對此預算進行投票,您必須<a href="%{landing_path}">刪除您目前的投票並重新開始</a>。
|
146
|
-
models:
|
147
|
-
budget:
|
148
|
-
fields:
|
149
|
-
name: 姓名
|
150
|
-
projects_count: 專案數量
|
151
|
-
total_budget: 總預算
|
152
|
-
project:
|
153
|
-
fields:
|
154
|
-
category: 類別
|
155
|
-
id: ID
|
156
|
-
title: 標題
|
157
|
-
order_summary_mailer:
|
158
|
-
order_summary:
|
159
|
-
selected_projects: '你選擇的專案如下:'
|
160
|
-
subject: 您已經在 %{space_name} 參與空間投票
|
161
|
-
voted_on_space: 您已對「%{space_name}」參與空間的「%{budget_name}」預算進行投票。
|
162
|
-
voted_on_space_with_scope: 您已在%{scope_type} 的%{scope_name} 中,對%{space_name} 參與空間的%{budget_name} 預算進行了投票。
|
163
|
-
projects:
|
164
|
-
budget_confirm:
|
165
|
-
are_you_sure: 如果您改變了主意,稍後可以更改您的選票。
|
166
|
-
cancel: 撤銷
|
167
|
-
confirm: 確認
|
168
|
-
description: 這些是您選擇納入預算的專案
|
169
|
-
title: 確認投票
|
170
|
-
budget_excess:
|
171
|
-
budget_excess:
|
172
|
-
description: 這個專案超出了預算上限,無法被加入。如果您願意,您可以刪除您已經選擇的一個專案,以便能夠根據您的偏好再次進行投票。
|
173
|
-
title: 已超過最高預算
|
174
|
-
close: 關閉
|
175
|
-
description: 這個專案超出了預算上限,無法被加入。如果您願意,您可以刪除您已經選擇的一個專案,以便能夠根據您的偏好再次進行投票。
|
176
|
-
ok: 好的
|
177
|
-
projects_excess:
|
178
|
-
description: 這個專案超出了最大項目數限制,無法被添加。如果你想的話,可以刪除你已經選擇的一個專案,以便根據你的偏好再次投票
|
179
|
-
title: 超過最大專案數量
|
180
|
-
budget_summary:
|
181
|
-
are_you_sure: 您確定要取消您的投票嗎?
|
182
|
-
assigned: '已指派:'
|
183
|
-
cancel_order: 刪除你的投票並重新開始
|
184
|
-
checked_out:
|
185
|
-
description: 你已經對預算表決投票了。如果你改變了主意,你可以%{cancel_link}。
|
186
|
-
title: 預算投票完成
|
187
|
-
minimum_projects_rule:
|
188
|
-
description: 您認為我們應該撥款給哪些專案?請選擇至少 %{minimum_number} 個您想要的專案,並根據您的偏好進行投票,以定義預算。
|
189
|
-
instruction: "<li>請選擇至少 %{minimum_number} 個您認為應該分配預算的項目,並根據您的喜好進行投票以定義預算。</li>"
|
190
|
-
projects_rule:
|
191
|
-
description: 你認為我們應該為哪些專案分配預算?請至少選擇 %{minimum_number} 個專案,最多可選擇 %{maximum_number} 個項目,並根據你的喜好投票以定義預算。
|
192
|
-
instruction: "<li>請至少選擇 %{minimum_number} 個至多 %{maximum_number} 個您想要的項專案,並根據您的喜好進行投票以定義預算。</li>"
|
193
|
-
projects_rule_maximum_only:
|
194
|
-
description: 你認為我們應該為哪些專案分配預算?請選擇最多 %{maximum_number} 個專案,根據你的喜好進行投票,來定義預算。
|
195
|
-
instruction: "\"<li>選擇最多 %{maximum_number} 個您想為其分配預算的專案,並根據您的喜好進行投票,以定義預算。</li>"
|
196
|
-
rules:
|
197
|
-
title: 預算規則
|
198
|
-
title: 你決定預算
|
199
|
-
total_budget: 總預算
|
200
|
-
total_projects: 總票數
|
201
|
-
vote_threshold_percent_rule:
|
202
|
-
description: 您覺得我們應該為哪些專案分配預算?為您想要的專案分配至少 %{minimum_budget} 的預算,並按照您的喜好進行投票以定義預算。
|
203
|
-
instruction: "\"<li>指派至少 %{minimum_budget} 的預算給您想支持的專案,然後根據您的喜好進行投票以制定預算。</li>"
|
204
|
-
count:
|
205
|
-
projects_count:
|
206
|
-
other: "%{count} 專案"
|
207
|
-
exit_modal:
|
208
|
-
cancel: 返回投票
|
209
|
-
close_modal: 關閉視窗
|
210
|
-
exit: 退出投票
|
211
|
-
message: 您的投票尚未被註冊,因為您尚未完成投票程序。您確定要退出投票嗎?
|
212
|
-
title: 您尚未投票
|
213
|
-
filters:
|
214
|
-
category: 類別
|
215
|
-
scope: 範圍
|
216
|
-
search: 搜尋
|
217
|
-
status: 狀態
|
218
|
-
status_values:
|
219
|
-
all: 全部
|
220
|
-
not_selected: 未選擇
|
221
|
-
selected: 已選取
|
222
|
-
filters_small_view:
|
223
|
-
close_modal: 關閉視窗
|
224
|
-
filter: 篩選
|
225
|
-
filter_by: 篩選條件
|
226
|
-
unfold: 展開
|
227
|
-
order_progress:
|
228
|
-
vote: 投票
|
229
|
-
order_selected_projects:
|
230
|
-
remove: 移除
|
231
|
-
selected_projects:
|
232
|
-
other: 已選擇的專案
|
233
|
-
view: 檢視
|
234
|
-
orders:
|
235
|
-
highest_cost: 最高成本
|
236
|
-
label: 專案排序方式
|
237
|
-
lowest_cost: 最低成本
|
238
|
-
most_voted: 最高票
|
239
|
-
random: 隨機順序
|
240
|
-
selected: 已選取
|
241
|
-
project:
|
242
|
-
add: 將專案 %{resource_name} 加入您的投票
|
243
|
-
remove: 從您的投票中移除專案 %{resource_name}
|
244
|
-
selected: 已選取
|
245
|
-
view: 檢視
|
246
|
-
votes:
|
247
|
-
other: 投票
|
248
|
-
you_voted: 你已投票支持此
|
249
|
-
project_budget_button:
|
250
|
-
add: 加入您的投票
|
251
|
-
add_descriptive: 將專案 %{resource_name} 加入您的投票
|
252
|
-
added: 加入您的投票
|
253
|
-
added_descriptive: 將專案 %{resource_name} 加入您的投票
|
254
|
-
projects_for: 專案 %{name}
|
255
|
-
show:
|
256
|
-
budget: 預算
|
257
|
-
view_all_projects: 檢視所有專案
|
258
|
-
components:
|
259
|
-
budgets:
|
260
|
-
actions:
|
261
|
-
comment: 評論
|
262
|
-
vote: 投票
|
263
|
-
name: 預算
|
264
|
-
settings:
|
265
|
-
global:
|
266
|
-
announcement: 公告
|
267
|
-
comments_enabled: 啟用評論功能
|
268
|
-
comments_max_length: 評論字數最大長度(若要使用預設值請輸入0)
|
269
|
-
form:
|
270
|
-
errors:
|
271
|
-
budget_voting_rule_only_one: 僅能啟用一個投票規則
|
272
|
-
budget_voting_rule_required: 必須啟用一種投票規則
|
273
|
-
landing_page_content: 預算網頁首頁
|
274
|
-
more_information_modal: 更多資訊彈出式視窗
|
275
|
-
projects_per_page: 每頁顯示專案
|
276
|
-
resources_permissions_enabled: 可為每個專案設定動作權限
|
277
|
-
scope_id: 範圍
|
278
|
-
scopes_enabled: 啟用範圍
|
279
|
-
title: 標題
|
280
|
-
total_budget: 總預算
|
281
|
-
vote_minimum_budget_projects_number: 最少需要投票的專案數量
|
282
|
-
vote_rule_minimum_budget_projects_enabled: '啟用規則:投票時需要投票的最少專案數量'
|
283
|
-
vote_rule_selected_projects_enabled: '啟用規則:最少和最多投票方案數量限制'
|
284
|
-
vote_rule_threshold_percent_enabled: '啟用規則: 最低預算百分比'
|
285
|
-
vote_selected_projects_maximum: 最多可以選擇的專案數量
|
286
|
-
vote_selected_projects_minimum: 最少可以選擇的專案數量
|
287
|
-
vote_threshold_percent: 投票門檻百分比
|
288
|
-
workflow: 工作流程
|
289
|
-
workflow_choices:
|
290
|
-
all: '全部投票:允許參與者投票所有預算。'
|
291
|
-
one: '僅限投一票: 參與者可以在任意預算中投票,但僅限投一票。'
|
292
|
-
step:
|
293
|
-
announcement: 公告
|
294
|
-
comments_blocked: 留言已封鎖
|
295
|
-
highlighted_heading: 突顯標題
|
296
|
-
landing_page_content: 預算網頁首頁
|
297
|
-
list_heading: 標題清單
|
298
|
-
more_information_modal: 更多資訊彈出式視窗
|
299
|
-
show_votes: 顯示投票
|
300
|
-
title: 標題
|
301
|
-
votes: 投票
|
302
|
-
votes_choices:
|
303
|
-
disabled: 投票已停用
|
304
|
-
enabled: 已啟用投票
|
305
|
-
finished: 投票已結束
|
306
|
-
events:
|
307
|
-
budgets:
|
308
|
-
budget_published:
|
309
|
-
email_intro: '現在 %{participatory_space_title} 的 %{resource_title} 預算已啟動,您可以從此頁面查看:'
|
310
|
-
email_outro: 你收到此通知是因為你正在追蹤 %{participatory_space_title}。你可以透過前面的連結停止接收通知。
|
311
|
-
email_subject: '%{participatory_space_title}」現在啟用了「%{resource_title}」預算。'
|
312
|
-
notification_title: <a href="%{resource_path}">%{resource_title}</a> 預算現在已經在 %{participatory_space_title} 上啟動
|
313
|
-
orders:
|
314
|
-
checkout:
|
315
|
-
error: 處理您的投票時出現問題。
|
316
|
-
success: 您的投票已成功接受
|
317
|
-
destroy:
|
318
|
-
error: 取消您的投票時出現問題
|
319
|
-
success: 您的投票已成功取消
|
320
|
-
resource_links:
|
321
|
-
included_proposals:
|
322
|
-
project_proposal: 此專案中包括的提案
|
323
|
-
statistics:
|
324
|
-
orders_count: 支援
|
325
|
-
projects_count: 專案
|
326
|
-
index:
|
327
|
-
confirmed_orders_count: 投票數
|
@@ -14,7 +14,7 @@ class VotesEnabledToVotesChoices < ActiveRecord::Migration[5.2]
|
|
14
14
|
new_steps_settings = component["settings"]["steps"].each_with_object({}) do |(step, config), new_config|
|
15
15
|
votes_value = config["votes_enabled"] ? "enabled" : "disabled"
|
16
16
|
|
17
|
-
new_config[step] = config.merge(
|
17
|
+
new_config[step] = config.merge(votes: votes_value).except("votes_enabled")
|
18
18
|
new_config
|
19
19
|
end
|
20
20
|
component["settings"]["steps"] = new_steps_settings
|
@@ -22,7 +22,7 @@ class VotesEnabledToVotesChoices < ActiveRecord::Migration[5.2]
|
|
22
22
|
elsif default_step.present?
|
23
23
|
votes_value = component["settings"]["default_step"]["votes_enabled"] ? "enabled" : "disabled"
|
24
24
|
|
25
|
-
new_default_step_settings = component["settings"]["default_step"].merge(
|
25
|
+
new_default_step_settings = component["settings"]["default_step"].merge(votes: votes_value).except("votes_enabled")
|
26
26
|
component["settings"]["default_step"] = new_default_step_settings
|
27
27
|
component.save!
|
28
28
|
end
|
@@ -0,0 +1,9 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
class AddGeolocalizationFieldsToProjects < ActiveRecord::Migration[6.1]
|
4
|
+
def change
|
5
|
+
add_column :decidim_budgets_projects, :address, :text
|
6
|
+
add_column :decidim_budgets_projects, :latitude, :float
|
7
|
+
add_column :decidim_budgets_projects, :longitude, :float
|
8
|
+
end
|
9
|
+
end
|
@@ -46,7 +46,7 @@ Decidim.register_component(:budgets) do |component|
|
|
46
46
|
|
47
47
|
component.register_stat :orders_count do |components, start_at, end_at|
|
48
48
|
budgets = Decidim::Budgets::Budget.where(component: components)
|
49
|
-
orders = Decidim::Budgets::Order.where(
|
49
|
+
orders = Decidim::Budgets::Order.where(budget: budgets)
|
50
50
|
orders = orders.where("created_at >= ?", start_at) if start_at.present?
|
51
51
|
orders = orders.where("created_at <= ?", end_at) if end_at.present?
|
52
52
|
orders.count
|
@@ -90,6 +90,7 @@ Decidim.register_component(:budgets) do |component|
|
|
90
90
|
settings.attribute :vote_selected_projects_maximum, type: :integer, default: 1
|
91
91
|
settings.attribute :comments_enabled, type: :boolean, default: true
|
92
92
|
settings.attribute :comments_max_length, type: :integer, required: false
|
93
|
+
settings.attribute :geocoding_enabled, type: :boolean, default: false
|
93
94
|
settings.attribute :resources_permissions_enabled, type: :boolean, default: true
|
94
95
|
settings.attribute :announcement, type: :text, translated: true, editor: true
|
95
96
|
|
@@ -123,7 +124,7 @@ Decidim.register_component(:budgets) do |component|
|
|
123
124
|
settings: {
|
124
125
|
landing_page_content: landing_page_content,
|
125
126
|
more_information_modal: Decidim::Faker::Localized.paragraph(sentence_count: 4),
|
126
|
-
workflow:
|
127
|
+
workflow: %w(one random all).sample
|
127
128
|
}
|
128
129
|
)
|
129
130
|
|
@@ -148,7 +149,7 @@ Decidim.register_component(:budgets) do |component|
|
|
148
149
|
description: Decidim::Faker::Localized.wrapped("<p>", "</p>") do
|
149
150
|
Decidim::Faker::Localized.paragraph(sentence_count: 3)
|
150
151
|
end,
|
151
|
-
budget_amount: Faker::Number.
|
152
|
+
budget_amount: Faker::Number.between(from: Integer(budget.total_budget * 0.7), to: budget.total_budget)
|
152
153
|
)
|
153
154
|
|
154
155
|
attachment_collection = Decidim::AttachmentCollection.create!(
|
@@ -163,7 +164,7 @@ Decidim.register_component(:budgets) do |component|
|
|
163
164
|
attachment_collection: attachment_collection,
|
164
165
|
attached_to: project,
|
165
166
|
content_type: "application/pdf",
|
166
|
-
file: ActiveStorage::Blob.
|
167
|
+
file: ActiveStorage::Blob.create_and_upload!(
|
167
168
|
io: File.open(File.join(__dir__, "seeds", "Exampledocument.pdf")),
|
168
169
|
filename: "Exampledocument.pdf",
|
169
170
|
content_type: "application/pdf",
|
@@ -175,7 +176,7 @@ Decidim.register_component(:budgets) do |component|
|
|
175
176
|
description: Decidim::Faker::Localized.sentence(word_count: 5),
|
176
177
|
attached_to: project,
|
177
178
|
content_type: "image/jpeg",
|
178
|
-
file: ActiveStorage::Blob.
|
179
|
+
file: ActiveStorage::Blob.create_and_upload!(
|
179
180
|
io: File.open(File.join(__dir__, "seeds", "city.jpeg")),
|
180
181
|
filename: "city.jpeg",
|
181
182
|
content_type: "image/jpeg",
|
@@ -187,7 +188,7 @@ Decidim.register_component(:budgets) do |component|
|
|
187
188
|
description: Decidim::Faker::Localized.sentence(word_count: 5),
|
188
189
|
attached_to: project,
|
189
190
|
content_type: "application/pdf",
|
190
|
-
file: ActiveStorage::Blob.
|
191
|
+
file: ActiveStorage::Blob.create_and_upload!(
|
191
192
|
io: File.open(File.join(__dir__, "seeds", "Exampledocument.pdf")),
|
192
193
|
filename: "Exampledocument.pdf",
|
193
194
|
content_type: "application/pdf",
|
@@ -42,6 +42,23 @@ module Decidim
|
|
42
42
|
initializer "decidim_budgets.webpacker.assets_path" do
|
43
43
|
Decidim.register_assets_path File.expand_path("app/packs", root)
|
44
44
|
end
|
45
|
+
|
46
|
+
initializer "decidim_budgets.register_reminders" do
|
47
|
+
Decidim.reminders_registry.register(:orders) do |reminder_registry|
|
48
|
+
reminder_registry.generator_class_name = "Decidim::Budgets::OrderReminderGenerator"
|
49
|
+
reminder_registry.form_class_name = "Decidim::Budgets::Admin::OrderReminderForm"
|
50
|
+
reminder_registry.command_class_name = "Decidim::Budgets::Admin::CreateOrderReminders"
|
51
|
+
|
52
|
+
reminder_registry.settings do |settings|
|
53
|
+
settings.attribute :reminder_times, type: :array, default: [2.hours, 1.week, 2.weeks]
|
54
|
+
end
|
55
|
+
|
56
|
+
reminder_registry.messages do |msg|
|
57
|
+
msg.set(:title) { |count: 0| I18n.t("decidim.budgets.admin.reminders.orders.title", count: count) }
|
58
|
+
msg.set(:description) { I18n.t("decidim.budgets.admin.reminders.orders.description") }
|
59
|
+
end
|
60
|
+
end
|
61
|
+
end
|
45
62
|
end
|
46
63
|
end
|
47
64
|
end
|
@@ -12,6 +12,14 @@ FactoryBot.define do
|
|
12
12
|
manifest_name { :budgets }
|
13
13
|
participatory_space { create(:participatory_process, :with_steps, organization: organization) }
|
14
14
|
|
15
|
+
trait :with_geocoding_enabled do
|
16
|
+
settings do
|
17
|
+
{
|
18
|
+
geocoding_enabled: true
|
19
|
+
}
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
15
23
|
trait :with_vote_threshold_percent do
|
16
24
|
transient do
|
17
25
|
vote_rule_threshold_percent_enabled { true }
|
@@ -120,6 +128,9 @@ FactoryBot.define do
|
|
120
128
|
factory :project, class: "Decidim::Budgets::Project" do
|
121
129
|
title { generate_localized_title }
|
122
130
|
description { Decidim::Faker::Localized.wrapped("<p>", "</p>") { generate_localized_title } }
|
131
|
+
address { "#{Faker::Address.street_name}, #{Faker::Address.city}" }
|
132
|
+
latitude { Faker::Address.latitude }
|
133
|
+
longitude { Faker::Address.longitude }
|
123
134
|
budget_amount { Faker::Number.number(digits: 8) }
|
124
135
|
budget { create(:budget) }
|
125
136
|
|