decidim-forms 0.19.0 → 0.22.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (106) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +1 -1
  3. data/app/assets/config/admin/decidim_forms_manifest.js +1 -0
  4. data/app/assets/images/decidim/surveys/icon.svg +1 -19
  5. data/app/assets/javascripts/decidim/forms/admin/collapsible_questions.js.es6 +13 -0
  6. data/app/assets/javascripts/decidim/forms/admin/forms.js.es6 +95 -7
  7. data/app/assets/javascripts/decidim/forms/admin/live_text_update.component.js.es6 +52 -0
  8. data/app/assets/javascripts/decidim/forms/forms.js.es6 +42 -1
  9. data/app/assets/javascripts/decidim/forms/max_choices_alert.component.js.es6 +44 -0
  10. data/app/assets/stylesheets/decidim/forms/forms.scss +39 -0
  11. data/app/cells/decidim/forms/matrix_readonly/show.erb +5 -0
  12. data/app/cells/decidim/forms/matrix_readonly_cell.rb +12 -0
  13. data/app/cells/decidim/forms/question_readonly/show.erb +5 -1
  14. data/app/cells/decidim/forms/question_readonly_cell.rb +5 -0
  15. data/app/cells/decidim/forms/step_navigation/show.erb +35 -0
  16. data/app/cells/decidim/forms/step_navigation_cell.rb +46 -0
  17. data/app/commands/decidim/forms/admin/update_questionnaire.rb +8 -0
  18. data/app/commands/decidim/forms/answer_questionnaire.rb +7 -2
  19. data/app/controllers/decidim/forms/admin/concerns/has_questionnaire.rb +6 -2
  20. data/app/controllers/decidim/forms/concerns/has_questionnaire.rb +58 -2
  21. data/app/forms/decidim/forms/admin/question_form.rb +20 -1
  22. data/app/forms/decidim/forms/admin/question_matrix_row_form.rb +26 -0
  23. data/app/forms/decidim/forms/answer_choice_form.rb +1 -0
  24. data/app/forms/decidim/forms/answer_form.rb +16 -2
  25. data/app/forms/decidim/forms/questionnaire_form.rb +33 -3
  26. data/app/helpers/decidim/forms/admin/application_helper.rb +16 -0
  27. data/app/models/decidim/forms/answer.rb +2 -2
  28. data/app/models/decidim/forms/answer_choice.rb +7 -0
  29. data/app/models/decidim/forms/question.rb +18 -2
  30. data/app/models/decidim/forms/question_matrix_row.rb +12 -0
  31. data/app/models/decidim/forms/questionnaire.rb +2 -1
  32. data/app/queries/decidim/forms/questionnaire_user_answers.rb +1 -1
  33. data/app/types/decidim/forms/answer_option_type.rb +14 -0
  34. data/app/types/decidim/forms/question_type.rb +23 -0
  35. data/app/types/decidim/forms/questionnaire_type.rb +22 -0
  36. data/app/views/decidim/forms/admin/questionnaires/_answer_option_template.html.erb +1 -1
  37. data/app/views/decidim/forms/admin/questionnaires/_form.html.erb +37 -4
  38. data/app/views/decidim/forms/admin/questionnaires/_matrix_row.html.erb +34 -0
  39. data/app/views/decidim/forms/admin/questionnaires/_matrix_row_template.html.erb +7 -0
  40. data/app/views/decidim/forms/admin/questionnaires/_question.html.erb +29 -6
  41. data/app/views/decidim/forms/admin/questionnaires/_separator.html.erb +41 -0
  42. data/app/views/decidim/forms/questionnaires/_answer.html.erb +21 -92
  43. data/app/views/decidim/forms/questionnaires/answers/_long_answer.html.erb +1 -0
  44. data/app/views/decidim/forms/questionnaires/answers/_matrix_multiple.html.erb +43 -0
  45. data/app/views/decidim/forms/questionnaires/answers/_matrix_single.html.erb +43 -0
  46. data/app/views/decidim/forms/questionnaires/answers/_multiple_option.html.erb +23 -0
  47. data/app/views/decidim/forms/questionnaires/answers/_separator.html.erb +1 -0
  48. data/app/views/decidim/forms/questionnaires/answers/_short_answer.html.erb +1 -0
  49. data/app/views/decidim/forms/questionnaires/answers/_single_option.html.erb +30 -0
  50. data/app/views/decidim/forms/questionnaires/answers/_sorting.html.erb +23 -0
  51. data/app/views/decidim/forms/questionnaires/show.html.erb +60 -27
  52. data/config/locales/ar.yml +12 -3
  53. data/config/locales/bg-BG.yml +16 -0
  54. data/config/locales/ca.yml +45 -7
  55. data/config/locales/cs.yml +41 -3
  56. data/config/locales/da-DK.yml +1 -0
  57. data/config/locales/de.yml +41 -3
  58. data/config/locales/el-GR.yml +1 -0
  59. data/config/locales/el.yml +120 -0
  60. data/config/locales/en.yml +41 -3
  61. data/config/locales/es-MX.yml +41 -3
  62. data/config/locales/es-PY.yml +41 -3
  63. data/config/locales/es.yml +41 -3
  64. data/config/locales/et-EE.yml +1 -0
  65. data/config/locales/eu.yml +7 -3
  66. data/config/locales/fi-plain.yml +41 -3
  67. data/config/locales/fi.yml +42 -4
  68. data/config/locales/fr-CA.yml +120 -0
  69. data/config/locales/fr.yml +41 -3
  70. data/config/locales/ga-IE.yml +1 -0
  71. data/config/locales/gl.yml +7 -3
  72. data/config/locales/hr-HR.yml +1 -0
  73. data/config/locales/hu.yml +18 -4
  74. data/config/locales/id-ID.yml +7 -3
  75. data/config/locales/is-IS.yml +1 -0
  76. data/config/locales/it.yml +42 -4
  77. data/config/locales/ja-JP.yml +120 -0
  78. data/config/locales/lt-LT.yml +1 -0
  79. data/config/locales/lv-LV.yml +119 -0
  80. data/config/locales/mt-MT.yml +1 -0
  81. data/config/locales/nl.yml +41 -3
  82. data/config/locales/no.yml +86 -1
  83. data/config/locales/pl.yml +63 -25
  84. data/config/locales/pt-BR.yml +8 -4
  85. data/config/locales/pt.yml +62 -24
  86. data/config/locales/ro-RO.yml +118 -0
  87. data/config/locales/ru.yml +47 -0
  88. data/config/locales/sk-SK.yml +88 -0
  89. data/config/locales/sk.yml +92 -0
  90. data/config/locales/sl.yml +5 -0
  91. data/config/locales/sr-CS.yml +1 -0
  92. data/config/locales/sv.yml +41 -3
  93. data/config/locales/tr-TR.yml +7 -3
  94. data/db/migrate/20190315203056_add_session_token_to_decidim_forms_answers.rb +17 -0
  95. data/db/migrate/20190930094710_add_ip_hash_to_decidim_form_answers.rb +12 -0
  96. data/db/migrate/20200225123810_create_decidim_forms_question_matrix_rows.rb +11 -0
  97. data/db/migrate/20200304152939_add_matrix_row_id_to_decidim_forms_answer_choices.rb +11 -0
  98. data/lib/decidim/api/questionnaire_entity_interface.rb +18 -0
  99. data/lib/decidim/forms.rb +1 -0
  100. data/lib/decidim/forms/api.rb +7 -0
  101. data/lib/decidim/forms/test/factories.rb +55 -11
  102. data/lib/decidim/forms/test/shared_examples/has_questionnaire.rb +320 -43
  103. data/lib/decidim/forms/test/shared_examples/manage_questionnaires.rb +347 -16
  104. data/lib/decidim/forms/user_answers_serializer.rb +23 -4
  105. data/lib/decidim/forms/version.rb +1 -1
  106. metadata +56 -9
