decidim-budgets 0.30.3 → 0.30.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 758eab6acd09a4e9042c52ed7b2db2c318b0acfccc135c025d5d8f806f3b431f
4
- data.tar.gz: 1555da2434e96cbec0663c0685c038e3baa58bc654cd8597f575777ccdc275f3
3
+ metadata.gz: ab7f3bceace237b0327ec8ca9f925c9bdfccf8bc3c64458588417c13768623ad
4
+ data.tar.gz: e89dd4097b4ea169c0dec8c5b0e01425ca1d537d1e30c8c460a6a5c634999ce8
5
5
  SHA512:
6
- metadata.gz: 9d4b43b2ed9f09f0f962e466cf14158edb7437ade7f102c3da628a0e1e725f90f468e10f86c72d7e1feeea09533d3bcde389a81987e06eb887bd4fc4c01181f1
7
- data.tar.gz: 4fd4c96622507962f65a43b79f97bc236c240ea4fc7103ed4b82d2407a579ba19cf5b3cb5e2d2903b65d54736da2338d9e71210ee43451d9b60616e36dc23e95
6
+ metadata.gz: 3083a886a599b31fd54ef02daec4166c5b3623bccc4f43de619d6f19e1af9702419be72213cc680edd429dd537f63104a1deff617bac06fa63c5b37657cc3023
7
+ data.tar.gz: f2fc88007eda9bc56f75e23f28c4dd2c3bf3a76f31ce5630d671e4510caaa62ea208e7a356b358daafa0d206586958a21807bc38c158e06d731cf5f0abf04b64
@@ -68,7 +68,17 @@ module Decidim
68
68
  end
69
69
 
70
70
  def proposals
71
- Decidim::Proposals::Proposal.where(component: origin_component).published.not_hidden.not_withdrawn.accepted.order(:published_at)
71
+ proposals = Decidim::Proposals::Proposal.where(component: origin_component).published.not_hidden.not_withdrawn
72
+
73
+ if form.internal_states.present?
74
+ if form.internal_states.include?("not_answered")
75
+ proposals.not_answered.or(proposals.where(id: proposals.only_status(form.internal_states).pluck(:id)))
76
+ else
77
+ proposals.only_status(form.internal_states)
78
+ end
79
+ else
80
+ proposals
81
+ end.order(:published_at)
72
82
  end
73
83
 
74
84
  def origin_component
@@ -10,10 +10,9 @@ module Decidim
10
10
 
11
11
  attribute :origin_component_id, Integer
12
12
  attribute :default_budget, Integer
13
- attribute :import_all_accepted_proposals, Boolean
13
+ attribute :internal_states, Array[String]
14
14
 
15
15
  validates :origin_component_id, :origin_component, :current_component, presence: true
16
- validates :import_all_accepted_proposals, allow_nil: false, acceptance: true
17
16
  validates :default_budget, presence: true, numericality: { greater_than: 0 }
18
17
 
19
18
  def origin_component
@@ -33,6 +32,17 @@ module Decidim
33
32
  def budget
34
33
  @budget ||= context[:budget]
35
34
  end
35
+
36
+ def available_states(component_id = nil)
37
+ scope = Decidim::Proposals::ProposalState
38
+ scope = scope.where(component: Decidim::Component.find(component_id)) if component_id.present?
39
+
40
+ states = scope.pluck(:token).uniq.map do |token|
41
+ OpenStruct.new(token: token, title: token.humanize)
42
+ end
43
+
44
+ states + [OpenStruct.new(token: "not_answered", title: I18n.t("decidim.proposals.answers.not_answered"))]
45
+ end
36
46
  end
37
47
  end
38
48
  end
@@ -151,11 +151,11 @@ module Decidim
151
151
  end
152
152
 
153
153
  def self.ransackable_attributes(auth_object = nil)
154
- base = %w(search_text description title)
154
+ base = %w(id_string id search_text description title)
155
155
 
156
156
  return base unless auth_object&.admin?
157
157
 
158
- base + %w(id_string id selected selected_at confirmed_orders_count)
158
+ base + %w(selected selected_at confirmed_orders_count)
159
159
  end
160
160
 
161
161
  def self.ransackable_associations(_auth_object = nil)
@@ -20,9 +20,17 @@
20
20
  <div class="row column">
21
21
  <%= f.number_field :default_budget, label: t(".default_budget") %>
22
22
  </div>
23
- <div class="row column">
24
- <%= f.check_box :import_all_accepted_proposals, label: t(".import_all_accepted_proposals") %>
25
- </div>
23
+ <% if @form.available_states.any? %>
24
+ <label class="ml-4"><%= t(".proposal_states") %></label>
25
+ <span class="help-text ml-4"><%= t(".proposal_states_help") %></span>
26
+ <div class="row column">
27
+ <%= f.collection_check_boxes :internal_states, @form.available_states, :token, ->(a) { translated_attribute(a.title) } do |builder| %>
28
+ <div>
29
+ <%= builder.label { builder.check_box + builder.text } %>
30
+ </div>
31
+ <% end %>
32
+ </div>
33
+ <% end %>
26
34
  </div>
