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>
36 lines
1.9 KiB
ERB
36 lines
1.9 KiB
ERB
<%= form_with model: aircraft, class: "card card-body space-y-4 max-w-3xl" do |f| %>
|
|
<%= f.errors_summary %>
|
|
<div class="grid gap-4 sm:grid-cols-3">
|
|
<%= f.field :tail_number, required: true, autofocus: true %>
|
|
<%= f.field :make %>
|
|
<%= f.field :model %>
|
|
<%= f.field :serial_number %>
|
|
<%= f.field :purchased, as: :date %>
|
|
<%= f.field :status, as: :select, collection: Aircraft::STATUSES.invert %>
|
|
<%= f.field :icao_type, label: t(".icao_type"), placeholder: "C150", maxlength: 4, hint: t(".type_designator_used_for_airtrail") %>
|
|
</div>
|
|
<%= f.field :description, as: :textarea, rows: 3 %>
|
|
<div class="grid gap-4 sm:grid-cols-4">
|
|
<% if aircraft.new_record? %>
|
|
<%= f.field :tach_time, as: :number, step: 0.1, label: t(".current_tach") %>
|
|
<%= f.field :hobbs_time, as: :number, step: 0.1, label: t(".current_hobbs") %>
|
|
<% end %>
|
|
<%= f.field :tach_time_offset, as: :number, step: 0.1, hint: t(".subtracted_from_tach_for_maintenance") %>
|
|
<%= f.field :hobbs_time_offset, as: :number, step: 0.1, hint: t(".the_same_for_hobbs") %>
|
|
</div>
|
|
<%= f.field :time_basis, as: :select, label: t(".maintenance_clock"), collection: Aircraft::TIME_BASES.invert,
|
|
hint: t(".the_clock_used_as_time") %>
|
|
<% unless aircraft.new_record? %>
|
|
<p class="hint"><%= t(".to_change_hours_use_update") %></p>
|
|
<% end %>
|
|
<%= f.field :picture, as: :file, accept: "image/*" %>
|
|
<%= f.field :electronic_records_since, as: :date, label: t(".electronic_records_since"), wrapper: { class: "max-w-xs" },
|
|
hint: t(".the_date_this_app_became") %>
|
|
<%= f.field :airworthiness_enforcement, as: :checkbox, label: t(".enforce_airworthiness"),
|
|
hint: t(".block_flight_logs_and_hours") %>
|
|
<div class="flex gap-2">
|
|
<%= f.submit aircraft.new_record? ? t(".add_aircraft") : t(".save") %>
|
|
<%= link_to t(".cancel"), aircraft.new_record? ? root_path : aircraft_path(aircraft), class: "btn-secondary" %>
|
|
</div>
|
|
<% end %>
|