-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
AD-288 Implement Translation Support in Adyen Library for Spartacus S…
…torefront
- Loading branch information
Showing
15 changed files
with
99 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from './translations/translations'; |
11 changes: 11 additions & 0 deletions
11
projects/adyen-payments/src/lib/assets/translations/en/adyen-checkout.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"adyenCheckout": { | ||
"selectBillingAddress": "Select your billing address", | ||
"selectAddress": "Select address", | ||
"paymentFailed": "Payment failed", | ||
"paymentPending": "Payment processing in progress", | ||
"paymentRejected": "Your payment was rejected", | ||
"paymentSuccessful": "Payment successful", | ||
"paymentTimeout": "Payment took longer than expected. Try refreshing page in few minutes" | ||
} | ||
} |
9 changes: 9 additions & 0 deletions
9
projects/adyen-payments/src/lib/assets/translations/en/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
// @ts-ignore | ||
import adyenCheckout from './adyen-checkout.json'; | ||
// @ts-ignore | ||
import paymentErrors from './payment-errors.json'; | ||
|
||
export const en = { | ||
adyenCheckout, | ||
paymentErrors | ||
}; |
27 changes: 27 additions & 0 deletions
27
projects/adyen-payments/src/lib/assets/translations/en/payment-errors.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
{ | ||
"checkout": { | ||
"error": { | ||
"authorization": { | ||
"payment": { | ||
"refused": "The payment is REFUSED.", | ||
"detail": { | ||
"not": { | ||
"found": "The payment is REFUSED because the saved card is removed. Please try an other payment method." | ||
} | ||
} | ||
}, | ||
"restricted": { | ||
"card": "The card is restricted." | ||
}, | ||
"cvc": { | ||
"declined": "The payment is REFUSED. Please check your Card details." | ||
}, | ||
"transaction": { | ||
"not": { | ||
"permitted": "The transaction is not permitted." | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |
15 changes: 15 additions & 0 deletions
15
projects/adyen-payments/src/lib/assets/translations/translations.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import {TranslationChunksConfig, TranslationResources} from "@spartacus/core"; | ||
import {en} from "./en"; | ||
|
||
export const adyenCheckoutTranslations: TranslationResources = { | ||
en, | ||
}; | ||
|
||
export const adyenCheckoutTranslationChunksConfig: TranslationChunksConfig = { | ||
adyenCheckout: [ | ||
'adyenCheckout' | ||
], | ||
paymentErrors: [ | ||
'checkout' | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...n/order-confirmation-payment-status/statuses/failed/order-confirmation-status-failed.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
<div class= "payment-status"> | ||
<cx-order-confirmation-icon-fail/> | ||
<div class="payment-status_text">Payment failed</div> | ||
<div class="payment-status_text">{{ 'adyenCheckout.paymentFailed' | cxTranslate }}</div> | ||
</div> |
2 changes: 1 addition & 1 deletion
2
...order-confirmation-payment-status/statuses/pending/order-confirmation-status-pending.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
<div class= "payment-status"> | ||
<cx-order-confirmation-payment-status-spinner/> | ||
<div class="payment-status_text">Payment processing in progress</div> | ||
<div class="payment-status_text">{{ 'adyenCheckout.paymentPending' | cxTranslate }}</div> | ||
</div> |
2 changes: 1 addition & 1 deletion
2
...der-confirmation-payment-status/statuses/rejected/order-confirmation-status-rejected.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
<div class= "payment-status"> | ||
<cx-order-confirmation-icon-fail/> | ||
<div class="payment-status_text">Your payment was rejected</div> | ||
<div class="payment-status_text">{{ 'adyenCheckout.paymentRejected' | cxTranslate }}</div> | ||
</div> |
2 changes: 1 addition & 1 deletion
2
...order-confirmation-payment-status/statuses/success/order-confirmation-status-success.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
<div class= "payment-status"> | ||
<cx-order-confirmation-icon-success/> | ||
<div class="payment-status_text">Payment successful</div> | ||
<div class="payment-status_text">{{ 'adyenCheckout.paymentSuccessful' | cxTranslate }}</div> | ||
</div> |
2 changes: 1 addition & 1 deletion
2
...order-confirmation-payment-status/statuses/timeout/order-confirmation-status-timeout.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
<div class= "payment-status"> | ||
<cx-order-confirmation-icon-timeout/> | ||
<div class="payment-status_text">Payment took longer than expected. Try refreshing page in few minutes</div> | ||
<div class="payment-status_text">{{ 'adyenCheckout.paymentTimeout' | cxTranslate }}</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters