decidim-forms 0.25.0.rc4 → 0.26.0.rc1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (40) hide show
  1. checksums.yaml +4 -4
  2. data/app/commands/decidim/forms/answer_questionnaire.rb +6 -2
  3. data/app/forms/decidim/forms/admin/question_form.rb +4 -0
  4. data/app/models/decidim/forms/answer.rb +1 -0
  5. data/app/models/decidim/forms/question.rb +7 -1
  6. data/app/packs/src/decidim/forms/admin/forms.js +2 -0
  7. data/app/presenters/decidim/forms/admin/questionnaire_answer_presenter.rb +19 -4
  8. data/app/presenters/decidim/forms/admin/questionnaire_participant_presenter.rb +5 -2
  9. data/app/queries/decidim/forms/questionnaire_user_answers.rb +4 -1
  10. data/app/views/decidim/forms/admin/questionnaires/_form.html.erb +12 -0
  11. data/app/views/decidim/forms/admin/questionnaires/_title_and_description.html.erb +80 -0
  12. data/app/views/decidim/forms/questionnaires/_answer.html.erb +10 -1
  13. data/app/views/decidim/forms/questionnaires/answers/_title_and_description.html.erb +1 -0
  14. data/app/views/decidim/forms/questionnaires/show.html.erb +8 -7
  15. data/config/locales/cs.yml +11 -0
  16. data/config/locales/en.yml +11 -0
  17. data/config/locales/es.yml +11 -0
  18. data/config/locales/eu.yml +92 -1
  19. data/config/locales/fi.yml +11 -0
  20. data/config/locales/fr-CA.yml +11 -0
  21. data/config/locales/fr.yml +11 -0
  22. data/config/locales/ga-IE.yml +52 -0
  23. data/config/locales/ja.yml +12 -1
  24. data/config/locales/lb-LU.yml +103 -0
  25. data/config/locales/lb.yml +178 -0
  26. data/config/locales/nl.yml +11 -0
  27. data/config/locales/pl.yml +5 -5
  28. data/config/locales/pt-BR.yml +1 -1
  29. data/config/locales/pt.yml +10 -0
  30. data/config/locales/ro-RO.yml +58 -58
  31. data/config/locales/val-ES.yml +18 -0
  32. data/lib/decidim/forms/engine.rb +4 -0
  33. data/lib/decidim/forms/test/factories.rb +12 -0
  34. data/lib/decidim/forms/test/shared_examples/manage_questionnaire_answers.rb +18 -0
  35. data/lib/decidim/forms/test/shared_examples/manage_questionnaires/add_questions.rb +36 -5
  36. data/lib/decidim/forms/test/shared_examples/manage_questionnaires/update_questions.rb +98 -0
  37. data/lib/decidim/forms/test/shared_examples/manage_questionnaires.rb +8 -0
  38. data/lib/decidim/forms/user_answers_serializer.rb +41 -9
  39. data/lib/decidim/forms/version.rb +1 -1
  40. metadata +16 -12
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 61e285b75d082b62ee006eed32a4dc59b6a3feb360756a8979da8bc6ffaf6d2c
4
- data.tar.gz: c19cde0fe7f254c45e09ff3190574831376bebca2f8223c2717b64d408cf23b0
3
+ metadata.gz: 58253eb8322a05bac48b60ee5a1b469183bb23df8768dfa36e4ff9e89d4962be
4
+ data.tar.gz: c8ffbd6fd1537adcdd76487b0d18e832a8effbbe4722bcda72a5d8b6e5eb0d83
5
5
  SHA512:
6
- metadata.gz: 73087c2ef51e694f96ad9c41e91040adc792ed28d055ba277fc1024231fb0b9e39e58b4dab098914039f62dc32f4615abae8e82f32b9268a669a504cc77f6924
7
- data.tar.gz: e17dd677edbc36f8e2a63e6771f98568bdb770c0a7ee78b0584dc522332ef9b058ce3138ba1108dc4f27d2422bbd72092068784461b1bb8fd466f77616e90bb2
6
+ metadata.gz: 2d078591bab65974d315d8eff0fff980d2c7973a1ef67d829f952620d39d251b6b2e381655be036a740ba5d61bd4c8351984c629e74f202878c234173a2dda68
7
+ data.tar.gz: 38b3873ee99d11c14c8dcf1efadeac81e57f3a67d80e6ca23bf7c9d208d1527599d756d092b739d92b6f6bc009c36f97fe5969c90c391520fc88c14b5cd31d3f
@@ -20,7 +20,7 @@ module Decidim
20
20
  #
