Files
simple-aircraft-manager-rails/app/views/two_factors/new.html.erb
T
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.2 KiB
ERB

<% content_for :title, t(".set_up_two_factor") %>
<section class="card card-body mx-auto max-w-md space-y-4">
<h1 class="text-2xl font-bold"><%= t(".set_up_an_authenticator_app") %></h1>
<p class="text-sm text-slate-600"><%= t(".after_your_password_or_an") %></p>
<ol class="list-decimal space-y-3 pl-5 text-sm">
<li><%= t(".in_the_app_add_an") %>
<div class="mt-2 inline-block rounded bg-white p-2"><%= image_tag @qr_data_uri, alt: t(".qr_code_for_your_authenticator"), class: "h-48 w-48" %></div>
<p class="mt-1 text-xs text-slate-500"><%= t(".can_t_scan_it_enter_html", scan: (@secret.scan(/.{4}/).join(" "))) %></p></li>
<li><%= t(".enter_the_code_the_app") %>
<%= form_with url: two_factor_path, class: "mt-2 flex flex-wrap items-end gap-2" do |f| %>
<%= hidden_field_tag :return_to, params[:return_to] %>
<%= f.text_field :code, required: true, autocomplete: "one-time-code", inputmode: "numeric", maxlength: 7, class: "input w-32 text-lg tracking-widest", "aria-label": t(".code") %>
<%= f.submit t(".turn_on"), class: "btn-primary" %>
<% end %></li>
</ol>
<p class="text-sm"><%= link_to t(".not_now"), back_path, class: "link" %></p>
</section>