27
35
  </div>
28
36
  </div>
@@ -113,7 +113,6 @@ bg:
113
113
  new:
114
114
  create: Импортиране на предложения в проекти
115
115
  default_budget: Бюджет по подразбиране
116
- import_all_accepted_proposals: Импортиране на всички приети предложения
117
116
  no_components: Няма други компоненти на предложения в това пространство за участие за импортиране на предложенията в проекти.
118
117
  origin_component_id: Компонент за произход
119
118
  select_component: Моля, изберете компонент
@@ -145,9 +145,10 @@ ca-IT:
145
145
  new:
146
146
  create: Importa propostes a projectes
147
147
  default_budget: Pressupost per defecte
148
- import_all_accepted_proposals: Importar totes les propostes acceptades
149
148
  no_components: No hi ha cap component de propostes en aquest espai participatiu per importar les propostes a projectes.
150
149
  origin_component_id: Component d'origen
150
+ proposal_states: Estats de resposta a la proposta
151
+ proposal_states_help: Selecciona un o més estats de resposta de les propostes a importar com a projectes. Si no seleccioneu cap estat de resposta, s'importaran totes les propostes publicades que encara no hagin estat importades a altres pressupostos d'aquest mateix component.
151
152
  select_component: Selecciona un component
152
153
  title: Importa propostes a projectes
153
154
  reminders:
@@ -145,9 +145,10 @@ ca:
145
145
  new:
146
146
  create: Importa propostes a projectes
147
147
  default_budget: Pressupost per defecte
148
- import_all_accepted_proposals: Importar totes les propostes acceptades
149
148
  no_components: No hi ha cap component de propostes en aquest espai participatiu per importar les propostes a projectes.
150
149
  origin_component_id: Component d'origen
150
+ proposal_states: Estats de resposta a la proposta
151
+ proposal_states_help: Selecciona un o més estats de resposta de les propostes a importar com a projectes. Si no seleccioneu cap estat de resposta, s'importaran totes les propostes publicades que encara no hagin estat importades a altres pressupostos d'aquest mateix component.
151
152
  select_component: Selecciona un component
152
153
  title: Importa propostes a projectes
153
154
  reminders:
@@ -149,7 +149,6 @@ cs:
149
149
  new:
150
150
  create: Návrhy na projekty
151
151
  default_budget: Výchozí rozpočet
152
- import_all_accepted_proposals: Importovat všechny přijaté návrhy
153
152
  no_components: V tomto participativním prostoru neexistují jiné komponenty návrhu, které by mohly importovat návrhy do projektů.
154
153
  origin_component_id: Původ komponenty
155
154
  select_component: Vyberte součást
@@ -145,7 +145,6 @@ de:
145
145
  new:
146
146
  create: Importieren Sie Vorschläge in Projekte
147
147
  default_budget: Standardbudget
148
- import_all_accepted_proposals: Alle akzeptierten Vorschläge importieren
149
148
  no_components: Es gibt keine weiteren Vorschlagskomponenten in diesem partizipativen Raum, um die Vorschläge in Projekte zu importieren.
150
149
  origin_component_id: Ursprungskomponente
151
150
  select_component: Bitte wählen Sie eine Komponente aus
@@ -256,9 +255,9 @@ de:
256
255
  are_you_sure: Sind Sie sicher, dass Sie Ihre Stimme zurückziehen wollen?
257
256
  cancel_order: Löschen Sie Ihre Stimme und beginnen Sie von vorne
258
257
  checked_out:
259
- description: Sie haben bereits über dieses Budget abgestimmt. Wenn Sie Ihre Meinung geändert haben, können Sie %{cancel_link}.
258
+ description: Sie haben bereits über dieses Budget abgestimmt. Wenn Sie Ihre Meinung geändert haben, können Sie Ihre Stimmen löschen.
260
259
  title: Budget-Abstimmung abgeschlossen
261
- vote: Gewähltes Budget
260
+ vote: Für Budget abstimmen
262
261
  count:
263
262
  projects_count:
264
263
  one: 1 Projekt
@@ -304,16 +303,16 @@ de:
304
303
  remove: Projekt %{resource_name} aus Ihrer Abstimmung entfernen.
305
304
  selected: Ausgewählt
306
305
  votes:
307
- one: Abstimmung
308
- other: Abstimmungen
306
+ one: Stimme
307
+ other: Stimmen
309
308
  you_voted: Sie haben dafür gestimmt
310
309
  project_budget_button:
311
310
  add: Zur Abstimmung hinzufügen
312
311
  add_descriptive: Projekt %{resource_name} zu Ihrer Abstimmung hinzufügen.
313
- added: Zu deiner Abstimmung hinzugefügt
312
+ added: Ausgewählt
314
313
  added_descriptive: Project %{resource_name} zu Ihrer Abstimmung hinzugefügt.
315
314
  project_filter:
316
- added: Hinzugefügt
315
+ added: Ausgewählt
317
316
  all: Alle
318
317
  projects_for: Projekte für %{name}
319
318
  select_projects: Projekte auswählen
