feat: I18n translation function call on templates hardcoded texts

pull/356/head
Ivo Monteiro 1 year ago
parent 4741e64178
commit e5b64d1729

@ -57,13 +57,13 @@ class SubmissionsController < ApplicationController
if params[:permanently].present?
@submission.destroy!
'Submission has been removed'
t('submission_has_been_removed')
else
@submission.update!(archived_at: Time.current)
SendSubmissionArchivedWebhookRequestJob.perform_async('submission_id' => @submission.id)
'Submission has been archived'
t('submission_has_been_archived')
end
redirect_back(fallback_location: template_path(@submission.template), notice:)

@ -6,6 +6,6 @@ class TemplatesRestoreController < ApplicationController
def create
@template.update!(archived_at: nil)
redirect_to template_path(@template), notice: 'Template has been unarchived'
redirect_to template_path(@template), notice: t('template_has_been_unarchived')
end
end

@ -117,7 +117,131 @@ const en = {
custom: 'Custom',
numbers_only: 'Numbers only',
letters_only: 'Letters only',
regexp_validation: 'Regexp validation'
regexp_validation: 'Regexp validation',
save_and_preview: 'Save and Preview'
}
export { en }
const ptPT = {
editable: 'Editável',
search_field: 'Campo de pesquisa',
field_not_found: 'Campo não encontrado',
clear: 'Limpar',
align: 'Alinhar',
add_all_required_fields_to_continue: 'Adicione todos os campos obrigatórios para continuar',
uploaded_pdf_contains_form_fields_keep_or_remove_them: 'O PDF carregado contém campos de formulário. Manter ou remover?',
keep: 'Manter',
left: 'Esquerda',
heading: 'Cabeçalho',
validation: 'Validação',
add_blank_page: 'Adicionar página em branco',
right: 'Direita',
center: 'Centro',
description: 'Descrição',
display_title: 'Mostrar título',
with_logo: 'Com logotipo',
unchecked: 'Não marcado',
price: 'Preço',
type_value: 'Digite o valor',
equal: 'Igual',
not_equal: 'Diferente',
contains: 'Contém',
does_not_contain: 'Não contém',
not_empty: 'Não está vazio',
empty: 'Vazio',
select_field_: 'Selecione o campo...',
select_value_: 'Selecione o valor...',
remove_condition: 'Remover condição',
add_condition: 'Adicionar condição',
are_you_sure: 'Tem a certeza?',
sign_yourself: 'Assine você mesmo',
set_signing_date: 'Definir data de assinatura',
signing_date: 'Data de assinatura',
send: 'Enviar',
remove: 'Remover',
edit: 'Editar',
settings: 'Definições',
up: 'Cima',
down: 'Baixo',
checked: 'Marcado',
save: 'Guardar',
cancel: 'Cancelar',
any: 'Qualquer',
drawn: 'Desenhado',
formula: 'Fórmula',
typed: 'Digitado',
draw_field_on_the_document: 'Desenhar campo {field} no documento',
click_to_upload: 'Clique para carregar',
or_drag_and_drop_files: 'ou arraste e solte os ficheiros',
uploading: 'A carregar',
processing_: 'A processar...',
add_pdf_documents_or_images: 'Adicionar documentos PDF ou imagens',
add_documents_or_images: 'Adicionar documentos ou imagens',
required: 'Obrigatório',
default_value: 'Valor padrão',
format: 'Formato',
read_only: 'Apenas leitura',
page: 'Página',
draw_new_area: 'Desenhar nova área',
copy_to_all_pages: 'Copiar para todas as páginas',
add_option: 'Adicionar opção',
option: 'Opção',
condition: 'Condição',
first_party: 'Primeira Parte',
second_party: 'Segunda Parte',
third_party: 'Terceira Parte',
fourth_party: 'Quarta Parte',
fifth_party: 'Quinta Parte',
sixth_party: 'Sexta Parte',
seventh_party: 'Sétima Parte',
eighth_party: 'Oitava Parte',
ninth_party: 'Nona Parte',
tenth_party: 'Décima Parte',
eleventh_party: 'Décima Primeira Parte',
twelfth_party: 'Décima Segunda Parte',
thirteenth_party: 'Décima Terceira Parte',
fourteenth_party: 'Décima Quarta Parte',
fifteenth_party: 'Décima Quinta Parte',
sixteenth_party: 'Décima Sexta Parte',
seventeenth_party: 'Décima Sétima Parte',
eighteenth_party: 'Décima Oitava Parte',
nineteenth_party: 'Décima Nona Parte',
twentieth_party: 'Vigésima Parte',
draw: 'Desenhar',
add: 'Adicionar',
or_add_field_without_drawing: 'Ou adicionar campo sem desenhar',
text: 'Texto',
number: 'Número',
signature: 'Assinatura',
initials: 'Iniciais',
date: 'Data',
image: 'Imagem',
file: 'Ficheiro',
select: 'Selecionar',
checkbox: 'Caixa de seleção',
multiple: 'Múltiplo',
radio: 'Rádio',
cells: 'Células',
stamp: 'Carimbo',
payment: 'Pagamento',
phone: 'Telefone',
field: 'Campo',
group: 'Grupo',
draw_a_text_field_on_the_page_with_a_mouse: 'Desenhe um campo de texto na página com o rato',
draw_field: 'Desenhar Campo {field}',
replace: 'Substituir',
uploading_: 'A carregar...',
add_document: 'Adicionar Documento',
none: 'Nenhum',
ssn: 'NIF',
ein: 'NIPC',
email: 'Email',
url: 'URL',
zip: 'Código Postal',
custom: 'Personalizado',
numbers_only: 'Apenas números',
letters_only: 'Apenas letras',
regexp_validation: 'Validação por Regexp',
save_and_preview: 'Gravar e Prever'
}
export { en, ptPT }