@@ -0,0 +1 @@
1
+ <%= answer_form.text_area :body, label: false, id: field_id, rows: 10, disabled: disabled %>
@@ -0,0 +1,43 @@
1
+ <table class="questionnaire-question-matrix table">
2
+ <thead>
3
+ <tr>
4
+ <td></td>
5
+ <% answer.question.answer_options.each_with_index do |answer_option, idx| %>
6
+ <td><%= translated_attribute(answer_option.body) %></td>
7
+ <% end %>
8
+ </tr>
9
+ </thead>
10
+ <tbody>
11
+ <% answer.question.matrix_rows.each_with_index do |row, row_idx| %>
12
+ <tr class="check-box-collection">
13
+ <td><%= translated_attribute row.body %></td>
14
+ <% answer.question.answer_options.each_with_index do |answer_option, idx| %>
15
+ <% choice = answer.selected_choices.find { |choice| choice.answer_option_id == answer_option.id && choice.matrix_row_id == row.id } %>
16
+ <% choice_id = "#{field_id}_matrix_row_#{row_idx}_choice_#{idx}" %>
17
+ <td>
18
+ <div class="collection-input">
19
+ <%= check_box_tag "questionnaire[responses][#{answer_idx}][choices][][body]",
20
+ translated_attribute(answer_option.body),
21
+ choice.present?,
22
+ id: "#{choice_id}_body", disabled: disabled %>
23
+ <%= hidden_field_tag "questionnaire[responses][#{answer_idx}][choices][][answer_option_id]",
24
+ answer_option.id,
25
+ id: "#{choice_id}_answer_option",
26
+ disabled: true %>
27
+ <%= hidden_field_tag "questionnaire[responses][#{answer_idx}][choices][][matrix_row_id]",
28
+ row.id,
29
+ id: "#{choice_id}_matrix_row",
30
+ disabled: true %>
31
+ <% if answer_option.free_text %>
32
+ <%= text_field_tag "questionnaire[responses][#{answer_idx}][choices][][custom_body]",
33
+ choice.try(:custom_body),
34
+ id: "#{choice_id}_custom_body",
35
+ disabled: true %>
36
+ <% end %>
37
+ </div>
38
+ </td>
39
+ <% end %>
40
+ </tr>
41
+ <% end %>
42
+ </tbody>
43
+ </table>
@@ -0,0 +1,43 @@
1
+ <table class="questionnaire-question-matrix table">
2
+ <thead>
3
+ <tr>
4
+ <td></td>
5
+ <% answer.question.answer_options.each_with_index do |answer_option, idx| %>
6
+ <td><%= translated_attribute(answer_option.body) %></td>
7
+ <% end %>
8
+ </tr>
9
+ </thead>
10
+ <tbody>
11
+ <% answer.question.matrix_rows.each_with_index do |row, row_idx| %>
12
+ <tr class="radio-button-collection">
13
+ <td><%= translated_attribute row.body %></td>
14
+ <% answer.question.answer_options.each_with_index do |answer_option, idx| %>
15
+ <% choice = answer.choices.find { |choice| choice.answer_option_id == answer_option.id && choice.matrix_row_id == row.id } %>
16
+ <% choice_id = "#{field_id}_matrix_row_#{row_idx}_choice_#{idx}" %>
17
+ <td>
18
+ <div class="collection-input">
19
+ <%= radio_button_tag "questionnaire[responses][#{answer_idx}][choices][#{row_idx}][body]",
20
+ translated_attribute(answer_option.body),
21
+ answer_option.id == choice.try(:answer_option_id),
22
+ id: "#{choice_id}_body", disabled: disabled %>
23
+ <%= hidden_field_tag "questionnaire[responses][#{answer_idx}][choices][#{row_idx}][answer_option_id]",
24
+ answer_option.id,
25
+ id: "#{choice_id}_answer_option",
26
+ disabled: true %>
27
+ <%= hidden_field_tag "questionnaire[responses][#{answer_idx}][choices][#{row_idx}][matrix_row_id]",
28
+ row.id,
29
+ id: "#{choice_id}_matrix_row",
30
+ disabled: true %>
31
+ <% if answer_option.free_text %>
32
+ <%= text_field_tag "questionnaire[responses][#{answer_idx}][choices][#{row_idx}][custom_body]",
33
+ choice.try(:custom_body),
34
+ id: "#{choice_id}_custom_body",
35
+ disabled: true %>
36
+ <% end %>
37
+ </div>
38
+ </td>
39
+ <% end %>
40
+ </tr>
41
+ <% end %>
42
+ </tbody>
43
+ </table>
@@ -0,0 +1,23 @@
1
+ <div class="check-box-collection">
2
+ <% answer.question.answer_options.each_with_index do |answer_option, idx| %>
3
+ <% choice = answer.selected_choices.find { |choice| choice.answer_option_id == answer_option.id } %>
4
+
5
+ <div class="collection-input">
6
+ <%= label_tag do %>
7
+ <%= check_box_tag "questionnaire[responses][#{answer_idx}][choices][#{idx}][body]",
8
+ translated_attribute(answer_option.body),
9
+ choice.present?, disabled: disabled %>
10
+
11
+ <%= translated_attribute(answer_option.body) %>
12
+
13
+ <%= hidden_field_tag "questionnaire[responses][#{answer_idx}][choices][#{idx}][answer_option_id]", answer_option.id %>
14
+ <% end %>
15
+
16
+ <% if answer_option.free_text %>
17
+ <%= text_field_tag "questionnaire[responses][#{answer_idx}][choices][#{idx}][custom_body]",
18
+ choice.try(:custom_body),
19
+ disabled: true %>
20
+ <% end %>
21
+ </div>
22
+ <% end %>
23
+ </div>
@@ -0,0 +1 @@
1
+ <%= answer_form.hidden_field :body, value: "separator", id: field_id, disabled: disabled %>
@@ -0,0 +1 @@
1
+ <%= answer_form.text_field :body, label: false, id: field_id, disabled: disabled %>
@@ -0,0 +1,30 @@
1
+ <div class="radio-button-collection">
2
+ <% choice = answer.choices.first %>
3
+
4
+ <% answer.question.answer_options.each_with_index do |answer_option, idx| %>
5
+ <% choice_id = "#{field_id}_choices_#{idx}" %>
6
+
7
+ <div class="collection-input">
8
+ <%= label_tag "#{choice_id}_body" do %>
9
+ <%= radio_button_tag "questionnaire[responses][#{answer_idx}][choices][][body]",
10
+ translated_attribute(answer_option.body),
11
+ answer_option.id == choice.try(:answer_option_id),
12
+ id: "#{choice_id}_body", disabled: disabled %>
13
+
14
+ <%= translated_attribute(answer_option.body) %>
15
+
16
+ <%= hidden_field_tag "questionnaire[responses][#{answer_idx}][choices][][answer_option_id]",
17
+ answer_option.id,
18
+ id: "#{choice_id}_answer_option",
19
+ disabled: true %>
20
+ <% end %>
21
+
22
+ <% if answer_option.free_text %>
23
+ <%= text_field_tag "questionnaire[responses][#{answer_idx}][choices][][custom_body]",
24
+ choice.try(:custom_body),
25
+ id: "#{choice_id}_custom_body",
26
+ disabled: true %>
27
+ <% end %>
28
+ </div>
29
+ <% end %>
30
+ </div>
@@ -0,0 +1,23 @@
1
+ <div class="sortable-check-box-collection">
2
+ <% answer.question.answer_options.each_with_index do |answer_option, idx| %>
3
+ <% choice = answer.selected_choices.find { |choice| choice.answer_option_id == answer_option.id } %>
4
+
5
+ <div class="collection-input">
6
+ <%= label_tag do %>
7
+ <%= check_box_tag "questionnaire[responses][#{answer_idx}][choices][#{idx}][body]",
8
+ translated_attribute(answer_option.body),
9
+ choice.present?, disabled: disabled %>
10
+
11
+ <span class="position"><%= choice.try(:position) %></span>
12
+
13
+ <%= translated_attribute(answer_option.body) %>
14
+
15
+ <%= hidden_field_tag "questionnaire[responses][#{answer_idx}][choices][#{idx}][position]",
16
+ choice.try(:position),
17
+ disabled: true %>
18
+
19
+ <%= hidden_field_tag "questionnaire[responses][#{answer_idx}][choices][#{idx}][answer_option_id]", answer_option.id %>
20
+ <% end %>
21
+ </div>
22
+ <% end %>
23
+ </div>
@@ -3,24 +3,26 @@
3
3
  description: translated_attribute(questionnaire.description),
