Rename processor

This commit is contained in:
Nicola Benaglia 2025-05-20 08:01:08 +02:00
parent 03e56f719f
commit 208e01b6db
11 changed files with 64 additions and 45 deletions

View File

@ -25,9 +25,9 @@ Translation in GUI:
These are the current namespaces, in which all translations are organized: These are the current namespaces, in which all translations are organized:
- `auth`: relative to the authentication (name, addresses, keys, secrets, seedphrase, and so on...) - `auth`: relative to the authentication (name, addresses, keys, secrets, seedphrase, and so on...)
- `core`: all the core translation (the most part) - `core`: all the core translation
- `group`: all translations concerning group management - `group`: all translations concerning group management
- `tutorial`: this is dedicated to the tutorial pages - `tutorial`: dedicated to the tutorial pages
Please avoid duplication of the same translation. Please avoid duplication of the same translation.
In the same page the usage of translations from different namespaces is permissible. In the same page the usage of translations from different namespaces is permissible.

View File

@ -2335,7 +2335,7 @@ function App() {
hostname: requestBuyOrder?.hostname, hostname: requestBuyOrder?.hostname,
count: requestBuyOrder?.crosschainAtInfo?.length || 0, count: requestBuyOrder?.crosschainAtInfo?.length || 0,
}} }}
tOptions={{ postProcess: ['capitalizeFirst'] }} tOptions={{ postProcess: ['capitalizeFirstChar'] }}
> >
The Application <br /> The Application <br />
<italic>{{ hostname }}</italic> <br /> <italic>{{ hostname }}</italic> <br />
@ -2446,7 +2446,7 @@ function App() {
hostname: requestBuyOrder?.hostname, hostname: requestBuyOrder?.hostname,
count: requestBuyOrder?.crosschainAtInfo?.length || 0, count: requestBuyOrder?.crosschainAtInfo?.length || 0,
}} }}
tOptions={{ postProcess: ['capitalizeFirst'] }} tOptions={{ postProcess: ['capitalizeFirstChar'] }}
> >
The Application <br /> The Application <br />
<italic>{{ hostname }}</italic> <br /> <italic>{{ hostname }}</italic> <br />
@ -2928,7 +2928,7 @@ function App() {
/> />
), ),
}} }}
tOptions={{ postProcess: ['capitalizeFirst'] }} tOptions={{ postProcess: ['capitalizeFirstChar'] }}
> >
A <seed>SEEDPHRASE</seed> has been randomly generated in A <seed>SEEDPHRASE</seed> has been randomly generated in
the background. the background.
@ -2965,7 +2965,7 @@ function App() {
/> />
), ),
}} }}
tOptions={{ postProcess: ['capitalizeFirst'] }} tOptions={{ postProcess: ['capitalizeFirstChar'] }}
> >
Create your Qortal account by clicking <next>NEXT</next>{' '} Create your Qortal account by clicking <next>NEXT</next>{' '}
below. below.

View File

@ -215,7 +215,9 @@ export const PollCard = ({
setIsOpen(true); setIsOpen(true);
}} }}
> >
{t('core:action.show_poll', { postProcess: 'capitalizeFirst' })} {t('core:action.show_poll', {
postProcess: 'capitalizeFirstChar',
})}
</Button> </Button>
</> </>
)} )}
@ -273,7 +275,7 @@ export const PollCard = ({
fontSize: '18px', fontSize: '18px',
}} }}
> >
{t('core:option_other', { postProcess: 'capitalizeFirst' })} {t('core:option_other', { postProcess: 'capitalizeFirstChar' })}
</Typography> </Typography>
<RadioGroup <RadioGroup
@ -308,7 +310,7 @@ export const PollCard = ({
disabled={!selectedOption || isLoadingSubmit} disabled={!selectedOption || isLoadingSubmit}
onClick={handleVote} onClick={handleVote}
> >
{t('core:action.vote', { postProcess: 'capitalizeFirst' })} {t('core:action.vote', { postProcess: 'capitalizeFirstChar' })}
</Button> </Button>
<Typography <Typography
@ -337,7 +339,7 @@ export const PollCard = ({
}} }}
> >
{t('core:message.generic.already_voted', { {t('core:message.generic.already_voted', {
postProcess: 'capitalizeFirst', postProcess: 'capitalizeFirstChar',
})} })}
</Typography> </Typography>
@ -350,7 +352,7 @@ export const PollCard = ({
}} }}
> >
{t('core:message.generic.processing_transaction', { {t('core:message.generic.processing_transaction', {
postProcess: 'capitalizeFirst', postProcess: 'capitalizeFirstChar',
})} })}
</Typography> </Typography>
)} )}
@ -361,8 +363,8 @@ export const PollCard = ({
}} }}
> >
{showResults {showResults
? t('core:action.hide', { postProcess: 'capitalizeFirst' }) ? t('core:action.hide', { postProcess: 'capitalizeFirstChar' })
: t('core:action.close', { postProcess: 'capitalizeFirst' })} : t('core:action.close', { postProcess: 'capitalizeFirstChar' })}
</ButtonBase> </ButtonBase>
</CardContent> </CardContent>