21
21
  # Broadcasts :ok if successful, :invalid otherwise.
22
22
  def call
23
- return broadcast(:invalid) if @form.invalid?
23
+ return broadcast(:invalid) if @form.invalid? || user_already_answered?
24
24
 
25
25
  answer_questionnaire
26
26
 
@@ -32,7 +32,7 @@ module Decidim
32
32
  end
33
33
  end
34
34
 
35
- attr_reader :form
35
+ attr_reader :form, :questionnaire, :current_user
36
36
 
37
37
  private
38
38
 
@@ -96,6 +96,10 @@ module Decidim
96
96
  raise ActiveRecord::Rollback if @errors
97
97
  end
98
98
  end
99
+
100
+ def user_already_answered?
101
+ questionnaire.answered_by?(current_user || form.context.session_token)
102
+ end
99
103
  end
100
104
  end
101
105
  end
@@ -42,6 +42,10 @@ module Decidim
42
42
  question_type == Decidim::Forms::Question::SEPARATOR_TYPE
43
43
  end
44
44
 
45
+ def title_and_description?
46
+ question_type == Decidim::Forms::Question::TITLE_AND_DESCRIPTION_TYPE
47
+ end
48
+
45
49
  def matrix_rows_by_position
46
50
  matrix_rows.sort do |a, b|
47
51
  if a.position && b.position
@@ -22,6 +22,7 @@ module Decidim
22
22
  validate :question_belongs_to_questionnaire
23
23
 
24
24
  scope :not_separator, -> { joins(:question).where.not(decidim_forms_questions: { question_type: Decidim::Forms::Question::SEPARATOR_TYPE }) }
25
+ scope :not_title_and_description, -> { joins(:question).where.not(decidim_forms_questions: { question_type: Decidim::Forms::Question::TITLE_AND_DESCRIPTION_TYPE }) }
25
26
 
26
27
  def self.user_collection(user)
27
28
  where(decidim_user_id: user.id)
@@ -8,7 +8,8 @@ module Decidim
8
8
 
9
9
  QUESTION_TYPES = %w(short_answer long_answer single_option multiple_option sorting files matrix_single matrix_multiple).freeze
10
10
  SEPARATOR_TYPE = "separator"
11
- TYPES = (QUESTION_TYPES + [SEPARATOR_TYPE]).freeze
11
+ TITLE_AND_DESCRIPTION_TYPE = "title_and_description"
12
+ TYPES = (QUESTION_TYPES + [SEPARATOR_TYPE, TITLE_AND_DESCRIPTION_TYPE]).freeze
12
13
 
13
14
  translatable_fields :body, :description
14
15
 
@@ -49,6 +50,7 @@ module Decidim
49
50
  validates :question_type, inclusion: { in: TYPES }
50
51
 
51
52
  scope :not_separator, -> { where.not(question_type: SEPARATOR_TYPE) }
53
+ scope :not_title_and_description, -> { where.not(question_type: TITLE_AND_DESCRIPTION_TYPE) }
52
54
 
53
55
  scope :with_body, -> { where(question_type: %w(short_answer long_answer)) }
54
56
  scope :with_choices, -> { where.not(question_type: %w(short_answer long_answer)) }
@@ -84,6 +86,10 @@ module Decidim
84
86
  question_type.to_s == SEPARATOR_TYPE
85
87
  end
86
88
 
89
+ def title_and_description?
90
+ question_type.to_s == TITLE_AND_DESCRIPTION_TYPE
91
+ end
92
+
87
93
  def has_attachments?
88
94
  question_type.to_s == "files"
89
95
  end