4
4
  }) %>
5
5
 
6
+ <% columns = allow_answers? && visitor_can_answer? && @form.responses.map(&:question).any?(&:matrix?) ? 9 : 6 %>
7
+
6
8
  <%= render partial: "decidim/shared/component_announcement" %>
7
9
 
8
10
  <div class="row columns">
9
- <h2 class="section-heading"><%= translated_attribute questionnaire.title %></h2>
11
+ <h3 class="section-heading"><%= translated_attribute questionnaire.title %></h3>
10
12
  <div class="row">
11
- <div class="columns large-6 medium-centered lead">
13
+ <div class="columns large-<%= columns %> medium-centered lead">
12
14
  <%= decidim_sanitize translated_attribute questionnaire.description %>
13
15
  </div>
14
16
  </div>
15
17
  </div>
16
18
 
17
19
  <div class="row">
18
- <div class="columns large-6 medium-centered">
20
+ <div class="columns large-<%= columns %> medium-centered">
19
21
  <div class="card">
20
22
  <div class="card__content">
21
23
  <% if allow_answers? %>
22
- <% if current_user %>
23
- <% if questionnaire.answered_by?(current_user) %>
24
+ <% if visitor_can_answer? %>
25
+ <% if visitor_already_answered? %>
24
26
  <div class="section">