View File

@ -190,7 +190,7 @@ export const AddGroupList = ({ setInfoSnack, setOpenSnack }) => {
message: message:
error.message || error.message ||
t('core:message.error.generic', { t('core:message.error.generic', {
postProcess: 'capitalizeFirst', postProcess: 'capitalizeFirstChar',
}), }),
}); });
setOpenSnack(true); setOpenSnack(true);

View File

@ -99,7 +99,7 @@ export const BlockedUsersModal = () => {
if (!data?.owner) if (!data?.owner)
throw new Error( throw new Error(
t('auth:message.error.name_not_existing', { t('auth:message.error.name_not_existing', {
postProcess: 'capitalizeFirst', postProcess: 'capitalizeFirstChar',
}) })
); );
if (data?.owner) { if (data?.owner) {
@ -138,9 +138,12 @@ export const BlockedUsersModal = () => {
} catch (error) { } catch (error) {
setOpenSnackGlobal(true); setOpenSnackGlobal(true);
setInfoSnackCustom({ setInfoSnackCustom({
//TODO translate
type: 'error', type: 'error',
message: error?.message || 'Unable to block user', message:
error?.message ||
t('auth:message.error.unable_block_user', {
postProcess: 'capitalizeFirstChar',
}),
}); });
} }
}; };
@ -168,7 +171,9 @@ export const BlockedUsersModal = () => {
aria-labelledby="alert-dialog-title" aria-labelledby="alert-dialog-title"
aria-describedby="alert-dialog-description" aria-describedby="alert-dialog-description"
> >
<DialogTitle>Blocked Users</DialogTitle> <DialogTitle>
{t('auth:blocked_users', { postProcess: 'capitalizeFirstChar' })}
</DialogTitle>
<DialogContent <DialogContent
sx={{ sx={{
padding: '20px', padding: '20px',

View File

@ -130,7 +130,7 @@ export const ListOfBans = ({ groupId, setInfoSnack, setOpenSnack, show }) => {
message: message:
error.message || error.message ||
t('core:message.error.generic', { t('core:message.error.generic', {
postProcess: 'capitalizeFirst', postProcess: 'capitalizeFirstChar',
}), }),
}); });
setOpenSnack(true); setOpenSnack(true);

View File

@ -90,7 +90,9 @@ export const WalletsAppWrapper = () => {
}} }}
> >
<Typography> <Typography>
{t('core:q_apps.q_wallets', { postProcess: 'capitalizeFirst' })} {t('core:q_apps.q_wallets', {
postProcess: 'capitalizeFirstChar',
})}
</Typography> </Typography>
<ButtonBase onClick={handleClose}> <ButtonBase onClick={handleClose}>

View File

@ -106,7 +106,7 @@ export const MainAvatar = ({ myName, balance, setOpenSnack, setInfoSnack }) => {
rej( rej(
error.message || error.message ||
t('core:message.error.generic', { t('core:message.error.generic', {
postProcess: 'capitalizeFirst', postProcess: 'capitalizeFirstChar',
}) })
); );
}); });

View File

