decidim-stratified_sortitions 0.0.1 → 0.1.0

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.
Files changed (31) hide show
  1. checksums.yaml +4 -4
  2. data/app/commands/decidim/stratified_sortitions/admin/create_stratified_sortition.rb +4 -9
  3. data/app/commands/decidim/stratified_sortitions/admin/update_stratified_sortition.rb +4 -9
  4. data/app/controllers/concerns/decidim/stratified_sortitions/strata_charts_data.rb +2 -1
  5. data/app/helpers/decidim/stratified_sortitions/application_helper.rb +6 -1
  6. data/app/jobs/decidim/stratified_sortitions/admin/import_sample_job.rb +1 -1
  7. data/app/jobs/decidim/stratified_sortitions/admin/sortition_results_export_job.rb +3 -1
  8. data/app/packs/src/decidim/stratified_sortitions/stratum_fields.js +0 -6
  9. data/app/packs/stylesheets/decidim/stratified_sortitions/admin/stratified_sortitions.scss +9 -2
  10. data/app/serializers/decidim/stratified_sortitions/sortition_result_serializer.rb +7 -1
  11. data/app/services/decidim/stratified_sortitions/charts_pdf_generator.rb +9 -13
  12. data/app/services/decidim/stratified_sortitions/fair_sortition_service.rb +1 -1
  13. data/app/services/decidim/stratified_sortitions/leximin/panel_generator.rb +1 -1
  14. data/app/services/decidim/stratified_sortitions/sortition_results_exporter.rb +13 -1
  15. data/app/views/decidim/stratified_sortitions/admin/stratified_sortitions/_form.html.erb +3 -3
  16. data/app/views/decidim/stratified_sortitions/admin/stratified_sortitions/_stratum.html.erb +2 -1
  17. data/app/views/decidim/stratified_sortitions/admin/stratified_sortitions/_substratum.html.erb +1 -0
  18. data/app/views/decidim/stratified_sortitions/admin/stratified_sortitions/execute.html.erb +18 -18
  19. data/app/views/decidim/stratified_sortitions/admin/stratified_sortitions/upload_sample.html.erb +12 -14
  20. data/config/assets.rb +2 -2
  21. data/config/i18n-tasks.yml +196 -0
  22. data/config/locales/ca.yml +169 -216
  23. data/config/locales/en.yml +171 -217
  24. data/config/locales/es.yml +170 -216
  25. data/config/locales/oc.yml +312 -0
  26. data/db/migrate/20251104120000_create_stratified_sortitions_strata_and_substrata.decidim_stratified_sortitions.rb +1 -1
  27. data/lib/decidim/stratified_sortitions/engine.rb +6 -3
  28. data/lib/decidim/stratified_sortitions/version.rb +2 -2
  29. metadata +9 -10
  30. data/app/views/decidim/admin/components/index.html.erb +0 -54
  31. data/app/views/layouts/decidim/admin/_sidebar_menu.html.erb +0 -45
@@ -2,61 +2,78 @@
2
2
  en:
3
3
  activemodel:
4
4
  attributes:
5
+ sample_upload:
6
+ file: File
5
7
  stratified_sortition:
6
8
  created_at: Created At
7
- title: Title
8
9
  description: Description
9
10
  num_candidates: Number of candidates to select
10
- selection_criteria: Selection Criteria
11
11
  selected_profiles_description: Description of the profiles to be selected
12
+ selection_criteria: Selection Criteria
13
+ title: Title
12
14
  errors:
13
15
  messages:
