diff --git a/packages/gui/src/components/nfts/NFTPreview.tsx b/packages/gui/src/components/nfts/NFTPreview.tsx index ec4f965d28..39bd0f3075 100644 --- a/packages/gui/src/components/nfts/NFTPreview.tsx +++ b/packages/gui/src/components/nfts/NFTPreview.tsx @@ -429,7 +429,7 @@ export default function NFTPreview(props: NFTPreviewProps) { {isLoading ? ( - {!isCompact && {isPreview ? 'Loading preview...' : 'Loading NFT...'}} + {!isCompact && (isPreview ? t`Loading preview...` : t`Loading NFT...`)} ) : !hasFile ? ( diff --git a/packages/gui/src/components/plot/add/PlotAddChoosePlotter.tsx b/packages/gui/src/components/plot/add/PlotAddChoosePlotter.tsx index 37c1a7b0ed..2ea8756ff0 100644 --- a/packages/gui/src/components/plot/add/PlotAddChoosePlotter.tsx +++ b/packages/gui/src/components/plot/add/PlotAddChoosePlotter.tsx @@ -67,10 +67,19 @@ export default function PlotAddChoosePlotter(props: Props) { } const plotterWarningString = (name: PlotterName | undefined): string | undefined => { - if (name === PlotterName.BLADEBIT_RAM) { - return plotters[PlotterName.BLADEBIT_RAM]?.installInfo?.bladebitMemoryWarning; + if (name !== PlotterName.BLADEBIT_RAM) { + return undefined; } - return undefined; + const msg = plotters[PlotterName.BLADEBIT_RAM]?.installInfo?.bladebitMemoryWarning; + if (!msg) { + return undefined; + } + const regex = /BladeBit requires at least (?\d*[.]?\d+) GiB of RAM to operate/; + const m = regex.exec(msg); + if (!m || !m.groups || !m.groups.ram) { + return t`Insufficient RAM for BladeBit`; + } + return t`BladeBit requires at least ${m.groups.ram} GiB of RAM to operate`; }; const warning = plotterWarningString(plotterName); @@ -101,11 +110,7 @@ export default function PlotAddChoosePlotter(props: Props) { ))} - {warning && ( - - {warning} - - )} + {warning && {warning}} diff --git a/packages/gui/src/components/settings/Settings.tsx b/packages/gui/src/components/settings/Settings.tsx index add1362bb6..192e2ebcf7 100644 --- a/packages/gui/src/components/settings/Settings.tsx +++ b/packages/gui/src/components/settings/Settings.tsx @@ -1,6 +1,6 @@ import { useLocalStorage } from '@chia-network/api-react'; import { Flex, LayoutDashboardSub, Mode, useMode } from '@chia-network/core'; -import { Trans } from '@lingui/macro'; +import { Trans, t } from '@lingui/macro'; import { Typography, Tab, Tabs } from '@mui/material'; import Badge from '@mui/material/Badge'; import React, { useMemo } from 'react'; @@ -26,24 +26,24 @@ export default function Settings() { const settingsTabs = useMemo(() => { let tabs = [ - { id: 'general', label: 'General', Component: SettingsGeneral, path: 'general' }, + { id: 'general', label: t`General`, Component: SettingsGeneral, path: 'general' }, { id: 'custody', - label: 'Custody', + label: t`Custody`, Component: SettingsCustody, path: 'custody', badge: wasSettingsCustodyVisited ? undefined : 'NEW', }, - { id: 'profiles', label: 'Profiles (DIDs)', Component: SettingsProfiles, path: 'profiles/*' }, - { id: 'nft', label: 'NFT', Component: SettingsNFT, path: 'nft' }, - { id: 'datalayer', label: 'DataLayer', Component: SettingsDataLayer, path: 'datalayer' }, - { id: 'harvester', label: 'Harvester', Component: SettingsHarvester, path: 'harvester' }, - { id: 'integration', label: 'Integration', Component: SettingsIntegration, path: 'integration' }, - { id: 'notifications', label: 'Notifications', Component: SettingsNotifications, path: 'notifications' }, - { id: 'advanced', label: 'Advanced', Component: SettingsAdvanced, path: 'advanced' }, + { id: 'profiles', label: t`Profiles (DIDs)`, Component: SettingsProfiles, path: 'profiles/*' }, + { id: 'nft', label: t`NFT`, Component: SettingsNFT, path: 'nft' }, + { id: 'datalayer', label: t`DataLayer`, Component: SettingsDataLayer, path: 'datalayer' }, + { id: 'harvester', label: t`Harvester`, Component: SettingsHarvester, path: 'harvester' }, + { id: 'integration', label: t`Integration`, Component: SettingsIntegration, path: 'integration' }, + { id: 'notifications', label: t`Notifications`, Component: SettingsNotifications, path: 'notifications' }, + { id: 'advanced', label: t`Advanced`, Component: SettingsAdvanced, path: 'advanced' }, ]; if (mode === Mode.WALLET) { - tabs = tabs.filter((t) => t.id !== 'harvester'); + tabs = tabs.filter((tab) => tab.id !== 'harvester'); } return tabs; }, [wasSettingsCustodyVisited, mode]); @@ -82,7 +82,7 @@ export default function Settings() { sx={{ '& .MuiTabs-flexContainer': { paddingTop: '10px' } }} > {settingsTabs.map((tab) => { - let TabLabel = {tab.label}; + let TabLabel: React.ReactNode = tab.label; if (tab.badge) { TabLabel = (