Fix ICU plurals
This commit is contained in:
parent
287f20999d
commit
c4c0f22cec
21 changed files with 35 additions and 49 deletions
|
@ -36,7 +36,7 @@ const AttributeBulkDeleteDialog: React.FC<AttributeBulkDeleteDialogProps> = ({
|
|||
>
|
||||
<DialogContentText>
|
||||
<FormattedMessage
|
||||
defaultMessage="Are you sure you want to delete {counter,plural,one{this attribute} other{{displayQuantity} attributes}}?"
|
||||
defaultMessage="{counter,plural,one{Are you sure you want to delete this attribute?} other{Are you sure you want to delete {displayQuantity} attributes?}}"
|
||||
description="dialog content"
|
||||
values={{
|
||||
counter: quantity,
|
||||
|
|
|
@ -298,7 +298,7 @@ export const CategoryDetails: React.FC<CategoryDetailsProps> = ({
|
|||
>
|
||||
<DialogContentText>
|
||||
<FormattedMessage
|
||||
defaultMessage="Are you sure you want to delete {counter,plural,one{this category} other{{displayQuantity} categories}}?"
|
||||
defaultMessage="{counter,plural,one{Are you sure you want to delete this category?} other{Are you sure you want to delete {displayQuantity} categories?}}"
|
||||
values={{
|
||||
counter: maybe(() => params.ids.length),
|
||||
displayQuantity: (
|
||||
|
@ -328,7 +328,7 @@ export const CategoryDetails: React.FC<CategoryDetailsProps> = ({
|
|||
>
|
||||
<DialogContentText>
|
||||
<FormattedMessage
|
||||
defaultMessage="Are you sure you want to delete {counter,plural,one{this product} other{{displayQuantity} products}}?"
|
||||
defaultMessage="{counter,plural,one{Are you sure you want to delete this product?} other{Are you sure you want to delete {displayQuantity} products?}}"
|
||||
values={{
|
||||
counter: maybe(() => params.ids.length),
|
||||
displayQuantity: (
|
||||
|
|
|
@ -210,7 +210,7 @@ export const CategoryList: React.FC<CategoryListProps> = ({ params }) => {
|
|||
>
|
||||
<DialogContentText>
|
||||
<FormattedMessage
|
||||
defaultMessage="Are you sure you want to delete {counter,plural,one{this category} other{{displayQuantity} categories}}?"
|
||||
defaultMessage="{counter,plural,one{Are you sure you want to delete this category?} other{Are you sure you want to delete {displayQuantity} categories?}}"
|
||||
values={{
|
||||
counter: maybe(() => params.ids.length),
|
||||
displayQuantity: <strong>{maybe(() => params.ids.length)}</strong>
|
||||
|
|
|
@ -309,7 +309,7 @@ export const CollectionDetails: React.FC<CollectionDetailsProps> = ({
|
|||
>
|
||||
<DialogContentText>
|
||||
<FormattedMessage
|
||||
defaultMessage="Are you sure you want to unassign {counter,plural,one{this product} other{{displayQuantity} products}}?"
|
||||
defaultMessage="{counter,plural,one{Are you sure you want to unassign this product?} other{Are you sure you want to unassign {displayQuantity} products?}}"
|
||||
values={{
|
||||
counter: maybe(() => params.ids.length),
|
||||
displayQuantity: (
|
||||
|
|
|
@ -260,7 +260,7 @@ export const CollectionList: React.FC<CollectionListProps> = ({ params }) => {
|
|||
>
|
||||
<DialogContentText>
|
||||
<FormattedMessage
|
||||
defaultMessage="Are you sure you want to publish {counter,plural,one{this collection} other{{displayQuantity} collections}}?"
|
||||
defaultMessage="{counter,plural,one{Are you sure you want to publish this collection?} other{Are you sure you want to publish {displayQuantity} collections?}}"
|
||||
values={{
|
||||
counter: maybe(() => params.ids.length),
|
||||
displayQuantity: (
|
||||
|
@ -293,7 +293,7 @@ export const CollectionList: React.FC<CollectionListProps> = ({ params }) => {
|
|||
>
|
||||
<DialogContentText>
|
||||
<FormattedMessage
|
||||
defaultMessage="Are you sure you want to unpublish {counter,plural,one{this collection} other{{displayQuantity} collections}}?"
|
||||
defaultMessage="{counter,plural,one{Are you sure you want to unpublish this collection?} other{Are you sure you want to unpublish {displayQuantity} collections?}}"
|
||||
values={{
|
||||
counter: maybe(() => params.ids.length),
|
||||
displayQuantity: (
|
||||
|
@ -325,7 +325,7 @@ export const CollectionList: React.FC<CollectionListProps> = ({ params }) => {
|
|||
>
|
||||
<DialogContentText>
|
||||
<FormattedMessage
|
||||
defaultMessage="Are you sure you want to delete {counter,plural,one{this collection} other{{displayQuantity} collections}}?"
|
||||
defaultMessage="{counter,plural,one{Are you sure you want to delete this collection?} other{Are you sure you want to delete {displayQuantity} collections?}}"
|
||||
values={{
|
||||
counter: maybe(() => params.ids.length),
|
||||
displayQuantity: (
|
||||
|
|
|
@ -210,7 +210,7 @@ export const CustomerList: React.FC<CustomerListProps> = ({ params }) => {
|
|||
>
|
||||
<DialogContentText>
|
||||
<FormattedMessage
|
||||
defaultMessage="Are you sure you want to delete {counter,plural,one{this customer} other{{displayQuantity} customers}}?"
|
||||
defaultMessage="{counter,plural,one{Are you sure you want to delete this customer?} other{Are you sure you want to delete {displayQuantity} customers?}}"
|
||||
values={{
|
||||
counter: maybe(() => params.ids.length),
|
||||
displayQuantity: (
|
||||
|
|
|
@ -422,7 +422,7 @@ export const SaleDetails: React.FC<SaleDetailsProps> = ({ id, params }) => {
|
|||
{canOpenBulkActionDialog && (
|
||||
<DialogContentText>
|
||||
<FormattedMessage
|
||||
defaultMessage="Are you sure you want to unassign {counter,plural,one{this category} other{{displayQuantity} categories}}?"
|
||||
defaultMessage="{counter,plural,one{Are you sure you want to unassign this category?} other{Are you sure you want to unassign {displayQuantity} categories?}}"
|
||||
description="dialog content"
|
||||
values={{
|
||||
counter: params.ids.length,
|
||||
|
@ -455,7 +455,7 @@ export const SaleDetails: React.FC<SaleDetailsProps> = ({ id, params }) => {
|
|||
{canOpenBulkActionDialog && (
|
||||
<DialogContentText>
|
||||
<FormattedMessage
|
||||
defaultMessage="Are you sure you want to unassign {counter,plural,one{this collection} other{{displayQuantity} collections}}?"
|
||||
defaultMessage="{counter,plural,one{Are you sure you want to unassign this collection?} other{Are you sure you want to unassign {displayQuantity} collections?}}"
|
||||
description="dialog content"
|
||||
values={{
|
||||
counter: params.ids.length,
|
||||
|
@ -487,7 +487,7 @@ export const SaleDetails: React.FC<SaleDetailsProps> = ({ id, params }) => {
|
|||
{canOpenBulkActionDialog && (
|
||||
<DialogContentText>
|
||||
<FormattedMessage
|
||||
defaultMessage="Are you sure you want to unassign {counter,plural,one{this product} other{{displayQuantity} products}}?"
|
||||
defaultMessage="{counter,plural,one{Are you sure you want to unassign this product?} other{Are you sure you want to unassign {displayQuantity} products?}}"
|
||||
description="dialog content"
|
||||
values={{
|
||||
counter: params.ids.length,
|
||||
|
|
|
@ -216,7 +216,7 @@ export const SaleList: React.FC<SaleListProps> = ({ params }) => {
|
|||
{canOpenBulkActionDialog && (
|
||||
<DialogContentText>
|
||||
<FormattedMessage
|
||||
defaultMessage="Are you sure you want to delete {counter,plural,one{this sale} other{{displayQuantity} sales}}?"
|
||||
defaultMessage="{counter,plural,one{Are you sure you want to delete this sale?} other{Are you sure you want to delete {displayQuantity} sales?}}"
|
||||
description="dialog content"
|
||||
values={{
|
||||
counter: params.ids.length,
|
||||
|
|
|
@ -528,7 +528,7 @@ export const VoucherDetails: React.FC<VoucherDetailsProps> = ({
|
|||
{canOpenBulkActionDialog && (
|
||||
<DialogContentText>
|
||||
<FormattedMessage
|
||||
defaultMessage="Are you sure you want to unassign {counter,plural,one{this category} other{{displayQuantity} categories}}?"
|
||||
defaultMessage="{counter,plural,one{Are you sure you want to unassign this category?} other{Are you sure you want to unassign {displayQuantity} categories?}}"
|
||||
description="dialog content"
|
||||
values={{
|
||||
counter: params.ids.length,
|
||||
|
@ -561,7 +561,7 @@ export const VoucherDetails: React.FC<VoucherDetailsProps> = ({
|
|||
{canOpenBulkActionDialog && (
|
||||
<DialogContentText>
|
||||
<FormattedMessage
|
||||
defaultMessage="Are you sure you want to unassign {counter,plural,one{this collection} other{{displayQuantity} collections}}?"
|
||||
defaultMessage="{counter,plural,one{Are you sure you want to unassign this collection?} other{Are you sure you want to unassign {displayQuantity} collections?}}"
|
||||
description="dialog content"
|
||||
values={{
|
||||
counter: params.ids.length,
|
||||
|
@ -594,7 +594,7 @@ export const VoucherDetails: React.FC<VoucherDetailsProps> = ({
|
|||
{canOpenBulkActionDialog && (
|
||||
<DialogContentText>
|
||||
<FormattedMessage
|
||||
defaultMessage="Are you sure you want to unassign {counter,plural,one{this product} other{{displayQuantity} products}}?"
|
||||
defaultMessage="{counter,plural,one{Are you sure you want to unassign this product?} other{Are you sure you want to unassign {displayQuantity} products?}}"
|
||||
description="dialog content"
|
||||
values={{
|
||||
counter: params.ids.length,
|
||||
|
|
|
@ -216,7 +216,7 @@ export const VoucherList: React.FC<VoucherListProps> = ({ params }) => {
|
|||
{canOpenBulkActionDialog && (
|
||||
<DialogContentText>
|
||||
<FormattedMessage
|
||||
defaultMessage="Are you sure you want to delete {counter,plural,one{this voucher} other{{displayQuantity} vouchers}}?"
|
||||
defaultMessage="{counter,plural,one{Are you sure you want to delete this voucher?} other{Are you sure you want to delete {displayQuantity} vouchers?}}"
|
||||
description="dialog content"
|
||||
values={{
|
||||
counter: params.ids.length,
|
||||
|
|
|
@ -70,10 +70,7 @@ const HomeNotificationTable: React.FC<HomeNotificationTableProps> = props => {
|
|||
) : (
|
||||
<Typography>
|
||||
<FormattedMessage
|
||||
defaultMessage="{amount, plural,
|
||||
one {One order}
|
||||
other {{amount} Orders}
|
||||
} are ready to fulfill"
|
||||
defaultMessage="{amount, plural,one {One order is ready to fulfill} other {{amount} Orders are ready to fulfill}}"
|
||||
id="homeNotificationTableOrders"
|
||||
values={{
|
||||
amount: <strong>{ordersToFulfill}</strong>
|
||||
|
@ -100,10 +97,7 @@ const HomeNotificationTable: React.FC<HomeNotificationTableProps> = props => {
|
|||
) : (
|
||||
<Typography>
|
||||
<FormattedMessage
|
||||
defaultMessage="{amount, plural,
|
||||
one {One payment}
|
||||
other {{amount} Payments}
|
||||
} to capture"
|
||||
defaultMessage="{amount, plural,one {One payment to capture}other {{amount} Payments to capture}}"
|
||||
id="homeNotificationTablePayments"
|
||||
values={{
|
||||
amount: <strong>{ordersToCapture}</strong>
|
||||
|
@ -135,10 +129,7 @@ const HomeNotificationTable: React.FC<HomeNotificationTableProps> = props => {
|
|||
) : (
|
||||
<Typography>
|
||||
<FormattedMessage
|
||||
defaultMessage="{amount, plural,
|
||||
one {One product}
|
||||
other {{amount} Products}
|
||||
} out of stock"
|
||||
defaultMessage="{amount, plural,one {One product out of stock}other {{amount} Products out of stock}}"
|
||||
id="homeNotificationTableProducts"
|
||||
values={{
|
||||
amount: <strong>{productsOutOfStock}</strong>
|
||||
|
|
|
@ -99,10 +99,7 @@ export const HomeProductList: React.FC<HomeProductListProps> = props => {
|
|||
</Typography>
|
||||
<Typography color={"textSecondary"}>
|
||||
<FormattedMessage
|
||||
defaultMessage="{amount, plural,
|
||||
one {One ordered}
|
||||
other {{amount} Ordered}
|
||||
}"
|
||||
defaultMessage="{amount, plural,one {One ordered}other {{amount} Ordered}}"
|
||||
description="number of ordered products"
|
||||
id="homeProductListCardOrders"
|
||||
values={{
|
||||
|
|
|
@ -238,7 +238,7 @@ const MenuList: React.FC<MenuListProps> = ({ params }) => {
|
|||
>
|
||||
<DialogContentText>
|
||||
<FormattedMessage
|
||||
defaultMessage="Are you sure you want to delete {counter,plural,one{this menu} other{{displayQuantity} menus}}?"
|
||||
defaultMessage="{counter,plural,one{Are you sure you want to delete this menu?} other{Are you sure you want to delete {displayQuantity} menus?}}"
|
||||
id="menuListDeleteMenusContent"
|
||||
values={{
|
||||
counter: maybe(
|
||||
|
|
|
@ -38,7 +38,7 @@ const OrderBulkCancelDialog: React.FC<OrderBulkCancelDialogProps> = ({
|
|||
>
|
||||
<DialogContentText>
|
||||
<FormattedMessage
|
||||
defaultMessage="Are you sure you want to cancel {counter,plural,one{this order} other{{displayQuantity} orders}}?"
|
||||
defaultMessage="{counter,plural,one{Are you sure you want to cancel this order?} other{Are you sure you want to cancel {displayQuantity} orders?}}"
|
||||
values={{
|
||||
counter: numberOfOrders,
|
||||
displayQuantity: <strong>{numberOfOrders}</strong>
|
||||
|
|
|
@ -229,7 +229,7 @@ export const OrderDraftList: React.FC<OrderDraftListProps> = ({ params }) => {
|
|||
>
|
||||
<DialogContentText>
|
||||
<FormattedMessage
|
||||
defaultMessage="Are you sure you want to delete {counter,plural,one{this order draft} other{{displayQuantity} orderDrafts}}?"
|
||||
defaultMessage="{counter,plural,one{Are you sure you want to delete this order draft?} other{Are you sure you want to delete {displayQuantity} order drafts?}}"
|
||||
description="dialog content"
|
||||
values={{
|
||||
counter: maybe(() => params.ids.length),
|
||||
|
|
|
@ -186,7 +186,7 @@ export const PageList: React.FC<PageListProps> = ({ params }) => {
|
|||
>
|
||||
<DialogContentText>
|
||||
<FormattedMessage
|
||||
defaultMessage="Are you sure you want to publish {counter,plural,one{this page} other{{displayQuantity} pages}}?"
|
||||
defaultMessage="{counter,plural,one{Are you sure you want to publish this page?} other{Are you sure you want to publish {displayQuantity} pages?}}"
|
||||
description="dialog content"
|
||||
values={{
|
||||
counter: maybe(() => params.ids.length),
|
||||
|
@ -215,7 +215,7 @@ export const PageList: React.FC<PageListProps> = ({ params }) => {
|
|||
})}
|
||||
>
|
||||
<FormattedMessage
|
||||
defaultMessage="Are you sure you want to unpublish {counter,plural,one{this page} other{{displayQuantity} pages}}?"
|
||||
defaultMessage="{counter,plural,one{Are you sure you want to unpublish this page?} other{Are you sure you want to unpublish {displayQuantity} pages?}}"
|
||||
description="dialog content"
|
||||
values={{
|
||||
counter: maybe(() => params.ids.length),
|
||||
|
@ -243,7 +243,7 @@ export const PageList: React.FC<PageListProps> = ({ params }) => {
|
|||
})}
|
||||
>
|
||||
<FormattedMessage
|
||||
defaultMessage="Are you sure you want to delete {counter,plural,one{this page} other{{displayQuantity} pages}}?"
|
||||
defaultMessage="{counter,plural,one{Are you sure you want to delete this page?} other{Are you sure you want to delete {displayQuantity} pages?}}"
|
||||
description="dialog content"
|
||||
values={{
|
||||
counter: maybe(() => params.ids.length),
|
||||
|
|
|
@ -14,9 +14,7 @@ export interface ProductTypeBulkAttributeUnassignDialogProps {
|
|||
onConfirm: () => void;
|
||||
}
|
||||
|
||||
const ProductTypeBulkAttributeUnassignDialog: React.FC<
|
||||
ProductTypeBulkAttributeUnassignDialogProps
|
||||
> = ({
|
||||
const ProductTypeBulkAttributeUnassignDialog: React.FC<ProductTypeBulkAttributeUnassignDialogProps> = ({
|
||||
attributeQuantity,
|
||||
confirmButtonState,
|
||||
open,
|
||||
|
@ -39,7 +37,7 @@ const ProductTypeBulkAttributeUnassignDialog: React.FC<
|
|||
>
|
||||
<DialogContentText>
|
||||
<FormattedMessage
|
||||
defaultMessage="Are you sure you want to unassign {counter,plural,one{this attribute} other{{attributeQuantity} attributes}} from {productTypeName}?"
|
||||
defaultMessage="{counter,plural,one{Are you sure you want to unassign this attribute from {productTypeName}?} other{Are you sure you want to unassign {attributeQuantity} attributes from {productTypeName}?}}"
|
||||
description="unassign multiple attributes from product type"
|
||||
values={{
|
||||
attributeQuantity: <strong>{attributeQuantity}</strong>,
|
||||
|
|
|
@ -218,7 +218,7 @@ export const ProductTypeList: React.FC<ProductTypeListProps> = ({ params }) => {
|
|||
>
|
||||
<DialogContentText>
|
||||
<FormattedMessage
|
||||
defaultMessage="Are you sure you want to delete {counter,plural,one{this product type} other{{displayQuantity} product types}}?"
|
||||
defaultMessage="{counter,plural,one{Are you sure you want to delete this product type?} other{Are you sure you want to delete {displayQuantity} product types?}}"
|
||||
description="dialog content"
|
||||
values={{
|
||||
counter: maybe(() => params.ids.length),
|
||||
|
|
|
@ -403,7 +403,7 @@ export const ProductList: React.FC<ProductListProps> = ({ params }) => {
|
|||
>
|
||||
<DialogContentText>
|
||||
<FormattedMessage
|
||||
defaultMessage="Are you sure you want to delete {counter,plural,one{this product} other{{displayQuantity} products}}?"
|
||||
defaultMessage="{counter,plural,one{Are you sure you want to delete this product?} other{Are you sure you want to delete {displayQuantity} products?}}"
|
||||
description="dialog content"
|
||||
values={{
|
||||
counter: maybe(() => params.ids.length),
|
||||
|
@ -435,7 +435,7 @@ export const ProductList: React.FC<ProductListProps> = ({ params }) => {
|
|||
>
|
||||
<DialogContentText>
|
||||
<FormattedMessage
|
||||
defaultMessage="Are you sure you want to publish {counter,plural,one{this product} other{{displayQuantity} products}}?"
|
||||
defaultMessage="{counter,plural,one{Are you sure you want to publish this product?} other{Are you sure you want to publish {displayQuantity} products?}}"
|
||||
description="dialog content"
|
||||
values={{
|
||||
counter: maybe(() => params.ids.length),
|
||||
|
@ -467,7 +467,7 @@ export const ProductList: React.FC<ProductListProps> = ({ params }) => {
|
|||
>
|
||||
<DialogContentText>
|
||||
<FormattedMessage
|
||||
defaultMessage="Are you sure you want to unpublish {counter,plural,one{this product} other{{displayQuantity} products}}?"
|
||||
defaultMessage="{counter,plural,one{Are you sure you want to unpublish this product?} other{Are you sure you want to unpublish {displayQuantity} products?}}"
|
||||
description="dialog content"
|
||||
values={{
|
||||
counter: maybe(() => params.ids.length),
|
||||
|
|
|
@ -322,7 +322,7 @@ export const ProductUpdate: React.FC<ProductUpdateProps> = ({ id, params }) => {
|
|||
>
|
||||
<DialogContentText>
|
||||
<FormattedMessage
|
||||
defaultMessage="Are you sure you want to delete {counter,plural,one{this variant} other{{displayQuantity} variants}}?"
|
||||
defaultMessage="{counter,plural,one{Are you sure you want to delete this variant?} other{Are you sure you want to delete {displayQuantity} variants?}}"
|
||||
description="dialog content"
|
||||
values={{
|
||||
counter: maybe(() => params.ids.length),
|
||||
|
|
|
@ -233,7 +233,7 @@ export const ShippingZonesList: React.FC<ShippingZonesListProps> = ({
|
|||
>
|
||||
<DialogContentText>
|
||||
<FormattedMessage
|
||||
defaultMessage="Are you sure you want to delete {counter,plural,one{this shipping zone} other{{displayQuantity} shipping zones}}?"
|
||||
defaultMessage="{counter,plural,one{Are you sure you want to delete this shipping zone?} other{Are you sure you want to delete {displayQuantity} shipping zones?}}"
|
||||
description="dialog content"
|
||||
values={{
|
||||
counter: maybe(() => params.ids.length),
|
||||
|
|
Loading…
Reference in a new issue