decidim-budgets 0.27.5 → 0.27.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (39) hide show
  1. checksums.yaml +4 -4
  2. data/app/cells/decidim/budgets/base_cell.rb +1 -1
  3. data/app/cells/decidim/budgets/budget_list_item/show.erb +1 -1
  4. data/app/cells/decidim/budgets/budgets_list/voted.erb +1 -1
  5. data/app/cells/decidim/budgets/project_list_item_cell.rb +1 -1
  6. data/app/controllers/decidim/budgets/admin/projects_controller.rb +3 -2
  7. data/app/controllers/decidim/budgets/line_items_controller.rb +15 -9
  8. data/app/packs/src/decidim/budgets/exit_handler.js +1 -1
  9. data/app/views/decidim/budgets/admin/budgets/index.html.erb +6 -2
  10. data/app/views/decidim/budgets/admin/projects/_project-tr.html.erb +5 -3
  11. data/app/views/decidim/budgets/admin/projects/edit.html.erb +1 -1
  12. data/app/views/decidim/budgets/admin/projects/index.html.erb +4 -2
  13. data/app/views/decidim/budgets/admin/projects/new.html.erb +1 -1
  14. data/config/locales/ar.yml +4 -0
  15. data/config/locales/bg.yml +116 -0
  16. data/config/locales/ca.yml +4 -1
  17. data/config/locales/cs.yml +3 -0
  18. data/config/locales/de.yml +5 -2
  19. data/config/locales/en.yml +3 -0
  20. data/config/locales/es-MX.yml +3 -0
  21. data/config/locales/es-PY.yml +3 -0
  22. data/config/locales/es.yml +4 -1
  23. data/config/locales/eu.yml +3 -0
  24. data/config/locales/fi-plain.yml +3 -0
  25. data/config/locales/fi.yml +3 -0
  26. data/config/locales/fr-CA.yml +3 -0
  27. data/config/locales/fr.yml +3 -0
  28. data/config/locales/he-IL.yml +1 -0
  29. data/config/locales/hu.yml +13 -0
  30. data/config/locales/ja.yml +3 -0
  31. data/config/locales/ko.yml +54 -0
  32. data/config/locales/pl.yml +21 -0
  33. data/config/locales/pt-BR.yml +55 -0
  34. data/config/locales/sq-AL.yml +52 -0
  35. data/decidim-budgets.gemspec +34 -0
  36. data/lib/decidim/budgets/test/factories.rb +29 -14
  37. data/lib/decidim/budgets/version.rb +1 -1
  38. metadata +20 -19
  39. data/config/environment.rb +0 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 257b5dde9cad92b81d46ba630f5e41d46c121fe89dede4002b25b4774024ada5
4
- data.tar.gz: 66234f625386f23c2c0a5022dd93f8909d67bd710ed227a2a5d892228cd2454c
3
+ metadata.gz: b1d3813f14e78b8280562b94beb1bc4f7bca64c713ad3110c397cc0c8379ff9f
4
+ data.tar.gz: 5b19c15cb3de4fc0431414a68a0496172af9217be43b2512775a11c26577a2c8
5
5
  SHA512:
6
- metadata.gz: 0c8eea26600f7a223335cc9d4c63cda87f70838d0d7b77643b40ffadf933b7775e8d49d69c4cdfb0a26ac1c8042389e0552c9a1696f6aa869151307dfbaf8ec8
7
- data.tar.gz: f0c49b787d65b4ad6c18d7c3497187e51c5006a2b93a4db83aa375f3ab4d64abdf23dd169e7891fa1720e979fa3f27fcaf881a4b8e872b81465a254b51520f33
6
+ metadata.gz: e2fe256f7a44822e8c46b4c2c050d778e6979add8b72c9f331e55ec1c668e1407a9ca0773980951df6b0310e058ee699e3cd21861bce5f50d96409a6bd641879
7
+ data.tar.gz: 1bfaa6283a053d98dc49c9f436323266a9de770037010fee9cafa82b9281a9010b4204c65ca1e95e4dcfd7bbda3bb386ecfcff39e83f1631a6c78531442a512a
@@ -13,7 +13,7 @@ module Decidim
13
13
  delegate :settings, to: :current_component
14
14
 
15
15
  def budgets_link_list(budgets)
16
- budgets.map { |budget| link_to(translated_attribute(budget.title), resource_locator(budget).path) }
16
+ budgets.map { |budget| link_to(decidim_escape_translated(budget.title), resource_locator(budget).path) }
17
17
  .to_sentence
18
18
  .html_safe
19
19
  end
@@ -2,7 +2,7 @@
2
2
  <div class="budget-list__text flex-horizontal">
3
3
  <%= link_to budget_path(budget), class: link_class do %>
4
4
  <h3 class="card--list__heading">
5
- <%= translated_attribute(title) %>
5
+ <%= decidim_escape_translated(title) %>
6
6
  </h3>
7
7
  <% end %>
8
8
 
@@ -32,7 +32,7 @@
32
32
  <% voted.each do |budget| %>
33
33
  <li>
