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,12 +1,12 @@
|
||||
<% content_for :title, "Logbook templates" %>
|
||||
<% content_for :title, t(".logbook_templates") %>
|
||||
<div class="mb-4 flex flex-wrap items-center justify-between gap-2">
|
||||
<h1 class="text-2xl font-bold">Logbook templates</h1>
|
||||
<h1 class="text-2xl font-bold"><%= t(".logbook_templates") %></h1>
|
||||
<div class="flex gap-2">
|
||||
<%= button_to "Restore built-in templates", restore_admin_logbook_templates_path, class: "btn-secondary", title: "Add back any of the built-in preventive maintenance templates that were deleted" %>
|
||||
<%= link_to "+ New Template", new_admin_logbook_template_path, class: "btn-primary" %>
|
||||
<%= button_to t(".restore_built_in_templates"), restore_admin_logbook_templates_path, class: "btn-secondary", title: t(".add_back_any_of_the") %>
|
||||
<%= link_to t(".new_template"), new_admin_logbook_template_path, class: "btn-primary" %>
|
||||
</div>
|
||||
</div>
|
||||
<p class="mb-4 text-sm text-slate-600">Wording to start a logbook entry from: the "Template" list on a new entry. Use __ for blanks to fill in.</p>
|
||||
<p class="mb-4 text-sm text-slate-600"><%= t(".wording_to_start_a_logbook") %></p>
|
||||
<section class="card">
|
||||
<% if @templates.any? %>
|
||||
<ul class="divide-y divide-slate-100">
|
||||
@@ -17,11 +17,11 @@
|
||||
<div class="text-xs text-slate-500"><%= [ LogbookEntry::ENTRY_TYPES[t.entry_type], (t.log_type && "#{LogbookEntry::LOG_TYPES[t.log_type]} log"), (t.certificate_type && LogbookEntry::CERTIFICATE_TYPES[t.certificate_type]) ].compact.join(" · ") %></div>
|
||||
<p class="mt-1 text-xs text-slate-600"><%= t.text.truncate(220) %></p>
|
||||
</div>
|
||||
<%= link_to "Edit", edit_admin_logbook_template_path(t), class: "btn-secondary btn-sm" %>
|
||||
<%= link_to t(".edit"), edit_admin_logbook_template_path(t), class: "btn-secondary btn-sm" %>
|
||||
</li>
|
||||
<% end %>
|
||||
</ul>
|
||||
<% else %>
|
||||
<%= empty_state "No templates." %>
|
||||
<%= empty_state t(".no_templates") %>
|
||||
<% end %>
|
||||
</section>
|
||||
Reference in new issue
Block a user