@@ -322,7 +321,7 @@ de:
322
321
  prompt: Budget auswählen
323
322
  vote_reminder_mailer:
324
323
  vote_reminder:
325
- email_budgets: 'Bereiche, in denen Sie eine unvollendete Abstimmung haben:'
324
+ email_budgets: 'In diesen Bereichen haben Sie die Abstimmung noch nicht abgeschlossen:'
326
325
  email_intro: Sie haben Ihre begonnene Abstimmung zur Verteilung des partizipativen Budgets noch nicht abgeschlossen.
327
326
  email_link: Mit der Abstimmung fortfahren
328
327
  email_outro: Denken Sie daran, die Abstimmung vollständig abzuschließen. Wählen Sie dazu den gewünschten Vorschlag oder die gewünschten Vorschläge aus, denen Sie Ihre Stimme geben möchten. Bestätigen Sie anschliessend Ihre Auswahl, indem Sie auf "Abstimmen" klicken.
@@ -101,7 +101,6 @@ el:
101
101
  new:
102
102
  create: Εισαγωγή προτάσεων σε έργα
103
103
  default_budget: Προεπιλεγμένος προϋπολογισμός
104
- import_all_accepted_proposals: Εισαγωγή όλων των αποδεχθείσων προτάσεων
105
104
  no_components: Δεν υπάρχουν άλλα στοιχεία προτάσεων σε αυτόν τον χώρο συμμετοχής για εισαγωγή των προτάσεων σε έργα.
106
105
  origin_component_id: Στοιχείο καταγωγής
107
106
  select_component: Επιλέξτε ένα στοιχείο
@@ -145,9 +145,10 @@ en:
145
145
  new:
146
146
  create: Import proposals to projects
147
147
  default_budget: Default budget
148
- import_all_accepted_proposals: Import all accepted proposals
149
148
  no_components: There are no other proposal components in this participatory space to import the proposals into projects.
150
149
  origin_component_id: Origin component
150
+ proposal_states: Proposal States
151
+ proposal_states_help: Select one or more proposal states to import into projects. By selecting none, you will import all published proposals that have not already been imported in other budgets from this component.
151
152
  select_component: Please select a component
152
153
  title: Import proposals to projects
153
154
  reminders:
@@ -145,9 +145,10 @@ es-MX:
145
145
  new:
146
146
  create: Importar propuestas a proyectos
147
147
  default_budget: Presupuesto por defecto
148
- import_all_accepted_proposals: Importar todas las propuestas aceptadas
149
148
  no_components: No hay otros componentes de la propuesta en este espacio participativo para importar las propuestas en los proyectos.
150
149
  origin_component_id: Componente de origen
150
+ proposal_states: Estados de repuesta a la propuesta
151
+ proposal_states_help: Selecciona uno o más estados de respuesta de las propuestas a importar como proyectos. Si no seleccionas ningún estado de respuesta, se importaran todas las propuestas publicadas que no hayan sido importadas aún a otros presupuestos de este mismo componente.
151
152
  select_component: Por favor seleccione un componente
152
153
  title: Importar propuestas a proyectos
153
154
  reminders:
@@ -145,9 +145,10 @@ es-PY:
145
145
  new:
146
146
  create: Importar propuestas a proyectos
147
147
  default_budget: Presupuesto por defecto
148
- import_all_accepted_proposals: Importar todas las propuestas aceptadas
149
148
  no_components: No hay otros componentes de la propuesta en este espacio participativo para importar las propuestas en los proyectos.
150
149
  origin_component_id: Componente de origen
150
+ proposal_states: Estados de repuesta a la propuesta
151
+ proposal_states_help: Selecciona uno o más estados de respuesta de las propuestas a importar como proyectos. Si no seleccionas ningún estado de respuesta, se importaran todas las propuestas publicadas que no hayan sido importadas aún a otros presupuestos de este mismo componente.
151
152
  select_component: Por favor seleccione un componente
152
153
  title: Importar propuestas a proyectos
153
154
  reminders:
@@ -145,9 +145,10 @@ es:
145
145
  new:
146
146
  create: Importar propuestas a proyectos
147
147
  default_budget: Presupuesto por defecto
148
- import_all_accepted_proposals: Importar todas las propuestas aceptadas
149
148
  no_components: No hay otros componentes de la propuesta en este espacio participativo para importar las propuestas en los proyectos.
150
149
  origin_component_id: Componente de origen
150
+ proposal_states: Estados de repuesta a la propuesta
151
+ proposal_states_help: Selecciona uno o más estados de respuesta de las propuestas a importar como proyectos. Si no seleccionas ningún estado de respuesta, se importaran todas las propuestas publicadas que no hayan sido importadas aún a otros presupuestos de este mismo componente.
151
152
  select_component: Por favor seleccione un componente
152
153
  title: Importar propuestas a proyectos
153
154
  reminders:
@@ -145,9 +145,10 @@ eu:
145
145
  new:
146
146
  create: Inportatu proiektuetarako proposamenak
147
147
  default_budget: Aurrekontu lehenetsia
