Files
rickyandClaude Opus 5.5 89ed0a76f9 Move all user-facing text into config/locales/en.yml for localization
- Views use lazy t(".key") lookups; sentences with values or links stay
  whole (interpolation, _html keys); counts use one/other plurals
- Stored-value labels (statuses, types, priorities...) are LabelSets read
  from labels: in the current locale; field names and validation messages
  under activerecord:; flash and activity text under flash:
- Services, models, helpers, mailer subjects, the logbook PDF, procedures
  templates, records package README and transcription warnings localized;
  the PDF reuses LogbookEntry#certification_statement instead of a copy
- Scripts read js: strings from a JSON tag via app/javascript/i18n.js
- Dates through I18n.l (app, weekday, month_year, long formats); html lang
  follows the locale
- APP_LOCALE picks the language (falls back to English); missing
  translations raise in development and tests
- README: Translating section and APP_LOCALE

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-13 22:08:20 -05:00

15 lines
1.4 KiB
ERB

<%# The signature block on an entry's page. %>
<% sig = entry.signature %>
<% box, title = { valid: [ "bg-emerald-50 ring-emerald-200", "text-emerald-900" ], superseded: [ "bg-amber-50 ring-amber-200", "text-amber-900" ],
altered: [ "bg-red-50 ring-red-200", "text-red-900" ] }.fetch(sig.imported? ? :valid : sig.status) %>
<div class="rounded-md p-3 text-sm ring-1 <%= box %>">
<div class="font-medium <%= title %>"><%= EntrySignature.label %> <%= sig.signer_name %>, <%= sig.certificate_label %> <%= sig.certificate_number %></div>
<div class="text-slate-700"><%= t(".signed_electronically_html", d: (sig.signed_at.utc.strftime("%Y-%m-%d %H:%M UTC")), auth_method: (" (#{EntrySignature::AUTH_METHODS[sig.auth_method]})" if EntrySignature::AUTH_METHODS[sig.auth_method])) %></div>
<div class="mt-1 italic text-slate-700">“<%= sig.statement %>”</div>
<div class="mt-1 text-xs text-slate-500">
<%= t(".status_html", status_label: (sig.imported? ? t(".signed_on_imported", origin: sig.origin) : sig.status_label)) %>
<%= t(".fingerprint") %> <span class="font-mono"><%= sig.content_digest.first(16) %>…</span>
<% if entry.superseded_by %> <%= t(".corrected_by_html", link: (link_to t(".the_entry", date: fmt_date(entry.superseded_by.date)), aircraft_logbook_entry_path(entry.aircraft, entry.superseded_by), class: "link")) %><% end %>
</div>
</div>