Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Fix copy
dominik-zeglenb15512e93af9
diff --git a/saleor/static/dashboard-next/attributes/components/AttributeValueDeleteDialog/AttributeValueDeleteDialog.tsx b/saleor/static/dashboard-next/attributes/components/AttributeValueDeleteDialog/AttributeValueDeleteDialog.tsxindex 1fcca2ce6c..3edd078ee4 100644--- a/saleor/static/dashboard-next/attributes/components/AttributeValueDeleteDialog/AttributeValueDeleteDialog.tsx+++ b/saleor/static/dashboard-next/attributes/components/AttributeValueDeleteDialog/AttributeValueDeleteDialog.tsx@@ -6,16 +6,20 @@ import { ConfirmButtonTransitionState } from "@saleor/components/ConfirmButton";import i18n from "@saleor/i18n";export interface AttributeValueDeleteDialogProps {+ attributeName: string;confirmButtonState: ConfirmButtonTransitionState;open: boolean;+ name: string;+ useName?: boolean;onConfirm: () => void;onClose: () => void;- name: string;}const AttributeValueDeleteDialog: React.FC<AttributeValueDeleteDialogProps> = ({+ attributeName,name,confirmButtonState,+ useName,onClose,onConfirm,open@@ -28,16 +32,19 @@ const AttributeValueDeleteDialog: React.FC<AttributeValueDeleteDialogProps> = ({variant="delete"title={i18n.t("Remove attribute value")}>- <DialogContentText- dangerouslySetInnerHTML={{- __html: i18n.t(- "Are you sure you want to remove <strong>{{ name }}</strong>?",- {+ <DialogContentText>+ {useName+ ? i18n.t(+ 'Are you sure you want to remove "{{ name }}" value? If you remove it you won’t be able to assign it to any of the products with "{{ attributeName }}" attribute.',+ {+ attributeName,+ name+ }+ )+ : i18n.t('Are you sure you want to remove "{{ name }}" value?', {name- }- )- }}- />+ })}+ </DialogContentText></ActionDialog>);diff --git a/saleor/static/dashboard-next/attributes/views/AttributeCreate/AttributeCreate.tsx b/saleor/static/dashboard-next/attributes/views/AttributeCreate/AttributeCreate.tsxindex 654b9ed33b..557b201554 100644--- a/saleor/static/dashboard-next/attributes/views/AttributeCreate/AttributeCreate.tsx+++ b/saleor/static/dashboard-next/attributes/views/AttributeCreate/AttributeCreate.tsx@@ -132,6 +132,7 @@ const AttributeDetails: React.FC<AttributeDetailsProps> = ({ params }) => {{values.length && (<><AttributeValueDeleteDialog+ attributeName={undefined}open={params.action === "remove-value"}name={maybe(() => values[id].name)}confirmButtonState="default"diff --git a/saleor/static/dashboard-next/attributes/views/AttributeDetails/AttributeDetails.tsx b/saleor/static/dashboard-next/attributes/views/AttributeDetails/AttributeDetails.tsxindex 6dcf494ff4..cc249e2de1 100644--- a/saleor/static/dashboard-next/attributes/views/AttributeDetails/AttributeDetails.tsx+++ b/saleor/static/dashboard-next/attributes/views/AttributeDetails/AttributeDetails.tsx@@ -195,6 +195,10 @@ const AttributeDetails: React.FC<AttributeDetailsProps> = ({ id, params }) => {}/><AttributeValueDeleteDialog+ attributeName={maybe(+ () => data.attribute.name,+ "..."+ )}open={params.action === "remove-value"}name={maybe(() =>@@ -203,6 +207,7 @@ const AttributeDetails: React.FC<AttributeDetailsProps> = ({ id, params }) => {).name,"...")}+ useName={true}confirmButtonState={deleteValueTransitionState}diff --git a/saleor/static/dashboard-next/storybook/stories/attributes/AttributeValueDeleteDialog.tsx b/saleor/static/dashboard-next/storybook/stories/attributes/AttributeValueDeleteDialog.tsxindex ef23a067e5..08f6a5fdea 100644--- a/saleor/static/dashboard-next/storybook/stories/attributes/AttributeValueDeleteDialog.tsx+++ b/saleor/static/dashboard-next/storybook/stories/attributes/AttributeValueDeleteDialog.tsx@@ -7,6 +7,7 @@ import AttributeValueDeleteDialog, {import Decorator from "../../Decorator";const props: AttributeValueDeleteDialogProps = {+ attributeName: "Size",confirmButtonState: "default",name: "XS",onClose: () => undefined,