+
{
+ const t = useT();
const showAllActions = props.isReadOnly
? false
: filter === undefined || filter === Filter.Open
@@ -252,11 +253,14 @@ export const OrderListTable = memo<
}
const tifLabel = value ? Schema.OrderTimeInForceCode[value] : '';
- const label = `${tifLabel}${
- data?.postOnly ? t('. Post Only') : ''
- }${data?.reduceOnly ? t('. Reduce only') : ''}`;
+ if (data?.postOnly) {
+ return t('{{tifLabel}}. Post Only', { tifLabel });
+ }
+ if (data?.reduceOnly) {
+ return t('{{tifLabel}}. Reduce only', { tifLabel });
+ }
- return label;
+ return tifLabel;
},
},
{
@@ -336,6 +340,7 @@ export const OrderListTable = memo<
onOrderTypeClick,
props.isReadOnly,
showAllActions,
+ t,
]
);
diff --git a/libs/orders/src/lib/components/order-list/order-view-dialog.tsx b/libs/orders/src/lib/components/order-list/order-view-dialog.tsx
index 0af3098e4..491cecda6 100644
--- a/libs/orders/src/lib/components/order-list/order-view-dialog.tsx
+++ b/libs/orders/src/lib/components/order-list/order-view-dialog.tsx
@@ -2,7 +2,6 @@ import {
addDecimalsFormatNumber,
getDateTimeFormat,
} from '@vegaprotocol/utils';
-import { t } from '@vegaprotocol/i18n';
import { Size } from '@vegaprotocol/datagrid';
import * as Schema from '@vegaprotocol/types';
import {
@@ -19,6 +18,7 @@ import type { Order } from '../order-data-provider';
import CopyToClipboard from 'react-copy-to-clipboard';
import { useCopyTimeout } from '@vegaprotocol/react-helpers';
import classNames from 'classnames';
+import { useT } from '../../use-t';
interface OrderViewDialogProps {
isOpen: boolean;
@@ -33,6 +33,7 @@ export const OrderViewDialog = ({
onChange,
onMarketClick,
}: OrderViewDialogProps) => {
+ const t = useT();
const [, setCopied] = useCopyTimeout();
return (
- {order.liquidityProvision ? t('Yes') : t('-')}
+ {order.liquidityProvision ? t('Yes') : '-'}
@@ -217,7 +218,7 @@ export const OrderViewDialog = ({
{t('Iceberg order')}
- {order.icebergOrder ? t('Yes') : t('-')}
+ {order.icebergOrder ? t('Yes') : '-'}
{order.icebergOrder && (
diff --git a/libs/orders/src/lib/components/stop-orders-manager/stop-orders-manager.tsx b/libs/orders/src/lib/components/stop-orders-manager/stop-orders-manager.tsx
index 750dc7951..2510d0114 100644
--- a/libs/orders/src/lib/components/stop-orders-manager/stop-orders-manager.tsx
+++ b/libs/orders/src/lib/components/stop-orders-manager/stop-orders-manager.tsx
@@ -1,4 +1,3 @@
-import { t } from '@vegaprotocol/i18n';
import { useCallback, useEffect, useState } from 'react';
import { StopOrdersTable } from '../stop-orders-table/stop-orders-table';
import { type useDataGridEvents } from '@vegaprotocol/datagrid';
@@ -11,6 +10,7 @@ import {
type StopOrdersQueryVariables,
} from '../order-data-provider';
import { useVegaTransactionStore } from '@vegaprotocol/web3';
+import { useT } from '../../use-t';
export interface StopOrdersManagerProps {
partyId: string;
@@ -27,6 +27,7 @@ export const StopOrdersManager = ({
isReadOnly,
gridProps,
}: StopOrdersManagerProps) => {
+ const t = useT();
const create = useVegaTransactionStore((state) => state.create);
const [viewOrder, setViewOrder] = useState