decidim-budgets 0.23.6 → 0.24.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/assets/javascripts/decidim/budgets/projects.js.es6 +30 -13
- data/app/cells/decidim/budgets/limit_announcement_cell.rb +1 -1
- data/app/cells/decidim/budgets/project_list_item/project_data_vote_button.erb +1 -0
- data/app/cells/decidim/budgets/project_list_item_cell.rb +4 -0
- data/app/commands/decidim/budgets/admin/import_proposals_to_budgets.rb +8 -1
- data/app/controllers/decidim/budgets/admin/budgets_controller.rb +22 -1
- data/app/controllers/decidim/budgets/orders_controller.rb +1 -1
- data/app/forms/decidim/budgets/admin/component_form.rb +57 -10
- data/app/forms/decidim/budgets/admin/project_form.rb +3 -2
- data/app/forms/decidim/budgets/admin/project_import_proposals_form.rb +11 -0
- data/app/helpers/decidim/budgets/projects_helper.rb +45 -1
- data/app/models/decidim/budgets/order.rb +94 -18
- data/app/permissions/decidim/budgets/admin/permissions.rb +1 -1
- data/app/views/decidim/budgets/admin/budgets/index.html.erb +22 -5
- data/app/views/decidim/budgets/admin/projects/index.html.erb +13 -6
- data/app/views/decidim/budgets/admin/proposals_imports/new.html.erb +6 -1
- data/app/views/decidim/budgets/projects/_budget_excess.html.erb +2 -2
- data/app/views/decidim/budgets/projects/_budget_summary.html.erb +32 -12
- data/app/views/decidim/budgets/projects/_order_progress.html.erb +1 -1
- data/app/views/decidim/budgets/projects/_order_total_budget.html.erb +5 -1
- data/config/locales/ar.yml +2 -5
- data/config/locales/ca.yml +7 -9
- data/config/locales/cs.yml +34 -6
- data/config/locales/de.yml +34 -6
- data/config/locales/el.yml +2 -6
- data/config/locales/en.yml +35 -7
- data/config/locales/es-MX.yml +26 -8
- data/config/locales/es-PY.yml +26 -8
- data/config/locales/es.yml +26 -8
- data/config/locales/eu.yml +2 -5
- data/config/locales/fi-plain.yml +34 -6
- data/config/locales/fi.yml +36 -8
- data/config/locales/fr-CA.yml +35 -7
- data/config/locales/fr.yml +35 -7
- data/config/locales/gl.yml +7 -22
- data/config/locales/hu.yml +2 -5
- data/config/locales/id-ID.yml +2 -5
- data/config/locales/is-IS.yml +2 -4
- data/config/locales/it.yml +2 -6
- data/config/locales/ja.yml +3 -7
- data/config/locales/lv.yml +2 -6
- data/config/locales/nl.yml +35 -7
- data/config/locales/no.yml +2 -7
- data/config/locales/pl.yml +38 -10
- data/config/locales/pt-BR.yml +2 -5
- data/config/locales/pt.yml +2 -6
- data/config/locales/ro-RO.yml +2 -67
- data/config/locales/ru.yml +2 -5
- data/config/locales/sk.yml +2 -6
- data/config/locales/sr-CS.yml +0 -2
- data/config/locales/sv.yml +26 -7
- data/config/locales/tr-TR.yml +31 -7
- data/config/locales/uk.yml +2 -5
- data/config/locales/zh-CN.yml +2 -7
- data/db/migrate/20200804175222_votes_enabled_to_votes_choices.rb +4 -4
- data/lib/decidim/api/budget_type.rb +21 -0
- data/lib/decidim/api/budgets_type.rb +26 -0
- data/lib/decidim/api/project_type.rb +23 -0
- data/lib/decidim/budgets/api.rb +9 -0
- data/lib/decidim/budgets/component.rb +31 -14
- data/lib/decidim/budgets/project_serializer.rb +81 -0
- data/lib/decidim/budgets/test/factories.rb +35 -1
- data/lib/decidim/budgets/version.rb +1 -1
- data/lib/decidim/budgets/workflows/all.rb +1 -1
- data/lib/decidim/budgets/workflows/base.rb +3 -3
- data/lib/decidim/budgets/workflows/one.rb +1 -1
- data/lib/decidim/budgets.rb +2 -0
- metadata +21 -19
- data/app/types/decidim/budgets/budget_type.rb +0 -24
- data/app/types/decidim/budgets/budgets_type.rb +0 -32
- data/app/types/decidim/budgets/project_type.rb +0 -26
data/config/locales/ro-RO.yml
CHANGED
@@ -1,18 +1,11 @@
|
|
1
1
|
ro:
|
2
2
|
activemodel:
|
3
3
|
attributes:
|
4
|
-
budget:
|
5
|
-
decidim_scope_id: Domeniu
|
6
|
-
description: Descriere
|
7
|
-
title: Titlu
|
8
|
-
total_budget: Total budget
|
9
4
|
project:
|
10
|
-
budget_amount: Sumă bugetară
|
11
5
|
decidim_category_id: Categorie
|
12
6
|
decidim_scope_id: Domeniu
|
13
7
|
description: Descriere
|
14
8
|
proposal_ids: Propuneri conexe
|
15
|
-
selected: Selectate pentru implementare
|
16
9
|
title: Titlu
|
17
10
|
activerecord:
|
18
11
|
models:
|
@@ -28,33 +21,11 @@ ro:
|
|
28
21
|
confirm_destroy: Sunteţi sigur că doriţi să ştergeţi acest proiect?
|
29
22
|
destroy: Ștergere
|
30
23
|
edit: Editare
|
31
|
-
edit_projects: Gestionați proiectele
|
32
24
|
import: Importă propuneri în proiecte
|
33
|
-
new: Nou %{name}
|
34
25
|
preview: Previzualizare
|
35
26
|
title: Acțiuni
|
36
27
|
admin:
|
37
|
-
budgets:
|
38
|
-
create:
|
39
|
-
invalid: A apărut o problemă la crearea acestui buget
|
40
|
-
success: Buget creat cu succes
|
41
|
-
destroy:
|
42
|
-
invalid: A apărut o eroare la ștergerea acestui buget
|
43
|
-
success: Bugetul a fost șters
|
44
|
-
edit:
|
45
|
-
title: Editare buget
|
46
|
-
update: Actualizați bugetul
|
47
|
-
index:
|
48
|
-
title: Bugete
|
49
|
-
new:
|
50
|
-
create: Creați un buget
|
51
|
-
title: Buget nou
|
52
|
-
update:
|
53
|
-
invalid: A apărut o eroare la actualizarea acestui buget
|
54
|
-
success: Buget actualizat cu succes
|
55
28
|
models:
|
56
|
-
budget:
|
57
|
-
name: Buget
|
58
29
|
project:
|
59
30
|
name: Proiect
|
60
31
|
projects:
|
@@ -69,7 +40,6 @@ ro:
|
|
69
40
|
index:
|
70
41
|
finished_orders: Voturi terminate
|
71
42
|
pending_orders: Voturi în așteptare
|
72
|
-
selected: Selectate
|
73
43
|
title: Proiecte
|
74
44
|
new:
|
75
45
|
create: Crează
|
@@ -86,39 +56,11 @@ ro:
|
|
86
56
|
no_components: Nu există alte componente de propunere în acest spațiu participativ pentru a importa propunerile în proiecte.
|
87
57
|
select_component: Vă rugăm să selectaţi o componentă
|
88
58
|
admin_log:
|
89
|
-
budget:
|
90
|
-
create: "%{user_name} a creat bugetul %{resource_name} în spațiul %{space_name}"
|
91
|
-
delete: "%{user_name} a șters bugetul %{resource_name} în spațiul %{space_name}"
|
92
|
-
update: "%{user_name} a actualizat bugetul %{resource_name} în spațiul %{space_name}"
|
93
59
|
project:
|
94
60
|
create: "%{user_name} a creat proiectul %{resource_name} în spațiul %{space_name}"
|
95
61
|
delete: "%{user_name} a șters proiectul %{resource_name} în spațiul %{space_name}"
|
96
62
|
update: "%{user_name} a actualizat proiectul %{resource_name} în spațiul %{space_name}"
|
97
|
-
budget:
|
98
|
-
view: Vezi toate proiectele bugetare
|
99
|
-
budget_information_modal:
|
100
|
-
back_to: Înapoi la %{component_name}
|
101
|
-
close_modal: Închidere
|
102
|
-
continue: Continuă
|
103
|
-
more_information: Mai multe informații
|
104
|
-
budgets_list:
|
105
|
-
cancel_order:
|
106
|
-
more_than_one: șterge votul pentru %{name} și începe din nou
|
107
|
-
only_one: șterge votul și începe din nou.
|
108
|
-
finished_message: Ai terminat procesul de vot. Mulțumim pentru participare!
|
109
|
-
highlighted_cta: Votează la %{name}
|
110
|
-
if_change_opinion: Dacă v-ați răzgândit, puteți
|
111
|
-
my_budgets: Bugetele mele
|
112
|
-
voted_on: Ai votat pentru %{links}
|
113
|
-
limit_announcement:
|
114
|
-
cant_vote: Nu puteți vota pentru acest buget. <a href="%{landing_path}">Încercați un alt buget</a>.
|
115
|
-
limit_reached: Voturi active în %{links}. Pentru a vota cu privire la acest buget, trebuie să <a href="%{landing_path}">ștergeți votul și să reîncepeți</a>.
|
116
63
|
models:
|
117
|
-
budget:
|
118
|
-
fields:
|
119
|
-
name: Nume
|
120
|
-
projects_count: Număr de proiecte
|
121
|
-
total_budget: Buget total
|
122
64
|
project:
|
123
65
|
fields:
|
124
66
|
title: Titlu
|
@@ -126,8 +68,6 @@ ro:
|
|
126
68
|
order_summary:
|
127
69
|
selected_projects: 'Proiectele pe care le-aţi selectat sunt:'
|
128
70
|
subject: Ați votat pentru spațiul participativ %{space_name}
|
129
|
-
voted_on_space: Ați votat asupra bugetului %{budget_name} pentru spațiul participativ al %{space_name}.
|
130
|
-
voted_on_space_with_scope: Ați votat bugetul pentru %{budget_name} pentru spațiul participativ %{space_name} pe %{scope_name} (%{scope_type}).
|
131
71
|
projects:
|
132
72
|
budget_confirm:
|
133
73
|
cancel: Anulează
|
@@ -135,10 +75,10 @@ ro:
|
|
135
75
|
description: Acestea sunt proiectele pe care aţi ales să le faceţi parte din buget.
|
136
76
|
title: Confirmă votul
|
137
77
|
budget_excess:
|
78
|
+
budget_excess:
|
79
|
+
title: Buget maxim depășit
|
138
80
|
close: Inchide
|
139
|
-
description: Acest proiect depășește bugetul maxim și nu poate fi adăugat. Dacă doriți, puteți șterge un proiect pe care l-ați selectat deja pentru a adăuga sau puteți vota cu preferințele dvs.
|
140
81
|
ok: Ok
|
141
|
-
title: Buget maxim depășit
|
142
82
|
budget_summary:
|
143
83
|
are_you_sure: Ești sigur că vrei să anulezi votul?
|
144
84
|
assigned: 'Atribuit'
|
@@ -146,8 +86,6 @@ ro:
|
|
146
86
|
checked_out:
|
147
87
|
description: Ai votat deja pentru buget. Dacă te-ai răzgândit, poți %{cancel_link}.
|
148
88
|
title: Votul pentru buget finalizat
|
149
|
-
description: Ce proiecte credeţi că ar trebui să alocăm bugetul? Atribuiți cel puțin %{minimum_budget} proiectelor pe care le doriți și votați cu preferințele dvs. pentru a defini bugetul.
|
150
|
-
description_minimum_projects_rule: Ce proiecte credeţi că ar trebui să alocăm bugetul? Selectați cel puțin %{minimum_number} proiecte pe care le doriți și votați cu preferințele dvs. pentru a defini bugetul.
|
151
89
|
title: Dumneavoastră decideţi bugetul
|
152
90
|
count:
|
153
91
|
projects_count:
|
@@ -182,7 +120,6 @@ ro:
|
|
182
120
|
add: Adaugă proiectul %{resource_name} la votul tău
|
183
121
|
remove: Elimină proiectul %{resource_name} din votul tău
|
184
122
|
view: Vizualizare
|
185
|
-
you_voted: Ați votat
|
186
123
|
project_budget_button:
|
187
124
|
add: Adaugă la votul tău
|
188
125
|
add_descriptive: Adaugă proiectul %{resource_name} la votul tău
|
@@ -206,7 +143,6 @@ ro:
|
|
206
143
|
budget_voting_rule_only_one: Doar o singură regulă de vot trebuie activată
|
207
144
|
budget_voting_rule_required: Este necesară o regulă de vot
|
208
145
|
projects_per_page: Proiecte pe pagină
|
209
|
-
resources_permissions_enabled: Permisiunile de acțiuni pot fi setate pentru fiecare întâlnire
|
210
146
|
total_budget: Buget total
|
211
147
|
vote_minimum_budget_projects_number: Numărul minim de proiecte de votat
|
212
148
|
vote_rule_minimum_budget_projects_enabled: 'Permite regula: numărul minim de proiecte care urmează să fie votate pe'
|
@@ -230,4 +166,3 @@ ro:
|
|
230
166
|
project_proposal: 'Propuneri incluse în acest proiect:'
|
231
167
|
index:
|
232
168
|
confirmed_orders_count: Numărul de voturi
|
233
|
-
total_budget: Buget total
|
data/config/locales/ru.yml
CHANGED
@@ -72,10 +72,10 @@ ru:
|
|
72
72
|
description: Вот те проекты, которые вы выбрали для включения в бюджет.
|
73
73
|
title: Подтвердить голос
|
74
74
|
budget_excess:
|
75
|
+
budget_excess:
|
76
|
+
title: Превышен предельный бюджет
|
75
77
|
close: Закрыть
|
76
|
-
description: Добавление этого проекта превысит предельный бюджет, и поэтому его сейчас нельзя добавить. Если хотите, вы можете удалить один из проектов, который вы ранее выбрали для добавления, или проголосовать за то распределение средств, которое вы уже сделали.
|
77
78
|
ok: Хорошо
|
78
|
-
title: Превышен предельный бюджет
|
79
79
|
budget_summary:
|
80
80
|
are_you_sure: Вы действительно хотите отменить свой голос?
|
81
81
|
assigned: 'Выделено:'
|
@@ -83,7 +83,6 @@ ru:
|
|
83
83
|
checked_out:
|
84
84
|
description: Вы уже голосовали за бюджет. Если вы передумали, вы можете %{cancel_link}.
|
85
85
|
title: Голосование по бюджету завершено
|
86
|
-
description: Какие проекты, по вашему мнению, заслуживают выделения средств? Выделите не менее %{minimum_budget} проектам, которые вы поддерживаете, и проголосуйте за такое распределение средств, чтобы определить бюджет.
|
87
86
|
title: Вы определяете бюджет
|
88
87
|
count:
|
89
88
|
projects_count:
|
@@ -125,7 +124,6 @@ ru:
|
|
125
124
|
announcement: Объявление
|
126
125
|
comments_enabled: Комментарии включены
|
127
126
|
projects_per_page: Проектов на страницу
|
128
|
-
resources_permissions_enabled: Для каждой встречи можно задать те или иные разрешения на действия
|
129
127
|
total_budget: Общий бюджет
|
130
128
|
vote_threshold_percent: Минимальный процент бюджета для голосования
|
131
129
|
step:
|
@@ -146,4 +144,3 @@ ru:
|
|
146
144
|
project_proposal: 'Предложения, включенные в этот проект:'
|
147
145
|
index:
|
148
146
|
confirmed_orders_count: Количество голосов
|
149
|
-
total_budget: Общий бюджет
|
data/config/locales/sk.yml
CHANGED
@@ -75,10 +75,10 @@ sk:
|
|
75
75
|
description: Na týchto projektoch ste si zvolili účasť na rozpočte.
|
76
76
|
title: Potvrdiť hlas
|
77
77
|
budget_excess:
|
78
|
+
budget_excess:
|
79
|
+
title: Maximálny rozpočet prekročený
|
78
80
|
close: Zavrieť
|
79
|
-
description: Tento projekt prekročil maximálny rozpočet a nemôže byť pridaný. Ak chcete, môžete vymazať niektorý projekt, ktorý ste už zvolili, alebo hlasovať svojimi preferenciami.
|
80
81
|
ok: OK
|
81
|
-
title: Maximálny rozpočet prekročený
|
82
82
|
budget_summary:
|
83
83
|
are_you_sure: Naozaj chcete zrušiť svoj hlas?
|
84
84
|
assigned: 'Priradený:'
|
@@ -86,8 +86,6 @@ sk:
|
|
86
86
|
checked_out:
|
87
87
|
description: Už ste hlasovali za rozpočet. Ak ste zmenili názor, môžete %{cancel_link}.
|
88
88
|
title: Hlasovanie o rozpočte dokončené
|
89
|
-
description: Na ktoré projekty by sme podľa Vás mali vyčleniť rozpočet? Vyberte si aspoň %{minimum_budget} na projekty, ktoré chcete, a hlasujte podľa svojich preferencií pre definovanie rozpočtu.
|
90
|
-
description_minimum_projects_rule: Na ktoré projekty by sme podľa Vás mali vyčleniť rozpočet? Vyberte si aspoň %{minimum_number} projektov, ktoré chcete, a hlasujte podľa svojich preferencií za rozpočet.
|
91
89
|
title: Vy rozhodujete o rozpočte
|
92
90
|
count:
|
93
91
|
projects_count:
|
@@ -139,7 +137,6 @@ sk:
|
|
139
137
|
budget_voting_rule_only_one: Povolený smie byť iba jeden spôsob hlasovania
|
140
138
|
budget_voting_rule_required: Požaduje sa jeden spôsob hlasovania
|
141
139
|
projects_per_page: Projektov na stránke
|
142
|
-
resources_permissions_enabled: Povolenia pre akcie môžu byť nastavené pre každé stretnutie zvlášť
|
143
140
|
total_budget: Celkový rozpočet
|
144
141
|
vote_minimum_budget_projects_number: Minimálny počet projektov, za ktoré je možné hlasovať
|
145
142
|
vote_rule_minimum_budget_projects_enabled: 'Povoliť pravidlo: Minimálny počet projektov, za ktoré je možné hlasovať'
|
@@ -163,4 +160,3 @@ sk:
|
|
163
160
|
project_proposal: 'Návrhy, zahrnuté v rámci tohto projektu:'
|
164
161
|
index:
|
165
162
|
confirmed_orders_count: Počet hlasov
|
166
|
-
total_budget: Celkový rozpočet
|
data/config/locales/sr-CS.yml
CHANGED
@@ -6,8 +6,6 @@ sr:
|
|
6
6
|
selected_projects: 'Projekti koje ste izabrali su:'
|
7
7
|
subject: Glasali ste na prostoru za diskusiju %{space_name}
|
8
8
|
projects:
|
9
|
-
budget_summary:
|
10
|
-
description_minimum_projects_rule: Za koje projekte mislite da bi trebalo da odvojimo sredstva u budžetu? Odaberite bar %{minimum_number} projekata koje želite, glasajte za predloge koji vam se sviđaju i tako pomognite u definisanju budžeta.
|
11
9
|
orders:
|
12
10
|
highest_cost: Najveća cena
|
13
11
|
label: Poređaj projekte po
|
data/config/locales/sv.yml
CHANGED
@@ -136,10 +136,15 @@ sv:
|
|
136
136
|
description: De projekt där du har valt att delta i budgeten.
|
137
137
|
title: Bekräfta röst
|
138
138
|
budget_excess:
|
139
|
+
budget_excess:
|
140
|
+
description: Detta projekt överstiger den maximala budgeten och kan inte läggas till. Om du vill kan du ta bort ett projekt som du redan har lagt till, eller lämna in en röst enligt dina önskemål.
|
141
|
+
title: Maximal budget överskriden
|
139
142
|
close: Stäng
|
140
|
-
description: Detta projekt överstiger den maximala budgeten och kan inte läggas till. Om du vill kan du ta bort ett projekt som du redan har lagt till, eller lämna in en röst
|
143
|
+
description: Detta projekt överstiger den maximala budgeten och kan inte läggas till. Om du vill kan du ta bort ett projekt som du redan har lagt till, eller lämna in en röst enligt dina önskemål.
|
141
144
|
ok: OK
|
142
|
-
|
145
|
+
projects_excess:
|
146
|
+
description: Detta projekt överstiger det maximala antal projekt och kan inte läggas till. Om du vill kan du ta bort ett projekt som du redan har lagt till, eller lämna in en röst enligt dina önskemål.
|
147
|
+
title: Maximalt antal projekt överskridet
|
143
148
|
budget_summary:
|
144
149
|
are_you_sure: Vill du dra tillbaka din röst?
|
145
150
|
assigned: 'Tilldelad:'
|
@@ -147,9 +152,23 @@ sv:
|
|
147
152
|
checked_out:
|
148
153
|
description: Du har redan röstat för budgeten. Om du har ändrat dig kan du %{cancel_link}.
|
149
154
|
title: Budgetomröstning slutförd
|
150
|
-
|
151
|
-
|
155
|
+
minimum_projects_rule:
|
156
|
+
description: Vilka projekt tycker du att vi ska anslå budgetmedel för? Välj minst %{minimum_number} projekt som du vill ha och rösta enligt dina egna preferenser för att definiera budgeten.
|
157
|
+
instruction: "<li>Välj minst %{minimum_number} projekt som du vill ha och rösta enligt dina egna preferenser för att definiera budgeten.</li>"
|
158
|
+
projects_rule:
|
159
|
+
description: Vilka projekt tycker du att vi ska anslå budgetmedel för? Välj minst %{minimum_number} projekt och upp till %{maximum_number} som du vill ha och rösta enligt dina egna preferenser för att definiera budgeten.
|
160
|
+
instruction: "<li>Välj minst %{minimum_number} and upp till %{maximum_number} projekt som du vill ha och rösta enligt dina egna preferenser för att definiera budgeten.</li>"
|
161
|
+
projects_rule_maximum_only:
|
162
|
+
description: Vilka projekt tycker du att vi ska anslå budgetmedel för? Välj upp till %{maximum_number} projekt som du vill ha och rösta enligt dina egna preferenser för att definiera budgeten.
|
163
|
+
instruction: "<li>Välj upp till %{maximum_number} projekt som du vill ha och rösta enligt dina egna preferenser för att definiera budgeten.</li>"
|
164
|
+
rules:
|
165
|
+
title: Budgetregler
|
152
166
|
title: Du bestämmer budgeten
|
167
|
+
total_budget: Total budget
|
168
|
+
total_projects: Totala röster
|
169
|
+
vote_threshold_percent_rule:
|
170
|
+
description: Vilka projekt tycker du vi borde allokera en budget för? Tilldela åtminstone %{minimum_budget} till projekten som du vill ha rösta med dina preferenser för att definiera budgeten.
|
171
|
+
instruction: "<li>Sätt minst %{minimum_budget} till de projekt du vill ha och rösta enligt dina egna preferenser för att definiera budgeten.</li>"
|
153
172
|
count:
|
154
173
|
projects_count:
|
155
174
|
one: Ett projekt
|
@@ -191,7 +210,7 @@ sv:
|
|
191
210
|
votes:
|
192
211
|
one: röst
|
193
212
|
other: röster
|
194
|
-
you_voted:
|
213
|
+
you_voted: Det här är din röst
|
195
214
|
project_budget_button:
|
196
215
|
add: Lägg till i din röst
|
197
216
|
add_descriptive: Lägg till projekt %{resource_name} till din röst
|
@@ -218,13 +237,14 @@ sv:
|
|
218
237
|
landing_page_content: Budgetarnas landningssida
|
219
238
|
more_information_modal: Fönster "Mer information"
|
220
239
|
projects_per_page: Projekt per sida
|
221
|
-
resources_permissions_enabled: Åtgärdsbehörigheter kan ställas in för varje
|
240
|
+
resources_permissions_enabled: Åtgärdsbehörigheter kan ställas in för varje projekt
|
222
241
|
scope_id: Omfång
|
223
242
|
scopes_enabled: Omfång aktiverade
|
224
243
|
title: Titel
|
225
244
|
total_budget: Total budget
|
226
245
|
vote_minimum_budget_projects_number: Minsta antal projekt att rösta om
|
227
246
|
vote_rule_minimum_budget_projects_enabled: 'Aktivera regel: Minsta antal projekt att rösta om'
|
247
|
+
vote_rule_selected_projects_enabled: 'Aktivera regel: Valda projekt med min och max antal projekt att välja'
|
228
248
|
vote_rule_threshold_percent_enabled: 'Aktivera regel: Lägsta procentandel av budget'
|
229
249
|
vote_threshold_percent: Tröskel för röster i procent
|
230
250
|
workflow: Arbetsflöde
|
@@ -264,4 +284,3 @@ sv:
|
|
264
284
|
project_proposal: 'Förslag som ingår i detta projekt:'
|
265
285
|
index:
|
266
286
|
confirmed_orders_count: Antal röster
|
267
|
-
total_budget: Total budget
|
data/config/locales/tr-TR.yml
CHANGED
@@ -52,6 +52,8 @@ tr:
|
|
52
52
|
update:
|
53
53
|
invalid: Bu bütçe güncellenirken bir sorunla karşılaşıldı
|
54
54
|
success: Bütçe başarıyla güncellendi
|
55
|
+
exports:
|
56
|
+
projects: Projeler
|
55
57
|
models:
|
56
58
|
budget:
|
57
59
|
name: Bütçe
|
@@ -85,6 +87,7 @@ tr:
|
|
85
87
|
create: Teklifleri projelere aktarın
|
86
88
|
no_components: Bu katılımcı alanda teklifleri projelere aktarmak için başka bir teklif bileşeni yoktur.
|
87
89
|
select_component: Lütfen bir bileşen seçin
|
90
|
+
title: Teklifleri içe aktar
|
88
91
|
admin_log:
|
89
92
|
budget:
|
90
93
|
create: "%{user_name}, %{space_name} alanında %{resource_name} bütçesini oluşturdu"
|
@@ -136,10 +139,15 @@ tr:
|
|
136
139
|
description: Bunlar bütçenin bir parçası olmak için seçtiğiniz projeler.
|
137
140
|
title: Oyu onayla
|
138
141
|
budget_excess:
|
142
|
+
budget_excess:
|
143
|
+
description: Bu proje maksimum bütçeyi aşıyor ve eklenemez. Dilerseniz daha önce eklemeyi seçmiş olduğunuz bir projeyi silebilir veya tercihlerinize göre oyunuzu verebilirsiniz.
|
144
|
+
title: Maksimum bütçe aşıldı
|
139
145
|
close: Kapat
|
140
|
-
description: Bu proje
|
146
|
+
description: Bu proje maksimum bütçeyi aşıyor ve eklenemez. Dilerseniz daha önce eklemeyi seçmiş olduğunuz bir projeyi silebilir veya tercihlerinize göre oyunuzu verebilirsiniz.
|
141
147
|
ok: TAMAM
|
142
|
-
|
148
|
+
projects_excess:
|
149
|
+
description: Bu proje maksimum proje sayısını aşıyor ve eklenemez. Dilerseniz daha önce eklemeyi seçmiş olduğunuz bir projeyi silebilir veya tercihlerinize göre oyunuzu verebilirsiniz.
|
150
|
+
title: Maksimum proje sınırını aştı
|
143
151
|
budget_summary:
|
144
152
|
are_you_sure: Oyunuzu iptal etmek istediğinizden emin misiniz?
|
145
153
|
assigned: 'atanan:'
|
@@ -147,9 +155,23 @@ tr:
|
|
147
155
|
checked_out:
|
148
156
|
description: Bütçeye zaten oy verdiniz. Fikrinizi değiştirdiyseniz, %{cancel_link}yapabilirsiniz.
|
149
157
|
title: Bütçe oyu tamamlandı
|
150
|
-
|
151
|
-
|
158
|
+
minimum_projects_rule:
|
159
|
+
description: Sizce hangi projeler için bütçe ayırmalıyız? Bütçeyi belirlemek için istediğiniz en az %{minimum_number} proje seçin ve tercihlerinize göre oy verin.
|
160
|
+
instruction: "<li> İstediğiniz en az %{minimum_number} proje seçin ve bütçeyi belirlemek için tercihlerinize göre oylayın. </li>"
|
161
|
+
projects_rule:
|
162
|
+
description: Sizce hangi projeler için bütçe ayırmalıyız? İstediğiniz en az %{minimum_number} ve en fazla %{maximum_number} proje seçin ve bütçeyi belirlemek için tercihlerinize göre oy verin.
|
163
|
+
instruction: "<li> İstediğiniz en az %{minimum_number} ve en fazla %{maximum_number} proje seçin ve bütçeyi belirlemek için tercihlerinize göre oylayın. </li>"
|
164
|
+
projects_rule_maximum_only:
|
165
|
+
description: Sizce hangi projeler için bütçe ayırmalıyız? İstediğiniz en fazla %{maximum_number} proje seçin ve bütçeyi belirlemek için tercihlerinize göre oylayın.
|
166
|
+
instruction: "<li> İstediğiniz en fazla %{maximum_number} proje seçin ve bütçeyi belirlemek için tercihlerinize göre oylayın. </li>"
|
167
|
+
rules:
|
168
|
+
title: Bütçe kuralları
|
152
169
|
title: Bütçeye siz karar verin
|
170
|
+
total_budget: Toplam bütçe
|
171
|
+
total_projects: Toplam Oy
|
172
|
+
vote_threshold_percent_rule:
|
173
|
+
description: Sizce hangi projeler için bütçe ayırmalıyız? Bütçeyi belirlemek için istediğiniz projelere en az %{minimum_budget} atayın ve tercihlerinize göre oy verin.
|
174
|
+
instruction: "<li> İstediğiniz projelere en az %{minimum_budget} atayın ve bütçeyi belirlemek için tercihlerinize göre oy verin. </li>"
|
153
175
|
count:
|
154
176
|
projects_count:
|
155
177
|
one: 1 proje
|
@@ -191,7 +213,7 @@ tr:
|
|
191
213
|
votes:
|
192
214
|
one: oy
|
193
215
|
other: oylar
|
194
|
-
you_voted:
|
216
|
+
you_voted: Buna oy verdin
|
195
217
|
project_budget_button:
|
196
218
|
add: Oyunuza ekleyin
|
197
219
|
add_descriptive: Oyunuza %{resource_name} projesini ekleyin
|
@@ -218,14 +240,17 @@ tr:
|
|
218
240
|
landing_page_content: Bütçeler ana sayfası
|
219
241
|
more_information_modal: Daha fazla bilgi
|
220
242
|
projects_per_page: Sayfa başına projeler
|
221
|
-
resources_permissions_enabled: Her
|
243
|
+
resources_permissions_enabled: Her proje için eylem izinleri ayarlanabilir
|
222
244
|
scope_id: Kapsam
|
223
245
|
scopes_enabled: Kapsamlar etkinleştirildi
|
224
246
|
title: Başlık
|
225
247
|
total_budget: Toplam bütçe
|
226
248
|
vote_minimum_budget_projects_number: Oy verilecek minimum proje sayısı
|
227
249
|
vote_rule_minimum_budget_projects_enabled: 'Kuralı etkinleştir: Oylanacak minimum proje sayısı'
|
250
|
+
vote_rule_selected_projects_enabled: 'Kuralı etkinleştir: Oylanacak minimum ve maksimum sayıda projeye sahip seçilen projeler'
|
228
251
|
vote_rule_threshold_percent_enabled: 'Kuralı etkinleştir: Minimum bütçe yüzdesi'
|
252
|
+
vote_selected_projects_maximum: Seçilecek maksimum proje sayısı
|
253
|
+
vote_selected_projects_minimum: Seçilecek minimum proje sayısı
|
229
254
|
vote_threshold_percent: Oy eşiği yüzde
|
230
255
|
workflow: İş Akışı
|
231
256
|
workflow_choices:
|
@@ -264,4 +289,3 @@ tr:
|
|
264
289
|
project_proposal: 'Bu projede yer alan teklifler:'
|
265
290
|
index:
|
266
291
|
confirmed_orders_count: Oy sayısı
|
267
|
-
total_budget: Toplam bütçe
|
data/config/locales/uk.yml
CHANGED
@@ -72,10 +72,10 @@ uk:
|
|
72
72
|
description: Ось проекти, які ви обрали складовими бюджету.
|
73
73
|
title: Підтвердьте голос
|
74
74
|
budget_excess:
|
75
|
+
budget_excess:
|
76
|
+
title: Перевищено граничний бюджет
|
75
77
|
close: Закрити
|
76
|
-
description: Додавання цього проекту перевищить максимальний бюджет, і тому його не можна зараз додати. За бажанням ви можете видалити якийсь з тих проектів, що ви раніше вибрали для додавання, або проголосувати згідно ваших уподобань.
|
77
78
|
ok: Гаразд
|
78
|
-
title: Перевищено граничний бюджет
|
79
79
|
budget_summary:
|
80
80
|
are_you_sure: Ви дійсно бажаєте скасувати ваш голос?
|
81
81
|
assigned: 'Надано:'
|
@@ -83,7 +83,6 @@ uk:
|
|
83
83
|
checked_out:
|
84
84
|
description: Ви вже проголосували за бюджет. Якщо ви змінили свою думку, ви можете %{cancel_link}.
|
85
85
|
title: Голосування щодо бюджету завершено
|
86
|
-
description: На які проекти, на вашу думку, ми маємо виділити кошти? Надавайте принаймні %{minimum_budget} бажаним для вас проектам та голосуйте згідно своїх уподобань, щоб визначити бюджет.
|
87
86
|
title: Ви визначаєте бюджет
|
88
87
|
count:
|
89
88
|
projects_count:
|
@@ -125,7 +124,6 @@ uk:
|
|
125
124
|
announcement: Оголошення
|
126
125
|
comments_enabled: Коментарі увімкнено
|
127
126
|
projects_per_page: Проектів на сторінку
|
128
|
-
resources_permissions_enabled: Для кожної зустрічі можна встановити ті чи інші дозволи на дії
|
129
127
|
total_budget: Загальний бюджет
|
130
128
|
vote_threshold_percent: Мінімальний відсоток бюджету для голосування
|
131
129
|
step:
|
@@ -146,4 +144,3 @@ uk:
|
|
146
144
|
project_proposal: 'Пропозиції, включені до цього проекту:'
|
147
145
|
index:
|
148
146
|
confirmed_orders_count: Кількість голосів
|
149
|
-
total_budget: Загальний бюджет
|
data/config/locales/zh-CN.yml
CHANGED
@@ -133,10 +133,10 @@ zh-CN:
|
|
133
133
|
description: 这些是你选择作为预算一部分的项目。
|
134
134
|
title: 确认投票
|
135
135
|
budget_excess:
|
136
|
+
budget_excess:
|
137
|
+
title: 超出最大预算
|
136
138
|
close: 关闭
|
137
|
-
description: 此项目超出了最大预算,无法添加。 如果你想要,你可以删除一个你已经选择添加的项目,或者选择你的首选项投票。
|
138
139
|
ok: 好的
|
139
|
-
title: 超出最大预算
|
140
140
|
budget_summary:
|
141
141
|
are_you_sure: 您确定要取消您的投票吗?
|
142
142
|
assigned: '已指派:'
|
@@ -144,8 +144,6 @@ zh-CN:
|
|
144
144
|
checked_out:
|
145
145
|
description: 您已经投票给了预算。如果您改变了主意,您可以 %{cancel_link}。
|
146
146
|
title: 预算投票完成
|
147
|
-
description: 你认为我们应该为哪些项目分配预算? 给您想要的项目分配至少 %{minimum_budget} ,并且以您的首选项投票来定义预算。
|
148
|
-
description_minimum_projects_rule: 你认为我们应该为哪些项目分配预算? 选择至少 %{minimum_number} 个项目,您想要并以您的首选项投票来定义预算。
|
149
147
|
title: 您决定预算
|
150
148
|
count:
|
151
149
|
projects_count:
|
@@ -185,7 +183,6 @@ zh-CN:
|
|
185
183
|
view: 查看
|
186
184
|
votes:
|
187
185
|
other: 投票
|
188
|
-
you_voted: 您投票了
|
189
186
|
project_budget_button:
|
190
187
|
add: 添加到您的投票
|
191
188
|
add_descriptive: 将项目 %{resource_name} 添加到您的投票
|
@@ -212,7 +209,6 @@ zh-CN:
|
|
212
209
|
landing_page_content: 预算登陆页
|
213
210
|
more_information_modal: 更多信息模式
|
214
211
|
projects_per_page: 每页项目数
|
215
|
-
resources_permissions_enabled: 每次会议都可以设置动作权限
|
216
212
|
scope_id: 范围
|
217
213
|
scopes_enabled: 范围已启用
|
218
214
|
title: 标题
|
@@ -257,4 +253,3 @@ zh-CN:
|
|
257
253
|
project_proposal: '本项目中的建议:'
|
258
254
|
index:
|
259
255
|
confirmed_orders_count: 所得票数
|
260
|
-
total_budget: 预算总额
|
@@ -7,12 +7,12 @@ class VotesEnabledToVotesChoices < ActiveRecord::Migration[5.2]
|
|
7
7
|
|
8
8
|
def up
|
9
9
|
budget_components.each do |component|
|
10
|
-
steps = component["settings"] && component["settings"]
|
11
|
-
default_step = component["settings"] && component["settings"]
|
10
|
+
steps = component["settings"] && component["settings"]["steps"]
|
11
|
+
default_step = component["settings"] && component["settings"]["default_step"]
|
12
12
|
|
13
13
|
if steps.present?
|
14
14
|
new_steps_settings = component["settings"]["steps"].each_with_object({}) do |(step, config), new_config|
|
15
|
-
votes_value = config
|
15
|
+
votes_value = config["votes_enabled"] ? "enabled" : "disabled"
|
16
16
|
|
17
17
|
new_config[step] = config.merge("votes": votes_value).except("votes_enabled")
|
18
18
|
new_config
|
@@ -20,7 +20,7 @@ class VotesEnabledToVotesChoices < ActiveRecord::Migration[5.2]
|
|
20
20
|
component["settings"]["steps"] = new_steps_settings
|
21
21
|
component.save!
|
22
22
|
elsif default_step.present?
|
23
|
-
votes_value = component["settings"]["default_step"]
|
23
|
+
votes_value = component["settings"]["default_step"]["votes_enabled"] ? "enabled" : "disabled"
|
24
24
|
|
25
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
|
@@ -0,0 +1,21 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Decidim
|
4
|
+
module Budgets
|
5
|
+
class BudgetType < Decidim::Api::Types::BaseObject
|
6
|
+
implements Decidim::Core::ScopableInterface
|
7
|
+
implements Decidim::Core::TraceableInterface
|
8
|
+
|
9
|
+
description "A budget"
|
10
|
+
|
11
|
+
field :id, GraphQL::Types::ID, "The internal ID of this budget", null: false
|
12
|
+
field :title, Decidim::Core::TranslatedFieldType, "The title for this budget", null: false
|
13
|
+
field :description, Decidim::Core::TranslatedFieldType, "The description for this budget", null: false
|
14
|
+
field :total_budget, GraphQL::Types::Int, "The total budget", null: false, camelize: false
|
15
|
+
field :created_at, Decidim::Core::DateTimeType, "When this budget was created", null: true
|
16
|
+
field :updated_at, Decidim::Core::DateTimeType, "When this budget was updated", null: true
|
17
|
+
|
18
|
+
field :projects, [Decidim::Budgets::ProjectType, { null: true }], "The projects for this budget", null: false
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Decidim
|
4
|
+
module Budgets
|
5
|
+
class BudgetsType < Decidim::Api::Types::BaseObject
|
6
|
+
implements Decidim::Core::ComponentInterface
|
7
|
+
|
8
|
+
graphql_name "Budgets"
|
9
|
+
description "A budget component of a participatory space."
|
10
|
+
|
11
|
+
field :budgets, Decidim::Budgets::BudgetType.connection_type, null: true, connection: true
|
12
|
+
|
13
|
+
def budgets
|
14
|
+
Budget.where(component: object).includes(:component)
|
15
|
+
end
|
16
|
+
|
17
|
+
field :budget, Decidim::Budgets::BudgetType, null: true do
|
18
|
+
argument :id, GraphQL::Types::ID, required: true
|
19
|
+
end
|
20
|
+
|
21
|
+
def budget(**args)
|
22
|
+
Budget.where(component: object).find_by(id: args[:id])
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Decidim
|
4
|
+
module Budgets
|
5
|
+
class ProjectType < Decidim::Api::Types::BaseObject
|
6
|
+
implements Decidim::Core::ScopableInterface
|
7
|
+
implements Decidim::Core::AttachableInterface
|
8
|
+
implements Decidim::Comments::CommentableInterface
|
9
|
+
implements Decidim::Core::CategorizableInterface
|
10
|
+
|
11
|
+
description "A project"
|
12
|
+
|
13
|
+
field :id, GraphQL::Types::ID, "The internal ID for this project", null: false
|
14
|
+
field :title, Decidim::Core::TranslatedFieldType, "The title for this project", null: true
|
15
|
+
field :description, Decidim::Core::TranslatedFieldType, "The description for this project", null: true
|
16
|
+
field :budget_amount, GraphQL::Types::Int, "The budget amount for this project", null: true, camelize: false
|
17
|
+
field :selected, GraphQL::Types::Boolean, "Whether this proposal is selected or not", method: :selected?, null: true
|
18
|
+
field :created_at, Decidim::Core::DateTimeType, "When this project was created", null: true
|
19
|
+
field :updated_at, Decidim::Core::DateTimeType, "When this project was updated", null: true
|
20
|
+
field :reference, GraphQL::Types::String, "The reference for this project", null: true
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|