@ -48,7 +48,7 @@
]
}'<% end.to_str %>
<span class="top-0 right-0 absolute">
<%= render 'shared/clipboard_copy', icon: 'copy', text:, class: 'btn btn-ghost text-white', icon_class: 'w-6 h-6 text-white', copy_title: 'Copy', copied_title: 'Copied' %>
<%= render 'shared/clipboard_copy', icon: 'copy', text:, class: 'btn btn-ghost text-white', icon_class: 'w-6 h-6 text-white', copy_title: t('general_copy'), copied_title: t('general_copied') %>
</span>
<pre data-prefix="$"><code class="overflow-hidden w-full"><%= text %></code></pre>
</div>
@ -74,7 +74,7 @@
"emails": "<%= current_user.email.sub('@', '+test@') %>, <%= current_user.email.sub('@', '+test2@') %>"
}'<% end.to_str %>
<span class="top-0 right-0 absolute">
<%= render 'shared/clipboard_copy', icon: 'copy', text:, class: 'btn btn-ghost text-white', icon_class: 'w-6 h-6 text-white', copy_title: 'Copy', copied_title: 'Copied' %>
<%= render 'shared/clipboard_copy', icon: 'copy', text:, class: 'btn btn-ghost text-white', icon_class: 'w-6 h-6 text-white', copy_title: t('general_copy'), copied_title: t('general_copied') %>
</span>
<pre data-prefix="$"><code class="overflow-hidden w-full"><%= text %></code></pre>
</div>
@ -96,7 +96,7 @@
<% text = capture do %>curl '<%= api_template_url(current_account.templates&.last || 1) %>' \
--header 'X-Auth-Token: <%= current_user.access_token.token %>'<% end.to_str %>
<span class="top-0 right-0 absolute">
<%= render 'shared/clipboard_copy', icon: 'copy', text:, class: 'btn btn-ghost text-white', icon_class: 'w-6 h-6 text-white', copy_title: 'Copy', copied_title: 'Copied' %>
<%= render 'shared/clipboard_copy', icon: 'copy', text:, class: 'btn btn-ghost text-white', icon_class: 'w-6 h-6 text-white', copy_title: t('general_copy'), copied_title: t('general_copied') %>
</span>
<pre data-prefix="$"><code class="overflow-hidden w-full"><%= text %></code></pre>
</div>

@ -4,7 +4,7 @@
<%= svg_icon('layout_grid', class: 'w-6 h-6 stroke-2') %>
</button>
</toggle-cookies>
<toggle-cookies data-value="submissions" data-key="dashboard_view" class="sm:tooltip tooltip-top" data-tip="Submissions">
<toggle-cookies data-value="submissions" data-key="dashboard_view" class="sm:tooltip tooltip-top" data-tip="<%= t('submissions') %>">
<button class="<%= local_assigns[:selected] == 'submissions' ? 'btn btn-neutral !rounded-lg btn-square !p-0 hover:text-neutral-300 !btn-sm !h-8 !w-9' : 'btn !border !rounded-lg btn-square !p-0 !btn-sm !h-8 !w-9 disabled:btn-neutral' %>">
<%= svg_icon('layout_list', class: 'w-6 h-6 stroke-2') %>
</button>

@ -4,7 +4,7 @@
<span class="peer-checked:hidden flex items-center space-x-2">
<%= svg_icon(local_assigns[:icon] || 'link', class: local_assigns[:icon_class] || 'w-6 h-6 text-white') %>
<span class="hidden md:inline">
<%= local_assigns[:copy_title] || 'Copy' %>
<%= local_assigns[:copy_title] || t('general_copy') %>
</span>
<% if local_assigns[:copy_title_md] %>
<span class="inline md:hidden">
@ -15,7 +15,7 @@
<span class="hidden peer-checked:flex items-center space-x-2">
<%= svg_icon(local_assigns[:copied_icon] || 'clipboard_copy', class: local_assigns[:icon_class] || 'w-6 h-6 text-white') %>
<span class="hidden md:inline">
<%= local_assigns[:copied_title] || 'Copied' %>
<%= local_assigns[:copied_title] || t('general_copied') %>
</span>
<% if local_assigns[:copied_title_md] %>
<span class="inline md:hidden">

@ -2,7 +2,7 @@
<menu-active>
<ul class="menu px-0">
<li class="menu-title py-0 !bg-transparent mb-3 -mt-5"><a href="<%= '/' %>" class="!bg-transparent !text-neutral font-medium">&larr; Back</a></li>
<li class="menu-title py-0 !bg-transparent"><span class="!bg-transparent">Settings</span></li>
<li class="menu-title py-0 !bg-transparent"><span class="!bg-transparent"><%= t('settings') %></span></li>
<li></li>
<li>
<%= link_to 'Profile', settings_profile_index_path, class: 'text-base hover:bg-base-300' %>

@ -37,7 +37,7 @@
<% if params[:selfsign].blank? %>
<a href="#" class="btn btn-primary btn-sm w-full flex items-center justify-center" data-action="click:dynamic-list#addItem">
<%= svg_icon('user_plus', class: 'w-4 h-4 stroke-2') %>
<span>Add New</span>
<span><%= t('general_add')+' '+t('general_new') %></span>
</a>
<% end %>
</dynamic-list>
@ -47,6 +47,6 @@
<%= render 'send_sms', f: %>
</div>
<div class="form-control">
<%= f.button button_title(title: 'Add Recipients'), class: 'base-button' %>
<%= f.button button_title(title: t('submissions_add_recipients')), class: 'base-button' %>
</div>
<% end %>

@ -4,7 +4,7 @@
<emails-textarea data-bulk-enabled="<%= Docuseal.demo? || !Docuseal.multitenant? || can?(:manage, :bulk_send) %>" data-limit="<%= Docuseal.multitenant? ? (can?(:manage, :bulk_send) ? 40 : 1) : nil %>">
<submitters-autocomplete data-field="email" class="block relative">
<autoresize-textarea>
<%= f.text_area :emails, required: true, class: 'base-textarea w-full', placeholder: 'Type emails here...' %>
<%= f.text_area :emails, required: true, class: 'base-textarea w-full', placeholder: t('submissions_type_emails')+'...' %>
</autoresize-textarea>
</submitters-autocomplete>
</emails-textarea>
@ -38,7 +38,7 @@
<% if params[:selfsign].blank? %>
<a href="#" class="btn btn-primary btn-sm w-full flex items-center justify-center" data-action="click:dynamic-list#addItem">
<%= svg_icon('user_plus', class: 'w-4 h-4 stroke-2') %>
<span>Add New</span>
<span><%= t('submissions_add_new') %></span>
</a>
<% end %>
</dynamic-list>
@ -49,7 +49,7 @@
</div>
<div class="form-control">
<%= content_for(:submit_button) || capture do %>
<%= f.button button_title(title: 'Add Recipients'), class: 'base-button' %>
<%= f.button button_title(title: t('submissions_add_recipients')), class: 'base-button' %>
<% end %>
</div>
<% end %>

@ -43,7 +43,7 @@
<% if params[:selfsign].blank? %>
<a href="#" class="btn btn-primary btn-sm w-full flex items-center justify-center" data-action="click:dynamic-list#addItem">
<%= svg_icon('user_plus', class: 'w-4 h-4 stroke-2') %>
<span>Add New</span>
<span><%= t('general_add')+' '+t('general_new') %></span>
</a>
<% end %>
</dynamic-list>
@ -52,6 +52,6 @@
<%= render 'send_sms', f: %>
</div>
<div class="form-control">
<%= f.button button_title(title: 'Add Recipients'), class: 'base-button' %>
<%= f.button button_title(title: t('general_add')+' '+t('recipients')), class: 'base-button' %>
</div>
<% end %>

@ -3,13 +3,13 @@
<div class="flex justify-between items-center">
<%= f.label :send_email, for: uuid = SecureRandom.uuid, class: 'flex items-center cursor-pointer' do %>
<%= f.check_box :send_email, id: uuid, class: 'base-checkbox', disabled: !can_send_emails, checked: can_send_emails %>
<span class="label">Send emails</span>
<span class="label"><%= t('submissions_send_emails') %></span>
<% end %>
<div>
<% if can_send_emails %>
<label>
<%= f.check_box :is_custom_message, onchange: "[this.form.querySelector('#message_field').classList.toggle('hidden', !event.currentTarget.checked)]", checked: false, class: 'hidden peer' %>
<span class="link peer-checked:hidden">Edit message</span>
<span class="link peer-checked:hidden"><%= t('submissions_edit_message') %></span>
</label>
<% end %>
<%= render 'email_stats' %>

@ -2,8 +2,8 @@
<div class="form-control">
<%= f.label :preserve_order, for: uuid = SecureRandom.uuid, class: 'flex items-center cursor-pointer' do %>
<%= f.check_box :preserve_order, id: uuid, class: 'base-checkbox', checked: template.submissions.last&.submitters_order.in?(['preserved', nil]) %>
<span class="label">Preserve order</span>
<span class="tooltip" data-tip="When checked, notifications will be sent to the second party once the form is completed by the previous party. Uncheck this option to send notifications to all parties simultaneously right away.">
<span class="label"><%= t('submissions_preserve_order') %></span>
<span class="tooltip" data-tip="<%= t('submissions_preserve_order_hint') %>">
<%= svg_icon('info_circle', class: 'w-4 h-4') %>
</span>
<% end %>

@ -55,7 +55,7 @@
<% end %>
</div>
<% elsif @submission.submitters.to_a.size == 1 && !@submission.expired? && !@submission.submitters.to_a.first.declined_at? %>
<%= render 'shared/clipboard_copy', text: submit_form_url(slug: @submission.submitters.to_a.first.slug), class: 'base-button', icon_class: 'w-6 h-6 text-white', copy_title: 'Copy Share Link', copied_title: 'Copied to Clipboard' %>
<%= render 'shared/clipboard_copy', text: submit_form_url(slug: @submission.submitters.to_a.first.slug), class: 'base-button', icon_class: 'w-6 h-6 text-white', copy_title: t('copy_share_link'), copied_title: t('copied_to_clipboard') %>
<% end %>
</div>
</div>
@ -146,7 +146,7 @@
<% if submitter&.declined_at? %>
Declined on <%= l(submitter.declined_at.in_time_zone(@submission.account.timezone), format: :short, locale: @submission.account.locale) %>
<% else %>
<%= submitter&.completed_at? ? l(submitter.completed_at.in_time_zone(@submission.account.timezone), format: :long, locale: @submission.account.locale) : 'Not completed yet' %>
<%= submitter&.completed_at? ? l(submitter.completed_at.in_time_zone(@submission.account.timezone), format: :long, locale: @submission.account.locale) : t('submissions_not_completed_yet') %>
<% end %>
</span>
</div>
@ -160,7 +160,7 @@
<% end %>
<% if signed_in? && submitter && submitter.email && !submitter.completed_at && !@submission.archived_at? && can?(:update, submitter) && Accounts.can_send_emails?(current_account) && !@submission.expired? && !submitter.declined_at? %>
<div class="mt-2 mb-1">
<%= button_to button_title(title: submitter.sent_at? ? 'Re-send Email' : 'Send Email', disabled_with: 'Sending'), submitter_send_email_index_path(submitter_slug: submitter.slug), class: 'btn btn-sm btn-primary w-full' %>
<%= button_to button_title(title: submitter.sent_at? ? 'Re-send Email' : t('submissions_send_email'), disabled_with: 'Sending'), submitter_send_email_index_path(submitter_slug: submitter.slug), class: 'btn btn-sm btn-primary w-full' %>
</div>
<% end %>
<% if signed_in? && submitter && submitter.phone && !submitter.completed_at && !@submission.archived_at? && can?(:update, submitter) && !@submission.expired? && !submitter.declined_at? %>
@ -169,7 +169,7 @@
<% if signed_in? && submitter && !submitter.completed_at? && !@submission.archived_at? && can?(:create, submitter) && !@submission.expired? && !submitter.declined_at? %>
<div class="mt-2 mb-1">
<a class="btn btn-sm btn-primary w-full" target="_blank" href="<%= submit_form_path(slug: submitter.slug) %>">
Sign In-person
<%= t('submissions_sign_in_person') %>
</a>
</div>
<% end %>

@ -6,7 +6,7 @@
</div>
<div class="flex justify-between mb-4 items-center">
<div>
<h1 class="text-4xl font-bold md:block <%= 'hidden' if params[:q].present? %>">Submissions <span class="badge badge-outline badge-lg align-middle">Archived</span></h1>
<h1 class="text-4xl font-bold md:block <%= 'hidden' if params[:q].present? %>"><%= I18n.t('submissions') %> <span class="badge badge-outline badge-lg align-middle"><%= I18n.t('general_archive') %></span></h1>
</div>
<% if params[:q].present? || @pagy.pages > 1 %>
<%= render 'shared/search_input', placeholder: 'Search...' %>

