diff --git a/app/controllers/account_reset/cancel_controller.rb b/app/controllers/account_reset/cancel_controller.rb index eaa67e3c7db..40ffc79b18d 100644 --- a/app/controllers/account_reset/cancel_controller.rb +++ b/app/controllers/account_reset/cancel_controller.rb @@ -41,7 +41,10 @@ def handle_invalid_token(result) def handle_success sign_out if current_user - flash[:success] = t('two_factor_authentication.account_reset.successful_cancel') + flash[:success] = t( + 'two_factor_authentication.account_reset.successful_cancel', + app_name: APP_NAME, + ) end def token diff --git a/app/controllers/idv/review_controller.rb b/app/controllers/idv/review_controller.rb index 044bd8bc965..b6ea95031ed 100644 --- a/app/controllers/idv/review_controller.rb +++ b/app/controllers/idv/review_controller.rb @@ -88,7 +88,7 @@ def init_profile UserAlerts::AlertUserAboutAccountVerified.call( user: current_user, date_time: event.created_at, - app: decorated_session.sp_name, + sp_name: decorated_session.sp_name, disavowal_token: event.disavowal_token, ) end diff --git a/app/controllers/users/email_confirmations_controller.rb b/app/controllers/users/email_confirmations_controller.rb index aa1cb7f2fa9..6931428ec7c 100644 --- a/app/controllers/users/email_confirmations_controller.rb +++ b/app/controllers/users/email_confirmations_controller.rb @@ -68,7 +68,7 @@ def message_for_already_confirmed_user if email_address_already_confirmed_by_current_user? t('devise.confirmations.already_confirmed', action: nil) elsif user_signed_in? - t('devise.confirmations.confirmed_but_remove_from_other_account') + t('devise.confirmations.confirmed_but_remove_from_other_account', app_name: APP_NAME) else action_text = t('devise.confirmations.sign_in') t('devise.confirmations.already_confirmed', action: action_text) diff --git a/app/controllers/users/sessions_controller.rb b/app/controllers/users/sessions_controller.rb index db6b3eab3e5..f43b0b09d81 100644 --- a/app/controllers/users/sessions_controller.rb +++ b/app/controllers/users/sessions_controller.rb @@ -65,7 +65,7 @@ def timeout sign_out flash[:info] = t( 'notices.session_timedout', - app: APP_NAME, + app_name: APP_NAME, minutes: IdentityConfig.store.session_timeout_in_minutes, ) redirect_to root_url(request_id: request_id) diff --git a/app/controllers/users/verify_account_controller.rb b/app/controllers/users/verify_account_controller.rb index b299c3c7c44..8a6e9ca0e24 100644 --- a/app/controllers/users/verify_account_controller.rb +++ b/app/controllers/users/verify_account_controller.rb @@ -33,7 +33,7 @@ def create UserAlerts::AlertUserAboutAccountVerified.call( user: current_user, date_time: event.created_at, - app: decorated_session.sp_name, + sp_name: decorated_session.sp_name, disavowal_token: event.disavowal_token, ) flash[:success] = t('account.index.verification.success') diff --git a/app/decorators/service_provider_session_decorator.rb b/app/decorators/service_provider_session_decorator.rb index 2d37f8c2a51..8a37ecfe328 100644 --- a/app/decorators/service_provider_session_decorator.rb +++ b/app/decorators/service_provider_session_decorator.rb @@ -21,7 +21,9 @@ def custom_alert(section) return if sp.help_text.nil? language = I18n.locale.to_s alert = sp.help_text.dig(section, language) - format(alert, sp_name: sp_name, sp_create_link: sp_create_link) if alert.present? + if alert.present? + format(alert, sp_name: sp_name, sp_create_link: sp_create_link, app_name: APP_NAME) + end end def sp_logo diff --git a/app/decorators/user_decorator.rb b/app/decorators/user_decorator.rb index 3a7422f39e5..9577e4a3d1b 100644 --- a/app/decorators/user_decorator.rb +++ b/app/decorators/user_decorator.rb @@ -151,9 +151,9 @@ def connected_apps def delete_account_bullet_key if identity_verified? - I18n.t('users.delete.bullet_2_loa3', app: APP_NAME) + I18n.t('users.delete.bullet_2_loa3', app_name: APP_NAME) else - I18n.t('users.delete.bullet_2_loa1', app: APP_NAME) + I18n.t('users.delete.bullet_2_loa1', app_name: APP_NAME) end end diff --git a/app/javascript/packages/document-capture/components/selfie-capture.jsx b/app/javascript/packages/document-capture/components/selfie-capture.jsx index 60ca20fd71f..cf025d69d8d 100644 --- a/app/javascript/packages/document-capture/components/selfie-capture.jsx +++ b/app/javascript/packages/document-capture/components/selfie-capture.jsx @@ -4,6 +4,7 @@ import { useState, useEffect, useCallback, + useContext, useMemo, useImperativeHandle, } from 'react'; @@ -14,6 +15,7 @@ import useIfStillMounted from '../hooks/use-if-still-mounted'; import useInstanceId from '../hooks/use-instance-id'; import useFocusFallbackRef from '../hooks/use-focus-fallback-ref'; import './selfie-capture.scss'; +import AppContext from '../context/app'; /** @typedef {import('react').ReactNode} ReactNode */ @@ -152,6 +154,8 @@ function SelfieCapture({ value, onChange, errorMessage, className }, ref) { const labelId = `selfie-capture-label-${instanceId}`; + const { appName } = useContext(AppContext); + return ( <>
- {t('doc_auth.instructions.document_capture_selfie_consent_banner')} + {t('doc_auth.instructions.document_capture_selfie_consent_banner', { + app_name: appName, + })} {isAccessRejected ? ( <> -

{t('doc_auth.instructions.document_capture_selfie_consent_blocked')}

- {t('doc_auth.instructions.document_capture_selfie_consent_blocked_action')} + {t('doc_auth.instructions.document_capture_selfie_consent_blocked', { + app_name: appName, + })} +

+

+ {t('doc_auth.instructions.document_capture_selfie_consent_blocked_action', { + app_name: appName, + })}

) : ( diff --git a/app/javascript/packages/document-capture/context/app.js b/app/javascript/packages/document-capture/context/app.js new file mode 100644 index 00000000000..0dfa69a61b4 --- /dev/null +++ b/app/javascript/packages/document-capture/context/app.js @@ -0,0 +1,13 @@ +import { createContext } from 'react'; + +/** + * @typedef AppContext + * + * @prop {string} appName name of the application (probably Login.gov) + */ + +const AppContext = createContext(/** @type {AppContext} */ ({ appName: '' })); + +AppContext.displayName = 'AppContext'; + +export default AppContext; diff --git a/app/javascript/packages/document-capture/context/index.js b/app/javascript/packages/document-capture/context/index.js index ebb651bca38..69c6662d2ce 100644 --- a/app/javascript/packages/document-capture/context/index.js +++ b/app/javascript/packages/document-capture/context/index.js @@ -1,3 +1,4 @@ +export { default as AppContext } from './app'; export { default as AssetContext } from './asset'; export { default as DeviceContext } from './device'; export { default as AcuantContext, Provider as AcuantContextProvider } from './acuant'; diff --git a/app/javascript/packs/document-capture.jsx b/app/javascript/packs/document-capture.jsx index 7e9c809f4c7..d2d16028432 100644 --- a/app/javascript/packs/document-capture.jsx +++ b/app/javascript/packs/document-capture.jsx @@ -1,5 +1,6 @@ import { render } from 'react-dom'; import { + AppContext, DocumentCapture, AssetContext, DeviceContext, @@ -133,39 +134,45 @@ loadPolyfills(['fetch', 'crypto', 'url']).then(async () => { const keepAlive = () => window.fetch(keepAliveEndpoint, { method: 'POST', headers: { 'X-CSRF-Token': csrf } }); + const appContext = { + appName: /** @type string */ (appRoot.dataset.appName), + }; + render( - - - - + + + - - - - - - - - - - - , + + + + + + + + + + + + + , appRoot, ); }); diff --git a/app/mailers/user_mailer.rb b/app/mailers/user_mailer.rb index c698189fb94..6f8c797e95f 100644 --- a/app/mailers/user_mailer.rb +++ b/app/mailers/user_mailer.rb @@ -72,7 +72,7 @@ def phone_added(user, email_address, disavowal_token:) def account_does_not_exist(email, request_id) @sign_up_email_url = sign_up_email_url(request_id: request_id, locale: locale_url_param) - mail(to: email, subject: t('user_mailer.account_does_not_exist.subject')) + mail(to: email, subject: t('user_mailer.account_does_not_exist.subject', app_name: APP_NAME)) end def personal_key_sign_in(user, email, disavowal_token:) @@ -91,7 +91,10 @@ def new_device_sign_in(user:, email_address:, date:, location:, disavowal_token: @login_date = date @login_location = location @disavowal_token = disavowal_token - mail(to: email_address.email, subject: t('user_mailer.new_device_sign_in.subject')) + mail( + to: email_address.email, + subject: t('user_mailer.new_device_sign_in.subject', app_name: APP_NAME), + ) end end @@ -107,7 +110,10 @@ def account_reset_request(user, email_address, account_reset) with_user_locale(user) do @token = account_reset&.request_token @header = t('user_mailer.account_reset_request.header') - mail(to: email_address.email, subject: t('user_mailer.account_reset_request.subject')) + mail( + to: email_address.email, + subject: t('user_mailer.account_reset_request.subject', app_name: APP_NAME), + ) end end @@ -115,7 +121,10 @@ def account_reset_granted(user, email_address, account_reset) with_user_locale(user) do @token = account_reset&.request_token @granted_token = account_reset&.granted_token - mail(to: email_address.email, subject: t('user_mailer.account_reset_granted.subject')) + mail( + to: email_address.email, + subject: t('user_mailer.account_reset_granted.subject', app_name: APP_NAME), + ) end end @@ -133,7 +142,10 @@ def account_reset_cancel(user, email_address) def please_reset_password(user, email_address) with_user_locale(user) do - mail(to: email_address, subject: t('user_mailer.please_reset_password.subject')) + mail( + to: email_address, + subject: t('user_mailer.please_reset_password.subject', app_name: APP_NAME), + ) end end @@ -197,15 +209,17 @@ def deleted_user_accounts_report(email:, name:, issuers:, data:) mail(to: email, subject: t('user_mailer.deleted_accounts_report.subject')) end - def account_verified(user, email_address, date_time:, app:, disavowal_token:) + def account_verified(user, email_address, date_time:, sp_name:, disavowal_token:) return unless email_should_receive_nonessential_notifications?(email_address.email) with_user_locale(user) do @date = I18n.localize(date_time, format: t('time.formats.event_date')) - @app = app + @sp_name = sp_name @disavowal_token = disavowal_token - @app_name = APP_NAME - mail(to: email_address.email, subject: t('user_mailer.account_verified.subject', app: @app)) + mail( + to: email_address.email, + subject: t('user_mailer.account_verified.subject', sp_name: @sp_name), + ) end end diff --git a/app/presenters/cancellation_presenter.rb b/app/presenters/cancellation_presenter.rb index 6efa085dcd8..dbe082fdd41 100644 --- a/app/presenters/cancellation_presenter.rb +++ b/app/presenters/cancellation_presenter.rb @@ -20,10 +20,10 @@ def header def cancellation_warnings [ - t('users.delete.bullet_1', app: APP_NAME), + t('users.delete.bullet_1', app_name: APP_NAME), t('users.delete.bullet_2_loa1'), - t('users.delete.bullet_3', app: APP_NAME), - t('users.delete.bullet_4', app: APP_NAME), + t('users.delete.bullet_3', app_name: APP_NAME), + t('users.delete.bullet_4', app_name: APP_NAME), ] end diff --git a/app/presenters/confirmation_email_presenter.rb b/app/presenters/confirmation_email_presenter.rb index ba37613a0dd..e1f61df6b33 100644 --- a/app/presenters/confirmation_email_presenter.rb +++ b/app/presenters/confirmation_email_presenter.rb @@ -10,12 +10,12 @@ def first_sentence if user.confirmed_at? I18n.t( 'user_mailer.email_confirmation_instructions.first_sentence.confirmed', - app: app_link, confirmation_period: confirmation_period, + app_name: app_link, confirmation_period: confirmation_period, ) else I18n.t( 'user_mailer.email_confirmation_instructions.first_sentence.unconfirmed', - app: app_link, confirmation_period: confirmation_period, + app_name: app_link, confirmation_period: confirmation_period, ) end end diff --git a/app/presenters/piv_cac_authentication_login_presenter.rb b/app/presenters/piv_cac_authentication_login_presenter.rb index b9ce737216b..5a4a13f972c 100644 --- a/app/presenters/piv_cac_authentication_login_presenter.rb +++ b/app/presenters/piv_cac_authentication_login_presenter.rb @@ -26,7 +26,7 @@ def heading end def info - t('instructions.mfa.piv_cac.sign_in') + t('instructions.mfa.piv_cac.sign_in', app_name: APP_NAME) end def url_options diff --git a/app/presenters/piv_cac_error_presenter.rb b/app/presenters/piv_cac_error_presenter.rb index 0bce70f22e6..787f8e9929d 100644 --- a/app/presenters/piv_cac_error_presenter.rb +++ b/app/presenters/piv_cac_error_presenter.rb @@ -52,6 +52,7 @@ def description when 'user.not_found' t( 'instructions.mfa.piv_cac.account_not_found_html', + app_name: APP_NAME, sign_in: @view.link_to(t('headings.sign_in_without_sp'), root_url), create_account: @view.link_to(t('links.create_account'), sign_up_email_url), ) diff --git a/app/presenters/two_factor_auth_code/authenticator_delivery_presenter.rb b/app/presenters/two_factor_auth_code/authenticator_delivery_presenter.rb index 61c89f8c387..6a596f1765f 100644 --- a/app/presenters/two_factor_auth_code/authenticator_delivery_presenter.rb +++ b/app/presenters/two_factor_auth_code/authenticator_delivery_presenter.rb @@ -8,7 +8,7 @@ def help_text t( "instructions.mfa.#{two_factor_authentication_method}.confirm_code_html", email: content_tag(:strong, user_email), - app: content_tag(:strong, APP_NAME), + app_name: content_tag(:strong, APP_NAME), ) end diff --git a/app/services/request_password_reset.rb b/app/services/request_password_reset.rb index 3f86f5a2f85..1f12b562914 100644 --- a/app/services/request_password_reset.rb +++ b/app/services/request_password_reset.rb @@ -31,7 +31,10 @@ def send_reset_password_instructions end def instructions - I18n.t('user_mailer.email_confirmation_instructions.first_sentence.forgot_password') + I18n.t( + 'user_mailer.email_confirmation_instructions.first_sentence.forgot_password', + app_name: APP_NAME, + ) end ## diff --git a/app/services/user_alerts/alert_user_about_account_verified.rb b/app/services/user_alerts/alert_user_about_account_verified.rb index a7ab87fa3ca..4ecf188a4b3 100644 --- a/app/services/user_alerts/alert_user_about_account_verified.rb +++ b/app/services/user_alerts/alert_user_about_account_verified.rb @@ -1,13 +1,13 @@ module UserAlerts class AlertUserAboutAccountVerified - def self.call(user:, date_time:, app:, disavowal_token:) - app ||= APP_NAME + def self.call(user:, date_time:, sp_name:, disavowal_token:) + sp_name ||= APP_NAME user.confirmed_email_addresses.each do |email_address| UserMailer.account_verified( user, email_address, date_time: date_time, - app: app, + sp_name: sp_name, disavowal_token: disavowal_token, ).deliver_now end diff --git a/app/validators/account_reset/granted_token_validator.rb b/app/validators/account_reset/granted_token_validator.rb index cfde7e7b87a..4207e92c4cf 100644 --- a/app/validators/account_reset/granted_token_validator.rb +++ b/app/validators/account_reset/granted_token_validator.rb @@ -5,7 +5,9 @@ module GrantedTokenValidator included do validates :token, presence: { - message: proc { I18n.t('errors.account_reset.granted_token_missing') }, + message: proc do + I18n.t('errors.account_reset.granted_token_missing', app_name: APP_NAME) + end, } validate :token_exists, if: :token_present? validate :token_not_expired, if: :token_present? @@ -18,12 +20,12 @@ module GrantedTokenValidator def token_exists return if account_reset_request - errors.add(:token, I18n.t('errors.account_reset.granted_token_invalid')) + errors.add(:token, I18n.t('errors.account_reset.granted_token_invalid', app_name: APP_NAME)) end def token_not_expired return unless account_reset_request&.granted_token_expired? - errors.add(:token, I18n.t('errors.account_reset.granted_token_expired')) + errors.add(:token, I18n.t('errors.account_reset.granted_token_expired', app_name: APP_NAME)) end def token_present? diff --git a/app/view_models/sign_up_completions_show.rb b/app/view_models/sign_up_completions_show.rb index 3ff5fa534a3..1265e568813 100644 --- a/app/view_models/sign_up_completions_show.rb +++ b/app/view_models/sign_up_completions_show.rb @@ -39,14 +39,14 @@ def heading return handoff_heading if handoff? if requested_ial == 'ial2' - return content_tag(:strong, I18n.t('titles.sign_up.verified', app: APP_NAME)) + return content_tag(:strong, I18n.t('titles.sign_up.verified', app_name: APP_NAME)) end safe_join( [I18n.t( 'titles.sign_up.completion_html', accent: content_tag(:strong, I18n.t('titles.sign_up.loa1')), - app: APP_NAME, + app_name: APP_NAME, ).html_safe], ) end @@ -54,12 +54,12 @@ def heading def title if requested_ial == 'ial2' - I18n.t('titles.sign_up.verified', app: APP_NAME) + I18n.t('titles.sign_up.verified', app_name: APP_NAME) else I18n.t( 'titles.sign_up.completion_html', accent: I18n.t('titles.sign_up.loa1'), - app: APP_NAME, + app_name: APP_NAME, ) end end diff --git a/app/views/account_reset/confirm_delete_account/show.html.erb b/app/views/account_reset/confirm_delete_account/show.html.erb index 7c6ffddce27..c5b8c36aacb 100644 --- a/app/views/account_reset/confirm_delete_account/show.html.erb +++ b/app/views/account_reset/confirm_delete_account/show.html.erb @@ -5,7 +5,7 @@ alt: '', class: 'absolute top-n24 left-0 right-0 margin-x-auto') %>

<%= t('account_reset.confirm_delete_account.title') %>

-

<%= t('account_reset.confirm_delete_account.info_html', app: APP_NAME, email: email) %>

+

<%= t('account_reset.confirm_delete_account.info_html', email: email) %>

<%= t('account_reset.confirm_delete_account.cta_html', link: link_to(t('account_reset.confirm_delete_account.link_text'), sign_up_email_path)) %>

diff --git a/app/views/account_reset/delete_account/show.html.erb b/app/views/account_reset/delete_account/show.html.erb index 14466afc2cd..03be192f4f3 100644 --- a/app/views/account_reset/delete_account/show.html.erb +++ b/app/views/account_reset/delete_account/show.html.erb @@ -4,7 +4,7 @@ <%= t('account_reset.delete_account.title') %>

- <%= t('account_reset.delete_account.info', app: APP_NAME) %> + <%= t('account_reset.delete_account.info', app_name: APP_NAME) %>


diff --git a/app/views/accounts/connected_accounts/show.html.erb b/app/views/accounts/connected_accounts/show.html.erb index 8c0e4e76389..1b6188ef661 100644 --- a/app/views/accounts/connected_accounts/show.html.erb +++ b/app/views/accounts/connected_accounts/show.html.erb @@ -5,7 +5,7 @@

- <%= t('account.connected_apps.description') %> + <%= t('account.connected_apps.description', app_name: APP_NAME) %>

diff --git a/app/views/devise/sessions/bounced.html.erb b/app/views/devise/sessions/bounced.html.erb index 656215f403f..1f85c887043 100644 --- a/app/views/devise/sessions/bounced.html.erb +++ b/app/views/devise/sessions/bounced.html.erb @@ -5,6 +5,7 @@

<%= t( 'instructions.sp_handoff_bounced', + app_name: APP_NAME, sp_name: @sp_name, sp_link: @sp_link.blank? ? @sp_name : link_to(@sp_name, @sp_link), ) %> diff --git a/app/views/idv/cancel.html.erb b/app/views/idv/cancel.html.erb index 4a1526c612f..d3070ba9415 100644 --- a/app/views/idv/cancel.html.erb +++ b/app/views/idv/cancel.html.erb @@ -5,7 +5,7 @@

- <%= t('idv.messages.cancel', app: APP_NAME) %> + <%= t('idv.messages.cancel', app_name: APP_NAME) %>

<%= link_to t('forms.buttons.back'), idv_path %> diff --git a/app/views/idv/cancellations/destroy.html.erb b/app/views/idv/cancellations/destroy.html.erb index 1eb4f49b397..7fb76ce6add 100644 --- a/app/views/idv/cancellations/destroy.html.erb +++ b/app/views/idv/cancellations/destroy.html.erb @@ -3,7 +3,7 @@ title: t('titles.idv.cancelled'), heading: @hybrid_session ? t('idv.cancel.headings.confirmation.hybrid') : - t('headings.cancellations.confirmation'), + t('headings.cancellations.confirmation', app_name: APP_NAME), ) do %> <% if @hybrid_session %>

<%= t('doc_auth.instructions.switch_back') %>

@@ -11,8 +11,8 @@ <% else %>
  • <%= t('idv.cancel.warnings.warning_2') %>
  • -
  • <%= t('idv.cancel.warnings.warning_3', app: APP_NAME) %>
  • -
  • <%= t('idv.cancel.warnings.warning_4') %>
  • +
  • <%= t('idv.cancel.warnings.warning_3', app_name: APP_NAME) %>
  • +
  • <%= t('idv.cancel.warnings.warning_4', app_name: APP_NAME) %>
  • <%= t('idv.cancel.warnings.warning_5') %>
<%= link_to( diff --git a/app/views/idv/cancellations/new.html.erb b/app/views/idv/cancellations/new.html.erb index c0dc3ef6417..0948b53672f 100644 --- a/app/views/idv/cancellations/new.html.erb +++ b/app/views/idv/cancellations/new.html.erb @@ -24,8 +24,8 @@
  • <%= t('idv.cancel.warnings.warning_1') %>
  • <%= t('idv.cancel.warnings.warning_2') %>
  • -
  • <%= t('idv.cancel.warnings.warning_3', app: APP_NAME) %>
  • -
  • <%= t('idv.cancel.warnings.warning_4') %>
  • +
  • <%= t('idv.cancel.warnings.warning_3', app_name: APP_NAME) %>
  • +
  • <%= t('idv.cancel.warnings.warning_4', app_name: APP_NAME) %>
  • <%= t('idv.cancel.warnings.warning_5') %>
<% end %> diff --git a/app/views/idv/come_back_later/show.html.erb b/app/views/idv/come_back_later/show.html.erb index c7f57ecba0d..f9be9583edf 100644 --- a/app/views/idv/come_back_later/show.html.erb +++ b/app/views/idv/come_back_later/show.html.erb @@ -22,11 +22,11 @@

- <%= t('idv.messages.come_back_later', app: APP_NAME) %> + <%= t('idv.messages.come_back_later', app_name: APP_NAME) %> <% if decorated_session.sp_name.present? %> <%= t('idv.messages.come_back_later_sp_html', sp: decorated_session.sp_name) %> <% else %> - <%= t('idv.messages.come_back_later_no_sp_html', app: APP_NAME) %> + <%= t('idv.messages.come_back_later_no_sp_html', app_name: APP_NAME) %> <% end %>

diff --git a/app/views/idv/doc_auth/agreement.html.erb b/app/views/idv/doc_auth/agreement.html.erb index eca3738a35f..0f9a3ed0ba5 100644 --- a/app/views/idv/doc_auth/agreement.html.erb +++ b/app/views/idv/doc_auth/agreement.html.erb @@ -31,7 +31,7 @@ aria: {invalid: false} ) %> diff --git a/app/views/idv/doc_auth/welcome.html.erb b/app/views/idv/doc_auth/welcome.html.erb index dae779bab33..d0d1f2f28c8 100644 --- a/app/views/idv/doc_auth/welcome.html.erb +++ b/app/views/idv/doc_auth/welcome.html.erb @@ -99,6 +99,7 @@

<%= t( 'doc_auth.info.privacy_html', + app_name: APP_NAME, link: new_window_link_to( t('doc_auth.instructions.learn_more'), MarketingSite.security_and_privacy_practices_url, diff --git a/app/views/idv/phone_errors/_warning.html.erb b/app/views/idv/phone_errors/_warning.html.erb index 242731bb604..ccb0822efc8 100644 --- a/app/views/idv/phone_errors/_warning.html.erb +++ b/app/views/idv/phone_errors/_warning.html.erb @@ -16,7 +16,7 @@ locals: options: [ local_assigns[:contact_support_option] && { url: MarketingSite.contact_url, - text: t('idv.troubleshooting.options.contact_support', app: APP_NAME), + text: t('idv.troubleshooting.options.contact_support', app_name: APP_NAME), new_tab: true, }, FeatureManagement.enable_gpo_verification? && { diff --git a/app/views/idv/phone_errors/failure.html.erb b/app/views/idv/phone_errors/failure.html.erb index 57ebc61f7cc..bd75ad9db9c 100644 --- a/app/views/idv/phone_errors/failure.html.erb +++ b/app/views/idv/phone_errors/failure.html.erb @@ -14,7 +14,7 @@ }, { url: MarketingSite.contact_url, - text: t('idv.troubleshooting.options.contact_support', app: APP_NAME), + text: t('idv.troubleshooting.options.contact_support', app_name: APP_NAME), new_tab: true, }, ].select(&:present?), diff --git a/app/views/idv/review/new.html.erb b/app/views/idv/review/new.html.erb index 000890a9ae0..2548e53c99f 100644 --- a/app/views/idv/review/new.html.erb +++ b/app/views/idv/review/new.html.erb @@ -10,15 +10,15 @@ <% end %>

- <%= t('idv.titles.session.review') %> + <%= t('idv.titles.session.review', app_name: APP_NAME) %>

- <%= t('idv.messages.sessions.review_message') %> + <%= t('idv.messages.sessions.review_message', app_name: APP_NAME) %>

<%= new_window_link_to( - t('idv.messages.sessions.read_more_encrypt'), + t('idv.messages.sessions.read_more_encrypt', app_name: APP_NAME), MarketingSite.security_url, ) %> diff --git a/app/views/idv/session_errors/exception.html.erb b/app/views/idv/session_errors/exception.html.erb index f95c478568c..f5b5131cd7e 100644 --- a/app/views/idv/session_errors/exception.html.erb +++ b/app/views/idv/session_errors/exception.html.erb @@ -9,7 +9,7 @@ options: [ { url: MarketingSite.contact_url, - text: t('idv.troubleshooting.options.contact_support', app: APP_NAME), + text: t('idv.troubleshooting.options.contact_support', app_name: APP_NAME), new_tab: true, }, decorated_session.sp_name && { diff --git a/app/views/idv/session_errors/failure.html.erb b/app/views/idv/session_errors/failure.html.erb index 096067332c7..7070056b7b5 100644 --- a/app/views/idv/session_errors/failure.html.erb +++ b/app/views/idv/session_errors/failure.html.erb @@ -13,7 +13,7 @@ }, { url: MarketingSite.contact_url, - text: t('idv.troubleshooting.options.contact_support', app: APP_NAME), + text: t('idv.troubleshooting.options.contact_support', app_name: APP_NAME), new_tab: true, }, ].select(&:present?), diff --git a/app/views/idv/session_errors/throttled.html.erb b/app/views/idv/session_errors/throttled.html.erb index 6b9270c1daa..ba6e69c75b0 100644 --- a/app/views/idv/session_errors/throttled.html.erb +++ b/app/views/idv/session_errors/throttled.html.erb @@ -14,7 +14,7 @@ }, { url: MarketingSite.contact_url, - text: t('idv.troubleshooting.options.contact_support', app: APP_NAME), + text: t('idv.troubleshooting.options.contact_support', app_name: APP_NAME), new_tab: true, }, ].select(&:present?), diff --git a/app/views/idv/shared/_document_capture.html.erb b/app/views/idv/shared/_document_capture.html.erb index 6267968fbc1..e5d33a9ab26 100644 --- a/app/views/idv/shared/_document_capture.html.erb +++ b/app/views/idv/shared/_document_capture.html.erb @@ -17,6 +17,7 @@ session_id = flow_session[:document_capture_session_uuid] %> <%= tag.div id: 'document-capture-form', data: { + app_name: APP_NAME, liveness_required: liveness_checking_enabled?.presence, mock_client: (DocAuthRouter.doc_auth_vendor(discriminator: session_id) == 'mock').presence, document_capture_session_uuid: flow_session[:document_capture_session_uuid], diff --git a/app/views/layouts/account_side_nav.html.erb b/app/views/layouts/account_side_nav.html.erb index 1262437b6cc..bded646a8b4 100644 --- a/app/views/layouts/account_side_nav.html.erb +++ b/app/views/layouts/account_side_nav.html.erb @@ -16,10 +16,10 @@
- <%= t('account.navigation.access_services') %> + <%= t('account.navigation.access_services', app_name: APP_NAME) %>
- <%= link_to t('account.navigation.learn_more'), MarketingSite.base_url %> + <%= link_to t('account.navigation.learn_more', app_name: APP_NAME), MarketingSite.base_url %>
diff --git a/app/views/layouts/user_mailer.html.erb b/app/views/layouts/user_mailer.html.erb index 94dfcc3821f..f695ac2cfe6 100644 --- a/app/views/layouts/user_mailer.html.erb +++ b/app/views/layouts/user_mailer.html.erb @@ -106,11 +106,6 @@ MarketingSite.nice_help_url, MarketingSite.help_url, ), - app: link_to( - APP_NAME, - IdentityConfig.store.mailer_domain_name, - style: 'text-decoration: none;', - ), )).html_safe %>

@@ -142,7 +137,7 @@

<%= link_to( - t('mailer.about', app: APP_NAME), + t('mailer.about', app_name: APP_NAME), MarketingSite.base_url, style: 'text-decoration: underline;', ).html_safe %> diff --git a/app/views/sign_up/registrations/_registration_heading.html.erb b/app/views/sign_up/registrations/_registration_heading.html.erb index db94f8b7dac..cae9f8d213a 100644 --- a/app/views/sign_up/registrations/_registration_heading.html.erb +++ b/app/views/sign_up/registrations/_registration_heading.html.erb @@ -1,3 +1,3 @@

- <%= t('headings.create_account_without_sp') %> + <%= t('headings.create_account_without_sp', app_name: APP_NAME) %>

diff --git a/app/views/sign_up/registrations/_sp_registration_heading.html.erb b/app/views/sign_up/registrations/_sp_registration_heading.html.erb index ee46f34bcd0..33bfd80778b 100644 --- a/app/views/sign_up/registrations/_sp_registration_heading.html.erb +++ b/app/views/sign_up/registrations/_sp_registration_heading.html.erb @@ -3,5 +3,5 @@ <%= decorated_session.sp_name %> - <%= t('headings.create_account_with_sp.sp_text') %> + <%= t('headings.create_account_with_sp.sp_text', app_name: APP_NAME) %> diff --git a/app/views/sign_up/registrations/new.html.erb b/app/views/sign_up/registrations/new.html.erb index d065bddd311..c66298a23a0 100644 --- a/app/views/sign_up/registrations/new.html.erb +++ b/app/views/sign_up/registrations/new.html.erb @@ -48,7 +48,7 @@ <%= f.check_box :terms_accepted, { class: 'usa-checkbox__input', required: true, aria: { invalid: false } }, true, false %>