14
- cannot_add_strata_with_sample_participants: "Cannot add strata when there are already imported participants"
15
- cannot_delete_strata_with_sample_participants: "Cannot delete strata when there are already imported participants"
16
- cannot_change_stratum_name_with_sample_participants: "Cannot change stratum name when there are already imported participants"
17
- cannot_change_stratum_kind_with_sample_participants: "Cannot change stratum kind when there are already imported participants"
18
- cannot_add_substrata_with_sample_participants: "Cannot add substrata when there are already imported participants"
19
- cannot_delete_substrata_with_sample_participants: "Cannot delete substrata when there are already imported participants"
20
- cannot_change_substratum_name_with_sample_participants: "Cannot change substratum name when there are already imported participants"
21
- cannot_change_substratum_value_with_sample_participants: "Cannot change substratum value when there are already imported participants"
22
- cannot_change_substratum_range_with_sample_participants: "Cannot change substratum range when there are already imported participants"
23
- cannot_change_num_candidates_when_executed: "Cannot change the number of candidates after the sortition has been executed"
16
+ cannot_add_strata_with_sample_participants: Cannot add strata when there are already imported participants
17
+ cannot_add_substrata_with_sample_participants: Cannot add substrata when there are already imported participants
18
+ cannot_change_num_candidates_when_executed: Cannot change the number of candidates after the sortition has been executed
19
+ cannot_change_stratum_kind_with_sample_participants: Cannot change stratum kind when there are already imported participants
20
+ cannot_change_stratum_name_with_sample_participants: Cannot change stratum name when there are already imported participants
21
+ cannot_change_substratum_name_with_sample_participants: Cannot change substratum name when there are already imported participants
22
+ cannot_change_substratum_range_with_sample_participants: Cannot change substratum range when there are already imported participants
23
+ cannot_change_substratum_value_with_sample_participants: Cannot change substratum value when there are already imported participants
24
+ cannot_delete_strata_with_sample_participants: Cannot delete strata when there are already imported participants
25
+ cannot_delete_substrata_with_sample_participants: Cannot delete substrata when there are already imported participants
24
26
  decidim:
25
- admin:
26
- components:
27
- index:
28
- headers:
29
- scope: Scope
30
27
  components:
31
28
  stratified_sortitions:
32
29
  name: Stratified Sortitions
33
30
  settings:
34
31
  global:
35
- announcement: Announcement
36
32
  publish_sortitions: Publish comparative charts of the Sortitions
37
33
  step:
38
34
  announcement: Announcement
39
35
  stratified_sortitions:
40
36
  admin:
41
37
  actions:
38
+ census_management: Manage sample
42
39
  configure: Configure
43
40
  confirm_destroy: Are you sure you want to delete this %{name}?
44
41
  destroy: Delete
45
42
  duplicate: Duplicate
46
43
  execute: Execute sortition
47
- new_stratified_sortition: "New Stratified Sortition"
48
- title: "Actions"
49
- census_management: Manage sample
44
+ new_stratified_sortition: New Stratified Sortition
45
+ title: Actions
46
+ import_mailer:
47
+ import:
48
+ failed_rows: Rows with errors
49
+ imported_rows: Successfully imported
50
+ participant_id: 'Participant ID:'
51
+ ready: The sample import has been completed successfully.
52
+ see_details: 'The identifiers of the participants who have had errors are:'
53
+ total_rows: Total rows
54
+ subject: Sample import result
50
55
  models:
51
56
  stratified_sortition:
52
57
  fields:
53
58
  created_at: Created At
54
- title: Title
55
- description: Description
56
59
  num_candidates: Number of candidates to select
57
- selection_criteria: Selection Criteria
58
- selected_profiles_description: Description of the profiles to be selected
59
60
  status: Status
61
+ title: Title
62
+ sample_imports:
63
+ create:
64
+ invalid: There was an error importing the sample.
65
+ success: The sample is being loaded in the background. When it finishes you will receive an email with the import summary.
66
+ remove_uploaded_samples:
67
+ enqueued: The sample removal has been enqueued and will be processed in the background.
68
+ samples:
69
+ errors:
70
+ no_strata: You must configure strata and substrata before uploading a sample.
71
+ pending: You can only upload samples when the stratified sortition is in pending status.
72
+ template:
73
+ personal_data_1: Personal data 1 (unique identifier)
74
+ personal_data_2: Personal data 2
75
+ personal_data_3: Personal data 3
76
+ personal_data_4: Personal data 4
60
77
  stratified_sortitions:
61
78
  create:
62
79
  error: There's been a problem creating this stratified sortition
@@ -65,108 +82,97 @@ en:
65
82
  error: There's been a problem deleting this stratified sortition
66
83
  has_problems: This stratified sortition couldn't be deleted due to related problems
67
84
  success: Stratified sortition successfully deleted
85
+ duplicate:
86
+ error: There's been a problem duplicating this stratified sortition
87
+ success: Stratified sortition successfully duplicated
88
+ edit:
89
+ title: Edit Stratified Sortition
90
+ update: Update
68
91
  execute:
92
+ algorithm: Algorithm
69
93
  candidates: Candidates
70
- chart_results: Distribution charts
71
- tab_charts: Comparative charts
72
- tab_participants: Selected participants
73
- empty_sample_participants: The sortition cannot be executed without a loaded census
74
- execute_stratified_sortition: Execute stratified sortition
75
- confirm_execute_title: Confirmation
76
94
  confirm_execute_body: Once the sortition is executed, it will be recorded on the platform and the action will be irreversible. The data, the strata configuration, and the sample cannot be edited.
77
- confirm_execute_ok: Execute sortition
78
95
  confirm_execute_cancel: Cancel
96
+ confirm_execute_ok: Execute sortition
97
+ confirm_execute_title: Confirmation
98
+ confirm_participants_body: You are accessing personal information and data. This action will be recorded.
99
+ confirm_participants_cancel: Cancel
100
+ confirm_participants_ok: Show
101
+ confirm_participants_title: Show the list of selected participants
102
+ empty_sample_participants: The sortition cannot be executed without a loaded census
103
+ execute_stratified_sortition: Execute stratified sortition
104
+ executing: The sortition has been enqueued and is being processed in the background.
105
+ executing_notice: The sortition is being processed in the background. This page will update once it is complete.
106
+ execution_failed: 'The sortition execution failed:'
79
107
  export: Export
80
- export_results: Export results
108
+ export_charts_pdf: Export charts PDF
81
109
  export_csv: Stratified sortition results as CSV
82
110
  export_excel: Stratified sortition results as Excel
83
111
  export_json: Stratified sortition results as JSON
84
- export_charts_pdf: Export charts PDF
85
- pdf_title: "Sortition results: %{name}"
86
- pdf_subtitle: Comparative sample distribution charts
87
- pdf_belongs_to: "Belongs to: %{space_name}"
88
- pdf_algorithm: "Algorithm used: %{algorithm}"
89
- pdf_executed_at: "Sortition performed on: %{date}"
90
- pdf_no_data: No data
91
- algorithm: Algorithm
92
112
  generated_at: Generated at
93
113
  generation_time: Generation time
94
- total_participants: Total participants
114
+ no_results_yet: The sortition has not been executed yet.
95
115
  num_panels: Number of panels
96
- selected_at: Selected at
97
- verification_seed: Verification seed
98
- random_value_used: Random value used
99
- selected_panel_probability: Selected panel probability
100
- selected_participants_title: Selected participants
101
- selected_participants:
102
- one: "1 selected participant"
103
- other: "%{count} selected participants"
104
- participant_id: ID
116
+ pdf_algorithm: 'Algorithm used: %{algorithm}'
117
+ pdf_belongs_to: 'Belongs to: %{space_name}'
118
+ pdf_executed_at: 'Sortition performed on: %{date}'
119
+ pdf_no_data: No data
120
+ pdf_subtitle: Comparative sample distribution charts
121
+ pdf_title: 'Sortition results: %{name}'
105
122
  personal_data_1: Personal data 1
106
123
  personal_data_2: Personal data 2
107
124
  personal_data_3: Personal data 3
108
125
  personal_data_4: Personal data 4
109
- no_results_yet: The sortition has not been executed yet.
110
- confirm_participants_title: Show the list of selected participants
111
- confirm_participants_body: You are accessing personal information and data. This action will be recorded.
112
- confirm_participants_ok: Show
113
- confirm_participants_cancel: Cancel
126
+ random_value_used: Random value used
114
127
  results: Results
