Improve labels
This commit is contained in:
parent
a280c10e0e
commit
bd679bb1ed
6 changed files with 19 additions and 17 deletions
|
@ -47,11 +47,11 @@ const CategoryDeleteDialog = withStyles(styles, {
|
||||||
<DialogContent>
|
<DialogContent>
|
||||||
<DialogContentText>
|
<DialogContentText>
|
||||||
<FormattedMessage
|
<FormattedMessage
|
||||||
defaultMessage="Are you sure you want to remove {name}?"
|
defaultMessage="Are you sure you want to delete {categoryName}?"
|
||||||
description="delete category"
|
description="delete category"
|
||||||
id="<categoryDeleteDialogContent<"
|
id="categoryDeleteDialogContent"
|
||||||
values={{
|
values={{
|
||||||
name: <strong>{name}</strong>
|
categoryName: <strong>{name}</strong>
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
</DialogContentText>
|
</DialogContentText>
|
||||||
|
|
|
@ -54,8 +54,7 @@ export const CategoryDetailsForm = withStyles(styles, {
|
||||||
<TextField
|
<TextField
|
||||||
classes={{ root: classes.root }}
|
classes={{ root: classes.root }}
|
||||||
label={intl.formatMessage({
|
label={intl.formatMessage({
|
||||||
defaultMessage: "Name",
|
defaultMessage: "Category Name",
|
||||||
description: "category name",
|
|
||||||
id: "categoryDetailsFormNameInputLabel"
|
id: "categoryDetailsFormNameInputLabel"
|
||||||
})}
|
})}
|
||||||
name="name"
|
name="name"
|
||||||
|
@ -71,7 +70,10 @@ export const CategoryDetailsForm = withStyles(styles, {
|
||||||
disabled={disabled}
|
disabled={disabled}
|
||||||
error={!!errors.descriptionJson}
|
error={!!errors.descriptionJson}
|
||||||
helperText={errors.descriptionJson}
|
helperText={errors.descriptionJson}
|
||||||
label={intl.formatMessage(commonMessages.description)}
|
label={intl.formatMessage({
|
||||||
|
defaultMessage: "Category Description",
|
||||||
|
id: "categoryDetailsFormDescriptionInputLabel"
|
||||||
|
})}
|
||||||
initial={maybe(() => JSON.parse(category.descriptionJson))}
|
initial={maybe(() => JSON.parse(category.descriptionJson))}
|
||||||
name="description"
|
name="description"
|
||||||
onChange={onChange}
|
onChange={onChange}
|
||||||
|
|
|
@ -134,8 +134,8 @@ const CategoryList = withStyles(styles, { name: "CategoryList" })(
|
||||||
</TableCell>
|
</TableCell>
|
||||||
<TableCell className={classes.colProducts}>
|
<TableCell className={classes.colProducts}>
|
||||||
<FormattedMessage
|
<FormattedMessage
|
||||||
defaultMessage="No. Products"
|
defaultMessage="No. of Products"
|
||||||
description="number of products in category"
|
description="number of products"
|
||||||
id="categoryListNumberOfProductsColumnHeader"
|
id="categoryListNumberOfProductsColumnHeader"
|
||||||
/>
|
/>
|
||||||
</TableCell>
|
</TableCell>
|
||||||
|
|
|
@ -31,17 +31,18 @@ export const CategoryProductsCard: React.StatelessComponent<
|
||||||
toolbar
|
toolbar
|
||||||
}) => {
|
}) => {
|
||||||
const intl = useIntl();
|
const intl = useIntl();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Card>
|
<Card>
|
||||||
<CardTitle
|
<CardTitle
|
||||||
title={intl.formatMessage(
|
title={intl.formatMessage(
|
||||||
{
|
{
|
||||||
defaultMessage: "Products in {name}",
|
defaultMessage: "Products in {categoryName}",
|
||||||
description: "products in category, section header",
|
description: "section header",
|
||||||
id: "categoryProductsCardHeader"
|
id: "categoryProductsCardHeader"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: categoryName
|
categoryName
|
||||||
}
|
}
|
||||||
)}
|
)}
|
||||||
toolbar={
|
toolbar={
|
||||||
|
|
|
@ -332,11 +332,10 @@ export const CategoryDetails: React.StatelessComponent<
|
||||||
>
|
>
|
||||||
<DialogContentText>
|
<DialogContentText>
|
||||||
<FormattedMessage
|
<FormattedMessage
|
||||||
defaultMessage="Are you sure you want to delete {name}?"
|
defaultMessage="Are you sure you want to delete {categoryName}?"
|
||||||
description="delete category"
|
|
||||||
id="categoryDetailsDeleteCategoryDialogContent"
|
id="categoryDetailsDeleteCategoryDialogContent"
|
||||||
values={{
|
values={{
|
||||||
name: (
|
categoryName: (
|
||||||
<strong>
|
<strong>
|
||||||
{maybe(
|
{maybe(
|
||||||
() => data.category.name,
|
() => data.category.name,
|
||||||
|
@ -349,7 +348,7 @@ export const CategoryDetails: React.StatelessComponent<
|
||||||
</DialogContentText>
|
</DialogContentText>
|
||||||
<DialogContentText>
|
<DialogContentText>
|
||||||
<FormattedMessage
|
<FormattedMessage
|
||||||
defaultMessage="Remember that this will also delete all products assigned to this category."
|
defaultMessage="Remember this will also delete all products assigned to this category."
|
||||||
id="categoryDetailsDeleteCategoryDialogContentAdditionalText"
|
id="categoryDetailsDeleteCategoryDialogContentAdditionalText"
|
||||||
/>
|
/>
|
||||||
</DialogContentText>
|
</DialogContentText>
|
||||||
|
@ -393,7 +392,7 @@ export const CategoryDetails: React.StatelessComponent<
|
||||||
</DialogContentText>
|
</DialogContentText>
|
||||||
<DialogContentText>
|
<DialogContentText>
|
||||||
<FormattedMessage
|
<FormattedMessage
|
||||||
defaultMessage="Remember that this will also delete all products assigned to this category."
|
defaultMessage="Remember this will also delete all products assigned to this category."
|
||||||
id="categoryDetailsDeleteCategoriesDialogContentAdditionalText"
|
id="categoryDetailsDeleteCategoriesDialogContentAdditionalText"
|
||||||
/>
|
/>
|
||||||
</DialogContentText>
|
</DialogContentText>
|
||||||
|
|
|
@ -146,7 +146,7 @@ export const CategoryList: React.StatelessComponent<CategoryListProps> = ({
|
||||||
/>
|
/>
|
||||||
<DialogContentText>
|
<DialogContentText>
|
||||||
<FormattedMessage
|
<FormattedMessage
|
||||||
defaultMessage="Remember that this will also delete all products assigned to this category."
|
defaultMessage="Remember this will also delete all products assigned to this category."
|
||||||
id="categoryListDeleteCategoriesDialogContentAdditionalText"
|
id="categoryListDeleteCategoriesDialogContentAdditionalText"
|
||||||
/>
|
/>
|
||||||
</DialogContentText>
|
</DialogContentText>
|
||||||
|
|
Loading…
Reference in a new issue