148
- import_all_accepted_proposals: Inportatu onartutako proposamen guztiak
149
148
  no_components: Ez dago proposamen osagairik parte hartzeko espazio honetan proposamenak proiektuetara inportatzeko.
150
149
  origin_component_id: Jatorrizko osagaia
150
+ proposal_states: Proposamenen egoera
151
+ proposal_states_help: Hautatu proposamen-egoera bat edo gehiago, proiektuetara inportatzeko. Bat ere hautatzen ez baduzu, osagai honetako beste aurrekontu batzuetan inportatu ez diren argitaratutako proposamen guztiak inportatuko dituzu.
151
152
  select_component: Meesedez, hautatu osagaia
152
153
  title: Inportatu proiektuetarako proposamenak
153
154
  reminders:
@@ -219,15 +220,15 @@ eu:
219
220
  order:
220
221
  status:
221
222
  continue_voting: Jarraitu bozkatzen
222
- download_vote: Deskargatu zure babesa
223
+ download_vote: Deskargatu zure hautaketa
223
224
  pending_to_vote_budgets:
224
225
  one: Beste aurrekontu batean bozkatu dezakezu
225
226
  other: Beste aurrekontu batzuetan bozkatu dezakezu
226
- share_vote: Aldatu zure babesa
227
+ share_vote: Partekatu zure hautaketa
227
228
  title: Zure babesa ongi bideratu da
228
229
  view_votes:
229
230
  one: Ikusi babesa
230
- other: Ikusi babesak
231
+ other: Botoak ikusi
231
232
  votes_count:
232
233
  one: 'Zure babesa honentzat: %{budget_name} erregistratu da.'
233
234
  other: 'Zure %{count} babes honentzat: %{budget_name} erregistratu dira.'
@@ -145,9 +145,10 @@ fi-pl:
145
145
  new:
146
146
  create: Tuo ehdotuksia suunnitelmiin
147
147
  default_budget: Oletusbudjetti
148
- import_all_accepted_proposals: Tuo kaikki hyväksytyt ehdotukset
149
148
  no_components: Tässä osallisuustilassa ei ole ole muita ehdotuskomponentteja, joista voitaisiin tuoda ehdotuksia suunnitelmiin.
150
149
  origin_component_id: Lähdekomponentti
150
+ proposal_states: Ehdotusten tilat
151
+ proposal_states_help: Valitse yksi tai useampi ehdotusten tila, joiden perusteella ehdotuksia tuodaan projekteiksi. Mikäli et valitse yhtään tilaa, kaikki julkaistut ehdotukset tuodaan, jos niitä ei ole aikaisemmin tuotu tämän komponentin budjetteihin.
151
152
  select_component: Valitse komponentti
152
153
  title: Tuo ehdotuksia projekteiksi
153
154
  reminders:
@@ -145,9 +145,10 @@ fi:
145
145
  new:
146
146
  create: Tuo ehdotuksia projekteiksi
147
147
  default_budget: Oletusbudjetti
148
- import_all_accepted_proposals: Tuo kaikki hyväksytyt ehdotukset
149
148
  no_components: Tässä osallistumistilassa ei ole ole muita ehdotuskomponentteja, joista voitaisiin tuoda ehdotuksia projekteiksi.
150
149
  origin_component_id: Lähdekomponentti
150
+ proposal_states: Ehdotusten tilat
151
+ proposal_states_help: Valitse yksi tai useampi ehdotusten tila, joiden perusteella ehdotuksia tuodaan projekteiksi. Mikäli et valitse yhtään tilaa, kaikki julkaistut ehdotukset tuodaan, jos niitä ei ole aikaisemmin tuotu tämän komponentin budjetteihin.
151
152
  select_component: Valitse komponentti
152
153
  title: Tuo ehdotuksia projekteiksi
153
154
  reminders:
@@ -139,9 +139,10 @@ fr-CA:
139
139
  new:
140
140
  create: Importer des propositions dans des projets
141
141
  default_budget: Budget par défaut
142
- import_all_accepted_proposals: Importer toutes les propositions acceptées
143
142
  no_components: Il n'y a pas d'autres modules de proposition dans cet espace participatif pour importer les propositions dans des projets.
144
143
  origin_component_id: Composant d'origine
144
+ proposal_states: Statuts de proposition
145
+ proposal_states_help: Sélectionnez un ou plusieurs statuts de proposition à importer dans les projets. Si vous n'en sélectionnez aucun, vous importerez toutes les propositions publiées qui n'ont pas déjà été importées dans d'autres budgets à partir de cette fonctionnalité.
145
146
  select_component: Veuillez sélectionner un module
146
147
  title: Importer des propositions dans des projets
147
148
  reminders:
@@ -139,9 +139,10 @@ fr:
139
139
  new:
140
140
  create: Importer des propositions dans des projets
141
141
  default_budget: Budget par défaut
142
- import_all_accepted_proposals: Importer toutes les propositions acceptées
143
142
  no_components: Il n'y a pas d'autres modules de proposition dans cet espace participatif pour importer les propositions dans des projets.
144
143
  origin_component_id: Composant d'origine