@ -5,7 +5,9 @@
<div class="mr-2">
<%= render 'dashboard/toggle_view', selected: 'submissions' %>
</div>
<h1 class="text-2xl md:text-3xl sm:text-4xl font-bold md:block <%= 'hidden' if params[:q].present? %>">Submissions</h1>
<h1 class="text-2xl md:text-3xl sm:text-4xl font-bold md:block <%= 'hidden' if params[:q].present? %>">
<%= I18n.t('submissions') %>
</h1>
</div>
<div class="flex space-x-2">
<% if params[:q].present? || @pagy.pages > 1 %>
@ -17,7 +19,7 @@
</span>
<%= link_to new_template_path, class: 'white-button !border gap-2', data: { turbo_frame: :modal } do %>
<%= svg_icon('plus', class: 'w-6 h-6 stroke-2') %>
<span class="hidden md:block">Create</span>
<span class="hidden md:block"><%= I18n.t('general_create') %></span>
<% end %>
<% end %>
</div>
@ -25,7 +27,7 @@
<% view_archived_html = capture do %>
<% if current_account.submissions.where.not(archived_at: nil).exists? %>
<div>
<a href="<%= submissions_archived_index_path %>" class="link text-sm">View Archived</a>
<a href="<%= submissions_archived_index_path %>" class="link text-sm"><%= I18n.t('general_view') %> <%= I18n.t('general_archive') %></a>
</div>
<% end %>
<% end %>

@ -1,4 +1,4 @@
<a href="<%= root_path %>" class="mx-auto text-2xl md:text-3xl font-bold items-center flex space-x-3">
<%= render 'shared/logo', class: 'w-9 h-9 md:w-12 md:h-12' %>
<span><%= Docuseal.product_name %></span>
<a href="<%= root_path %>" class="mx-auto text-2xl md:text-3xl font-bold items-center flex space-x-3 my-4">
<%= render 'shared/logo', class: 'w-9 h-9 md:w-12 md:h-12 my-10' %>
<span><%# Docuseal.product_name %></span>
</a>

@ -10,16 +10,16 @@
<%= svg_icon('cloud_upload', class: 'w-10 h-10') %>
</span>
<div class="font-medium mb-1">
Upload New Document
<%= I18n.t('templates_dropzone_upload_new') %>
</div>
<div class="text-xs">
<span class="font-medium">Click to upload</span> or drag and drop
<%= I18n.t('templates_dropzone_drop_message') %>
</div>
</span>
<span data-target="file-dropzone.loading" class="flex flex-col items-center hidden">
<%= svg_icon('loader', class: 'w-10 h-10 animate-spin') %>
<div class="font-medium mb-1">
Uploading...
<%= I18n.t('templates_dropzone_uploading') %>
</div>
</span>
</div>