@ -68,7 +68,7 @@ export const UserLookup = ({ isOpenDrawerLookup, setIsOpenDrawerLookup }) => {
if (!inputAddressOrName?.trim()) if (!inputAddressOrName?.trim())
throw new Error( throw new Error(
t('auth:action.insert_name_address', { t('auth:action.insert_name_address', {
postProcess: 'capitalizeFirst', postProcess: 'capitalizeFirstChar',
}) })
); );
@ -76,7 +76,7 @@ export const UserLookup = ({ isOpenDrawerLookup, setIsOpenDrawerLookup }) => {
if (!owner) if (!owner)
throw new Error( throw new Error(
t('auth:message.error.name_not_existing', { t('auth:message.error.name_not_existing', {
postProcess: 'capitalizeFirst', postProcess: 'capitalizeFirstChar',
}) })
); );
@ -84,7 +84,7 @@ export const UserLookup = ({ isOpenDrawerLookup, setIsOpenDrawerLookup }) => {
if (!addressInfoRes?.publicKey) { if (!addressInfoRes?.publicKey) {
throw new Error( throw new Error(
t('auth:message.error.address_not_existing', { t('auth:message.error.address_not_existing', {
postProcess: 'capitalizeFirst', postProcess: 'capitalizeFirstChar',
}) })
); );
} }
@ -192,7 +192,7 @@ export const UserLookup = ({ isOpenDrawerLookup, setIsOpenDrawerLookup }) => {
autoComplete="off" autoComplete="off"
{...params} {...params}
label={t('auth:address_name', { label={t('auth:address_name', {
postProcess: 'capitalizeFirst', postProcess: 'capitalizeFirstChar',
})} })}
onKeyDown={(e) => { onKeyDown={(e) => {
if (e.key === 'Enter' && nameOrAddress) { if (e.key === 'Enter' && nameOrAddress) {
@ -288,7 +288,7 @@ export const UserLookup = ({ isOpenDrawerLookup, setIsOpenDrawerLookup }) => {
> >
{addressInfo?.name ?? {addressInfo?.name ??
t('auth:message.error.name_not_registered', { t('auth:message.error.name_not_registered', {
postProcess: 'capitalizeFirst', postProcess: 'capitalizeFirstChar',
})} })}
</Typography> </Typography>
@ -331,7 +331,7 @@ export const UserLookup = ({ isOpenDrawerLookup, setIsOpenDrawerLookup }) => {
textAlign: 'center', textAlign: 'center',
}} }}
> >
{t('core:level', { postProcess: 'capitalizeFirst' })}{' '} {t('core:level', { postProcess: 'capitalizeFirstChar' })}{' '}
{addressInfo?.level} {addressInfo?.level}
</Typography> </Typography>
</Card> </Card>
@ -362,7 +362,9 @@ export const UserLookup = ({ isOpenDrawerLookup, setIsOpenDrawerLookup }) => {
}} }}
> >
<Typography> <Typography>
{t('auth:address', { postProcess: 'capitalizeFirst' })} {t('auth:address', {
postProcess: 'capitalizeFirstChar',
})}
</Typography> </Typography>
</Box> </Box>
@ -376,7 +378,7 @@ export const UserLookup = ({ isOpenDrawerLookup, setIsOpenDrawerLookup }) => {
}} }}
> >
{t('auth:action.copy_address', { {t('auth:action.copy_address', {
postProcess: 'capitalizeFirst', postProcess: 'capitalizeFirstChar',
})} })}
</span> </span>
} }
@ -422,7 +424,9 @@ export const UserLookup = ({ isOpenDrawerLookup, setIsOpenDrawerLookup }) => {
}} }}
> >
<Typography> <Typography>
{t('core:balance', { postProcess: 'capitalizeFirst' })} {t('core:balance', {
postProcess: 'capitalizeFirstChar',
})}
</Typography> </Typography>
<Typography>{addressInfo?.balance}</Typography> <Typography>{addressInfo?.balance}</Typography>
@ -440,7 +444,7 @@ export const UserLookup = ({ isOpenDrawerLookup, setIsOpenDrawerLookup }) => {
}} }}
> >
{t('core:action.send_qort', { {t('core:action.send_qort', {
postProcess: 'capitalizeFirst', postProcess: 'capitalizeFirstChar',
})} })}
</Button> </Button>
</Card> </Card>
@ -478,7 +482,7 @@ export const UserLookup = ({ isOpenDrawerLookup, setIsOpenDrawerLookup }) => {
<Typography> <Typography>
{t('core:message.generic.most_recent_payment', { {t('core:message.generic.most_recent_payment', {
count: 20, count: 20,
postProcess: 'capitalizeFirst', postProcess: 'capitalizeFirstChar',
})} })}
</Typography> </Typography>
@ -494,7 +498,7 @@ export const UserLookup = ({ isOpenDrawerLookup, setIsOpenDrawerLookup }) => {
> >
<Typography> <Typography>
{t('core:message.generic.no_payments', { {t('core:message.generic.no_payments', {
postProcess: 'capitalizeFirst', postProcess: 'capitalizeFirstChar',
})} })}
</Typography> </Typography>
</Box> </Box>
@ -504,16 +508,20 @@ export const UserLookup = ({ isOpenDrawerLookup, setIsOpenDrawerLookup }) => {
<TableHead> <TableHead>
<TableRow> <TableRow>
<TableCell> <TableCell>
{t('core:sender', { postProcess: 'capitalizeFirst' })} {t('core:sender', { postProcess: 'capitalizeFirstChar' })}
</TableCell> </TableCell>
<TableCell> <TableCell>
{t('core:receiver', { postProcess: 'capitalizeFirst' })} {t('core:receiver', {
postProcess: 'capitalizeFirstChar',
})}
</TableCell> </TableCell>
<TableCell> <TableCell>
{t('core:amount', { postProcess: 'capitalizeFirst' })} {t('core:amount', { postProcess: 'capitalizeFirstChar' })}
</TableCell> </TableCell>
<TableCell> <TableCell>
{t('core:time.time', { postProcess: 'capitalizeFirst' })} {t('core:time.time', {
postProcess: 'capitalizeFirstChar',
})}
</TableCell> </TableCell>
</TableRow> </TableRow>
</TableHead> </TableHead>
@ -532,7 +540,7 @@ export const UserLookup = ({ isOpenDrawerLookup, setIsOpenDrawerLookup }) => {
}} }}
> >
{t('auth:action.copy_address', { {t('auth:action.copy_address', {
postProcess: 'capitalizeFirst', postProcess: 'capitalizeFirstChar',
})} })}
</span> </span>
} }
@ -577,7 +585,7 @@ export const UserLookup = ({ isOpenDrawerLookup, setIsOpenDrawerLookup }) => {
}} }}
> >
{t('auth:action.copy_address', { {t('auth:action.copy_address', {
postProcess: 'capitalizeFirst', postProcess: 'capitalizeFirstChar',
})} })}
</span> </span>
} }

