fix i18n
This commit is contained in:
@@ -87,7 +87,7 @@ class EsignSettingsController < ApplicationController
|
||||
|
||||
@encrypted_config.save!
|
||||
|
||||
redirect_to settings_esign_path, notice: I18m.t('certificate_has_been_removed')
|
||||
redirect_to settings_esign_path, notice: I18n.t('certificate_has_been_removed')
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
@@ -216,7 +216,7 @@ const it = {
|
||||
pay: 'Pagamento',
|
||||
file: 'File',
|
||||
select: 'Seleziona',
|
||||
checkbox: 'Casella di controllo',
|
||||
checkbox: 'Checkbox',
|
||||
multiple: 'Multiplo',
|
||||
radio: 'Radio',
|
||||
cells: 'Celle',
|
||||
|
||||
@@ -360,6 +360,7 @@ export default {
|
||||
},
|
||||
computed: {
|
||||
fieldNames: FieldType.computed.fieldNames,
|
||||
fieldLabels: FieldType.computed.fieldLabels,
|
||||
fieldIcons: FieldType.computed.fieldIcons,
|
||||
isDefaultValuePresent () {
|
||||
if (this.field?.type === 'radio' && this.field?.areas?.length > 1) {
|
||||
|
||||
@@ -332,7 +332,7 @@
|
||||
>
|
||||
<div class="bg-base-200 rounded-lg p-5 text-center space-y-4">
|
||||
<p>
|
||||
{{ t('draw_field_on_the_document').replace('{field}', drawField?.name || '') }}
|
||||
{{ t('draw_field_on_the_document') }}
|
||||
</p>
|
||||
<div>
|
||||
<button
|
||||
|
||||
@@ -312,6 +312,7 @@ export default {
|
||||
},
|
||||
computed: {
|
||||
fieldNames: FieldType.computed.fieldNames,
|
||||
fieldLabels: FieldType.computed.fieldLabels,
|
||||
dropdownBgColor () {
|
||||
return ['', null, 'transparent'].includes(this.backgroundColor) ? 'white' : this.backgroundColor
|
||||
},
|
||||
@@ -367,8 +368,7 @@ export default {
|
||||
if (this.field.type === 'heading') {
|
||||
return `${this.fieldNames[field.type]} ${typeIndex + 1}`
|
||||
} else {
|
||||
const suffix = { multiple: this.t('select'), radio: this.t('group') }[field.type] || this.t('field')
|
||||
return `${this.fieldNames[field.type]} ${suffix} ${typeIndex + 1}`
|
||||
return `${this.fieldLabels[field.type]} ${typeIndex + 1}`
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
@@ -114,6 +114,25 @@ export default {
|
||||
phone: this.t('phone')
|
||||
}
|
||||
},
|
||||
fieldLabels () {
|
||||
return {
|
||||
text: this.t('text_field'),
|
||||
signature: this.t('signature_field'),
|
||||
initials: this.t('initials_field'),
|
||||
date: this.t('date_field'),
|
||||
number: this.t('number_field'),
|
||||
image: this.t('image_field'),
|
||||
file: this.t('file_field'),
|
||||
select: this.t('select_field'),
|
||||
checkbox: this.t('checkbox_field'),
|
||||
multiple: this.t('multiple_field'),
|
||||
radio: this.t('radio_field'),
|
||||
cells: this.t('cells_field'),
|
||||
stamp: this.t('stamp_field'),
|
||||
payment: this.t('payment_field'),
|
||||
phone: this.t('phone_field')
|
||||
}
|
||||
},
|
||||
fieldIcons () {
|
||||
return {
|
||||
heading: IconHeading,
|
||||
|
||||
@@ -46,7 +46,7 @@ const en = {
|
||||
drawn: 'Drawn',
|
||||
formula: 'Formula',
|
||||
typed: 'Typed',
|
||||
draw_field_on_the_document: 'Draw {field} field on the document',
|
||||
draw_field_on_the_document: 'Draw a field on the document',
|
||||
click_to_upload: 'Click to upload',
|
||||
or_drag_and_drop_files: 'or drag and drop files',
|
||||
uploading: 'Uploading',
|
||||
@@ -101,8 +101,21 @@ const en = {
|
||||
stamp: 'Stamp',
|
||||
payment: 'Payment',
|
||||
phone: 'Phone',
|
||||
field: 'Field',
|
||||
group: 'Group',
|
||||
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',
|
||||
draw_a_text_field_on_the_page_with_a_mouse: 'Draw a text field on the page with a mouse',
|
||||
drag_and_drop_any_other_field_type_on_the_page: 'Drag & drop any other field type on the page',
|
||||
click_on_the_field_type_above_to_start_drawing_it: 'Click on the field type above to start drawing it',
|
||||
@@ -184,7 +197,7 @@ const es = {
|
||||
save: 'Guardar',
|
||||
cancel: 'Cancelar',
|
||||
or_add_field_without_drawing: 'O añadir campo sin dibujar',
|
||||
draw_field_on_the_document: 'Dibujar campo {field} en el documento',
|
||||
draw_field_on_the_document: 'Dibujar un campo en el documento',
|
||||
click_to_upload: 'Haz clic para cargar',
|
||||
or_drag_and_drop_files: 'o arrastra y suelta archivos',
|
||||
uploading: 'Subiendo',
|
||||
@@ -232,13 +245,26 @@ const es = {
|
||||
select: 'Seleccionar',
|
||||
checkbox: 'Casilla',
|
||||
multiple: 'Múltiple',
|
||||
field: 'Campo',
|
||||
group: 'Grupo',
|
||||
radio: 'Radio',
|
||||
cells: 'Celdas',
|
||||
stamp: 'Sello',
|
||||
payment: 'Pago',
|
||||
phone: 'Teléfono',
|
||||
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',
|
||||
checkbox_field: 'Campo de Casilla',
|
||||
multiple_field: 'Campo Múltiple',
|
||||
radio_field: 'Campo de Grupo Radio',
|
||||
cells_field: 'Campo de Celdas',
|
||||
stamp_field: 'Campo de Sello',
|
||||
payment_field: 'Campo de Pago',
|
||||
phone_field: 'Campo de Teléfono',
|
||||
draw_a_text_field_on_the_page_with_a_mouse: 'Dibujar un campo de texto en la página con el mouse',
|
||||
drag_and_drop_any_other_field_type_on_the_page: 'Arrastra y suelta cualquier otro tipo de campo en la página',
|
||||
click_on_the_field_type_above_to_start_drawing_it: 'Haz clic en el tipo de campo de arriba para comenzar a dibujarlo',
|
||||
@@ -324,7 +350,7 @@ const it = {
|
||||
drawn: 'Disegnato',
|
||||
formula: 'Formula',
|
||||
typed: 'Digitato',
|
||||
draw_field_on_the_document: 'Disegna il campo {field} sul documento',
|
||||
draw_field_on_the_document: 'Disegnare un campo sul documento',
|
||||
click_to_upload: 'Clicca per caricare',
|
||||
or_drag_and_drop_files: 'o trascina e rilascia i file',
|
||||
uploading: 'Caricamento in corso',
|
||||
@@ -372,15 +398,28 @@ const it = {
|
||||
image: 'Immagine',
|
||||
file: 'File',
|
||||
select: 'Seleziona',
|
||||
checkbox: 'Casella di controllo',
|
||||
checkbox: 'Checkbox',
|
||||
multiple: 'Multiplo',
|
||||
radio: 'Radio',
|
||||
cells: 'Celle',
|
||||
stamp: 'Timbro',
|
||||
payment: 'Pagamento',
|
||||
phone: 'Telefono',
|
||||
field: 'Campo',
|
||||
group: 'Gruppo',
|
||||
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',
|
||||
draw_a_text_field_on_the_page_with_a_mouse: 'Disegna un campo di testo sulla pagina con il mouse',
|
||||
drag_and_drop_any_other_field_type_on_the_page: 'Trascina e rilascia qualsiasi altro tipo di campo sulla pagina',
|
||||
click_on_the_field_type_above_to_start_drawing_it: 'Clicca sul tipo di campo sopra per iniziare a disegnarlo',
|
||||
@@ -462,7 +501,7 @@ const pt = {
|
||||
save: 'Salvar',
|
||||
cancel: 'Cancelar',
|
||||
or_add_field_without_drawing: 'Ou adicione campo sem desenhar',
|
||||
draw_field_on_the_document: 'Desenhar campo {field} no documento',
|
||||
draw_field_on_the_document: 'Desenhar um campo no documento',
|
||||
click_to_upload: 'Clique para enviar',
|
||||
or_drag_and_drop_files: 'ou arraste e solte arquivos',
|
||||
uploading: 'Carregando',
|
||||
@@ -509,14 +548,27 @@ const pt = {
|
||||
file: 'Arquivo',
|
||||
select: 'Selecionar',
|
||||
checkbox: 'Caixa',
|
||||
field: 'Campo',
|
||||
group: 'Grupo',
|
||||
multiple: 'Múltiplo',
|
||||
radio: 'Rádio',
|
||||
cells: 'Células',
|
||||
stamp: 'Carimbo',
|
||||
payment: 'Pagamento',
|
||||
phone: 'Telefone',
|
||||
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',
|
||||
draw_a_text_field_on_the_page_with_a_mouse: 'Desenhar um campo de texto na página com o mouse',
|
||||
drag_and_drop_any_other_field_type_on_the_page: 'Arraste e solte qualquer outro tipo de campo na página',
|
||||
click_on_the_field_type_above_to_start_drawing_it: 'Clique no tipo de campo acima para começar a desenhá-lo',
|
||||
@@ -600,7 +652,7 @@ const fr = {
|
||||
remove: 'Supprimer',
|
||||
save: 'Enregistrer',
|
||||
cancel: 'Annuler',
|
||||
draw_field_on_the_document: 'Dessinez le champ {field} sur le document',
|
||||
draw_field_on_the_document: 'Dessiner un champ sur le document',
|
||||
click_to_upload: 'Cliquez pour télécharger',
|
||||
or_drag_and_drop_files: 'ou faites glisser-déposer des fichiers',
|
||||
uploading: 'Téléchargement en cours',
|
||||
@@ -654,8 +706,21 @@ const fr = {
|
||||
stamp: 'Tampon',
|
||||
payment: 'Paiement',
|
||||
phone: 'Téléphone',
|
||||
field: 'Champ',
|
||||
group: 'Groupe',
|
||||
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',
|
||||
draw_a_text_field_on_the_page_with_a_mouse: 'Dessinez un champ texte sur la page avec une souris',
|
||||
drag_and_drop_any_other_field_type_on_the_page: 'Glissez et déposez tout autre type de champ sur la page',
|
||||
click_on_the_field_type_above_to_start_drawing_it: 'Cliquez sur le type de champ ci-dessus pour commencer à le dessiner',
|
||||
@@ -739,7 +804,7 @@ const de = {
|
||||
remove: 'Entfernen',
|
||||
save: 'Speichern',
|
||||
cancel: 'Abbrechen',
|
||||
draw_field_on_the_document: 'Feld {field} auf dem Dokument zeichnen',
|
||||
draw_field_on_the_document: 'Ein Feld auf dem Dokument zeichnen',
|
||||
click_to_upload: 'Klicken Sie zum Hochladen',
|
||||
or_drag_and_drop_files: 'oder Dateien hierher ziehen',
|
||||
uploading: 'Hochladen',
|
||||
@@ -793,8 +858,21 @@ const de = {
|
||||
stamp: 'Stempel',
|
||||
payment: 'Zahlung',
|
||||
phone: 'Telefon',
|
||||
field: 'Feld',
|
||||
group: 'Gruppe',
|
||||
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',
|
||||
draw_a_text_field_on_the_page_with_a_mouse: 'Textfeld auf der Seite mit der Maus zeichnen',
|
||||
drag_and_drop_any_other_field_type_on_the_page: 'Ziehe und lasse einen anderen Feldtyp auf die Seite fallen',
|
||||
click_on_the_field_type_above_to_start_drawing_it: 'Klicke auf den Feldtyp oben, um mit dem Zeichnen zu beginnen',
|
||||
|
||||
@@ -182,7 +182,7 @@
|
||||
<% next if value.blank? %>
|
||||
<div class="pt-2.5 border-b border-base-300">
|
||||
<div class="text-xs font-medium uppercase mb-0.5" dir="auto">
|
||||
<%= field['name'].presence || "#{field['type'].titleize} Field #{submitter_field_counters[field['type']]}" %>
|
||||
<%= field['name'].presence || "#{t("#{field['type']}_field")} #{submitter_field_counters[field['type']]}" %>
|
||||
</div>
|
||||
<div dir="auto">
|
||||
<% if field['type'].in?(%w[signature initials]) %>
|
||||
|
||||
+108
-6
@@ -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: '<b>Email sent</b> to %{submitter_name}'
|
||||
send_reminder_email_to_html: '<b>Reminder email sent</b> 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: '<b>Correo electrónico enviado</b> a %{submitter_name}'
|
||||
send_reminder_email_to_html: '<b>Correo de recordatorio enviado</b> 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: '<b>E-mail inviato</b> a %{submitter_name}'
|
||||
send_reminder_email_to_html: '<b>E-mail di promemoria inviato</b> 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: '<b>E-mail envoyé</b> à %{submitter_name}'
|
||||
send_reminder_email_to_html: '<b>E-mail de rappel envoyé</b> à %{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: '<b>E-mail enviado</b> para %{submitter_name}'
|
||||
send_reminder_email_to_html: '<b>E-mail de lembrete enviado</b> 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: '<b>E-Mail gesendet</b> an %{submitter_name}'
|
||||
send_reminder_email_to_html: '<b>Erinnerungs-E-Mail gesendet</b> an %{submitter_name}'
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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])
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user