Add minting translations

This commit is contained in:
Nicola Benaglia 2025-05-14 21:47:39 +02:00
parent 37a2694678
commit c5ff69b2f7
5 changed files with 42 additions and 14 deletions

View File

@ -1778,6 +1778,7 @@ function App() {
<QMailStatus /> <QMailStatus />
<Spacer height="20px" /> <Spacer height="20px" />
{extState === 'authenticated' && ( {extState === 'authenticated' && (
<GeneralNotifications address={userInfo?.address} /> <GeneralNotifications address={userInfo?.address} />
)} )}

View File

@ -536,7 +536,7 @@ export const AddGroup = ({ address, open, setOpen }) => {
{t('core:time.hour', { count: 1 })} {t('core:time.hour', { count: 1 })}
</MenuItem> </MenuItem>
<MenuItem value={180}> <MenuItem value={180}>
3{t('core:time.hour', { count: 3 })} {t('core:time.hour', { count: 3 })}
</MenuItem> </MenuItem>
<MenuItem value={300}> <MenuItem value={300}>
{t('core:time.hour', { count: 5 })} {t('core:time.hour', { count: 5 })}

View File

@ -21,7 +21,7 @@ import {
subscribeToEvent, subscribeToEvent,
unsubscribeFromEvent, unsubscribeFromEvent,
} from '../../utils/events'; } from '../../utils/events';
import { getFee, getNameOrAddress } from '../../background'; import { getFee } from '../../background';
import { Spacer } from '../../common/Spacer'; import { Spacer } from '../../common/Spacer';
import { FidgetSpinner } from 'react-loader-spinner'; import { FidgetSpinner } from 'react-loader-spinner';
import { useModal } from '../../common/useModal'; import { useModal } from '../../common/useModal';
@ -658,18 +658,34 @@ export const Minting = ({ setIsOpenMinting, myAddress, show }) => {
sx={{ sx={{
backgroundColor: theme.palette.background.default, backgroundColor: theme.palette.background.default,
padding: '10px', padding: '10px',
}} // TODO translate }}
> >
<Typography>Account: {handleNames(accountInfo?.address)}</Typography>
<Typography>Level: {accountInfo?.level}</Typography>
<Typography> <Typography>
blocks remaining until next level: {_levelUpBlocks()} {t('auth:account.account_one', {
postProcess: 'capitalize',
})}
: {handleNames(accountInfo?.address)}
</Typography> </Typography>
<Typography> <Typography>
This node is minting: {nodeInfos?.isMintingPossible?.toString()} {t('core:level', {
postProcess: 'capitalize',
})}
: {accountInfo?.level}
</Typography>
<Typography>
{t('group:message.generic.next_level', {
postProcess: 'capitalize',
})}{' '}
{_levelUpBlocks()}
</Typography>
<Typography>
{t('group:message.generic.node_minting', {
postProcess: 'capitalize',
})}{' '}
{nodeInfos?.isMintingPossible?.toString()}
</Typography> </Typography>
</Card> </Card>
@ -706,12 +722,16 @@ export const Minting = ({ setIsOpenMinting, myAddress, show }) => {
}} }}
variant="contained" variant="contained"
> >
Start minting {t('core:action.start_minting', {
postProcess: 'capitalize',
})}
</Button> </Button>
{mintingAccounts?.length > 1 && ( {mintingAccounts?.length > 1 && (
<Typography> <Typography>
Only 2 minting keys are allowed per node. Please remove one if {t('group:message.generic.minting_keys_per_node', {
you would like to mint with this account. postProcess: 'capitalize',
})}
</Typography> </Typography>
)} )}
</Box> </Box>
@ -720,7 +740,7 @@ export const Minting = ({ setIsOpenMinting, myAddress, show }) => {
<Spacer height="10px" /> <Spacer height="10px" />
{mintingAccounts?.length > 0 && ( {mintingAccounts?.length > 0 && (
<Typography>Node's minting accounts</Typography> <Typography>Node's minting accounts</Typography> // TODO translate
)} )}
<Card <Card
sx={{ sx={{
@ -742,7 +762,9 @@ export const Minting = ({ setIsOpenMinting, myAddress, show }) => {
</Typography> </Typography>
</Box> </Box>
)} )}
<Spacer height="10px" /> <Spacer height="10px" />
{mintingAccounts?.map((acct) => ( {mintingAccounts?.map((acct) => (
<Box <Box
key={acct?.mintingAccount} key={acct?.mintingAccount}

View File

@ -31,7 +31,8 @@
"post_message": "post message", "post_message": "post message",
"publish": "publish", "publish": "publish",
"remove": "remove", "remove": "remove",
"save": "save" "save": "save",
"start_minting": "start minting"
}, },
"admin": "admin", "admin": "admin",
"core": { "core": {
@ -55,6 +56,7 @@
}, },
"general_settings": "general settings", "general_settings": "general settings",
"last_height": "last height", "last_height": "last height",
"level": "level",
"list": { "list": {
"invite": "invite list", "invite": "invite list",
"join_request": "join request list", "join_request": "join request list",

View File

@ -63,6 +63,9 @@
"loading_members": "loading member list with names... please wait.", "loading_members": "loading member list with names... please wait.",
"max_chars": " Max 200 characters. Publish Fee", "max_chars": " Max 200 characters. Publish Fee",
"manage_minting": "manage your minting", "manage_minting": "manage your minting",
"minting_keys_per_node": "only 2 minting keys are allowed per node. Please remove one if you would like to mint with this account.",
"next_level": "blocks remaining until next level:",
"node_minting": "This node is minting:",
"no_display": "nothing to display", "no_display": "nothing to display",
"no_selection": "no group selected", "no_selection": "no group selected",
"not_part_group": "you are not part of the encrypted group of members. Wait until an admin re-encrypts the keys.", "not_part_group": "you are not part of the encrypted group of members. Wait until an admin re-encrypts the keys.",