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

@@ -33,7 +33,7 @@ class AirTrailConnectionsController < ApplicationController
# Link existing AirTrail flights and push everything else, in the background.
def sync
AirTrailBackfillJob.perform_later(@connection.id)
redirect_to air_trail_connection_path, notice: "Sync started. Refresh this page in a minute to see progress."
redirect_to air_trail_connection_path, notice: t("flash.air_trail_connections.sync_started_refresh_this")
end
def map_airport
@@ -42,9 +42,9 @@ class AirTrailConnectionsController < ApplicationController
match = target.present? && AirTrailSyncer.new(@connection).map_airport(code, target)
if match
AirTrailBackfillJob.perform_later(@connection.id) # retry flights that needed it
redirect_to air_trail_connection_path, notice: "#{code} mapped to #{match['icao']} (#{match['name']}). Retrying affected flights."
redirect_to air_trail_connection_path, notice: t("flash.air_trail_connections.mapped_to_retrying_affected", code: code, icao: match["icao"], name: match["name"])
else
redirect_to air_trail_connection_path, alert: "AirTrail has no airport matching “#{target}”."
redirect_to air_trail_connection_path, alert: t("flash.air_trail_connections.airtrail_has_no_airport", target: target)
end
rescue AirTrailClient::Error => e
redirect_to air_trail_connection_path, alert: e.message
@@ -53,7 +53,7 @@ class AirTrailConnectionsController < ApplicationController
# Stops syncing. Flights already in AirTrail are left there.
def destroy
@connection.destroy!
redirect_to air_trail_connection_path, notice: "AirTrail disconnected. Flights already in AirTrail were left as they are."
redirect_to air_trail_connection_path, notice: t("flash.air_trail_connections.airtrail_disconnected_flights_already")
end
private
@@ -81,9 +81,9 @@ class AirTrailConnectionsController < ApplicationController
missing = me.dig("credential", "kind") == "apiKey" ? AirTrailConnection::REQUIRED_SCOPES - scopes : []
@connection.update!(remote_user_id: me["id"], remote_username: me["username"], checked_at: Time.current,
status: missing.empty? ? "ok" : "error",
last_error: missing.empty? ? nil : "API key is missing scopes: #{missing.join(', ')}")
last_error: missing.empty? ? nil : t("flash.air_trail_connections.missing_scopes", scopes: missing.join(", ")))
if missing.empty?
flash[:notice] = "Connected to AirTrail as #{me['username']}."
flash[:notice] = t("flash.air_trail_connections.connected_to_airtrail_as", username: me["username"])
else
flash[:alert] = @connection.last_error
end