From 3d2d56e22730e230fa1babf6f82b16c07f458d9b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dominik=20=C5=BBegle=C5=84?= Date: Mon, 26 Aug 2019 19:44:42 +0200 Subject: [PATCH] Refactor order section translations (#123) * Refactor translations in order section * Ensure ID uniqueness * Update pot file --- locale/messages.pot | 1546 ++++++++++++++++- src/intl.ts | 36 +- .../OrderAddressEditDialog.tsx | 18 +- .../OrderBulkCancelDialog.tsx | 35 +- .../OrderCancelDialog/OrderCancelDialog.tsx | 112 +- .../OrderCustomer/OrderCustomer.tsx | 77 +- .../OrderCustomerEditDialog.tsx | 14 +- .../OrderCustomerNote/OrderCustomerNote.tsx | 47 +- .../OrderDetailsPage/OrderDetailsPage.tsx | 14 +- .../OrderDraftCancelDialog.tsx | 52 +- .../OrderDraftDetails/OrderDraftDetails.tsx | 66 +- .../OrderDraftDetailsProducts.tsx | 21 +- .../OrderDraftDetailsSummary.tsx | 29 +- .../OrderDraftFinalizeDialog.tsx | 116 +- .../OrderDraftList/OrderDraftList.tsx | 19 +- .../OrderDraftListPage/OrderDraftListPage.tsx | 45 +- .../OrderDraftPage/OrderDraftPage.tsx | 141 +- .../OrderFulfillment/OrderFulfillment.tsx | 75 +- .../OrderFulfillmentCancelDialog.tsx | 90 +- .../OrderFulfillmentDialog.tsx | 257 +-- .../OrderFulfillmentTrackingDialog.tsx | 82 +- .../components/OrderHistory/OrderHistory.tsx | 237 +-- src/orders/components/OrderList/OrderList.tsx | 28 +- .../OrderListFilter/OrderListFilter.tsx | 69 +- .../OrderListPage/OrderListPage.tsx | 74 +- .../OrderMarkAsPaidDialog.tsx | 35 +- .../components/OrderPayment/OrderPayment.tsx | 101 +- .../OrderPaymentDialog/OrderPaymentDialog.tsx | 120 +- .../OrderPaymentVoidDialog.tsx | 18 +- .../OrderProductAddDialog.tsx | 41 +- .../OrderShippingMethodEditDialog.tsx | 12 +- .../OrderUnfulfilledItems.tsx | 184 +- src/orders/index.tsx | 27 +- .../OrderDetails/OrderDetailsMessages.tsx | 144 +- src/orders/views/OrderDraftList.tsx | 46 +- src/orders/views/OrderList/OrderList.tsx | 18 +- 36 files changed, 3045 insertions(+), 1001 deletions(-) diff --git a/locale/messages.pot b/locale/messages.pot index b8b4390f7..eb67d07e0 100644 --- a/locale/messages.pot +++ b/locale/messages.pot @@ -1,6 +1,6 @@ msgid "" msgstr "" -"POT-Creation-Date: 2019-08-26T14:24:42.452Z\n" +"POT-Creation-Date: 2019-08-26T17:42:51.721Z\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "MIME-Version: 1.0\n" @@ -75,6 +75,14 @@ msgctxt "button" msgid "Add Menu" msgstr "" +#: build/locale/src/orders/components/OrderProductAddDialog/OrderProductAddDialog.json +#. [src.orders.components.OrderProductAddDialog.2775402904] - dialog header +#. defaultMessage is: +#. Add Product +msgctxt "dialog header" +msgid "Add Product" +msgstr "" + #: build/locale/src/discounts/components/SaleListPage/SaleListPage.json #. [src.discounts.components.SaleListPage.1742771332] - button #. defaultMessage is: @@ -175,6 +183,14 @@ msgctxt "button" msgid "Add product" msgstr "" +#: build/locale/src/orders/components/OrderDraftDetails/OrderDraftDetails.json +#. [src.orders.components.OrderDraftDetails.2528459381] - button +#. defaultMessage is: +#. Add products +msgctxt "button" +msgid "Add products" +msgstr "" + #: build/locale/src/categories/components/CategoryCreatePage/CategoryCreatePage.json #. [src.categories.components.CategoryCreatePage.2563994280] #. defaultMessage is: @@ -199,6 +215,14 @@ msgctxt "description" msgid "Add search engine title and description to make this collection easier to find" msgstr "" +#: build/locale/src/orders/components/OrderDraftDetailsSummary/OrderDraftDetailsSummary.json +#. [src.orders.components.OrderDraftDetailsSummary.2429341469] - button +#. defaultMessage is: +#. Add shipping carrier +msgctxt "button" +msgid "Add shipping carrier" +msgstr "" + #: build/locale/src/categories/components/CategoryList/CategoryList.json #. [src.categories.components.CategoryList.435697837] - button #. defaultMessage is: @@ -207,6 +231,22 @@ msgctxt "button" msgid "Add subcategory" msgstr "" +#: build/locale/src/orders/components/OrderFulfillment/OrderFulfillment.json +#. [src.orders.components.OrderFulfillment.1119771899] - fulfillment group tracking number +#. defaultMessage is: +#. Add tracking +msgctxt "fulfillment group tracking number" +msgid "Add tracking" +msgstr "" + +#: build/locale/src/orders/components/OrderFulfillmentTrackingDialog/OrderFulfillmentTrackingDialog.json +#. [src.orders.components.OrderFulfillmentTrackingDialog.3680864271] - dialog header +#. defaultMessage is: +#. Add tracking code +msgctxt "dialog header" +msgid "Add tracking code" +msgstr "" + #: build/locale/src/attributes/components/AttributeValues/AttributeValues.json #. [src.attributes.components.AttributeValues.254756045] - add attribute value button #. defaultMessage is: @@ -271,6 +311,14 @@ msgctxt "attribute values list: slug column header" msgid "Admin" msgstr "" +#: build/locale/src/orders/components/OrderListPage/OrderListPage.json +#. [src.orders.components.OrderListPage.875489544] - tab name +#. defaultMessage is: +#. All Orders +msgctxt "tab name" +msgid "All Orders" +msgstr "" + #: build/locale/src/categories/components/CategoryList/CategoryList.json #. [src.categories.components.CategoryList.3229914152] - section header #. defaultMessage is: @@ -279,6 +327,22 @@ msgctxt "section header" msgid "All Subcategories" msgstr "" +#: build/locale/src/orders/components/OrderPaymentDialog/OrderPaymentDialog.json +#. [src.orders.components.OrderPaymentDialog.75546233] - amount of refunded money +#. defaultMessage is: +#. Amount +msgctxt "amount of refunded money" +msgid "Amount" +msgstr "" + +#: build/locale/src/orders/components/OrderCustomer/OrderCustomer.json +#. [src.orders.components.OrderCustomer.4172383244] +#. defaultMessage is: +#. Anonymous user +msgctxt "description" +msgid "Anonymous user" +msgstr "" + #: build/locale/src/discounts/components/VoucherSummary/VoucherSummary.json #. [src.discounts.components.VoucherSummary.2735425668] - voucher #. defaultMessage is: @@ -287,6 +351,30 @@ msgctxt "voucher" msgid "Applies to" msgstr "" +#: build/locale/src/orders/components/OrderCancelDialog/OrderCancelDialog.json +#. [src.orders.components.OrderCancelDialog.3981375672] +#. defaultMessage is: +#. Are you sure you want to cancel order #{orderNumber}? +msgctxt "description" +msgid "Are you sure you want to cancel order #{orderNumber}?" +msgstr "" + +#: build/locale/src/orders/components/OrderFulfillmentCancelDialog/OrderFulfillmentCancelDialog.json +#. [src.orders.components.OrderFulfillmentCancelDialog.2569854889] +#. defaultMessage is: +#. Are you sure you want to cancel this fulfillment? +msgctxt "description" +msgid "Are you sure you want to cancel this fulfillment?" +msgstr "" + +#: build/locale/src/orders/components/OrderBulkCancelDialog/OrderBulkCancelDialog.json +#. [src.orders.components.OrderBulkCancelDialog.276130122] +#. defaultMessage is: +#. Are you sure you want to cancel {counter,plural,one{this order} other{{displayQuantity} orders}}? +msgctxt "description" +msgid "Are you sure you want to cancel {counter,plural,one{this order} other{{displayQuantity} orders}}?" +msgstr "" + #: build/locale/src/attributes/components/AttributeValueDeleteDialog/AttributeValueDeleteDialog.json #. [src.attributes.components.AttributeValueDeleteDialog.273524270] - delete attribute value #. defaultMessage is: @@ -411,6 +499,14 @@ msgctxt "description" msgid "Are you sure you want to delete {counter,plural,one{this menu} other{{displayQuantity} menus}}?" msgstr "" +#: build/locale/src/orders/views/OrderDraftList.json +#. [src.orders.views.1389231130] - dialog content +#. defaultMessage is: +#. Are you sure you want to delete {counter,plural,one{this order draft} other{{displayQuantity} orderDrafts}}? +msgctxt "dialog content" +msgid "Are you sure you want to delete {counter,plural,one{this order draft} other{{displayQuantity} orderDrafts}}?" +msgstr "" + #: build/locale/src/discounts/views/SaleList.json #. [src.discounts.views.2516361175] - dialog content #. defaultMessage is: @@ -459,6 +555,22 @@ msgctxt "dialog content" msgid "Are you sure you want to delete {voucherCode}?" msgstr "" +#: build/locale/src/orders/components/OrderDraftFinalizeDialog/OrderDraftFinalizeDialog.json +#. [src.orders.components.OrderDraftFinalizeDialog.1489195029] +#. defaultMessage is: +#. Are you sure you want to finalize draft #{number}? +msgctxt "description" +msgid "Are you sure you want to finalize draft #{number}?" +msgstr "" + +#: build/locale/src/orders/components/OrderMarkAsPaidDialog/OrderMarkAsPaidDialog.json +#. [src.orders.components.OrderMarkAsPaidDialog.2823153104] +#. defaultMessage is: +#. Are you sure you want to mark this order as paid? +msgctxt "description" +msgid "Are you sure you want to mark this order as paid?" +msgstr "" + #: build/locale/src/collections/views/CollectionList.json #. [src.collections.views.1348793822] #. defaultMessage is: @@ -467,6 +579,14 @@ msgctxt "description" msgid "Are you sure you want to publish {counter,plural,one{this collection} other{{displayQuantity} collections}}?" msgstr "" +#: build/locale/src/orders/components/OrderDraftCancelDialog/OrderDraftCancelDialog.json +#. [src.orders.components.OrderDraftCancelDialog.3199827590] +#. defaultMessage is: +#. Are you sure you want to remove draft #{number}? +msgctxt "description" +msgid "Are you sure you want to remove draft #{number}?" +msgstr "" + #: build/locale/src/discounts/views/SaleDetails.json #. [src.discounts.views.376977560] - dialog content #. defaultMessage is: @@ -519,6 +639,14 @@ msgctxt "description" msgid "Are you sure you want to unpublish {counter,plural,one{this collection} other{{displayQuantity} collections}}?" msgstr "" +#: build/locale/src/orders/components/OrderPaymentVoidDialog/OrderPaymentVoidDialog.json +#. [src.orders.components.OrderPaymentVoidDialog.2217048637] +#. defaultMessage is: +#. Are you sure you want to void this payment? +msgctxt "description" +msgid "Are you sure you want to void this payment?" +msgstr "" + #: build/locale/src/discounts/components/DiscountCountrySelectDialog/DiscountCountrySelectDialog.json #. [src.discounts.components.DiscountCountrySelectDialog.1585396479] - dialog header #. defaultMessage is: @@ -631,6 +759,14 @@ msgctxt "description" msgid "Availability" msgstr "" +#: build/locale/src/intl.json +#. [src.back] - button +#. defaultMessage is: +#. Back +msgctxt "button" +msgid "Back" +msgstr "" + #: build/locale/src/categories/components/CategoryBackground/CategoryBackground.json #. [src.categories.components.CategoryBackground.1849089820] - section header #. defaultMessage is: @@ -643,6 +779,14 @@ msgctxt "section header" msgid "Background image (optional)" msgstr "" +#: build/locale/src/orders/components/OrderCustomer/OrderCustomer.json +#. [src.orders.components.OrderCustomer.4282475982] +#. defaultMessage is: +#. Billing Address +msgctxt "description" +msgid "Billing Address" +msgstr "" + #: build/locale/src/customers/components/CustomerAddresses/CustomerAddresses.json #. [src.customers.components.CustomerAddresses.2428885633] - subsection header #. defaultMessage is: @@ -652,13 +796,97 @@ msgid "Billing address" msgstr "" #: build/locale/src/intl.json -#. [cancel] - button +#. [src.cancel] - button #. defaultMessage is: #. Cancel msgctxt "button" msgid "Cancel" msgstr "" +#: build/locale/src/orders/views/OrderList/OrderList.json +#. [src.orders.views.OrderList.3528672691] - cancel orders, button +#. defaultMessage is: +#. Cancel +msgctxt "cancel orders, button" +msgid "Cancel" +msgstr "" + +#: build/locale/src/orders/components/OrderFulfillmentCancelDialog/OrderFulfillmentCancelDialog.json +#. [src.orders.components.OrderFulfillmentCancelDialog.732594284] - dialog header +#. defaultMessage is: +#. Cancel Fulfillment +msgctxt "dialog header" +msgid "Cancel Fulfillment" +msgstr "" + +#: build/locale/src/orders/components/OrderBulkCancelDialog/OrderBulkCancelDialog.json +#. [src.orders.components.OrderBulkCancelDialog.1528036340] - dialog header +#. defaultMessage is: +#. Cancel Orders +msgctxt "dialog header" +msgid "Cancel Orders" +msgstr "" + +#: build/locale/src/orders/components/OrderFulfillmentCancelDialog/OrderFulfillmentCancelDialog.json +#. [src.orders.components.OrderFulfillmentCancelDialog.675709443] - button +#. defaultMessage is: +#. Cancel fulfillment +msgctxt "button" +msgid "Cancel fulfillment" +msgstr "" + +#: build/locale/src/orders/components/OrderCancelDialog/OrderCancelDialog.json +#. [src.orders.components.OrderCancelDialog.1854613983] - dialog header +#. defaultMessage is: +#. Cancel order +msgctxt "dialog header" +msgid "Cancel order" +msgstr "" + +#: build/locale/src/orders/components/OrderDetailsPage/OrderDetailsPage.json +#. [src.orders.components.OrderDetailsPage.1854613983] - button +#. defaultMessage is: +#. Cancel order +#: build/locale/src/orders/components/OrderDraftPage/OrderDraftPage.json +#. [src.orders.components.OrderDraftPage.1854613983] - button +#. defaultMessage is: +#. Cancel order +msgctxt "button" +msgid "Cancel order" +msgstr "" + +#: build/locale/src/orders/components/OrderFulfillment/OrderFulfillment.json +#. [src.orders.components.OrderFulfillment.662203348] - button +#. defaultMessage is: +#. Cancel shipment +msgctxt "button" +msgid "Cancel shipment" +msgstr "" + +#: build/locale/src/orders/components/OrderPayment/OrderPayment.json +#. [src.orders.components.OrderPayment.4211710217] - capture payment, button +#. defaultMessage is: +#. Capture +msgctxt "capture payment, button" +msgid "Capture" +msgstr "" + +#: build/locale/src/orders/components/OrderPaymentDialog/OrderPaymentDialog.json +#. [src.orders.components.OrderPaymentDialog.1466130374] - dialog header +#. defaultMessage is: +#. Capture Payment +msgctxt "dialog header" +msgid "Capture Payment" +msgstr "" + +#: build/locale/src/orders/components/OrderPayment/OrderPayment.json +#. [src.orders.components.OrderPayment.2320183694] - order payment +#. defaultMessage is: +#. Captured amount +msgctxt "order payment" +msgid "Captured amount" +msgstr "" + #: build/locale/src/attributes/components/AttributeDetails/AttributeDetails.json #. [src.attributes.components.AttributeDetails.1005562666] - attribute's editor component #. defaultMessage is: @@ -792,13 +1020,101 @@ msgid "Configuration" msgstr "" #: build/locale/src/intl.json -#. [confirm] - button +#. [src.confirm] - button #. defaultMessage is: #. Confirm msgctxt "button" msgid "Confirm" msgstr "" +#: build/locale/src/orders/components/OrderCustomer/OrderCustomer.json +#. [src.orders.components.OrderCustomer.1111991638] - subheader +#. defaultMessage is: +#. Contact information +msgctxt "subheader" +msgid "Contact information" +msgstr "" + +#: build/locale/src/orders/views/OrderDetails/OrderDetailsMessages.json +#. [src.orders.views.OrderDetails.2714957902] +#. defaultMessage is: +#. Could not add note +msgctxt "description" +msgid "Could not add note" +msgstr "" + +#: build/locale/src/orders/views/OrderDetails/OrderDetailsMessages.json +#. [src.orders.views.OrderDetails.4199953867] +#. defaultMessage is: +#. Could not cancel fulfillment +msgctxt "description" +msgid "Could not cancel fulfillment" +msgstr "" + +#: build/locale/src/orders/views/OrderDetails/OrderDetailsMessages.json +#. [src.orders.views.OrderDetails.562214451] +#. defaultMessage is: +#. Could not create order line +msgctxt "description" +msgid "Could not create order line" +msgstr "" + +#: build/locale/src/orders/views/OrderDetails/OrderDetailsMessages.json +#. [src.orders.views.OrderDetails.2205960666] +#. defaultMessage is: +#. Could not delete order line +msgctxt "description" +msgid "Could not delete order line" +msgstr "" + +#: build/locale/src/orders/views/OrderDetails/OrderDetailsMessages.json +#. [src.orders.views.OrderDetails.149745214] +#. defaultMessage is: +#. Could not finalize draft +msgctxt "description" +msgid "Could not finalize draft" +msgstr "" + +#: build/locale/src/orders/views/OrderDetails/OrderDetailsMessages.json +#. [src.orders.views.OrderDetails.1096896329] +#. defaultMessage is: +#. Could not fulfill items +msgctxt "description" +msgid "Could not fulfill items" +msgstr "" + +#: build/locale/src/orders/views/OrderDetails/OrderDetailsMessages.json +#. [src.orders.views.OrderDetails.1852833563] +#. defaultMessage is: +#. Could not mark order as paid +msgctxt "description" +msgid "Could not mark order as paid" +msgstr "" + +#: build/locale/src/orders/views/OrderDetails/OrderDetailsMessages.json +#. [src.orders.views.OrderDetails.553600482] +#. defaultMessage is: +#. Could not update fulfillment +msgctxt "description" +msgid "Could not update fulfillment" +msgstr "" + +#: build/locale/src/orders/views/OrderDetails/OrderDetailsMessages.json +#. [src.orders.views.OrderDetails.487150696] +#. defaultMessage is: +#. Could not update order line +msgctxt "description" +msgid "Could not update order line" +msgstr "" + +#: build/locale/src/orders/views/OrderDetails/OrderDetailsMessages.json +#. [src.orders.views.OrderDetails.1708579411] +#. defaultMessage is: +#. Could not update shipping method +msgctxt "description" +msgid "Could not update shipping method" +msgstr "" + #: build/locale/src/discounts/components/VoucherDetailsPage/VoucherDetailsPage.json #. [src.discounts.components.VoucherDetailsPage.3109712047] - voucher country range #. defaultMessage is: @@ -871,6 +1187,18 @@ msgctxt "window title" msgid "Create customer" msgstr "" +#: build/locale/src/orders/components/OrderDraftListPage/OrderDraftListPage.json +#. [src.orders.components.OrderDraftListPage.2826235371] - button +#. defaultMessage is: +#. Create order +#: build/locale/src/orders/components/OrderListPage/OrderListPage.json +#. [src.orders.components.OrderListPage.2826235371] - button +#. defaultMessage is: +#. Create order +msgctxt "button" +msgid "Create order" +msgstr "" + #: build/locale/src/collections/views/CollectionCreate.json #. [src.collections.views.1597339737] #. defaultMessage is: @@ -895,6 +1223,30 @@ msgctxt "description" msgid "Creating the navigation structure is done by dragging and dropping. Simply create a new menu item and then drag it into its destined place. You can move items inside one another to create a tree structure and drag items up and down to create a hierarchy" msgstr "" +#: build/locale/src/orders/components/OrderCustomer/OrderCustomer.json +#. [src.orders.components.OrderCustomer.3426593715] - section header +#. defaultMessage is: +#. Customer +msgctxt "section header" +msgid "Customer" +msgstr "" + +#: build/locale/src/orders/components/OrderDraftList/OrderDraftList.json +#. [src.orders.components.OrderDraftList.3426593715] +#. defaultMessage is: +#. Customer +msgctxt "description" +msgid "Customer" +msgstr "" + +#: build/locale/src/orders/components/OrderList/OrderList.json +#. [src.orders.components.OrderList.3426593715] - e-mail or full name +#. defaultMessage is: +#. Customer +msgctxt "e-mail or full name" +msgid "Customer" +msgstr "" + #: build/locale/src/customers/components/CustomerList/CustomerList.json #. [src.customers.components.CustomerList.2339105195] #. defaultMessage is: @@ -983,6 +1335,30 @@ msgctxt "order placement date" msgid "Date" msgstr "" +#: build/locale/src/orders/components/OrderDraftList/OrderDraftList.json +#. [src.orders.components.OrderDraftList.4205493358] - order draft creation date +#. defaultMessage is: +#. Date +msgctxt "order draft creation date" +msgid "Date" +msgstr "" + +#: build/locale/src/orders/components/OrderList/OrderList.json +#. [src.orders.components.OrderList.4205493358] - date when order was placed +#. defaultMessage is: +#. Date +msgctxt "date when order was placed" +msgid "Date" +msgstr "" + +#: build/locale/src/orders/components/OrderListFilter/OrderListFilter.json +#. [src.orders.components.OrderListFilter.4205493358] +#. defaultMessage is: +#. Date +msgctxt "description" +msgid "Date" +msgstr "" + #: build/locale/src/customers/components/CustomerAddress/CustomerAddress.json #. [src.customers.components.CustomerAddress.1224809208] #. defaultMessage is: @@ -1063,6 +1439,14 @@ msgctxt "dialog title" msgid "Delete Collection" msgstr "" +#: build/locale/src/orders/views/OrderDraftList.json +#. [src.orders.views.1161115149] - dialog header +#. defaultMessage is: +#. Delete Order Drafts +msgctxt "dialog header" +msgid "Delete Order Drafts" +msgstr "" + #: build/locale/src/discounts/views/SaleDetails.json #. [src.discounts.views.506030254] - dialog header #. defaultMessage is: @@ -1295,6 +1679,30 @@ msgctxt "description" msgid "Discount Value" msgstr "" +#: build/locale/src/intl.json +#. [src.draftOrders] - draft orders section name +#. defaultMessage is: +#. Draft Orders +msgctxt "draft orders section name" +msgid "Draft Orders" +msgstr "" + +#: build/locale/src/orders/views/OrderDetails/OrderDetailsMessages.json +#. [src.orders.views.OrderDetails.1435191432] +#. defaultMessage is: +#. Draft order successfully finalized +msgctxt "description" +msgid "Draft order successfully finalized" +msgstr "" + +#: build/locale/src/orders/components/OrderHistory/OrderHistory.json +#. [src.orders.components.OrderHistory.3095247195] - order history message +#. defaultMessage is: +#. Draft order was created +msgctxt "order history message" +msgid "Draft order was created" +msgstr "" + #: build/locale/src/attributes/components/AttributeDetails/AttributeDetails.json #. [src.attributes.components.AttributeDetails.1336738461] - product attribute type #. defaultMessage is: @@ -1312,7 +1720,7 @@ msgid "E-mail Address" msgstr "" #: build/locale/src/intl.json -#. [edit] - button +#. [src.edit] - button #. defaultMessage is: #. Edit msgctxt "button" @@ -1335,6 +1743,14 @@ msgctxt "edit menu item, header" msgid "Edit Item" msgstr "" +#: build/locale/src/orders/components/OrderShippingMethodEditDialog/OrderShippingMethodEditDialog.json +#. [src.orders.components.OrderShippingMethodEditDialog.3369240294] - dialog header +#. defaultMessage is: +#. Edit Shipping Method +msgctxt "dialog header" +msgid "Edit Shipping Method" +msgstr "" + #: build/locale/src/attributes/components/AttributeValueEditDialog/AttributeValueEditDialog.json #. [src.attributes.components.AttributeValueEditDialog.1395607402] - edit attribute value #. defaultMessage is: @@ -1343,6 +1759,30 @@ msgctxt "edit attribute value" msgid "Edit Value" msgstr "" +#: build/locale/src/orders/components/OrderAddressEditDialog/OrderAddressEditDialog.json +#. [src.orders.components.OrderAddressEditDialog.2935008093] - dialog header +#. defaultMessage is: +#. Edit billing address +msgctxt "dialog header" +msgid "Edit billing address" +msgstr "" + +#: build/locale/src/orders/components/OrderCustomerEditDialog/OrderCustomerEditDialog.json +#. [src.orders.components.OrderCustomerEditDialog.1411666943] - dialog header +#. defaultMessage is: +#. Edit customer details +msgctxt "dialog header" +msgid "Edit customer details" +msgstr "" + +#: build/locale/src/orders/components/OrderAddressEditDialog/OrderAddressEditDialog.json +#. [src.orders.components.OrderAddressEditDialog.462765358] - dialog header +#. defaultMessage is: +#. Edit shipping address +msgctxt "dialog header" +msgid "Edit shipping address" +msgstr "" + #: build/locale/src/discounts/components/DiscountCategories/DiscountCategories.json #. [src.discounts.components.DiscountCategories.1681512341] - section header #. defaultMessage is: @@ -1423,6 +1863,34 @@ msgctxt "search box label" msgid "Filter Countries" msgstr "" +#: build/locale/src/orders/components/OrderDraftFinalizeDialog/OrderDraftFinalizeDialog.json +#. [src.orders.components.OrderDraftFinalizeDialog.2725265632] - button +#. defaultMessage is: +#. Finalize +#: build/locale/src/orders/components/OrderDraftPage/OrderDraftPage.json +#. [src.orders.components.OrderDraftPage.2725265632] - button +#. defaultMessage is: +#. Finalize +msgctxt "button" +msgid "Finalize" +msgstr "" + +#: build/locale/src/orders/components/OrderDraftFinalizeDialog/OrderDraftFinalizeDialog.json +#. [src.orders.components.OrderDraftFinalizeDialog.678764806] - button +#. defaultMessage is: +#. Finalize anyway +msgctxt "button" +msgid "Finalize anyway" +msgstr "" + +#: build/locale/src/orders/components/OrderDraftFinalizeDialog/OrderDraftFinalizeDialog.json +#. [src.orders.components.OrderDraftFinalizeDialog.845440998] - dialog header +#. defaultMessage is: +#. Finalize draft order +msgctxt "dialog header" +msgid "Finalize draft order" +msgstr "" + #: build/locale/src/intl.json #. [src.firstName] #. defaultMessage is: @@ -1447,6 +1915,94 @@ msgctxt "voucher discount type" msgid "Free Shipping" msgstr "" +#: build/locale/src/orders/components/OrderUnfulfilledItems/OrderUnfulfilledItems.json +#. [src.orders.components.OrderUnfulfilledItems.2095687440] - button +#. defaultMessage is: +#. Fulfill +msgctxt "button" +msgid "Fulfill" +msgstr "" + +#: build/locale/src/orders/components/OrderFulfillmentDialog/OrderFulfillmentDialog.json +#. [src.orders.components.OrderFulfillmentDialog.3236546219] - dialog header +#. defaultMessage is: +#. Fulfill products +msgctxt "dialog header" +msgid "Fulfill products" +msgstr "" + +#: build/locale/src/orders/components/OrderListFilter/OrderListFilter.json +#. [src.orders.components.OrderListFilter.1712863026] - order fulfillment status +#. defaultMessage is: +#. Fulfilled +msgctxt "order fulfillment status" +msgid "Fulfilled" +msgstr "" + +#: build/locale/src/orders/components/OrderFulfillment/OrderFulfillment.json +#. [src.orders.components.OrderFulfillment.3494686506] - section header +#. defaultMessage is: +#. Fulfilled ({quantity}) +msgctxt "section header" +msgid "Fulfilled ({quantity})" +msgstr "" + +#: build/locale/src/orders/components/OrderHistory/OrderHistory.json +#. [src.orders.components.OrderHistory.1521936480] - order history message +#. defaultMessage is: +#. Fulfilled {quantity} items +msgctxt "order history message" +msgid "Fulfilled {quantity} items" +msgstr "" + +#: build/locale/src/orders/components/OrderListFilter/OrderListFilter.json +#. [src.orders.components.OrderListFilter.2943502192] - order +#. defaultMessage is: +#. Fulfillment Status +msgctxt "order" +msgid "Fulfillment Status" +msgstr "" + +#: build/locale/src/orders/components/OrderHistory/OrderHistory.json +#. [src.orders.components.OrderHistory.3081292385] - order history message +#. defaultMessage is: +#. Fulfillment confirmation was sent to customer +msgctxt "order history message" +msgid "Fulfillment confirmation was sent to customer" +msgstr "" + +#: build/locale/src/orders/components/OrderList/OrderList.json +#. [src.orders.components.OrderList.1198046928] +#. defaultMessage is: +#. Fulfillment status +msgctxt "description" +msgid "Fulfillment status" +msgstr "" + +#: build/locale/src/orders/views/OrderDetails/OrderDetailsMessages.json +#. [src.orders.views.OrderDetails.927945225] +#. defaultMessage is: +#. Fulfillment successfully cancelled +msgctxt "description" +msgid "Fulfillment successfully cancelled" +msgstr "" + +#: build/locale/src/orders/views/OrderDetails/OrderDetailsMessages.json +#. [src.orders.views.OrderDetails.1475565380] +#. defaultMessage is: +#. Fulfillment successfully updated +msgctxt "description" +msgid "Fulfillment successfully updated" +msgstr "" + +#: build/locale/src/orders/components/OrderHistory/OrderHistory.json +#. [src.orders.components.OrderHistory.1527620381] - order history message +#. defaultMessage is: +#. Fulfillment was cancelled +msgctxt "order history message" +msgid "Fulfillment was cancelled" +msgstr "" + #: build/locale/src/intl.json #. [src.generalInformations] #. defaultMessage is: @@ -1507,6 +2063,30 @@ msgctxt "number of menu items" msgid "Items" msgstr "" +#: build/locale/src/orders/views/OrderDetails/OrderDetailsMessages.json +#. [src.orders.views.OrderDetails.4245651107] +#. defaultMessage is: +#. Items successfully fulfilled +msgctxt "description" +msgid "Items successfully fulfilled" +msgstr "" + +#: build/locale/src/orders/components/OrderListFilter/OrderListFilter.json +#. [src.orders.components.OrderListFilter.714411029] +#. defaultMessage is: +#. Last 30 Days +msgctxt "description" +msgid "Last 30 Days" +msgstr "" + +#: build/locale/src/orders/components/OrderListFilter/OrderListFilter.json +#. [src.orders.components.OrderListFilter.3053702458] +#. defaultMessage is: +#. Last 7 Days +msgctxt "description" +msgid "Last 7 Days" +msgstr "" + #: build/locale/src/intl.json #. [src.lastName] #. defaultMessage is: @@ -1515,6 +2095,14 @@ msgctxt "description" msgid "Last Name" msgstr "" +#: build/locale/src/orders/components/OrderListFilter/OrderListFilter.json +#. [src.orders.components.OrderListFilter.2292505663] +#. defaultMessage is: +#. Last Year +msgctxt "description" +msgid "Last Year" +msgstr "" + #: build/locale/src/customers/components/CustomerStats/CustomerStats.json #. [src.customers.components.CustomerStats.1135318032] #. defaultMessage is: @@ -1571,8 +2159,16 @@ msgctxt "add link to navigation" msgid "Link to: {url}" msgstr "" +#: build/locale/src/orders/components/OrderHistory/OrderHistory.json +#. [src.orders.components.OrderHistory.1867847329] - order history message +#. defaultMessage is: +#. Links to the order's digital goods were sent +msgctxt "order history message" +msgid "Links to the order's digital goods were sent" +msgstr "" + #: build/locale/src/intl.json -#. [manage] - button +#. [src.manage] - button #. defaultMessage is: #. Manage msgctxt "button" @@ -1611,6 +2207,30 @@ msgctxt "description" msgid "Manage your employees and their permissions" msgstr "" +#: build/locale/src/orders/components/OrderMarkAsPaidDialog/OrderMarkAsPaidDialog.json +#. [src.orders.components.OrderMarkAsPaidDialog.4196844912] - dialog header +#. defaultMessage is: +#. Mark Order as Paid +msgctxt "dialog header" +msgid "Mark Order as Paid" +msgstr "" + +#: build/locale/src/orders/components/OrderPayment/OrderPayment.json +#. [src.orders.components.OrderPayment.3500506678] - order, button +#. defaultMessage is: +#. Mark as paid +msgctxt "order, button" +msgid "Mark as paid" +msgstr "" + +#: build/locale/src/orders/components/OrderHistory/OrderHistory.json +#. [src.orders.components.OrderHistory.3328124376] - order history message +#. defaultMessage is: +#. Marked order as paid +msgctxt "order history message" +msgid "Marked order as paid" +msgstr "" + #: build/locale/src/navigation/components/MenuItems/MenuItems.json #. [menuItemsHeader] - header #. defaultMessage is: @@ -1743,6 +2363,14 @@ msgctxt "navigation section name" msgid "Navigation" msgstr "" +#: build/locale/src/orders/components/OrderDraftDetailsProducts/OrderDraftDetailsProducts.json +#. [src.orders.components.OrderDraftDetailsProducts.546865199] +#. defaultMessage is: +#. No Products added to Order +msgctxt "description" +msgid "No Products added to Order" +msgstr "" + #: build/locale/src/home/components/HomeActivityCard/HomeActivityCard.json #. [homeActivityCardNoActivities] #. defaultMessage is: @@ -1751,6 +2379,14 @@ msgctxt "description" msgid "No activities found" msgstr "" +#: build/locale/src/orders/components/OrderDraftDetailsSummary/OrderDraftDetailsSummary.json +#. [src.orders.components.OrderDraftDetailsSummary.3594442178] +#. defaultMessage is: +#. No applicable shipping carriers +msgctxt "description" +msgid "No applicable shipping carriers" +msgstr "" + #: build/locale/src/attributes/components/AttributeList/AttributeList.json #. [src.attributes.components.AttributeList.1192828581] #. defaultMessage is: @@ -1759,6 +2395,14 @@ msgctxt "description" msgid "No attributes found" msgstr "" +#: build/locale/src/orders/components/OrderDraftFinalizeDialog/OrderDraftFinalizeDialog.json +#. [src.orders.components.OrderDraftFinalizeDialog.115822814] +#. defaultMessage is: +#. No billing address +msgctxt "description" +msgid "No billing address" +msgstr "" + #: build/locale/src/categories/components/CategoryList/CategoryList.json #. [src.categories.components.CategoryList.2054128296] #. defaultMessage is: @@ -1791,6 +2435,14 @@ msgctxt "description" msgid "No customers found" msgstr "" +#: build/locale/src/orders/components/OrderDraftList/OrderDraftList.json +#. [src.orders.components.OrderDraftList.2177368638] +#. defaultMessage is: +#. No draft orders found +msgctxt "description" +msgid "No draft orders found" +msgstr "" + #: build/locale/src/navigation/components/MenuList/MenuList.json #. [menuListNoMenus] #. defaultMessage is: @@ -1799,10 +2451,22 @@ msgctxt "description" msgid "No menus found" msgstr "" +#: build/locale/src/orders/components/OrderCustomerNote/OrderCustomerNote.json +#. [src.orders.components.OrderCustomerNote.1505053535] +#. defaultMessage is: +#. No notes from customer +msgctxt "description" +msgid "No notes from customer" +msgstr "" + #: build/locale/src/customers/components/CustomerOrders/CustomerOrders.json #. [src.customers.components.CustomerOrders.898333473] #. defaultMessage is: #. No orders found +#: build/locale/src/orders/components/OrderList/OrderList.json +#. [src.orders.components.OrderList.898333473] +#. defaultMessage is: +#. No orders found msgctxt "description" msgid "No orders found" msgstr "" @@ -1843,6 +2507,14 @@ msgctxt "description" msgid "No products found" msgstr "" +#: build/locale/src/orders/components/OrderProductAddDialog/OrderProductAddDialog.json +#. [src.orders.components.OrderProductAddDialog.353369701] +#. defaultMessage is: +#. No products matching given query +msgctxt "description" +msgid "No products matching given query" +msgstr "" + #: build/locale/src/home/components/HomeNotificationTable/HomeNotificationTable.json #. [homeNotificationsTableNoProducts] #. defaultMessage is: @@ -1859,6 +2531,14 @@ msgctxt "description" msgid "No sales found" msgstr "" +#: build/locale/src/orders/components/OrderDraftFinalizeDialog/OrderDraftFinalizeDialog.json +#. [src.orders.components.OrderDraftFinalizeDialog.2430492151] +#. defaultMessage is: +#. No shipping address +msgctxt "description" +msgid "No shipping address" +msgstr "" + #: build/locale/src/categories/components/CategoryList/CategoryList.json #. [src.categories.components.CategoryList.2155313053] #. defaultMessage is: @@ -1867,6 +2547,14 @@ msgctxt "description" msgid "No subcategories found" msgstr "" +#: build/locale/src/orders/components/OrderDraftFinalizeDialog/OrderDraftFinalizeDialog.json +#. [src.orders.components.OrderDraftFinalizeDialog.1297434244] +#. defaultMessage is: +#. No user information +msgctxt "description" +msgid "No user information" +msgstr "" + #: build/locale/src/attributes/components/AttributeValues/AttributeValues.json #. [src.attributes.components.AttributeValues.2054206599] - No attribute values found #. defaultMessage is: @@ -1891,6 +2579,18 @@ msgctxt "number of order" msgid "No. of Order" msgstr "" +#: build/locale/src/orders/components/OrderDraftList/OrderDraftList.json +#. [src.orders.components.OrderDraftList.2889196282] +#. defaultMessage is: +#. No. of Order +#: build/locale/src/orders/components/OrderList/OrderList.json +#. [src.orders.components.OrderList.2889196282] +#. defaultMessage is: +#. No. of Order +msgctxt "description" +msgid "No. of Order" +msgstr "" + #: build/locale/src/customers/components/CustomerList/CustomerList.json #. [src.customers.components.CustomerList.1432565772] #. defaultMessage is: @@ -1943,6 +2643,30 @@ msgctxt "product is not published" msgid "Not published" msgstr "" +#: build/locale/src/orders/components/OrderCustomer/OrderCustomer.json +#. [orderCustomerCustomerNotSet] - customer is not set in draft order +#. defaultMessage is: +#. Not set +msgctxt "customer is not set in draft order" +msgid "Not set" +msgstr "" + +#: build/locale/src/orders/components/OrderCustomer/OrderCustomer.json +#. [orderCustomerShippingAddressNotSet] - shipping address is not set in draft order +#. defaultMessage is: +#. Not set +msgctxt "shipping address is not set in draft order" +msgid "Not set" +msgstr "" + +#: build/locale/src/orders/components/OrderCustomer/OrderCustomer.json +#. [orderCustomerBillingAddressNotSet] - no address is set in draft order +#. defaultMessage is: +#. Not set +msgctxt "no address is set in draft order" +msgid "Not set" +msgstr "" + #: build/locale/src/customers/components/CustomerCreateNote/CustomerCreateNote.json #. [src.customers.components.CustomerCreateNote.577013340] - note about customer #. defaultMessage is: @@ -1955,6 +2679,22 @@ msgctxt "note about customer" msgid "Note" msgstr "" +#: build/locale/src/orders/views/OrderDetails/OrderDetailsMessages.json +#. [src.orders.views.OrderDetails.3178394068] +#. defaultMessage is: +#. Note successfully added +msgctxt "description" +msgid "Note successfully added" +msgstr "" + +#: build/locale/src/orders/components/OrderHistory/OrderHistory.json +#. [src.orders.components.OrderHistory.2304318421] - order history message +#. defaultMessage is: +#. Note was added to the order +msgctxt "order history message" +msgid "Note was added to the order" +msgstr "" + #: build/locale/src/customers/components/CustomerCreateNote/CustomerCreateNote.json #. [src.customers.components.CustomerCreateNote.1520756907] - notes about customer header #. defaultMessage is: @@ -1963,6 +2703,14 @@ msgctxt "notes about customer header" msgid "Notes" msgstr "" +#: build/locale/src/orders/components/OrderCustomerNote/OrderCustomerNote.json +#. [src.orders.components.OrderCustomerNote.1520756907] - notes about customer, header +#. defaultMessage is: +#. Notes +msgctxt "notes about customer, header" +msgid "Notes" +msgstr "" + #: build/locale/src/discounts/components/VoucherValue/VoucherValue.json #. [src.discounts.components.VoucherValue.1492866942] - voucher application, switch button #. defaultMessage is: @@ -1971,6 +2719,170 @@ msgctxt "voucher application, switch button" msgid "Only once per order" msgstr "" +#: build/locale/src/orders/components/OrderDraftDetails/OrderDraftDetails.json +#. [src.orders.components.OrderDraftDetails.2343989342] - section header +#. defaultMessage is: +#. Order Details +msgctxt "section header" +msgid "Order Details" +msgstr "" + +#: build/locale/src/orders/components/OrderHistory/OrderHistory.json +#. [src.orders.components.OrderHistory.3990160018] +#. defaultMessage is: +#. Order History +msgctxt "description" +msgid "Order History" +msgstr "" + +#: build/locale/src/orders/components/OrderHistory/OrderHistory.json +#. [src.orders.components.OrderHistory.1230178536] - order history message +#. defaultMessage is: +#. Order address was updated +msgctxt "order history message" +msgid "Order address was updated" +msgstr "" + +#: build/locale/src/orders/components/OrderHistory/OrderHistory.json +#. [src.orders.components.OrderHistory.2369495522] - order history message +#. defaultMessage is: +#. Order confirmation was sent to customer +msgctxt "order history message" +msgid "Order confirmation was sent to customer" +msgstr "" + +#: build/locale/src/orders/views/OrderDraftList.json +#. [src.orders.views.1872939752] +#. defaultMessage is: +#. Order draft succesfully created +#: build/locale/src/orders/views/OrderList/OrderList.json +#. [src.orders.views.OrderList.1872939752] +#. defaultMessage is: +#. Order draft succesfully created +msgctxt "description" +msgid "Order draft succesfully created" +msgstr "" + +#: build/locale/src/orders/views/OrderDetails/OrderDetailsMessages.json +#. [src.orders.views.OrderDetails.1999598492] +#. defaultMessage is: +#. Order line added +msgctxt "description" +msgid "Order line added" +msgstr "" + +#: build/locale/src/orders/views/OrderDetails/OrderDetailsMessages.json +#. [src.orders.views.OrderDetails.1468420349] +#. defaultMessage is: +#. Order line deleted +msgctxt "description" +msgid "Order line deleted" +msgstr "" + +#: build/locale/src/orders/views/OrderDetails/OrderDetailsMessages.json +#. [src.orders.views.OrderDetails.1632861387] +#. defaultMessage is: +#. Order line updated +msgctxt "description" +msgid "Order line updated" +msgstr "" + +#: build/locale/src/orders/views/OrderDetails/OrderDetailsMessages.json +#. [src.orders.views.OrderDetails.1636370257] +#. defaultMessage is: +#. Order marked as paid +msgctxt "description" +msgid "Order marked as paid" +msgstr "" + +#: build/locale/src/orders/views/OrderDetails/OrderDetailsMessages.json +#. [src.orders.views.OrderDetails.3280942553] +#. defaultMessage is: +#. Order payment successfully voided +msgctxt "description" +msgid "Order payment successfully voided" +msgstr "" + +#: build/locale/src/orders/views/OrderDetails/OrderDetailsMessages.json +#. [src.orders.views.OrderDetails.2808777264] +#. defaultMessage is: +#. Order successfully cancelled +msgctxt "description" +msgid "Order successfully cancelled" +msgstr "" + +#: build/locale/src/orders/views/OrderDetails/OrderDetailsMessages.json +#. [src.orders.views.OrderDetails.3367579693] +#. defaultMessage is: +#. Order successfully updated +msgctxt "description" +msgid "Order successfully updated" +msgstr "" + +#: build/locale/src/orders/components/OrderHistory/OrderHistory.json +#. [src.orders.components.OrderHistory.950782935] - order history message +#. defaultMessage is: +#. Order was cancelled +msgctxt "order history message" +msgid "Order was cancelled" +msgstr "" + +#: build/locale/src/orders/components/OrderHistory/OrderHistory.json +#. [src.orders.components.OrderHistory.1964864749] - order history message +#. defaultMessage is: +#. Order was created from draft +msgctxt "order history message" +msgid "Order was created from draft" +msgstr "" + +#: build/locale/src/orders/components/OrderHistory/OrderHistory.json +#. [src.orders.components.OrderHistory.2655541129] - order history message +#. defaultMessage is: +#. Order was fully paid +msgctxt "order history message" +msgid "Order was fully paid" +msgstr "" + +#: build/locale/src/orders/components/OrderHistory/OrderHistory.json +#. [src.orders.components.OrderHistory.184692906] - order history message +#. defaultMessage is: +#. Order was placed +msgctxt "order history message" +msgid "Order was placed" +msgstr "" + +#: build/locale/src/intl.json +#. [src.orders] - orders section name +#. defaultMessage is: +#. Orders +msgctxt "orders section name" +msgid "Orders" +msgstr "" + +#: build/locale/src/orders/views/OrderList/OrderList.json +#. [src.orders.views.OrderList.1136302661] +#. defaultMessage is: +#. Orders cancelled +msgctxt "description" +msgid "Orders cancelled" +msgstr "" + +#: build/locale/src/orders/components/OrderPayment/OrderPayment.json +#. [src.orders.components.OrderPayment.353147224] - order payment +#. defaultMessage is: +#. Outstanding Balance +msgctxt "order payment" +msgid "Outstanding Balance" +msgstr "" + +#: build/locale/src/orders/components/OrderHistory/OrderHistory.json +#. [src.orders.components.OrderHistory.4015160303] - order history message +#. defaultMessage is: +#. Oversold {quantity} items +msgctxt "order history message" +msgid "Oversold {quantity} items" +msgstr "" + #: build/locale/src/intl.json #. [src.pages] - pages section name #. defaultMessage is: @@ -1979,6 +2891,94 @@ msgctxt "pages section name" msgid "Pages" msgstr "" +#: build/locale/src/orders/components/OrderListFilter/OrderListFilter.json +#. [src.orders.components.OrderListFilter.210276526] - order fulfillment status +#. defaultMessage is: +#. Partially Fulfilled +msgctxt "order fulfillment status" +msgid "Partially Fulfilled" +msgstr "" + +#: build/locale/src/orders/components/OrderList/OrderList.json +#. [src.orders.components.OrderList.2743232155] - payment status +#. defaultMessage is: +#. Payment +msgctxt "payment status" +msgid "Payment" +msgstr "" + +#: build/locale/src/orders/components/OrderHistory/OrderHistory.json +#. [src.orders.components.OrderHistory.2020753264] - order history message +#. defaultMessage is: +#. Payment confirmation was sent to customer +msgctxt "order history message" +msgid "Payment confirmation was sent to customer" +msgstr "" + +#: build/locale/src/orders/components/OrderHistory/OrderHistory.json +#. [src.orders.components.OrderHistory.4266665081] - order history message +#. defaultMessage is: +#. Payment failed +msgctxt "order history message" +msgid "Payment failed" +msgstr "" + +#: build/locale/src/orders/views/OrderDetails/OrderDetailsMessages.json +#. [src.orders.views.OrderDetails.557535634] +#. defaultMessage is: +#. Payment not captured: {errorMessage} +msgctxt "description" +msgid "Payment not captured: {errorMessage}" +msgstr "" + +#: build/locale/src/orders/views/OrderDetails/OrderDetailsMessages.json +#. [src.orders.views.OrderDetails.3991286734] - notification +#. defaultMessage is: +#. Payment not refunded: {errorMessage} +msgctxt "notification" +msgid "Payment not refunded: {errorMessage}" +msgstr "" + +#: build/locale/src/orders/views/OrderDetails/OrderDetailsMessages.json +#. [src.orders.views.OrderDetails.1056718390] +#. defaultMessage is: +#. Payment successfully captured +msgctxt "description" +msgid "Payment successfully captured" +msgstr "" + +#: build/locale/src/orders/views/OrderDetails/OrderDetailsMessages.json +#. [src.orders.views.OrderDetails.667274681] +#. defaultMessage is: +#. Payment successfully refunded +msgctxt "description" +msgid "Payment successfully refunded" +msgstr "" + +#: build/locale/src/orders/components/OrderHistory/OrderHistory.json +#. [src.orders.components.OrderHistory.2770854455] - order history message +#. defaultMessage is: +#. Payment was captured +msgctxt "order history message" +msgid "Payment was captured" +msgstr "" + +#: build/locale/src/orders/components/OrderHistory/OrderHistory.json +#. [src.orders.components.OrderHistory.348557206] - order history message +#. defaultMessage is: +#. Payment was refunded +msgctxt "order history message" +msgid "Payment was refunded" +msgstr "" + +#: build/locale/src/orders/components/OrderHistory/OrderHistory.json +#. [src.orders.components.OrderHistory.2566971846] - order history message +#. defaultMessage is: +#. Payment was voided +msgctxt "order history message" +msgid "Payment was voided" +msgstr "" + #: build/locale/src/discounts/components/VoucherTypes/VoucherTypes.json #. [src.discounts.components.VoucherTypes.3688224049] - voucher discount type #. defaultMessage is: @@ -1995,6 +2995,38 @@ msgctxt "attribute position in storefront filters" msgid "Position in faceted navigation" msgstr "" +#: build/locale/src/orders/components/OrderPayment/OrderPayment.json +#. [src.orders.components.OrderPayment.3768782744] - order payment +#. defaultMessage is: +#. Preauthorized amount +msgctxt "order payment" +msgid "Preauthorized amount" +msgstr "" + +#: build/locale/src/orders/components/OrderDraftDetailsProducts/OrderDraftDetailsProducts.json +#. [src.orders.components.OrderDraftDetailsProducts.1134347598] - price or ordered products +#. defaultMessage is: +#. Price +msgctxt "price or ordered products" +msgid "Price" +msgstr "" + +#: build/locale/src/orders/components/OrderFulfillment/OrderFulfillment.json +#. [src.orders.components.OrderFulfillment.1134347598] - product price +#. defaultMessage is: +#. Price +msgctxt "product price" +msgid "Price" +msgstr "" + +#: build/locale/src/orders/components/OrderUnfulfilledItems/OrderUnfulfilledItems.json +#. [src.orders.components.OrderUnfulfilledItems.1134347598] - product unit price +#. defaultMessage is: +#. Price +msgctxt "product unit price" +msgid "Price" +msgstr "" + #: build/locale/src/discounts/components/SalePricing/SalePricing.json #. [src.discounts.components.SalePricing.1099355007] - sale pricing, header #. defaultMessage is: @@ -2011,6 +3043,26 @@ msgctxt "page header" msgid "Primary address" msgstr "" +#: build/locale/src/orders/components/OrderDraftDetailsProducts/OrderDraftDetailsProducts.json +#. [src.orders.components.OrderDraftDetailsProducts.1895667608] +#. defaultMessage is: +#. Product +msgctxt "description" +msgid "Product" +msgstr "" + +#: build/locale/src/orders/components/OrderFulfillment/OrderFulfillment.json +#. [src.orders.components.OrderFulfillment.1895667608] - product name +#. defaultMessage is: +#. Product +#: build/locale/src/orders/components/OrderUnfulfilledItems/OrderUnfulfilledItems.json +#. [src.orders.components.OrderUnfulfilledItems.1895667608] - product name +#. defaultMessage is: +#. Product +msgctxt "product name" +msgid "Product" +msgstr "" + #: build/locale/src/discounts/components/DiscountProducts/DiscountProducts.json #. [src.discounts.components.DiscountProducts.2697405188] #. defaultMessage is: @@ -2035,6 +3087,14 @@ msgctxt "product types section name" msgid "Product Types" msgstr "" +#: build/locale/src/orders/components/OrderFulfillmentDialog/OrderFulfillmentDialog.json +#. [src.orders.components.OrderFulfillmentDialog.4046223826] +#. defaultMessage is: +#. Product name +msgctxt "description" +msgid "Product name" +msgstr "" + #: build/locale/src/categories/components/CategoryProducts/CategoryProducts.json #. [src.categories.components.CategoryProducts.2968663655] - section header #. defaultMessage is: @@ -2091,6 +3151,22 @@ msgctxt "products in collection" msgid "Products in {name}" msgstr "" +#: build/locale/src/orders/components/OrderHistory/OrderHistory.json +#. [src.orders.components.OrderHistory.3506022286] - order history message +#. defaultMessage is: +#. Products were added to draft order +msgctxt "order history message" +msgid "Products were added to draft order" +msgstr "" + +#: build/locale/src/orders/components/OrderHistory/OrderHistory.json +#. [src.orders.components.OrderHistory.2574162126] - order history message +#. defaultMessage is: +#. Products were removed from draft order +msgctxt "order history message" +msgid "Products were removed from draft order" +msgstr "" + #: build/locale/src/intl.json #. [src.properties] #. defaultMessage is: @@ -2135,6 +3211,46 @@ msgctxt "product is published" msgid "Published" msgstr "" +#: build/locale/src/orders/components/OrderDraftDetailsProducts/OrderDraftDetailsProducts.json +#. [src.orders.components.OrderDraftDetailsProducts.2796503714] - quantity of ordered products +#. defaultMessage is: +#. Quantity +msgctxt "quantity of ordered products" +msgid "Quantity" +msgstr "" + +#: build/locale/src/orders/components/OrderFulfillment/OrderFulfillment.json +#. [src.orders.components.OrderFulfillment.2796503714] - ordered product quantity +#. defaultMessage is: +#. Quantity +msgctxt "ordered product quantity" +msgid "Quantity" +msgstr "" + +#: build/locale/src/orders/components/OrderFulfillmentDialog/OrderFulfillmentDialog.json +#. [src.orders.components.OrderFulfillmentDialog.2796503714] - quantity of fulfilled products +#. defaultMessage is: +#. Quantity +msgctxt "quantity of fulfilled products" +msgid "Quantity" +msgstr "" + +#: build/locale/src/orders/components/OrderUnfulfilledItems/OrderUnfulfilledItems.json +#. [src.orders.components.OrderUnfulfilledItems.2796503714] - ordered products +#. defaultMessage is: +#. Quantity +msgctxt "ordered products" +msgid "Quantity" +msgstr "" + +#: build/locale/src/orders/components/OrderListFilter/OrderListFilter.json +#. [src.orders.components.OrderListFilter.2545228781] +#. defaultMessage is: +#. Range +msgctxt "description" +msgid "Range" +msgstr "" + #: build/locale/src/customers/components/CustomerOrders/CustomerOrders.json #. [src.customers.components.CustomerOrders.3878642352] - section header #. defaultMessage is: @@ -2143,6 +3259,38 @@ msgctxt "section header" msgid "Recent orders" msgstr "" +#: build/locale/src/orders/components/OrderPayment/OrderPayment.json +#. [src.orders.components.OrderPayment.2845258362] - button +#. defaultMessage is: +#. Refund +msgctxt "button" +msgid "Refund" +msgstr "" + +#: build/locale/src/orders/components/OrderPaymentDialog/OrderPaymentDialog.json +#. [src.orders.components.OrderPaymentDialog.250371749] - dialog header +#. defaultMessage is: +#. Refund Payment +msgctxt "dialog header" +msgid "Refund Payment" +msgstr "" + +#: build/locale/src/orders/components/OrderBulkCancelDialog/OrderBulkCancelDialog.json +#. [src.orders.components.OrderBulkCancelDialog.187921539] - switch button +#. defaultMessage is: +#. Release all stock allocated to these orders +msgctxt "switch button" +msgid "Release all stock allocated to these orders" +msgstr "" + +#: build/locale/src/orders/components/OrderCancelDialog/OrderCancelDialog.json +#. [src.orders.components.OrderCancelDialog.944150063] - switch button +#. defaultMessage is: +#. Release all stock allocated to this order +msgctxt "switch button" +msgid "Release all stock allocated to this order" +msgstr "" + #: build/locale/src/categories/views/CategoryDetails.json #. [src.categories.views.3488150607] #. defaultMessage is: @@ -2156,13 +3304,29 @@ msgid "Remember this will also delete all products assigned to this category." msgstr "" #: build/locale/src/intl.json -#. [remove] - button +#. [src.remove] - button #. defaultMessage is: #. Remove msgctxt "button" msgid "Remove" msgstr "" +#: build/locale/src/orders/components/OrderDraftCancelDialog/OrderDraftCancelDialog.json +#. [src.orders.components.OrderDraftCancelDialog.500287069] - dialog header +#. defaultMessage is: +#. Remove draft order +msgctxt "dialog header" +msgid "Remove draft order" +msgstr "" + +#: build/locale/src/orders/views/OrderDraftList.json +#. [src.orders.views.3880993240] +#. defaultMessage is: +#. Removed draft orders +msgctxt "description" +msgid "Removed draft orders" +msgstr "" + #: build/locale/src/discounts/views/SaleDetails.json #. [src.discounts.views.2534378844] #. defaultMessage is: @@ -2171,6 +3335,38 @@ msgctxt "description" msgid "Removed sale" msgstr "" +#: build/locale/src/orders/components/OrderFulfillmentCancelDialog/OrderFulfillmentCancelDialog.json +#. [src.orders.components.OrderFulfillmentCancelDialog.3515223857] - switch button +#. defaultMessage is: +#. Restock items? +msgctxt "switch button" +msgid "Restock items?" +msgstr "" + +#: build/locale/src/orders/components/OrderHistory/OrderHistory.json +#. [src.orders.components.OrderHistory.2027649178] - order history message +#. defaultMessage is: +#. Restocked {quantity} items +msgctxt "order history message" +msgid "Restocked {quantity} items" +msgstr "" + +#: build/locale/src/orders/components/OrderFulfillmentDialog/OrderFulfillmentDialog.json +#. [src.orders.components.OrderFulfillmentDialog.693960049] - product's sku +#. defaultMessage is: +#. SKU +msgctxt "product's sku" +msgid "SKU" +msgstr "" + +#: build/locale/src/orders/components/OrderProductAddDialog/OrderProductAddDialog.json +#. [src.orders.components.OrderProductAddDialog.2272209368] - variant sku +#. defaultMessage is: +#. SKU {sku} +msgctxt "variant sku" +msgid "SKU {sku}" +msgstr "" + #: build/locale/src/intl.json #. [src.sales] - sales section name #. defaultMessage is: @@ -2179,8 +3375,16 @@ msgctxt "sales section name" msgid "Sales" msgstr "" +#: build/locale/src/orders/components/OrderCustomer/OrderCustomer.json +#. [src.orders.components.OrderCustomer.3912924864] - billing address +#. defaultMessage is: +#. Same as shipping address +msgctxt "billing address" +msgid "Same as shipping address" +msgstr "" + #: build/locale/src/intl.json -#. [save] - button +#. [src.save] - button #. defaultMessage is: #. Save msgctxt "button" @@ -2195,6 +3399,30 @@ msgctxt "description" msgid "Saved changes" msgstr "" +#: build/locale/src/orders/components/OrderCustomer/OrderCustomer.json +#. [src.orders.components.OrderCustomer.2433460203] +#. defaultMessage is: +#. Search Customers +msgctxt "description" +msgid "Search Customers" +msgstr "" + +#: build/locale/src/orders/components/OrderListPage/OrderListPage.json +#. [src.orders.components.OrderListPage.355376157] +#. defaultMessage is: +#. Search Orders... +msgctxt "description" +msgid "Search Orders..." +msgstr "" + +#: build/locale/src/orders/components/OrderProductAddDialog/OrderProductAddDialog.json +#. [src.orders.components.OrderProductAddDialog.2850255786] +#. defaultMessage is: +#. Search Products +msgctxt "description" +msgid "Search Products" +msgstr "" + #: build/locale/src/discounts/components/DiscountCountrySelectDialog/DiscountCountrySelectDialog.json #. [src.discounts.components.DiscountCountrySelectDialog.2110418881] - search box placeholder #. defaultMessage is: @@ -2203,6 +3431,14 @@ msgctxt "search box placeholder" msgid "Search by country name" msgstr "" +#: build/locale/src/orders/components/OrderProductAddDialog/OrderProductAddDialog.json +#. [src.orders.components.OrderProductAddDialog.2336947364] +#. defaultMessage is: +#. Search by product name, attribute, product type etc... +msgctxt "description" +msgid "Search by product name, attribute, product type etc..." +msgstr "" + #: build/locale/src/attributes/components/AttributeList/AttributeList.json #. [src.attributes.components.AttributeList.2235596452] - attribute can be searched in dashboard #. defaultMessage is: @@ -2211,6 +3447,14 @@ msgctxt "attribute can be searched in dashboard" msgid "Searchable" msgstr "" +#: build/locale/src/orders/components/OrderListPage/OrderListPage.json +#. [src.orders.components.OrderListPage.3524904717] +#. defaultMessage is: +#. Select all orders where: +msgctxt "description" +msgid "Select all orders where:" +msgstr "" + #: build/locale/src/customers/components/CustomerAddress/CustomerAddress.json #. [src.customers.components.CustomerAddress.3096438859] - button #. defaultMessage is: @@ -2235,6 +3479,22 @@ msgctxt "voucher end date, switch button" msgid "Set end date" msgstr "" +#: build/locale/src/orders/components/OrderPayment/OrderPayment.json +#. [src.orders.components.OrderPayment.1325966144] - order shipping method name +#. defaultMessage is: +#. Shipping +msgctxt "order shipping method name" +msgid "Shipping" +msgstr "" + +#: build/locale/src/orders/components/OrderCustomer/OrderCustomer.json +#. [src.orders.components.OrderCustomer.2758581442] +#. defaultMessage is: +#. Shipping Address +msgctxt "description" +msgid "Shipping Address" +msgstr "" + #: build/locale/src/intl.json #. [src.shipping] - shipping section name #. defaultMessage is: @@ -2251,8 +3511,40 @@ msgctxt "subsection header" msgid "Shipping address" msgstr "" +#: build/locale/src/orders/components/OrderHistory/OrderHistory.json +#. [src.orders.components.OrderHistory.651019008] - order history message +#. defaultMessage is: +#. Shipping details was sent to customer +msgctxt "order history message" +msgid "Shipping details was sent to customer" +msgstr "" + +#: build/locale/src/orders/components/OrderDraftFinalizeDialog/OrderDraftFinalizeDialog.json +#. [src.orders.components.OrderDraftFinalizeDialog.2824936338] +#. defaultMessage is: +#. Shipping method provided, but no product requires it +msgctxt "description" +msgid "Shipping method provided, but no product requires it" +msgstr "" + +#: build/locale/src/orders/views/OrderDetails/OrderDetailsMessages.json +#. [src.orders.views.OrderDetails.617145655] +#. defaultMessage is: +#. Shipping method successfully updated +msgctxt "description" +msgid "Shipping method successfully updated" +msgstr "" + +#: build/locale/src/orders/components/OrderHistory/OrderHistory.json +#. [src.orders.components.OrderHistory.3453124210] - order history message +#. defaultMessage is: +#. Shipping tracking number was sent to customer +msgctxt "order history message" +msgid "Shipping tracking number was sent to customer" +msgstr "" + #: build/locale/src/intl.json -#. [show] - button +#. [src.show] - button #. defaultMessage is: #. Show msgctxt "button" @@ -2267,6 +3559,22 @@ msgctxt "site settings section name" msgid "Site Settings" msgstr "" +#: build/locale/src/orders/components/OrderDraftFinalizeDialog/OrderDraftFinalizeDialog.json +#. [src.orders.components.OrderDraftFinalizeDialog.2968256006] +#. defaultMessage is: +#. Some products require shipping, but no method provided +msgctxt "description" +msgid "Some products require shipping, but no method provided" +msgstr "" + +#: build/locale/src/orders/components/OrderListFilter/OrderListFilter.json +#. [src.orders.components.OrderListFilter.789263812] +#. defaultMessage is: +#. Specific Date +msgctxt "description" +msgid "Specific Date" +msgstr "" + #: build/locale/src/intl.json #. [src.staff] - staff section name #. defaultMessage is: @@ -2323,6 +3631,14 @@ msgctxt "order status" msgid "Status" msgstr "" +#: build/locale/src/orders/components/OrderListFilter/OrderListFilter.json +#. [src.orders.components.OrderListFilter.1756106276] - order fulfillment status +#. defaultMessage is: +#. Status +msgctxt "order fulfillment status" +msgid "Status" +msgstr "" + #: build/locale/src/attributes/components/AttributeProperties/AttributeProperties.json #. [src.attributes.components.AttributeProperties.1877630205] - attribute properties regarding storefront #. defaultMessage is: @@ -2347,6 +3663,22 @@ msgctxt "number of subcategories in category" msgid "Subcategories" msgstr "" +#: build/locale/src/orders/components/OrderDraftDetailsSummary/OrderDraftDetailsSummary.json +#. [src.orders.components.OrderDraftDetailsSummary.781550514] - subtotal price or an order +#. defaultMessage is: +#. Subtotal +msgctxt "subtotal price or an order" +msgid "Subtotal" +msgstr "" + +#: build/locale/src/orders/components/OrderPayment/OrderPayment.json +#. [src.orders.components.OrderPayment.781550514] - order subtotal price +#. defaultMessage is: +#. Subtotal +msgctxt "order subtotal price" +msgid "Subtotal" +msgstr "" + #: build/locale/src/attributes/views/AttributeCreate/AttributeCreate.json #. [src.attributes.views.AttributeCreate.11941964] #. defaultMessage is: @@ -2387,6 +3719,22 @@ msgctxt "taxes section name" msgid "Taxes" msgstr "" +#: build/locale/src/orders/components/OrderPayment/OrderPayment.json +#. [src.orders.components.OrderPayment.3955023266] +#. defaultMessage is: +#. Taxes +msgctxt "description" +msgid "Taxes" +msgstr "" + +#: build/locale/src/orders/components/OrderDraftDetailsSummary/OrderDraftDetailsSummary.json +#. [src.orders.components.OrderDraftDetailsSummary.3202709354] +#. defaultMessage is: +#. Taxes (VAT included) +msgctxt "description" +msgid "Taxes (VAT included)" +msgstr "" + #: build/locale/src/home/components/HomeScreen.json #. [homeScreenDisclaimerText2] #. defaultMessage is: @@ -2411,6 +3759,14 @@ msgctxt "description" msgid "The primary address of this customer." msgstr "" +#: build/locale/src/orders/components/OrderDraftFinalizeDialog/OrderDraftFinalizeDialog.json +#. [src.orders.components.OrderDraftFinalizeDialog.1472924390] +#. defaultMessage is: +#. There are missing or incorrect informations about this order: +msgctxt "description" +msgid "There are missing or incorrect informations about this order:" +msgstr "" + #: build/locale/src/customers/components/CustomerAddressListPage/CustomerAddressListPage.json #. [src.customers.components.CustomerAddressListPage.1484733755] #. defaultMessage is: @@ -2475,6 +3831,82 @@ msgctxt "order total amount" msgid "Total" msgstr "" +#: build/locale/src/orders/components/OrderDraftDetailsProducts/OrderDraftDetailsProducts.json +#. [src.orders.components.OrderDraftDetailsProducts.878013594] - total price of ordered products +#. defaultMessage is: +#. Total +msgctxt "total price of ordered products" +msgid "Total" +msgstr "" + +#: build/locale/src/orders/components/OrderDraftDetailsSummary/OrderDraftDetailsSummary.json +#. [src.orders.components.OrderDraftDetailsSummary.878013594] - total price of an order +#. defaultMessage is: +#. Total +msgctxt "total price of an order" +msgid "Total" +msgstr "" + +#: build/locale/src/orders/components/OrderDraftList/OrderDraftList.json +#. [src.orders.components.OrderDraftList.878013594] - order draft total price +#. defaultMessage is: +#. Total +msgctxt "order draft total price" +msgid "Total" +msgstr "" + +#: build/locale/src/orders/components/OrderFulfillment/OrderFulfillment.json +#. [src.orders.components.OrderFulfillment.878013594] - order line total price +#. defaultMessage is: +#. Total +#: build/locale/src/orders/components/OrderUnfulfilledItems/OrderUnfulfilledItems.json +#. [src.orders.components.OrderUnfulfilledItems.878013594] - order line total price +#. defaultMessage is: +#. Total +msgctxt "order line total price" +msgid "Total" +msgstr "" + +#: build/locale/src/orders/components/OrderList/OrderList.json +#. [src.orders.components.OrderList.878013594] - total order price +#. defaultMessage is: +#. Total +msgctxt "total order price" +msgid "Total" +msgstr "" + +#: build/locale/src/orders/components/OrderPayment/OrderPayment.json +#. [src.orders.components.OrderPayment.878013594] - order total price +#. defaultMessage is: +#. Total +msgctxt "order total price" +msgid "Total" +msgstr "" + +#: build/locale/src/orders/components/OrderFulfillment/OrderFulfillment.json +#. [src.orders.components.OrderFulfillment.3254150098] +#. defaultMessage is: +#. Tracking Number: {trackingNumber} +msgctxt "description" +msgid "Tracking Number: {trackingNumber}" +msgstr "" + +#: build/locale/src/orders/components/OrderFulfillmentDialog/OrderFulfillmentDialog.json +#. [src.orders.components.OrderFulfillmentDialog.3252172269] - fulfillment group +#. defaultMessage is: +#. Tracking number +msgctxt "fulfillment group" +msgid "Tracking number" +msgstr "" + +#: build/locale/src/orders/components/OrderFulfillmentTrackingDialog/OrderFulfillmentTrackingDialog.json +#. [src.orders.components.OrderFulfillmentTrackingDialog.3252172269] +#. defaultMessage is: +#. Tracking number +msgctxt "description" +msgid "Tracking number" +msgstr "" + #: build/locale/src/categories/components/CategoryProducts/CategoryProducts.json #. [src.categories.components.CategoryProducts.1952810469] - product type #. defaultMessage is: @@ -2600,13 +4032,29 @@ msgid "Unassign products from collection" msgstr "" #: build/locale/src/intl.json -#. [undo] - button +#. [src.undo] - button #. defaultMessage is: #. Undo msgctxt "button" msgid "Undo" msgstr "" +#: build/locale/src/orders/components/OrderListFilter/OrderListFilter.json +#. [src.orders.components.OrderListFilter.1751787272] - order fulfillment status +#. defaultMessage is: +#. Unfulfilled +msgctxt "order fulfillment status" +msgid "Unfulfilled" +msgstr "" + +#: build/locale/src/orders/components/OrderUnfulfilledItems/OrderUnfulfilledItems.json +#. [src.orders.components.OrderUnfulfilledItems.2886647373] - section header +#. defaultMessage is: +#. Unfulfilled ({quantity}) +msgctxt "section header" +msgid "Unfulfilled ({quantity})" +msgstr "" + #: build/locale/src/collections/views/CollectionList.json #. [src.collections.views.2237014112] - unpublish collections #. defaultMessage is: @@ -2623,6 +4071,14 @@ msgctxt "dialog title" msgid "Unpublish collections" msgstr "" +#: build/locale/src/orders/components/OrderHistory/OrderHistory.json +#. [src.orders.components.OrderHistory.4265697648] - order history message +#. defaultMessage is: +#. Updated fulfillment group's tracking number +msgctxt "order history message" +msgid "Updated fulfillment group's tracking number" +msgstr "" + #: build/locale/src/intl.json #. [src.uploadImage] - button #. defaultMessage is: @@ -2687,6 +4143,14 @@ msgctxt "voucher uses" msgid "Uses" msgstr "" +#: build/locale/src/orders/components/OrderPayment/OrderPayment.json +#. [src.orders.components.OrderPayment.1817306106] - vat included in order price +#. defaultMessage is: +#. VAT included +msgctxt "vat included in order price" +msgid "VAT included" +msgstr "" + #: build/locale/src/discounts/components/SaleList/SaleList.json #. [src.discounts.components.SaleList.1148029984] - sale value #. defaultMessage is: @@ -2735,6 +4199,14 @@ msgctxt "attribute value deleted" msgid "Value deleted" msgstr "" +#: build/locale/src/orders/components/OrderCustomer/OrderCustomer.json +#. [src.orders.components.OrderCustomer.2672803871] - link +#. defaultMessage is: +#. View Profile +msgctxt "link" +msgid "View Profile" +msgstr "" + #: build/locale/src/customers/components/CustomerOrders/CustomerOrders.json #. [src.customers.components.CustomerOrders.3029139173] - button #. defaultMessage is: @@ -2767,6 +4239,22 @@ msgctxt "attribute" msgid "Visible on Product Page in Storefront" msgstr "" +#: build/locale/src/orders/components/OrderPayment/OrderPayment.json +#. [src.orders.components.OrderPayment.2444197639] - void payment, button +#. defaultMessage is: +#. Void +msgctxt "void payment, button" +msgid "Void" +msgstr "" + +#: build/locale/src/orders/components/OrderPaymentVoidDialog/OrderPaymentVoidDialog.json +#. [src.orders.components.OrderPaymentVoidDialog.3089049828] - dialog header +#. defaultMessage is: +#. Void Payment +msgctxt "dialog header" +msgid "Void Payment" +msgstr "" + #: build/locale/src/discounts/components/VoucherDetailsPage/VoucherDetailsPage.json #. [src.discounts.components.VoucherDetailsPage.2071139683] #. defaultMessage is: @@ -2791,6 +4279,38 @@ msgctxt "vouchers section name" msgid "Vouchers" msgstr "" +#: build/locale/src/orders/components/OrderPayment/OrderPayment.json +#. [orderPaymentVATDoesNotApply] - vat not included in order price +#. defaultMessage is: +#. does not apply +msgctxt "vat not included in order price" +msgid "does not apply" +msgstr "" + +#: build/locale/src/orders/components/OrderPayment/OrderPayment.json +#. [orderPaymentShippingDoesNotApply] - order does not require shipping +#. defaultMessage is: +#. does not apply +msgctxt "order does not require shipping" +msgid "does not apply" +msgstr "" + +#: build/locale/src/orders/components/OrderListFilter/OrderListFilter.json +#. [src.orders.components.OrderListFilter.3477667254] +#. defaultMessage is: +#. equals +msgctxt "description" +msgid "equals" +msgstr "" + +#: build/locale/src/orders/components/OrderListFilter/OrderListFilter.json +#. [src.orders.components.OrderListFilter.1438173764] - date is set as +#. defaultMessage is: +#. is set as +msgctxt "date is set as" +msgid "is set as" +msgstr "" + #: build/locale/src/home/components/HomeProductListCard/HomeProductListCard.json #. [homeProductListCardOrders] - number of ordered products #. defaultMessage is: @@ -2838,3 +4358,11 @@ msgstr "" msgctxt "customer's address book, header" msgid "{fullName}'s Address Book" msgstr "" + +#: build/locale/src/orders/components/OrderPayment/OrderPayment.json +#. [src.orders.components.OrderPayment.2183023165] - ordered products +#. defaultMessage is: +#. {quantity} items +msgctxt "ordered products" +msgid "{quantity} items" +msgstr "" diff --git a/src/intl.ts b/src/intl.ts index 929513423..96cc3ac33 100644 --- a/src/intl.ts +++ b/src/intl.ts @@ -50,45 +50,41 @@ export const commonMessages = defineMessages({ }); export const buttonMessages = defineMessages({ + back: { + defaultMessage: "Back", + description: "button" + }, cancel: { defaultMessage: "Cancel", - description: "button", - id: "cancel" + description: "button" }, confirm: { defaultMessage: "Confirm", - description: "button", - id: "confirm" + description: "button" }, edit: { defaultMessage: "Edit", - description: "button", - id: "edit" + description: "button" }, manage: { defaultMessage: "Manage", - description: "button", - id: "manage" + description: "button" }, remove: { defaultMessage: "Remove", - description: "button", - id: "remove" + description: "button" }, save: { defaultMessage: "Save", - description: "button", - id: "save" + description: "button" }, show: { defaultMessage: "Show", - description: "button", - id: "show" + description: "button" }, undo: { defaultMessage: "Undo", - description: "button", - id: "undo" + description: "button" } }); @@ -113,10 +109,18 @@ export const sectionNames = defineMessages({ defaultMessage: "Customers", description: "customers section name" }, + draftOrders: { + defaultMessage: "Draft Orders", + description: "draft orders section name" + }, navigation: { defaultMessage: "Navigation", description: "navigation section name" }, + orders: { + defaultMessage: "Orders", + description: "orders section name" + }, pages: { defaultMessage: "Pages", description: "pages section name" diff --git a/src/orders/components/OrderAddressEditDialog/OrderAddressEditDialog.tsx b/src/orders/components/OrderAddressEditDialog/OrderAddressEditDialog.tsx index c351178cb..e6468a9bf 100644 --- a/src/orders/components/OrderAddressEditDialog/OrderAddressEditDialog.tsx +++ b/src/orders/components/OrderAddressEditDialog/OrderAddressEditDialog.tsx @@ -5,6 +5,7 @@ import DialogContent from "@material-ui/core/DialogContent"; import DialogTitle from "@material-ui/core/DialogTitle"; import { createStyles, withStyles, WithStyles } from "@material-ui/core/styles"; import React from "react"; +import { FormattedMessage, useIntl } from "react-intl"; import AddressEdit from "@saleor/components/AddressEdit"; import ConfirmButton, { @@ -12,10 +13,10 @@ import ConfirmButton, { } from "@saleor/components/ConfirmButton"; import Form from "@saleor/components/Form"; import useStateFromProps from "@saleor/hooks/useStateFromProps"; +import { buttonMessages } from "@saleor/intl"; import { maybe } from "@saleor/misc"; import createSingleAutocompleteSelectHandler from "@saleor/utils/handlers/singleAutocompleteSelectChangeHandler"; import { AddressTypeInput } from "../../../customers/types"; -import i18n from "../../../i18n"; import { UserError } from "../../../types"; const styles = createStyles({ @@ -52,6 +53,7 @@ const OrderAddressEditDialog = withStyles(styles, { onClose, onConfirm }: OrderAddressEditDialogProps) => { + const intl = useIntl(); const [countryDisplayName, setCountryDisplayName] = useStateFromProps( maybe( () => countries.find(country => address.country === country.code).label @@ -80,8 +82,14 @@ const OrderAddressEditDialog = withStyles(styles, { <> {variant === "billing" - ? i18n.t("Edit billing address", { context: "title" }) - : i18n.t("Edit shipping address", { context: "title" })} + ? intl.formatMessage({ + defaultMessage: "Edit billing address", + description: "dialog header" + }) + : intl.formatMessage({ + defaultMessage: "Edit shipping address", + description: "dialog header" + })} - {i18n.t("Confirm", { context: "button" })} + diff --git a/src/orders/components/OrderBulkCancelDialog/OrderBulkCancelDialog.tsx b/src/orders/components/OrderBulkCancelDialog/OrderBulkCancelDialog.tsx index 0c25ddeb0..21923f846 100644 --- a/src/orders/components/OrderBulkCancelDialog/OrderBulkCancelDialog.tsx +++ b/src/orders/components/OrderBulkCancelDialog/OrderBulkCancelDialog.tsx @@ -1,10 +1,10 @@ import DialogContentText from "@material-ui/core/DialogContentText"; import React from "react"; +import { FormattedMessage, useIntl } from "react-intl"; import ActionDialog from "@saleor/components/ActionDialog"; import { ConfirmButtonTransitionState } from "@saleor/components/ConfirmButton"; import ControlledCheckbox from "@saleor/components/ControlledCheckbox"; -import i18n from "../../../i18n"; export interface OrderBulkCancelDialogProps { confirmButtonState: ConfirmButtonTransitionState; @@ -17,6 +17,7 @@ export interface OrderBulkCancelDialogProps { const OrderBulkCancelDialog: React.StatelessComponent< OrderBulkCancelDialogProps > = ({ confirmButtonState, numberOfOrders, open, onClose, onConfirm }) => { + const intl = useIntl(); const [restock, setRestock] = React.useState(true); return ( @@ -24,23 +25,31 @@ const OrderBulkCancelDialog: React.StatelessComponent< confirmButtonState={confirmButtonState} open={open} variant="delete" - title={i18n.t("Cancel Orders")} + title={intl.formatMessage({ + defaultMessage: "Cancel Orders", + description: "dialog header" + })} onClose={onClose} onConfirm={() => onConfirm(restock)} > - {{ number }} orders?", - { - number: numberOfOrders - } - ) - }} - /> + + {numberOfOrders} + }} + /> + setRestock(event.target.value)} /> diff --git a/src/orders/components/OrderCancelDialog/OrderCancelDialog.tsx b/src/orders/components/OrderCancelDialog/OrderCancelDialog.tsx index 51eb429aa..0bc4e8e13 100644 --- a/src/orders/components/OrderCancelDialog/OrderCancelDialog.tsx +++ b/src/orders/components/OrderCancelDialog/OrderCancelDialog.tsx @@ -11,13 +11,14 @@ import { WithStyles } from "@material-ui/core/styles"; import React from "react"; +import { FormattedMessage, useIntl } from "react-intl"; import ConfirmButton, { ConfirmButtonTransitionState } from "@saleor/components/ConfirmButton"; import ControlledCheckbox from "@saleor/components/ControlledCheckbox"; import Form from "@saleor/components/Form"; -import i18n from "../../../i18n"; +import { buttonMessages } from "@saleor/intl"; export interface FormData { restock: boolean; @@ -50,55 +51,66 @@ const OrderCancelDialog = withStyles(styles, { name: "OrderCancelDialog" })( open, onSubmit, onClose - }: OrderCancelDialogProps) => ( - -
- {({ data, change }) => { - return ( - <> - - {i18n.t("Cancel order", { context: "title" })} - - - {{ orderNumber }}?", - { orderNumber } - ) - }} - /> - - - - - - {i18n.t("Cancel order", { context: "button" })} - - - - ); - }} -
-
- ) + }: OrderCancelDialogProps) => { + const intl = useIntl(); + + return ( + +
+ {({ data, change }) => { + return ( + <> + + + + + + + + + + + + + + + + + ); + }} +
+
+ ); + } ); OrderCancelDialog.displayName = "OrderCancelDialog"; export default OrderCancelDialog; diff --git a/src/orders/components/OrderCustomer/OrderCustomer.tsx b/src/orders/components/OrderCustomer/OrderCustomer.tsx index c2319a911..3f800300c 100644 --- a/src/orders/components/OrderCustomer/OrderCustomer.tsx +++ b/src/orders/components/OrderCustomer/OrderCustomer.tsx @@ -9,6 +9,7 @@ import { } from "@material-ui/core/styles"; import Typography from "@material-ui/core/Typography"; import React from "react"; +import { FormattedMessage, useIntl } from "react-intl"; import CardTitle from "@saleor/components/CardTitle"; import ExternalLink from "@saleor/components/ExternalLink"; @@ -18,10 +19,10 @@ import Link from "@saleor/components/Link"; import SingleAutocompleteSelectField from "@saleor/components/SingleAutocompleteSelectField"; import Skeleton from "@saleor/components/Skeleton"; import useStateFromProps from "@saleor/hooks/useStateFromProps"; +import { buttonMessages } from "@saleor/intl"; import createSingleAutocompleteSelectHandler from "@saleor/utils/handlers/singleAutocompleteSelectChangeHandler"; import { SearchCustomers_customers_edges_node } from "../../../containers/SearchCustomers/types/SearchCustomers"; import { customerUrl } from "../../../customers/urls"; -import i18n from "../../../i18n"; import { createHref, maybe } from "../../../misc"; import { OrderDetails_order } from "../../types/OrderDetails"; @@ -74,6 +75,8 @@ const OrderCustomer = withStyles(styles, { name: "OrderCustomer" })( onProfileView, onShippingAddressEdit }: OrderCustomerProps) => { + const intl = useIntl(); + const user = maybe(() => order.user); const [userDisplayName, setUserDisplayName] = useStateFromProps( @@ -88,7 +91,10 @@ const OrderCustomer = withStyles(styles, { name: "OrderCustomer" })( return ( - {i18n.t("Edit")} + {intl.formatMessage(buttonMessages.edit)} ) } @@ -133,7 +139,9 @@ const OrderCustomer = withStyles(styles, { name: "OrderCustomer" })( displayValue={userDisplayName} fetchChoices={fetchUsers} loading={loading} - placeholder={i18n.t("Search Customers")} + placeholder={intl.formatMessage({ + defaultMessage: "Search Customers" + })} onChange={handleUserChange} name="query" value={data.query} @@ -142,7 +150,9 @@ const OrderCustomer = withStyles(styles, { name: "OrderCustomer" })( }} ) : user === null ? ( - {i18n.t("Anonymous user")} + + + ) : ( <> @@ -154,14 +164,21 @@ const OrderCustomer = withStyles(styles, { name: "OrderCustomer" })( href={createHref(customerUrl(user.id))} onClick={onProfileView} > - {i18n.t("View Profile")} + {/* TODO: Uncomment it after adding ability to filter orders by customer */} {/*
- {i18n.t("View Orders")} -
*/} + + + + */} )} @@ -169,14 +186,23 @@ const OrderCustomer = withStyles(styles, { name: "OrderCustomer" })(
- {i18n.t("Contact information")} +
{maybe(() => order.userEmail) === undefined ? ( ) : order.userEmail === null ? ( - {i18n.t("Not set")} + + + ) : ( order.userEmail)}`} @@ -190,7 +216,7 @@ const OrderCustomer = withStyles(styles, { name: "OrderCustomer" })(
- {i18n.t("Shipping Address")} + {canEditAddresses && (
@@ -200,7 +226,7 @@ const OrderCustomer = withStyles(styles, { name: "OrderCustomer" })( onClick={onShippingAddressEdit} disabled={!onShippingAddressEdit && user === undefined} > - {i18n.t("Edit")} +
)} @@ -208,7 +234,13 @@ const OrderCustomer = withStyles(styles, { name: "OrderCustomer" })( {shippingAddress === undefined ? ( ) : shippingAddress === null ? ( - {i18n.t("Not set")} + + + ) : ( <> {shippingAddress.companyName && ( @@ -243,7 +275,7 @@ const OrderCustomer = withStyles(styles, { name: "OrderCustomer" })(
- {i18n.t("Billing Address")} + {canEditAddresses && (
@@ -253,7 +285,7 @@ const OrderCustomer = withStyles(styles, { name: "OrderCustomer" })( onClick={onBillingAddressEdit} disabled={!onBillingAddressEdit && user === undefined} > - {i18n.t("Edit")} +
)} @@ -261,9 +293,20 @@ const OrderCustomer = withStyles(styles, { name: "OrderCustomer" })( {billingAddress === undefined ? ( ) : billingAddress === null ? ( - {i18n.t("Not set")} + + + ) : maybe(() => shippingAddress.id) === billingAddress.id ? ( - {i18n.t("Same as shipping address")} + + + ) : ( <> {billingAddress.companyName && ( diff --git a/src/orders/components/OrderCustomerEditDialog/OrderCustomerEditDialog.tsx b/src/orders/components/OrderCustomerEditDialog/OrderCustomerEditDialog.tsx index 7000c2289..a629fc285 100644 --- a/src/orders/components/OrderCustomerEditDialog/OrderCustomerEditDialog.tsx +++ b/src/orders/components/OrderCustomerEditDialog/OrderCustomerEditDialog.tsx @@ -10,12 +10,13 @@ import { WithStyles } from "@material-ui/core/styles"; import React from "react"; +import { FormattedMessage } from "react-intl"; import ConfirmButton, { ConfirmButtonTransitionState } from "@saleor/components/ConfirmButton"; import { SingleAutocompleteSelectField } from "@saleor/components/SingleAutocompleteSelectField"; -import i18n from "../../../i18n"; +import { buttonMessages } from "@saleor/intl"; const styles = (theme: Theme) => createStyles({ @@ -76,7 +77,12 @@ const OrderCustomerEditDialog = withStyles(styles, { : []; return ( - {i18n.t("Edit customer details")} + + + - {i18n.t("Confirm", { context: "button" })} + diff --git a/src/orders/components/OrderCustomerNote/OrderCustomerNote.tsx b/src/orders/components/OrderCustomerNote/OrderCustomerNote.tsx index 4a3b075ff..affb2e180 100644 --- a/src/orders/components/OrderCustomerNote/OrderCustomerNote.tsx +++ b/src/orders/components/OrderCustomerNote/OrderCustomerNote.tsx @@ -2,10 +2,10 @@ import Card from "@material-ui/core/Card"; import CardContent from "@material-ui/core/CardContent"; import Typography from "@material-ui/core/Typography"; import React from "react"; +import { FormattedMessage, useIntl } from "react-intl"; import CardTitle from "@saleor/components/CardTitle"; import Skeleton from "@saleor/components/Skeleton"; -import i18n from "../../../i18n"; interface OrderCustomerNoteProps { note: string; @@ -13,24 +13,29 @@ interface OrderCustomerNoteProps { export const OrderCustomerNote: React.StatelessComponent< OrderCustomerNoteProps -> = ({ note }) => ( - - - - {note === undefined ? ( - - ) : note === "" ? ( - - {i18n.t("No notes from customer")} - - ) : ( - {note} - )} - - -); +> = ({ note }) => { + const intl = useIntl(); + + return ( + + + + {note === undefined ? ( + + ) : note === "" ? ( + + + + ) : ( + {note} + )} + + + ); +}; export default OrderCustomerNote; diff --git a/src/orders/components/OrderDetailsPage/OrderDetailsPage.tsx b/src/orders/components/OrderDetailsPage/OrderDetailsPage.tsx index b20a70e10..8e2b332bd 100644 --- a/src/orders/components/OrderDetailsPage/OrderDetailsPage.tsx +++ b/src/orders/components/OrderDetailsPage/OrderDetailsPage.tsx @@ -6,6 +6,7 @@ import { } from "@material-ui/core/styles"; import Typography from "@material-ui/core/Typography"; import React from "react"; +import { useIntl } from "react-intl"; import AppHeader from "@saleor/components/AppHeader"; import CardMenu from "@saleor/components/CardMenu"; @@ -15,7 +16,7 @@ import { DateTime } from "@saleor/components/Date"; import Grid from "@saleor/components/Grid"; import PageHeader from "@saleor/components/PageHeader"; import Skeleton from "@saleor/components/Skeleton"; -import i18n from "../../../i18n"; +import { sectionNames } from "@saleor/intl"; import { maybe, renderCollection } from "../../../misc"; import { OrderStatus } from "../../../types/globalTypes"; import { OrderDetails_order } from "../../types/OrderDetails"; @@ -81,6 +82,8 @@ const OrderDetailsPage = withStyles(styles, { name: "OrderDetailsPage" })( onShippingAddressEdit, onProfileView }: OrderDetailsPageProps) => { + const intl = useIntl(); + const canCancel = maybe(() => order.status) !== OrderStatus.CANCELED; const canEditAddresses = maybe(() => order.status) !== OrderStatus.CANCELED; const canFulfill = maybe(() => order.status) !== OrderStatus.CANCELED; @@ -90,7 +93,9 @@ const OrderDetailsPage = withStyles(styles, { name: "OrderDetailsPage" })( return ( - {i18n.t("Orders")} + + {intl.formatMessage(sectionNames.orders)} + order.number) ? "#" + order.number : undefined} @@ -99,7 +104,10 @@ const OrderDetailsPage = withStyles(styles, { name: "OrderDetailsPage" })( = ({ confirmButtonState, onClose, onConfirm, open, orderNumber }) => ( - - #{{ number }}?", - { - context: "modal", - number: orderNumber - } - ) - }} - /> - -); +> = ({ confirmButtonState, onClose, onConfirm, open, orderNumber }) => { + const intl = useIntl(); + + return ( + + + + + + ); +}; OrderDraftCancelDialog.displayName = "OrderDraftCancelDialog"; export default OrderDraftCancelDialog; diff --git a/src/orders/components/OrderDraftDetails/OrderDraftDetails.tsx b/src/orders/components/OrderDraftDetails/OrderDraftDetails.tsx index 3eeb932e7..73ad251f5 100644 --- a/src/orders/components/OrderDraftDetails/OrderDraftDetails.tsx +++ b/src/orders/components/OrderDraftDetails/OrderDraftDetails.tsx @@ -2,9 +2,9 @@ import Button from "@material-ui/core/Button"; import Card from "@material-ui/core/Card"; import CardContent from "@material-ui/core/CardContent"; import React from "react"; +import { FormattedMessage, useIntl } from "react-intl"; import CardTitle from "@saleor/components/CardTitle"; -import i18n from "../../../i18n"; import { maybe } from "../../../misc"; import { OrderDetails_order } from "../../types/OrderDetails"; import OrderDraftDetailsProducts, { @@ -29,34 +29,40 @@ const OrderDraftDetails: React.StatelessComponent = ({ onOrderLineChange, onOrderLineRemove, onShippingMethodEdit -}) => ( - - - {i18n.t("Add products", { - context: "button" - })} - - } - /> - order.lines)} - onOrderLineChange={onOrderLineChange} - onOrderLineRemove={onOrderLineRemove} - /> - {maybe(() => order.lines.length) !== 0 && ( - - - - )} - -); +}) => { + const intl = useIntl(); + + return ( + + + + + } + /> + order.lines)} + onOrderLineChange={onOrderLineChange} + onOrderLineRemove={onOrderLineRemove} + /> + {maybe(() => order.lines.length) !== 0 && ( + + + + )} + + ); +}; OrderDraftDetails.displayName = "OrderDraftDetails"; export default OrderDraftDetails; diff --git a/src/orders/components/OrderDraftDetailsProducts/OrderDraftDetailsProducts.tsx b/src/orders/components/OrderDraftDetailsProducts/OrderDraftDetailsProducts.tsx index 2d8d922e3..099469372 100644 --- a/src/orders/components/OrderDraftDetailsProducts/OrderDraftDetailsProducts.tsx +++ b/src/orders/components/OrderDraftDetailsProducts/OrderDraftDetailsProducts.tsx @@ -14,6 +14,7 @@ import TextField from "@material-ui/core/TextField"; import Typography from "@material-ui/core/Typography"; import DeleteIcon from "@material-ui/icons/Delete"; import React from "react"; +import { FormattedMessage } from "react-intl"; import { DebounceForm } from "@saleor/components/DebounceForm"; import Form from "@saleor/components/Form"; @@ -22,7 +23,6 @@ import Skeleton from "@saleor/components/Skeleton"; import TableCellAvatar, { AVATAR_MARGIN } from "@saleor/components/TableCellAvatar"; -import i18n from "../../../i18n"; import { maybe, renderCollection } from "../../../misc"; import { OrderDetails_order_lines } from "../../types/OrderDetails"; @@ -89,17 +89,26 @@ const OrderDraftDetailsProducts = withStyles(styles, { - {i18n.t("Product", { context: "table header" })} + - {i18n.t("Quantity", { context: "table header" })} + - {i18n.t("Price", { context: "table header" })} + - {i18n.t("Total", { context: "table header" })} + @@ -109,7 +118,7 @@ const OrderDraftDetailsProducts = withStyles(styles, { {maybe(() => lines.length) === 0 ? ( - {i18n.t("No Products added to Order")} + ) : ( diff --git a/src/orders/components/OrderDraftDetailsSummary/OrderDraftDetailsSummary.tsx b/src/orders/components/OrderDraftDetailsSummary/OrderDraftDetailsSummary.tsx index 1ca1898c6..531799ba7 100644 --- a/src/orders/components/OrderDraftDetailsSummary/OrderDraftDetailsSummary.tsx +++ b/src/orders/components/OrderDraftDetailsSummary/OrderDraftDetailsSummary.tsx @@ -5,11 +5,11 @@ import { WithStyles } from "@material-ui/core/styles"; import React from "react"; +import { FormattedMessage } from "react-intl"; import Link from "@saleor/components/Link"; import Money from "@saleor/components/Money"; import Skeleton from "@saleor/components/Skeleton"; -import i18n from "../../../i18n"; import { maybe } from "../../../misc"; import { OrderDetails_order } from "../../types/OrderDetails"; @@ -39,7 +39,12 @@ const OrderDraftDetailsSummary = withStyles(styles, { {maybe(() => order.subtotal) ? ( <> - {i18n.t("Subtotal")} + + + @@ -59,11 +64,16 @@ const OrderDraftDetailsSummary = withStyles(styles, { order.availableShippingMethods.length > 0 ? ( - {i18n.t("Add shipping carrier")} + ) : ( - {i18n.t("No applicable shipping carriers")} + + + ) ) : ( <> @@ -90,7 +100,9 @@ const OrderDraftDetailsSummary = withStyles(styles, { {maybe(() => order.total.tax) !== undefined ? ( <> - {i18n.t("Taxes (VAT included)")} + + + @@ -104,7 +116,12 @@ const OrderDraftDetailsSummary = withStyles(styles, { {maybe(() => order.total.gross) !== undefined ? ( <> - {i18n.t("Total")} + + + diff --git a/src/orders/components/OrderDraftFinalizeDialog/OrderDraftFinalizeDialog.tsx b/src/orders/components/OrderDraftFinalizeDialog/OrderDraftFinalizeDialog.tsx index f8b72cb60..a6138c3aa 100644 --- a/src/orders/components/OrderDraftFinalizeDialog/OrderDraftFinalizeDialog.tsx +++ b/src/orders/components/OrderDraftFinalizeDialog/OrderDraftFinalizeDialog.tsx @@ -1,9 +1,9 @@ import DialogContentText from "@material-ui/core/DialogContentText"; import React from "react"; +import { FormattedMessage, IntlShape, useIntl } from "react-intl"; import ActionDialog from "@saleor/components/ActionDialog"; import { ConfirmButtonTransitionState } from "@saleor/components/ConfirmButton"; -import i18n from "../../../i18n"; export type OrderDraftFinalizeWarning = | "no-shipping" @@ -21,18 +21,28 @@ export interface OrderDraftFinalizeDialogProps { onConfirm: () => void; } -const warningToText = (warning: OrderDraftFinalizeWarning) => { +const warningToText = (warning: OrderDraftFinalizeWarning, intl: IntlShape) => { switch (warning) { case "no-shipping": - return i18n.t("No shipping address"); + return intl.formatMessage({ + defaultMessage: "No shipping address" + }); case "no-billing": - return i18n.t("No billing address"); + return intl.formatMessage({ + defaultMessage: "No billing address" + }); case "no-user": - return i18n.t("No user information"); + return intl.formatMessage({ + defaultMessage: "No user information" + }); case "no-shipping-method": - return i18n.t("Some products require shipping, but no method provided"); + return intl.formatMessage({ + defaultMessage: "Some products require shipping, but no method provided" + }); case "unnecessary-shipping-method": - return i18n.t("Shipping method provided, but no product requires it"); + return intl.formatMessage({ + defaultMessage: "Shipping method provided, but no product requires it" + }); } }; @@ -45,48 +55,54 @@ const OrderDraftFinalizeDialog: React.StatelessComponent< onClose, onConfirm, orderNumber -}) => ( - 0 ? i18n.t("Finalize anyway") : i18n.t("Finalize") - } - confirmButtonState={confirmButtonState} - variant={warnings.length > 0 ? "delete" : "default"} - > - - {warnings.length > 0 && ( - <> -

- {i18n.t( - "There are missing or incorrect informations about this order:" - )} -

-
    - {warnings.map(warning => ( -
  • {warningToText(warning)}
  • - ))} -
- - )} - #{{ number }}?", - { - context: "modal", - number: orderNumber - } - ) - }} - /> -
-
-); +}) => { + const intl = useIntl(); + + return ( + 0 + ? intl.formatMessage({ + defaultMessage: "Finalize anyway", + description: "button" + }) + : intl.formatMessage({ + defaultMessage: "Finalize", + description: "button" + }) + } + confirmButtonState={confirmButtonState} + variant={warnings.length > 0 ? "delete" : "default"} + > + + {warnings.length > 0 && ( + <> +

+ +

+
    + {warnings.map(warning => ( +
  • {warningToText(warning, intl)}
  • + ))} +
+ + )} + +
+
+ ); +}; OrderDraftFinalizeDialog.displayName = "OrderDraftFinalize"; export default OrderDraftFinalizeDialog; diff --git a/src/orders/components/OrderDraftList/OrderDraftList.tsx b/src/orders/components/OrderDraftList/OrderDraftList.tsx index 8ebfde633..969c57d4a 100644 --- a/src/orders/components/OrderDraftList/OrderDraftList.tsx +++ b/src/orders/components/OrderDraftList/OrderDraftList.tsx @@ -10,6 +10,7 @@ import TableCell from "@material-ui/core/TableCell"; import TableFooter from "@material-ui/core/TableFooter"; import TableRow from "@material-ui/core/TableRow"; import React from "react"; +import { FormattedMessage } from "react-intl"; import Checkbox from "@saleor/components/Checkbox"; import { DateTime } from "@saleor/components/Date"; @@ -17,7 +18,6 @@ import Money from "@saleor/components/Money"; import Skeleton from "@saleor/components/Skeleton"; import TableHead from "@saleor/components/TableHead"; import TablePagination from "@saleor/components/TablePagination"; -import i18n from "@saleor/i18n"; import { maybe, renderCollection, @@ -85,6 +85,7 @@ export const OrderDraftList = withStyles(styles, { name: "OrderDraftList" })( status: transformOrderStatus(order.status) })) : undefined; + return ( - {i18n.t("No. of Order", { context: "table header" })} + - {i18n.t("Date", { context: "table header" })} + - {i18n.t("Customer", { context: "table header" })} + - {i18n.t("Total", { context: "table header" })} + @@ -185,7 +192,7 @@ export const OrderDraftList = withStyles(styles, { name: "OrderDraftList" })( () => ( - {i18n.t("No orders found")} + ) diff --git a/src/orders/components/OrderDraftListPage/OrderDraftListPage.tsx b/src/orders/components/OrderDraftListPage/OrderDraftListPage.tsx index a172986a6..23fcff5d1 100644 --- a/src/orders/components/OrderDraftListPage/OrderDraftListPage.tsx +++ b/src/orders/components/OrderDraftListPage/OrderDraftListPage.tsx @@ -2,10 +2,11 @@ import Button from "@material-ui/core/Button"; import Card from "@material-ui/core/Card"; import AddIcon from "@material-ui/icons/Add"; import React from "react"; +import { FormattedMessage, useIntl } from "react-intl"; import Container from "@saleor/components/Container"; import PageHeader from "@saleor/components/PageHeader"; -import i18n from "@saleor/i18n"; +import { sectionNames } from "@saleor/intl"; import { ListActions, PageListProps } from "@saleor/types"; import { OrderDraftList_draftOrders_edges_node } from "../../types/OrderDraftList"; import OrderDraftList from "../OrderDraftList"; @@ -18,22 +19,30 @@ const OrderDraftListPage: React.StatelessComponent = ({ disabled, onAdd, ...listProps -}) => ( - - - - - - - - -); +}) => { + const intl = useIntl(); + + return ( + + + + + + + + + ); +}; OrderDraftListPage.displayName = "OrderDraftListPage"; export default OrderDraftListPage; diff --git a/src/orders/components/OrderDraftPage/OrderDraftPage.tsx b/src/orders/components/OrderDraftPage/OrderDraftPage.tsx index 7e357f547..4afab620c 100644 --- a/src/orders/components/OrderDraftPage/OrderDraftPage.tsx +++ b/src/orders/components/OrderDraftPage/OrderDraftPage.tsx @@ -6,6 +6,7 @@ import { } from "@material-ui/core/styles"; import Typography from "@material-ui/core/Typography"; import React from "react"; +import { useIntl } from "react-intl"; import AppHeader from "@saleor/components/AppHeader"; import CardMenu from "@saleor/components/CardMenu"; @@ -16,8 +17,8 @@ import Grid from "@saleor/components/Grid"; import PageHeader from "@saleor/components/PageHeader"; import SaveButtonBar from "@saleor/components/SaveButtonBar"; import Skeleton from "@saleor/components/Skeleton"; +import { sectionNames } from "@saleor/intl"; import { SearchCustomers_customers_edges_node } from "../../../containers/SearchCustomers/types/SearchCustomers"; -import i18n from "../../../i18n"; import { maybe } from "../../../misc"; import { DraftOrderInput } from "../../../types/globalTypes"; import { OrderDetails_order } from "../../types/OrderDetails"; @@ -87,69 +88,83 @@ const OrderDraftPage = withStyles(styles, { name: "OrderDraftPage" })( order, users, usersLoading - }: OrderDraftPageProps) => ( - - {i18n.t("Orders")} - order.number) ? "#" + order.number : undefined} - > - { + const intl = useIntl(); + + return ( + + + {intl.formatMessage(sectionNames.draftOrders)} + + order.number) ? "#" + order.number : undefined} + > + + +
+ {order && order.created ? ( + + + + ) : ( + + )} +
+ +
+ + order.events)} + onNoteAdd={onNoteAdd} + /> +
+
+ +
+
+ order.canFinalize)} + onCancel={onBack} + onSave={onDraftFinalize} + labels={{ + save: intl.formatMessage({ + defaultMessage: "Finalize", + description: "button" + }) + }} /> -
-
- {order && order.created ? ( - - - - ) : ( - - )} -
- -
- - order.events)} - onNoteAdd={onNoteAdd} - /> -
-
- -
-
- order.canFinalize)} - onCancel={onBack} - onSave={onDraftFinalize} - labels={{ save: i18n.t("Finalize", { context: "button" }) }} - /> -
- ) + + ); + } ); OrderDraftPage.displayName = "OrderDraftPage"; export default OrderDraftPage; diff --git a/src/orders/components/OrderFulfillment/OrderFulfillment.tsx b/src/orders/components/OrderFulfillment/OrderFulfillment.tsx index 041c4acb3..45ffb159b 100644 --- a/src/orders/components/OrderFulfillment/OrderFulfillment.tsx +++ b/src/orders/components/OrderFulfillment/OrderFulfillment.tsx @@ -14,6 +14,7 @@ import TableHead from "@material-ui/core/TableHead"; import TableRow from "@material-ui/core/TableRow"; import Typography from "@material-ui/core/Typography"; import React from "react"; +import { FormattedMessage, useIntl } from "react-intl"; import CardMenu from "@saleor/components/CardMenu"; import CardTitle from "@saleor/components/CardTitle"; @@ -23,7 +24,6 @@ import StatusLabel from "@saleor/components/StatusLabel"; import TableCellAvatar, { AVATAR_MARGIN } from "@saleor/components/TableCellAvatar"; -import i18n from "../../../i18n"; import { maybe, renderCollection } from "../../../misc"; import { FulfillmentStatus } from "../../../types/globalTypes"; import { OrderDetails_order_fulfillments } from "../../types/OrderDetails"; @@ -81,8 +81,14 @@ const OrderFulfillment = withStyles(styles, { name: "OrderFulfillment" })( onOrderFulfillmentCancel, onTrackingCodeAdd }: OrderFulfillmentProps) => { + const intl = useIntl(); + const lines = maybe(() => fulfillment.lines); const status = maybe(() => fulfillment.status); + const quantity = lines + .map(line => line.quantity) + .reduce((prev, curr) => prev + curr, 0); + return ( {status === FulfillmentStatus.FULFILLED - ? i18n.t("Fulfilled ({{ quantity }})", { - quantity: lines - .map(line => line.quantity) - .reduce((prev, curr) => prev + curr, 0) - }) - : i18n.t("Cancelled ({{ quantity }})", { - quantity: lines - .map(line => line.quantity) - .reduce((prev, curr) => prev + curr, 0) - })} + ? intl.formatMessage( + { + defaultMessage: "Fulfilled ({quantity})", + description: "section header" + }, + { + quantity + } + ) + : intl.formatMessage( + { + defaultMessage: "Fulfilled ({quantity})", + description: "section header" + }, + { + quantity + } + )} {maybe( () => `#${orderNumber}-${fulfillment.fulfillmentOrder}` @@ -122,8 +136,9 @@ const OrderFulfillment = withStyles(styles, { name: "OrderFulfillment" })( - {i18n.t("Product")} + - {i18n.t("Quantity")} + - {i18n.t("Price")} + - {i18n.t("Total")} + @@ -194,9 +221,12 @@ const OrderFulfillment = withStyles(styles, { name: "OrderFulfillment" })( {maybe(() => fulfillment.trackingNumber) && ( - {i18n.t("Tracking Number: {{ trackingNumber }}", { - trackingNumber: fulfillment.trackingNumber - })} + )} @@ -205,7 +235,10 @@ const OrderFulfillment = withStyles(styles, { name: "OrderFulfillment" })( {status === FulfillmentStatus.FULFILLED && !fulfillment.trackingNumber && ( )} diff --git a/src/orders/components/OrderFulfillmentCancelDialog/OrderFulfillmentCancelDialog.tsx b/src/orders/components/OrderFulfillmentCancelDialog/OrderFulfillmentCancelDialog.tsx index 8db361464..2517c6623 100644 --- a/src/orders/components/OrderFulfillmentCancelDialog/OrderFulfillmentCancelDialog.tsx +++ b/src/orders/components/OrderFulfillmentCancelDialog/OrderFulfillmentCancelDialog.tsx @@ -11,13 +11,14 @@ import { WithStyles } from "@material-ui/core/styles"; import React from "react"; +import { FormattedMessage, useIntl } from "react-intl"; import ConfirmButton, { ConfirmButtonTransitionState } from "@saleor/components/ConfirmButton"; import { ControlledCheckbox } from "@saleor/components/ControlledCheckbox"; import Form from "@saleor/components/Form"; -import i18n from "../../../i18n"; +import { buttonMessages } from "@saleor/intl"; export interface FormData { restock: boolean; @@ -50,43 +51,56 @@ const OrderFulfillmentCancelDialog = withStyles(styles, { open, onConfirm, onClose - }: OrderFulfillmentCancelDialogProps) => ( - -
- {({ change, data, submit }) => ( - <> - - {i18n.t("Cancel fulfillment", { context: "title" })} - - - - {i18n.t("Are you sure you want to cancel this fulfillment?")} - - - - - - - {i18n.t("Cancel fulfillment", { context: "button" })} - - - - )} - -
- ) + }: OrderFulfillmentCancelDialogProps) => { + const intl = useIntl(); + + return ( + +
+ {({ change, data, submit }) => ( + <> + + + + + + + + + + + + + + + + + )} + +
+ ); + } ); OrderFulfillmentCancelDialog.displayName = "OrderFulfillmentCancelDialog"; export default OrderFulfillmentCancelDialog; diff --git a/src/orders/components/OrderFulfillmentDialog/OrderFulfillmentDialog.tsx b/src/orders/components/OrderFulfillmentDialog/OrderFulfillmentDialog.tsx index 8be5156cc..6c7bfcee6 100644 --- a/src/orders/components/OrderFulfillmentDialog/OrderFulfillmentDialog.tsx +++ b/src/orders/components/OrderFulfillmentDialog/OrderFulfillmentDialog.tsx @@ -16,6 +16,7 @@ import TableHead from "@material-ui/core/TableHead"; import TableRow from "@material-ui/core/TableRow"; import TextField from "@material-ui/core/TextField"; import React from "react"; +import { FormattedMessage, useIntl } from "react-intl"; import ConfirmButton, { ConfirmButtonTransitionState @@ -25,7 +26,7 @@ import { FormSpacer } from "@saleor/components/FormSpacer"; import TableCellAvatar, { AVATAR_MARGIN } from "@saleor/components/TableCellAvatar"; -import i18n from "../../../i18n"; +import { buttonMessages } from "@saleor/intl"; import { maybe } from "../../../misc"; import { OrderDetails_order_lines } from "../../types/OrderDetails"; @@ -83,125 +84,143 @@ const OrderFulfillmentDialog = withStyles(styles, { lines, onClose, onSubmit - }: OrderFulfillmentDialogProps) => ( - -
- lines.map( - product => product.quantity - product.quantityFulfilled - ), - [] - ), - trackingNumber: "" - }} - onSubmit={onSubmit} - > - {({ data, change }) => { - const handleQuantityChange = ( - productIndex: number, - event: React.ChangeEvent - ) => { - const newData = data.lines; - newData[productIndex] = event.target.value; - change({ - target: { - name: "lines", - value: newData - } - } as any); - }; - return ( - <> - {i18n.t("Fulfill products")} -
- - - - - {i18n.t("Product name")} - - - - {i18n.t("SKU")} - - - {i18n.t("Quantity")} - - - - - {lines.map((product, productIndex) => { - const remainingQuantity = - product.quantity - product.quantityFulfilled; - return ( - - product.thumbnail.url)} - > - {product.productName} - - - {product.productSku} - - -
- - handleQuantityChange(productIndex, event) - } - error={ - remainingQuantity < data.lines[productIndex] - } - /> -
- / {remainingQuantity} + }: OrderFulfillmentDialogProps) => { + const intl = useIntl(); + + return ( + + + lines.map( + product => product.quantity - product.quantityFulfilled + ), + [] + ), + trackingNumber: "" + }} + onSubmit={onSubmit} + > + {({ data, change }) => { + const handleQuantityChange = ( + productIndex: number, + event: React.ChangeEvent + ) => { + const newData = data.lines; + newData[productIndex] = event.target.value; + change({ + target: { + name: "lines", + value: newData + } + } as any); + }; + return ( + <> + + + +
+ + + + + + + + + + + + + + + + + {lines.map((product, productIndex) => { + const remainingQuantity = + product.quantity - product.quantityFulfilled; + return ( + + product.thumbnail.url)} + > + {product.productName} + + + {product.productSku} + + +
+ + handleQuantityChange(productIndex, event) + } + error={ + remainingQuantity < data.lines[productIndex] + } + /> +
+ / {remainingQuantity} +
- -
-
- ); - })} -
-
- - - - - - - - {i18n.t("Confirm", { context: "button" })} - - - - ); - }} - - - ) + + + ); + })} + + + + + + + + + + + + + + ); + }} + + + ); + } ); OrderFulfillmentDialog.displayName = "OrderFulfillmentDialog"; export default OrderFulfillmentDialog; diff --git a/src/orders/components/OrderFulfillmentTrackingDialog/OrderFulfillmentTrackingDialog.tsx b/src/orders/components/OrderFulfillmentTrackingDialog/OrderFulfillmentTrackingDialog.tsx index df3df08fe..4de13a599 100644 --- a/src/orders/components/OrderFulfillmentTrackingDialog/OrderFulfillmentTrackingDialog.tsx +++ b/src/orders/components/OrderFulfillmentTrackingDialog/OrderFulfillmentTrackingDialog.tsx @@ -5,12 +5,13 @@ import DialogContent from "@material-ui/core/DialogContent"; import DialogTitle from "@material-ui/core/DialogTitle"; import TextField from "@material-ui/core/TextField"; import React from "react"; +import { FormattedMessage, useIntl } from "react-intl"; import ConfirmButton, { ConfirmButtonTransitionState } from "@saleor/components/ConfirmButton"; import Form from "@saleor/components/Form"; -import i18n from "../../../i18n"; +import { buttonMessages } from "@saleor/intl"; export interface FormData { trackingNumber: string; @@ -26,40 +27,49 @@ interface OrderFulfillmentTrackingDialogProps { const OrderFulfillmentTrackingDialog: React.StatelessComponent< OrderFulfillmentTrackingDialogProps -> = ({ confirmButtonState, open, trackingNumber, onConfirm, onClose }) => ( - -
- {({ change, data, submit }) => ( - <> - - {i18n.t("Add tracking code", { context: "title" })} - - - - - - - - {i18n.t("Confirm", { context: "button" })} - - - - )} -
-
-); +> = ({ confirmButtonState, open, trackingNumber, onConfirm, onClose }) => { + const intl = useIntl(); + + return ( + +
+ {({ change, data, submit }) => ( + <> + + + + + + + + + + + + + + )} +
+
+ ); +}; OrderFulfillmentTrackingDialog.displayName = "OrderFulfillmentTrackingDialog"; export default OrderFulfillmentTrackingDialog; diff --git a/src/orders/components/OrderHistory/OrderHistory.tsx b/src/orders/components/OrderHistory/OrderHistory.tsx index e04b7e204..606f83a77 100644 --- a/src/orders/components/OrderHistory/OrderHistory.tsx +++ b/src/orders/components/OrderHistory/OrderHistory.tsx @@ -6,6 +6,7 @@ import { } from "@material-ui/core/styles"; import Typography from "@material-ui/core/Typography"; import React from "react"; +import { FormattedMessage, IntlShape, useIntl } from "react-intl"; import Form from "@saleor/components/Form"; import Hr from "@saleor/components/Hr"; @@ -16,7 +17,6 @@ import { TimelineEvent, TimelineNote } from "@saleor/components/Timeline"; -import i18n from "../../../i18n"; import { OrderEventsEmailsEnum, OrderEventsEnum @@ -27,115 +27,152 @@ export interface FormData { message: string; } -const getEventMessage = (event: OrderDetails_order_events) => { +const getEventMessage = (event: OrderDetails_order_events, intl: IntlShape) => { switch (event.type) { case OrderEventsEnum.CANCELED: - return i18n.t("Order was cancelled", { - context: "order history message" + return intl.formatMessage({ + defaultMessage: "Order was cancelled", + description: "order history message" }); case OrderEventsEnum.DRAFT_ADDED_PRODUCTS: - return i18n.t("Products were added to draft order", { - context: "order history message" + return intl.formatMessage({ + defaultMessage: "Products were added to draft order", + description: "order history message" }); case OrderEventsEnum.DRAFT_CREATED: - return i18n.t("Draft order was created", { - context: "order history message" + return intl.formatMessage({ + defaultMessage: "Draft order was created", + description: "order history message" }); case OrderEventsEnum.DRAFT_REMOVED_PRODUCTS: - return i18n.t("Products were removed from draft order", { - context: "order history message" + return intl.formatMessage({ + defaultMessage: "Products were removed from draft order", + description: "order history message" }); case OrderEventsEnum.EMAIL_SENT: switch (event.emailType) { case OrderEventsEmailsEnum.DIGITAL_LINKS: - return i18n.t("Links to the order's digital goods were sent", { - context: "order history message" + return intl.formatMessage({ + defaultMessage: "Links to the order's digital goods were sent", + description: "order history message" }); case OrderEventsEmailsEnum.FULFILLMENT_CONFIRMATION: - return i18n.t("Fulfillment confirmation was sent to customer", { - context: "order history message" + return intl.formatMessage({ + defaultMessage: "Fulfillment confirmation was sent to customer", + description: "order history message" }); case OrderEventsEmailsEnum.ORDER_CONFIRMATION: - return i18n.t("Order confirmation was sent to customer", { - context: "order history message" + return intl.formatMessage({ + defaultMessage: "Order confirmation was sent to customer", + description: "order history message" }); case OrderEventsEmailsEnum.PAYMENT_CONFIRMATION: - return i18n.t("Payment confirmation was sent to customer", { - context: "order history message" + return intl.formatMessage({ + defaultMessage: "Payment confirmation was sent to customer", + description: "order history message" }); case OrderEventsEmailsEnum.SHIPPING_CONFIRMATION: - return i18n.t("Shipping details was sent to customer", { - context: "order history message" + return intl.formatMessage({ + defaultMessage: "Shipping details was sent to customer", + description: "order history message" }); case OrderEventsEmailsEnum.TRACKING_UPDATED: - return i18n.t("Shipping tracking number was sent to customer", { - context: "order history message" + return intl.formatMessage({ + defaultMessage: "Shipping tracking number was sent to customer", + description: "order history message" }); } case OrderEventsEnum.FULFILLMENT_CANCELED: - return i18n.t("Fulfillment was cancelled", { - context: "order history message" + return intl.formatMessage({ + defaultMessage: "Fulfillment was cancelled", + description: "order history message" }); case OrderEventsEnum.FULFILLMENT_FULFILLED_ITEMS: - return i18n.t("Fulfilled {{ quantity }} items", { - context: "order history message", - quantity: event.quantity - }); + return intl.formatMessage( + { + defaultMessage: "Fulfilled {quantity} items", + description: "order history message" + }, + { + quantity: event.quantity + } + ); case OrderEventsEnum.FULFILLMENT_RESTOCKED_ITEMS: - return i18n.t("Restocked {{ quantity }} items", { - context: "order history message", - quantity: event.quantity - }); + return intl.formatMessage( + { + defaultMessage: "Restocked {quantity} items", + description: "order history message" + }, + { + quantity: event.quantity + } + ); case OrderEventsEnum.NOTE_ADDED: - return i18n.t("Note was added to the order", { - context: "order history message" + return intl.formatMessage({ + defaultMessage: "Note was added to the order", + description: "order history message" }); case OrderEventsEnum.ORDER_FULLY_PAID: - return i18n.t("Order was fully paid", { - context: "order history message" + return intl.formatMessage({ + defaultMessage: "Order was fully paid", + description: "order history message" }); case OrderEventsEnum.ORDER_MARKED_AS_PAID: - return i18n.t("Marked order as paid", { - context: "order history message" + return intl.formatMessage({ + defaultMessage: "Marked order as paid", + description: "order history message" }); case OrderEventsEnum.OTHER: return event.message; case OrderEventsEnum.OVERSOLD_ITEMS: - return i18n.t("Oversold {{ quantity }} items", { - context: "order history message", - quantity: event.quantity - }); + return intl.formatMessage( + { + defaultMessage: "Oversold {quantity} items", + description: "order history message" + }, + { + quantity: event.quantity + } + ); case OrderEventsEnum.PAYMENT_CAPTURED: - return i18n.t("Payment was captured", { - context: "order history message" + return intl.formatMessage({ + defaultMessage: "Payment was captured", + description: "order history message" }); case OrderEventsEnum.PAYMENT_FAILED: - return i18n.t("Payment failed", { - context: "order history message" + return intl.formatMessage({ + defaultMessage: "Payment failed", + description: "order history message" }); case OrderEventsEnum.PAYMENT_REFUNDED: - return i18n.t("Payment was refunded", { - context: "order history message" + return intl.formatMessage({ + defaultMessage: "Payment was refunded", + description: "order history message" }); case OrderEventsEnum.PAYMENT_VOIDED: - return i18n.t("Payment was voided", { - context: "order history message" + return intl.formatMessage({ + defaultMessage: "Payment was voided", + description: "order history message" }); case OrderEventsEnum.PLACED: - return i18n.t("Order was placed", { - context: "order history message" + return intl.formatMessage({ + defaultMessage: "Order was placed", + description: "order history message" }); case OrderEventsEnum.PLACED_FROM_DRAFT: - return i18n.t("Order was created from draft", { - context: "order history message" + return intl.formatMessage({ + defaultMessage: "Order was created from draft", + description: "order history message" }); case OrderEventsEnum.TRACKING_UPDATED: - return i18n.t("Updated fulfillment group's tracking number", { - context: "order history message" + return intl.formatMessage({ + defaultMessage: "Updated fulfillment group's tracking number", + description: "order history message" }); case OrderEventsEnum.UPDATED_ADDRESS: - return i18n.t("Order address was updated", { - context: "order history message" + return intl.formatMessage({ + defaultMessage: "Order address was updated", + description: "order history message" }); } }; @@ -158,51 +195,55 @@ interface OrderHistoryProps extends WithStyles { } const OrderHistory = withStyles(styles, { name: "OrderHistory" })( - ({ classes, history, onNoteAdd }: OrderHistoryProps) => ( -
- - {i18n.t("Order History")} - -
- {history ? ( - -
- {({ change, data, submit }) => ( - - )} - - {history - .slice() - .reverse() - .map(event => { - if (event.type === OrderEventsEnum.NOTE_ADDED) { + ({ classes, history, onNoteAdd }: OrderHistoryProps) => { + const intl = useIntl(); + + return ( +
+ + + +
+ {history ? ( + +
+ {({ change, data, submit }) => ( + + )} + + {history + .slice() + .reverse() + .map(event => { + if (event.type === OrderEventsEnum.NOTE_ADDED) { + return ( + + ); + } return ( - ); - } - return ( - - ); - })} -
- ) : ( - - )} -
- ) + })} +
+ ) : ( + + )} +
+ ); + } ); OrderHistory.displayName = "OrderHistory"; export default OrderHistory; diff --git a/src/orders/components/OrderList/OrderList.tsx b/src/orders/components/OrderList/OrderList.tsx index c0b772ab7..2a38c947c 100644 --- a/src/orders/components/OrderList/OrderList.tsx +++ b/src/orders/components/OrderList/OrderList.tsx @@ -10,6 +10,7 @@ import TableCell from "@material-ui/core/TableCell"; import TableFooter from "@material-ui/core/TableFooter"; import TableRow from "@material-ui/core/TableRow"; import React from "react"; +import { FormattedMessage } from "react-intl"; import Checkbox from "@saleor/components/Checkbox"; import { DateTime } from "@saleor/components/Date"; @@ -18,7 +19,6 @@ import Skeleton from "@saleor/components/Skeleton"; import StatusLabel from "@saleor/components/StatusLabel"; import TableHead from "@saleor/components/TableHead"; import TablePagination from "@saleor/components/TablePagination"; -import i18n from "@saleor/i18n"; import { maybe, renderCollection, @@ -103,22 +103,34 @@ export const OrderList = withStyles(styles, { name: "OrderList" })( toolbar={toolbar} > - {i18n.t("No. of Order", { context: "table header" })} + - {i18n.t("Date", { context: "table header" })} + - {i18n.t("Customer", { context: "table header" })} + - {i18n.t("Payment", { context: "table header" })} + - {i18n.t("Fulfillment status", { context: "table header" })} + - {i18n.t("Total", { context: "table header" })} + @@ -220,7 +232,7 @@ export const OrderList = withStyles(styles, { name: "OrderList" })( () => ( - {i18n.t("No orders found")} + ) diff --git a/src/orders/components/OrderListFilter/OrderListFilter.tsx b/src/orders/components/OrderListFilter/OrderListFilter.tsx index a76489479..676a3548c 100644 --- a/src/orders/components/OrderListFilter/OrderListFilter.tsx +++ b/src/orders/components/OrderListFilter/OrderListFilter.tsx @@ -1,11 +1,11 @@ import moment from "moment-timezone"; import React from "react"; +import { useIntl } from "react-intl"; import { DateContext } from "@saleor/components/Date/DateContext"; import { FieldType, IFilter } from "@saleor/components/Filter"; import FilterBar from "@saleor/components/FilterBar"; import TimezoneContext from "@saleor/components/Timezone"; -import i18n from "../../../i18n"; import { FilterProps } from "../../../types"; import { OrderStatusFilter } from "../../../types/globalTypes"; import { OrderListUrlFilters } from "../../urls"; @@ -26,6 +26,7 @@ export enum OrderFilterKeys { const OrderListFilter: React.FC = props => { const date = React.useContext(DateContext); const tz = React.useContext(TimezoneContext); + const intl = useIntl(); const filterMenu: IFilter = [ { @@ -40,7 +41,9 @@ const OrderListFilter: React.FC = props => { .toISOString() .split("T")[0] // Remove timezone }, - label: i18n.t("Last 7 Days"), + label: intl.formatMessage({ + defaultMessage: "Last 7 Days" + }), value: OrderFilterKeys.dateLastWeek.toString() }, { @@ -53,7 +56,9 @@ const OrderListFilter: React.FC = props => { .toISOString() .split("T")[0] // Remove timezone }, - label: i18n.t("Last 30 Days"), + label: intl.formatMessage({ + defaultMessage: "Last 30 Days" + }), value: OrderFilterKeys.dateLastMonth.toString() }, { @@ -66,58 +71,90 @@ const OrderListFilter: React.FC = props => { .toISOString() .split("T")[0] // Remove timezone }, - label: i18n.t("Last Year"), + label: intl.formatMessage({ + defaultMessage: "Last Year" + }), value: OrderFilterKeys.dateLastYear.toString() }, { children: [], data: { - additionalText: i18n.t("equals"), + additionalText: intl.formatMessage({ + defaultMessage: "equals" + }), fieldLabel: null, type: FieldType.date }, - label: i18n.t("Specific Date"), + label: intl.formatMessage({ + defaultMessage: "Specific Date" + }), value: OrderFilterKeys.dateEqual.toString() }, { children: [], data: { - fieldLabel: i18n.t("Range"), + fieldLabel: intl.formatMessage({ + defaultMessage: "Range" + }), type: FieldType.rangeDate }, - label: i18n.t("Range"), + label: intl.formatMessage({ + defaultMessage: "Range" + }), value: OrderFilterKeys.dateRange.toString() } ], data: { - fieldLabel: i18n.t("Date"), + fieldLabel: intl.formatMessage({ + defaultMessage: "Date" + }), type: FieldType.select }, - label: i18n.t("Date"), + label: intl.formatMessage({ + defaultMessage: "Date" + }), value: OrderFilterKeys.date.toString() }, { children: [], data: { - additionalText: i18n.t("is set as"), - fieldLabel: i18n.t("Status"), + additionalText: intl.formatMessage({ + defaultMessage: "is set as", + description: "date is set as" + }), + fieldLabel: intl.formatMessage({ + defaultMessage: "Status", + description: "order fulfillment status" + }), options: [ { - label: i18n.t("Fulfilled"), + label: intl.formatMessage({ + defaultMessage: "Fulfilled", + description: "order fulfillment status" + }), value: OrderStatusFilter.FULFILLED.toString() }, { - label: i18n.t("Partially Fulfilled"), + label: intl.formatMessage({ + defaultMessage: "Partially Fulfilled", + description: "order fulfillment status" + }), value: OrderStatusFilter.PARTIALLY_FULFILLED.toString() }, { - label: i18n.t("Unfulfilled"), + label: intl.formatMessage({ + defaultMessage: "Unfulfilled", + description: "order fulfillment status" + }), value: OrderStatusFilter.UNFULFILLED.toString() } ], type: FieldType.select }, - label: i18n.t("Fulfillment Status"), + label: intl.formatMessage({ + defaultMessage: "Fulfillment Status", + description: "order" + }), value: OrderFilterKeys.fulfillment.toString() } ]; diff --git a/src/orders/components/OrderListPage/OrderListPage.tsx b/src/orders/components/OrderListPage/OrderListPage.tsx index 96d25ba14..3ccd68653 100644 --- a/src/orders/components/OrderListPage/OrderListPage.tsx +++ b/src/orders/components/OrderListPage/OrderListPage.tsx @@ -2,10 +2,11 @@ import Button from "@material-ui/core/Button"; import Card from "@material-ui/core/Card"; import AddIcon from "@material-ui/icons/Add"; import React from "react"; +import { FormattedMessage, useIntl } from "react-intl"; import Container from "@saleor/components/Container"; import PageHeader from "@saleor/components/PageHeader"; -import i18n from "@saleor/i18n"; +import { sectionNames } from "@saleor/intl"; import { FilterPageProps, ListActions, PageListProps } from "@saleor/types"; import { OrderList_orders_edges_node } from "../../types/OrderList"; import { OrderListUrlFilters } from "../../urls"; @@ -33,33 +34,48 @@ const OrderListPage: React.FC = ({ onTabChange, onFilterDelete, ...listProps -}) => ( - - - - - - - - - -); +}) => { + const intl = useIntl(); + + return ( + + + + + + + + + + ); +}; OrderListPage.displayName = "OrderListPage"; export default OrderListPage; diff --git a/src/orders/components/OrderMarkAsPaidDialog/OrderMarkAsPaidDialog.tsx b/src/orders/components/OrderMarkAsPaidDialog/OrderMarkAsPaidDialog.tsx index 19e83e459..f0dad31dd 100644 --- a/src/orders/components/OrderMarkAsPaidDialog/OrderMarkAsPaidDialog.tsx +++ b/src/orders/components/OrderMarkAsPaidDialog/OrderMarkAsPaidDialog.tsx @@ -1,9 +1,9 @@ import DialogContentText from "@material-ui/core/DialogContentText"; import React from "react"; +import { FormattedMessage, useIntl } from "react-intl"; import ActionDialog from "@saleor/components/ActionDialog"; import { ConfirmButtonTransitionState } from "@saleor/components/ConfirmButton"; -import i18n from "../../../i18n"; export interface OrderMarkAsPaidDialogProps { confirmButtonState: ConfirmButtonTransitionState; @@ -14,20 +14,25 @@ export interface OrderMarkAsPaidDialogProps { const OrderMarkAsPaidDialog: React.StatelessComponent< OrderMarkAsPaidDialogProps -> = ({ confirmButtonState, onClose, onConfirm, open }) => ( - - - {i18n.t("Are you sure you want to mark this order as paid?", { - context: "modal content" +> = ({ confirmButtonState, onClose, onConfirm, open }) => { + const intl = useIntl(); + + return ( + - -); + onClose={onClose} + onConfirm={onConfirm} + > + + + + + ); +}; OrderMarkAsPaidDialog.displayName = "OrderMarkAsPaidDialog"; export default OrderMarkAsPaidDialog; diff --git a/src/orders/components/OrderPayment/OrderPayment.tsx b/src/orders/components/OrderPayment/OrderPayment.tsx index 2701e0c81..34d1617b8 100644 --- a/src/orders/components/OrderPayment/OrderPayment.tsx +++ b/src/orders/components/OrderPayment/OrderPayment.tsx @@ -9,13 +9,13 @@ import { WithStyles } from "@material-ui/core/styles"; import React from "react"; +import { FormattedMessage, useIntl } from "react-intl"; import CardTitle from "@saleor/components/CardTitle"; import { Hr } from "@saleor/components/Hr"; import Money, { subtractMoney } from "@saleor/components/Money"; import Skeleton from "@saleor/components/Skeleton"; import StatusLabel from "@saleor/components/StatusLabel"; -import i18n from "../../../i18n"; import { maybe, transformPaymentStatus } from "../../../misc"; import { OrderAction, OrderStatus } from "../../../types/globalTypes"; import { OrderDetails_order } from "../../types/OrderDetails"; @@ -52,6 +52,8 @@ const OrderPayment = withStyles(styles, { name: "OrderPayment" })( onRefund, onVoid }: OrderPaymentProps) => { + const intl = useIntl(); + const canCapture = maybe(() => order.actions, []).includes( OrderAction.CAPTURE ); @@ -78,16 +80,25 @@ const OrderPayment = withStyles(styles, { name: "OrderPayment" })( - + - + - + - +
{i18n.t("Subtotal")} + + {maybe(() => order.lines) === undefined ? ( ) : ( - i18n.t("{{ quantity }} items", { - quantity: order.lines - .map(line => line.quantity) - .reduce((curr, prev) => prev + curr, 0) - }) + line.quantity) + .reduce((curr, prev) => prev + curr, 0) + }} + /> )} @@ -99,14 +110,23 @@ const OrderPayment = withStyles(styles, { name: "OrderPayment" })(
{i18n.t("Taxes")} + + {maybe(() => order.total.tax) === undefined ? ( ) : order.total.tax.amount > 0 ? ( - i18n.t("VAT included") + intl.formatMessage({ + defaultMessage: "VAT included", + description: "vat included in order price" + }) ) : ( - i18n.t("does not apply") + intl.formatMessage({ + defaultMessage: "does not apply", + description: "vat not included in order price", + id: "orderPaymentVATDoesNotApply" + }) )} @@ -118,13 +138,22 @@ const OrderPayment = withStyles(styles, { name: "OrderPayment" })(
{i18n.t("Shipping")} + + {maybe(() => order.shippingMethodName) === undefined && maybe(() => order.shippingPrice) === undefined ? ( ) : order.shippingMethodName === null ? ( - i18n.t("does not apply") + intl.formatMessage({ + defaultMessage: "does not apply", + description: "order does not require shipping", + id: "orderPaymentShippingDoesNotApply" + }) ) : ( order.shippingMethodName )} @@ -138,7 +167,12 @@ const OrderPayment = withStyles(styles, { name: "OrderPayment" })(
{i18n.t("Total")} + + {maybe(() => order.total.gross) === undefined ? ( @@ -156,7 +190,12 @@ const OrderPayment = withStyles(styles, { name: "OrderPayment" })( - + - + - +
{i18n.t("Preauthorized amount")} + + {maybe(() => order.totalAuthorized.amount) === undefined ? ( @@ -166,7 +205,12 @@ const OrderPayment = withStyles(styles, { name: "OrderPayment" })(
{i18n.t("Captured amount")} + + {maybe(() => order.totalCaptured.amount) === undefined ? ( @@ -176,7 +220,12 @@ const OrderPayment = withStyles(styles, { name: "OrderPayment" })(
{i18n.t("Outstanding Balance")} + + {maybe( () => order.total.gross.amount && order.totalCaptured.amount @@ -202,22 +251,34 @@ const OrderPayment = withStyles(styles, { name: "OrderPayment" })( {canCapture && ( )} {canRefund && ( )} {canVoid && ( )} {canMarkAsPaid && ( )} diff --git a/src/orders/components/OrderPaymentDialog/OrderPaymentDialog.tsx b/src/orders/components/OrderPaymentDialog/OrderPaymentDialog.tsx index 5e9f8b068..a87536796 100644 --- a/src/orders/components/OrderPaymentDialog/OrderPaymentDialog.tsx +++ b/src/orders/components/OrderPaymentDialog/OrderPaymentDialog.tsx @@ -5,12 +5,13 @@ import DialogContent from "@material-ui/core/DialogContent"; import DialogTitle from "@material-ui/core/DialogTitle"; import TextField from "@material-ui/core/TextField"; import React from "react"; +import { FormattedMessage, useIntl } from "react-intl"; import ConfirmButton, { ConfirmButtonTransitionState } from "@saleor/components/ConfirmButton"; import Form from "@saleor/components/Form"; -import i18n from "../../../i18n"; +import { buttonMessages } from "@saleor/intl"; export interface FormData { amount: number; @@ -32,58 +33,71 @@ const OrderPaymentDialog: React.StatelessComponent = ({ variant, onClose, onSubmit -}) => ( - -
{ - onSubmit(data); - onClose(); - }} - > - {({ data, change, submit }) => ( - <> - - {variant === "capture" - ? i18n.t("Capture payment", { context: "title" }) - : i18n.t("Refund payment", { context: "title" })} - +}) => { + const intl = useIntl(); - - - - - - { - onClose(); - submit(); - }} - > - {i18n.t("Confirm", { context: "button" })} - - - - )} -
-
-); + return ( + +
{ + onSubmit(data); + onClose(); + }} + > + {({ data, change, submit }) => ( + <> + + {variant === "capture" + ? intl.formatMessage({ + defaultMessage: "Capture Payment", + description: "dialog header" + }) + : intl.formatMessage({ + defaultMessage: "Refund Payment", + description: "dialog header" + })} + + + + + + + + { + onClose(); + submit(); + }} + > + + + + + )} +
+
+ ); +}; OrderPaymentDialog.displayName = "OrderPaymentDialog"; export default OrderPaymentDialog; diff --git a/src/orders/components/OrderPaymentVoidDialog/OrderPaymentVoidDialog.tsx b/src/orders/components/OrderPaymentVoidDialog/OrderPaymentVoidDialog.tsx index 28ae4a093..3dbd1a16a 100644 --- a/src/orders/components/OrderPaymentVoidDialog/OrderPaymentVoidDialog.tsx +++ b/src/orders/components/OrderPaymentVoidDialog/OrderPaymentVoidDialog.tsx @@ -5,11 +5,12 @@ import DialogContent from "@material-ui/core/DialogContent"; import DialogContentText from "@material-ui/core/DialogContentText"; import DialogTitle from "@material-ui/core/DialogTitle"; import React from "react"; +import { FormattedMessage } from "react-intl"; import ConfirmButton, { ConfirmButtonTransitionState } from "@saleor/components/ConfirmButton"; -import i18n from "../../../i18n"; +import { buttonMessages } from "@saleor/intl"; interface OrderPaymentVoidDialogProps { confirmButtonState: ConfirmButtonTransitionState; @@ -22,21 +23,28 @@ const OrderPaymentVoidDialog: React.StatelessComponent< OrderPaymentVoidDialogProps > = ({ confirmButtonState, open, onConfirm, onClose }) => ( - {i18n.t("Void payment", { context: "title" })} + + + - {i18n.t("Are you sure you want to void this payment?")} + - + - {i18n.t("Confirm", { context: "button" })} + diff --git a/src/orders/components/OrderProductAddDialog/OrderProductAddDialog.tsx b/src/orders/components/OrderProductAddDialog/OrderProductAddDialog.tsx index 7b5f4f557..479e2a567 100644 --- a/src/orders/components/OrderProductAddDialog/OrderProductAddDialog.tsx +++ b/src/orders/components/OrderProductAddDialog/OrderProductAddDialog.tsx @@ -17,6 +17,7 @@ import TableRow from "@material-ui/core/TableRow"; import TextField from "@material-ui/core/TextField"; import React from "react"; import InfiniteScroll from "react-infinite-scroller"; +import { FormattedMessage, useIntl } from "react-intl"; import Checkbox from "@saleor/components/Checkbox"; import ConfirmButton, { @@ -25,7 +26,7 @@ import ConfirmButton, { import Money from "@saleor/components/Money"; import TableCellAvatar from "@saleor/components/TableCellAvatar"; import useSearchQuery from "@saleor/hooks/useSearchQuery"; -import i18n from "@saleor/i18n"; +import { buttonMessages } from "@saleor/intl"; import { maybe, renderCollection } from "@saleor/misc"; import { FetchMoreProps } from "@saleor/types"; import { @@ -161,6 +162,7 @@ const OrderProductAddDialog = withStyles(styles, { onClose, onSubmit }: OrderProductAddDialogProps & WithStyles) => { + const intl = useIntl(); const [query, onQueryChange] = useSearchQuery(onFetch); const [variants, setVariants] = React.useState< SearchOrderVariant_products_edges_node_variants[] @@ -187,21 +189,24 @@ const OrderProductAddDialog = withStyles(styles, { fullWidth maxWidth="sm" > - {i18n.t("Add product")} + + +
{variant.name}
- {i18n.t("SKU {{ sku }}", { - sku: variant.sku - })} +
@@ -301,7 +310,7 @@ const OrderProductAddDialog = withStyles(styles, { () => ( - {i18n.t("No products matching given query")} + ) @@ -312,7 +321,7 @@ const OrderProductAddDialog = withStyles(styles, {
- {i18n.t("Confirm", { context: "button" })} + diff --git a/src/orders/components/OrderShippingMethodEditDialog/OrderShippingMethodEditDialog.tsx b/src/orders/components/OrderShippingMethodEditDialog/OrderShippingMethodEditDialog.tsx index d290f5f03..ab0d86ef7 100644 --- a/src/orders/components/OrderShippingMethodEditDialog/OrderShippingMethodEditDialog.tsx +++ b/src/orders/components/OrderShippingMethodEditDialog/OrderShippingMethodEditDialog.tsx @@ -10,6 +10,7 @@ import { WithStyles } from "@material-ui/core/styles"; import React from "react"; +import { FormattedMessage } from "react-intl"; import ConfirmButton, { ConfirmButtonTransitionState @@ -17,7 +18,7 @@ import ConfirmButton, { import Form from "@saleor/components/Form"; import Money from "@saleor/components/Money"; import { SingleSelectField } from "@saleor/components/SingleSelectField"; -import i18n from "../../../i18n"; +import { buttonMessages } from "@saleor/intl"; import { OrderDetails_order_availableShippingMethods } from "../../types/OrderDetails"; export interface FormData { @@ -85,7 +86,10 @@ const OrderShippingMethodEditDialog = withStyles(styles, { return ( - {i18n.t("Edit shipping method", { context: "title" })} +
{({ change, data }) => ( @@ -100,7 +104,7 @@ const OrderShippingMethodEditDialog = withStyles(styles, { - {i18n.t("Confirm", { context: "button" })} + diff --git a/src/orders/components/OrderUnfulfilledItems/OrderUnfulfilledItems.tsx b/src/orders/components/OrderUnfulfilledItems/OrderUnfulfilledItems.tsx index ade726e67..147f578a6 100644 --- a/src/orders/components/OrderUnfulfilledItems/OrderUnfulfilledItems.tsx +++ b/src/orders/components/OrderUnfulfilledItems/OrderUnfulfilledItems.tsx @@ -8,6 +8,7 @@ import TableCell from "@material-ui/core/TableCell"; import TableHead from "@material-ui/core/TableHead"; import TableRow from "@material-ui/core/TableRow"; import React from "react"; +import { FormattedMessage, useIntl } from "react-intl"; import CardTitle from "@saleor/components/CardTitle"; import Money from "@saleor/components/Money"; @@ -16,7 +17,6 @@ import StatusLabel from "@saleor/components/StatusLabel"; import TableCellAvatar, { AVATAR_MARGIN } from "@saleor/components/TableCellAvatar"; -import i18n from "../../../i18n"; import { maybe } from "../../../misc"; import { OrderDetails_order_lines } from "../../types/OrderDetails"; @@ -58,90 +58,116 @@ interface OrderUnfulfilledItemsProps extends WithStyles { const OrderUnfulfilledItems = withStyles(styles, { name: "OrderUnfulfilledItems" -})(({ canFulfill, classes, lines, onFulfill }: OrderUnfulfilledItemsProps) => ( - - line.quantity - line.quantityFulfilled) - .reduce((prev, curr) => prev + curr, 0) - })} - status="error" - /> - } - /> - - - - - {i18n.t("Product")} - - - {i18n.t("Quantity")} - - {i18n.t("Price")} - {i18n.t("Total")} - - - - {lines.map(line => ( - line.id)} - > - line.thumbnail.url)} - > - {maybe(() => line.productName) || } - +})(({ canFulfill, classes, lines, onFulfill }: OrderUnfulfilledItemsProps) => { + const intl = useIntl(); + + return ( + + line.quantity - line.quantityFulfilled) + .reduce((prev, curr) => prev + curr, 0) + } + )} + status="error" + /> + } + /> +
+ + + + + + + - {maybe(() => line.quantity - line.quantityFulfilled) || ( - - )} + - {maybe(() => line.unitPrice.gross) ? ( - - ) : ( - - )} + - {maybe( - () => - (line.quantity - line.quantityFulfilled) * - line.unitPrice.gross.amount - ) ? ( - - ) : ( - - )} + - ))} - -
- {canFulfill && ( - - - - )} -
-)); + + + {lines.map(line => ( + line.id)} + > + line.thumbnail.url)} + > + {maybe(() => line.productName) || } + + + {maybe(() => line.quantity - line.quantityFulfilled) || ( + + )} + + + {maybe(() => line.unitPrice.gross) ? ( + + ) : ( + + )} + + + {maybe( + () => + (line.quantity - line.quantityFulfilled) * + line.unitPrice.gross.amount + ) ? ( + + ) : ( + + )} + + + ))} + +
+ {canFulfill && ( + + + + )} + + ); +}); OrderUnfulfilledItems.displayName = "OrderUnfulfilledItems"; export default OrderUnfulfilledItems; diff --git a/src/orders/index.tsx b/src/orders/index.tsx index 7dad19c21..8bf198769 100644 --- a/src/orders/index.tsx +++ b/src/orders/index.tsx @@ -1,9 +1,10 @@ import { parse as parseQs } from "qs"; import React from "react"; +import { useIntl } from "react-intl"; import { Route, RouteComponentProps, Switch } from "react-router-dom"; +import { sectionNames } from "@saleor/intl"; import { WindowTitle } from "../components/WindowTitle"; -import i18n from "../i18n"; import { orderDraftListPath, OrderDraftListUrlQueryParams, @@ -46,15 +47,19 @@ const OrderDetails: React.StatelessComponent> = ({ ); }; -const Component = () => ( - <> - - - - - - - -); +const Component = () => { + const intl = useIntl(); + + return ( + <> + + + + + + + + ); +}; export default Component; diff --git a/src/orders/views/OrderDetails/OrderDetailsMessages.tsx b/src/orders/views/OrderDetails/OrderDetailsMessages.tsx index d24d7f741..809c7a48c 100644 --- a/src/orders/views/OrderDetails/OrderDetailsMessages.tsx +++ b/src/orders/views/OrderDetails/OrderDetailsMessages.tsx @@ -1,8 +1,8 @@ import React from "react"; +import { useIntl } from "react-intl"; import useNavigator from "@saleor/hooks/useNavigator"; import useNotifier from "@saleor/hooks/useNotifier"; -import i18n from "../../../i18n"; import { maybe } from "../../../misc"; import { OrderAddNote } from "../../types/OrderAddNote"; import { OrderCancel } from "../../types/OrderCancel"; @@ -52,55 +52,65 @@ export const OrderDetailsMessages: React.StatelessComponent< > = ({ children }) => { const navigate = useNavigator(); const pushMessage = useNotifier(); + const intl = useIntl(); const handlePaymentCapture = (data: OrderCapture) => { if (!maybe(() => data.orderCapture.errors.length)) { pushMessage({ - text: i18n.t("Payment successfully captured", { - context: "notification" + text: intl.formatMessage({ + defaultMessage: "Payment successfully captured" }) }); } else { pushMessage({ - text: i18n.t("Payment not captured: {{ errorMessage }}", { - context: "notification", - errorMessage: data.orderCapture.errors.filter( - error => error.field === "payment" - )[0].message - }) + text: intl.formatMessage( + { + defaultMessage: "Payment not captured: {errorMessage}" + }, + { + errorMessage: data.orderCapture.errors.find( + error => error.field === "payment" + ).message + } + ) }); } }; const handlePaymentRefund = (data: OrderRefund) => { if (!maybe(() => data.orderRefund.errors.length)) { pushMessage({ - text: i18n.t("Payment successfully refunded", { - context: "notification" + text: intl.formatMessage({ + defaultMessage: "Payment successfully refunded" }) }); } else { pushMessage({ - text: i18n.t("Payment not refunded: {{ errorMessage }}", { - context: "notification", - errorMessage: data.orderRefund.errors.filter( - error => error.field === "payment" - )[0].message - }) + text: intl.formatMessage( + { + defaultMessage: "Payment not refunded: {errorMessage}", + description: "notification" + }, + { + errorMessage: data.orderRefund.errors.find( + error => error.field === "payment" + ).message + } + ) }); } }; const handleOrderFulfillmentCreate = (data: OrderCreateFulfillment) => { if (!maybe(() => data.orderFulfillmentCreate.errors.length)) { pushMessage({ - text: i18n.t("Items successfully fulfilled", { - context: "notification" + text: intl.formatMessage({ + defaultMessage: "Items successfully fulfilled" }) }); navigate(orderUrl(data.orderFulfillmentCreate.order.id), true); } else { pushMessage({ - text: i18n.t("Could not fulfill items", { - context: "notification" + text: intl.formatMessage({ + defaultMessage: "Could not fulfill items" }) }); } @@ -108,53 +118,53 @@ export const OrderDetailsMessages: React.StatelessComponent< const handleOrderMarkAsPaid = (data: OrderMarkAsPaid) => { if (!maybe(() => data.orderMarkAsPaid.errors.length)) { pushMessage({ - text: i18n.t("Order marked as paid", { - context: "notification" + text: intl.formatMessage({ + defaultMessage: "Order marked as paid" }) }); navigate(orderUrl(data.orderMarkAsPaid.order.id), true); } else { pushMessage({ - text: i18n.t("Could not mark order as paid", { - context: "notification" + text: intl.formatMessage({ + defaultMessage: "Could not mark order as paid" }) }); } }; const handleOrderCancel = (data: OrderCancel) => { pushMessage({ - text: i18n.t("Order successfully cancelled", { - context: "notification" + text: intl.formatMessage({ + defaultMessage: "Order successfully cancelled" }) }); navigate(orderUrl(data.orderCancel.order.id), true); }; const handleDraftCancel = () => { pushMessage({ - text: i18n.t("Order successfully cancelled", { - context: "notification" + text: intl.formatMessage({ + defaultMessage: "Order successfully cancelled" }) }); navigate(orderListUrl(), true); }; const handleOrderVoid = () => { pushMessage({ - text: i18n.t("Order payment successfully voided", { - context: "notification" + text: intl.formatMessage({ + defaultMessage: "Order payment successfully voided" }) }); }; const handleNoteAdd = (data: OrderAddNote) => { if (!maybe(() => data.orderAddNote.errors.length)) { pushMessage({ - text: i18n.t("Note successfully added", { - context: "notification" + text: intl.formatMessage({ + defaultMessage: "Note successfully added" }) }); } else { pushMessage({ - text: i18n.t("Could not add note", { - context: "notification" + text: intl.formatMessage({ + defaultMessage: "Could not add note" }) }); } @@ -162,8 +172,8 @@ export const OrderDetailsMessages: React.StatelessComponent< const handleUpdate = (data: OrderUpdate) => { if (!maybe(() => data.orderUpdate.errors.length)) { pushMessage({ - text: i18n.t("Order successfully updated", { - context: "notification" + text: intl.formatMessage({ + defaultMessage: "Order successfully updated" }) }); navigate(orderUrl(data.orderUpdate.order.id), true); @@ -172,8 +182,8 @@ export const OrderDetailsMessages: React.StatelessComponent< const handleDraftUpdate = (data: OrderDraftUpdate) => { if (!maybe(() => data.draftOrderUpdate.errors.length)) { pushMessage({ - text: i18n.t("Order successfully updated", { - context: "notification" + text: intl.formatMessage({ + defaultMessage: "Order successfully updated" }) }); navigate(orderUrl(data.draftOrderUpdate.order.id), true); @@ -182,14 +192,14 @@ export const OrderDetailsMessages: React.StatelessComponent< const handleShippingMethodUpdate = (data: OrderShippingMethodUpdate) => { if (!maybe(() => data.orderUpdateShipping.errors.length)) { pushMessage({ - text: i18n.t("Shipping method successfully updated", { - context: "notification" + text: intl.formatMessage({ + defaultMessage: "Shipping method successfully updated" }) }); } else { pushMessage({ - text: i18n.t("Could not update shipping method", { - context: "notification" + text: intl.formatMessage({ + defaultMessage: "Could not update shipping method" }) }); } @@ -198,14 +208,14 @@ export const OrderDetailsMessages: React.StatelessComponent< const handleOrderLineDelete = (data: OrderLineDelete) => { if (!maybe(() => data.draftOrderLineDelete.errors.length)) { pushMessage({ - text: i18n.t("Order line deleted", { - context: "notification" + text: intl.formatMessage({ + defaultMessage: "Order line deleted" }) }); } else { pushMessage({ - text: i18n.t("Could not delete order line", { - context: "notification" + text: intl.formatMessage({ + defaultMessage: "Could not delete order line" }) }); } @@ -213,15 +223,15 @@ export const OrderDetailsMessages: React.StatelessComponent< const handleOrderLinesAdd = (data: OrderLinesAdd) => { if (!maybe(() => data.draftOrderLinesCreate.errors.length)) { pushMessage({ - text: i18n.t("Order line added", { - context: "notification" + text: intl.formatMessage({ + defaultMessage: "Order line added" }) }); navigate(orderUrl(data.draftOrderLinesCreate.order.id), true); } else { pushMessage({ - text: i18n.t("Could not create order line", { - context: "notification" + text: intl.formatMessage({ + defaultMessage: "Could not create order line" }) }); } @@ -229,14 +239,14 @@ export const OrderDetailsMessages: React.StatelessComponent< const handleOrderLineUpdate = (data: OrderLineUpdate) => { if (!maybe(() => data.draftOrderLineUpdate.errors.length)) { pushMessage({ - text: i18n.t("Order line updated", { - context: "notification" + text: intl.formatMessage({ + defaultMessage: "Order line updated" }) }); } else { pushMessage({ - text: i18n.t("Could not update order line", { - context: "notification" + text: intl.formatMessage({ + defaultMessage: "Could not update order line" }) }); } @@ -244,15 +254,15 @@ export const OrderDetailsMessages: React.StatelessComponent< const handleOrderFulfillmentCancel = (data: OrderFulfillmentCancel) => { if (!maybe(() => data.orderFulfillmentCancel.errors.length)) { pushMessage({ - text: i18n.t("Fulfillment successfully cancelled", { - context: "notification" + text: intl.formatMessage({ + defaultMessage: "Fulfillment successfully cancelled" }) }); navigate(orderUrl(data.orderFulfillmentCancel.order.id), true); } else { pushMessage({ - text: i18n.t("Could not cancel fulfillment", { - context: "notification" + text: intl.formatMessage({ + defaultMessage: "Could not cancel fulfillment" }) }); } @@ -262,15 +272,15 @@ export const OrderDetailsMessages: React.StatelessComponent< ) => { if (!maybe(() => data.orderFulfillmentUpdateTracking.errors.length)) { pushMessage({ - text: i18n.t("Fulfillment successfully updated", { - context: "notification" + text: intl.formatMessage({ + defaultMessage: "Fulfillment successfully updated" }) }); navigate(orderUrl(data.orderFulfillmentUpdateTracking.order.id), true); } else { pushMessage({ - text: i18n.t("Could not update fulfillment", { - context: "notification" + text: intl.formatMessage({ + defaultMessage: "Could not update fulfillment" }) }); } @@ -278,15 +288,15 @@ export const OrderDetailsMessages: React.StatelessComponent< const handleDraftFinalize = (data: OrderDraftFinalize) => { if (!maybe(() => data.draftOrderComplete.errors.length)) { pushMessage({ - text: i18n.t("Draft order successfully finalized", { - context: "notification" + text: intl.formatMessage({ + defaultMessage: "Draft order successfully finalized" }) }); navigate(orderUrl(data.draftOrderComplete.order.id), true); } else { pushMessage({ - text: i18n.t("Could not finalize draft", { - context: "notification" + text: intl.formatMessage({ + defaultMessage: "Could not finalize draft" }) }); } diff --git a/src/orders/views/OrderDraftList.tsx b/src/orders/views/OrderDraftList.tsx index 129ba3fcf..635bbb7a2 100644 --- a/src/orders/views/OrderDraftList.tsx +++ b/src/orders/views/OrderDraftList.tsx @@ -2,6 +2,7 @@ import DialogContentText from "@material-ui/core/DialogContentText"; import IconButton from "@material-ui/core/IconButton"; import DeleteIcon from "@material-ui/icons/Delete"; import React from "react"; +import { FormattedMessage, useIntl } from "react-intl"; import ActionDialog from "@saleor/components/ActionDialog"; import useBulkActions from "@saleor/hooks/useBulkActions"; @@ -11,7 +12,6 @@ import useNotifier from "@saleor/hooks/useNotifier"; import usePaginator, { createPaginationState } from "@saleor/hooks/usePaginator"; -import i18n from "@saleor/i18n"; import { getMutationState, maybe } from "@saleor/misc"; import { ListViews } from "@saleor/types"; import OrderDraftListPage from "../components/OrderDraftListPage"; @@ -44,6 +44,7 @@ export const OrderDraftList: React.StatelessComponent = ({ const { updateListSettings, settings } = useListSettings( ListViews.DRAFT_LIST ); + const intl = useIntl(); const closeModal = () => navigate( @@ -56,7 +57,9 @@ export const OrderDraftList: React.StatelessComponent = ({ const handleCreateOrderCreateSuccess = (data: OrderDraftCreate) => { notify({ - text: i18n.t("Order draft succesfully created") + text: intl.formatMessage({ + defaultMessage: "Order draft succesfully created" + }) }); navigate(orderUrl(data.draftOrderCreate.order.id)); }; @@ -77,7 +80,9 @@ export const OrderDraftList: React.StatelessComponent = ({ const handleOrderDraftBulkCancel = (data: OrderDraftBulkCancel) => { if (data.draftOrderBulkDelete.errors.length === 0) { notify({ - text: i18n.t("Removed draft orders") + text: intl.formatMessage({ + defaultMessage: "Removed draft orders" + }) }); refetch(); reset(); @@ -145,22 +150,29 @@ export const OrderDraftList: React.StatelessComponent = ({ onClose={closeModal} onConfirm={onOrderDraftBulkDelete} open={params.action === "remove"} - title={i18n.t("Remove Order Drafts")} + title={intl.formatMessage({ + defaultMessage: "Delete Order Drafts", + description: "dialog header" + })} variant="delete" > - {{ number }} order drafts?", - { - number: maybe( - () => params.ids.length.toString(), - "..." - ) - } - ) - }} - /> + + params.ids.length), + displayQuantity: ( + + {maybe(() => params.ids.length)} + + ) + }} + /> + ); diff --git a/src/orders/views/OrderList/OrderList.tsx b/src/orders/views/OrderList/OrderList.tsx index c099b6815..6c1ef2c32 100644 --- a/src/orders/views/OrderList/OrderList.tsx +++ b/src/orders/views/OrderList/OrderList.tsx @@ -1,5 +1,6 @@ import Button from "@material-ui/core/Button"; import React from "react"; +import { FormattedMessage, useIntl } from "react-intl"; import DeleteFilterTabDialog from "@saleor/components/DeleteFilterTabDialog"; import SaveFilterTabDialog, { @@ -14,7 +15,6 @@ import usePaginator, { createPaginationState } from "@saleor/hooks/usePaginator"; import useShop from "@saleor/hooks/useShop"; -import i18n from "@saleor/i18n"; import { getMutationState, maybe } from "@saleor/misc"; import { ListViews } from "@saleor/types"; import OrderBulkCancelDialog from "../../components/OrderBulkCancelDialog"; @@ -62,6 +62,7 @@ export const OrderList: React.StatelessComponent = ({ const { updateListSettings, settings } = useListSettings( ListViews.ORDER_LIST ); + const intl = useIntl(); const tabs = getFilterTabs(); @@ -133,7 +134,9 @@ export const OrderList: React.StatelessComponent = ({ const handleCreateOrderCreateSuccess = (data: OrderDraftCreate) => { notify({ - text: i18n.t("Order draft succesfully created") + text: intl.formatMessage({ + defaultMessage: "Order draft succesfully created" + }) }); navigate(orderUrl(data.draftOrderCreate.order.id)); }; @@ -160,8 +163,8 @@ export const OrderList: React.StatelessComponent = ({ const handleOrderBulkCancel = (data: OrderBulkCancel) => { if (data.orderBulkCancel.errors.length === 0) { notify({ - text: i18n.t("Orders cancelled", { - context: "notification" + text: intl.formatMessage({ + defaultMessage: "Orders cancelled" }) }); reset(); @@ -218,9 +221,10 @@ export const OrderList: React.StatelessComponent = ({ color="primary" onClick={() => openModal("cancel", listElements)} > - {i18n.t("Cancel", { - context: "cancel orders" - })} + } onSearchChange={email => changeFilterField({ email })}