@ -1,4 +1,4 @@
<% status_badges = { 'awaiting' => 'badge-info', 'sent' => 'badge-info', 'completed' => 'badge-success', 'opened' => 'badge-warning', 'declined' => 'badge-error' } %>
<% status_badges = { 'espera' => 'badge-info', 'enviado' => 'badge-info', 'completo' => 'badge-success', 'aberto' => 'badge-warning', 'declinado' => 'badge-error' } %>
<div class="bg-base-200 rounded-2xl flex flex-col sm:flex-row items-strech">
<% if local_assigns[:with_template] %>
<% template = submission.template %>
@ -75,27 +75,27 @@
<button onclick="event.stopPropagation()" class="btn btn-sm btn-neutral btn-outline bg-white w-full md:w-36 flex">
<span class="flex items-center justify-center space-x-1 md:space-x-2">
<%= svg_icon('writing_sign', class: 'w-4 h-4 stroke-2') %>
<span class="inline shrink-0">Sign now</span>
<span class="inline shrink-0"><%= I18n.t('submissions_sign_now') %></span>
</span>
</button>
</form>
<% else %>
<div class="flex-1 md:flex-none">
<%= render 'shared/clipboard_copy', text: submit_form_url(slug: submitter.slug), class: 'btn btn-sm btn-neutral text-white md:w-36 flex', icon_class: 'w-6 h-6 text-white', copy_title: 'Copy Link', copy_title_md: 'Copy', copied_title_md: 'Copied' %>
<%= render 'shared/clipboard_copy', text: submit_form_url(slug: submitter.slug), class: 'btn btn-sm btn-neutral text-white md:w-36 flex', icon_class: 'w-6 h-6 text-white', copy_title: I18n.t('general_copy')+' Link', copy_title_md: I18n.t('general_copy')+' Link', copied_title_md: I18n.t('general_copied') %>
</div>
<% end %>
<% end %>
<div class="flex-1 md:flex-none">
<span class="btn btn-outline btn-sm w-full md:w-24">View</span>
<span class="btn btn-outline btn-sm w-full md:w-24"><%= I18n.t('general_view') %></span>
</div>
<% if !submission.archived_at? && !template.archived_at? && can?(:destroy, submission) %>
<span data-tip="Archive" class="sm:tooltip tooltip-top">
<%= button_to button_title(title: nil, disabled_with: 'Arch', icon: svg_icon('archive', class: 'w-6 h-6')), submission_path(submission), class: 'btn btn-outline btn-sm w-full md:w-fit', form: { class: 'flex' }, title: 'Archive', method: :delete, onclick: 'event.stopPropagation()' %>
<span data-tip="<%= I18n.t('general_archive') %>" class="sm:tooltip tooltip-top">
<%= button_to button_title(title: nil, disabled_with: 'Arch', icon: svg_icon('archive', class: 'w-6 h-6')), submission_path(submission), class: 'btn btn-outline btn-sm w-full md:w-fit', form: { class: 'flex' }, title: I18n.t('general_archive'), method: :delete, onclick: 'event.stopPropagation()' %>
</span>
<% end %>
<% if local_assigns[:archived] && can?(:destroy, submission) %>
<span data-tip="Remove" class="sm:tooltip tooltip-top">
<%= button_to button_title(title: nil, disabled_with: 'Rem', icon: svg_icon('trash', class: 'w-6 h-6')), submission_path(submission, permanently: true), class: 'btn btn-outline btn-sm w-full md:w-fit', form: { class: 'flex' }, title: 'Remove', method: :delete, data: { turbo_confirm: 'Submission deletion is irreversible and will permanently remove all associated signed documents with it. Are you sure?' }, onclick: 'event.stopPropagation()' %>
<span data-tip="<%= I18n.t('general_remove') %>" class="sm:tooltip tooltip-top">
<%= button_to button_title(title: nil, disabled_with: 'Rem', icon: svg_icon('trash', class: 'w-6 h-6')), submission_path(submission, permanently: true), class: 'btn btn-outline btn-sm w-full md:w-fit', form: { class: 'flex' }, title: I18n.t('general_remove'), method: :delete, data: { turbo_confirm: 'Submission deletion is irreversible and will permanently remove all associated signed documents with it. Are you sure?' }, onclick: 'event.stopPropagation()' %>
</span>
<% end %>
</div>
@ -153,12 +153,12 @@
<button onclick="event.stopPropagation()" class="absolute md:relative top-0 right-0 btn btn-xs btn-outline btn-neutral bg-white w-28 md:w-36">
<span class="flex items-center justify-center space-x-1 md:space-x-2">
<%= svg_icon('writing_sign', class: 'w-4 h-4 stroke-2') %>
<span class="inline shrink-0">Sign now</span>
<span class="inline shrink-0"><%= I18n.t('submissions_sign_now') %></span>
</span>
</button>
</form>
<% else %>
<%= render 'shared/clipboard_copy', text: submit_form_url(slug: submitter.slug), class: 'absolute md:relative top-0 right-0 btn btn-xs text-xs btn-neutral text-white w-28 md:w-36 flex', icon_class: 'w-4 h-4 text-white', copy_title: 'Copy Link', copy_title_md: 'Copy Link', copied_title_md: 'Copied' %>
<%= render 'shared/clipboard_copy', text: submit_form_url(slug: submitter.slug), class: 'absolute md:relative top-0 right-0 btn btn-xs text-xs btn-neutral text-white w-28 md:w-36 flex', icon_class: 'w-4 h-4 text-white', copy_title: I18n.t('general_copy')+' Link', copy_title_md: I18n.t('general_copy')+' Link', copied_title_md: I18n.t('general_copied') %>
<% end %>
</div>
<% end %>
@ -180,7 +180,7 @@
</span>
<span class="flex items-center justify-center space-x-1 md:space-x-2 hidden" data-target="download-button.loadingButton">
<%= svg_icon('loader', class: 'w-5 h-5 animate-spin') %>
<span class="inline">Downloa...</span>
<span class="inline">Downloading...</span>
</span>
</download-button>
</button>
@ -188,16 +188,16 @@
</div>
<% end %>
<div class="flex-1 md:flex-none">
<span class="btn btn-outline btn-sm w-full md:w-24">View</span>
<span class="btn btn-outline btn-sm w-full md:w-24"><%= I18n.t('general_view') %></span>
</div>
<% if !submission.archived_at? && !template.archived_at? %>
<span data-tip="Archive" class="sm:tooltip tooltip-top">
<%= button_to button_title(title: nil, disabled_with: 'Arch', icon: svg_icon('archive', class: 'w-6 h-6')), submission_path(submission), class: 'btn btn-outline btn-sm w-full md:w-fit', form: { class: 'flex' }, title: 'Archive', method: :delete, onclick: 'event.stopPropagation()' %>
<span data-tip="<%= I18n.t('general_archive') %>" class="sm:tooltip tooltip-top">
<%= button_to button_title(title: nil, disabled_with: 'Arch', icon: svg_icon('archive', class: 'w-6 h-6')), submission_path(submission), class: 'btn btn-outline btn-sm w-full md:w-fit', form: { class: 'flex' }, title: I18n.t('general_archive'), method: :delete, onclick: 'event.stopPropagation()' %>
</span>
<% end %>
<% if local_assigns[:archived] && can?(:destroy, submission) %>
<span data-tip="Remove" class="sm:tooltip tooltip-top">
<%= button_to button_title(title: nil, disabled_with: 'Rem', icon: svg_icon('trash', class: 'w-6 h-6')), submission_path(submission, permanently: true), class: 'btn btn-outline btn-sm w-full md:w-fit', form: { class: 'flex' }, title: 'Remove', method: :delete, data: { turbo_confirm: 'Submission deletion is irreversible and will permanently remove all associated signed documents with it. Are you sure?' }, onclick: 'event.stopPropagation()' %>
<%= button_to button_title(title: nil, disabled_with: 'Rem', icon: svg_icon('trash', class: 'w-6 h-6')), submission_path(submission, permanently: true), class: 'btn btn-outline btn-sm w-full md:w-fit', form: { class: 'flex' }, title: I18n.t('general_remove'), method: :delete, data: { turbo_confirm: 'Submission deletion is irreversible and will permanently remove all associated signed documents with it. Are you sure?' }, onclick: 'event.stopPropagation()' %>
</span>
<% end %>
</div>

