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>
This commit is contained in:
rickyandClaude Opus 5.5 committed 2026-11-13 22:08:20 -05:00
1 parent 3f45b557c2
commit 89ed0a76f9
313 files changed
+6387 -2653

No files matched your search

+8 -8
View File
@@ -1,9 +1,9 @@
<% content_for :title, "#{@aircraft.tail_number} Standard inspections" %>
<% content_for :title, t(".standard_inspections", tail_number: @aircraft.tail_number) %>
<%= render "shared/aircraft_header", aircraft: @aircraft %>
<%= form_with url: aircraft_standard_inspections_path(@aircraft), class: "card card-body max-w-3xl space-y-4" do %>
<div>
<h2 class="card-title">Standard inspections</h2>
<p class="mt-1 text-sm text-slate-600">The recurring inspections and checks Part 91 calls for. Pick the ones that apply to how <%= @aircraft.tail_number %> is flown. Each is added with its interval and what being overdue means; you can change them afterwards.</p>
<h2 class="card-title"><%= t(".standard_inspections_2") %></h2>
<p class="mt-1 text-sm text-slate-600"><%= t(".the_recurring_inspections_and_checks_html", tail_number: @aircraft.tail_number) %></p>
</div>
<ul class="divide-y divide-slate-100 rounded-md ring-1 ring-slate-200">
<% StandardInspections::TEMPLATES.each do |t| %>
@@ -12,13 +12,13 @@
<%= check_box_tag "templates[]", t.key, t.checked && !existing, id: "template_#{t.key}", disabled: existing.present?, class: "mt-1 h-4 w-4 shrink-0 rounded border-slate-300" %>
<label for="template_<%= t.key %>" class="min-w-0 flex-1 text-sm">
<span class="font-medium"><%= t.name %></span>
<span class="text-slate-500">· <%= [ (t.months && "every #{t.months} calendar months"), (t.days && "every #{t.days} days"), (t.hours && "every #{t.hours} hours") ].compact.join %></span>
<span class="block text-xs text-slate-500"><%= t.who %>. Overdue: <%= InspectionType::EFFECT_SUMMARIES[t.effect] %>.</span>
<% if existing %><span class="block text-xs text-emerald-700">Already tracked as “<%= existing.name %>”</span><% end %>
<span class="text-slate-500">· <%= [ (t.months && t(".every_calendar_months", months: t.months)), (t.days && "every #{t.days} days"), (t.hours && "every #{t.hours} hours") ].compact.join %></span>
<span class="block text-xs text-slate-500"><%= t(".overdue_html", who: t.who, effect: (InspectionType::EFFECT_SUMMARIES[t.effect])) %></span>
<% if existing %><span class="block text-xs text-emerald-700"><%= t(".already_tracked_as_html", existing: existing.name) %></span><% end %>
</label>
</li>
<% end %>
</ul>
<p class="hint">With both an annual and a 100-hour, the annual also counts as the 100-hour (91.409(b)).</p>
<div class="flex gap-2"><%= submit_tag "Add selected", class: "btn-primary" %><%= link_to "Cancel", aircraft_inspections_path(@aircraft), class: "btn-secondary" %></div>
<p class="hint"><%= t(".with_both_an_annual_and") %></p>
<div class="flex gap-2"><%= submit_tag t(".add_selected"), class: "btn-primary" %><%= link_to t(".cancel"), aircraft_inspections_path(@aircraft), class: "btn-secondary" %></div>
<% end %>