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,19 +1,19 @@
|
||||
<% content_for :title, "Sign a logbook entry" %>
|
||||
<% content_for :title, t(".sign_a_logbook_entry") %>
|
||||
<div class="mx-auto max-w-md space-y-4">
|
||||
<h1 class="text-2xl font-bold">Sign a logbook entry</h1>
|
||||
<p class="text-sm text-slate-600">You've been asked to sign the <%= fmt_date(@entry.date) %> <%= LogbookEntry::LOG_TYPES[@entry.log_type].downcase %> log entry for <%= @entry.aircraft.tail_number %>. First, sign in as <strong><%= @invitation.email %></strong>.</p>
|
||||
<h1 class="text-2xl font-bold"><%= t(".sign_a_logbook_entry") %></h1>
|
||||
<p class="text-sm text-slate-600"><%= t(".you_ve_been_asked_to_html", date: (fmt_date(@entry.date)), log_type: (LogbookEntry::LOG_TYPES[@entry.log_type].downcase), tail_number: @entry.aircraft.tail_number, email: @invitation.email) %></p>
|
||||
<div class="card card-body space-y-3">
|
||||
<%= link_to "I have an account: sign in", new_session_path, class: "btn-primary w-full justify-center" %>
|
||||
<%= link_to t(".i_have_an_account_sign"), new_session_path, class: "btn-primary w-full justify-center" %>
|
||||
</div>
|
||||
<% if Sso.password_login? && !User.exists?(email_address: @invitation.email) %>
|
||||
<%= form_with url: account_invited_signing_path(params[:token]), class: "card card-body space-y-3" do %>
|
||||
<h2 class="card-title">Or create an account</h2>
|
||||
<h2 class="card-title"><%= t(".or_create_an_account") %></h2>
|
||||
<% if @account_errors.present? %><div class="rounded-md bg-red-50 p-2 text-sm text-red-700"><%= @account_errors.to_sentence %></div><% end %>
|
||||
<div><label class="label">Email</label><input class="input" value="<%= @invitation.email %>" disabled></div>
|
||||
<div><%= label_tag :name, "Your name", class: "label" %><%= text_field_tag :name, params[:name], class: "input", required: true %></div>
|
||||
<div><%= label_tag :password, "Password", class: "label" %><%= password_field_tag :password, nil, class: "input", required: true, autocomplete: "new-password", minlength: User::PASSWORD_MIN, maxlength: 72 %><p class="hint">At least <%= User::PASSWORD_MIN %> characters; not one known from a data breach.</p></div>
|
||||
<div><%= label_tag :password_confirmation, "Confirm password", class: "label" %><%= password_field_tag :password_confirmation, nil, class: "input", required: true, autocomplete: "new-password" %></div>
|
||||
<%= submit_tag "Create account", class: "btn-secondary" %>
|
||||
<div><label class="label"><%= t(".email") %></label><input class="input" value="<%= @invitation.email %>" disabled></div>
|
||||
<div><%= label_tag :name, t(".your_name"), class: "label" %><%= text_field_tag :name, params[:name], class: "input", required: true %></div>
|
||||
<div><%= label_tag :password, t(".password"), class: "label" %><%= password_field_tag :password, nil, class: "input", required: true, autocomplete: "new-password", minlength: User::PASSWORD_MIN, maxlength: 72 %><p class="hint"><%= t(".at_least_characters_not_one_html", min: (User::PASSWORD_MIN)) %></p></div>
|
||||
<div><%= label_tag :password_confirmation, t(".confirm_password"), class: "label" %><%= password_field_tag :password_confirmation, nil, class: "input", required: true, autocomplete: "new-password" %></div>
|
||||
<%= submit_tag t(".create_account"), class: "btn-secondary" %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</div>
|
||||
Reference in new issue
Block a user