@ -52,13 +52,13 @@
</div>
<div class="flex space-x-2 w-full md:w-fit md:justify-between md:flex-none md:pt-1">
<% if !template.archived_at? && can?(:destroy, template) %>
<%= button_to button_title(title: 'Archive', disabled_with: 'Archiving', title_class: 'inline', icon: svg_icon('archive', class: 'w-6 h-6')), template_path(template), class: 'btn btn-outline btn-sm w-full', form_class: 'flex-1', method: :delete, data: { turbo_confirm: 'Are you sure?' } %>
<%= button_to button_title(title: I18n.t('general_toarchive'), disabled_with: I18n.t('archiving'), title_class: 'inline', icon: svg_icon('archive', class: 'w-6 h-6')), template_path(template), class: 'btn btn-outline btn-sm w-full', form_class: 'flex-1', method: :delete, data: { turbo_confirm: 'Are you sure?' } %>
<% end %>
<% if can?(:create, current_account.templates.new(author: current_user)) %>
<%= link_to new_template_path(base_template_id: template.id), class: 'btn btn-outline btn-sm flex-1', data: { turbo_frame: :modal } do %>
<span class="flex items-center justify-center space-x-2">
<%= svg_icon('copy', class: 'w-6 h-6') %>
<span class="inline">Clone</span>
<span class="inline"><%= I18n.t('general_clone') %></span>
</span>
<% end %>
<% end %>
@ -67,14 +67,14 @@
<%= link_to edit_template_path(template), class: 'btn btn-outline btn-sm flex-1' do %>
<span class="flex items-center justify-center space-x-2">
<%= svg_icon('pencil', class: 'w-6 h-6') %>
<span>Edit</span>
<span><%= I18n.t('general_edit') %></span>
</span>
<% end %>
<% elsif can?(:read, template) && !template.archived_at? %>
<%= link_to template_preview_path(template), class: 'btn btn-outline btn-sm flex-1' do %>
<span class="flex items-center justify-center space-x-2">
<%= svg_icon('file_text', class: 'w-6 h-6') %>
<span>Preview</span>
<span><%= I18n.t('general_preview') %></span>
</span>
<% end %>
<% end %>

@ -1,4 +1,4 @@
<%= render 'shared/turbo_modal', title: @base_template ? 'Clone Template' : 'New Document Template' do %>
<%= render 'shared/turbo_modal', title: @base_template ? t('general_clone')+' Template' : t('general_new')+' '+t('general_document')+' Template' do %>
<%= form_for @template, data: { turbo_frame: :_top }, html: { autocomplete: :off } do |f| %>
<% if @base_template %>
<%= hidden_field_tag :base_template_id, @base_template.id %>
@ -9,7 +9,7 @@
</div>
<% end %>
<div class="form-control mt-6">
<%= f.text_field :name, required: true, placeholder: 'Document Name', class: 'base-input', dir: 'auto' %>
<%= f.text_field :name, required: true, placeholder: t('general_document')+' '+t('general_name'), class: 'base-input', dir: 'auto' %>
</div>
<div class="mt-3 mb-4 flex items-center justify-between">
<a href="#" onclick="[event.preventDefault(), window.folder_name.focus()]">
@ -18,12 +18,12 @@
<folder-autocomplete class="flex justify-between w-full">
<input id="folder_name" placeholder="Folder Name" type="text" class="w-full outline-none border-transparent focus:border-transparent focus:ring-0 bg-base-100 px-1 peer" name="folder_name" value="<%= params[:folder_name].presence || @base_template&.folder&.name || TemplateFolder::DEFAULT_NAME %>" onblur="window.folder_name.value = window.folder_name.value || 'Default'" autocomplete="off">
<a href="#" onclick="[event.preventDefault(), window.folder_name.value = '', window.folder_name.focus()]" class="shrink-0 link peer-focus:hidden mr-1.5">
Change Folder
<%= t('general_change') %> <%= t('folder') %>
</a>
</folder-autocomplete>
</div>
<div class="form-control">
<%= f.button button_title(title: @base_template ? 'Submit' : 'Create', disabled_with: 'Creating'), class: 'base-button' %>
<%= f.button button_title(title: @base_template ? t('general_submit') : t('general_create'), disabled_with: 'Creating'), class: 'base-button' %>
</div>
<% end %>
<% end %>

@ -4,7 +4,7 @@
<div class="<%= is_show_tabs ? 'mb-4' : 'mb-6' %>">
<div class="flex justify-between items-center md:items-end">
<div>
<h2 class="text-3xl font-bold md:block <%= 'hidden' if params[:q].present? %>">Submissions</h2>
<h2 class="text-3xl font-bold md:block <%= 'hidden' if params[:q].present? %>"><%= I18n.t('submissions') %></h2>
</div>
<div class="flex justify-end space-x-2">
<% if params[:q].present? || params[:status].present? || @pagy.pages > 1 %>
@ -12,12 +12,12 @@
<% end %>
<%= link_to new_template_submissions_export_path(@template), class: 'hidden md:flex btn btn-ghost text-base', data: { turbo_frame: 'modal' } do %>
<%= svg_icon('download', class: 'w-6 h-6 stroke-2') %>
<span>Export</span>
<span><%= I18n.t('general_export') %></span>
<% end %>
<% if !@template.archived_at? && can?(:create, Submission) %>
<%= link_to new_template_submission_path(@template), class: 'white-button !border', data: { turbo_frame: 'modal' } do %>
<%= svg_icon('plus', class: 'w-6 h-6 stroke-2') %>
<span>Add <span class="hidden md:inline">Recipients</span></span>
<span><%= I18n.t('general_add') %> <span class="hidden md:inline"><%= I18n.t('recipients') %></span></span>
<% end %>
<% end %>
</div>
@ -63,25 +63,25 @@
<div class="card bg-base-200">
<div class="card-body text-center py-16">
<div class="max-w-lg mx-auto">
<p class="text-3xl font-bold text-base-content mb-4">There are no Submissions</p>
<p class="text-3xl font-bold text-base-content mb-4"><%= I18n.t('submissions_empty') %></p>
<% if @template.archived_at.blank? && params[:q].blank? %>
<p>Send an invitation to fill and complete the form</p>
<p><%= I18n.t('submissions_send_invite') %></p>
<div class="space-y-2 flex flex-col">
<% if can?(:create, Submission) %>
<%= link_to new_template_submission_path(@template, with_link: true), class: 'base-button mt-6', data: { turbo_frame: 'modal' } do %>
<%= svg_icon('plus', class: 'w-6 h-6 stroke-2') %>
<span class="mr-1">Send to Recipients</span>
<span class="mr-1"><%= I18n.t('submissions_send_recipients') %></span>
<% end %>
<% end %>
<% if @template.submitters.size == 1 %>
<%= link_to start_form_url(slug: @template.slug), class: 'white-button mt-6', target: '_blank', rel: 'noopener' do %>
<%= svg_icon('writing', class: 'w-6 h-6') %>
<span class="mr-1">Sign it Yourself</span>
<span class="mr-1"><%= I18n.t('submissions_sign_yourself') %></span>
<% end %>
<% else %>
<%= link_to new_template_submission_path(@template, selfsign: true), class: 'white-button mt-6', data: { turbo_frame: 'modal' } do %>
<%= svg_icon('writing', class: 'w-6 h-6') %>
<span class="mr-1">Sign it Yourself</span>
<span class="mr-1"><%= I18n.t('submissions_sign_yourself') %></span>
<% end %>
<% end %>
<% end %>
@ -93,7 +93,7 @@
<% view_archived_html = capture do %>
<% if @template.submissions.where.not(archived_at: nil).exists? && !@template.archived_at? %>
<div>
<a href="<%= template_archived_index_path(@template) %>" class="link text-sm">View Archived</a>
<a href="<%= template_archived_index_path(@template) %>" class="link text-sm"><%= I18n.t('general_view') %> <%= I18n.t('general_archive') %></a>
</div>
<% end %>
<% end %>