@@ -375,8 +375,10 @@ export default function createEditableForm() {
375
375
  fieldSelector: fieldSelector,
376
376
  addFieldButtonSelector: ".add-question",
377
377
  addSeparatorButtonSelector: ".add-separator",
378
+ addTitleAndDescriptionButtonSelector: ".add-title-and-description",
378
379
  fieldTemplateSelector: ".decidim-question-template",
379
380
  separatorTemplateSelector: ".decidim-separator-template",
381
+ TitleAndDescriptionTemplateSelector: ".decidim-title-and-description-template",
380
382
  removeFieldButtonSelector: ".remove-question",
381
383
  moveUpFieldButtonSelector: ".move-up-question",
382
384
  moveDownFieldButtonSelector: ".move-down-question",
@@ -21,10 +21,13 @@ module Decidim
21
21
  return "-" if answer.choices.empty?
22
22
 
23
23
  choices = answer.choices.map do |choice|
24
- choice.try(:custom_body) || choice.try(:body)
24
+ {
25
+ answer_option_body: choice.try(:answer_option).try(:translated_body),
26
+ choice_body: body_or_custom_body(choice)
27
+ }
25
28
  end
26
29
 
27
- return choices.first if answer.question.question_type == "single_option"
30
+ return choice(choices.first) if answer.question.question_type == "single_option"
28
31
 
29
32
  content_tag(:ul) do
30
33
  safe_join(choices.map { |c| choice(c) })
@@ -52,11 +55,23 @@ module Decidim
52
55
  # rubocop:enable Style/StringConcatenation
53
56
  end
54
57
 
55
- def choice(choice_body)
58
+ def choice(choice_hash)
56
59
  content_tag :li do
57
- choice_body
60
+ render_body_for choice_hash
58
61
  end
59
62
  end
63
+
64
+ def render_body_for(choice_hash)
65
+ return choice_hash[:answer_option_body] if choice_hash[:choice_body].blank?
66
+
67
+ "#{choice_hash[:answer_option_body]} (#{choice_hash[:choice_body]})"
68
+ end
69
+
70
+ def body_or_custom_body(choice)
71
+ return choice.custom_body if choice.try(:custom_body).present?
72
+
73
+ ""
74
+ end
60
75
  end
61
76
  end
62
77
  end
@@ -46,13 +46,16 @@ module Decidim
46
46
  with_choices = sibilings.where.not("decidim_forms_questions.question_type in (?)", %w(short_answer long_answer))
47
47
  .where("decidim_forms_answers.id IN (SELECT decidim_answer_id FROM decidim_forms_answer_choices)").count
48
48
 
49
- (with_body + with_choices).to_f / questionnaire.questions.not_separator.count * 100
49
+ (with_body + with_choices).to_f / questionnaire.questions.not_separator.not_title_and_description.count * 100
50
50
  end
51
51
 
52
52
  private
53
53
 
54
54
  def sibilings
55
- Answer.not_separator.where(questionnaire: questionnaire, session_token: participant.session_token).joins(:question).order("decidim_forms_questions.position ASC")
55
+ Answer.not_separator
56
+ .not_title_and_description
57
+ .where(questionnaire: questionnaire, session_token: participant.session_token)
58
+ .joins(:question).order("decidim_forms_questions.position ASC")
56
59
  end
57
60
  end
58
61
  end
@@ -20,7 +20,10 @@ module Decidim
20
20
 
21
21
  # Finds and group answers by user for each questionnaire's question.
22
22
  def query
23
- answers = Answer.not_separator.joins(:question).where(questionnaire: @questionnaire)
23
+ answers = Answer.not_separator
24
+ .not_title_and_description
25
+ .joins(:question)
26
+ .where(questionnaire: @questionnaire)
24
27
 
25
28
  answers.sort_by { |answer| answer.question.position }.group_by { |a| a.user || a.session_token }.values
26
29
  end
@@ -65,6 +65,12 @@
65
65
  id: tabs_id_for_question(blank_question),
66
66
  editable: questionnaire.questions_editable? %>
67
67
  </script>
68
+ <script type="text/template" class="decidim-title-and-description-template decidim-template" id="title-and-description-template">
69
+ <%= render "decidim/forms/admin/questionnaires/title_and_description",
70
+ form: question_form,
71
+ id: tabs_id_for_question(blank_question),
72
+ editable: questionnaire.questions_editable? %>
73
+ </script>
68
74
  <%= render "decidim/forms/admin/questionnaires/answer_option_template", form: question_form, editable: questionnaire.questions_editable?, template_id: "answer-option-template-dummy" %>
69
75
  <%= render "decidim/forms/admin/questionnaires/display_condition_template", form: question_form, editable: questionnaire.questions_editable?, template_id: "display-condition-template-dummy" %>
70
76
  <%= render "decidim/forms/admin/questionnaires/matrix_row_template", form: question_form, editable: questionnaire.questions_editable?, template_id: "matrix-row-template-dummy" %>
@@ -83,6 +89,11 @@
83
89
  form: question_form,
84
90
  id: tabs_id_for_question(question),
85
91
  editable: questionnaire.questions_editable? %>
92
+ <% elsif question.title_and_description? %>
93
+ <%= render "decidim/forms/admin/questionnaires/title_and_description",
94
+ form: question_form,
95
+ id: tabs_id_for_question(question),
96
+ editable: questionnaire.questions_editable? %>
86
97
  <% else %>
87
98
  <%= render "decidim/forms/admin/questionnaires/question",
88
99
  form: question_form,
@@ -102,6 +113,7 @@
102
113
  <% if questionnaire.questions_editable? %>
103
114
  <button class="button add-question"><%= t(".add_question") %></button>
104
115
  <button class="button add-separator"><%= t(".add_separator") %></button>
116
+ <button class="button add-title-and-description"><%= t(".add_title_and_description") %></button>
105
117
  <% end %>
106
118
  </div>
107
119
 
@@ -0,0 +1,80 @@
1
+ <% question = form.object %>
2
+ <% is_expanded = question.errors.any? %>
3
+
4
+ <div class="card questionnaire-question" id="<%= id %>-field">
5
+ <div class="card-divider question-divider">
6
+ <h2 class="card-title">
7
+ <span>
8
+ <% if editable %>
9
+ <%== icon("move") %>
10
+ <% end %>
11
+ <%= dynamic_title(translated_attribute(question.body), class: "question-title-statement", max_length: 50, omission: "...", placeholder: t(".title_and_description")) %>
12
+ </span>
13
+
14
+ <button type="button" class="button small secondary button--title question--collapse" data-toggle="<%= id %>-question-card button--collapse-question-<%= id %> button--expand-question-<%= id %>">
15
+ <span id="button--collapse-question-<%= id %>" data-toggler=".hide" class="icon-collapse <%= "hide" unless is_expanded %>">
16
+ <%== icon("caret-top", aria_label: t(".collapse"), role: "img") %>
17
+ </span>
18
+
19
+ <span id="button--expand-question-<%= id %>" data-toggler=".hide" class="icon-expand <%= "hide" if is_expanded %>">
20
+ <%== icon("caret-bottom", aria_label: t(".expand"), role: "img") %>
21
+ </span>
22
+ </button>
23
+
24
+ <% if editable %>
25
+ <button class="button small alert hollow move-up-question button--title">
26
+ <%== "#{icon("arrow-top")} #{t(".up")}" %>
27
+ </button>
28
+
29
+ <button class="button small alert hollow move-down-question button--title">
30
+ <%== "#{icon("arrow-bottom")} #{t(".down")}" %>
31
+ </button>
32
+
33
+ <button class="button small alert hollow remove-question button--title">
34
+ <%= t(".remove") %>
35
+ </button>
36
+ <% end %>
37
+ </h2>
38
+ </div>
39
+
40
+ <div class="card-section collapsible <%= "hide" unless is_expanded %>" data-toggler=".hide" id="<%= id %>-question-card">
41
+ <div class="row column">
42
+ <%=
43
+ form.translated(
44
+ :text_field,
45
+ :body,
46
+ tabs_id: id,
47
+ label: t(".title"),
48
+ disabled: !editable
49
+ )
50
+ %>
51
+ </div>
52
+
53
+ <div class="row column">
54
+ <%=
55
+ form.translated(
56
+ :editor,
57
+ :description,
58
+ toolbar: :full,
59
+ tabs_id: id,
60
+ label: t(".description"),
61
+ disabled: !editable
62
+ )
63
+ %>
64
+ </div>
65
+
66
+ <%=
67
+ form.hidden_field(
68
+ :question_type,
69
+ value: :title_and_description
70
+ )
71
+ %>
72
+
73
+ <% if question.persisted? %>
74
+ <%= form.hidden_field :id, disabled: !editable %>
75
+ <% end %>
76
+
77
+ <%= form.hidden_field :position, value: question.position || 0, disabled: !editable %>
78
+ <%= form.hidden_field :deleted, disabled: !editable %>
79
+ </div>
80
+ </div>
@@ -3,6 +3,15 @@
3
3
  <% if answer.question.separator? %>
4
4
  <%= render partial: "decidim/forms/questionnaires/answers/#{answer.question.question_type}", locals: { answer: answer, answer_form: answer_form, answer_idx: answer_idx, field_id: field_id, disabled: disabled } %>
5
5
  <%= answer_form.hidden_field :question_id %>
6
+ <% elsif answer.question.title_and_description? %>
7
+ <%= label_tag field_id, translated_attribute(answer.question.body), class: "questionnaire-title_and_description" %>
8
+ <% if translated_attribute(answer.question.description).present? %>
9
+ <div class="help-title_and_description ">
10
+ <%= decidim_sanitize_editor translated_attribute(answer.question.description) %>
11
+ </div>
12
+ <% end %>
13
+ <%= render partial: "decidim/forms/questionnaires/answers/#{answer.question.question_type}", locals: { answer: answer, answer_form: answer_form, answer_idx: answer_idx, field_id: field_id, disabled: disabled } %>
14
+ <%= answer_form.hidden_field :question_id %>
6
15
  <% else %>
7
16
  <% case answer.question.question_type %>
8
17
  <% when "single_option", "multiple_option", "sorting" %>
@@ -13,7 +22,7 @@
13
22
 
14
23
  <% if translated_attribute(answer.question.description).present? %>
15
24
  <div class="help-text">
16
- <%= decidim_sanitize translated_attribute(answer.question.description) %>
25
+ <%= decidim_sanitize_editor translated_attribute(answer.question.description) %>
17
26
  </div>
18
27
  <% end %>
19
28
 
@@ -0,0 +1 @@
1
+ <%= answer_form.hidden_field :body, value: "title-and-description", id: field_id, disabled: disabled %>
@@ -11,7 +11,7 @@
11
11
  <h3 class="section-heading"><%= translated_attribute questionnaire.title %></h3>
12
12
  <div class="row">
13
13
  <div class="columns large-<%= columns %> medium-centered lead">
14
- <%= decidim_sanitize translated_attribute questionnaire.description %>
14
+ <%= decidim_sanitize_editor translated_attribute questionnaire.description %>
15
15
  </div>
16
16
  </div>
17
17
  </div>
@@ -20,8 +20,8 @@
20
20
  <div class="columns large-<%= columns %> medium-centered">
21
21
  <div class="card">
22
22
  <div class="card__content">
23
- <% unless questionnaire_for.try(:component)&.try(:published?) %>
24
- <div class="section">
23
+ <% unless questionnaire_for.try(:component)&.try(:published?) %>
24
+ <div class="section">
25
25
  <div class="callout warning">
26
26
  <p><%= t(".questionnaire_not_published.body") %></p>
27
27
  </div>
@@ -65,14 +65,15 @@
65
65
  <div id="step-<%= step_index %>" class="<%= step_index.zero? ? "questionnaire-step" : "questionnaire-step hide" %>" data-toggler=".hide">
66
66
  <% if @form.total_steps > 1 %>
67
67
  <h4 class="section-heading">
68
- <%= t(".current_step", step: step_index + 1) %> <span class="answer-questionnaire__steps"><%= t(".of_total_steps", total_steps: @form.total_steps) %></span>
68
+ <%= t(".current_step", step: step_index + 1) %>
69
+ <span class="answer-questionnaire__steps"><%= t(".of_total_steps", total_steps: @form.total_steps) %></span>
69
70
  </h4>
70
71
  <% end %>
71
72
 
72
73
  <% step_answers.each do |answer| %>
73
74
  <div class="row column answer question" data-max-choices="<%= answer.question.max_choices %>" data-conditioned="<%= answer.question.display_conditions.any? %>" data-question-id="<%= answer.question.id %>">
74
75
  <% answer.question.display_conditions.each do |display_condition| %>
75
- <%= content_tag :div, nil, class: "display-condition", data: display_condition.to_html_data %>
76
+ <%= content_tag :div, nil, class: "display-condition", data: display_condition.to_html_data %>
76
77
  <% end %>
77
78
 
78
79
  <%= fields_for "questionnaire[responses][#{answer_idx}]", answer do |answer_form| %>
@@ -86,7 +87,7 @@
86
87
  ) %>
