Files
rickyandClaude Opus 5.5 89ed0a76f9 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>
2026-11-13 22:08:20 -05:00

18 lines
1.3 KiB
ERB

<%= form_with model: [ :admin, template ], class: "card card-body max-w-3xl space-y-4" do |f| %>
<%= f.errors_summary %>
<div class="grid gap-4 sm:grid-cols-2">
<%= f.field :name, required: true, placeholder: t(".oil_and_filter_change") %>
<%= f.field :reference, placeholder: t(".part_43_app_a_c"), hint: t(".shown_next_to_the_name") %>
</div>
<%= f.field :text, as: :textarea, rows: 5, required: true, hint: t(".the_entry_text_use_for") %>
<div class="grid gap-4 sm:grid-cols-4">
<%= f.field :entry_type, as: :select, label: t(".entry_type"), collection: LogbookEntry::ENTRY_TYPES.invert %>
<%= f.field :log_type, as: :select, label: t(".logbook"), include_blank: t(".leave_as_is"), collection: LogbookEntry::LOG_TYPES.invert %>
<%= f.field :certificate_type, as: :select, label: t(".kind_of_certificate"), include_blank: t(".leave_as_is"), collection: LogbookEntry::CERTIFICATE_TYPES.invert,
hint: t(".only_filled_in_when_none") %>
<%= f.field :position, as: :number, label: t(".order") %>
</div>
<div class="flex gap-2"><%= f.submit t(".save_template") %><%= link_to t(".cancel"), admin_logbook_templates_path, class: "btn-secondary" %></div>
<% end %>
<% if template.persisted? %><div class="mt-4"><%= delete_button t(".delete_template"), admin_logbook_template_path(template) %></div><% end %>