The complete open source platform to run your entire marketplace. Storefront, vendor panel, admin console, and integrations in one enterprise-grade platform you own.
TypeScript b2b-marketplacecomposable-commerceecommerceenterpriseheadless-commercemarketplacemedusamedusajsmulti-vendortypescript
fix(admin): align category toast messages with product copy (#1190)
Viktor Holik9da16c3d53e6
diff --git a/packages/admin/src/i18n/translations/en.json b/packages/admin/src/i18n/translations/en.jsonindex 94e755db4..b659b8cbf 100644--- a/packages/admin/src/i18n/translations/en.json+++ b/packages/admin/src/i18n/translations/en.json@@ -970,7 +970,7 @@"details": "Details","organize": "Organize Ranking"},- "successToast": "Category {{name}} was successfully created."+ "successToast": "Category was successfully created."},"edit": {"header": "Edit Category",@@ -979,19 +979,19 @@},"delete": {"confirmation": "You are about to delete the category {{name}}. This action cannot be undone.",- "successToast": "Category {{name}} was successfully deleted."+ "successToast": "Category was successfully deleted."},"products": {"add": {"disabledTooltip": "The product is already in this category.",- "successToast_one": "Added {{count}} product to the category.",- "successToast_other": "Added {{count}} products to the category."+ "successToast_one": "Product was successfully added to the category.",+ "successToast_other": "Products were successfully added to the category."},"remove": {"confirmation_one": "You are about to remove {{count}} product from the category. This action cannot be undone.","confirmation_other": "You are about to remove {{count}} products from the category. This action cannot be undone.",- "successToast_one": "Removed {{count}} product from the category.",- "successToast_other": "Removed {{count}} products from the category."+ "successToast_one": "Product was successfully removed from the category.",+ "successToast_other": "Products were successfully removed from the category."},"list": {"noRecordsTitle": "No products yet",@@ -1001,7 +1001,7 @@"organize": {"header": "Organize","action": "Edit ranking",- "successToast": "Category ranking was updated successfully."+ "successToast": "Ranking was successfully updated."},"media": {"label": "Media",diff --git a/packages/admin/src/pages/categories/category-create/components/create-category-form/create-category-form.tsx b/packages/admin/src/pages/categories/category-create/components/create-category-form/create-category-form.tsxindex dd3de4555..cac90ee42 100644--- a/packages/admin/src/pages/categories/category-create/components/create-category-form/create-category-form.tsx+++ b/packages/admin/src/pages/categories/category-create/components/create-category-form/create-category-form.tsx@@ -78,11 +78,7 @@ export const CreateCategoryForm = ({},{onSuccess: ({ product_category }) => {- toast.success(- t("categories.create.successToast", {- name: product_category.name,- })- )+ toast.success(t("categories.create.successToast"))handleSuccess(`/categories/${product_category.id}`)},diff --git a/packages/admin/src/pages/categories/common/hooks/use-delete-product-category-action.tsx b/packages/admin/src/pages/categories/common/hooks/use-delete-product-category-action.tsxindex 1ce74ed3a..4f6073c3a 100644--- a/packages/admin/src/pages/categories/common/hooks/use-delete-product-category-action.tsx+++ b/packages/admin/src/pages/categories/common/hooks/use-delete-product-category-action.tsx@@ -29,11 +29,7 @@ export const useDeleteProductCategoryAction = (await mutateAsync(undefined, {onSuccess: () => {- toast.success(- t("categories.delete.successToast", {- name: category.name,- })- )+ toast.success(t("categories.delete.successToast"))navigate("/categories", {replace: true,