87
88
  <% end %>
88
89
  </div>
89
- <% if !answer.question.separator? %>
90
+ <% if !(answer.question.separator? || answer.question.title_and_description?) %>
90
91
  <% cleaned_answer_idx += 1 %>
91
92
  <% end %>
92
93
  <% answer_idx += 1 %>
@@ -108,7 +109,7 @@
108
109
  <div class="row column tos-agreement">
109
110
  <%= form.check_box :tos_agreement, label: t(".tos_agreement"), id: "questionnaire_tos_agreement", disabled: !current_participatory_space.can_participate?(current_user) %>
110
111
  <div class="help-text">
111
- <%= decidim_sanitize translated_attribute questionnaire.tos %>
112
+ <%= decidim_sanitize_editor translated_attribute questionnaire.tos %>
112
113
  </div>
113
114
  </div>
114
115
  <% end %>
@@ -79,6 +79,7 @@ cs:
79
79
  form:
80
80
  add_question: Přidat otázku
81
81
  add_separator: Přidat oddělovač
82
+ add_title_and_description: Přidat název a popis
82
83
  already_answered_warning: Formulář je již zodpovězen některými uživateli, takže jeho otázky nemůžete upravovat.
83
84
  collapse: Sbalit všechny otázky
84
85
  expand: Rozbalit všechny otázky
