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
@@ -8,44 +8,44 @@
|
||||
<% photos.each do |file| %>
|
||||
<li class="inline-flex items-center overflow-hidden rounded-md text-xs ring-1 ring-slate-300">
|
||||
<%= link_to rails_blob_path(file, disposition: :inline), class: "px-2 py-1 text-sky-700 hover:bg-slate-100",
|
||||
title: "Preview #{file.filename}",
|
||||
title: t(".preview", filename: file.filename),
|
||||
data: { gallery_target: "item", action: "gallery#open", gallery_name: file.filename.to_s,
|
||||
gallery_download: rails_blob_path(file, disposition: :attachment) } do %>
|
||||
🖼 <%= file.filename.to_s.truncate(28, omission: "…") %>
|
||||
<% end %>
|
||||
<%= link_to "⬇", rails_blob_path(file, disposition: :attachment), download: file.filename.to_s,
|
||||
class: "border-l border-slate-300 px-1.5 py-1 text-slate-500 hover:bg-slate-100 hover:text-sky-700",
|
||||
title: "Download #{file.filename}", aria: { label: "Download #{file.filename}" } %>
|
||||
title: t(".download", filename: file.filename), aria: { label: t(".download", filename: file.filename) } %>
|
||||
</li>
|
||||
<% end %>
|
||||
<% others.each do |file| %>
|
||||
<li class="inline-flex items-center overflow-hidden rounded-md text-xs ring-1 ring-slate-300">
|
||||
<%= link_to "📎 #{file.filename.to_s.truncate(28, omission: "…")}", rails_blob_path(file, disposition: :inline),
|
||||
class: "px-2 py-1 text-sky-700 hover:bg-slate-100", target: "_blank", rel: "noopener", title: "Open #{file.filename}" %>
|
||||
class: "px-2 py-1 text-sky-700 hover:bg-slate-100", target: "_blank", rel: "noopener", title: t(".open", filename: file.filename) %>
|
||||
<%= link_to "⬇", rails_blob_path(file, disposition: :attachment), download: file.filename.to_s,
|
||||
class: "border-l border-slate-300 px-1.5 py-1 text-slate-500 hover:bg-slate-100 hover:text-sky-700",
|
||||
title: "Download #{file.filename}", aria: { label: "Download #{file.filename}" } %>
|
||||
title: t(".download", filename: file.filename), aria: { label: t(".download", filename: file.filename) } %>
|
||||
</li>
|
||||
<% end %>
|
||||
</ul>
|
||||
|
||||
<% if photos.any? %>
|
||||
<dialog data-gallery-target="dialog" aria-label="Photo viewer"
|
||||
<dialog data-gallery-target="dialog" aria-label="<%= t(".photo_viewer") %>"
|
||||
class="m-0 h-dvh max-h-none w-screen max-w-none bg-transparent p-0 text-white backdrop:bg-black/90"
|
||||
data-action="click->gallery#backdrop keydown->gallery#keydown touchstart->gallery#touchstart touchend->gallery#touchend">
|
||||
<div class="flex h-full flex-col" data-gallery-close>
|
||||
<div class="flex items-center gap-3 bg-black/60 px-4 py-2 text-sm">
|
||||
<span data-gallery-target="caption" class="min-w-0 flex-1 truncate font-medium"></span>
|
||||
<span data-gallery-target="counter" class="text-white/60 tabular-nums"></span>
|
||||
<a data-gallery-target="original" target="_blank" rel="noopener" class="rounded px-2 py-1 hover:bg-white/15">Open</a>
|
||||
<a data-gallery-target="download" download class="rounded bg-white/15 px-3 py-1 font-medium hover:bg-white/25">⬇ Download</a>
|
||||
<button type="button" data-action="gallery#close" class="rounded px-2 py-1 text-lg leading-none hover:bg-white/15" aria-label="Close" autofocus>✕</button>
|
||||
<%= t(".open_2_html") %>
|
||||
<%= t(".download_2_html") %>
|
||||
<button type="button" data-action="gallery#close" class="rounded px-2 py-1 text-lg leading-none hover:bg-white/15" aria-label="<%= t(".close") %>" autofocus>✕</button>
|
||||
</div>
|
||||
<div class="relative flex min-h-0 flex-1 items-center justify-center p-2 sm:p-6" data-gallery-close>
|
||||
<button type="button" data-gallery-target="nav" data-action="gallery#previous" aria-label="Previous photo"
|
||||
<button type="button" data-gallery-target="nav" data-action="gallery#previous" aria-label="<%= t(".previous_photo") %>"
|
||||
class="absolute left-2 top-1/2 -translate-y-1/2 rounded-full bg-black/50 px-3 py-2 text-2xl hover:bg-black/70">‹</button>
|
||||
<img data-gallery-target="image" alt="" class="max-h-full max-w-full select-none object-contain shadow-2xl">
|
||||
<button type="button" data-gallery-target="nav" data-action="gallery#next" aria-label="Next photo"
|
||||
<button type="button" data-gallery-target="nav" data-action="gallery#next" aria-label="<%= t(".next_photo") %>"
|
||||
class="absolute right-2 top-1/2 -translate-y-1/2 rounded-full bg-black/50 px-3 py-2 text-2xl hover:bg-black/70">›</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in new issue
Block a user