Skip to content

Commit

Permalink
Language error translation hotfix (#4466)
Browse files Browse the repository at this point in the history
* add more specific error on form level

* add feature flag to validation

* add translations for language error

* fix translation error

---------

Signed-off-by: Tristan <[email protected]>
  • Loading branch information
TristanB17 authored Aug 30, 2024
1 parent 3934d40 commit b89b361
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ class OrganizationForms::ProfileForm
include Virtus.model
include ActiveModel::Validations
include Config::AcaHelper
include ::L10nHelper

attribute :id, String
attribute :market_kind, Symbol
Expand Down Expand Up @@ -105,7 +106,7 @@ def validate_at_least_one_language_selected
return true unless EnrollRegistry.feature_enabled?(:bs4_broker_flow)
return if self&.language_options&.any?

errors.add(:base, l10n("broker_agencies.registrations.errors.language_options"))
errors.add(:base, l10n("broker_agencies.profiles.errors.language_options"))
end
end
end
Expand Down
2 changes: 1 addition & 1 deletion db/seedfiles/translations/en/cca/broker_agencies.rb
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@
"en.write_here" => "Write here",
"en.broker_agencies.profiles.select_plan" => "Select the plan you wish to quote for all enrollees.",
"en.broker_agencies.profiles.npn_taken_error" => "NPN has already been claimed by another broker. Please contact Health Connector for Business Customer Service at 1-888-813-9220",
"en.broker_agencies.registrations.errors.language_options"=> "Languages cannot be blank",
"en.broker_agencies.profiles.errors.language_options"=> "Languages cannot be blank",
"en.broker_agencies.profiles.detailed_roster_information" => "To create a quote for a new, prospective group, please <a href='%{upload_employee_roster}' onclick='return false;' data-remote='true'><i class='fa fa-file-text-o' aria-hidden='true'></i>upload an employee roster</a>. To create a quote for an existing group, use the roster below and update it as needed to reflect the plan enrollees.",
"en.broker_agencies.profiles.to_compare_plans" => "To compare plans before making your selection, use the checkboxes next to the plan names. You can select up to 3 plans to compare at one time. When comparing costs, note that the maximum monthly cost for employers is based on:",
"en.broker_agencies.broker_invitation.person_name" => "Dear %{person_name},",
Expand Down
2 changes: 1 addition & 1 deletion db/seedfiles/translations/en/dc/broker_agencies.rb
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@
"en.broker_carrier_appointments_enabled_note" => "Note: All Carrier appointments for brokers may not be necessary for participation in %{site_long_name}.",
"en.write_here" => "Write here",
"en.broker_agencies.profiles.npn_taken_error" => "NPN has already been claimed by another broker. Please contact HBX-Customer Service - Call (855) 532-5465.",
"en.broker_agencies.registrations.errors.language_options"=> "Languages cannot be blank",
"en.broker_agencies.profiles.errors.language_options"=> "Languages cannot be blank",
"en.broker_agencies.broker_invitation.thank_you_registering" => "Thank you for registering as a broker through %{site_short_name}.",
"en.broker_agencies.broker_invitation.create_broker_acc" => "Please visit <a href= %{url} target='_blank' rel='noopener noreferrer'> %{site_short_name} </a> to create your broker account and manage your clients.",
"en.broker_agencies.broker_application_confirm.thank_you" => "Thank you for submitting your broker application to %{site_short_name}. Please allow 7-10 business days for %{site_short_name} to review your application.",
Expand Down
2 changes: 1 addition & 1 deletion db/seedfiles/translations/en/me/broker_agencies.rb
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@
"en.broker_carrier_appointments_enabled_note" => "Note: Carrier appointments for broker are not necessary for participation in %{site_long_name}.",
"en.write_here" => "Write here",
"en.broker_agencies.profiles.npn_taken_error" => "<ul><li>This NPN is already registered on <a target='_blank' rel='noopener noreferrer' href='%{main_web_address}'>%{site_short_name}.</a></li><li>If you have clients on <a target='_blank' rel='noopener noreferrer' href='%{website_url}'>HealthCare.gov</a>, you do not need to register. We’ll email you an account invitation once you’ve completed training and we’ve confirmed your active license with health authority with the Maine Bureau of Insurance.</li><li>If you work for a broker but do not have your own NPN, please register using the Expert Staff option. If you already have an account on <a href='%{main_web_address}'>%{site_short_name}</a>, login to that account.</li><li>If you have questions, call <a target='_blank' rel='noopener noreferrer' href='%{main_web_address}'>%{site_short_name}</a> at %{contact_center_short_number}.</li></ul>",
"en.broker_agencies.registrations.errors.language_options"=> "Languages cannot be blank",
"en.broker_agencies.profiles.errors.language_options"=> "Languages cannot be blank",
"en.broker_agencies.broker_invitation.thank_you_registering" => "Thank you for registering as a broker through %{site_short_name}.",
"en.broker_agencies.broker_invitation.create_broker_acc" => "Please visit <a href= %{url} target='_blank' rel='noopener noreferrer'> %{site_short_name} </a> to create your broker account and manage your clients.",
"en.broker_agencies.broker_application_confirm.thank_you" => "Thank you for submitting your broker application to %{site_short_name}. Please allow 7-10 business days for %{site_short_name} to review your application.",
Expand Down

0 comments on commit b89b361

Please sign in to comment.