Refactor shipping section translations (#127)

This commit is contained in:
Dominik Żegleń 2019-08-26 23:26:36 +02:00 committed by dominik-zeglen
parent 9abc98bdff
commit aaccb724ae
15 changed files with 1074 additions and 438 deletions

View file

@ -1,6 +1,6 @@
msgid ""
msgstr ""
"POT-Creation-Date: 2019-08-26T17:55:41.507Z\n"
"POT-Creation-Date: 2019-08-26T17:58:55.558Z\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"MIME-Version: 1.0\n"
@ -91,6 +91,14 @@ msgctxt "page header"
msgid "Add Page"
msgstr ""
#: build/locale/src/shipping/components/ShippingZoneRateDialog/ShippingZoneRateDialog.json
#. [src.shipping.components.ShippingZoneRateDialog.2892088870] - dialog header
#. defaultMessage is:
#. Add Price Rate
msgctxt "dialog header"
msgid "Add Price Rate"
msgstr ""
#: build/locale/src/orders/components/OrderProductAddDialog/OrderProductAddDialog.json
#. [src.orders.components.OrderProductAddDialog.2775402904] - dialog header
#. defaultMessage is:
@ -131,6 +139,14 @@ msgctxt "header"
msgid "Add Variant"
msgstr ""
#: build/locale/src/shipping/components/ShippingZoneRateDialog/ShippingZoneRateDialog.json
#. [src.shipping.components.ShippingZoneRateDialog.1397795758] - add weight based shipping method, dialog header
#. defaultMessage is:
#. Add Weight Rate
msgctxt "add weight based shipping method, dialog header"
msgid "Add Weight Rate"
msgstr ""
#: build/locale/src/customers/components/CustomerAddressListPage/CustomerAddressListPage.json
#. [src.customers.components.CustomerAddressListPage.3623935073] - button
#. defaultMessage is:
@ -239,6 +255,14 @@ msgctxt "button"
msgid "Add products"
msgstr ""
#: build/locale/src/shipping/components/ShippingZoneRates/ShippingZoneRates.json
#. [src.shipping.components.ShippingZoneRates.352297149] - button
#. defaultMessage is:
#. Add rate
msgctxt "button"
msgid "Add rate"
msgstr ""
#: build/locale/src/categories/components/CategoryCreatePage/CategoryCreatePage.json
#. [src.categories.components.CategoryCreatePage.2563994280]
#. defaultMessage is:
@ -287,6 +311,14 @@ msgctxt "button"
msgid "Add shipping carrier"
msgstr ""
#: build/locale/src/shipping/components/ShippingZonesList/ShippingZonesList.json
#. [src.shipping.components.ShippingZonesList.2474410767] - button
#. defaultMessage is:
#. Add shipping zone
msgctxt "button"
msgid "Add shipping zone"
msgstr ""
#: build/locale/src/categories/components/CategoryList/CategoryList.json
#. [src.categories.components.CategoryList.435697837] - button
#. defaultMessage is:
@ -647,6 +679,14 @@ msgctxt "dialog content"
msgid "Are you sure you want to delete {counter,plural,one{this sale} other{{displayQuantity} sales}}?"
msgstr ""
#: build/locale/src/shipping/views/ShippingZonesList.json
#. [src.shipping.views.3698270769] - dialog content
#. defaultMessage is:
#. Are you sure you want to delete {counter,plural,one{this shipping zone} other{{displayQuantity} shipping zones}}?
msgctxt "dialog content"
msgid "Are you sure you want to delete {counter,plural,one{this shipping zone} other{{displayQuantity} shipping zones}}?"
msgstr ""
#: build/locale/src/products/views/ProductUpdate/ProductUpdate.json
#. [src.products.views.ProductUpdate.2446451819] - dialog content
#. defaultMessage is:
@ -703,6 +743,22 @@ msgctxt "delete product type"
msgid "Are you sure you want to delete {name}?"
msgstr ""
#: build/locale/src/shipping/views/ShippingZoneDetails/ShippingZoneDetailsDialogs.json
#. [shippingZoneDetailsDialogsDeleteShippingMethod] - delete shipping method
#. defaultMessage is:
#. Are you sure you want to delete {name}?
msgctxt "delete shipping method"
msgid "Are you sure you want to delete {name}?"
msgstr ""
#: build/locale/src/shipping/views/ShippingZoneDetails/ShippingZoneDetailsDialogs.json
#. [shippingZoneDetailsDialogsDeleteShippingZone] - delete shipping zone
#. defaultMessage is:
#. Are you sure you want to delete {name}?
msgctxt "delete shipping zone"
msgid "Are you sure you want to delete {name}?"
msgstr ""
#: build/locale/src/discounts/views/SaleDetails.json
#. [src.discounts.views.1457489953] - dialog content
#. defaultMessage is:
@ -711,6 +767,14 @@ msgctxt "dialog content"
msgid "Are you sure you want to delete {saleName}?"
msgstr ""
#: build/locale/src/shipping/views/ShippingZonesList.json
#. [src.shipping.views.1005071028]
#. defaultMessage is:
#. Are you sure you want to delete {shippingZoneName} shipping zone?
msgctxt "description"
msgid "Are you sure you want to delete {shippingZoneName} shipping zone?"
msgstr ""
#: build/locale/src/pages/views/PageDetails.json
#. [src.pages.views.754348000] - delete page
#. defaultMessage is:
@ -783,6 +847,14 @@ msgctxt "description"
msgid "Are you sure you want to remove this image?"
msgstr ""
#: build/locale/src/shipping/views/ShippingZoneDetails/ShippingZoneDetailsDialogs.json
#. [src.shipping.views.ShippingZoneDetails.1790261672] - unassign country
#. defaultMessage is:
#. Are you sure you want to remove {countryName} from this shipping zone?
msgctxt "unassign country"
msgid "Are you sure you want to remove {countryName} from this shipping zone?"
msgstr ""
#: build/locale/src/productTypes/components/ProductTypeAttributeUnassignDialog/ProductTypeAttributeUnassignDialog.json
#. [src.productTypes.components.ProductTypeAttributeUnassignDialog.722498450]
#. defaultMessage is:
@ -887,6 +959,10 @@ msgstr ""
#. [src.discounts.components.DiscountCountrySelectDialog.1585396479] - dialog header
#. defaultMessage is:
#. Assign Countries
#: build/locale/src/shipping/components/ShippingZoneCountriesAssignDialog/ShippingZoneCountriesAssignDialog.json
#. [src.shipping.components.ShippingZoneCountriesAssignDialog.1585396479] - dialog header
#. defaultMessage is:
#. Assign Countries
msgctxt "dialog header"
msgid "Assign Countries"
msgstr ""
@ -927,6 +1003,10 @@ msgstr ""
#. [src.discounts.components.DiscountCountrySelectDialog.2747492886] - button
#. defaultMessage is:
#. Assign countries
#: build/locale/src/shipping/components/ShippingZoneCountriesAssignDialog/ShippingZoneCountriesAssignDialog.json
#. [src.shipping.components.ShippingZoneCountriesAssignDialog.2747492886] - button
#. defaultMessage is:
#. Assign countries
msgctxt "button"
msgid "Assign countries"
msgstr ""
@ -1287,6 +1367,14 @@ msgctxt "description"
msgid "Charge taxes for this item"
msgstr ""
#: build/locale/src/shipping/components/ShippingZoneCountriesAssignDialog/ShippingZoneCountriesAssignDialog.json
#. [src.shipping.components.ShippingZoneCountriesAssignDialog.2404264158]
#. defaultMessage is:
#. Choose countries you want to add to shipping zone from list below
msgctxt "description"
msgid "Choose countries you want to add to shipping zone from list below"
msgstr ""
#: build/locale/src/discounts/components/DiscountCountrySelectDialog/DiscountCountrySelectDialog.json
#. [src.discounts.components.DiscountCountrySelectDialog.2177165134]
#. defaultMessage is:
@ -1499,10 +1587,30 @@ msgctxt "voucher country range"
msgid "Countries"
msgstr ""
#: build/locale/src/shipping/components/ShippingZoneCreatePage/ShippingZoneCreatePage.json
#. [src.shipping.components.ShippingZoneCreatePage.3109712047]
#. defaultMessage is:
#. Countries
#: build/locale/src/shipping/components/ShippingZoneDetailsPage/ShippingZoneDetailsPage.json
#. [src.shipping.components.ShippingZoneDetailsPage.3109712047]
#. defaultMessage is:
#. Countries
#: build/locale/src/shipping/components/ShippingZonesList/ShippingZonesList.json
#. [src.shipping.components.ShippingZonesList.3109712047]
#. defaultMessage is:
#. Countries
msgctxt "description"
msgid "Countries"
msgstr ""
#: build/locale/src/discounts/components/DiscountCountrySelectDialog/DiscountCountrySelectDialog.json
#. [src.discounts.components.DiscountCountrySelectDialog.2777439857] - country selection
#. defaultMessage is:
#. Countries A to Z
#: build/locale/src/shipping/components/ShippingZoneCountriesAssignDialog/ShippingZoneCountriesAssignDialog.json
#. [src.shipping.components.ShippingZoneCountriesAssignDialog.2777439857] - country selection
#. defaultMessage is:
#. Countries A to Z
msgctxt "country selection"
msgid "Countries A to Z"
msgstr ""
@ -1523,6 +1631,14 @@ msgctxt "page header"
msgid "Create New Category"
msgstr ""
#: build/locale/src/shipping/components/ShippingZoneCreatePage/ShippingZoneCreatePage.json
#. [src.shipping.components.ShippingZoneCreatePage.4049462680] - header
#. defaultMessage is:
#. Create New Shipping Zone
msgctxt "header"
msgid "Create New Shipping Zone"
msgstr ""
#: build/locale/src/products/views/ProductCreate.json
#. [src.products.views.1542417144] - window title
#. defaultMessage is:
@ -1615,6 +1731,14 @@ msgctxt "header"
msgid "Create page"
msgstr ""
#: build/locale/src/shipping/components/ShippingZoneRateDialog/ShippingZoneRateDialog.json
#. [src.shipping.components.ShippingZoneRateDialog.16061680] - button
#. defaultMessage is:
#. Create rate
msgctxt "button"
msgid "Create rate"
msgstr ""
#: build/locale/src/collections/views/CollectionCreate.json
#. [src.collections.views.1597339737]
#. defaultMessage is:
@ -1639,6 +1763,18 @@ 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/shipping/components/ShippingZoneCreatePage/ShippingZoneCreatePage.json
#. [src.shipping.components.ShippingZoneCreatePage.2364051773]
#. defaultMessage is:
#. Currently, there are no countries assigned to this shipping zone
#: build/locale/src/shipping/components/ShippingZoneDetailsPage/ShippingZoneDetailsPage.json
#. [src.shipping.components.ShippingZoneDetailsPage.2364051773]
#. defaultMessage is:
#. Currently, there are no countries assigned to this shipping zone
msgctxt "description"
msgid "Currently, there are no countries assigned to this shipping zone"
msgstr ""
#: build/locale/src/orders/components/OrderCustomer/OrderCustomer.json
#. [src.orders.components.OrderCustomer.3426593715] - section header
#. defaultMessage is:
@ -1935,6 +2071,34 @@ msgctxt "dialog header"
msgid "Delete Sales"
msgstr ""
#: build/locale/src/shipping/views/ShippingZoneDetails/ShippingZoneDetailsDialogs.json
#. [src.shipping.views.ShippingZoneDetails.1502359905] - dialog header
#. defaultMessage is:
#. Delete Shipping Method
msgctxt "dialog header"
msgid "Delete Shipping Method"
msgstr ""
#: build/locale/src/shipping/views/ShippingZoneDetails/ShippingZoneDetailsDialogs.json
#. [src.shipping.views.ShippingZoneDetails.1010705153] - dialog header
#. defaultMessage is:
#. Delete Shipping Zone
#: build/locale/src/shipping/views/ShippingZonesList.json
#. [src.shipping.views.1010705153] - dialog header
#. defaultMessage is:
#. Delete Shipping Zone
msgctxt "dialog header"
msgid "Delete Shipping Zone"
msgstr ""
#: build/locale/src/shipping/views/ShippingZonesList.json
#. [src.shipping.views.1711385401] - dialog header
#. defaultMessage is:
#. Delete Shipping Zones
msgctxt "dialog header"
msgid "Delete Shipping Zones"
msgstr ""
#: build/locale/src/products/components/ProductVariantCreatePage/ProductVariantCreatePage.json
#. [src.products.components.ProductVariantCreatePage.3726089650] - button
#. defaultMessage is:
@ -2255,6 +2419,14 @@ msgctxt "header"
msgid "Edit Photo"
msgstr ""
#: build/locale/src/shipping/components/ShippingZoneRateDialog/ShippingZoneRateDialog.json
#. [src.shipping.components.ShippingZoneRateDialog.3934114933] - dialog header
#. defaultMessage is:
#. Edit Price Rate
msgctxt "dialog header"
msgid "Edit Price Rate"
msgstr ""
#: build/locale/src/orders/components/OrderShippingMethodEditDialog/OrderShippingMethodEditDialog.json
#. [src.orders.components.OrderShippingMethodEditDialog.3369240294] - dialog header
#. defaultMessage is:
@ -2271,6 +2443,14 @@ msgctxt "edit attribute value"
msgid "Edit Value"
msgstr ""
#: build/locale/src/shipping/components/ShippingZoneRateDialog/ShippingZoneRateDialog.json
#. [src.shipping.components.ShippingZoneRateDialog.4152709923] - edit weight based shipping method, dialog header
#. defaultMessage is:
#. Edit Weight Rate
msgctxt "edit weight based shipping method, dialog header"
msgid "Edit Weight Rate"
msgstr ""
#: build/locale/src/products/components/ProductVariants/ProductVariants.json
#. [src.products.components.ProductVariants.1703363919] - product variant attributes, button
#. defaultMessage is:
@ -2583,6 +2763,14 @@ msgctxt "description"
msgid "If enabled, youll be able to use this attribute to filter products in product list."
msgstr ""
#: build/locale/src/shipping/components/ShippingZoneCountriesAssignDialog/ShippingZoneCountriesAssignDialog.json
#. [src.shipping.components.ShippingZoneCountriesAssignDialog.1818089229]
#. defaultMessage is:
#. If selected, this will add all of the countries not selected to other shipping zones
msgctxt "description"
msgid "If selected, this will add all of the countries not selected to other shipping zones"
msgstr ""
#: build/locale/src/discounts/components/VoucherValue/VoucherValue.json
#. [src.discounts.components.VoucherValue.4189095909]
#. defaultMessage is:
@ -2819,6 +3007,22 @@ msgctxt "order history message"
msgid "Marked order as paid"
msgstr ""
#: build/locale/src/shipping/components/ShippingZoneRateDialog/ShippingZoneRateDialog.json
#. [src.shipping.components.ShippingZoneRateDialog.3463567334]
#. defaultMessage is:
#. Maximal Order Value
msgctxt "description"
msgid "Maximal Order Value"
msgstr ""
#: build/locale/src/shipping/components/ShippingZoneRateDialog/ShippingZoneRateDialog.json
#. [src.shipping.components.ShippingZoneRateDialog.3659741519]
#. defaultMessage is:
#. Maximal Order Weight
msgctxt "description"
msgid "Maximal Order Weight"
msgstr ""
#: build/locale/src/navigation/components/MenuItems/MenuItems.json
#. [menuItemsHeader] - header
#. defaultMessage is:
@ -2859,6 +3063,22 @@ msgctxt "minimum amount of spent money to activate voucher"
msgid "Min. Spent"
msgstr ""
#: build/locale/src/shipping/components/ShippingZoneRateDialog/ShippingZoneRateDialog.json
#. [src.shipping.components.ShippingZoneRateDialog.1337705349]
#. defaultMessage is:
#. Minimal Order Value
msgctxt "description"
msgid "Minimal Order Value"
msgstr ""
#: build/locale/src/shipping/components/ShippingZoneRateDialog/ShippingZoneRateDialog.json
#. [src.shipping.components.ShippingZoneRateDialog.1878009504]
#. defaultMessage is:
#. Minimal Order Weight
msgctxt "description"
msgid "Minimal Order Weight"
msgstr ""
#: build/locale/src/discounts/components/VoucherRequirements/VoucherRequirements.json
#. [src.discounts.components.VoucherRequirements.653777456] - voucher requirement
#. defaultMessage is:
@ -2955,6 +3175,22 @@ msgctxt "product variant name"
msgid "Name"
msgstr ""
#: build/locale/src/shipping/components/ShippingZoneRates/ShippingZoneRates.json
#. [src.shipping.components.ShippingZoneRates.636461959] - shipping method name
#. defaultMessage is:
#. Name
msgctxt "shipping method name"
msgid "Name"
msgstr ""
#: build/locale/src/shipping/components/ShippingZonesList/ShippingZonesList.json
#. [src.shipping.components.ShippingZonesList.636461959] - shipping zone
#. defaultMessage is:
#. Name
msgctxt "shipping zone"
msgid "Name"
msgstr ""
#: build/locale/src/intl.json
#. [src.navigation] - navigation section name
#. defaultMessage is:
@ -3183,6 +3419,22 @@ msgctxt "description"
msgid "No shipping address"
msgstr ""
#: build/locale/src/shipping/components/ShippingZoneRates/ShippingZoneRates.json
#. [src.shipping.components.ShippingZoneRates.1961493435]
#. defaultMessage is:
#. No shipping rates found
msgctxt "description"
msgid "No shipping rates found"
msgstr ""
#: build/locale/src/shipping/components/ShippingZonesList/ShippingZonesList.json
#. [src.shipping.components.ShippingZonesList.655374584]
#. defaultMessage is:
#. No shipping zones found
msgctxt "description"
msgid "No shipping zones found"
msgstr ""
#: build/locale/src/categories/components/CategoryList/CategoryList.json
#. [src.categories.components.CategoryList.2155313053]
#. defaultMessage is:
@ -3775,6 +4027,22 @@ msgctxt "product variant price"
msgid "Price"
msgstr ""
#: build/locale/src/shipping/components/ShippingZoneRates/ShippingZoneRates.json
#. [src.shipping.components.ShippingZoneRates.1134347598] - shipping method price
#. defaultMessage is:
#. Price
msgctxt "shipping method price"
msgid "Price"
msgstr ""
#: build/locale/src/shipping/components/ShippingZoneRates/ShippingZoneRates.json
#. [src.shipping.components.ShippingZoneRates.2542194565] - price based shipping methods, section header
#. defaultMessage is:
#. Price Based Rates
msgctxt "price based shipping methods, section header"
msgid "Price Based Rates"
msgstr ""
#: build/locale/src/discounts/components/SalePricing/SalePricing.json
#. [src.discounts.components.SalePricing.1099355007] - sale pricing, header
#. defaultMessage is:
@ -4127,6 +4395,14 @@ msgctxt "ordered products"
msgid "Quantity"
msgstr ""
#: build/locale/src/shipping/components/ShippingZoneCountriesAssignDialog/ShippingZoneCountriesAssignDialog.json
#. [src.shipping.components.ShippingZoneCountriesAssignDialog.1440682557]
#. defaultMessage is:
#. Quick Pick
msgctxt "description"
msgid "Quick Pick"
msgstr ""
#: build/locale/src/orders/components/OrderListFilter/OrderListFilter.json
#. [src.orders.components.OrderListFilter.2545228781]
#. defaultMessage is:
@ -4139,6 +4415,30 @@ msgctxt "description"
msgid "Range"
msgstr ""
#: build/locale/src/shipping/components/ShippingZoneRateDialog/ShippingZoneRateDialog.json
#. [src.shipping.components.ShippingZoneRateDialog.3213611593] - shipping method
#. defaultMessage is:
#. Rate
msgctxt "shipping method"
msgid "Rate"
msgstr ""
#: build/locale/src/shipping/components/ShippingZoneRateDialog/ShippingZoneRateDialog.json
#. [src.shipping.components.ShippingZoneRateDialog.382595300] - shipping method name
#. defaultMessage is:
#. Rate Name
msgctxt "shipping method name"
msgid "Rate Name"
msgstr ""
#: build/locale/src/shipping/components/ShippingZoneRateDialog/ShippingZoneRateDialog.json
#. [src.shipping.components.ShippingZoneRateDialog.1403365734] - shipping method price
#. defaultMessage is:
#. Rate Price
msgctxt "shipping method price"
msgid "Rate Price"
msgstr ""
#: build/locale/src/customers/components/CustomerOrders/CustomerOrders.json
#. [src.customers.components.CustomerOrders.3878642352] - section header
#. defaultMessage is:
@ -4215,6 +4515,14 @@ msgctxt "dialog header"
msgid "Remove draft order"
msgstr ""
#: build/locale/src/shipping/views/ShippingZoneDetails/ShippingZoneDetailsDialogs.json
#. [src.shipping.views.ShippingZoneDetails.254167659] - unassign country, dialog header
#. defaultMessage is:
#. Remove from shipping zone
msgctxt "unassign country, dialog header"
msgid "Remove from shipping zone"
msgstr ""
#: build/locale/src/orders/views/OrderDraftList.json
#. [src.orders.views.3880993240]
#. defaultMessage is:
@ -4247,6 +4555,14 @@ msgctxt "description"
msgid "Removed sale"
msgstr ""
#: build/locale/src/shipping/components/ShippingZoneCountriesAssignDialog/ShippingZoneCountriesAssignDialog.json
#. [src.shipping.components.ShippingZoneCountriesAssignDialog.1003092716]
#. defaultMessage is:
#. Rest of the World
msgctxt "description"
msgid "Rest of the World"
msgstr ""
#: build/locale/src/orders/components/OrderFulfillmentCancelDialog/OrderFulfillmentCancelDialog.json
#. [src.orders.components.OrderFulfillmentCancelDialog.3515223857] - switch button
#. defaultMessage is:
@ -4347,6 +4663,14 @@ msgctxt "description"
msgid "Search Attributes"
msgstr ""
#: build/locale/src/shipping/components/ShippingZoneCountriesAssignDialog/ShippingZoneCountriesAssignDialog.json
#. [src.shipping.components.ShippingZoneCountriesAssignDialog.3510295703]
#. defaultMessage is:
#. Search Countries
msgctxt "description"
msgid "Search Countries"
msgstr ""
#: build/locale/src/orders/components/OrderCustomer/OrderCustomer.json
#. [src.orders.components.OrderCustomer.2433460203]
#. defaultMessage is:
@ -4395,6 +4719,14 @@ msgctxt "search box placeholder"
msgid "Search by country name"
msgstr ""
#: build/locale/src/shipping/components/ShippingZoneCountriesAssignDialog/ShippingZoneCountriesAssignDialog.json
#. [src.shipping.components.ShippingZoneCountriesAssignDialog.2110418881]
#. defaultMessage is:
#. Search by country name
msgctxt "description"
msgid "Search by country name"
msgstr ""
#: build/locale/src/orders/components/OrderProductAddDialog/OrderProductAddDialog.json
#. [src.orders.components.OrderProductAddDialog.2336947364]
#. defaultMessage is:
@ -4483,6 +4815,22 @@ msgctxt "product type shipping settings, section header"
msgid "Shipping"
msgstr ""
#: build/locale/src/shipping/components/ShippingZoneDetailsPage/ShippingZoneDetailsPage.json
#. [src.shipping.components.ShippingZoneDetailsPage.1325966144]
#. defaultMessage is:
#. Shipping
msgctxt "description"
msgid "Shipping"
msgstr ""
#: build/locale/src/shipping/components/ShippingZonesListPage/ShippingZonesListPage.json
#. [src.shipping.components.ShippingZonesListPage.1325966144] - header
#. defaultMessage is:
#. Shipping
msgctxt "header"
msgid "Shipping"
msgstr ""
#: build/locale/src/orders/components/OrderCustomer/OrderCustomer.json
#. [src.orders.components.OrderCustomer.2758581442]
#. defaultMessage is:
@ -4499,6 +4847,22 @@ msgctxt "shipping section name"
msgid "Shipping Methods"
msgstr ""
#: build/locale/src/shipping/components/ShippingWeightUnitForm/ShippingWeightUnitForm.json
#. [src.shipping.components.ShippingWeightUnitForm.549146363]
#. defaultMessage is:
#. Shipping Weight Unit
msgctxt "description"
msgid "Shipping Weight Unit"
msgstr ""
#: build/locale/src/shipping/components/ShippingZoneInfo/ShippingZoneInfo.json
#. [src.shipping.components.ShippingZoneInfo.1109610983]
#. defaultMessage is:
#. Shipping Zone Name
msgctxt "description"
msgid "Shipping Zone Name"
msgstr ""
#: build/locale/src/customers/components/CustomerAddresses/CustomerAddresses.json
#. [src.customers.components.CustomerAddresses.3517722732] - subsection header
#. defaultMessage is:
@ -4507,6 +4871,14 @@ msgctxt "subsection header"
msgid "Shipping address"
msgstr ""
#: build/locale/src/shipping/components/ShippingZonesList/ShippingZonesList.json
#. [src.shipping.components.ShippingZonesList.2942726079] - sort shipping methods by zone, section header
#. defaultMessage is:
#. Shipping by zone
msgctxt "sort shipping methods by zone, section header"
msgid "Shipping by zone"
msgstr ""
#: build/locale/src/orders/components/OrderHistory/OrderHistory.json
#. [src.orders.components.OrderHistory.651019008] - order history message
#. defaultMessage is:
@ -4883,6 +5255,14 @@ msgctxt "description"
msgid "There are missing or incorrect informations about this order:"
msgstr ""
#: build/locale/src/shipping/components/ShippingZoneRateDialog/ShippingZoneRateDialog.json
#. [src.shipping.components.ShippingZoneRateDialog.882649212] - shipping method has no value limits
#. defaultMessage is:
#. There are no value limits
msgctxt "shipping method has no value limits"
msgid "There are no value limits"
msgstr ""
#: build/locale/src/customers/components/CustomerAddressListPage/CustomerAddressListPage.json
#. [src.customers.components.CustomerAddressListPage.1484733755]
#. defaultMessage is:
@ -4907,6 +5287,26 @@ msgctxt "description"
msgid "This customer has no addresses yet"
msgstr ""
#: build/locale/src/shipping/components/ShippingZoneCreatePage/ShippingZoneCreatePage.json
#. [src.shipping.components.ShippingZoneCreatePage.4270729636]
#. defaultMessage is:
#. This is default shipping zone, which means that it covers all of the countries which are not assigned to other shipping zones
#: build/locale/src/shipping/components/ShippingZoneDetailsPage/ShippingZoneDetailsPage.json
#. [src.shipping.components.ShippingZoneDetailsPage.4270729636]
#. defaultMessage is:
#. This is default shipping zone, which means that it covers all of the countries which are not assigned to other shipping zones
msgctxt "description"
msgid "This is default shipping zone, which means that it covers all of the countries which are not assigned to other shipping zones"
msgstr ""
#: build/locale/src/shipping/components/ShippingZoneRateDialog/ShippingZoneRateDialog.json
#. [src.shipping.components.ShippingZoneRateDialog.2215090771] - shipping method, switch button
#. defaultMessage is:
#. This is free shipping
msgctxt "shipping method, switch button"
msgid "This is free shipping"
msgstr ""
#: build/locale/src/attributes/components/AttributeDetails/AttributeDetails.json
#. [src.attributes.components.AttributeDetails.4107478955] - attribute slug input field helper text
#. defaultMessage is:
@ -4931,6 +5331,38 @@ msgctxt "switch button"
msgid "This product type has variants"
msgstr ""
#: build/locale/src/shipping/components/ShippingZoneRateDialog/ShippingZoneRateDialog.json
#. [src.shipping.components.ShippingZoneRateDialog.4226393146]
#. defaultMessage is:
#. This rate will apply to all orders of all prices
msgctxt "description"
msgid "This rate will apply to all orders of all prices"
msgstr ""
#: build/locale/src/shipping/components/ShippingZoneRateDialog/ShippingZoneRateDialog.json
#. [src.shipping.components.ShippingZoneRateDialog.1388947267]
#. defaultMessage is:
#. This rate will apply to all orders of all weights
msgctxt "description"
msgid "This rate will apply to all orders of all weights"
msgstr ""
#: build/locale/src/shipping/components/ShippingWeightUnitForm/ShippingWeightUnitForm.json
#. [src.shipping.components.ShippingWeightUnitForm.2863708228]
#. defaultMessage is:
#. This unit will be used as default shipping weight
msgctxt "description"
msgid "This unit will be used as default shipping weight"
msgstr ""
#: build/locale/src/shipping/components/ShippingZoneRateDialog/ShippingZoneRateDialog.json
#. [src.shipping.components.ShippingZoneRateDialog.1486599614]
#. defaultMessage is:
#. This will be shown to customers at checkout
msgctxt "description"
msgid "This will be shown to customers at checkout"
msgstr ""
#: build/locale/src/discounts/components/SalePricing/SalePricing.json
#. [src.discounts.components.SalePricing.2503204759] - time during which sale is active
#. defaultMessage is:
@ -5311,6 +5743,14 @@ msgctxt "dialog title"
msgid "Unpublish collections"
msgstr ""
#: build/locale/src/shipping/components/ShippingZoneRateDialog/ShippingZoneRateDialog.json
#. [src.shipping.components.ShippingZoneRateDialog.1542600502] - button
#. defaultMessage is:
#. Update rate
msgctxt "button"
msgid "Update rate"
msgstr ""
#: build/locale/src/orders/components/OrderHistory/OrderHistory.json
#. [src.orders.components.OrderHistory.4265697648] - order history message
#. defaultMessage is:
@ -5447,6 +5887,14 @@ msgctxt "attribute value"
msgid "Value"
msgstr ""
#: build/locale/src/shipping/components/ShippingZoneRates/ShippingZoneRates.json
#. [src.shipping.components.ShippingZoneRates.1923873558] - shipping method price range
#. defaultMessage is:
#. Value Range
msgctxt "shipping method price range"
msgid "Value Range"
msgstr ""
#: build/locale/src/attributes/components/AttributeDetails/AttributeDetails.json
#. [src.attributes.components.AttributeDetails.2592224946] - check to require attribute to have value
#. defaultMessage is:
@ -5463,6 +5911,14 @@ msgctxt "attribute value deleted"
msgid "Value deleted"
msgstr ""
#: build/locale/src/shipping/components/ShippingZoneRateDialog/ShippingZoneRateDialog.json
#. [src.shipping.components.ShippingZoneRateDialog.2533614652] - order price range
#. defaultMessage is:
#. Value range
msgctxt "order price range"
msgid "Value range"
msgstr ""
#: build/locale/src/products/components/ProductAttributes/ProductAttributes.json
#. [src.products.components.ProductAttributes.1207761269] - attribute values
#. defaultMessage is:
@ -5611,6 +6067,30 @@ msgctxt "description"
msgid "Weight"
msgstr ""
#: build/locale/src/shipping/components/ShippingZoneRates/ShippingZoneRates.json
#. [src.shipping.components.ShippingZoneRates.383202459] - weight based shipping methods, section header
#. defaultMessage is:
#. Weight Based Rates
msgctxt "weight based shipping methods, section header"
msgid "Weight Based Rates"
msgstr ""
#: build/locale/src/shipping/components/ShippingZoneRates/ShippingZoneRates.json
#. [src.shipping.components.ShippingZoneRates.2600677138] - shipping method weight range
#. defaultMessage is:
#. Weight Range
msgctxt "shipping method weight range"
msgid "Weight Range"
msgstr ""
#: build/locale/src/shipping/components/ShippingZoneRateDialog/ShippingZoneRateDialog.json
#. [src.shipping.components.ShippingZoneRateDialog.2324036635] - order weight range
#. defaultMessage is:
#. Weight range
msgctxt "order weight range"
msgid "Weight range"
msgstr ""
#: build/locale/src/orders/components/OrderPayment/OrderPayment.json
#. [orderPaymentVATDoesNotApply] - vat not included in order price
#. defaultMessage is:

View file

@ -3,12 +3,13 @@ import Card from "@material-ui/core/Card";
import CardActions from "@material-ui/core/CardActions";
import CardContent from "@material-ui/core/CardContent";
import React from "react";
import { FormattedMessage, useIntl } from "react-intl";
import CardTitle from "@saleor/components/CardTitle";
import Form from "@saleor/components/Form";
import Hr from "@saleor/components/Hr";
import SingleSelectField from "@saleor/components/SingleSelectField";
import i18n from "../../../i18n";
import { buttonMessages, sectionNames } from "@saleor/intl";
import { WeightUnitsEnum } from "../../../types/globalTypes";
export interface FormData {
@ -24,6 +25,7 @@ export interface ShippingWeightUnitFormProps {
const ShippingWeightUnitForm: React.StatelessComponent<
ShippingWeightUnitFormProps
> = ({ defaultWeightUnit, disabled, onSubmit }) => {
const intl = useIntl();
const initialForm: FormData = {
unit: defaultWeightUnit
};
@ -31,11 +33,7 @@ const ShippingWeightUnitForm: React.StatelessComponent<
<Form initial={initialForm} onSubmit={formData => onSubmit(formData.unit)}>
{({ change, data, submit }) => (
<Card>
<CardTitle
title={i18n.t("Configuration", {
context: "header"
})}
/>
<CardTitle title={intl.formatMessage(sectionNames.configuration)} />
<CardContent>
<SingleSelectField
disabled={disabled}
@ -43,15 +41,13 @@ const ShippingWeightUnitForm: React.StatelessComponent<
label: WeightUnitsEnum[unit],
value: WeightUnitsEnum[unit]
}))}
label={i18n.t("Shipping Weight Unit", {
context: "input label"
label={intl.formatMessage({
defaultMessage: "Shipping Weight Unit"
})}
hint={intl.formatMessage({
defaultMessage:
"This unit will be used as default shipping weight"
})}
hint={i18n.t(
"This unit will be used as default shipping weight",
{
context: "input help text"
}
)}
name={"unit" as keyof FormData}
value={data.unit}
onChange={change}
@ -60,9 +56,7 @@ const ShippingWeightUnitForm: React.StatelessComponent<
<Hr />
<CardActions>
<Button color="primary" onClick={submit}>
{i18n.t("Save", {
context: "button"
})}
<FormattedMessage {...buttonMessages.save} />
</Button>
</CardActions>
</Card>

View file

@ -17,6 +17,7 @@ import TextField from "@material-ui/core/TextField";
import Typography from "@material-ui/core/Typography";
import { filter } from "fuzzaldrin";
import React from "react";
import { FormattedMessage, useIntl } from "react-intl";
import Checkbox from "@saleor/components/Checkbox";
import ConfirmButton, {
@ -27,7 +28,7 @@ import FormSpacer from "@saleor/components/FormSpacer";
import Hr from "@saleor/components/Hr";
// tslint:disable no-submodule-imports
import { ShopInfo_shop_countries } from "@saleor/components/Shop/types/ShopInfo";
import i18n from "../../../i18n";
import { buttonMessages } from "@saleor/intl";
interface FormData {
countries: string[];
@ -77,6 +78,8 @@ const ShippingZoneCountriesAssignDialog = withStyles(styles, {
initial,
onConfirm
}: ShippingZoneCountriesAssignDialogProps & WithStyles<typeof styles>) => {
const intl = useIntl();
const initialForm: FormData = {
countries: initial,
query: "",
@ -95,23 +98,26 @@ const ShippingZoneCountriesAssignDialog = withStyles(styles, {
return (
<>
<DialogTitle>{i18n.t("Assign Countries")}</DialogTitle>
<DialogTitle>
<FormattedMessage
defaultMessage="Assign Countries"
description="dialog header"
/>
</DialogTitle>
<DialogContent>
<Typography>
{i18n.t(
"Choose countries you want to add to shipping zone from list below"
)}
<FormattedMessage defaultMessage="Choose countries you want to add to shipping zone from list below" />
</Typography>
<FormSpacer />
<TextField
name="query"
value={data.query}
onChange={event => change(event, () => fetch(data.query))}
label={i18n.t("Search Countries", {
context: "country search input label"
label={intl.formatMessage({
defaultMessage: "Search Countries"
})}
placeholder={i18n.t("Search by country name", {
context: "country search input placeholder"
placeholder={intl.formatMessage({
defaultMessage: "Search by country name"
})}
fullWidth
/>
@ -120,17 +126,15 @@ const ShippingZoneCountriesAssignDialog = withStyles(styles, {
<DialogContent className={classes.container}>
<Typography className={classes.heading} variant="subtitle1">
{i18n.t("Quick Pick")}
<FormattedMessage defaultMessage="Quick Pick" />
</Typography>
<Table className={classes.table}>
<TableBody>
<TableRow>
<TableCell className={classes.wideCell}>
{i18n.t("Rest of the World")}
<FormattedMessage defaultMessage="Rest of the World" />
<Typography variant="caption">
{i18n.t(
"If selected, this will add all of the countries not selected to other shipping zones"
)}
<FormattedMessage defaultMessage="If selected, this will add all of the countries not selected to other shipping zones" />
</Typography>
</TableCell>
<TableCell
@ -156,9 +160,10 @@ const ShippingZoneCountriesAssignDialog = withStyles(styles, {
<DialogContent className={classes.container}>
<Typography className={classes.heading} variant="subtitle1">
{i18n.t("Countries A to Z", {
context: "country selection"
})}
<FormattedMessage
defaultMessage="Countries A to Z"
description="country selection"
/>
</Typography>
<Table className={classes.table}>
<TableBody>
@ -209,7 +214,7 @@ const ShippingZoneCountriesAssignDialog = withStyles(styles, {
</DialogContent>
<DialogActions>
<Button onClick={onClose}>
{i18n.t("Cancel", { context: "button" })}
<FormattedMessage {...buttonMessages.cancel} />
</Button>
<ConfirmButton
transitionState={confirmButtonState}
@ -217,7 +222,10 @@ const ShippingZoneCountriesAssignDialog = withStyles(styles, {
variant="contained"
type="submit"
>
{i18n.t("Assign countries", { context: "button" })}
<FormattedMessage
defaultMessage="Assign countries"
description="button"
/>
</ConfirmButton>
</DialogActions>
</>

View file

@ -1,4 +1,5 @@
import React from "react";
import { useIntl } from "react-intl";
import AppHeader from "@saleor/components/AppHeader";
import CardSpacer from "@saleor/components/CardSpacer";
@ -9,7 +10,7 @@ import Form from "@saleor/components/Form";
import Grid from "@saleor/components/Grid";
import PageHeader from "@saleor/components/PageHeader";
import SaveButtonBar from "@saleor/components/SaveButtonBar";
import i18n from "../../../i18n";
import { sectionNames } from "@saleor/intl";
import { CountryFragment } from "../../../taxes/types/CountryFragment";
import { UserError } from "../../../types";
import ShippingZoneCountriesAssignDialog from "../ShippingZoneCountriesAssignDialog";
@ -33,6 +34,7 @@ export interface ShippingZoneCreatePageProps {
const ShippingZoneCreatePage: React.StatelessComponent<
ShippingZoneCreatePageProps
> = ({ countries, disabled, errors, onBack, onSubmit, saveButtonBarState }) => {
const intl = useIntl();
const [isModalOpened, setModalStatus] = React.useState(false);
const toggleModal = () => setModalStatus(!isModalOpened);
@ -47,8 +49,15 @@ const ShippingZoneCreatePage: React.StatelessComponent<
{({ change, data, errors: formErrors, hasChanged, submit }) => (
<>
<Container>
<AppHeader onBack={onBack}>{i18n.t("Shipping")}</AppHeader>
<PageHeader title={i18n.t("Create New Shipping Zone")} />
<AppHeader onBack={onBack}>
{intl.formatMessage(sectionNames.shipping)}
</AppHeader>
<PageHeader
title={intl.formatMessage({
defaultMessage: "Create New Shipping Zone",
description: "header"
})}
/>
<Grid>
<div>
<ShippingZoneInfo
@ -64,12 +73,14 @@ const ShippingZoneCreatePage: React.StatelessComponent<
disabled={disabled}
emptyText={
data.default
? i18n.t(
? intl.formatMessage({
defaultMessage:
"This is default shipping zone, which means that it covers all of the countries which are not assigned to other shipping zones"
)
: i18n.t(
})
: intl.formatMessage({
defaultMessage:
"Currently, there are no countries assigned to this shipping zone"
)
})
}
onCountryAssign={toggleModal}
onCountryUnassign={countryCode =>
@ -82,7 +93,9 @@ const ShippingZoneCreatePage: React.StatelessComponent<
}
} as any)
}
title={i18n.t("Countries")}
title={intl.formatMessage({
defaultMessage: "Countries"
})}
/>
</div>
</Grid>

View file

@ -1,4 +1,5 @@
import React from "react";
import { FormattedMessage, useIntl } from "react-intl";
import AppHeader from "@saleor/components/AppHeader";
import CardSpacer from "@saleor/components/CardSpacer";
@ -9,7 +10,6 @@ import Form from "@saleor/components/Form";
import Grid from "@saleor/components/Grid";
import PageHeader from "@saleor/components/PageHeader";
import SaveButtonBar from "@saleor/components/SaveButtonBar";
import i18n from "../../../i18n";
import { maybe } from "../../../misc";
import { UserError } from "../../../types";
import { ShippingMethodTypeEnum } from "../../../types/globalTypes";
@ -56,6 +56,8 @@ const ShippingZoneDetailsPage: React.StatelessComponent<
saveButtonBarState,
shippingZone
}) => {
const intl = useIntl();
const initialForm: FormData = {
name: maybe(() => shippingZone.name, "")
};
@ -63,7 +65,9 @@ const ShippingZoneDetailsPage: React.StatelessComponent<
<Form errors={errors} initial={initialForm} onSubmit={onSubmit}>
{({ change, data, errors: formErrors, hasChanged, submit }) => (
<Container>
<AppHeader onBack={onBack}>{i18n.t("Shipping")}</AppHeader>
<AppHeader onBack={onBack}>
<FormattedMessage defaultMessage="Shipping" />
</AppHeader>
<PageHeader title={maybe(() => shippingZone.name)} />
<Grid>
<div>
@ -79,17 +83,21 @@ const ShippingZoneDetailsPage: React.StatelessComponent<
emptyText={maybe(
() =>
shippingZone.default
? i18n.t(
? intl.formatMessage({
defaultMessage:
"This is default shipping zone, which means that it covers all of the countries which are not assigned to other shipping zones"
)
: i18n.t(
})
: intl.formatMessage({
defaultMessage:
"Currently, there are no countries assigned to this shipping zone"
),
}),
"..."
)}
onCountryAssign={onCountryAdd}
onCountryUnassign={onCountryRemove}
title={i18n.t("Countries")}
title={intl.formatMessage({
defaultMessage: "Countries"
})}
/>
<CardSpacer />
<ShippingZoneRates

View file

@ -2,9 +2,10 @@ import Card from "@material-ui/core/Card";
import CardContent from "@material-ui/core/CardContent";
import TextField from "@material-ui/core/TextField";
import React from "react";
import { useIntl } from "react-intl";
import CardTitle from "@saleor/components/CardTitle";
import i18n from "../../../i18n";
import { commonMessages } from "@saleor/intl";
import { FormErrors } from "../../../types";
import { FormData } from "../ShippingZoneDetailsPage";
@ -18,21 +19,29 @@ const ShippingZoneInfo: React.StatelessComponent<ShippingZoneInfoProps> = ({
data,
errors,
onChange
}) => (
}) => {
const intl = useIntl();
return (
<Card>
<CardTitle title={i18n.t("General Information")} />
<CardTitle
title={intl.formatMessage(commonMessages.generalInformations)}
/>
<CardContent>
<TextField
error={!!errors.name}
fullWidth
helperText={errors.name}
label={i18n.t("Shipping Zone Name")}
label={intl.formatMessage({
defaultMessage: "Shipping Zone Name"
})}
name={"name" as keyof FormData}
value={data.name}
onChange={onChange}
/>
</CardContent>
</Card>
);
);
};
ShippingZoneInfo.displayName = "ShippingZoneInfo";
export default ShippingZoneInfo;

View file

@ -12,6 +12,7 @@ import {
import TextField from "@material-ui/core/TextField";
import Typography from "@material-ui/core/Typography";
import React from "react";
import { FormattedMessage, useIntl } from "react-intl";
import ConfirmButton, {
ConfirmButtonTransitionState
@ -21,7 +22,7 @@ import Form from "@saleor/components/Form";
import FormSpacer from "@saleor/components/FormSpacer";
import Hr from "@saleor/components/Hr";
import Skeleton from "@saleor/components/Skeleton";
import i18n from "../../../i18n";
import { buttonMessages } from "@saleor/intl";
import { maybe } from "../../../misc";
import { FormErrors, UserError } from "../../../types";
import { ShippingMethodTypeEnum } from "../../../types/globalTypes";
@ -77,6 +78,8 @@ const ShippingZoneRateDialog = withStyles(styles, {
rate,
variant
}: ShippingZoneRateDialogProps & WithStyles<typeof styles>) => {
const intl = useIntl();
const initialForm: FormData =
action === "create"
? {
@ -122,11 +125,25 @@ const ShippingZoneRateDialog = withStyles(styles, {
<DialogTitle>
{variant === ShippingMethodTypeEnum.PRICE
? action === "create"
? i18n.t("Add Price Rate")
: i18n.t("Edit Price Rate")
? intl.formatMessage({
defaultMessage: "Add Price Rate",
description: "dialog header"
})
: intl.formatMessage({
defaultMessage: "Edit Price Rate",
description: "dialog header"
})
: action === "create"
? i18n.t("Add Weight Rate")
: i18n.t("Edit Weight Rate")}
? intl.formatMessage({
defaultMessage: "Add Weight Rate",
description:
"add weight based shipping method, dialog header"
})
: intl.formatMessage({
defaultMessage: "Edit Weight Rate",
description:
"edit weight based shipping method, dialog header"
})}
</DialogTitle>
<DialogContent>
<TextField
@ -135,9 +152,15 @@ const ShippingZoneRateDialog = withStyles(styles, {
fullWidth
helperText={
typedFormErrors.name ||
i18n.t("This will be shown to customers at checkout")
intl.formatMessage({
defaultMessage:
"This will be shown to customers at checkout"
})
}
label={i18n.t("Rate Name")}
label={intl.formatMessage({
defaultMessage: "Rate Name",
description: "shipping method name"
})}
name={"name" as keyof FormData}
value={data.name}
onChange={change}
@ -152,8 +175,14 @@ const ShippingZoneRateDialog = withStyles(styles, {
variant="subtitle1"
>
{variant === ShippingMethodTypeEnum.PRICE
? i18n.t("Value range")
: i18n.t("Weight range")}
? intl.formatMessage({
defaultMessage: "Value range",
description: "order price range"
})
: intl.formatMessage({
defaultMessage: "Weight range",
description: "order weight range"
})}
</Typography>
<ControlledSwitch
checked={data.noLimits}
@ -161,15 +190,20 @@ const ShippingZoneRateDialog = withStyles(styles, {
onChange={change}
label={
<>
{i18n.t("There are no value limits")}
<FormattedMessage
defaultMessage="There are no value limits"
description="shipping method has no value limits"
/>
<Typography variant="caption">
{variant === ShippingMethodTypeEnum.PRICE
? i18n.t(
? intl.formatMessage({
defaultMessage:
"This rate will apply to all orders of all prices"
)
: i18n.t(
})
: intl.formatMessage({
defaultMessage:
"This rate will apply to all orders of all weights"
)}
})}
</Typography>
</>
}
@ -194,9 +228,13 @@ const ShippingZoneRateDialog = withStyles(styles, {
label={
variant === ShippingMethodTypeEnum.PRICE
? typedFormErrors.minimumOrderPrice ||
i18n.t("Minimal Order Value")
intl.formatMessage({
defaultMessage: "Minimal Order Value"
})
: typedFormErrors.minimumOrderWeight ||
i18n.t("Minimal Order Weight")
intl.formatMessage({
defaultMessage: "Minimal Order Weight"
})
}
name={"minValue" as keyof FormData}
type="number"
@ -219,9 +257,13 @@ const ShippingZoneRateDialog = withStyles(styles, {
label={
variant === ShippingMethodTypeEnum.PRICE
? typedFormErrors.maximumOrderPrice ||
i18n.t("Maximal Order Value")
intl.formatMessage({
defaultMessage: "Maximal Order Value"
})
: typedFormErrors.maximumOrderWeight ||
i18n.t("Maximal Order Weight")
intl.formatMessage({
defaultMessage: "Maximal Order Weight"
})
}
name={"maxValue" as keyof FormData}
type="number"
@ -242,12 +284,18 @@ const ShippingZoneRateDialog = withStyles(styles, {
className={classes.subheading}
variant="subtitle1"
>
{i18n.t("Rate")}
<FormattedMessage
defaultMessage="Rate"
description="shipping method"
/>
</Typography>
<ControlledSwitch
checked={data.isFree}
disabled={disabled}
label={i18n.t("This is free shipping")}
label={intl.formatMessage({
defaultMessage: "This is free shipping",
description: "shipping method, switch button"
})}
name={"isFree" as keyof FormData}
onChange={change}
/>
@ -260,7 +308,10 @@ const ShippingZoneRateDialog = withStyles(styles, {
error={!!typedFormErrors.price}
fullWidth
helperText={typedFormErrors.price}
label={i18n.t("Rate Price")}
label={intl.formatMessage({
defaultMessage: "Rate Price",
description: "shipping method price"
})}
name={"price" as keyof FormData}
type="number"
value={data.price}
@ -275,7 +326,7 @@ const ShippingZoneRateDialog = withStyles(styles, {
</DialogContent>
<DialogActions>
<Button onClick={onClose}>
{i18n.t("Cancel", { context: "button" })}
<FormattedMessage {...buttonMessages.cancel} />
</Button>
<ConfirmButton
disabled={disabled || !hasChanged}
@ -285,8 +336,14 @@ const ShippingZoneRateDialog = withStyles(styles, {
type="submit"
>
{action === "create"
? i18n.t("Create rate", { context: "button" })
: i18n.t("Update rate", { context: "button" })}
? intl.formatMessage({
defaultMessage: "Create rate",
description: "button"
})
: intl.formatMessage({
defaultMessage: "Update rate",
description: "button"
})}
</ConfirmButton>
</DialogActions>
</>

View file

@ -14,6 +14,7 @@ import TableRow from "@material-ui/core/TableRow";
import DeleteIcon from "@material-ui/icons/Delete";
import EditIcon from "@material-ui/icons/Edit";
import React from "react";
import { FormattedMessage, useIntl } from "react-intl";
import CardTitle from "@saleor/components/CardTitle";
import IconButtonTableCell from "@saleor/components/IconButtonTableCell";
@ -21,7 +22,6 @@ import Money from "@saleor/components/Money";
import MoneyRange from "@saleor/components/MoneyRange";
import Skeleton from "@saleor/components/Skeleton";
import WeightRange from "@saleor/components/WeightRange";
import i18n from "../../../i18n";
import { maybe, renderCollection } from "../../../misc";
import { ICONBUTTON_SIZE } from "../../../theme";
import { ShippingZoneDetailsFragment_shippingMethods } from "../../types/ShippingZoneDetailsFragment";
@ -60,20 +60,30 @@ const ShippingZoneRates = withStyles(styles, { name: "ShippingZoneRates" })(
onRateRemove,
rates,
variant
}: ShippingZoneRatesProps & WithStyles<typeof styles>) => (
}: ShippingZoneRatesProps & WithStyles<typeof styles>) => {
const intl = useIntl();
return (
<Card>
<CardTitle
height="const"
title={
variant === "price"
? i18n.t("Price Based Rates")
: i18n.t("Weight Based Rates")
? intl.formatMessage({
defaultMessage: "Price Based Rates",
description: "price based shipping methods, section header"
})
: intl.formatMessage({
defaultMessage: "Weight Based Rates",
description: "weight based shipping methods, section header"
})
}
toolbar={
<Button color="primary" onClick={onRateAdd}>
{i18n.t("Add rate", {
context: "button"
})}
<FormattedMessage
defaultMessage="Add rate"
description="button"
/>
</Button>
}
/>
@ -81,15 +91,27 @@ const ShippingZoneRates = withStyles(styles, { name: "ShippingZoneRates" })(
<TableHead>
<TableRow>
<TableCell className={classes.nameColumn}>
{i18n.t("Name", { context: "object" })}
<FormattedMessage
defaultMessage="Name"
description="shipping method name"
/>
</TableCell>
<TableCell className={classes.valueColumn}>
{variant === "price"
? i18n.t("Value Range", { context: "object" })
: i18n.t("Weight Range", { context: "object" })}
? intl.formatMessage({
defaultMessage: "Value Range",
description: "shipping method price range"
})
: intl.formatMessage({
defaultMessage: "Weight Range",
description: "shipping method weight range"
})}
</TableCell>
<TableCell className={classes.nameColumn}>
{i18n.t("Price", { context: "object" })}
<FormattedMessage
defaultMessage="Price"
description="shipping method price"
/>
</TableCell>
<TableCell />
<TableCell />
@ -149,7 +171,7 @@ const ShippingZoneRates = withStyles(styles, { name: "ShippingZoneRates" })(
() => (
<TableRow>
<TableCell colSpan={5}>
{i18n.t("No shipping rates found")}
<FormattedMessage defaultMessage="No shipping rates found" />
</TableCell>
</TableRow>
)
@ -157,7 +179,8 @@ const ShippingZoneRates = withStyles(styles, { name: "ShippingZoneRates" })(
</TableBody>
</Table>
</Card>
)
);
}
);
ShippingZoneRates.displayName = "ShippingZoneRates";
export default ShippingZoneRates;

View file

@ -14,13 +14,13 @@ import TableFooter from "@material-ui/core/TableFooter";
import TableRow from "@material-ui/core/TableRow";
import DeleteIcon from "@material-ui/icons/Delete";
import React from "react";
import { FormattedMessage, useIntl } from "react-intl";
import CardTitle from "@saleor/components/CardTitle";
import Checkbox from "@saleor/components/Checkbox";
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 } from "@saleor/misc";
import { ICONBUTTON_SIZE } from "@saleor/theme";
import { ListActions, ListProps } from "@saleor/types";
@ -71,16 +71,23 @@ const ShippingZonesList = withStyles(styles, { name: "ShippingZonesList" })(
toggle,
toggleAll,
toolbar
}: ShippingZonesListProps & WithStyles<typeof styles>) => (
}: ShippingZonesListProps & WithStyles<typeof styles>) => {
const intl = useIntl();
return (
<Card>
<CardTitle
height="const"
title={i18n.t("Shipping by zone")}
title={intl.formatMessage({
defaultMessage: "Shipping by zone",
description: "sort shipping methods by zone, section header"
})}
toolbar={
<Button color="primary" onClick={onAdd}>
{i18n.t("Add shipping zone", {
context: "button"
})}
<FormattedMessage
defaultMessage="Add shipping zone"
description="button"
/>
</Button>
}
/>
@ -94,10 +101,13 @@ const ShippingZonesList = withStyles(styles, { name: "ShippingZonesList" })(
toolbar={toolbar}
>
<TableCell className={classes.colName}>
{i18n.t("Name", { context: "object" })}
<FormattedMessage
defaultMessage="Name"
description="shipping zone"
/>
</TableCell>
<TableCell className={classes.colCountries}>
{i18n.t("Countries", { context: "object" })}
<FormattedMessage defaultMessage="Countries" />
</TableCell>
<TableCell />
</TableHead>
@ -106,7 +116,9 @@ const ShippingZonesList = withStyles(styles, { name: "ShippingZonesList" })(
<TablePagination
colSpan={4}
settings={settings}
hasNextPage={pageInfo && !disabled ? pageInfo.hasNextPage : false}
hasNextPage={
pageInfo && !disabled ? pageInfo.hasNextPage : false
}
onNextPage={onNextPage}
onUpdateListSettings={onUpdateListSettings}
hasPreviousPage={
@ -170,7 +182,7 @@ const ShippingZonesList = withStyles(styles, { name: "ShippingZonesList" })(
() => (
<TableRow>
<TableCell colSpan={numberOfColumns}>
{i18n.t("No shipping zones found")}
<FormattedMessage defaultMessage="No shipping zones found" />
</TableCell>
</TableRow>
)
@ -178,7 +190,8 @@ const ShippingZonesList = withStyles(styles, { name: "ShippingZonesList" })(
</TableBody>
</Table>
</Card>
)
);
}
);
ShippingZonesList.displayName = "ShippingZonesList";
export default ShippingZonesList;

View file

@ -1,10 +1,11 @@
import React from "react";
import { useIntl } from "react-intl";
import AppHeader from "@saleor/components/AppHeader";
import Container from "@saleor/components/Container";
import Grid from "@saleor/components/Grid";
import PageHeader from "@saleor/components/PageHeader";
import i18n from "@saleor/i18n";
import { sectionNames } from "@saleor/intl";
import { ListActions, PageListProps } from "@saleor/types";
import { WeightUnitsEnum } from "@saleor/types/globalTypes";
import { ShippingZoneFragment } from "../../types/ShippingZoneFragment";
@ -21,12 +22,18 @@ export interface ShippingZonesListPageProps extends PageListProps, ListActions {
const ShippingZonesListPage: React.StatelessComponent<
ShippingZonesListPageProps
> = ({ defaultWeightUnit, disabled, onBack, onSubmit, ...listProps }) => (
> = ({ defaultWeightUnit, disabled, onBack, onSubmit, ...listProps }) => {
const intl = useIntl();
return (
<Container>
<AppHeader onBack={onBack}>{i18n.t("Configuration")}</AppHeader>
<AppHeader onBack={onBack}>
{intl.formatMessage(sectionNames.configuration)}
</AppHeader>
<PageHeader
title={i18n.t("Shipping", {
context: "page header"
title={intl.formatMessage({
defaultMessage: "Shipping",
description: "header"
})}
/>
<Grid>
@ -42,6 +49,7 @@ const ShippingZonesListPage: React.StatelessComponent<
</div>
</Grid>
</Container>
);
);
};
ShippingZonesListPage.displayName = "ShippingZonesListPage";
export default ShippingZonesListPage;

View file

@ -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 {
shippingZoneAddPath,
shippingZonePath,
@ -39,14 +40,26 @@ const ShippingZoneDetails: React.StatelessComponent<
);
};
export const ShippingRouter: React.StatelessComponent = () => (
export const ShippingRouter: React.FC = () => {
const intl = useIntl();
return (
<>
<WindowTitle title={i18n.t("Shipping")} />
<WindowTitle title={intl.formatMessage(sectionNames.shipping)} />
<Switch>
<Route exact path={shippingZonesListPath} component={ShippingZonesList} />
<Route exact path={shippingZoneAddPath} component={ShippingZoneCreate} />
<Route
exact
path={shippingZonesListPath}
component={ShippingZonesList}
/>
<Route
exact
path={shippingZoneAddPath}
component={ShippingZoneCreate}
/>
<Route path={shippingZonePath(":id")} component={ShippingZoneDetails} />
</Switch>
</>
);
);
};
export default ShippingRouter;

View file

@ -1,9 +1,10 @@
import React from "react";
import { useIntl } from "react-intl";
import useNavigator from "@saleor/hooks/useNavigator";
import useNotifier from "@saleor/hooks/useNotifier";
import useShop from "@saleor/hooks/useShop";
import i18n from "../../i18n";
import { commonMessages } from "@saleor/intl";
import { getMutationState, maybe } from "../../misc";
import ShippingZoneCreatePage from "../components/ShippingZoneCreatePage";
import { TypedCreateShippingZone } from "../mutations";
@ -14,13 +15,12 @@ const ShippingZoneCreate: React.StatelessComponent<{}> = () => {
const navigate = useNavigator();
const pushMessage = useNotifier();
const shop = useShop();
const intl = useIntl();
const onShippingZoneCreate = (data: CreateShippingZone) => {
if (data.shippingZoneCreate.errors.length === 0) {
pushMessage({
text: i18n.t("Successfully created new shipping zone", {
context: "notification"
})
text: intl.formatMessage(commonMessages.savedChanges)
});
navigate(shippingZoneUrl(data.shippingZoneCreate.shippingZone.id));
}

View file

@ -1,11 +1,11 @@
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 useNavigator from "@saleor/hooks/useNavigator";
import useShop from "@saleor/hooks/useShop";
import i18n from "../../../i18n";
import { maybe } from "../../../misc";
import { ShippingMethodTypeEnum } from "../../../types/globalTypes";
import ShippingZoneCountriesAssignDialog from "../../components/ShippingZoneCountriesAssignDialog";
@ -43,6 +43,7 @@ const ShippingZoneDetailsDialogs: React.StatelessComponent<
}) => {
const navigate = useNavigator();
const shop = useShop();
const intl = useIntl();
const closeModal = () => navigate(shippingZoneUrl(id), true);
@ -92,20 +93,22 @@ const ShippingZoneDetailsDialogs: React.StatelessComponent<
})
}
open={params.action === "remove-rate"}
title={i18n.t("Delete Shipping Method")}
title={intl.formatMessage({
defaultMessage: "Delete Shipping Method",
description: "dialog header"
})}
variant="delete"
>
<DialogContentText
dangerouslySetInnerHTML={{
__html: i18n.t(
"Are you sure you want to delete <strong>{{ name }}</strong>?",
{
context: "remove shipping method",
<DialogContentText>
<FormattedMessage
defaultMessage="Are you sure you want to delete {name}?"
description="delete shipping method"
id="shippingZoneDetailsDialogsDeleteShippingMethod"
values={{
name: maybe(() => rate.name, "...")
}
)
}}
/>
</DialogContentText>
</ActionDialog>
<ShippingZoneRateDialog
action="create"
@ -165,20 +168,22 @@ const ShippingZoneDetailsDialogs: React.StatelessComponent<
})
}
open={params.action === "remove"}
title={i18n.t("Delete Shipping Zone")}
title={intl.formatMessage({
defaultMessage: "Delete Shipping Zone",
description: "dialog header"
})}
variant="delete"
>
<DialogContentText
dangerouslySetInnerHTML={{
__html: i18n.t(
"Are you sure you want to delete <strong>{{ name }}</strong>?",
{
context: "remove shipping zone",
name: maybe(() => shippingZone.name)
}
)
<DialogContentText>
<FormattedMessage
defaultMessage="Are you sure you want to delete {name}?"
description="delete shipping zone"
id="shippingZoneDetailsDialogsDeleteShippingZone"
values={{
name: <strong>{maybe(() => shippingZone.name, "...")}</strong>
}}
/>
</DialogContentText>
</ActionDialog>
<ShippingZoneCountriesAssignDialog
confirmButtonState={assignCountryTransitionState}
@ -214,25 +219,31 @@ const ShippingZoneDetailsDialogs: React.StatelessComponent<
})
}
open={params.action === "unassign-country"}
title={i18n.t("Remove from shipping zone")}
title={intl.formatMessage({
defaultMessage: "Remove from shipping zone",
description: "unassign country, dialog header"
})}
variant="delete"
>
<DialogContentText
dangerouslySetInnerHTML={{
__html: i18n.t(
"Are you sure you want to remove <strong>{{ name }}</strong> from this shipping zone?",
{
context: "unassign country",
name: maybe(
<DialogContentText>
<FormattedMessage
defaultMessage="Are you sure you want to remove {countryName} from this shipping zone?"
description="unassign country"
values={{
countryName: (
<strong>
{maybe(
() =>
shippingZone.countries.find(
country => country.code === params.id
).country
)
}
).country,
"..."
)}
</strong>
)
}}
/>
</DialogContentText>
</ActionDialog>
</>
);

View file

@ -1,8 +1,9 @@
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 { commonMessages } from "@saleor/intl";
import { getMutationState, maybe } from "../../../misc";
import { ShippingMethodTypeEnum } from "../../../types/globalTypes";
import ShippingZoneDetailsPage from "../../components/ShippingZoneDetailsPage";
@ -30,15 +31,14 @@ const ShippingZoneDetails: React.StatelessComponent<
> = ({ id, params }) => {
const navigate = useNavigator();
const notify = useNotifier();
const intl = useIntl();
const closeModal = () => navigate(shippingZoneUrl(id));
const onShippingRateCreate = (data: CreateShippingRate) => {
if (data.shippingPriceCreate.errors.length === 0) {
notify({
text: i18n.t("Successfully created rate", {
context: "shipping method"
})
text: intl.formatMessage(commonMessages.savedChanges)
});
closeModal();
}
@ -47,9 +47,7 @@ const ShippingZoneDetails: React.StatelessComponent<
const onShippingRateUpdate = (data: UpdateShippingRate) => {
if (data.shippingPriceUpdate.errors.length === 0) {
notify({
text: i18n.t("Successfully updated rate", {
context: "shipping method"
})
text: intl.formatMessage(commonMessages.savedChanges)
});
closeModal();
}
@ -58,9 +56,7 @@ const ShippingZoneDetails: React.StatelessComponent<
const onShippingRateDelete = (data: DeleteShippingRate) => {
if (data.shippingPriceDelete.errors.length === 0) {
notify({
text: i18n.t("Successfully deleted rate", {
context: "shipping method"
})
text: intl.formatMessage(commonMessages.savedChanges)
});
closeModal();
}
@ -69,7 +65,7 @@ const ShippingZoneDetails: React.StatelessComponent<
const onShippingZoneDelete = (data: DeleteShippingZone) => {
if (data.shippingZoneDelete.errors.length === 0) {
notify({
text: i18n.t("Successfully deleted shipping zone")
text: intl.formatMessage(commonMessages.savedChanges)
});
navigate(shippingZonesListUrl(), true);
}
@ -78,7 +74,7 @@ const ShippingZoneDetails: React.StatelessComponent<
const onShippingZoneUpdate = (data: UpdateShippingZone) => {
if (data.shippingZoneUpdate.errors.length === 0) {
notify({
text: i18n.t("Successfully updated shipping zone")
text: intl.formatMessage(commonMessages.savedChanges)
});
closeModal();
}

View file

@ -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 { configurationMenuUrl } from "@saleor/configuration";
@ -13,7 +14,7 @@ import usePaginator, {
createPaginationState
} from "@saleor/hooks/usePaginator";
import useShop from "@saleor/hooks/useShop";
import i18n from "@saleor/i18n";
import { commonMessages } from "@saleor/intl";
import { getMutationState, maybe } from "@saleor/misc";
import { ListViews } from "@saleor/types";
import ShippingZonesListPage from "../components/ShippingZonesListPage";
@ -50,6 +51,7 @@ export const ShippingZonesList: React.StatelessComponent<
const { updateListSettings, settings } = useListSettings(
ListViews.SHIPPING_METHODS_LIST
);
const intl = useIntl();
const paginationState = createPaginationState(settings.rowNumber, params);
@ -61,9 +63,7 @@ export const ShippingZonesList: React.StatelessComponent<
) => {
if (data.shopSettingsUpdate.errors.length === 0) {
notify({
text: i18n.t("Updated default weight unit", {
context: "notification"
})
text: intl.formatMessage(commonMessages.savedChanges)
});
}
};
@ -81,9 +81,7 @@ export const ShippingZonesList: React.StatelessComponent<
const handleShippingZoneDelete = (data: DeleteShippingZone) => {
if (data.shippingZoneDelete.errors.length === 0) {
notify({
text: i18n.t("Updated default weight unit", {
context: "notification"
})
text: intl.formatMessage(commonMessages.savedChanges)
});
closeModal();
refetch();
@ -93,9 +91,7 @@ export const ShippingZonesList: React.StatelessComponent<
const handleBulkDeleteShippingZone = (data: BulkDeleteShippingZone) => {
if (data.shippingZoneBulkDelete.errors.length === 0) {
notify({
text: i18n.t("Removed shipping zones", {
context: "notification"
})
text: intl.formatMessage(commonMessages.savedChanges)
});
closeModal();
reset();
@ -205,8 +201,9 @@ export const ShippingZonesList: React.StatelessComponent<
open={params.action === "remove"}
confirmButtonState={deleteTransitionState}
variant="delete"
title={i18n.t("Delete Shipping Zone", {
context: "modal title"
title={intl.formatMessage({
defaultMessage: "Delete Shipping Zone",
description: "dialog header"
})}
onClose={closeModal}
onConfirm={() =>
@ -215,30 +212,32 @@ export const ShippingZonesList: React.StatelessComponent<
})
}
>
<DialogContentText
dangerouslySetInnerHTML={{
__html: i18n.t(
"Are you sure you want to remove <strong>{{ name }}</strong> shipping zone?",
{
context: "shipping zone removal",
name: maybe(
<DialogContentText>
<FormattedMessage
defaultMessage="Are you sure you want to delete {shippingZoneName} shipping zone?"
values={{
shippingZoneName: (
<strong>
{maybe(
() =>
data.shippingZones.edges.find(
edge => edge.node.id === params.id
).node.name,
"..."
)
}
)}
</strong>
)
}}
/>
</DialogContentText>
</ActionDialog>
<ActionDialog
open={params.action === "remove-many"}
confirmButtonState={bulkDeleteTransitionState}
variant="delete"
title={i18n.t("Delete Shipping Zones", {
context: "modal title"
title={intl.formatMessage({
defaultMessage: "Delete Shipping Zones",
description: "dialog header"
})}
onClose={closeModal}
onConfirm={() =>
@ -247,19 +246,23 @@ export const ShippingZonesList: React.StatelessComponent<
})
}
>
<DialogContentText
dangerouslySetInnerHTML={{
__html: i18n.t(
"Are you sure you want to remove <strong>{{ number }}</strong> shipping zones?",
{
number: maybe(
() => params.ids.length.toString(),
"..."
)
}
<DialogContentText>
<FormattedMessage
defaultMessage="Are you sure you want to delete {counter, plural,
one {this shipping zone}
other {{displayQuantity} shipping zones}
}?"
description="dialog content"
values={{
counter: maybe(() => params.ids.length),
displayQuantity: (
<strong>
{maybe(() => params.ids.length)}
</strong>
)
}}
/>
</DialogContentText>
</ActionDialog>
</>
);