mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-27 01:43:22 +00:00
Merge pull request #8738 from jibees/add-locale-to-stripe-elements
Add locale to stripe elements options to display stripe error messages in globale interface chosen language
This commit is contained in:
@@ -9,7 +9,7 @@ angular.module('Darkswarm').directive "stripeElements", ($injector, StripeElemen
|
||||
if $injector.has('stripeObject')
|
||||
stripe = $injector.get('stripeObject')
|
||||
|
||||
card = stripe.elements().create 'card',
|
||||
card = stripe.elements({ locale: I18n.base_locale }).create 'card',
|
||||
hidePostalCode: true
|
||||
style:
|
||||
base:
|
||||
|
||||
@@ -18,7 +18,7 @@ export default class extends Controller {
|
||||
|
||||
// Initialize Stripe JS
|
||||
this.stripe = Stripe(this.data.get("key"));
|
||||
this.stripeElement = this.stripe.elements().create("card", {
|
||||
this.stripeElement = this.stripe.elements({ locale: I18n.base_locale }).create("card", {
|
||||
style: this.constructor.styles,
|
||||
hidePostalCode: true
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user