Skip to content

Commit

Permalink
fix some swap/bridge translations (#1059)
Browse files Browse the repository at this point in the history
  • Loading branch information
greg-schrammel authored Oct 17, 2023
1 parent c50e33d commit c9364ab
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import {
AssetToBuySection,
AssetToBuySectionId,
} from '~/entries/popup/hooks/useSearchCurrencyLists';
import { useTranslationContext } from '~/entries/popup/hooks/useTranslationContext';
import { useVirtualizedAssets } from '~/entries/popup/hooks/useVirtualizedAssets';

import { TokenToBuyRow } from '../TokenRow/TokenToBuyRow';
Expand Down Expand Up @@ -113,6 +114,7 @@ export const TokenToBuySection = ({
onSelectAsset?: (asset: ParsedSearchAsset | null) => void;
onDropdownChange: (open: boolean) => void;
}) => {
const t = useTranslationContext();
const { containerRef, assetsRowVirtualizer } = useVirtualizedAssets({
assets: assetSection.data,
size: 5,
Expand All @@ -138,7 +140,7 @@ export const TokenToBuySection = ({
<Inline space="8px" alignVertical="center">
<CoinIcon asset={undefined} />
<Text size="14pt" weight="semibold" color={'labelQuaternary'}>
{i18n.t('swap.tokens_input.nothing_found')}
{t('swap.tokens_input.nothing_found')}
</Text>
</Inline>
</Inset>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
import { motion } from 'framer-motion';
import React from 'react';

import { i18n } from '~/core/languages';
import { ParsedSearchAsset } from '~/core/types/assets';
import { Bleed, Box, Inline, Stack, Symbol, Text } from '~/design-system';
import { SortMethod } from '~/entries/popup/hooks/send/useSendAsset';
import { useTranslationContext } from '~/entries/popup/hooks/useTranslationContext';
import { useVirtualizedAssets } from '~/entries/popup/hooks/useVirtualizedAssets';

import { dropdownContainerVariant } from '../../../../components/DropdownInputWrapper/DropdownInputWrapper';
Expand Down Expand Up @@ -39,6 +38,8 @@ export const TokenToSellDropdown = ({
size: 10,
});

const t = useTranslationContext();

return (
<Stack space="8px">
<Box paddingHorizontal="20px">
Expand All @@ -51,7 +52,7 @@ export const TokenToSellDropdown = ({
size={14}
/>
<Text size="14pt" weight="semibold" color="labelTertiary">
{i18n.t('swap.tokens_input.tokens')}
{t('swap.tokens_input.tokens')}
</Text>
</Inline>
<DropdownMenu onOpenChange={onDropdownChange}>
Expand All @@ -68,7 +69,7 @@ export const TokenToSellDropdown = ({
size={14}
/>
<Text size="14pt" weight="semibold" color="labelTertiary">
{i18n.t('swap.tokens_input.sort')}
{t('swap.tokens_input.sort')}
</Text>
</Inline>
</Box>
Expand Down Expand Up @@ -97,7 +98,7 @@ export const TokenToSellDropdown = ({
</Bleed>

<Text size="14pt" weight="semibold" color="label">
{i18n.t('swap.tokens_input.token_balance')}
{t('swap.tokens_input.token_balance')}
</Text>
</Inline>
</Box>
Expand All @@ -115,7 +116,7 @@ export const TokenToSellDropdown = ({
</Bleed>

<Text size="14pt" weight="semibold" color="label">
{i18n.t('swap.tokens_input.networks')}
{t('swap.tokens_input.networks')}
</Text>
</Inline>
</Box>
Expand Down Expand Up @@ -161,7 +162,7 @@ export const TokenToSellDropdown = ({
weight="semibold"
align="center"
>
{i18n.t('swap.tokens_input.nothing_found')}
{t('swap.tokens_input.nothing_found')}
</Text>

<Text
Expand All @@ -170,7 +171,7 @@ export const TokenToSellDropdown = ({
weight="regular"
align="center"
>
{i18n.t('swap.tokens_input.nothing_found_description')}
{t('swap.tokens_input.nothing_found_description')}
</Text>
</Stack>
</Box>
Expand Down

0 comments on commit c9364ab

Please sign in to comment.