@@ -108,6 +109,15 @@ cs:
108
109
  remove: Odebrat
109
110
  separator: Oddělovač
110
111
  up: Nahoru
112
+ title_and_description:
113
+ collapse: Sbalit
114
+ description: Popis
115
+ down: Dolů
116
+ expand: Rozbalit
117
+ remove: Odebrat
118
+ title: Název
119
+ title_and_description: Název a popis
120
+ up: Nahoru
111
121
  update:
112
122
  invalid: Při ukládání dotazníku došlo k chybám.
113
123
  success: Formulář byl úspěšně uložen.
@@ -131,6 +141,7 @@ cs:
131
141
  short_answer: Stručná odpověď
132
142
  single_option: Jedna možnost
133
143
  sorting: Třídění
144
+ title_and_description: Název a popis
134
145
  questionnaires:
135
146
  answer:
136
147
  invalid: Při odpovědi na dotazník došlo k chybám.
@@ -80,6 +80,7 @@ en:
80
80
  form:
81
81
  add_question: Add question
82
82
  add_separator: Add separator
83
+ add_title_and_description: Add title and description
83
84
  already_answered_warning: The form is already answered by some users so you cannot modify its questions.
84
85
  collapse: Collapse all questions
85
86
  expand: Expand all questions
@@ -109,6 +110,15 @@ en:
109
110
  remove: Remove