34
34
  <%= link_to(
35
- t("cancel_order.more_than_one", scope: i18n_scope, name: translated_attribute(budget.title)),
35
+ t("cancel_order.more_than_one", scope: i18n_scope, name: decidim_escape_translated(budget.title)),
36
36
  budget_order_path(budget),
37
37
  method: :delete,
38
38
  class: "cancel-order",
@@ -21,7 +21,7 @@ module Decidim
21
21
  end
22
22
 
23
23
  def resource_title
24
- translated_attribute model.title
24
+ decidim_escape_translated model.title
25
25
  end
26
26
 
27
27
  def resource_added?
@@ -19,7 +19,8 @@ module Decidim
19
19
  def new
20
20
  enforce_permission_to :create, :project
21
21
  @form = form(ProjectForm).from_params(
22
- attachment: form(AttachmentForm).instance
22
+ { attachment: form(AttachmentForm).instance },
23
+ budget: budget
23
24
  )
24
25
  end
25
26
 
@@ -43,7 +44,7 @@ module Decidim
43
44
 
44
45
  def edit
45
46
  enforce_permission_to :update, :project, project: project
46
- @form = form(ProjectForm).from_model(project)
47
+ @form = form(ProjectForm).from_model(project, budget: budget)
47
48
  @form.attachment = form(AttachmentForm).instance
48
49
  end
49
50
 
@@ -12,15 +12,21 @@ module Decidim
12
12
  enforce_permission_to :vote, :project, project: project, budget: budget, workflow: current_workflow
13
13
 
14
14
  respond_to do |format|
15
- AddLineItem.call(persisted_current_order, project, current_user) do
16
- on(:ok) do |order|
17
- self.current_order = order
18
- format.html { redirect_back(fallback_location: budget_path(budget)) }
19
- format.js { render "update_budget" }
20
- end
21
-
22
- on(:invalid) do
23
- format.js { render "update_budget", status: :unprocessable_entity }
15
+ # Note that the user-specific lock here is important in order to
16
+ # prevent multiple simultaneous processes on different machines from
17
+ # creating multiple orders for the same user in case the button is
18
+ # pressed multiple times.
19
+ current_user.with_lock do
20
+ AddLineItem.call(persisted_current_order, project, current_user) do
21
+ on(:ok) do |order|
22
+ self.current_order = order
23
+ format.html { redirect_back(fallback_location: budget_path(budget)) }
24
+ format.js { render "update_budget" }
25
+ end
26
+
27
+ on(:invalid) do
28
+ format.js { render "update_budget", status: :unprocessable_entity }
29
+ end
24
30
  end
25
31
  end
26
32
  end
@@ -65,7 +65,7 @@ $(() => {
65
65
  }
66
66
 
67
67
  $exitLink.attr("href", url);
68
- $exitLink.html(exitLinkText);
68
+ $exitLink.text(exitLinkText);
69
69
  $exitNotification.foundation("open");
70
70
  };
71
71
 
@@ -27,7 +27,9 @@
27
27
  <th><%= t("models.budget.fields.name", scope: "decidim.budgets") %></th>
28
28
  <th><%= t("models.budget.fields.total_budget", scope: "decidim.budgets") %></th>
29
29
  <th><%= t("models.budget.fields.projects_count", scope: "decidim.budgets") %></th>
30
- <%= th_resource_scope_label %>
30
+ <% if current_component.has_subscopes? %>
31
+ <%= th_resource_scope_label %>
32
+ <% end %>
31
33
  <th class="actions"><%= t("actions.title", scope: "decidim.budgets") %></th>
32
34
  </tr>
33
35
  </thead>
@@ -43,7 +45,9 @@
43
45
  <td>
44
46
  <%= link_to budget.projects.count, budget_projects_path(budget) %>
45
47
  </td>
46
- <%= td_resource_scope_for(budget.scope) %>
48
+ <% if current_component.has_subscopes? %>
49
+ <%= td_resource_scope_for(budget.scope) %>
50
+ <% end %>
47
51
  <td class="table-list__actions">
48
52
  <%= icon_link_to "eye", resource_locator(budget).path, t("actions.preview", scope: "decidim.budgets"), class: "action-icon--preview", target: :blank %>
49
53
 
@@ -13,15 +13,17 @@
13
13
  <%= translated_attribute project.category.name %>
14
14
  <% end %>
15
15
  </td>
16
- <%= td_resource_scope_for(project.scope) %>
16
+ <% if current_component.has_subscopes? %>
17
+ <%= td_resource_scope_for(project.scope) %>
18
+ <% end %>
17
19
  <td>
18
20
  <%= project.confirmed_orders_count %>
19
21
  </td>
20
22
  <td>
21
23
  <% if project.selected? %>
22
- <%= content_tag :strong, t("projects.index.selected", scope: "decidim.budgets.admin"), class: "text-success" %>
24
+ <%= content_tag :strong, t("yes", scope: "decidim.budgets.admin.projects.index.selected_options"), class: "label" %>
23
25
  <% else %>
24
- <%= content_tag :span, "x", class: "text-muted" %>
26
+ <%= content_tag :strong, t("no", scope: "decidim.budgets.admin.projects.index.selected_options"), class: "label secondary" %>
25
27
  <% end %>
26
28
  </td>
27
29
  <td class="table-list__actions">
@@ -1,6 +1,6 @@
1
1
  <% add_decidim_page_title("#{translated_attribute(budget.title)} - #{t(".title")}") %>
2
2
  <%= decidim_form_for([budget, @form], html: { class: "form edit_project" }) do |f| %>
3
- <%= render partial: "form", object: f, locals: { title: "#{translated_attribute(budget.title)} &gt; #{t(".title")}" } %>
3
+ <%= render partial: "form", object: f, locals: { title: "#{decidim_escape_translated(budget.title)} &gt; #{t(".title")}" } %>
4
4
 
5
5
  <div class="button--double form-general-submit">
6
6
  <%= f.submit t(".update") %>
@@ -3,7 +3,7 @@
3
3
  <div class="card-divider">
4
4
  <h2 class="card-title flex--sbc">
5
5
  <div>
6
- <%= link_to translated_attribute(budget.title), budgets_path %> &gt;
6
+ <%= link_to decidim_escape_translated(budget.title), budgets_path %> &gt;
7
7
  <%= t(".title") %>
8
8
  <span id="js-selected-resources-count" class="component-counter component-counter--inline" title="<%= t("decidim.budgets.admin.projects.index.selected") %>"></span>
9
9
  </div>
@@ -21,7 +21,9 @@
21
21
  <th><%= sort_link(query, :id, t("models.project.fields.id", scope: "decidim.budgets"), default_order: :desc) %>
22
22
  <th><%= sort_link(query, :title, t("models.project.fields.title", scope: "decidim.budgets")) %></th>
23
23
  <th><%= sort_link(query, :category_name, t("models.project.fields.category", scope: "decidim.budgets") ) %></th>
24
- <%= th_scope_sort_link %>
24
+ <% if current_component.has_subscopes? %>
25
+ <%= th_scope_sort_link %>
26
+ <% end %>
25
27
  <th><%= sort_link(query, :confirmed_orders_count, t("index.confirmed_orders_count")) %></th>
26
28
  <th><%= sort_link(query, :selected, t(".selected")) %></th>
27
29
  <th class="actions"><%= t("actions.title", scope: "decidim.budgets") %></th>
@@ -1,6 +1,6 @@
1
1
  <% add_decidim_page_title("#{translated_attribute(budget.title)} - #{t(".title")}") %>
2
2
  <%= decidim_form_for([budget, @form], html: { class: "form new_project" }) do |f| %>
3
- <%= render partial: "form", object: f, locals: { title: "#{translated_attribute(budget.title)} &gt; #{t(".title")}" } %>
3
+ <%= render partial: "form", object: f, locals: { title: "#{decidim_escape_translated(budget.title)} &gt; #{t(".title")}" } %>
4
4
 
5
5
  <div class="button--double form-general-submit">
6
6
  <%= f.submit t(".create") %>
@@ -66,7 +66,11 @@ ar:
66
66
  change_category: تغيير الفئة
67
67
  finished_orders: الانتهاء من الأصوات
68
68
  pending_orders: في انتظار الأصوات
69
+ selected_options:
70
+ 'no': 'لا'
71
+ 'yes': 'نعم'
69
72
  title: مشاريع
73
+ update: تحديث
70
74
  new:
71
75
  create: إنشاء
72
76
  title: مشروع جديد
@@ -7,7 +7,123 @@ bg:
7
7
  decidim_scope_id: Сфера
8
8
  decidim:
9
9
  budgets:
10
+ actions:
11
+ new: Ново %{name}
12
+ admin:
13
+ budgets:
14
+ create:
15
+ invalid: Възникна проблем при създаването на този бюджет
16
+ success: Бюджетът беше създаден успешно
17
+ destroy:
18
+ invalid: Възникна проблем при изтриването на този бюджет
19
+ success: Бюджетът беше изтрит успешно
20
+ update:
21
+ invalid: Възникна проблем при актуализирането на този бюджет
22
+ success: Бюджетът беше актуализиран успешно
23
+ projects:
24
+ create:
25
+ invalid: Възникна проблем при създаването на този проект
26
+ success: Проектът беше създаден успешно
27
+ destroy:
28
+ success: Проектът беше изтрит успешно
29
+ update:
30
+ invalid: Възникна проблем при актуализирането на този проект
31
+ success: Проектът беше актуализиран успешно
32
+ update_category:
33
+ select_a_category: Моля, изберете категория
34
+ select_a_project: Моля, изберете проект
35
+ update_scope:
36
+ select_a_project: Моля, изберете проект
37
+ select_a_scope: Моля, изберете обхват
38
+ update_selected:
39
+ select_a_project: Моля, изберете проект
40
+ select_a_selection: Моля, изберете състояние на внедряване
41
+ proposals_imports:
42
+ create:
43
+ invalid: Възникна проблем при импортирането на предложенията в проектите
44
+ success: "%{number} предложения бяха импортирани успешно в проекти"
45
+ new:
46
+ title: Импортиране на предложения
47
+ budget:
48
+ view: Преглед на всички бюджетни проекти
49
+ budget_list_item:
50
+ voting_finished: Вие гласувахте този бюджет
51
+ voting_started: Вие започнахте да гласувате за този бюджет
52
+ budgets_list:
53
+ finished_message: Завършихте процеса на гласуване. Благодарим Ви за участието!
54
+ if_change_opinion: Ако сте размислили, имате възможност
55
+ my_budgets: Моите бюджети
56
+ voted_on: Гласувахте на %{links}
57
+ last_activity:
58
+ new_vote_at_html: "<span>Ново бюджетно гласуване на %{link}</span>"
59
+ limit_announcement:
60
+ cant_vote: Не можете да гласувате за този бюджет. <a href="%{landing_path}">Опитайте с друг бюджет</a>.
10
61
  models:
11
62
  project:
12
63
  fields:
13
64
  scope: Сфера
65
+ projects:
66
+ budget_excess:
67
+ budget_excess:
68
+ description: Този проект надвишава максималния бюджет и не може да бъде добавен. Ако искате, можете да изтриете проект, който вече сте избрали, за да може да се гласува отново, според вашите предпочитания.
69
+ close: Затвори
70
+ description: Този проект надвишава максималния бюджет и не може да бъде добавен. Ако искате, можете да изтриете проект, който вече сте избрали, за да може да се гласува отново, според вашите предпочитания.
71
+ budget_summary:
72
+ assigned: 'Възложен:'
73
+ cancel_order: изтрийте гласа си и започнете отначало
74
+ checked_out:
75
+ description: Вече сте гласували за бюджета. Ако сте размислили, имате възможност %{cancel_link}.
76
+ minimum_projects_rule:
77
+ description: За кои проекти смятате, че трябва да осигурим бюджет? Изберете най-малко %{minimum_number} желани от Вас проекта и гласувайте, според предпочитанията си за дефиниране на бюджета.
78
+ instruction: "<li>Изберете поне %{minimum_number} желани от Вас проекта и гласувайте, според предпочитанията си за дефиниране на бюджета.</li>"
79
+ projects_rule:
80
+ description: За какви проекти смятате, че трябва да отделим бюджет? Изберете най-малко %{minimum_number}, но не повече от %{maximum_number} желани от Вас проекта и гласувайте, според предпочитанията си за дефиниране на бюджета.
81
+ instruction: "<li>Изберете най-малко %{minimum_number}, но не повече от %{maximum_number} желани от Вас проекта и гласувайте, според предпочитанията си за дефиниране на бюджета.</li>"
82
+ projects_rule_maximum_only:
83
+ description: За кои проекти смятате, че трябва да осигурим бюджет? Изберете не повече от %{maximum_number} желани от Вас проекта и гласувайте, според предпочитанията си за дефиниране на бюджета.
84
+ instruction: "<li>Изберете не повече от %{maximum_number} желани от Вас проекта и гласувайте, според предпочитанията си за дефиниране на бюджета.</li>"
85
+ rules:
86
+ title: Бюджетни правила
87
+ title: Вие решавате бюджета
88
+ total_projects: Общ брой гласове
89
+ vote_threshold_percent_rule:
90
+ description: За кои проекти смятате, че трябва да осигурим бюджет? Присъеденете най-малко %{minimum_budget} към желаните от Вас проекти и гласувайте, според предпочитанията си за дефиниране на бюджета.
91
+ instruction: "<li>Присъеденете поне %{minimum_budget} към желаните от вас проекти и гласувайте, според предпочитанията си за дефиниране на бюджета.</li>"
92
+ filters_small_view:
93
+ filter: Филтър
94
+ filter_by: Филтрирай по
95
+ unfold: Разгъване
96
+ index:
97
+ view_project: Преглед на проекта
98
+ order_selected_projects:
99
+ remove: Премахни
100
+ selected_projects:
101
+ one: избран проект
102
+ other: избрани проекти
103
+ view: Преглед
104
+ project:
105
+ add: Добавяне на проект %{resource_name} към Вашето гласуване
106
+ remove: Премахване на проекта %{resource_name} от Вашето гласуване
107
+ view: Преглед
108
+ project_budget_button:
109
+ add: Добавяне към гласуването Ви
110
+ add_descriptive: Добавяне на проект %{resource_name} към Вашето гласуване
111
+ added: Добавено към Вашето гласуване
112
+ added_descriptive: Проектът %{resource_name} е добавен към Вашето гласуване
113
+ show:
114
+ view_all_projects: Преглед на всички проекти
115
+ components:
116
+ budgets:
117
+ settings:
118
+ global:
119
+ form:
120
+ errors:
121
+ budget_voting_rule_only_one: Трябва да бъде активирано само едно правило за гласуване
122
+ budget_voting_rule_required: Изисква се едно правило за гласуване
123
+ orders:
124
+ checkout:
125
+ error: Възникна проблем при обработването на Вашия глас
126
+ success: Вашият глас е приет успешно
127
+ destroy:
128
+ error: Възникна проблем при отмяната на гласа Ви
129
+ success: Вашият глас беше отменен успешно
@@ -103,6 +103,9 @@ ca:
103
103
  pending_orders: Vots en procés
104
104
  select_for_implementation: Seleccionat per implementar
105
105
  selected: Seleccionat
106
+ selected_options:
107
+ 'no': 'No'
108
+ 'yes': 'Sí'
106
109
  title: Projectes
107
110
  update: Actualitzar
108
111
  update_scope_button: Actualitzar àmbit
@@ -365,7 +368,7 @@ ca:
365
368
  budgets:
366
369
  budget_published:
367
370
  email_intro: 'Ja està activa la fase %{resource_title} per a %{participatory_space_title}. Pots veure-la des d''aquesta pàgina:'
368
- email_outro: Has rebut aquesta notificació perquè estàs seguint l'espai %{participatory_space_title}. Pots deixar de rebre notificacions a través de l'enllaç anterior.
371
+ email_outro: Has rebut aquesta notificació perquè estàs seguint l'espai "%{participatory_space_title}". Pots deixar de rebre notificacions a través de l'enllaç anterior.
369
372
  email_subject: El component %{resource_title} ja està actiu per %{participatory_space_title}.
370
373
  notification_title: El pressupost <a href="%{resource_path}">%{resource_title}</a> a %{participatory_space_title} ja està actiu.
371
374
  orders:
@@ -107,6 +107,9 @@ cs:
107
107
  pending_orders: Čeká na hlasování
108
108
  select_for_implementation: Vybrat pro implementaci
109
109
  selected: Vybrané
110
+ selected_options:
111
+ 'no': 'Ne'
112
+ 'yes': 'Ano'
110
113
  title: Projekty
111
114
  update: Aktualizovat
112
115
  update_scope_button: Aktualizovat rozsah
@@ -103,6 +103,9 @@ de:
103
103
  pending_orders: Ausstehende Stimmen
104
104
  select_for_implementation: Zur Umsetzung auswählen
105
105
  selected: Ausgewählt
106
+ selected_options:
107
+ 'no': 'Nein'
108
+ 'yes': 'Ja'
106
109
  title: Projekte
107
110
  update: Aktualisieren
108
111
  update_scope_button: Themenbereich aktualisieren
@@ -205,7 +208,7 @@ de:
205
208
  voted_on_space_with_scope: Sie haben für das %{budget_name} Budget for the %{space_name} innerhalb %{scope_name} (%{scope_type}) abgestimmt.
206
209
  projects:
207
210
  budget_confirm:
208
- are_you_sure: Wenn du deine Meinung änderst, kannst du deine Stimme nachträglich ändern.
211
+ are_you_sure: Wenn Sie Ihre Meinung ändern, können Sie Ihre Stimme nachträglich ändern.
209
212
  cancel: Abbrechen
210
213
  confirm: Bestätigen
211
214
  description: Dies sind die Projekte, die Sie für das Budget ausgewählt haben.
@@ -382,4 +385,4 @@ de:
382
385
  orders_count: Projektauswahlen
383
386
  projects_count: Projekte
384
387
  index:
385
- confirmed_orders_count: Stimmen zählen
388
+ confirmed_orders_count: Anzahl Stimmen
@@ -103,6 +103,9 @@ en:
103
103
  pending_orders: Pending votes
104
104
  select_for_implementation: Select for implementation
105
105
  selected: Selected
106
+ selected_options:
107
+ 'no': 'No'
108
+ 'yes': 'Yes'
106
109
  title: Projects
107
110
  update: Update
108
111
  update_scope_button: Update scope
@@ -103,6 +103,9 @@ es-MX:
103
103
  pending_orders: Votos pendientes
104
104
  select_for_implementation: Seleccionado para implementar
105
105
  selected: Seleccionado
106
+ selected_options:
107
+ 'no': 'No'
108
+ 'yes': 'Sí'
106
109
  title: Proyectos
107
110
  update: Actualizar
108
111
  update_scope_button: Actualizar ámbito
@@ -103,6 +103,9 @@ es-PY:
103
103
  pending_orders: Votos pendientes
104
104
  select_for_implementation: Seleccionado para implementar
105
105
  selected: Seleccionado
106
+ selected_options:
107
+ 'no': 'No'
108
+ 'yes': 'Sí'
106
109
  title: Proyectos
107
110
  update: Actualizar
108
111
  update_scope_button: Actualizar ámbito
@@ -103,6 +103,9 @@ es:
103
103
  pending_orders: Votos pendientes
104
104
  select_for_implementation: Seleccionado para implementar
105
105
  selected: Seleccionado
106
+ selected_options:
107
+ 'no': 'No'
108
+ 'yes': 'Sí'
106
109
  title: Proyectos
107
110
  update: Actualizar
108
111
  update_scope_button: Actualizar ámbito
@@ -365,7 +368,7 @@ es:
365
368
  budgets:
366
369
  budget_published:
367
370
  email_intro: 'Ya está activa la fase %{resource_title} para %{participatory_space_title}. Puedes verla desde esta página:'
368
- email_outro: Has recibido esta notificación porque estás siguiendo %{participatory_space_title}. Puedes dejar de recibir notificaciones siguiendo el enlace anterior.
371
+ email_outro: Has recibido esta notificación porque estás siguiendo el espacio "%{participatory_space_title}". Puedes dejar de recibir notificaciones siguiendo el enlace anterior.
369
372
  email_subject: El componente %{resource_title} está ahora activo para %{participatory_space_title}.
370
373
  notification_title: El presupuesto <a href="%{resource_path}">%{resource_title}</a> en %{participatory_space_title} ya está activo.
371
374
  orders:
@@ -103,6 +103,9 @@ eu:
103
103
  pending_orders: Zain dauden botoak
104
104
  select_for_implementation: Hautatu gauzatzeko
105
105
  selected: Hautatua
106
+ selected_options:
107
+ 'no': 'Ez'
108
+ 'yes': 'Bai'
106
109
  title: Proiektuak
107
110
  update: Eguneratu
108
111
  update_scope_button: Eguneratu esparrua
@@ -103,6 +103,9 @@ fi-pl:
103
103
  pending_orders: Odottavat äänet
104
104
  select_for_implementation: Valittu toteutukseen
105
105
  selected: Valittu
106
+ selected_options:
107
+ 'no': 'Ei'
108
+ 'yes': 'Kyllä'
106
109
  title: Suunnitelmat
107
110
  update: Päivitä
108
111
  update_scope_button: Muuta teema
@@ -103,6 +103,9 @@ fi:
103
103
  pending_orders: Odottavat äänet
104
104
  select_for_implementation: Valittu toteutukseen
105
105
  selected: Valittu
106
+ selected_options:
107
+ 'no': 'Ei'
108
+ 'yes': 'Kyllä'
106
109
  title: Hankkeet
107
110
  update: Päivitä
108
111
  update_scope_button: Muuta teema
@@ -103,6 +103,9 @@ fr-CA:
103
103
  pending_orders: Votes en cours
104
104
  select_for_implementation: Sélectionné pour implémentation
105
105
  selected: Sélectionné
106
+ selected_options:
107
+ 'no': 'Non'
108
+ 'yes': 'Oui'
106
109
  title: Projets
107
110
  update: Mettre à jour
108
111
  update_scope_button: Mettre à jour le secteur
@@ -103,6 +103,9 @@ fr:
103
103
  pending_orders: Votes en cours
104
104
  select_for_implementation: Sélectionné pour implémentation
105
105
  selected: Sélectionné
106
+ selected_options:
107
+ 'no': 'Non'
108
+ 'yes': 'Oui'
106
109
  title: Projets
107
110
  update: Mettre à jour
108
111
  update_scope_button: Mettre à jour le secteur
@@ -0,0 +1 @@
1
+ he:
@@ -72,6 +72,7 @@ hu:
72
72
  title: Új költségvetés
73
73
  update:
74
74
  invalid: Hiba történt a költségvetés frissítése során
75
+ success: A költségvetés frissítése sikeres
75
76
  exports:
76
77
  projects: Projektek
77
78
  models:
@@ -99,6 +100,8 @@ hu:
99
100
  pending_orders: Függőben lévő szavazások
100
101
  select_for_implementation: Kijelölés megvalósításra
101
102
  selected: Kiválasztva
103
+ selected_options:
104
+ 'yes': 'Igen'
102
105
  title: Projektek
103
106
  update: Frissítés
104
107
  update_scope_button: Hatáskör frissítése
@@ -159,18 +162,25 @@ hu:
159
162
  close_modal: Ablak bezárás
160
163
  continue: Folytatás
161
164
  more_information: További információk
165
+ budget_list_item:
166
+ voting_finished: Ebben a költségvetésben már szavazott
167
+ voting_started: Megkezdted a szavazást ebben a költségvetésben
162
168
  budgets_list:
163
169
  cancel_order:
164
170
  more_than_one: törölje a(z) %{name} kérdésében leadott szavazatát, és kezdje újra
165
171
  only_one: törölje a szavazatát és kezdje újra.
172
+ finished_message: Befejezte a szavazási folyamatot. Köszönjük a részvételt!
166
173
  highlighted_cta: Szavazzon a(z) %{name} kérdésében
174
+ if_change_opinion: 'Ha meggondolta magát, a következőket teheti:'
167
175
  my_budgets: Költségvetéseim
168
176
  progress: Szavazás befejezése
169
177
  show: Összes projekt megtekintése
170
178
  vote: Szavazás
179
+ voted_on: 'Szavazott a következő kérdésében: %{links}'
171
180
  last_activity:
172
181
  new_vote_at_html: "<span>Új költségvetési szavazás itt %{link}</span>"
173
182
  limit_announcement:
183
+ cant_vote: Nem szavazhat a költségvetésre. <a href="%{landing_path}">Próbálkozzon egy másik költségvetéssel</a>.
174
184
  limit_reached: 'Aktív szavazásokkal rendelkezik: %{links}. A költségvetésről történő szavazáshoz <a href="%{landing_path}">törölnie kell a szavazatát, és újra kell kezdenie</a>.'
175
185
  models:
176
186
  budget:
@@ -273,6 +283,8 @@ hu:
273
283
  random: Véletlen sorrend
274
284
  selected: Kiválasztva
275
285
  project:
286
+ add: Adja hozzá a(z) %{resource_name} projektet a szavazatához
287
+ remove: Távolítsa el a(z) %{resource_name} projektet a szavazásból
276
288
  selected: Kiválasztva
277
289
  view: Nézet
278
290
  you_voted: Erre szavazott
@@ -280,6 +292,7 @@ hu:
280
292
  add: Adja hozzá a szavazatához
281
293
  add_descriptive: Adja hozzá a(z) %{resource_name} projektet a szavazatához
282
294
  added: Hozzáadva a szavazatához
295
+ added_descriptive: A(z) %{resource_name} projekt hozzádásra került a szavazatához
283
296
  projects_for: '%{name} projektek'
284
297
  show:
285
298
  budget: Költségvetés
@@ -101,6 +101,9 @@ ja:
101
101
  pending_orders: 保留中の投票
102
102
  select_for_implementation: 実装のために選択
103
103
  selected: 選択済
104
+ selected_options:
105
+ 'no': 'いいえ'
106
+ 'yes': 'はい'
104
107
  title: プロジェクト
105
108
  update: 更新
106
109
  update_scope_button: スコープを更新
@@ -1 +1,55 @@
1
+ ---
1
2
  ko:
3
+ activemodel:
4
+ attributes:
5
+ budget:
6
+ decidim_scope_id: 범위
7
+ description: 상세정보
8
+ title: 제목
9
+ project:
10
+ decidim_category_id: 카테고리
11
+ decidim_scope_id: 범위
12
+ description: 상세정보
13
+ proposal_ids: 포함된 제안
14
+ proposals: 제안
15
+ title: 제목
16
+ proposals_import:
17
+ scope_id: 범위
18
+ activerecord:
19
+ models:
20
+ decidim/budgets/project:
21
+ other: 프로젝트
22
+ decidim:
23
+ admin:
24
+ filters:
25
+ projects:
26
+ category_id_eq:
27
+ label: 카테고리
28
+ scope_id_eq:
29
+ label: 범위
30
+ selected_at_null:
31
+ label: 선택됨
32
+ budgets:
33
+ actions:
34
+ attachment_collections: 폴더
35
+ attachments: 첨부 파일
36
+ admin:
37
+ projects:
38
+ edit:
39
+ title: 프로젝트 수정
40
+ update: 업데이트
41
+ index:
42
+ actions: 작업
43
+ cancel: 취소
44
+ change_category: 카테고리 변경
45
+ change_scope: 범위 변경
46
+ title: 프로젝트
47
+ update: 업데이트
48
+ update_scope_button: 범위 업데이트
49
+ new:
50
+ create: 생성하기
51
+ title: 새 프로젝트
52
+ models:
53
+ project:
54
+ fields:
55
+ scope: 범위
@@ -38,6 +38,7 @@ pl:
38
38
  label: Wybrane
39
39
  values:
40
40
  'false': Wybrane do wykonania
41
+ 'true': Nie wybrano do implementacji
41
42
  budgets:
42
43
  actions:
43
44
  attachment_collections: Foldery
@@ -49,6 +50,7 @@ pl:
49
50
  import: Importuj propozycje do projektów
50
51
  new: Nowy %{name}
51
52
  preview: Podgląd
53
+ send_voting_reminders: Wyślij przypomnienia o głosowaniu
52
54
  title: Działania
53
55
  admin:
54
56
  budgets:
@@ -100,6 +102,9 @@ pl:
100
102
  pending_orders: Głosowania oczekujące
101
103
  select_for_implementation: Zaznacz do wdrożenia
102
104
  selected: Wybrano
105
+ selected_options:
106
+ 'no': 'Nie'
107
+ 'yes': 'Tak'
103
108
  title: Projekty
104
109
  update: Aktualizuj
105
110
  update_scope_button: Aktualizuj zakres
@@ -180,6 +185,8 @@ pl:
180
185
  total_budget: Całkowity budżet
181
186
  project:
182
187
  fields:
188
+ category: Kategoria
189
+ id: Identyfikator
183
190
  scope: Zakres
184
191
  title: Tytuł
185
192
  order_summary_mailer:
@@ -203,6 +210,7 @@ pl:
203
210
  description: Ten projekt przekracza maksymalny budżet i nie można go dodać. Jeśli chcesz, możesz usunąć wybrany projekt, aby móc zagłosować ponownie zgodnie ze swoimi preferencjami.
204
211
  ok: ok
205
212
  projects_excess:
213
+ description: Ten projekt przekracza maksymalną ilość projektów i nie można go dodać. Jeśli chcesz, możesz usunąć wybrany projekt, aby móc zagłosować ponownie zgodnie ze swoimi preferencjami.
206
214
  title: Maksymalna liczba projektów została przekroczona
207
215
  budget_summary:
208
216
  are_you_sure: Czy na pewno chcesz anulować swój głos?
@@ -235,7 +243,11 @@ pl:
235
243
  many: "%{count} projektów"
236
244
  other: "%{count} projektów"
237
245
  exit_modal:
246
+ cancel: Powrót do głosowania
238
247
  close_modal: Zamknij okno
248
+ exit: Wyjdź z głosowania
249
+ message: Twój głos nie został zarejestrowany, ponieważ nie ukończyłeś/aś jeszcze procesu głosowania. Czy na pewno chcesz zakończyć głosowanie?
250
+ title: Jeszcze nie głosowałeś/aś
239
251
  filters:
240
252
  category: Kategoria
241
253
  scope: Zakres
@@ -277,6 +289,7 @@ pl:
277
289
  few: głosów
278
290
  many: głosów
279
291
  other: głosów
292
+ you_voted: Zagłosowałeś/aś na to
280
293
  project_budget_button:
281
294
  add: Dodaj do swojego głosu
282
295
  add_descriptive: Dodaj projekt %{resource_name} do swojego głosu
@@ -286,6 +299,12 @@ pl:
286
299
  show:
287
300
  budget: Budżet
288
301
  view_all_projects: Wyświetl wszystkie projekty
302
+ vote_reminder_mailer:
303
+ vote_reminder:
304
+ email_budgets: 'Obszary, w których masz niedokończone głosowanie:'
305
+ email_intro: Rozpocząłeś(aś) głosowanie w budżecie partycypacyjnym, ale nie ukończyłeś(aś) go.
306
+ email_link: Przejdź do kontynuowania głosowania
307
+ email_outro: Pamiętaj, aby zakończyć głosowanie. Aby głosować, musisz najpierw wybrać jedną lub więcej propozycji, nad którymi chcesz głosować, a następnie potwierdzić swój głos za pomocą przycisku "Głosuj".
289
308
  components:
290
309
  budgets:
291
310
  actions:
@@ -301,6 +320,7 @@ pl:
301
320
  errors:
302
321
  budget_voting_rule_only_one: Może być włączona tylko jedna reguła głosowania
303
322
  budget_voting_rule_required: Wymagana jest jedna reguła głosowania
323
+ geocoding_enabled: Włączono geokodowanie
304
324
  landing_page_content: Strona główna budżetów
305
325
  more_information_modal: Więcej informacji
306
326
  projects_per_page: Projektów na stronie
@@ -311,6 +331,7 @@ pl:
311
331
  total_budget: Całkowity budżet
312
332
  vote_minimum_budget_projects_number: Minimalna liczba projektów, na które można głosować
313
333
  vote_rule_minimum_budget_projects_enabled: 'Włącz regułę: minimalna liczba projektów, na które można głosować'
334
+ vote_rule_selected_projects_enabled: 'Aktywuj zasadę: Minimalna liczba projektów, na które można głosować'
314
335
  vote_rule_threshold_percent_enabled: 'Włącz regułę: minimalny procent budżetu'
315
336
  vote_selected_projects_maximum: Maksymalna liczba wybranych projektów
316
337
  vote_selected_projects_minimum: Minimalna liczba wybranych projektów
@@ -21,6 +21,9 @@ pt-BR:
21
21
  scope_id: Escopo
22
22
  activerecord:
23
23
  models:
24
+ decidim/budgets/budget:
25
+ one: Orçamento
26
+ other: Orçamentos
24
27
  decidim/budgets/project:
25
28
  one: Projeto
26
29
  other: Projetos
@@ -95,25 +98,59 @@ pt-BR:
95
98
  change_category: Mudar categoria
96
99
  change_scope: Mudar escopo
97
100
  change_selected: Alterar estado selecionado
101
+ deselect_implementation: Desselecionar da implementação
98
102
  finished_orders: Votos finais
99
103
  pending_orders: Votações pendentes
104
+ select_for_implementation: Selecionado para implementação
100
105
  selected: Selecionado
106
+ selected_options:
107
+ 'no': 'Não'
108
+ 'yes': 'Sim'
101
109
  title: Projetos
110
+ update: Atualizar
111
+ update_scope_button: Atualizar escopo
102
112
  new:
103
113
  create: Criar
104
114
  title: Novo projeto
105
115
  update:
106
116
  invalid: Houve um problema ao atualizar este projeto
107
117
  success: Projeto atualizado com sucesso
118
+ update_category:
119
+ invalid: 'Estes projetos já tinham a categoria %{subject_name}: %{projects}.'
120
+ select_a_category: Por favor, selecione uma categoria
121
+ select_a_project: Por favor, selecione um projeto
122
+ success: 'Projetos atualizados com sucesso para a categoria %{subject_name}: %{projects}.'
123
+ update_scope:
124
+ invalid: 'Estes projetos já tinham o escopo %{subject_name}: %{projects}.'
125
+ select_a_project: Por favor, selecione um projeto
126
+ select_a_scope: Por favor, selecione um escopo
127
+ success: 'Projetos atualizados com sucesso no scopo %{subject_name}: %{projects}.'
128
+ update_selected:
129
+ invalid:
130
+ selected: 'Estes projetos já foram selecionados para a implementação: %{projects}.'
131
+ unselected: 'Estes projetos já foram desselecionados da implementação: %{projects}.'
132
+ select_a_project: Por favor, selecione um projeto
133
+ select_a_selection: Por favor, selecione um estado de implementação
134
+ success:
135
+ selected: 'Estes projetos foram selecionados com sucesso para a implementação: %{projects}.'
136
+ unselected: 'Estes projetos foram desselecionados da implementação com sucesso: %{projects}.'
108
137
  proposals_imports:
109
138
  create:
110
139
  invalid: Houve um problema ao importar as propostas para projetos
111
140
  success: "%{number} propostas importadas para projetos"
112
141
  new:
113
142
  create: Importar propostas para projetos
143
+ default_budget: Orçamento padrão
114
144
  no_components: Não há outros componentes da proposta neste espaço participativo para importar as propostas para projetos.
145
+ origin_component_id: Componente de origem
115
146
  select_component: Selecione um componente
116
147
  title: Importar propostas
148
+ reminders:
149
+ orders:
150
+ description: Os usuários receberão um e-mail com links para os orçamentos em que tenham pedido pendente.
151
+ title:
152
+ one: Você está prestes a enviar um lembrete por email para o usuário %{count}
153
+ other: Você está prestes a enviar um lembrete por email para %{count} usuários
117
154
  admin_log:
118
155
  budget:
119
156
  create: "%{user_name} criou o orçamento %{resource_name} no espaço %{space_name}"
@@ -141,7 +178,10 @@ pt-BR:
141
178
  highlighted_cta: Votar em %{name}
142
179
  if_change_opinion: Se você mudou de ideia, você pode
143
180
  my_budgets: Meus orçamentos
181
+ vote: Voto
144
182
  voted_on: Você votou em %{links}
183
+ last_activity:
184
+ new_vote_at_html: "<span>Nova votação de orçamentação no %{link}</span>"
145
185
  limit_announcement:
146
186
  cant_vote: Você não pode votar neste orçamento. <a href="%{landing_path}">Tente outro orçamento</a>.
147
187
  limit_reached: Você tem votos ativos em %{links}. Para votar neste orçamento você deve <a href="%{landing_path}">excluir seu voto e começar do zero</a>.
@@ -170,10 +210,13 @@ pt-BR:
170
210
  title: Confirmar votação
171
211
  budget_excess:
172
212
  budget_excess:
213
+ description: Este projecto excede o orçamento máximo e não pode ser adicionado. Se você quiser, você pode excluir um projeto que você já selecionou, a fim de poder votar novamente de acordo com suas preferências.
173
214
  title: O orçamento máximo excedeu
174
215
  close: Fechar
216
+ description: Este projecto excede o orçamento máximo e não pode ser adicionado. Se você quiser, você pode excluir um projeto que você já selecionou, a fim de poder votar novamente de acordo com suas preferências.
175
217
  ok: OK
176
218
  projects_excess:
219
+ description: Este projeto excede o número máximo de projetos e não pode ser adicionado. Se você quiser, você pode excluir um projeto que você já selecionou, a fim de poder votar novamente de acordo com suas preferências.
177
220
  title: Máximo de projetos excedido
178
221
  budget_summary:
179
222
  are_you_sure: Deseja mesmo cancelar o seu voto?
@@ -204,7 +247,10 @@ pt-BR:
204
247
  one: 1 projeto
205
248
  other: "%{count} projetos"
206
249
  exit_modal:
250
+ cancel: Voltar à votação
207
251
  close_modal: Fechar modal
252
+ message: Seu voto não foi registrado porque você ainda não concluiu o processo de votação. Tem certeza que deseja sair da votação?
253
+ title: Você ainda não votou
208
254
  filters:
209
255
  category: Categoria
210
256
  scope: Âmbito
@@ -219,6 +265,8 @@ pt-BR:
219
265
  filter: Filtro
220
266
  filter_by: Filtrar por
221
267
  unfold: Desdobrar
268
+ index:
269
+ view_project: Ver projeto
222
270
  order_progress:
223
271
  vote: Voto
224
272
  order_selected_projects:
@@ -242,6 +290,7 @@ pt-BR:
242
290
  votes:
243
291
  one: voto
244
292
  other: votos
293
+ you_voted: Você votou nisto
245
294
  project_budget_button:
246
295
  add: Adicione ao seu voto
247
296
  add_descriptive: Adicione o projeto %{resource_name} ao seu voto
@@ -253,7 +302,13 @@ pt-BR:
253
302
  view_all_projects: Ver todos os projetos
254
303
  vote_reminder_mailer:
255
304
  vote_reminder:
305
+ email_budgets: 'Áreas onde você tem uma votação inacabada:'
256
306
  email_intro: Você iniciou a votação sobre o orçamento participativo, mas não a concluíu.
307
+ email_link: Ir para continuar a votação
308
+ email_outro: Por favor, lembre-se de concluir a votação. Para votar, primeiro selecione a proposta ou as propostas que deseja votar e, em seguida, confirme o seu voto com o botão "Votar".
309
+ email_subject:
310
+ one: Você tem um voto inacabado na votação do orçamento participativo
311
+ other: Você tem votos inacabados na votação do orçamento participativo
257
312
  components:
258
313
  budgets:
259
314
  actions:
@@ -1 +1,53 @@
1
+ ---
1
2
  sq:
3
+ activemodel:
4
+ attributes:
5
+ budget:
6
+ decidim_scope_id: Fushëveprimi
7
+ description: Përshkrimi
8
+ title: Titulli
9
+ total_budget: Buxheti total
10
+ weight: Rendit pozicionet
11
+ project:
12
+ budget_amount: Shuma buxhetore
13
+ decidim_category_id: Kategori
14
+ decidim_scope_id: Fushëveprim
15
+ description: Përshkrimi
16
+ proposal_ids: Propozime të ngjashme
17
+ proposals: Propozimet
18
+ selected: Përzgjedhur për zbatim
19
+ title: Titulli
20
+ proposals_import:
21
+ scope_id: Fushëveprim
22
+ activerecord:
23
+ models:
24
+ decidim/budgets/project:
25
+ one: Projekt
26
+ other: Projektet
27
+ decidim:
28
+ admin:
29
+ filters:
30
+ projects:
31
+ category_id_eq:
32
+ label: Kategori
33
+ scope_id_eq:
34
+ label: Qëllimi
35
+ selected_at_null:
36
+ label: E përzgjedhur
37
+ values:
38
+ 'false': Përzgjedhur për zbatim
39
+ 'true': Nuk është përzgjedhur për zbatim
40
+ budgets:
41
+ actions:
42
+ attachment_collections: Dosjet
43
+ attachments: Bashkëngjitjet
44
+ confirm_destroy: A je i sigurt që do ta fshish këtë projekt?
45
+ destroy: Fshi
46
+ edit: Përpuno
47
+ edit_projects: Menaxho projektet
48
+ import: Importo propozimet ne projekte
49
+ preview: Pamje paraprake
50
+ models:
51
+ project:
52
+ fields:
53
+ scope: Fushëveprim
@@ -0,0 +1,34 @@
1
+ # frozen_string_literal: true
2
+
3
+ $LOAD_PATH.push File.expand_path("lib", __dir__)
4
+
5
+ # Maintain your gem's version:
6
+ require "decidim/budgets/version"
7
+
8
+ # Describe your gem and declare its dependencies:
9
+ Gem::Specification.new do |s|
10
+ s.version = Decidim::Budgets.version
11
+ s.authors = ["Josep Jaume Rey Peroy", "Marc Riera Casals", "Oriol Gual Oliva"]
12
+ s.email = ["josepjaume@gmail.com", "mrc2407@gmail.com", "oriolgual@gmail.com"]
13
+ s.license = "AGPL-3.0"
14
+ s.homepage = "https://github.com/decidim/decidim"
15
+ s.required_ruby_version = "~> 3.0.0"
16
+
17
+ s.name = "decidim-budgets"
18
+ s.summary = "Decidim budgets module"
19
+ s.description = "A budgets component for decidim's participatory spaces."
20
+
21
+ s.files = Dir.chdir(__dir__) do
22
+ `git ls-files -z`.split("\x0").select do |f|
23
+ (File.expand_path(f) == __FILE__) ||
24
+ f.start_with?(*%w(app/ config/ db/ lib/ Rakefile README.md))
25
+ end
26
+ end
27
+
28
+ s.add_dependency "decidim-comments", Decidim::Budgets.version
29
+ s.add_dependency "decidim-core", Decidim::Budgets.version
30
+
31
+ s.add_development_dependency "decidim-admin", Decidim::Budgets.version
32
+ s.add_development_dependency "decidim-dev", Decidim::Budgets.version
33
+ s.add_development_dependency "decidim-proposals", Decidim::Budgets.version
34
+ end
@@ -8,9 +8,12 @@ require "decidim/participatory_processes/test/factories"
8
8
 
9
9
  FactoryBot.define do
10
10
  factory :budgets_component, parent: :component do
11
- name { Decidim::Components::Namer.new(participatory_space.organization.available_locales, :budgets).i18n_name }
11
+ transient do
12
+ skip_injection { false }
13
+ end
14
+ name { generate_component_name(participatory_space.organization.available_locales, :budgets, skip_injection: skip_injection) }
12
15
  manifest_name { :budgets }
13
- participatory_space { create(:participatory_process, :with_steps, organization: organization) }
16
+ participatory_space { create(:participatory_process, :with_steps, skip_injection: skip_injection, organization: organization) }
14
17
 
15
18
  trait :with_geocoding_enabled do
16
19
  settings do
@@ -109,10 +112,13 @@ FactoryBot.define do
109
112
  end
110
113
 
111
114
  factory :budget, class: "Decidim::Budgets::Budget" do
112
- title { generate_localized_title }
113
- description { Decidim::Faker::Localized.wrapped("<p>", "</p>") { generate_localized_title } }
115
+ transient do
116
+ skip_injection { false }
117
+ end
118
+ title { generate_localized_title(:budget_title, skip_injection: skip_injection) }
119
+ description { generate_localized_description(:budget_description, skip_injection: skip_injection) }
114
120
  total_budget { 100_000_000 }
115
- component { create(:budgets_component) }
121
+ component { create(:budgets_component, skip_injection: skip_injection) }
116
122
 
117
123
  trait :with_projects do
118
124
  transient do
@@ -120,19 +126,22 @@ FactoryBot.define do
120
126
  end
121
127
 
122
128
  after(:create) do |budget, evaluator|
123
- create_list(:project, evaluator.projects_number, budget: budget)
129
+ create_list(:project, evaluator.projects_number, skip_injection: evaluator.skip_injection, budget: budget)
124
130
  end
125
131
  end
126
132
  end
127
133
 
128
134
  factory :project, class: "Decidim::Budgets::Project" do
129
- title { generate_localized_title }
130
- description { Decidim::Faker::Localized.wrapped("<p>", "</p>") { generate_localized_title } }
135
+ transient do
136
+ skip_injection { false }
137
+ end
138
+ title { generate_localized_title(:project_title, skip_injection: skip_injection) }
139
+ description { generate_localized_description(:project_description, skip_injection: skip_injection) }
131
140
  address { "#{Faker::Address.street_name}, #{Faker::Address.city}" }
132
141
  latitude { Faker::Address.latitude }
133
142
  longitude { Faker::Address.longitude }
134
143
  budget_amount { Faker::Number.number(digits: 8) }
135
- budget { create(:budget) }
144
+ budget { create(:budget, skip_injection: skip_injection) }
136
145
 
137
146
  trait :selected do
138
147
  selected_at { Time.current }
@@ -144,14 +153,17 @@ FactoryBot.define do
144
153
  end
145
154
 
146
155
  after :create do |project, evaluator|
147
- project.attachments = create_list(:attachment, evaluator.photos_number, :with_image, attached_to: project)
156
+ project.attachments = create_list(:attachment, evaluator.photos_number, :with_image, attached_to: project, skip_injection: evaluator.skip_injection)
148
157
  end
149
158
  end
150
159
  end
151
160
 
152
161
  factory :order, class: "Decidim::Budgets::Order" do
153
- budget { create(:budget) }
154
- user { create(:user, organization: component.organization) }
162
+ transient do
163
+ skip_injection { false }
164
+ end
165
+ budget { create(:budget, skip_injection: skip_injection) }
166
+ user { create(:user, organization: component.organization, skip_injection: skip_injection) }
155
167
 
156
168
  trait :with_projects do
157
169
  transient do
@@ -160,14 +172,17 @@ FactoryBot.define do
160
172
 
161
173
  after(:create) do |order, evaluator|
162
174
  project_budget = (order.maximum_budget / evaluator.projects_number).to_i
163
- order.projects << create_list(:project, evaluator.projects_number, budget_amount: project_budget, budget: order.budget)
175
+ order.projects << create_list(:project, evaluator.projects_number, budget_amount: project_budget, budget: order.budget, skip_injection: evaluator.skip_injection)
164
176
  order.save!
165
177
  end
166
178
  end
167
179
  end
168
180
 
169
181
  factory :line_item, class: "Decidim::Budgets::LineItem" do
182
+ transient do
183
+ skip_injection { false }
184
+ end
170
185
  order
171
- project { create(:project, budget: order.budget) }
186
+ project { create(:project, budget: order.budget, skip_injection: skip_injection) }
172
187
  end
173
188
  end
@@ -4,7 +4,7 @@ module Decidim
4
4
  # This holds the decidim-budgets version.
5
5
  module Budgets
6
6
  def self.version
7
- "0.27.5"
7
+ "0.27.6"
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-budgets
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.27.5
4
+ version: 0.27.6
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: 2023-12-20 00:00:00.000000000 Z
13
+ date: 2024-04-30 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: decidim-comments
@@ -18,70 +18,70 @@ dependencies:
18
18
  requirements:
19
19
  - - '='
20
20
  - !ruby/object:Gem::Version
21
- version: 0.27.5
21
+ version: 0.27.6
22
22
  type: :runtime
23
23
  prerelease: false
24
24
  version_requirements: !ruby/object:Gem::Requirement
25
25
  requirements:
26
26
  - - '='
27
27
  - !ruby/object:Gem::Version
28
- version: 0.27.5
28
+ version: 0.27.6
29
29
  - !ruby/object:Gem::Dependency
30
30
  name: decidim-core
31
31
  requirement: !ruby/object:Gem::Requirement
32
32
  requirements:
33
33
  - - '='
34
34
  - !ruby/object:Gem::Version
35
- version: 0.27.5
35
+ version: 0.27.6
36
36
  type: :runtime
37
37
  prerelease: false
38
38
  version_requirements: !ruby/object:Gem::Requirement
39
39
  requirements:
40
40
  - - '='
41
41
  - !ruby/object:Gem::Version
42
- version: 0.27.5
42
+ version: 0.27.6
43
43
  - !ruby/object:Gem::Dependency
44
44
  name: decidim-admin
45
45
  requirement: !ruby/object:Gem::Requirement
46
46
  requirements:
47
47
  - - '='
48
48
  - !ruby/object:Gem::Version
49
- version: 0.27.5
49
+ version: 0.27.6
50
50
  type: :development
51
51
  prerelease: false
52
52
  version_requirements: !ruby/object:Gem::Requirement
53
53
  requirements:
54
54
  - - '='
55
55
  - !ruby/object:Gem::Version
56
- version: 0.27.5
56
+ version: 0.27.6
57
57
  - !ruby/object:Gem::Dependency
58
58
  name: decidim-dev
59
59
  requirement: !ruby/object:Gem::Requirement
60
60
  requirements:
61
61
  - - '='
62
62
  - !ruby/object:Gem::Version
63
- version: 0.27.5
63
+ version: 0.27.6
64
64
  type: :development
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.27.5
70
+ version: 0.27.6
71
71
  - !ruby/object:Gem::Dependency
72
72
  name: decidim-proposals
73
73
  requirement: !ruby/object:Gem::Requirement
74
74
  requirements:
75
75
  - - '='
76
76
  - !ruby/object:Gem::Version
77
- version: 0.27.5
77
+ version: 0.27.6
78
78
  type: :development
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.27.5
84
+ version: 0.27.6
85
85
  description: A budgets component for decidim's participatory spaces.
86
86
  email:
87
87
  - josepjaume@gmail.com
@@ -234,7 +234,6 @@ files:
234
234
  - app/views/decidim/budgets/projects/show.html.erb
235
235
  - app/views/decidim/budgets/vote_reminder_mailer/vote_reminder.html.erb
236
236
  - config/assets.rb
237
- - config/environment.rb
238
237
  - config/locales/am-ET.yml
239
238
  - config/locales/ar-SA.yml
240
239
  - config/locales/ar.yml
@@ -267,6 +266,7 @@ files:
267
266
  - config/locales/ga-IE.yml
268
267
  - config/locales/gl.yml
269
268
  - config/locales/gn-PY.yml
269
+ - config/locales/he-IL.yml
270
270
  - config/locales/hr-HR.yml
271
271
  - config/locales/hr.yml
272
272
  - config/locales/hu.yml
@@ -334,6 +334,7 @@ files:
334
334
  - db/migrate/20200827154129_add_commentable_counter_cache_to_projects.rb
335
335
  - db/migrate/20210310120613_add_followable_counter_cache_to_budgets.rb
336
336
  - db/migrate/20220428072638_add_geolocalization_fields_to_projects.rb
337
+ - decidim-budgets.gemspec
337
338
  - lib/decidim/api/budget_type.rb
338
339
  - lib/decidim/api/budgets_type.rb
339
340
  - lib/decidim/api/project_type.rb
@@ -356,23 +357,23 @@ homepage: https://github.com/decidim/decidim
356
357
  licenses:
357
358
  - AGPL-3.0
358
359
  metadata: {}
359
- post_install_message:
360
+ post_install_message:
360
361
  rdoc_options: []
361
362
  require_paths:
362
363
  - lib
363
364
  required_ruby_version: !ruby/object:Gem::Requirement
364
365
  requirements:
365
- - - ">="
366
+ - - "~>"
366
367
  - !ruby/object:Gem::Version
367
- version: '3.0'
368
+ version: 3.0.0
368
369
  required_rubygems_version: !ruby/object:Gem::Requirement
369
370
  requirements:
370
371
  - - ">="
371
372
  - !ruby/object:Gem::Version
372
373
  version: '0'
373
374
  requirements: []
374
- rubygems_version: 3.4.22
375
- signing_key:
375
+ rubygems_version: 3.2.22
376
+ signing_key:
376
377
  specification_version: 4
377
378
  summary: Decidim budgets module
378
379
  test_files: []
@@ -1,3 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- # Empty line for playing nice with tpope/vim-rails