@ -1,7 +1,7 @@
<div>
<%= link_to root_path do %>
&larr;
<span>Back to Active</span>
<span><%= I18n.t('templates_archived_back_to_active') %></span>
<% end %>
</div>
<div class="flex justify-between mb-4 items-center">
@ -19,7 +19,7 @@
<% elsif params[:q].present? %>
<div class="text-center">
<div class="mt-16 text-3xl font-semibold">
Templates not Found
Templates <%= I18n.t('not_found') %>
</div>
</div>
<% end %>

@ -2,18 +2,18 @@
<div>
<%= link_to template_path(@template) do %>
&larr;
<span>Back to Active</span>
<span><%= I18n.t('templates_archived_back_to_active') %></span>
<% end %>
</div>
<div class="flex justify-between mb-6 md:items-end flex-col md:flex-row">
<div>
<h1 class="text-3xl font-bold md:block">Submissions <span class="badge badge-outline badge-lg align-middle">Archived</span></h1>
<h1 class="text-3xl font-bold md:block"><%= I18n.t('submissions') %> <span class="badge badge-outline badge-lg align-middle"><%= I18n.t('general_archive') %></span></h1>
</div>
<div class="flex space-x-2 mt-3 md:mt-0 justify-end">
<%= render 'shared/search_input' %>
<%= link_to new_template_submissions_export_path(@template), class: 'order-3 md:order-1 btn btn-ghost text-base', data: { turbo_frame: 'modal' } do %>
<%= svg_icon('download', class: 'w-6 h-6 stroke-2') %>
<span>Export</span>
<span><%= I18n.t('general_export') %></span>
<% end %>
</div>
</div>
@ -24,7 +24,7 @@
<% elsif params[:q].present? %>
<div class="text-center">
<div class="mt-16 text-3xl font-semibold">
Submissions not Found
<%= I18n.t('submissions') %> <%= I18n.t('not_found') %>
</div>
</div>
<% end %>

@ -7,7 +7,7 @@
<%= render 'dashboard/toggle_view', selected: 'templates' %>
</div>
<% end %>
<h1 class="text-2xl md:text-3xl sm:text-4xl font-bold md:block <%= 'hidden' if params[:q].present? %>"><span class="hidden md:inline">Document</span> Templates</h1>
<h1 class="text-2xl md:text-3xl sm:text-4xl font-bold md:block <%= 'hidden' if params[:q].present? %>"><span class="hidden md:inline"><%=t('general_document')%></span> Templates</h1>
</div>
<div class="flex space-x-2">
<% if params[:q].present? || @pagy.pages > 1 || @template_folders.present? %>
@ -19,7 +19,7 @@
</span>
<%= link_to new_template_path, class: 'white-button !border gap-2', data: { turbo_frame: :modal } do %>
<%= svg_icon('plus', class: 'w-6 h-6 stroke-2') %>
<span class="hidden md:block">Create</span>
<span class="hidden md:block"><%=t('general_create')%></span>
<% end %>
<% end %>
</div>
@ -27,7 +27,7 @@
<% view_archived_html = capture do %>
<% if has_archived %>
<div>
<a href="<%= templates_archived_index_path %>" class="link text-sm">View Archived</a>
<a href="<%= templates_archived_index_path %>" class="link text-sm"><%= I18n.t('general_view') %> <%= I18n.t('general_archive') %></a>
</div>
<% end %>
<% end %>

@ -16,7 +16,7 @@
</form>
<% end %>
<a href="<%= edit_template_path(@template) %>" class="base-button" data-turbo="false" style="flex-shrink: 0; padding: 0px 24px;">
Exit Preview
<%= I18n.t('templates_form_preview_exit') %>
</a>
</div>
</div>

@ -4,7 +4,7 @@
<div>
<%= render 'shared/logo', width: 50, height: 50, class: 'mx-auto animate-bounce' %>
<span>
Processing...
<%= I18n.t('processing') %>...
</span>
</div>
</div>

@ -82,7 +82,7 @@
<% if params[:status] == 'archived' %>
<a href="<%= settings_users_path %>" class="link text-sm">View Active</a>
<% else %>
<a href="<%= settings_archived_users_path %>" class="link text-sm">View Archived</a>
<a href="<%= settings_archived_users_path %>" class="link text-sm"><%= I18n.t('general_view') %> <%= I18n.t('general_archive') %></a>
<% end %>
</div>
<% end %>