110
111
  separator: Separator
111
112
  up: Up
113
+ title_and_description:
114
+ collapse: Collapse
115
+ description: Description
116
+ down: Down
117
+ expand: Expand
118
+ remove: Remove
119
+ title: Title
120
+ title_and_description: Title and description
121
+ up: Up
112
122
  update:
113
123
  invalid: There was a problem saving the form.
114
124
  success: Form successfully saved.
@@ -132,6 +142,7 @@ en:
132
142
  short_answer: Short answer
133
143
  single_option: Single option
134
144
  sorting: Sorting
145
+ title_and_description: Title and description
135
146
  questionnaires:
136
147
  answer:
137
148
  invalid: There was a problem answering the form.
@@ -79,6 +79,7 @@ es:
79
79
  form:
80
80
  add_question: Añadir pregunta
81
81
  add_separator: Añadir separador
82
+ add_title_and_description: Añadir título y descripción
82
83
  already_answered_warning: Algunas participantes ya han respondido el formulario, por lo que no puedes modificar las preguntas.
83
84
  collapse: Contraer todas las preguntas
84
85
  expand: Expandir todos las preguntas
@@ -108,6 +109,15 @@ es:
108
109
  remove: Eliminar
109
110
  separator: Separador
110
111
  up: Subir
112
+ title_and_description:
113
+ collapse: Contraer
114
+ description: Descripción
115
+ down: Bajar
116
+ expand: Expandir
117
+ remove: Eliminar
118
+ title: Título
119
+ title_and_description: Título y descripción
120
+ up: Subir
111
121
  update:
112
122
  invalid: Se ha producido un error al guardar el formulario.
113
123
  success: Formulario guardado correctamente.
@@ -131,6 +141,7 @@ es:
131
141
  short_answer: Respuesta corta
132
142
  single_option: Opción única
133
143
  sorting: Ordenación
144
+ title_and_description: Titulo y descripción
134
145
  questionnaires:
135
146
  answer:
136
147
  invalid: Se ha producido un error al responder el formulario.
@@ -3,18 +3,27 @@ eu:
3
3
  attributes:
4
4
  answer:
5
5
  body: Erantzuna
6
+ choices: Aukerak
7
+ selected_choices: Hautatutako aukerak
6
8
  question:
7
9
  max_choices: Gehienezko aukera kopurua
8
10
  question_type: Mota
9
11
  questionnaire_question:
10
12
  mandatory: derrigorrezko
13
+ max_characters: Karaktereen muga (utzi 0 mugarik ez badago)
11
14
  errors:
12
15
  models:
13
16
  answer:
14
17
  attributes:
18
+ add_documents:
19
+ needs_to_be_reattached: Fitxategia berriro erantsi behar da
20
+ body:
21
+ too_long: luzeegia da
15
22
  choices:
16
23
  missing: ez dira osatu
17
24
  too_many: gehiegi dira
25
+ questionnaire:
26
+ request_invalid: Arazo bat izan da zure eskaera bidaltzean. Saiatu berriro
18
27
  decidim:
19
28
  forms:
20
29
  admin:
@@ -23,35 +32,101 @@ eu:
23
32
  description: deskribapena
24
33
  tos: Zerbitzu-baldintzak
25
34
  questionnaires:
35
+ actions:
36
+ back: Itzuli galderetara
37
+ show: Erakutsi erantzunak
26
38
  answer_option:
27
39
  answer_option: Erantzun aukera
28
40
  free_text: Testu librea
29
41
  remove: Kendu
30
42
  statement: adierazpena
43
+ answers:
44
+ actions:
45
+ back: Itzuli erantzunetara
46
+ export: Esportatu
47
+ show: Erakutsi erantzunak
48
+ empty: Oraindik ez dago erantzunik
49
+ export:
50
+ answer:
51
+ title: '#%{number} erantzuna'
52
+ export_response:
53
+ title: survey_user_answers_%{token}
54
+ index:
55
+ title: "Guztira %{total} erantzun"
56
+ show:
57
+ title: '#%{number} erantzuna'
58
+ display_condition:
59
+ answer_option: Erantzuteko aukera
60
+ condition_question: Galdera
61
+ condition_type: Baldintza
62
+ condition_types:
63
+ answered: Erantzunda
64
+ equal: Honen berdina
65
+ match: Testua barne
66
+ not_answered: Erantzun gabe
67
+ not_equal: Ez da berdina
68
+ condition_value: Testua barne
69
+ display_condition: Bistaratzeko baldintza
70
+ mandatory: Baldintza hau beti bete behar da, beste baldintza batzuen egoera edozein dela ere
71
+ remove: Kendu
72
+ save_warning: Gogoratu formularioa gorde behar duzula, bistaratze-baldintzak konfiguratu aurretik
73
+ select_answer_option: Hautatu erantzun-aukera
74
+ select_condition_question: Hautatu galdera bat
75
+ select_condition_type: Hautatu baldintza mota bat
31
76
  edit:
32
77
  save: Save
78
+ title: Editatu galdetegia
33
79
  form:
34
- add_question: Galdera gehitu
80
+ add_question: Gehitu galdera
81
+ add_separator: Gehitu banatzailea
35
82
  already_answered_warning: Galdetegia dagoeneko erantzun dio erabiltzaile batzuek, beraz, ezin dituzu bere galderak aldatu.
83
+ collapse: Bildu galdera guztiak
84
+ expand: Zabaldu galdera guztiak
85
+ preview: Aurreikusi
86
+ title: Editatu galdetegia honetarako %{questionnaire_for}
87
+ unpublished_warning: Galdetegia ez dago argitaratuta. Bere galderak aldatu ahal dituzu, baina egitean oraingo erantzunak ezabatuko dira.
36
88
  matrix_row:
89
+ matrix_row: Errenkada
37
90
  remove: Kendu
38
91
  statement: adierazpena
39
92
  question:
40
93
  add_answer_option: Gehitu erantzun aukera
94
+ add_display_condition: Gehitu bistaratzeko baldintza
95
+ add_display_condition_info: Gorde galdetegia bistaratzeko baldintzak konfiguratzeko
96
+ add_matrix_row: Gehitu errenkada
41
97
  any: Edozein
98
+ collapse: Bildu
42
99
  description: deskribapena
43
100
  down: Down
101
+ expand: Zabaldu
44
102
  question: Galdera
45
103
  remove: Kendu
46
104
  statement: adierazpena
47
105
  up: up
106
+ separator:
107
+ down: Jaitsi
108
+ remove: Kendu
109
+ separator: Bereizlea
110
+ up: Igo
48
111
  update:
49
112
  invalid: Akatsik egon da galdeketa gordetzean.
113
+ success: Galdetegia zuzen gorde da.
50
114
  errors:
51
115
  answer:
52
116
  body: Gorputza ezin da hutsik egon
117
+ files:
118
+ extension_allowlist: 'Onartutako formatuak:'
119
+ images:
120
+ dimensions: "%{width} x %{height} px"
121
+ dimensions_info: 'Irudi honek neurtuko du:'
122
+ processors:
123
+ resize_and_pad: Birdimentsionatua eta honi egokitua
124
+ resize_to_fit: Birdimentsionatua egokitzeko
53
125
  question_types:
126
+ files: Fitxategiak
54
127
  long_answer: Erantzun luzea
128
+ matrix_multiple: Matrizea (aukera anitzekoa)
129
+ matrix_single: Matrizea (aukera bakarrekoa)
55
130
  multiple_option: Hainbat aukera
56
131
  short_answer: Erantzun laburra
57
132
  single_option: Aukera bakarra
@@ -59,6 +134,7 @@ eu:
59
134
  questionnaires:
60
135
  answer:
61
136
  invalid: Akatsik egon da galdeketa erantzutean.
137
+ max_choices_alert: Aukera gehiegi daude hautatuta
62
138
  success: Galdesortaz erantzun ona.
63
139
  question:
64
140
  max_choices: 'Gehienezko aukerak: %{n}'
@@ -66,6 +142,8 @@ eu:
66
142
  answer_questionnaire:
67
143
  anonymous_user_message: <a href="%{sign_in_link}">Hasi saioa zure kontuarekin</a> edo <a href="%{sign_up_link}">saioa hasi</a> galdetegiari erantzuteko.
68
144
  title: Erantzun galdetegia
145
+ current_step: '%{step} urratsa'
146
+ of_total_steps: '%{total_steps} etik'
69
147
  questionnaire_answered:
70
148
  body: Galdeketa honi erantzun dio.
71
149
  title: Dagoeneko erantzun
@@ -75,11 +153,24 @@ eu:
75
153
  questionnaire_for_private_users:
76
154
  body: Galdetegia erabiltzaile pribatuentzat soilik dago erabilgarri
77
155
  title: Galdeketa itxia
156
+ questionnaire_js_disabled:
157
+ body: Galdetegi honen ezaugarri batzuk desaktibatu egingo dira. Zure esperientzia hobetzeko, gaitu JavaScript zure nabigatzailean.
158
+ title: Javascript desaktibatuta dago
78
159
  tos_agreement: Zerbitzu-baldintzak onartzen dituzunean parte hartuz
79
160
  step_navigation:
80
161
  show:
81
162
  are_you_sure: Ekintza hau ezin da desegin eta ezin izango dituzu zure erantzunak editatu. Ziur zaude?
163
+ back: Atzera
164
+ continue: Jarraitu
82
165
  submit: Bidali
83
166
  user_answers_serializer:
167
+ body: Erantzuna
168
+ completion: Amaiera
84
169
  created_at: Erantzuna
85
170
  id: Erantzun IDa
171
+ ip_hash: IP Helbidearen Hash
172
+ question: Galdera
173
+ registered: Erregistratuta
174
+ session_token: Erabiltzailearen identifikatzailea
175
+ unregistered: Erregistratu gabe
176
+ user_status: Erabiltzailearen egoera