115
- executing_notice: The sortition is being processed in the background. This page will update once it is complete.
116
- execution_failed: "The sortition execution failed:"
117
- success: Stratified sortition successfully executed
118
- executing: The sortition has been enqueued and is being processed in the background.
128
+ selected_at: Selected at
129
+ selected_panel_probability: Selected panel probability
130
+ selected_participants:
131
+ one: 1 selected participant
132
+ other: "%{count} selected participants"
133
+ selected_participants_title: Selected participants
134
+ tab_charts: Comparative charts
135
+ tab_participants: Selected participants
119
136
  target: Target
120
137
  title: Execute stratified sortition
138
+ total_participants: Total participants
121
139
  export_results:
122
140
  no_results: There are no results to export. Execute the sortition first.
123
- duplicate:
124
- error: There's been a problem duplicating this stratified sortition
125
- success: Stratified sortition successfully duplicated
141
+ form:
142
+ data: General Information
143
+ selected_profiles_description_help: You can indicate, if applicable, the stratification criteria used in the draw, and the reason.
144
+ selection_criteria_help: You can indicate, if applicable, the eligibility criteria of the people who have been selected to participate in the sortition.
126
145
  index:
127
146
  selected: Selected Stratified Sortitions
128
147
  title: Stratified Sortitions
129
148
  new:
130
149
  create: Create
131
150
  title: New Stratified Sortition
132
- edit:
133
- title: Edit Stratified Sortition
134
- update: Update
135
- form:
136
- data: General Information
137
- description: Description
138
- name: Name
139
- published: Published
140
- selected_profiles_description_help: You can indicate, if applicable, the stratification criteria used in the draw, and the reason.
141
- selection_criteria_help: You can indicate, if applicable, the eligibility criteria of the people who have been selected to participate in the sortition.
142
151
  strata:
143
- title: Strata
144
152
  add_stratum: Add stratum
153
+ title: Strata
145
154
  stratum:
146
- up: Up
147
155
  down: Down
148
- remove: Remove
149
- name: Name
150
- kind:
156
+ kind:
157
+ numeric_range: Numeric range
151
158
  title: Kind
152
159
  value: Value
153
- numeric_range: Numeric range
154
- substrata_title: Substrata
160
+ name: Name
161
+ remove: Remove
155
162
  title: Strata
163
+ up: Up
156
164
  substrata:
157
165
  add_substratum: Add substratum
158
166
  substratum:
159
- up: Up
160
- down: Down
161
- remove: Remove
167
+ max_quota_percentage: Objective %
168
+ max_quota_percentage_placeholder: Objective %
162
169
  name: Name
163
- value: Value
164
- value_placeholder: Value
165
170
  range: Range
166
171
  range_placeholder: Range (e.g. 0-18)
172
+ remove: Remove
167
173
  title: Substratum
168
- max_quota_percentage: Objective %
169
- max_quota_percentage_placeholder: Objective %
174
+ value: Value
175
+ value_placeholder: Value
170
176
  update:
171
177
  error: There's been a problem updating this stratified sortition
172
178
  success: Stratified sortition successfully updated
@@ -176,98 +182,94 @@ en:
176
182
  census_file: Choose a file
177
183
  census_file_label: Excel.csv file with census data
178
184
  configure_strata_first: You must configure strata and substrata first
185
+ confirm_remove_uploaded_samples: Are you sure you want to remove all uploaded samples?
179
186
  count_uploaded_files: "<b>%{count}</b> records uploaded."
180
187
  description: The sample file must be a CSV and have a format similar to the example below:<br>You can download and use the template.
181
- download_template: "Download template"
182
- download_template_csv: "Download as a CSV template"
183
- download_template_xlsx: "Download as a XLSX template"
184
- example: "Candidate data 1,Candidate data 2,Candidate data 3,Candidate data 4,Stratum 1,Stratum 2,Stratum 3,Stratum N<br>example@example.com,D,Higher,34<br>example@example.com,E,Higher,24<br><br>. . ."
188
+ download_template: Download template
189
+ download_template_csv: Download as a CSV template
190
+ download_template_xlsx: Download as a XLSX template
191
+ example: Candidate data 1,Candidate data 2,Candidate data 3,Candidate data 4,Stratum 1,Stratum 2,Stratum 3,Stratum N<br>example@example.com,D,Higher,34<br>example@example.com,E,Higher,24<br><br>. . .
185
192
  example_headers:
186
- personal_data_1: "Personal data 1 (unique identifier)"
187
- personal_data_2: "Personal data 2"
188
- personal_data_3: "Personal data 3"
189
- personal_data_4: "Personal data 4"
190
- gender: "Gender"
191
- age: "Age"
193
+ age: Age
194
+ gender: Gender
195
+ personal_data_1: Personal data 1 (unique identifier)
196
+ personal_data_2: Personal data 2
197
+ personal_data_3: Personal data 3
198
+ personal_data_4: Personal data 4
192
199
  example_rows:
193
- - - "11111111X"
194
- - "Example name 1"
195
- - "Phone Example 1"
196
- - "example1@example.com"
197
- - "Male"
198
- - "45"
199
- - - "22222222Y"
200
- - "Example name 2"
201
- - "Phone Example 2"
202
- - "example2@example.com"
203
- - "Female"
204
- - "42"
200
+ - - 11111111X
201
+ - Example name 1
202
+ - Phone Example 1
203
+ - example1@example.com
204
+ - Male
205
+ - '45'
206
+ - - 22222222Y
207
+ - Example name 2
208
+ - Phone Example 2
209
+ - example2@example.com
210
+ - Female
211
+ - '42'
205
212
  execute_stratified_sortition: Execute sortition
206
213
  execute_stratified_sortition_help: The sortition cannot be executed until records are uploaded.
207
214
  filename_data: "%{filename}, on %{date}, number of records %{count}"
208
215
  gender: Gender
209
- last_upload_date: The last upload was on %{date}
210
216
  help: The first four columns are candidate data, such as email, ID, phone, or address, and the following columns are the strata defined in the stratified sortition. Each row represents a candidate.
217
+ help_csv: "<b>The file to be uploaded must follow these instructions:</b> <ul><li>The file format must be .csv. You can download a template.</li> <li>The first column is mandatory. It is the unique identifier for each participant and can be the ID, a randomly generated code, or any other form of identification you want to use.</li> <li>Columns 2, 3, and 4 (Personal data 2, 3, 4) are optional and are not used for the sortition. They are used to add contact information for each participant.</li> <li>The strata columns are mandatory and must have the same order and name as configured in the previous section.</li> <li>The information in the columns must match one of the values specified for each stratum.</li> <li>If a participant does not have data in any of the strata or does not match any of the configured values, they will be excluded from the sortition.</li></ul>"
218
+ help_submit: By clicking "Save", the system will load the data in the background. This may take several minutes depending on the volume of participants. When the load is complete, the result will be notified by email.
219
+ last_upload_date: The last upload was on %{date}
211
220
  no_data: No data
221
+ no_uploaded_files: No files uploaded.
212
222
  place: Place of birth
213
223
  remove_uploaded_samples: Remove all records
214
- confirm_remove_uploaded_samples: Are you sure you want to remove all uploaded samples?
215
224
  strata_not_configured: You must configure strata and substrata first
216
225
  target: Target
217
226
  title: Manage sample
218
227
  upload_census: Upload a new sample
219
228
  upload_file: Upload new sample
220
229
  uploaded_file: Uploaded sample data
221
- uploaded_files: "The following files have been added:"
222
- no_uploaded_files: "No files uploaded."
223
- help_csv: "<b>The file to be uploaded must follow these instructions:</b>
224
- <ul><li>The file format must be .csv. You can download a template.</li>
225
- <li>The first column is mandatory. It is the unique identifier for each participant and can be the ID, a randomly generated code, or any other form of identification you want to use.</li>
226
- <li>Columns 2, 3, and 4 (Personal data 2, 3, 4) are optional and are not used for the sortition. They are used to add contact information for each participant.</li>
227
- <li>The strata columns are mandatory and must have the same order and name as configured in the previous section.</li>
228
- <li>The information in the columns must match one of the values specified for each stratum.</li>
229
- <li>If a participant does not have data in any of the strata or does not match any of the configured values, they will be excluded from the sortition.</li></ul>"
230
- help_submit: 'By clicking "Save", the system will load the data in the background. This may take several minutes depending on the volume of participants. When the load is complete, the result will be notified by email.'
231
- import_mailer:
232
- subject: "Sample import result"
233
- import:
234
- ready: "The sample import has been completed successfully."
235
- total_rows: "Total rows"
236
- imported_rows: "Successfully imported"
237
- failed_rows: "Rows with errors"
238
- errors_summary: "Total rows: %{total}. Successfully imported: %{imported}. Rows with errors: %{failed}."
239
- see_details: "The identifiers of the participants who have had errors are:"
240
- participant_id: "Participant ID:"
241
- samples:
242
- template:
243
- personal_data_1: "Personal data 1 (unique identifier)"
244
- personal_data_2: "Personal data 2"
245
- personal_data_3: "Personal data 3"
246
- personal_data_4: "Personal data 4"
247
- import_success: "The sample has been imported successfully."
248
- import_failed: "An error occurred while importing the sample: %{error}"
249
- errors:
250
- no_file: "No file has been selected."
251
- no_strata: "You must configure strata and substrata before uploading a sample."
252
- pending: "You can only upload samples when the stratified sortition is in pending status."
253
- sample_imports:
254
- create:
255
- success: "The sample is being loaded in the background. When it finishes you will receive an email with the import summary."
256
- remove_uploaded_samples:
257
- enqueued: "The sample removal has been enqueued and will be processed in the background."
258
- success: "Uploaded samples have been successfully removed."
259
- error: "There was an error removing the uploaded samples."
230
+ uploaded_files: 'The following files have been added:'
231
+ admin_log:
232
+ stratified_sortition:
233
+ create: "%{user_name} created the stratified sortition %{resource_name} on %{space_name}"
234
+ delete: "%{user_name} deleted the stratified sortition %{resource_name} on %{space_name}"
235
+ duplicate: "%{user_name} duplicated the stratified sortition %{resource_name}"
236
+ execute: "%{user_name} executed the stratified sortition %{resource_name} on %{space_name}"
237
+ export_results: "%{user_name} exported the results of the stratified sortition %{resource_name} on %{space_name}"
238
+ import_sample: "%{user_name} imported a sample to the stratified sortition %{resource_name} on %{space_name}"
239
+ remove_samples: "%{user_name} removed the imported records from the stratified sortition %{resource_name} on %{space_name}"
240
+ update: "%{user_name} updated the stratified sortition %{resource_name} on %{space_name}"
241
+ view_participants: "%{user_name} viewed the selected participants list of the stratified sortition %{resource_name} on %{space_name}"
242
+ errors:
243
+ fair_sortition:
244
+ already_performed: The sortition has already been performed for this process
245
+ no_portfolio: There is no panel portfolio. Execute `generate_portfolio` first
246
+ portfolio_generation_failed: 'Error generating panel portfolio: %{error}'
247
+ sampling_failed: 'Error while sampling: %{error}'
248
+ feasibility:
249
+ no_categories: No categories (substrata) defined. You must configure strata and substrata before running the algorithm
250
+ no_name: No name
251
+ no_volunteers: No volunteers in the pool. You must import participants before running the sortition
252
+ panel_size_positive: Panel size (num_candidates) must be a positive number
253
+ pool_too_small: The volunteer pool (%{volunteers_count}) is smaller than the panel size (%{panel_size}). Add more participants or reduce the number of candidates to select
254
+ stratum_insufficient_quotas: Stratum '%{stratum_name}' has insufficient maximum quotas. The sum of maximum quotas (%{total_max}) is less than the panel size (%{panel_size})
255
+ stratum_percentages_exceed: Stratum '%{stratum_name}' has percentages that sum to more than 100%% (%{total_percentage}%%)
256
+ substratum_insufficient_volunteers: Substratum '%{substratum_name}' of stratum '%{stratum_name}' requires a minimum of %{min_quota} volunteers but only has %{volunteers_count}
257
+ substratum_quota_exceeds_volunteers: Substratum '%{substratum_name}' of stratum '%{stratum_name}' has a max quota of %{max_quota} (%{percentage}%%) but only %{volunteers_count} volunteer(s) belong to this category. Reduce the max quota percentage or add more participants in this category
258
+ volunteers_missing_strata: There are %{count} volunteer(s) that do not have a substratum assigned for each stratum. This may cause problems in the selection algorithm
259
+ leximin:
260
+ internal_error: 'Internal error in the selection algorithm: %{error}. Please verify that the strata configuration and max quota percentages are compatible with the loaded sample.'
261
+ no_feasible_panel: 'Could not find a valid initial panel. The combination of quota constraints (max percentages) and the available sample makes it impossible to form a panel. Possible causes: (1) The max quota percentages for some substrata are too restrictive for the available sample size. (2) There are not enough participants in certain substratum combinations. (3) The number of candidates to select is too large relative to the sample. Try adjusting the max quota percentages or uploading a larger sample.'
262
+ panel_portfolio:
263
+ already_sampled: Portfolio already sampled
264
+ probabilities_size_mismatch: must have the same size as panels (%{panels_count} panels, %{probabilities_count} probabilities)
265
+ probabilities_sum_invalid: must sum to 1.0 (currently %{total})
260
266
  stratified_sortitions:
261
- count:
262
- candidates_count:
263
- one: 1 candidate
264
- other: "%{count} candidates"
265
267
  filters:
266
268
  all: All
267
- pending: Pending
268
- executing: Executing
269
269
  executed: Executed
270
+ executing: Executing
270
271
  failed: Failed
272
+ pending: Pending
271
273
  state: Status
272
274
  index:
273
275
  empty: There are no stratified sortitions yet.
@@ -283,39 +285,26 @@ en:
283
285
  one: Selected candidate
284
286
  other: Selected candidates
285
287
  show:
286
- introduction: 'This page contains the details of the stratified sortition %{reference}. By means of this sortition, %{num_candidates} candidates have been selected using a stratified random selection algorithm that ensures fair representation across all defined strata.'
287
- description: Description
288
- selection_criteria: Selection criteria
289
- selected_profiles_description: Description of the selected profiles
290
- to_be_selected_profiles_description: Description of the profiles to be selected
291
- strata: Strata
292
- max_quota: Max quota
293
- selected_participants: Selected participants
294
- selected_participants_count:
295
- one: 1 participant has been selected
296
- other: "%{count} participants have been selected"
297
- sortition_details: Sortition details
298
- num_candidates: Number of candidates to select
299
- status: Status
300
- strata_count: Number of strata
301
- algorithm: Algorithm
302
- algorithm_name: LEXIMIN
303
288
  algorithm_description: Stratified random selection algorithm that ensures fair representation across all defined strata
304
- reproducibility_details: Sortition reproducibility
305
- verification_seed: Verification seed
306
- random_value_used: Random value used
307
- selected_panel_index: Selected panel index
308
- selected_at: Selected at
309
- strata_charts: Distribution of profiles
310
- target: Target to achieve
289
+ algorithm_name: LEXIMIN
311
290
  candidates: Received candidatures
291
+ description: Description
312
292
  no_data: No data
293
+ random_value_used: Random value used
313
294
  results: Sortition results
295
+ selected_at: Selected at
296
+ selected_profiles_description: Description of the selected profiles
297
+ selection_criteria: Selection criteria
298
+ sortition_details: Sortition details
299
+ status: Status
314
300
  statuses:
315
- pending: Pending
316
- executing: Executing
317
301
  executed: Executed
302
+ executing: Executing
318
303
  failed: Failed
304
+ pending: Pending
305
+ strata_charts: Distribution of profiles
306
+ target: Target to achieve
307
+ to_be_selected_profiles_description: Description of the profiles to be selected
319
308
  stratified_sortition:
320
309
  num_candidates: candidates to select
321
310
  strata_count: strata
@@ -323,38 +312,3 @@ en:
323
312
  count:
324
313
  one: 1 stratified sortition
325
314
  other: "%{count} stratified sortitions"
326
- admin_log:
327
- stratified_sortition:
328
- create: "%{user_name} created the stratified sortition %{resource_name} on %{space_name}"
329
- update: "%{user_name} updated the stratified sortition %{resource_name} on %{space_name}"
330
- delete: "%{user_name} deleted the stratified sortition %{resource_name} on %{space_name}"
331
- duplicate: "%{user_name} duplicated the stratified sortition %{resource_name}"
332
- import_sample: "%{user_name} imported a sample to the stratified sortition %{resource_name} on %{space_name}"
333
- remove_samples: "%{user_name} removed the imported records from the stratified sortition %{resource_name} on %{space_name}"
334
- execute: "%{user_name} executed the stratified sortition %{resource_name} on %{space_name}"
335
- export_results: "%{user_name} exported the results of the stratified sortition %{resource_name} on %{space_name}"
336
- view_participants: "%{user_name} viewed the selected participants list of the stratified sortition %{resource_name} on %{space_name}"
337
- errors:
338
- panel_portfolio:
339
- already_sampled: "Portfolio already sampled"
340
- probabilities_size_mismatch: "must have the same size as panels (%{panels_count} panels, %{probabilities_count} probabilities)"
341
- probabilities_sum_invalid: "must sum to 1.0 (currently %{total})"
342
- feasibility:
343
- panel_size_positive: "Panel size (num_candidates) must be a positive number"
344
- no_categories: "No categories (substrata) defined. You must configure strata and substrata before running the algorithm"
345
- no_volunteers: "No volunteers in the pool. You must import participants before running the sortition"
346
- pool_too_small: "The volunteer pool (%{volunteers_count}) is smaller than the panel size (%{panel_size}). Add more participants or reduce the number of candidates to select"
347
- stratum_insufficient_quotas: "Stratum '%{stratum_name}' has insufficient maximum quotas. The sum of maximum quotas (%{total_max}) is less than the panel size (%{panel_size})"
348
- stratum_percentages_exceed: "Stratum '%{stratum_name}' has percentages that sum to more than 100%% (%{total_percentage}%%)"
349
- substratum_insufficient_volunteers: "Substratum '%{substratum_name}' of stratum '%{stratum_name}' requires a minimum of %{min_quota} volunteers but only has %{volunteers_count}"
350
- substratum_quota_exceeds_volunteers: "Substratum '%{substratum_name}' of stratum '%{stratum_name}' has a max quota of %{max_quota} (%{percentage}%%) but only %{volunteers_count} volunteer(s) belong to this category. Reduce the max quota percentage or add more participants in this category"
351
- volunteers_missing_strata: "There are %{count} volunteer(s) that do not have a substratum assigned for each stratum. This may cause problems in the selection algorithm"
352
- no_name: "No name"
353
- fair_sortition:
354
- already_performed: "The sortition has already been performed for this process"
355
- portfolio_generation_failed: "Error generating panel portfolio: %{error}"
356
- no_portfolio: "There is no panel portfolio. Execute `generate_portfolio` first"
357
- sampling_failed: "Error while sampling: %{error}"
358
- leximin:
359
- no_feasible_panel: "Could not find a valid initial panel. The combination of quota constraints (max percentages) and the available sample makes it impossible to form a panel. Possible causes: (1) The max quota percentages for some substrata are too restrictive for the available sample size. (2) There are not enough participants in certain substratum combinations. (3) The number of candidates to select is too large relative to the sample. Try adjusting the max quota percentages or uploading a larger sample."
360
- internal_error: "Internal error in the selection algorithm: %{error}. Please verify that the strata configuration and max quota percentages are compatible with the loaded sample."