144
+ proposal_states: Statuts de proposition
145
+ proposal_states_help: Sélectionnez un ou plusieurs statuts de proposition à importer dans les projets. Si vous n'en sélectionnez aucun, vous importerez toutes les propositions publiées qui n'ont pas déjà été importées dans d'autres budgets à partir de cette fonctionnalité.
145
146
  select_component: Veuillez sélectionner un module
146
147
  title: Importer des propositions dans des projets
147
148
  reminders:
@@ -109,7 +109,6 @@ hu:
109
109
  new:
110
110
  create: Javaslatok importálása projektekbe
111
111
  default_budget: Alapértelmezett költségvetés
112
- import_all_accepted_proposals: Minden elfogadott javaslat importálása
113
112
  no_components: Ebben a részvételi térben nincs más javaslat-összetevő a javaslatok projektekbe való importálásához.
114
113
  origin_component_id: A komponens származása
115
114
  select_component: Válassz ki egy elemet
@@ -145,6 +145,18 @@ it:
145
145
  all: Tutti
146
146
  not_selected: Non selezionato
147
147
  selected: Selezionato
148
+ order_progress:
149
+ dynamic_help:
150
+ keep_adding_projects: Continua ad aggiungere progetti
151
+ start_adding_projects: Continua ad aggiungere progetti
152
+ minimum_projects_rule:
153
+ description: Seleziona almeno %{minimum_number} progetti che desideri e vota in base alle tue preferenze per definirne il budget.
154
+ projects_rule:
155
+ description: Seleziona almeno %{minimum_number} e fino a %{maximum_number} progetti che desideri e vota in base alle tue preferenze per definirne il budget.
156
+ projects_rule_maximum_only:
157
+ description: Seleziona fino a %{maximum_number} progetti che desideri e vota in base alle tue preferenze per definirne il budget.
158
+ vote_threshold_percent_rule:
159
+ description: Assegna almeno %{minimum_budget} ai progetti che desideri e vota in base alle tue preferenze per definirne il budget.
148
160
  orders:
149
161
  highest_cost: Costo più alto
150
162
  label: Ordina i progetti per
@@ -161,6 +173,7 @@ it:
161
173
  add: Aggiungi al tuo voto
162
174
  added: Aggiunto al tuo voto
163
175
  projects_for: Progetti per %{name}
176
+ select_projects: Seleziona i progetti
164
177
  show:
165
178
  budget: Budget
166
179
  components:
@@ -143,9 +143,10 @@ ja:
143
143
  new:
144
144
  create: プロジェクトへの提案をインポート
145
145
  default_budget: 既定の予算
146
- import_all_accepted_proposals: すべての承認済みの提案をインポート
147
146
  no_components: この参加型スペースには、プロジェクトにインポートするための他の提案コンポーネントはありません。
148
147
  origin_component_id: 元のコンポーネント
148
+ proposal_states: 提案状態
149
+ proposal_states_help: プロジェクトにインポートする提案状態を1つ以上選択してください。何も選択しない場合、このコンポーネントの提案のうち、公開済みかつ他の予算にインポートされていないすべての提案をインポートします。
149
150
  select_component: コンポーネントを選択してください
150
151
  title: プロジェクトに提案をインポート
151
152
  reminders:
@@ -103,7 +103,6 @@ lt:
103
103
  new:
104
104
  create: Importuoti pasiūlymus į projektus
105
105
  default_budget: Numatytasis biudžetas
106
- import_all_accepted_proposals: Importuoti visus priimtus projektus
107
106
  no_components: Nėra kitų pasiūlymų komponentų šioje dalyvaujamojoje erdvėje, kuriuos būtų galima importuoti į projektus.
108
107
  origin_component_id: Originalusis komponentas
109
108
  select_component: Pasirinkite komponentą
@@ -79,7 +79,6 @@ nl:
79
79
  new:
80
80
  create: Voorstellen importeren in projecten
81
81
  default_budget: Standaard budget
82
- import_all_accepted_proposals: Alle geaccepteerde voorstellen importeren
83
82
  no_components: Er zijn geen andere voorstelonderdelen in deze participatieruimte om voorstellen in projecten te kunnen importeren.
84
83
  origin_component_id: Oorsprong component
85
84
  select_component: Selecteer een component
@@ -112,7 +112,6 @@ pl:
112
112
  new:
113
113
  create: Importuj propozycje do projektów
114
114
  default_budget: Domyślny budżet
115
- import_all_accepted_proposals: Importuj wszystkie zaakceptowane propozycje
116
115
  no_components: W tej przestrzeni partycypacyjnej nie ma innych komponentów do zaimportowania propozycji jako projektów.
117
116
  origin_component_id: Źródłowy komponent
118
117
  select_component: Wybierz komponent
@@ -18,6 +18,10 @@ pt-BR:
18
18
  scope_id: Escopo
19
19
  activerecord:
20
20
  models:
21
+ decidim:
22
+ budgets:
23
+ project:
24
+ text: 'Foi adicionado a este orçamento: %{link}'
21
25
  decidim/budgets/budget:
22
26
  one: Orçamento
