- <%= field['name'].presence || "#{field['type'].titleize} Field #{submitter_field_counters[field['type']]}" %>
+ <%= field['name'].presence || "#{t("#{field['type']}_field")} #{submitter_field_counters[field['type']]}" %>
<% if field['type'].in?(%w[signature initials]) %>
diff --git a/config/locales/i18n.yml b/config/locales/i18n.yml
index d77d769a..2023e791 100644
--- a/config/locales/i18n.yml
+++ b/config/locales/i18n.yml
@@ -592,10 +592,27 @@ en: &en
email_verification: Email verification
phone_verification: Phone verification
session_id: Session ID
- type_field: '%{type} Field'
+ option: Option
+ text_field: Text Field
+ signature_field: Signature Field
+ initials_field: Initials Field
+ date_field: Date Field
+ number_field: Number Field
+ image_field: Image Field
+ file_field: File Field
+ select_field: Select Field
+ checkbox_field: Checkbox Field
+ multiple_field: Multiple Select Field
+ radio_field: Radio Group Field
+ cells_field: Cells Field
+ stamp_field: Stamp Field
+ payment_field: Payment Field
+ phone_field: Phone Field
paid_price: 'Paid %{price}'
verified: Verified
unverified: Unverified
+ document: Document
+ completed_at: Completed At
submission_event_names:
send_email_to_html: 'Email sent to %{submitter_name}'
send_reminder_email_to_html: 'Reminder email sent to %{submitter_name}'
@@ -1206,10 +1223,27 @@ es: &es
email_verification: Verificación de correo electrónico
phone_verification: Verificación telefónica
session_id: ID de la Sesión
- type_field: 'Campo %{type}'
+ option: Opción
+ text_field: Campo de Texto
+ signature_field: Campo de Firma
+ initials_field: Campo de Iniciales
+ date_field: Campo de Fecha
+ number_field: Campo de Número
+ image_field: Campo de Imagen
+ file_field: Campo de Archivo
+ select_field: Campo de Selección
+ multiple_field: Campo Múltiple
+ radio_field: Campo de Grupo Radio
+ radio_field: Campo de Radio
+ cells_field: Campo de Celdas
+ stamp_field: Campo de Sello
+ payment_field: Campo de Pago
+ phone_field: Campo de Teléfono
paid_price: 'Pagado %{price}'
verified: Verificado
unverified: No verificado
+ document: Documento
+ completed_at: Completado el
submission_event_names:
send_email_to_html: 'Correo electrónico enviado a %{submitter_name}'
send_reminder_email_to_html: 'Correo de recordatorio enviado a %{submitter_name}'
@@ -1820,10 +1854,27 @@ it: &it
email_verification: Verifica e-mail
phone_verification: Verifica telefono
session_id: ID della Sessione
- type_field: 'Campo %{type}'
+ option: Opzione
+ text_field: Campo di Testo
+ signature_field: Campo di Firma
+ initials_field: Campo di Iniziali
+ date_field: Campo Data
+ number_field: Campo Numero
+ image_field: Campo Immagine
+ file_field: Campo File
+ select_field: Campo di Selezione
+ checkbox_field: Campo di Checkbox
+ multiple_field: Campo Selezione Multipla
+ radio_field: Campo di Gruppo Radio
+ cells_field: Campo Celle
+ stamp_field: Campo Timbro
+ payment_field: Campo Pagamento
+ phone_field: Campo Telefono
paid_price: 'Pagato %{price}'
verified: Verificato
unverified: Non verificato
+ document: Documento
+ completed_at: Completato il
submission_event_names:
send_email_to_html: 'E-mail inviato a %{submitter_name}'
send_reminder_email_to_html: 'E-mail di promemoria inviato a %{submitter_name}'
@@ -2435,10 +2486,27 @@ fr: &fr
email_verification: Vérification de l'e-mail
phone_verification: Vérification du téléphone
session_id: ID de session
- type_field: 'Champ %{type}'
+ option: Option
+ text_field: Champ de Texte
+ signature_field: Champ de Signature
+ initials_field: "Champ d'Initiales"
+ date_field: Champ de Date
+ number_field: Champ de Numéro
+ image_field: "Champ d'Image"
+ file_field: Champ de Fichier
+ select_field: Champ de Choix
+ checkbox_field: Champ de Coche
+ multiple_field: Champ de Choix Multiple
+ radio_field: Champ de Groupe Radio
+ cells_field: Champ de Cellules
+ stamp_field: Champ de Tampon
+ payment_field: Champ de Paiement
+ phone_field: Champ de Téléphone
paid_price: 'Payé %{price}'
verified: Vérifié
unverified: Non vérifié
+ document: Document
+ completed_at: Terminé le
submission_event_names:
send_email_to_html: 'E-mail envoyé à %{submitter_name}'
send_reminder_email_to_html: 'E-mail de rappel envoyé à %{submitter_name}'
@@ -3049,10 +3117,27 @@ pt: &pt
email_verification: Verificação de E-mail
phone_verification: Verificação de Telefone
session_id: ID da Sessão
- type_field: 'Campo %{type}'
+ option: Opção
+ text_field: Campo de Texto
+ signature_field: Campo de Assinatura
+ initials_field: Campo de Rúbrica
+ date_field: Campo de Data
+ number_field: Campo de Número
+ image_field: Campo de Imagem
+ file_field: Campo de Arquivo
+ select_field: Campo de Seleção
+ checkbox_field: Campo de Caixa
+ multiple_field: Campo de Opção Múltipla
+ radio_field: Campo de Grupo Rádio
+ cells_field: Campo de Células
+ stamp_field: Campo de Carimbo
+ payment_field: Campo de Pagamento
+ phone_field: Campo de Telefone
paid_price: 'Pago %{price}'
verified: Verificado
unverified: Não verificado
+ document: Documento
+ completed_at: Concluído em
submission_event_names:
send_email_to_html: 'E-mail enviado para %{submitter_name}'
send_reminder_email_to_html: 'E-mail de lembrete enviado para %{submitter_name}'
@@ -3663,10 +3748,27 @@ de: &de
email_verification: E-Mail-Verifizierung
phone_verification: Telefonverifizierung
session_id: Sitzungs-ID
- type_field: '%{type} Feld'
+ option: Option
+ text_field: Textfeld
+ signature_field: Unterschriftsfeld
+ initials_field: Initialenfeld
+ date_field: Datumsfeld
+ number_field: Zahlenfeld
+ image_field: Bildfeld
+ file_field: Dateifeld
+ select_field: Auswahlfeld
+ checkbox_field: Checkbox-Feld
+ multiple_field: Mehrfach-Auswahlfeld
+ radio_field: Radio-Gruppenfeld
+ cells_field: Zellenfeld
+ stamp_field: Stempelfeld
+ payment_field: Zahlungsfeld
+ phone_field: Telefonfeld
paid_price: 'Bezahlt %{price}'
verified: Verifiziert
unverified: Nicht verifiziert
+ document: Dokument
+ completed_at: Abgeschlossen am
submission_event_names:
send_email_to_html: 'E-Mail gesendet an %{submitter_name}'
send_reminder_email_to_html: 'Erinnerungs-E-Mail gesendet an %{submitter_name}'
diff --git a/lib/submissions/generate_audit_trail.rb b/lib/submissions/generate_audit_trail.rb
index d521e867..34367459 100644
--- a/lib/submissions/generate_audit_trail.rb
+++ b/lib/submissions/generate_audit_trail.rb
@@ -282,8 +282,7 @@ module Submissions
[
{
text: TextUtils.maybe_rtl_reverse(field_name).upcase.presence ||
- "#{I18n.t('type_field',
- type: field['type'])} #{submitter_field_counters[field['type']]}\n".upcase,
+ "#{I18n.t("#{field['type']}_field")} #{submitter_field_counters[field['type']]}\n".upcase,
font_size: 6
}
].compact_blank,
diff --git a/lib/submissions/generate_export_files.rb b/lib/submissions/generate_export_files.rb
index 79144f1a..7e288774 100644
--- a/lib/submissions/generate_export_files.rb
+++ b/lib/submissions/generate_export_files.rb
@@ -21,7 +21,7 @@ module Submissions
def rows_to_xlsx(rows)
workbook = RubyXL::Workbook.new
worksheet = workbook[0]
- worksheet.sheet_name = I18n.l(Time.current.to_date)
+ worksheet.sheet_name = Time.current.to_date.to_s
headers = build_headers(rows)
headers.each_with_index do |column_name, column_index|
@@ -79,7 +79,7 @@ module Submissions
submission_data += submitter.documents.map.with_index(1) do |attachment, index|
{
- name: "Document #{index}",
+ name: "#{I18n.t('document')} #{index}",
value: ActiveStorage::Blob.proxy_url(attachment.blob)
}
end
@@ -92,20 +92,20 @@ module Submissions
def build_submission_data(submitter, submitter_name, submitters_count)
[
{
- name: column_name('Name', submitter_name, submitters_count),
+ name: column_name(I18n.t('name'), submitter_name, submitters_count),
value: submitter.name
},
{
- name: column_name('Email', submitter_name, submitters_count),
+ name: column_name(I18n.t('email'), submitter_name, submitters_count),
value: submitter.email
},
{
- name: column_name('Phone', submitter_name, submitters_count),
+ name: column_name(I18n.t('phone'), submitter_name, submitters_count),
value: submitter.phone
},
{
- name: column_name('Completed At', submitter_name, submitters_count),
- value: submitter.completed_at
+ name: column_name(I18n.t('completed_at'), submitter_name, submitters_count),
+ value: submitter.completed_at.to_s
}
].reject { |e| e[:value].blank? }
end
@@ -127,7 +127,8 @@ module Submissions
template_field_type = template_field['type']
template_field_counters[template_field_type] += 1
template_field_name = template_field['name'].presence
- template_field_name ||= "#{template_field_type.titleize} Field #{template_field_counters[template_field_type]}"
+ template_field_name ||=
+ "#{I18n.t("#{template_field_type}_field")} #{template_field_counters[template_field_type]}"
value =
if template_field_type.in?(%w[image signature])
diff --git a/lib/submissions/generate_result_attachments.rb b/lib/submissions/generate_result_attachments.rb
index 9d25d739..f847d3a2 100644
--- a/lib/submissions/generate_result_attachments.rb
+++ b/lib/submissions/generate_result_attachments.rb
@@ -341,7 +341,8 @@ module Submissions
if field['type'].in?(%w[multiple radio])
option = field['options']&.find { |o| o['uuid'] == area['option_uuid'] }
- option_name = option['value'].presence || "Option #{field['options'].index(option) + 1}"
+ option_name = option['value'].presence
+ option_name ||= "#{I18n.t('option', locale: account.locale)} #{field['options'].index(option) + 1}"
value = Array.wrap(value).include?(option_name)
end