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

27 lines
2.0 KiB
ERB

<p><%= t(".here_s_what_needs_attention_html", any: (t(".on_your_aircraft") if @items.any?)) %></p>
<% @items.each do |aircraft, issues, alerts| %>
<h3 style="margin: 16px 0 4px;"><%= link_to aircraft.tail_number, aircraft_url(aircraft) %> <span style="font-weight: normal; color: #64748b;"><%= aircraft.airworthiness.label %></span></h3>
<ul style="margin: 0; padding-left: 20px;">
<% issues.each do |issue| %>
<li><strong><%= { "RED" => t(".overdue"), "LIMITED" => t(".overdue"), "ORANGE" => t(".due_soon"), "INFO" => t(".deferred") }[issue.severity] %>:</strong>
<%= issue.title %> <span style="color: #64748b;"><%= issue.description %></span></li>
<% end %>
</ul>
<% if alerts.any? %>
<p style="margin: 8px 0 0;"><%= t(".newly_published_may_apply_html", count: alerts.size) %>
<%= alerts.map { _1.ad_number || _1.fr_document_number }.to_sentence %>. <%= link_to t(".review_them"), aircraft_airworthiness_directives_url(aircraft, anchor: "new-ads") %>.</p>
<% end %>
<% end %>
<% if @certificates.any? %>
<h3 style="margin: 16px 0 4px;"><%= t(".your_certificates") %></h3>
<ul style="margin: 0; padding-left: 20px;">
<% @certificates.each do |c| %><li><strong><%= c.expired? ? t(".expired") : t(".expires") %> <%= fmt_date(c.expires_on) %>:</strong> <%= c.kind_label %> <%= c.number %></li><% end %>
</ul>
<% end %>
<% if @drs_due.any? %><p><%= t(".refresh_the_ad_list_from_html") %></p>
<ul><% @drs_due.each do |a| %><li><%= link_to a.tail_number, aircraft_airworthiness_directives_url(a) %>: <%= (m = DrsImport.missing_models(a)).any? ? t(".never_imported_for", to_sentence: m.to_sentence) : t(".last_import", never: (a.drs_imports.latest_first.first&.created_at&.to_date || 'never')) %></li><% end %></ul><% end %>
<% if @audit_due %><p><%= t(".records_audit_due_ac_120_html", audit_due: @audit_due, link: (link_to t(".start_it"), new_admin_audit_url)) %></p><% end %>
<p style="color: #64748b; font-size: 12px; margin-top: 20px;">
<%= t(".based_on_the_records_in_html", link: (link_to "profile", edit_profile_url)) %>
</p>