25
27
  <div class="callout success">
26
28
  <h5><%= t(".questionnaire_answered.title") %></h5>
@@ -38,31 +40,62 @@
38
40
  </div>
39
41
  <% end %>
40
42
 
41
- <%= decidim_form_for(@form, url: update_url, method: :post, html: { class: "form answer-questionnaire" }) do |form| %>
42
- <% @form.answers.each_with_index do |answer, answer_idx| %>
43
- <div class="row column">
44
- <%= fields_for "questionnaire[answers][#{answer_idx}]", answer do |answer_form| %>
45
- <%= render "decidim/forms/questionnaires/answer", answer_form: answer_form, answer: answer, answer_idx: answer_idx, disabled: !current_participatory_space.can_participate?(current_user) %>
43
+ <%= decidim_form_for(@form, url: update_url, method: :post, html: { class: "form answer-questionnaire" }, data: { "safe-path" => form_path }) do |form| %>
44
+ <%= form_required_explanation %>
45
+ <%= invisible_captcha %>
46
+ <% answer_idx = 0 %>
47
+ <% cleaned_answer_idx = 0 %>
48
+ <% @form.responses_by_step.each_with_index do |step_answers, step_index| %>
49
+ <div id="step-<%= step_index %>" class="<%= step_index.zero? ? "questionnaire-step" : "questionnaire-step hide" %>" data-toggler=".hide">
50
+ <% if @form.total_steps > 1 %>
51
+ <h4 class="section-heading">
52
+ <%= t(".current_step", step: step_index + 1) %> <span class="answer-questionnaire__steps"><%= t(".of_total_steps", total_steps: @form.total_steps) %></span>
53
+ </h4>
46
54
  <% end %>
47
- </div>
48
- <% end %>
49
55
 
50
- <% if show_represent_user_group? %>
51
- <div class="row column represent-user-group">
52
- <%= cell("decidim/represent_user_group", form) %>
53
- </div>
54
- <% end %>
56
+ <% step_answers.each do |answer| %>
57
+ <div class="row column answer" data-max-choices="<%= answer.question.max_choices %>">
58
+ <%= fields_for "questionnaire[responses][#{answer_idx}]", answer do |answer_form| %>
59
+ <%= render(
60
+ "decidim/forms/questionnaires/answer",
61
+ answer_form: answer_form,
62
+ answer: answer,
63
+ answer_idx: answer_idx,
64
+ cleaned_answer_idx: cleaned_answer_idx,
65
+ disabled: !current_participatory_space.can_participate?(current_user)
66
+ ) %>
67
+ <% end %>
68
+ </div>
69
+ <% if !answer.question.separator? %>
70
+ <% cleaned_answer_idx += 1 %>
71
+ <% end %>
72
+ <% answer_idx += 1 %>
73
+ <% end %>
55
74
 
56
- <div class="row column tos-agreement">
57
- <%= form.check_box :tos_agreement, label: t(".tos_agreement"), id: "questionnaire_tos_agreement", disabled: !current_participatory_space.can_participate?(current_user) %>
58
- <div class="help-text">
59
- <%= decidim_sanitize translated_attribute questionnaire.tos %>
60
- </div>
61
- </div>
75
+ <% if step_index + 1 == @form.total_steps %>
76
+ <% if show_represent_user_group? %>
77
+ <div class="row column represent-user-group">
78
+ <%= cell("decidim/represent_user_group", form) %>
79
+ </div>
80
+ <% end %>
62
81
 
63
- <div class="button--double form-general-submit">
64
- <%= form.submit t(".submit"), class: "button", disabled: !current_participatory_space.can_participate?(current_user), data: { confirm: t(".are_you_sure"), disable: true } %>
65
- </div>
82
+ <div class="row column tos-agreement">
83
+ <%= form.check_box :tos_agreement, label: t(".tos_agreement"), id: "questionnaire_tos_agreement", disabled: !current_participatory_space.can_participate?(current_user) %>
84
+ <div class="help-text">
85
+ <%= decidim_sanitize translated_attribute questionnaire.tos %>
86
+ </div>
87
+ </div>
88
+ <% end %>
89
+
90
+ <%= cell(
91
+ "decidim/forms/step_navigation",
92
+ step_index,
93
+ total_steps: @form.total_steps,
94
+ button_disabled: !current_participatory_space.can_participate?(current_user),
95
+ form: form
96
+ ) %>
97
+ </div>
98
+ <% end %>
66
99
  <% end %>
