mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-01 02:03:22 +00:00
12332 - Fix rubocop Rails/I18nLocaleTexts errors
- Add en locales for the hardcodded strings
This commit is contained in:
@@ -576,11 +576,6 @@ Rails/HasManyOrHasOneDependent:
|
||||
- 'app/models/spree/tax_rate.rb'
|
||||
- 'app/models/spree/variant.rb'
|
||||
|
||||
# Offense count: 3
|
||||
Rails/I18nLocaleTexts:
|
||||
Exclude:
|
||||
- 'app/controllers/admin/stripe_accounts_controller.rb'
|
||||
|
||||
# Offense count: 22
|
||||
# Configuration parameters: IgnoreScopes, Include.
|
||||
# Include: app/models/**/*.rb
|
||||
|
||||
@@ -16,14 +16,14 @@ module Admin
|
||||
authorize! :destroy, stripe_account
|
||||
|
||||
if stripe_account.deauthorize_and_destroy
|
||||
flash[:success] = "Stripe account disconnected."
|
||||
flash[:success] = I18n.t('stripe.success_code.disconnected')
|
||||
else
|
||||
flash[:error] = "Failed to disconnect Stripe."
|
||||
flash[:error] = I18n.t('stripe.error_code.disconnect_failure')
|
||||
end
|
||||
|
||||
redirect_to main_app.edit_admin_enterprise_path(stripe_account.enterprise)
|
||||
rescue ActiveRecord::RecordNotFound
|
||||
flash[:error] = "Failed to disconnect Stripe."
|
||||
flash[:error] = I18n.t('stripe.error_code.disconnect_failure')
|
||||
redirect_to spree.admin_dashboard_path
|
||||
end
|
||||
|
||||
|
||||
@@ -235,6 +235,9 @@ en:
|
||||
transaction_not_allowed: "The card has been declined for an unknown reason."
|
||||
try_again_later: "The card has been declined for an unknown reason."
|
||||
withdrawal_count_limit_exceeded: "The customer has exceeded the balance or credit limit available on their card."
|
||||
disconnect_failure: "Failed to disconnect Stripe."
|
||||
success_code:
|
||||
disconnected: "Stripe account disconnected."
|
||||
|
||||
activemodel:
|
||||
errors:
|
||||
|
||||
Reference in New Issue
Block a user