mirror of
https://github.com/rickbarrette/simple-aircraft-manager-rails.git
synced 2026-11-17 23: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>
28 lines
1.5 KiB
ERB
28 lines
1.5 KiB
ERB
<% content_for :title, t(".major_records", tail_number: @aircraft.tail_number) %>
|
|
<%= render "shared/aircraft_header", aircraft: @aircraft %>
|
|
<section class="card">
|
|
<div class="card-header"><h2 class="card-title"><%= t(".major_repairs_alterations") %></h2>
|
|
<% if owner? %><div class="flex gap-2">
|
|
<%= link_to t(".repair"), new_aircraft_major_record_path(@aircraft, type: "repair"), class: "btn-secondary" %>
|
|
<%= link_to t(".alteration"), new_aircraft_major_record_path(@aircraft, type: "alteration"), class: "btn-primary" %></div><% end %></div>
|
|
<% if @records.any? %>
|
|
<table class="table">
|
|
<thead><tr><th><%= t(".date") %></th><th><%= t(".type") %></th><th><%= t(".title") %></th><th><%= t(".performed_by") %></th><th><%= t(".stc") %></th><th><%= t(".ica") %></th></tr></thead>
|
|
<tbody>
|
|
<% @records.each do |r| %>
|
|
<tr>
|
|
<td class="whitespace-nowrap"><%= fmt_date(r.date_performed) %></td>
|
|
<td><%= tag.span r.type_label, class: r.record_type == "repair" ? "badge-orange" : "badge-blue" %></td>
|
|
<td><%= link_to r.title, aircraft_major_record_path(@aircraft, r), class: "link" %><%= tag.div(r.component, class: "text-xs text-slate-500") if r.component %></td>
|
|
<td class="text-xs"><%= r.performed_by %></td>
|
|
<td class="text-xs"><%= r.stc_number %></td>
|
|
<td><%= "✓" if r.has_ica? %></td>
|
|
</tr>
|
|
<% end %>
|
|
</tbody>
|
|
</table>
|
|
<% else %>
|
|
<%= empty_state t(".no_major_repairs_or_alterations") %>
|
|
<% end %>
|
|
</section>
|