67
100
  </div>
68
101
  <% end %>
@@ -81,7 +114,7 @@
81
114
  <% else %>
82
115
  <div class="section">
83
116
  <div class="callout warning">
84
- <h5><%= t(".questionnaire_closed.title") %></h5>
117
+ <h4><%= t(".questionnaire_closed.title") %></h4>
85
118
  <p><%= t(".questionnaire_closed.body") %></p>
86
119
  </div>
87
120
  </div>
@@ -15,6 +15,8 @@ ar:
15
15
  choices:
16
16
  missing: ليست كاملة
17
17
  too_many: كثير جدا
18
+ questionnaire:
19
+ request_invalid: حدث خطأ أثناء معالجة الطلب. الرجاء إعادة المحاولة ثانية
18
20
  decidim:
19
21
  forms:
20
22
  admin:
@@ -30,10 +32,12 @@ ar:
30
32
  statement: بيان
31
33
  edit:
32
34
  save: حفظ
33
- title: عنوان
34
35
  form:
35
36
  add_question: أضف سؤال
36
37
  already_answered_warning: تمت الإجابة على النموذج من قبل بعض المستخدمين حتى لا تتمكن من تعديل أسئلته.
38
+ matrix_row:
39
+ remove: إزالة
40
+ statement: بيان
37
41
  question:
38
42
  add_answer_option: إضافة خيار الإجابة
39
43
  any: أي
@@ -65,7 +69,6 @@ ar:
65
69
  answer_questionnaire:
66
70
  anonymous_user_message: <a href="%{sign_in_link}">قم بتسجيل الدخول بحسابك</a> أو <a href="%{sign_up_link}">اشترك</a> للإجابة على النموذج
67
71
  title: أجب عن النموذج
68
- are_you_sure: لا يمكن التراجع عن هذا الإجراء ولن تتمكن من تعديل إجاباتك. هل أنت واثق؟
69
72
  questionnaire_answered:
70
73
  body: لقد أجبت بالفعل على هذا النموذج.
71
74
  title: تمت الاجابة مسبقا
@@ -75,8 +78,14 @@ ar:
75
78
  questionnaire_for_private_users:
76
79
  body: النموذج متاح فقط للمستخدمين من القطاع الخاص
77
80
  title: شكل مغلق
78
- submit: خضع
79
81
  tos_agreement: من خلال المشاركة ، فإنك تقبل شروط الخدمة
82
+ step_navigation:
83
+ show:
84
+ are_you_sure: لا يمكن التراجع عن هذا الإجراء ولن تتمكن من تعديل إجاباتك. هل أنت واثق؟
85
+ submit: خضع
80
86
  user_answers_serializer:
81
87
  created_at: أجاب على
82
88
  id: معرف الإجابة
89
+ registered: مُسجَّل
90
+ unregistered: غير مُسجَّل
91
+ user_status: حالة المستخدم
@@ -0,0 +1,16 @@
1
+ bg:
2
+ activemodel:
3
+ attributes:
4
+ answer:
5
+ body: Отговор
6
+ question:
7
+ max_choices: Максимален брой възможности
8
+ question_type: Тип
9
+ decidim:
10
+ forms:
11
+ step_navigation:
12
+ show:
13
+ are_you_sure: Това действие не може да се отмени и Вие не можете да редактирате отговорите си. Сигурни ли сте?
14
+ submit: Изпрати
15
+ user_answers_serializer:
16
+ ip_hash: Ip Хеш
@@ -2,7 +2,7 @@ ca:
2
2
  activemodel:
3
3
  attributes:
4
4
  answer:
5
- body: Respondre
5
+ body: Resposta
6
6
  question:
7
7
  max_choices: Nombre màxim d'opcions
8
8
  question_type: Tipus
@@ -15,42 +15,69 @@ ca:
15
15
  choices:
16
16
  missing: no estan complets
17
17
  too_many: en són masses
18
+ questionnaire:
19
+ request_invalid: Hi ha hagut un problema gestionant la petició. Si us plau torna-ho a provar
18
20
  decidim:
