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:
- `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
- `tutorial`: this is dedicated to the tutorial pages
- `tutorial`: dedicated to the tutorial pages
Please avoid duplication of the same translation.
In the same page the usage of translations from different namespaces is permissible.

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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