mirror of
https://github.com/rickbarrette/simple-aircraft-manager-rails.git
synced 2026-11-17 15:50:36 -05:00
- 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>
20 lines
2.3 KiB
ERB
20 lines
2.3 KiB
ERB
<%# Everything a signature covers, as the signer reviews it (AC 120-78B 2.2.4). %>
|
|
<dl class="grid gap-x-4 gap-y-1 text-sm sm:grid-cols-[10rem_1fr]">
|
|
<dt class="text-slate-500"><%= t(".aircraft") %></dt><dd><%= entry.aircraft.tail_number %> <%= [ entry.aircraft.make, entry.aircraft.model ].compact_blank.join(" ") %><%= " · S/N #{entry.aircraft.serial_number}" if entry.aircraft.serial_number.present? %></dd>
|
|
<dt class="text-slate-500"><%= t(".date") %></dt><dd><%= fmt_date(entry.date) %></dd>
|
|
<dt class="text-slate-500"><%= t(".logbook") %></dt><dd><%= LogbookEntry::LOG_TYPES[entry.log_type] %> · <%= LogbookEntry::ENTRY_TYPES[entry.entry_type] %></dd>
|
|
<dt class="text-slate-500"><%= t(".airframe_total_time") %></dt><dd><%= hours(entry.aircraft_hours_at_entry) %> (<%= entry.aircraft.time_basis %>)</dd>
|
|
<% if (c = entry.component) %>
|
|
<dt class="text-slate-500"><%= c.component_type&.name %></dt>
|
|
<dd><%= t(".total_html", manufacturer: c.manufacturer, model: c.model, present: (" · S/N #{c.serial_number}" if c.serial_number.present?), component_hours_at_entry: (hours(entry.component_hours_at_entry)), component_since_overhaul_at_entry: (hours(entry.component_since_overhaul_at_entry)), since_overhaul_abbreviation: c.since_overhaul_abbreviation) %></dd>
|
|
<% end %>
|
|
<% entry.parts.each do |part| %>
|
|
<dt class="text-slate-500"><%= part.component.component_type&.name %></dt>
|
|
<dd><%= t(".total_2_html", manufacturer: part.component.manufacturer, model: part.component.model, present: (" · S/N #{part.component.serial_number}" if part.component.serial_number.present?), hours_at_entry: (hours(part.hours_at_entry)), since_overhaul_at_entry: (hours(part.since_overhaul_at_entry)), since_overhaul_abbreviation: part.component.since_overhaul_abbreviation.downcase) %></dd>
|
|
<% end %>
|
|
<% if entry.inspection_result %><dt class="text-slate-500"><%= t(".result") %></dt><dd><%= entry.inspection_result_label %></dd><% end %>
|
|
<% if entry.signoff_location.present? %><dt class="text-slate-500"><%= t(".location") %></dt><dd><%= entry.signoff_location %></dd><% end %>
|
|
<% if entry.supersedes %><dt class="text-slate-500"><%= t(".corrects") %></dt><dd><%= t(".the_entry_html", date: (fmt_date(entry.supersedes.date))) %></dd><% end %>
|
|
</dl>
|
|
<div class="mt-3 whitespace-pre-wrap rounded bg-slate-50 p-3 font-mono text-sm"><%= entry.text %></div>
|