Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: use the paymentStatus translation key to display the right payment status #772

Merged
merged 9 commits into from
Oct 31, 2024
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<p>{{ orderGetters.getPaymentMethodName(order) }}</p>

<h2 class="font-medium text-base mt-4">{{ $t('account.ordersAndReturns.paymentSummary.paymentStatus') }}</h2>
<p data-testid="order-payment-status">{{ orderGetters.getPaymentStatus(order) }}</p>
<p data-testid="order-payment-status">{{ $t(orderGetters.getPaymentStatusKey(order)) }}</p>
</template>

<script setup lang="ts">
Expand Down
8 changes: 8 additions & 0 deletions apps/web/lang/de.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
{
"orderConfirmationPaymentStatus": {
"unpaid": "Nicht bezahlt",
"fullyPaid": "Bezahlt",
"overpaid": "Überzahlt",
"partlyPaid": "Teilweise bezahlt",
"prepaid": "Im Voraus bezahlt",
"unknown": "Fehler beim abrufen des Zahlungsstatus"
},
"CookieBar": {
"Accept All": "Alles akzeptieren",
"Accept Selection": "Auswahl akzeptieren",
Expand Down
8 changes: 8 additions & 0 deletions apps/web/lang/en.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
{
"orderConfirmationPaymentStatus": {
"unpaid": "Not paid",
"fullyPaid": "Paid",
"overpaid": "Overpaid",
"partlyPaid": "Partially paid",
"prepaid": "Prepaid",
"unknown": "Error retrieving payment status"
},
"CookieBar": {
"Accept All": "Accept All",
"Accept Selection": "Accept Selection",
Expand Down
1 change: 1 addition & 0 deletions docs/changelog/changelog_en.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
- Started to unify the SDK/API error handling. Errors do now return keys that can be translated in the frontend.
- Manufacturer visual improvments
- Changed manufacturer translation text.
- The payment status on an order now supports a second argument, allowing you to define custom translations for the different payment states.
- In cases where the basket is empty during the checkout process, the system will now redirect to `/cart` and display a notification.
- Increased default notification timeout from 3 to 5 seconds.

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"lhci:mobile": "lhci autorun"
},
"dependencies": {
"@plentymarkets/shop-api": "^0.69.2",
"@plentymarkets/shop-api": "^0.70.0",
"@types/applepayjs": "^14.0.8",
"@vee-validate/nuxt": "^4.13.2",
"@vee-validate/yup": "^4.13.2",
Expand Down
10 changes: 5 additions & 5 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4237,7 +4237,7 @@ __metadata:
"@nuxt/test-utils": ^3.13.1
"@nuxtjs/turnstile": ^0.8.0
"@paypal/paypal-js": 8.1.0
"@plentymarkets/shop-api": ^0.69.2
"@plentymarkets/shop-api": ^0.70.0
"@types/applepayjs": ^14.0.8
"@types/uuid": ^9.0.8
"@vee-validate/nuxt": ^4.13.2
Expand Down Expand Up @@ -4270,14 +4270,14 @@ __metadata:
languageName: unknown
linkType: soft

"@plentymarkets/shop-api@npm:^0.69.2":
version: 0.69.2
resolution: "@plentymarkets/shop-api@npm:0.69.2::__archiveUrl=https%3A%2F%2Fnpm.pkg.github.com%2Fdownload%2F%40plentymarkets%2Fshop-api%2F0.69.2%2F30647f7862c0944605b240584e041457ca19fba4"
"@plentymarkets/shop-api@npm:^0.70.0":
version: 0.70.0
resolution: "@plentymarkets/shop-api@npm:0.70.0::__archiveUrl=https%3A%2F%2Fnpm.pkg.github.com%2Fdownload%2F%40plentymarkets%2Fshop-api%2F0.70.0%2F2f278cfc772ef9d0af21e270e2c68bc0e0edb6c0"
dependencies:
"@vue-storefront/middleware": ^3.10.0
axios: ^1.7.7
consola: ^3.2.3
checksum: fa5e4a0156d84365069dead6138c838cfca5fbcce9b4b0b45b627610883445653b645469352d4b8a8728062f525e543922d35dbfb1e90634e5e59584179cf8ec
checksum: 54a045a55a17183a4addf2ebc6a7e668947bcd205c5500826ec478da0ed23e740c64df991923c716cc5c14d13252f3e1696936b262c187a48319e8246936f8cd
languageName: node
linkType: hard

Expand Down
Loading