19
21
  forms:
20
22
  admin:
21
23
  models:
22
24
  components:
23
25
  description: Descripció
24
- tos: Termes i condicions d'ús
26
+ tos: Termes del servei
25
27
  questionnaires:
26
28
  answer_option:
27
29
  answer_option: Opció de resposta
28
30
  free_text: Text lliure
29
- remove: Eliminar
31
+ remove: Elimina
30
32
  statement: Declaració
31
33
  edit:
32
- save: Desar
33
- title: Títol
34
+ save: Desa
35
+ title: Editar el qüestionari
34
36
  form:
35
37
  add_question: Afegeix una pregunta
38
+ add_separator: Afegir separador
36
39
  already_answered_warning: No pots modificar les preguntes d'aquest formulari perquè ja ha estat contestat per algunes participants.
40
+ collapse: Redueix totes les preguntes
41
+ expand: Expandeix totes les preguntes
42
+ matrix_row:
43
+ matrix_row: Fila
44
+ remove: Elimina
45
+ statement: Declaració
37
46
  question:
38
47
  add_answer_option: Afegeix una opció de resposta
48
+ add_matrix_row: Afegir fila
39
49
  any: Cap
50
+ collapse: Redueix
40
51
  description: Descripció
41
52
  down: Avall
53
+ expand: Expandeix
42
54
  question: Pregunta
43
55
  remove: Eliminar
44
56
  statement: Declaració
45
57
  up: Amunt
58
+ separator:
59
+ down: Baixar
60
+ remove: Eliminar
61
+ separator: Separador
62
+ up: Pujar
46
63
  update:
47
64
  invalid: S'ha produït un error en desar el formulari.
48
65
  success: Els formularis s'han desat correctament.
49
66
  errors:
50
67
  answer:
51
68
  body: El camp no pot estar en blanc
69
+ files:
70
+ extension_whitelist: 'Formats d''arxiu acceptats:'
71
+ images:
72
+ dimensions: "%{width} x %{height} px"
73
+ dimensions_info: 'Esta imagen medirà:'
74
+ processors:
75
+ resize_and_pad: Redimensionat i ajustat a
76
+ resize_to_fit: Redimensionada per ajustar-la
52
77
  question_types:
53
78
  long_answer: Resposta llarga
79
+ matrix_multiple: Matriu (opció multiple)
80
+ matrix_single: Matriu (opció única)
54
81
  multiple_option: Opció múltiple
55
82
  short_answer: Resposta curta
56
83
  single_option: Opció única
@@ -58,6 +85,7 @@ ca:
58
85
  questionnaires:
59
86
  answer:
60
87
  invalid: S'han produït un error en respondre el formulari.
88
+ max_choices_alert: Hi ha masses opcions seleccionades
61
89
  success: Has contestat el formulari correctament.
62
90
  question:
63
91
  max_choices: 'Opcions màximes: %{n}'
@@ -65,7 +93,8 @@ ca:
65
93
  answer_questionnaire:
66
94
  anonymous_user_message: <a href="%{sign_in_link}">Inicia sessió amb el teu compte</a> o <a href="%{sign_up_link}">registra't</a> per respondre el formulari.
67
95
  title: Respon el formulari
68
- are_you_sure: Aquesta acció no es pot desfer i no podràs editar les teves respostes. Estàs segura?
96
+ current_step: Pas %{step}
97
+ of_total_steps: de %{total_steps}
69
98
  questionnaire_answered:
70
99
  body: Ja has respost a aquest formulari.
71
100
  title: Ja has respost
@@ -75,8 +104,17 @@ ca:
75
104
  questionnaire_for_private_users:
76
105
  body: El formulari només està disponible per a participants privades
77
106
  title: S'ha tancat el formulari
78
- submit: Enviar respostes
79
107
  tos_agreement: En participar acceptes els Termes i condicions d'ús
108
+ step_navigation:
109
+ show:
110
+ are_you_sure: Aquesta acció no es pot desfer i no podràs editar les teves respostes. Estàs segura?
111
+ back: Enrere
112
+ continue: Continuar
113
+ submit: Enviar respostes
80
114
  user_answers_serializer:
81
115
  created_at: Respost el
82
116
  id: Identificador de resposta
117
+ ip_hash: Ip Hash
118
+ registered: Registrada
119
+ unregistered: No registrada
120
+ user_status: Estat de l'usuària