add stamp translations
This commit is contained in:
@@ -22,7 +22,7 @@ module DocuSeal
|
|||||||
|
|
||||||
config.active_storage.routes_prefix = ''
|
config.active_storage.routes_prefix = ''
|
||||||
|
|
||||||
config.i18n.available_locales = %i[en en-US en-GB es-ES fr-FR pt-PT de-DE]
|
config.i18n.available_locales = %i[en en-US en-GB es-ES fr-FR pt-PT de-DE pt]
|
||||||
config.i18n.fallbacks = [:en]
|
config.i18n.fallbacks = [:en]
|
||||||
|
|
||||||
config.exceptions_app = ->(env) { ErrorsController.action(:show).call(env) }
|
config.exceptions_app = ->(env) { ErrorsController.action(:show).call(env) }
|
||||||
|
|||||||
@@ -1,9 +1,29 @@
|
|||||||
en-US:
|
en-US:
|
||||||
|
digitally_signed_by: Digitally signed by
|
||||||
|
role: Role
|
||||||
date:
|
date:
|
||||||
formats:
|
formats:
|
||||||
default: "%m/%d/%Y"
|
default: "%m/%d/%Y"
|
||||||
|
|
||||||
en-GB:
|
en-GB:
|
||||||
|
digitally_signed_by: Digitally signed by
|
||||||
|
role: Role
|
||||||
date:
|
date:
|
||||||
formats:
|
formats:
|
||||||
default: "%d/%m/%Y"
|
default: "%d/%m/%Y"
|
||||||
|
|
||||||
|
es-ES:
|
||||||
|
digitally_signed_by: Firmado digitalmente por
|
||||||
|
role: Rol
|
||||||
|
|
||||||
|
fr-FR:
|
||||||
|
digitally_signed_by: Signé numériquement par
|
||||||
|
role: Rôle
|
||||||
|
|
||||||
|
pt-PT:
|
||||||
|
digitally_signed_by: Assinado digitalmente por
|
||||||
|
role: Função
|
||||||
|
|
||||||
|
de-DE:
|
||||||
|
digitally_signed_by: Digital signiert von
|
||||||
|
role: Rolle
|
||||||
|
|||||||
@@ -55,7 +55,6 @@ module Submitters
|
|||||||
x: (WIDTH - text_layer.width) / 2,
|
x: (WIDTH - text_layer.width) / 2,
|
||||||
y: (HEIGHT - text_layer.height) / 2)
|
y: (HEIGHT - text_layer.height) / 2)
|
||||||
end
|
end
|
||||||
# rubocop:enable Metrics
|
|
||||||
|
|
||||||
def build_text_image(submitter)
|
def build_text_image(submitter)
|
||||||
time = I18n.l(submitter.completed_at.in_time_zone(submitter.account.timezone), format: :long,
|
time = I18n.l(submitter.completed_at.in_time_zone(submitter.account.timezone), format: :long,
|
||||||
@@ -72,15 +71,18 @@ module Submitters
|
|||||||
role = if submitter.submission.template_submitters.size > 1
|
role = if submitter.submission.template_submitters.size > 1
|
||||||
item = submitter.submission.template_submitters.find { |e| e['uuid'] == submitter.uuid }
|
item = submitter.submission.template_submitters.find { |e| e['uuid'] == submitter.uuid }
|
||||||
|
|
||||||
"Role: #{item['name']}\n"
|
"#{I18n.t(:role, locale: submitter.account.locale)}: #{item['name']}\n"
|
||||||
else
|
else
|
||||||
''
|
''
|
||||||
end
|
end
|
||||||
|
|
||||||
text = %(<span size="90">Digitally signed by: <b>#{name}</b>\n#{role}#{time} #{timezone}</span>)
|
digitally_signed_by = I18n.t(:digitally_signed_by, locale: submitter.account.locale)
|
||||||
|
|
||||||
|
text = %(<span size="90">#{digitally_signed_by}: <b>#{name}</b>\n#{role}#{time} #{timezone}</span>)
|
||||||
|
|
||||||
Vips::Image.text(text, width: WIDTH, height: HEIGHT)
|
Vips::Image.text(text, width: WIDTH, height: HEIGHT)
|
||||||
end
|
end
|
||||||
|
# rubocop:enable Metrics
|
||||||
|
|
||||||
def load_logo(_submitter)
|
def load_logo(_submitter)
|
||||||
PdfIcons.logo_io
|
PdfIcons.logo_io
|
||||||
|
|||||||
Reference in New Issue
Block a user