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>
41 lines
2.0 KiB
ERB
41 lines
2.0 KiB
ERB
<% content_for :title, t(".import_flights") %>
|
|
<%= render "shared/aircraft_header", aircraft: @aircraft %>
|
|
<div class="grid gap-5 lg:grid-cols-3">
|
|
<%= form_with url: aircraft_flight_import_path(@aircraft), multipart: true, class: "card card-body space-y-4 lg:col-span-2" do |f| %>
|
|
<h2 class="card-title"><%= t(".import_flights_from_a_spreadsheet") %></h2>
|
|
<div>
|
|
<%= f.label :file, t(".spreadsheet_xlsx_or_csv"), class: "label" %>
|
|
<%= f.file_field :file, accept: ".xlsx,.csv", required: true,
|
|
class: "block text-sm text-slate-600 file:mr-3 file:rounded-md file:border-0 file:bg-slate-100 file:px-3 file:py-1.5 file:text-sm file:font-medium hover:file:bg-slate-200" %>
|
|
</div>
|
|
<div class="grid gap-4 sm:grid-cols-2">
|
|
<div>
|
|
<%= f.label :starting_tach, t(".tach_before_the_first_flight"), class: "label" %>
|
|
<%= f.number_field :starting_tach, step: 0.1, class: "input" %>
|
|
<p class="hint"><%= t(".e_g_the_tach_at") %></p>
|
|
</div>
|
|
<div>
|
|
<%= f.label :starting_hobbs, t(".hobbs_before_the_first_flight"), class: "label" %>
|
|
<%= f.number_field :starting_hobbs, step: 0.1, class: "input" %>
|
|
</div>
|
|
</div>
|
|
<%= f.submit t(".upload_preview"), class: "btn-primary" %>
|
|
<p class="hint"><%= t(".nothing_is_saved_until_you") %></p>
|
|
<% end %>
|
|
|
|
<section class="card card-body text-sm text-slate-700 space-y-2">
|
|
<h3 class="font-semibold"><%= t(".expected_layout") %></h3>
|
|
<p><%= t(".one_row_per_flight_with_html") %></p>
|
|
<ul class="list-disc pl-5 text-xs">
|
|
<li><%= t(".date_required_html") %></li>
|
|
<li><%= t(".tach_tach_time_required_html") %></li>
|
|
<li><%= t(".from_to") %></li>
|
|
<li><%= t(".hobbs_hobbs_time") %></li>
|
|
<li><%= t(".oil_added_qt_fuel_added") %></li>
|
|
<li><%= t(".flight_time_used_only_for") %></li>
|
|
</ul>
|
|
<p class="text-xs"><%= t(".each_flight_s_time_is") %></p>
|
|
<p class="text-xs"><%= t(".importing_records_history_only_it") %></p>
|
|
</section>
|
|
</div>
|