From c5ff69b2f7d3137107b721efecae35337993312e Mon Sep 17 00:00:00 2001 From: Nicola Benaglia Date: Wed, 14 May 2025 21:47:39 +0200 Subject: [PATCH] Add minting translations --- src/App.tsx | 1 + src/components/Group/AddGroup.tsx | 2 +- src/components/Minting/Minting.tsx | 46 ++++++++++++++++++++++-------- src/i18n/locales/en/core.json | 4 ++- src/i18n/locales/en/group.json | 3 ++ 5 files changed, 42 insertions(+), 14 deletions(-) diff --git a/src/App.tsx b/src/App.tsx index 07b915c..17dea23 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -1778,6 +1778,7 @@ function App() { + {extState === 'authenticated' && ( )} diff --git a/src/components/Group/AddGroup.tsx b/src/components/Group/AddGroup.tsx index f9cbbf8..8b91ebe 100644 --- a/src/components/Group/AddGroup.tsx +++ b/src/components/Group/AddGroup.tsx @@ -536,7 +536,7 @@ export const AddGroup = ({ address, open, setOpen }) => { {t('core:time.hour', { count: 1 })} - 3{t('core:time.hour', { count: 3 })} + {t('core:time.hour', { count: 3 })} {t('core:time.hour', { count: 5 })} diff --git a/src/components/Minting/Minting.tsx b/src/components/Minting/Minting.tsx index c84ffdb..2ee2508 100644 --- a/src/components/Minting/Minting.tsx +++ b/src/components/Minting/Minting.tsx @@ -21,7 +21,7 @@ import { subscribeToEvent, unsubscribeFromEvent, } from '../../utils/events'; -import { getFee, getNameOrAddress } from '../../background'; +import { getFee } from '../../background'; import { Spacer } from '../../common/Spacer'; import { FidgetSpinner } from 'react-loader-spinner'; import { useModal } from '../../common/useModal'; @@ -658,18 +658,34 @@ export const Minting = ({ setIsOpenMinting, myAddress, show }) => { sx={{ backgroundColor: theme.palette.background.default, padding: '10px', - }} // TODO translate + }} > - Account: {handleNames(accountInfo?.address)} - - Level: {accountInfo?.level} - - blocks remaining until next level: {_levelUpBlocks()} + {t('auth:account.account_one', { + postProcess: 'capitalize', + })} + : {handleNames(accountInfo?.address)} - This node is minting: {nodeInfos?.isMintingPossible?.toString()} + {t('core:level', { + postProcess: 'capitalize', + })} + : {accountInfo?.level} + + + + {t('group:message.generic.next_level', { + postProcess: 'capitalize', + })}{' '} + {_levelUpBlocks()} + + + + {t('group:message.generic.node_minting', { + postProcess: 'capitalize', + })}{' '} + {nodeInfos?.isMintingPossible?.toString()} @@ -706,12 +722,16 @@ export const Minting = ({ setIsOpenMinting, myAddress, show }) => { }} variant="contained" > - Start minting + {t('core:action.start_minting', { + postProcess: 'capitalize', + })} + {mintingAccounts?.length > 1 && ( - Only 2 minting keys are allowed per node. Please remove one if - you would like to mint with this account. + {t('group:message.generic.minting_keys_per_node', { + postProcess: 'capitalize', + })} )} @@ -720,7 +740,7 @@ export const Minting = ({ setIsOpenMinting, myAddress, show }) => { {mintingAccounts?.length > 0 && ( - Node's minting accounts + Node's minting accounts // TODO translate )} { )} + + {mintingAccounts?.map((acct) => (