diff --git a/locale/messages.pot b/locale/messages.pot index cc19ffe4b..abdeb32f6 100644 --- a/locale/messages.pot +++ b/locale/messages.pot @@ -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, you’ll 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: diff --git a/src/shipping/components/ShippingWeightUnitForm/ShippingWeightUnitForm.tsx b/src/shipping/components/ShippingWeightUnitForm/ShippingWeightUnitForm.tsx index ef3f1065e..86a7b50b9 100644 --- a/src/shipping/components/ShippingWeightUnitForm/ShippingWeightUnitForm.tsx +++ b/src/shipping/components/ShippingWeightUnitForm/ShippingWeightUnitForm.tsx @@ -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<
onSubmit(formData.unit)}> {({ change, data, submit }) => ( - + diff --git a/src/shipping/components/ShippingZoneCountriesAssignDialog/ShippingZoneCountriesAssignDialog.tsx b/src/shipping/components/ShippingZoneCountriesAssignDialog/ShippingZoneCountriesAssignDialog.tsx index 9f59522bd..0cc4bc372 100644 --- a/src/shipping/components/ShippingZoneCountriesAssignDialog/ShippingZoneCountriesAssignDialog.tsx +++ b/src/shipping/components/ShippingZoneCountriesAssignDialog/ShippingZoneCountriesAssignDialog.tsx @@ -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) => { + const intl = useIntl(); + const initialForm: FormData = { countries: initial, query: "", @@ -95,23 +98,26 @@ const ShippingZoneCountriesAssignDialog = withStyles(styles, { return ( <> - {i18n.t("Assign Countries")} + + + - {i18n.t( - "Choose countries you want to add to shipping zone from list below" - )} + 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, { - {i18n.t("Quick Pick")} + - {i18n.t("Rest of the World")} + - {i18n.t( - "If selected, this will add all of the countries not selected to other shipping zones" - )} + - {i18n.t("Countries A to Z", { - context: "country selection" - })} +
@@ -209,7 +214,7 @@ const ShippingZoneCountriesAssignDialog = withStyles(styles, { - {i18n.t("Assign countries", { context: "button" })} + diff --git a/src/shipping/components/ShippingZoneCreatePage/ShippingZoneCreatePage.tsx b/src/shipping/components/ShippingZoneCreatePage/ShippingZoneCreatePage.tsx index 63f27bf09..531e6c863 100644 --- a/src/shipping/components/ShippingZoneCreatePage/ShippingZoneCreatePage.tsx +++ b/src/shipping/components/ShippingZoneCreatePage/ShippingZoneCreatePage.tsx @@ -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 }) => ( <> - {i18n.t("Shipping")} - + + {intl.formatMessage(sectionNames.shipping)} + +
@@ -82,7 +93,9 @@ const ShippingZoneCreatePage: React.StatelessComponent< } } as any) } - title={i18n.t("Countries")} + title={intl.formatMessage({ + defaultMessage: "Countries" + })} />
diff --git a/src/shipping/components/ShippingZoneDetailsPage/ShippingZoneDetailsPage.tsx b/src/shipping/components/ShippingZoneDetailsPage/ShippingZoneDetailsPage.tsx index a6d573f68..a4324affb 100644 --- a/src/shipping/components/ShippingZoneDetailsPage/ShippingZoneDetailsPage.tsx +++ b/src/shipping/components/ShippingZoneDetailsPage/ShippingZoneDetailsPage.tsx @@ -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< {({ change, data, errors: formErrors, hasChanged, submit }) => ( - {i18n.t("Shipping")} + + + shippingZone.name)} />
@@ -79,17 +83,21 @@ const ShippingZoneDetailsPage: React.StatelessComponent< emptyText={maybe( () => shippingZone.default - ? i18n.t( - "This is default shipping zone, which means that it covers all of the countries which are not assigned to other shipping zones" - ) - : i18n.t( - "Currently, there are no countries assigned to this shipping zone" - ), + ? 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" + }) + : 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" + })} /> = ({ data, errors, onChange -}) => ( - - - - { + const intl = useIntl(); + + return ( + + - - -); + + + + + ); +}; ShippingZoneInfo.displayName = "ShippingZoneInfo"; export default ShippingZoneInfo; diff --git a/src/shipping/components/ShippingZoneRateDialog/ShippingZoneRateDialog.tsx b/src/shipping/components/ShippingZoneRateDialog/ShippingZoneRateDialog.tsx index e08f6e5dd..baf025bce 100644 --- a/src/shipping/components/ShippingZoneRateDialog/ShippingZoneRateDialog.tsx +++ b/src/shipping/components/ShippingZoneRateDialog/ShippingZoneRateDialog.tsx @@ -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) => { + const intl = useIntl(); + const initialForm: FormData = action === "create" ? { @@ -122,11 +125,25 @@ const ShippingZoneRateDialog = withStyles(styles, { {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" + })} {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" + })} - {i18n.t("There are no value limits")} + {variant === ShippingMethodTypeEnum.PRICE - ? i18n.t( - "This rate will apply to all orders of all prices" - ) - : i18n.t( - "This rate will apply to all orders of all weights" - )} + ? intl.formatMessage({ + defaultMessage: + "This rate will apply to all orders of all prices" + }) + : intl.formatMessage({ + defaultMessage: + "This rate will apply to all orders of all weights" + })} } @@ -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")} + @@ -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, { {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" + })} diff --git a/src/shipping/components/ShippingZoneRates/ShippingZoneRates.tsx b/src/shipping/components/ShippingZoneRates/ShippingZoneRates.tsx index 2d3c41e7e..d99abc180 100644 --- a/src/shipping/components/ShippingZoneRates/ShippingZoneRates.tsx +++ b/src/shipping/components/ShippingZoneRates/ShippingZoneRates.tsx @@ -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,104 +60,127 @@ const ShippingZoneRates = withStyles(styles, { name: "ShippingZoneRates" })( onRateRemove, rates, variant - }: ShippingZoneRatesProps & WithStyles) => ( - - - {i18n.t("Add rate", { - context: "button" - })} - - } - /> -
- - - - {i18n.t("Name", { context: "object" })} - - - {variant === "price" - ? i18n.t("Value Range", { context: "object" }) - : i18n.t("Weight Range", { context: "object" })} - - - {i18n.t("Price", { context: "object" })} - - - - - - - {renderCollection( - rates, - rate => ( - onRateEdit(rate.id) : undefined} - > - - {maybe(() => rate.name, )} - - - {maybe( - () => - variant === "price" ? ( - - ) : ( - + }: ShippingZoneRatesProps & WithStyles) => { + const intl = useIntl(); + + return ( + + + + + } + /> +
+ + + + + + + {variant === "price" + ? intl.formatMessage({ + defaultMessage: "Value Range", + description: "shipping method price range" + }) + : intl.formatMessage({ + defaultMessage: "Weight Range", + description: "shipping method weight range" + })} + + + + + + + + + + {renderCollection( + rates, + rate => ( + onRateEdit(rate.id) : undefined} + > + + {maybe(() => rate.name, )} + + + {maybe( + () => + variant === "price" ? ( + + ) : ( + + ), + + )} + + + {maybe( + () => ( + ), - - )} - - - {maybe( - () => ( - - ), - - )} - - onRateEdit(rate.id)} - > - - - onRateRemove(rate.id)} - > - - - - ), - () => ( - - - {i18n.t("No shipping rates found")} - - - ) - )} - -
- - ) + + )} + + onRateEdit(rate.id)} + > + + + onRateRemove(rate.id)} + > + + + + ), + () => ( + + + + + + ) + )} + + + + ); + } ); ShippingZoneRates.displayName = "ShippingZoneRates"; export default ShippingZoneRates; diff --git a/src/shipping/components/ShippingZonesList/ShippingZonesList.tsx b/src/shipping/components/ShippingZonesList/ShippingZonesList.tsx index f38a21ab6..779383bda 100644 --- a/src/shipping/components/ShippingZonesList/ShippingZonesList.tsx +++ b/src/shipping/components/ShippingZonesList/ShippingZonesList.tsx @@ -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,114 +71,127 @@ const ShippingZonesList = withStyles(styles, { name: "ShippingZonesList" })( toggle, toggleAll, toolbar - }: ShippingZonesListProps & WithStyles) => ( - - - {i18n.t("Add shipping zone", { - context: "button" - })} - - } - /> - - - - {i18n.t("Name", { context: "object" })} - - - {i18n.t("Countries", { context: "object" })} - - - - - - - - - - {renderCollection( - shippingZones, - shippingZone => { - const isSelected = shippingZone - ? isChecked(shippingZone.id) - : false; + }: ShippingZonesListProps & WithStyles) => { + const intl = useIntl(); - return ( - - - toggle(shippingZone.id)} - /> - - - {maybe( - () => shippingZone.name, - - )} - - - {maybe( - () => shippingZone.countries.length, - - )} - - - { - event.stopPropagation(); - onRemove(shippingZone.id); - }} - > - - + return ( + + + + + } + /> +
+ + + + + + + + + + + + + + + + {renderCollection( + shippingZones, + shippingZone => { + const isSelected = shippingZone + ? isChecked(shippingZone.id) + : false; + + return ( + + + toggle(shippingZone.id)} + /> + + + {maybe( + () => shippingZone.name, + + )} + + + {maybe( + () => shippingZone.countries.length, + + )} + + + { + event.stopPropagation(); + onRemove(shippingZone.id); + }} + > + + + + + ); + }, + () => ( + + + - ); - }, - () => ( - - - {i18n.t("No shipping zones found")} - - - ) - )} - -
-
- ) + ) + )} + + + + ); + } ); ShippingZonesList.displayName = "ShippingZonesList"; export default ShippingZonesList; diff --git a/src/shipping/components/ShippingZonesListPage/ShippingZonesListPage.tsx b/src/shipping/components/ShippingZonesListPage/ShippingZonesListPage.tsx index b9aa74b37..49dc9c600 100644 --- a/src/shipping/components/ShippingZonesListPage/ShippingZonesListPage.tsx +++ b/src/shipping/components/ShippingZonesListPage/ShippingZonesListPage.tsx @@ -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,27 +22,34 @@ export interface ShippingZonesListPageProps extends PageListProps, ListActions { const ShippingZonesListPage: React.StatelessComponent< ShippingZonesListPageProps -> = ({ defaultWeightUnit, disabled, onBack, onSubmit, ...listProps }) => ( - - {i18n.t("Configuration")} - - -
- -
-
- -
-
-
-); +> = ({ defaultWeightUnit, disabled, onBack, onSubmit, ...listProps }) => { + const intl = useIntl(); + + return ( + + + {intl.formatMessage(sectionNames.configuration)} + + + +
+ +
+
+ +
+
+
+ ); +}; ShippingZonesListPage.displayName = "ShippingZonesListPage"; export default ShippingZonesListPage; diff --git a/src/shipping/index.tsx b/src/shipping/index.tsx index 6ba390e46..5b3b793e4 100644 --- a/src/shipping/index.tsx +++ b/src/shipping/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 { shippingZoneAddPath, shippingZonePath, @@ -39,14 +40,26 @@ const ShippingZoneDetails: React.StatelessComponent< ); }; -export const ShippingRouter: React.StatelessComponent = () => ( - <> - - - - - - - -); +export const ShippingRouter: React.FC = () => { + const intl = useIntl(); + + return ( + <> + + + + + + + + ); +}; export default ShippingRouter; diff --git a/src/shipping/views/ShippingZoneCreate.tsx b/src/shipping/views/ShippingZoneCreate.tsx index b474dfdea..88ca78669 100644 --- a/src/shipping/views/ShippingZoneCreate.tsx +++ b/src/shipping/views/ShippingZoneCreate.tsx @@ -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)); } diff --git a/src/shipping/views/ShippingZoneDetails/ShippingZoneDetailsDialogs.tsx b/src/shipping/views/ShippingZoneDetails/ShippingZoneDetailsDialogs.tsx index 48173f196..6f1784f1a 100644 --- a/src/shipping/views/ShippingZoneDetails/ShippingZoneDetailsDialogs.tsx +++ b/src/shipping/views/ShippingZoneDetails/ShippingZoneDetailsDialogs.tsx @@ -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" > - {{ name }}?", - { - context: "remove shipping method", - name: maybe(() => rate.name, "...") - } - ) - }} - /> + + rate.name, "...") + }} + /> + - {{ name }}?", - { - context: "remove shipping zone", - name: maybe(() => shippingZone.name) - } - ) - }} - /> + + {maybe(() => shippingZone.name, "...")} + }} + /> + - {{ name }} from this shipping zone?", - { - context: "unassign country", - name: maybe( - () => - shippingZone.countries.find( - country => country.code === params.id - ).country - ) - } - ) - }} - /> + + + {maybe( + () => + shippingZone.countries.find( + country => country.code === params.id + ).country, + "..." + )} + + ) + }} + /> + ); diff --git a/src/shipping/views/ShippingZoneDetails/index.tsx b/src/shipping/views/ShippingZoneDetails/index.tsx index 46b72770e..34d87c403 100644 --- a/src/shipping/views/ShippingZoneDetails/index.tsx +++ b/src/shipping/views/ShippingZoneDetails/index.tsx @@ -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(); } diff --git a/src/shipping/views/ShippingZonesList.tsx b/src/shipping/views/ShippingZonesList.tsx index 501ec532a..d15a80b0e 100644 --- a/src/shipping/views/ShippingZonesList.tsx +++ b/src/shipping/views/ShippingZonesList.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 { 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< }) } > - {{ name }} shipping zone?", - { - context: "shipping zone removal", - name: maybe( - () => - data.shippingZones.edges.find( - edge => edge.node.id === params.id - ).node.name, - "..." - ) - } - ) - }} - /> + + + {maybe( + () => + data.shippingZones.edges.find( + edge => edge.node.id === params.id + ).node.name, + "..." + )} + + ) + }} + /> + @@ -247,19 +246,23 @@ export const ShippingZonesList: React.StatelessComponent< }) } > - {{ number }} shipping zones?", - { - number: maybe( - () => params.ids.length.toString(), - "..." - ) - } - ) - }} - /> + + params.ids.length), + displayQuantity: ( + + {maybe(() => params.ids.length)} + + ) + }} + /> + );