23
27
  other: Orçamentos
@@ -26,6 +30,9 @@ pt-BR:
26
30
  other: Projetos
27
31
  decidim:
28
32
  admin:
33
+ admin_log:
34
+ changeset:
35
+ projects: Projetos
29
36
  filters:
30
37
  projects:
31
38
  selected_at_null:
@@ -33,10 +40,15 @@ pt-BR:
33
40
  values:
34
41
  'false': Selecionado para implementação
35
42
  'true': Não selecionado para implementação
43
+ taxonomies_part_of_contains:
44
+ label: Taxonomia
36
45
  budgets:
37
46
  actions:
38
47
  attachment_collections: Pastas
39
48
  attachments: Anexos
49
+ confirm_delete_budget: Tem certeza de que deseja excluir este orçamento?
50
+ confirm_delete_project: Tem certeza que deseja excluir este projeto?
51
+ deleted_budgets_info: Orçamentos excluídos podem ser restaurados da lixeira.
40
52
  edit: Editar
41
53
  edit_projects: Gerenciar projetos
42
54
  import: Importar propostas para os projetos
@@ -45,6 +57,8 @@ pt-BR:
45
57
  preview: Pré-visualização
46
58
  send_voting_reminders: Enviar lembretes de votação
47
59
  title: Ações
60
+ view_deleted_budgets: Ver orçamentos excluídos
61
+ view_deleted_projects: Ver projetos excluídos
48
62
  admin:
49
63
  budgets:
50
64
  create:
@@ -59,6 +73,8 @@ pt-BR:
59
73
  title: Orçamentos
60
74
  users_with_finished_orders: Usuários com votos finalizados
61
75
  users_with_pending_orders: Usuários com votos pendentes
76
+ manage_trash:
77
+ title: Orçamentos excluídos
62
78
  new:
63
79
  create: Criar orçamento
64
80
  title: Novo orçamento
@@ -84,6 +100,7 @@ pt-BR:
84
100
  cancel: Cancelar
85
101
  change_budget: Alterar orçamento
86
102
  change_selected: Alterar estado selecionado
103
+ change_taxonomies: Alterar taxonomias
87
104
  deselect_implementation: Desselecionar da implementação
88
105
  finished_orders: Votos finais
89
106
  pending_orders: Votações pendentes
@@ -95,6 +112,8 @@ pt-BR:
95
112
  title: Projetos
96
113
  update: Atualizar
97
114
  update_budget_button: Atualizar orçamento do projeto
115
+ manage_trash:
116
+ title: Projetos excluídos
98
117
  new:
99
118
  create: Criar
100
119
  title: Novo projeto
@@ -102,10 +121,23 @@ pt-BR:
102
121
  invalid: Houve um problema ao atualizar este projeto.
103
122
  success: Projeto atualizado com sucesso.
104
123
  update_budget:
124
+ invalid: 'Esses projetos já estão no mesmo orçamento ou seus orçamentos são mais que o máximo permitido: %{errored}.'
105
125
  select_a_project: Por favor, selecione um projeto.
126
+ success: 'Projetos atualizados com sucesso para o orçamento %{subject_name}: %{successful}.'
106
127
  update_selected:
128
+ invalid:
129
+ selected: 'Estes projetos já foram selecionados para a implementação: %{errored}.'
130
+ unselected: 'Estes projetos já foram desselecionados da implementação: %{errored}.'
107
131
  select_a_project: Por favor, selecione um projeto.
108
132
  select_a_selection: Por favor, selecione um estado de implementação.
133
+ success:
134
+ selected: 'Estes projetos foram selecionados com sucesso para a implementação: %{successful}.'
135
+ unselected: 'Estes projetos foram desselecionados da implementação com sucesso: %{successful}.'
136
+ update_taxonomies:
137
+ invalid: 'Taxonomias %{taxonomies} já estão atribuídas a esses projetos: %{errored}.'
138
+ select_a_project: Por favor, selecione um projeto.
139
+ select_a_taxonomy: Por favor, selecione uma taxonomia.
140
+ success: 'Projetos atualizados com sucesso para as taxonomias %{taxonomies}: %{successful}.'
109
141
  proposals_imports:
110
142
  create:
111
143
  invalid: Houve um problema ao importar as propostas para projetos.
@@ -113,9 +145,10 @@ pt-BR:
113
145
  new:
114
146
  create: Importar propostas para projetos
115
147
  default_budget: Orçamento padrão
116
- import_all_accepted_proposals: Importar todas as propostas aceitas
117
148
  no_components: Não há outros componentes da proposta neste espaço participativo para importar as propostas para projetos.
118
149
  origin_component_id: Componente de origem
150
+ proposal_states: Estados da proposta
151
+ proposal_states_help: Selecione um ou mais estados da proposta para importar para os projetos. Selecionando nenhuma, você importará todas as propostas publicadas que não foram já importadas para outros orçamentos deste componente.
119
152
  select_component: Selecione um componente
120
153
  title: Importar propostas para os projetos
121
154
  reminders:
@@ -128,10 +161,14 @@ pt-BR:
128
161
  budget:
129
162
  create: "%{user_name} criou o orçamento %{resource_name} no espaço %{space_name}"
130
163
  delete: "%{user_name} excluiu o orçamento %{resource_name} no espaço %{space_name}"
164
+ restore: "%{user_name} restaurou o orçamento %{resource_name} em %{space_name}"
165
+ soft_delete: "%{user_name} moveu o orçamento %{resource_name} em %{space_name} para a lixeira"
131
166
  update: "%{user_name} atualizou o orçamento %{resource_name} no espaço %{space_name}"
132
167
  project:
133
168
  create: "%{user_name} criou o projeto %{resource_name} no espaço %{space_name}"
134
169
  delete: "%{user_name} excluiu o projeto %{resource_name} no espaço %{space_name}"
170
+ restore: "%{user_name} restaurou o projeto %{resource_name} em %{space_name}"
171
+ soft_delete: "%{user_name} moveu o projeto %{resource_name} em %{space_name} para a lixeira"
135
172
  update: "%{user_name} atualizou o projeto %{resource_name} no espaço %{space_name}"
136
173
  budget_information_modal:
137
174
  back_to: Voltar para %{component_name}
@@ -161,6 +198,8 @@ pt-BR:
161
198
  vote: Voto
162
199
  voted_budgets: Orçamentos votados
163
200
  voted_on: Você votou em %{links}.
201
+ creation:
202
+ text: Eles foram adicionados a este orçamento
164
203
  last_activity:
165
204
  new_vote_at: Nova votação sobre orçamentação em
166
205
  limit_announcement:
@@ -176,10 +215,23 @@ pt-BR:
176
215
  fields:
177
216
  id: ID
178
217
  map: Mapa
218
+ taxonomies: Taxonomias
179
219
  title: Título
180
220
  order:
181
221
  status:
222
+ continue_voting: Continuar votando
223
+ download_vote: Baixe seu voto
224
+ pending_to_vote_budgets:
225
+ one: Você pode votar em outro orçamento
226
+ other: Você pode votar em outros orçamentos
227
+ share_vote: Compartilhe seu voto
182
228
  title: Seu voto foi aceito com sucesso
229
+ view_votes:
230
+ one: Visualizar voto
231
+ other: Ver votos
232
+ votes_count:
233
+ one: Seu voto para %{budget_name} já foi registrado.
234
+ other: Seus votos %{count} para %{budget_name} já foram registrados.
183
235
  order_summary_mailer:
184
236
  order_summary:
185
237
  selected_projects: 'Os projetos que você selecionou são:'
@@ -287,8 +339,10 @@ pt-BR:
287
339
  settings:
288
340
  global:
289
341
  announcement: Anúncio
342
+ clear_all: Limpar tudo
290
343
  comments_enabled: Comentários ativados
291
344
  comments_max_length: Tamanho máximo de comentários (deixe 0 para o valor padrão)
345
+ define_taxonomy_filters: Por favor, defina alguns filtros para este espaço participativo antes de usar esta configuração.
292
346
  form:
293
347
  errors:
294
348
  budget_voting_rule_only_one: Apenas uma regra de votação deve estar habilitada.
@@ -296,8 +350,11 @@ pt-BR:
296
350
  geocoding_enabled: Mapas ativados
297
351
  landing_page_content: Página inicial dos orçamentos
298
352
  more_information_modal: Modal de mais informação
353
+ no_taxonomy_filters_found: Nenhum filtro de taxonomia encontrado.
299
354
  projects_per_page: Projetos por página
300
355
  resources_permissions_enabled: Permissões de ações podem ser definidas para cada projeto
356
+ taxonomy_filters: Selecione filtros para o componente
357
+ taxonomy_filters_add: Adicionar filtro
301
358
  title: Título
302
359
  total_budget: Orçamento total
303
360
  vote_minimum_budget_projects_number: Número mínimo de projetos para votar
@@ -325,6 +382,18 @@ pt-BR:
325
382
  disabled: Votação desativada
326
383
  enabled: Votação habilitada
327
384
  finished: Votação finalizada
385
+ download_your_data:
386
+ help:
387
+ orders:
388
+ budget: O orçamento com o qual a ordem está relacionada
389
+ checked_out_at: A data e hora em que o pedido foi verificado
390
+ component: O componente com o qual a ordem está relacionada
391
+ created_at: A data e hora em que o pedido foi criado
392
+ id: O identificador exclusivo do pedido
393
+ projects: Os projetos em que a ordem foi votada
394
+ updated_at: A data e hora em que o pedido foi atualizado
395
+ show:
396
+ projects: Exportação de projetos
328
397
  events:
329
398
  budgets:
330
399
  budget_published:
@@ -332,6 +401,31 @@ pt-BR:
332
401
  email_outro: Você recebeu esta notificação porque está seguindo %{participatory_space_title}. Você pode parar de receber notificações após o link anterior.
333
402
  email_subject: O orçamento %{resource_title} agora está ativo para %{participatory_space_title}.
334
403
  notification_title: O orçamento <a href="%{resource_path}">%{resource_title}</a> agora está ativo para %{participatory_space_title}.
404
+ open_data:
405
+ help:
406
+ projects:
407
+ address: O endereço do projeto (se houver)
408
+ budget: Dados relativos ao orçamento (por exemplo, "2021 orçamento") do projeto
409
+ budget_amount: O montante total do orçamento para este projeto
410
+ comments: O número de comentários que este projeto recebeu
411
+ component: O componente ao qual o projeto pertence
412
+ confirmed_votes: O número de votos confirmados que este projeto recebeu
413
+ created_at: Data e hora em que o projeto foi criado
414
+ description: A descrição do projeto
415
+ follows_count: O número de seguir o projeto tem
416
+ id: O identificador exclusivo do projeto
417
+ latitude: A latitude do projeto, caso tenha uma localização física
418
+ longitude: A longitude do projeto, caso ele tenha um local físico
419
+ participatory_space: A que espaço (por exemplo, Processo participativo, ou montagem) este projeto pertence
420
+ reference: A referência exclusiva do projeto
421
+ related_proposal_titles: Os títulos das propostas relacionadas
422
+ related_proposal_urls: As URLs das propostas relacionadas
423
+ related_proposals: As propostas relacionadas a este projeto
424
+ selected_at: O momento em que o projeto foi selecionado
425
+ taxonomies: As taxonomias do projeto
426
+ title: O título do projeto
427
+ updated_at: A última data em que o projeto foi atualizado
428
+ url: A URL do projeto
335
429
  orders:
336
430
  checkout:
337
431
  error: Ocorreu um erro ao processar seu voto.
@@ -83,6 +83,8 @@ ro:
83
83
  new:
84
84
  create: Importă propuneri în proiecte
85
85
  no_components: Nu există alte componente de propuneri în acest spațiu participativ pentru a importa propunerile în proiecte.
86
+ proposal_states: Stări ale propunerii
87
+ proposal_states_help: Selectați una sau mai multe stări de propunere pentru a importa în proiecte. Prin neselectarea vreuneia, veți importa toate propunerile publicate care nu au fost deja importate în alte bugete din această componentă.
86
88
  select_component: Te rugăm selectează o componentă
87
89
  admin_log:
88
90
  budget:
@@ -145,7 +145,6 @@ sv:
145
145
  new:
146
146
  create: Importera förslag till projekt
147
147
  default_budget: Förvald budget
148
- import_all_accepted_proposals: Importera alla godkända förslag
149
148
  no_components: Det finns inga andra förslagskomponenter med förslag i deltagarutrymmet som kan importeras till projekt.
150
149
  origin_component_id: Ursprungskomponent
151
150
  select_component: Välj en komponent
@@ -100,7 +100,6 @@ zh-TW:
100
100
  new:
101
101
  create: 將提案匯入專案
102
102
  default_budget: 預設預算
103
- import_all_accepted_proposals: 導入所有已接受的提案
104
103
  no_components: 在此參與空間中沒有其他提案元件可以將提案匯入到專案中。
105
104
  origin_component_id: 原始元件
106
105
  select_component: 請選擇一個組件
@@ -21,6 +21,20 @@ Decidim.register_component(:budgets) do |component|
21
21
  raise StandardError, "Cannot remove this component" if Decidim::Budgets::Budget.where(component: instance).any?
22
22
  end
23
23
 
24
+ component.on(:publish) do |instance|
25
+ Decidim::Budgets::Budget.where(component: instance).find_each do |budget|
26
+ Decidim::UpdateSearchIndexesJob.perform_later([budget])
27
+ Decidim::UpdateSearchIndexesJob.perform_later(budget.projects)
28
+ end
29
+ end
30
+
31
+ component.on(:unpublish) do |instance|
32
+ Decidim::Budgets::Budget.where(component: instance).find_each do |budget|
33
+ Decidim::RemoveSearchIndexesJob.perform_later([budget])
34
+ Decidim::RemoveSearchIndexesJob.perform_later(budget.projects)
35
+ end
36
+ end
37
+
24
38
  component.register_resource(:budget) do |resource|
25
39
  resource.model_class_name = "Decidim::Budgets::Budget"
26
40
  resource.card = "decidim/budgets/budget"
@@ -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.30.3"
7
+ "0.30.5"
8
8
  end
9
9
  end
10
10
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: decidim-budgets
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.30.3
4
+ version: 0.30.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Josep Jaume Rey Peroy
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2025-10-28 00:00:00.000000000 Z
13
+ date: 2026-01-28 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.30.3
21
+ version: 0.30.5
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.30.3
28
+ version: 0.30.5
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.30.3
35
+ version: 0.30.5
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.30.3
42
+ version: 0.30.5
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.30.3
49
+ version: 0.30.5
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.30.3
56
+ version: 0.30.5
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.30.3
63
+ version: 0.30.5
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.30.3
70
+ version: 0.30.5
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.30.3
77
+ version: 0.30.5
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.30.3
84
+ version: 0.30.5
85
85
  description: A budgets component for decidim's participatory spaces.
86
86
  email:
87
87
  - josepjaume@gmail.com