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:
rickyandClaude Opus 5.5 committed 2026-11-13 22:08:20 -05:00
1 parent 3f45b557c2
commit 89ed0a76f9
313 files changed
+6387 -2653

No files matched your search

+8 -8
View File
@@ -2,19 +2,19 @@
<%= f.errors_summary %>
<div data-controller="markdown-editor" data-markdown-editor-url-value="<%= preview_aircraft_notes_path(aircraft) %>">
<div class="mb-1 flex items-end justify-between gap-2">
<%= f.label :text, "Note", class: "block text-sm font-medium text-slate-700" %>
<%= f.label :text, t(".note"), class: "block text-sm font-medium text-slate-700" %>
<div class="flex gap-1 text-xs" role="tablist">
<button type="button" role="tab" data-markdown-editor-target="writeTab" data-action="markdown-editor#write" class="rounded px-2 py-1 font-medium">Write</button>
<button type="button" role="tab" data-markdown-editor-target="previewTab" data-action="markdown-editor#preview" class="rounded px-2 py-1 font-medium">Preview</button>
<button type="button" role="tab" data-markdown-editor-target="writeTab" data-action="markdown-editor#write" class="rounded px-2 py-1 font-medium"><%= t(".write") %></button>
<button type="button" role="tab" data-markdown-editor-target="previewTab" data-action="markdown-editor#preview" class="rounded px-2 py-1 font-medium"><%= t(".preview") %></button>
</div>
</div>
<%= f.text_area :text, rows: 8, autofocus: true, class: "input font-mono text-sm", data: { markdown_editor_target: "input" },
placeholder: "**Bold**, *italic*, - lists, - [ ] checklists, [links](https://…), | tables |" %>
placeholder: t(".bold_italic_lists_checklists_links") %>
<div data-markdown-editor-target="output" hidden class="min-h-[10rem] rounded-md p-3 text-sm ring-1 ring-slate-300"></div>
<% if note.errors[:text].any? %><p class="mt-1 text-sm text-red-600"><%= note.errors.full_messages_for(:text).to_sentence %></p><% end %>
<p class="hint mt-1">Markdown works: **bold**, *italic*, # headings, lists, - [ ] checklists, links, `code` and tables.</p>
<p class="hint mt-1"><%= t(".markdown_works_bold_italic_headings") %></p>
</div>
<%= f.field :public, as: :checkbox, label: "Show on share links" %>
<div class="flex gap-2"><%= f.submit "Save Note" %><%= link_to "Cancel", aircraft_notes_path(aircraft), class: "btn-secondary" %></div>
<%= f.field :public, as: :checkbox, label: t(".show_on_share_links") %>
<div class="flex gap-2"><%= f.submit t(".save_note") %><%= link_to t(".cancel"), aircraft_notes_path(aircraft), class: "btn-secondary" %></div>
<% end %>
<% if note.persisted? %><div class="mt-4"><%= delete_button "Delete note", aircraft_note_path(aircraft, note) %></div><% end %>
<% if note.persisted? %><div class="mt-4"><%= delete_button t(".delete_note"), aircraft_note_path(aircraft, note) %></div><% end %>