@ -1,4 +1,4 @@
en: &en
langs: &langs
language_en: English
language_en-US: English (US)
language_en-GB: English (UK)
@ -18,6 +18,8 @@ en: &en
language_nl: Nederlands
language_ar: العربية
language_ko: 한국어
en: &en
view: View
hi_there: Hi there
email: Email
@ -74,6 +76,65 @@ en: &en
scopes:
write: Update your data
read: Read your data
templates_dropzone_upload_new: Click to upload file
templates_dropzone_drop_message: Click to upload or drop here
templates_dropzone_uploading: Uploading...
templates_archived_back_to_active: Back to active
templates_form_preview_exit: Exit preview
submissions_empty: No submissions yet
submissions_send_invite: Send invite to complete the file
submissions_send_recipients: Send to recipients
submissions_send_emails: Send emails
submissions_sign_yourself: Sign yourself
submissions_type_emails: Type emails here
submissions: Submissions
submissions_sign_now: Sign now
submissions_add_new: Add New
submissions_add_recipient: Add Recipient
submissions_add_recipients: Add Recipients
submissions_not_completed_yet: Not completed yet
submissions_sign_in_person: Sign in person
signed_with: signed with
template: Document
recipient: Recipient
recipients: Recipients
archiving: Archiving
general_name: Name
general_document: Document
general_documents: Documents
general_export: Export
general_new: New
general_add: Add
general_archive: Archive
general_toarchive: Archive
general_archived: Archived
general_edit: Edit
general_view: View
general_create: Create
general_remove: Remove
general_change: Change
general_copy: Copy
general_copied: Copied
general_submit: Submit
general_clone: Clone
copy_share_link: Copy share link
copied_to_clipboard: Copied to Clipboard
processing: Processing
not_found: not found
folder: Folder
first_party: First Party
devise:
sessions:
user:
signed_in: Signed in
signed_out: Signed out
failure:
user:
invalid: Invalid user
settings: Settings
submissions_preserve_order: Preserve Order
submissions_preserve_order_hint: When checked, notifications will be sent to the second party once the form is completed by the previous party. Uncheck this option to send notifications to all parties simultaneously right away.
submissions_edit_message: Edit Message
es: &es
view: Vista
@ -241,7 +302,7 @@ fr: &fr
pt: &pt
view: Visualizar
hi_there: Olá,
download: Baixar
download: Descarregar
decline: Recusar
declined: Recusado
decline_reason: Motivo da recusa
@ -268,12 +329,12 @@ pt: &pt
sending: Enviando
resubmit: Reenviar
or: ou
download_documents: Baixar documentos
downloading: Baixando
download_documents: Descarregar documentos
downloading: A Descarregar
completed_successfully: Concluído com sucesso
password: Senha
sign_in: Entrar
signing_in: Entrando
signing_in: A Entrar
sign_in_with_microsoft: Entrar com Microsoft
sign_in_with_google: Entrar com Google
forgot_your_password_: Esqueceu sua senha?
@ -283,13 +344,80 @@ pt: &pt
last_name: Sobrenome
company_name_optional: Nome da empresa (opcional)
sign_up: Inscrever-se
signing_up: Inscrevendo-se
signing_up: A Inscrevenr-se
profile_details: Detalhes do perfil
create_free_account: Criar conta gratuita
sign_up_with_google: Inscrever-se com Google
sign_up_with_microsoft: Inscrever-se com Microsoft
by_creating_an_account_you_agree_to_our_html: 'Ao criar uma conta, você concorda com nossa <a target="_blank" href="https://www.docuseal.co/privacy">Política de Privacidade</a> e <a target="_blank" href="https://www.docuseal.co/terms">Termos de Serviço</a>.'
by_creating_an_account_you_agree_to_our_html: 'Ao criar uma conta, você concorda com nossa <a target="_blank" href="https://www.sigma9.pt/privacy">Política de Privacidade</a> e <a target="_blank" href="https://www.sigma9.pt/terms">Termos de Serviço</a>.'
enter_email_to_continue: Insira o e-mail para continuar
templates_dropzone_upload_new: Clique para inserir ficheiro
templates_dropzone_drop_message: Clique para inserir ou deixe cair aqui
templates_dropzone_uploading: A Carregar...
templates_archived_back_to_active: Voltar aos activos
templates_form_preview_exit: Sair do preview
submissions_empty: Não há submissões ainda
submissions_send_invite: Enviar convite para completar o ficheiro
submissions_send_recipients: Enviar aos recipientes
submissions_send_emails: Enviar emails
submissions_send_invite: Enviar convite para completar o ficheiro
submissions_send_recipients: Enviar aos recipientes
submissions_send_emails: Enviar emails
submissions_sign_yourself: Assine você mesmo
submissions_type_emails: Escrever emails aqui
submissions_type_emails: Escrever emails aqui
submissions: Submissões
submissions_sign_now: Assinar agora
submissions_add_new: Adicionar Novo
submissions_add_recipient: Adicionar Recipiente
submissions_add_recipients: Adicionar Recipientes
submissions_not_completed_yet: Não finalizado ainda
submissions_sign_in_person: Assinar pessoalmente
submissions_preserve_order: Preservar Ordem
submissions_preserve_order_hint: Quando verificada, as notificações serão enviadas à segunda parte assim que o formulário for preenchido pela parte anterior. Desmarque esta opção para enviar notificações a todas as partes simultaneamente imediatamente.
submissions_edit_message: Editar mensagem
signed_with: assinados com
template: Documento
recipient: Recipiente
recipients: Recipientes
archiving: A Arquivar
general_name: Nome
general_document: Documento
general_documents: Documentos
general_export: Exportar
general_new: Novo
general_add: Adicionar
general_archive: Arquivo
general_toarchive: Arquivar
general_archived: Arquivado
general_edit: Editar
general_view: Ver
general_create: Criar
general_remove: Remover
general_change: Mudar
general_copy: Copiar
general_copied: Copiado
general_submit: Submeter
general_submit: Submeter
general_clone: Clonar
copy_share_link: Copiar o link de partilha
copied_to_clipboard: Copiado para o Clipboard
processing: A processar
not_found: não encontrados
folder: Pasta
first_party: Primeira Parte
devise:
sessions:
user:
signed_in: Iniciou a sessão
signed_out: Fechou a sessão
failure:
user:
invalid: Utilizador inválido
settings: Configurar
submission_has_been_removed: Submissão foi removida
submission_has_been_archived: Submissão foi arquivada
submission_has_been_unarchived: Submissão foi desarquivada
de: &de
view: Ansicht
@ -720,27 +848,34 @@ ko:
en-US:
<<: *en
<<: *langs
date:
formats:
default: "%m/%d/%Y"
en-GB:
<<: *en
<<: *langs
date:
formats:
default: "%d/%m/%Y"
es-ES:
<<: *es
<<: *langs
fr-FR:
<<: *fr
<<: *langs
pt-PT:
<<: *pt
<<: *langs
de-DE:
<<: *de
<<: *langs
it-IT:
<<: *it
<<: *langs

Loading…
Cancel
Save