View File

@ -98,7 +98,7 @@ export const WrapperUserAction = ({ children, address, name, disabled }) => {
justifyContent: 'flex-start', justifyContent: 'flex-start',
}} }}
> >
{t('core:message.message', { postProcess: 'capitalizeFirst' })} {t('core:message.message', { postProcess: 'capitalizeFirstChar' })}
</Button> </Button>
{/* Option 2: Send QORT */} {/* Option 2: Send QORT */}
@ -117,7 +117,7 @@ export const WrapperUserAction = ({ children, address, name, disabled }) => {
}} }}
> >
{t('core:action.send_qort', { {t('core:action.send_qort', {
postProcess: 'capitalizeFirst', postProcess: 'capitalizeFirstChar',
})} })}
</Button> </Button>
@ -133,7 +133,7 @@ export const WrapperUserAction = ({ children, address, name, disabled }) => {
}} }}
> >
{t('auth:action.copy_address', { {t('auth:action.copy_address', {
postProcess: 'capitalizeFirst', postProcess: 'capitalizeFirstChar',
})} })}
</Button> </Button>
@ -151,7 +151,7 @@ export const WrapperUserAction = ({ children, address, name, disabled }) => {
}} }}
> >
{t('core:user_lookup', { {t('core:user_lookup', {
postProcess: 'capitalizeFirst', postProcess: 'capitalizeFirstChar',
})} })}
</Button> </Button>
@ -208,8 +208,8 @@ const BlockUser = ({ address, name, handleClose }) => {
<CircularProgress color="secondary" size={24} /> <CircularProgress color="secondary" size={24} />
)} )}
{isAlreadyBlocked && {isAlreadyBlocked &&
t('core:action.unblock_name', { postProcess: 'capitalizeFirst' })} t('core:action.unblock_name', { postProcess: 'capitalizeFirstChar' })}
{isAlreadyBlocked === false && t('core:action.block_name', { postProcess: 'capitalizeFirst' })}} {isAlreadyBlocked === false && t('core:action.block_name', { postProcess: 'capitalizeFirstChar' })}}
</Button> </Button>
); );
}; };

View File

@ -35,6 +35,7 @@
"key": "API key", "key": "API key",
"select_valid": "select a valid apikey" "select_valid": "select a valid apikey"
}, },
"blocked_users": "blocked users",
"build_version": "build version", "build_version": "build version",
"message": { "message": {
"error": { "error": {
@ -46,6 +47,7 @@
"invalid_secret_key": "secretKey is not valid", "invalid_secret_key": "secretKey is not valid",
"name_not_existing": "name does not exist", "name_not_existing": "name does not exist",
"name_not_registered": "name not registered", "name_not_registered": "name not registered",
"unable_block_user": "unable to block user",
"unable_decrypt": "unable to decrypt", "unable_decrypt": "unable to decrypt",
"unable_reencrypt_secret_key": "unable to re-encrypt secret key" "unable_reencrypt_secret_key": "unable to re-encrypt secret key"
}, },