mirror of
https://github.com/rickbarrette/simple-aircraft-manager-rails.git
synced 2026-11-17 23:50:36 -05:00
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:
1 parent
3f45b557c2
commit
89ed0a76f9
313 files changed
+6387
-2653
No files matched your search
@@ -1,32 +1,31 @@
|
||||
<% content_for :title, "Import Aircraft" %>
|
||||
<% content_for :title, t(".import_aircraft") %>
|
||||
<div class="mx-auto max-w-2xl space-y-5">
|
||||
<h1 class="text-2xl font-bold tracking-tight">Import an aircraft</h1>
|
||||
<h1 class="text-2xl font-bold tracking-tight"><%= t(".import_an_aircraft") %></h1>
|
||||
<section class="card card-body space-y-4">
|
||||
<p class="text-sm text-slate-600">
|
||||
Upload a <strong>.sam.zip</strong> archive exported from Simple Aircraft Manager (this app or the original).
|
||||
Everything in it is added as a new aircraft that you own: components, logbook, squawks, inspections, ADs,
|
||||
documents, oil and fuel, oil analyses, flights and their files.
|
||||
<%= t(".upload_a_sam_zip_archive_html") %>
|
||||
<%= t(".everything_in_it_is_added") %>
|
||||
</p>
|
||||
<% if @preview %>
|
||||
<div class="rounded-md bg-slate-50 px-3 py-2 text-sm ring-1 ring-slate-200">
|
||||
Archive: <strong><%= @preview.tail_number %></strong> <%= [ @preview.make, @preview.model ].compact_blank.join(" ") %>
|
||||
<% if @preview.exported_at %><span class="text-slate-500">· exported <%= fmt_date(@preview.exported_at.to_date) %></span><% end %>
|
||||
<%= t(".archive_html", tail_number: @preview.tail_number, make_model: ([ @preview.make, @preview.model ].compact_blank.join(" "))) %>
|
||||
<% if @preview.exported_at %><span class="text-slate-500"><%= t(".exported_html", to_date: (fmt_date(@preview.exported_at.to_date))) %></span><% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
<%= form_with url: aircraft_imports_path, multipart: true, class: "space-y-4" do |f| %>
|
||||
<div>
|
||||
<%= f.label :archive, "Archive (.sam.zip)", class: "label" %>
|
||||
<%= f.label :archive, t(".archive_sam_zip"), class: "label" %>
|
||||
<%= f.file_field :archive, accept: ".zip,application/zip", 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" %>
|
||||
<% if @conflict %><p class="hint mt-1">Choose the file again along with the new tail number.</p><% end %>
|
||||
<% if @conflict %><p class="hint mt-1"><%= t(".choose_the_file_again_along") %></p><% end %>
|
||||
</div>
|
||||
<div class="max-w-xs">
|
||||
<%= f.label :tail_number, "Tail number", class: "label" %>
|
||||
<%= f.label :tail_number, t(".tail_number"), class: "label" %>
|
||||
<%= f.text_field :tail_number, value: (params[:tail_number] unless @conflict), class: "input uppercase",
|
||||
placeholder: @preview&.tail_number || "From the archive", required: @conflict.present? %>
|
||||
<p class="hint mt-1">Leave blank to use the archive's. Needed when that tail number is already here.</p>
|
||||
placeholder: @preview&.tail_number || t(".from_the_archive"), required: @conflict.present? %>
|
||||
<p class="hint mt-1"><%= t(".leave_blank_to_use_the") %></p>
|
||||
</div>
|
||||
<div class="flex gap-2"><%= f.submit "Import", class: "btn-primary" %><%= link_to "Cancel", root_path, class: "btn-secondary" %></div>
|
||||
<div class="flex gap-2"><%= f.submit t(".import"), class: "btn-primary" %><%= link_to t(".cancel"), root_path, class: "btn-secondary" %></div>
|
||||
<% end %>
|
||||
</section>
|
||||
</div>
|
||||
Reference in new issue
Block a user