Translate wallet

This commit is contained in:
Nicola Benaglia 2025-05-12 08:30:31 +02:00
parent 8b22e65646
commit 2abb9d1c46
3 changed files with 71 additions and 20 deletions

View File

@ -294,7 +294,7 @@ export const Wallets = ({ setExtState, setRawWallet, rawWallet }) => {
display: 'inline', display: 'inline',
}} }}
> >
Add seed-phrase {t('auth:action.add.seed_phrase', { postProcess: 'capitalize' })}
</CustomButton> </CustomButton>
</HtmlTooltip> </HtmlTooltip>
@ -308,9 +308,9 @@ export const Wallets = ({ setExtState, setRawWallet, rawWallet }) => {
fontSize: '16px', fontSize: '16px',
}} }}
> >
Use this option to connect additional Qortal wallets you've {t('auth:tips.additional_wallet', {
already made, in order to login with them afterwards. You will postProcess: 'capitalize',
need access to your backup JSON file in order to do so. })}
</Typography> </Typography>
</Fragment> </Fragment>
} }
@ -322,7 +322,9 @@ export const Wallets = ({ setExtState, setRawWallet, rawWallet }) => {
{...getRootProps()} {...getRootProps()}
> >
<input {...getInputProps()} /> <input {...getInputProps()} />
Add account {t('auth:action.add.account', {
postProcess: 'capitalize',
})}
</CustomButton> </CustomButton>
</HtmlTooltip> </HtmlTooltip>
</Box> </Box>
@ -338,7 +340,9 @@ export const Wallets = ({ setExtState, setRawWallet, rawWallet }) => {
}} }}
> >
<DialogTitle id="alert-dialog-title"> <DialogTitle id="alert-dialog-title">
Type or paste in your seed-phrase {t('auth:message.generic.type_seed', {
postProcess: 'capitalize',
})}
</DialogTitle> </DialogTitle>
<DialogContent> <DialogContent>
@ -346,9 +350,13 @@ export const Wallets = ({ setExtState, setRawWallet, rawWallet }) => {
sx={{ sx={{
display: 'flex', display: 'flex',
flexDirection: 'column', flexDirection: 'column',
}} // TODO translate }}
> >
<Label>Name</Label> <Label>
{t('auth:name', {
postProcess: 'capitalize',
})}
</Label>
<Input <Input
placeholder="Name" placeholder="Name"
value={seedName} value={seedName}
@ -357,7 +365,11 @@ export const Wallets = ({ setExtState, setRawWallet, rawWallet }) => {
<Spacer height="7px" /> <Spacer height="7px" />
<Label>Seed-phrase</Label> <Label>
{t('auth:seed', {
postProcess: 'capitalize',
})}
</Label>
<PasswordField <PasswordField
placeholder="Seed-phrase" placeholder="Seed-phrase"
id="standard-adornment-password" id="standard-adornment-password"
@ -371,7 +383,11 @@ export const Wallets = ({ setExtState, setRawWallet, rawWallet }) => {
<Spacer height="7px" /> <Spacer height="7px" />
<Label>Choose new password</Label> <Label>
{t('auth:action.choose_password', {
postProcess: 'capitalize',
})}
</Label>
<PasswordField <PasswordField
id="standard-adornment-password" id="standard-adornment-password"
value={password} value={password}
@ -383,6 +399,7 @@ export const Wallets = ({ setExtState, setRawWallet, rawWallet }) => {
/> />
</Box> </Box>
</DialogContent> </DialogContent>
<DialogActions> <DialogActions>
<Button <Button
disabled={isLoadingEncryptSeed} disabled={isLoadingEncryptSeed}
@ -395,7 +412,9 @@ export const Wallets = ({ setExtState, setRawWallet, rawWallet }) => {
setSeedError(''); setSeedError('');
}} }}
> >
Close {t('core:action.close', {
postProcess: 'capitalize',
})}
</Button> </Button>
<LoadingButton <LoadingButton
loading={isLoadingEncryptSeed} loading={isLoadingEncryptSeed}
@ -407,7 +426,9 @@ export const Wallets = ({ setExtState, setRawWallet, rawWallet }) => {
}} }}
autoFocus autoFocus
> >
Add {t('core:action.add', {
postProcess: 'capitalize',
})}
</LoadingButton> </LoadingButton>
<Typography <Typography
sx={{ sx={{
@ -428,6 +449,7 @@ const WalletItem = ({ wallet, updateWalletItem, idx, setSelectedWallet }) => {
const [note, setNote] = useState(''); const [note, setNote] = useState('');
const [isEdit, setIsEdit] = useState(false); const [isEdit, setIsEdit] = useState(false);
const theme = useTheme(); const theme = useTheme();
const { t } = useTranslation(['core', 'auth']);
useEffect(() => { useEffect(() => {
if (wallet?.name) { if (wallet?.name) {
@ -463,6 +485,7 @@ const WalletItem = ({ wallet, updateWalletItem, idx, setSelectedWallet }) => {
<ListItemAvatar> <ListItemAvatar>
<Avatar alt="" src="/static/images/avatar/1.jpg" /> <Avatar alt="" src="/static/images/avatar/1.jpg" />
</ListItemAvatar> </ListItemAvatar>
<ListItemText <ListItemText
primary={ primary={
wallet?.name wallet?.name
@ -492,7 +515,9 @@ const WalletItem = ({ wallet, updateWalletItem, idx, setSelectedWallet }) => {
marginTop: '5px', marginTop: '5px',
}} }}
> >
Login {t('core:action.login', {
postProcess: 'capitalize',
})}
</Typography> </Typography>
</Box> </Box>
} }
@ -519,7 +544,11 @@ const WalletItem = ({ wallet, updateWalletItem, idx, setSelectedWallet }) => {
padding: '8px', padding: '8px',
}} }}
> >
<Label>Name</Label> <Label>
{t('auth:name', {
postProcess: 'capitalize',
})}
</Label>
<Input <Input
placeholder="Name" placeholder="Name"
value={name} value={name}
@ -531,7 +560,11 @@ const WalletItem = ({ wallet, updateWalletItem, idx, setSelectedWallet }) => {
<Spacer height="10px" /> <Spacer height="10px" />
<Label>Note</Label> <Label>
{t('auth:note', {
postProcess: 'capitalize',
})}
</Label>
<Input <Input
placeholder="Note" placeholder="Note"
value={note} value={note}
@ -559,7 +592,9 @@ const WalletItem = ({ wallet, updateWalletItem, idx, setSelectedWallet }) => {
variant="contained" variant="contained"
onClick={() => setIsEdit(false)} onClick={() => setIsEdit(false)}
> >
Close {t('core:action.close', {
postProcess: 'capitalize',
})}
</Button> </Button>
<Button <Button
sx={{ sx={{
@ -575,7 +610,9 @@ const WalletItem = ({ wallet, updateWalletItem, idx, setSelectedWallet }) => {
variant="contained" variant="contained"
onClick={() => updateWalletItem(idx, null)} onClick={() => updateWalletItem(idx, null)}
> >
Remove {t('core:action.remove', {
postProcess: 'capitalize',
})}
</Button> </Button>
<Button <Button
sx={{ sx={{
@ -598,7 +635,9 @@ const WalletItem = ({ wallet, updateWalletItem, idx, setSelectedWallet }) => {
setIsEdit(false); setIsEdit(false);
}} }}
> >
Save {t('core:action.save', {
postProcess: 'capitalize',
})}
</Button> </Button>
</Box> </Box>
</Box> </Box>

View File

@ -6,9 +6,13 @@
"selected": "selected account" "selected": "selected account"
}, },
"action": { "action": {
"add_seed_phrase": "add seed-phrase", "add": {
"account": "add account",
"seed_phrase": "add seed-phrase"
},
"authenticate": "authenticate", "authenticate": "authenticate",
"create_account": "create account", "create_account": "create account",
"choose_password": "choose new password",
"download_account": "download account", "download_account": "download account",
"return_to_list": "return to list" "return_to_list": "return to list"
}, },
@ -29,9 +33,11 @@
"generic": { "generic": {
"no_account": "No accounts saved", "no_account": "No accounts saved",
"keep_secure": "keep your account file secure", "keep_secure": "keep your account file secure",
"type_seed": "type or paste in your seed-phrase",
"your_accounts": "your saved accounts" "your_accounts": "your saved accounts"
} }
}, },
"name": "name",
"node": { "node": {
"choose": "choose custom node", "choose": "choose custom node",
"custom_many": "custom nodes", "custom_many": "custom nodes",
@ -40,9 +46,12 @@
"using": "using node", "using": "using node",
"using_public": "using public node" "using_public": "using public node"
}, },
"note": "note",
"password": "password", "password": "password",
"password_confirmation": "confirm password", "password_confirmation": "confirm password",
"seed": "seed phrase",
"tips": { "tips": {
"additional_wallet": "use this option to connect additional Qortal wallets you've already made, in order to login with them afterwards. You will need access to your backup JSON file in order to do so.",
"digital_id": "your wallet is like your digital ID on Qortal, and is how you will login to the Qortal User Interface. It holds your public address and the Qortal name you will eventually choose. Every transaction you make is linked to your ID, and this is where you manage all your QORT and other tradeable cryptocurrencies on Qortal.", "digital_id": "your wallet is like your digital ID on Qortal, and is how you will login to the Qortal User Interface. It holds your public address and the Qortal name you will eventually choose. Every transaction you make is linked to your ID, and this is where you manage all your QORT and other tradeable cryptocurrencies on Qortal.",
"existing_account": "already have a Qortal account? Enter your secret backup phrase here to access it. This phrase is one of the ways to recover your account.", "existing_account": "already have a Qortal account? Enter your secret backup phrase here to access it. This phrase is one of the ways to recover your account.",
"new_account": "creating an account means creating a new wallet and digital ID to start using Qortal. Once you have made your account, you can start doing things like obtaining some QORT, buying a name and avatar, publishing videos and blogs, and much more.", "new_account": "creating an account means creating a new wallet and digital ID to start using Qortal. Once you have made your account, you can start doing things like obtaining some QORT, buying a name and avatar, publishing videos and blogs, and much more.",

View File

@ -20,6 +20,7 @@
"import": "import", "import": "import",
"invite": "invite", "invite": "invite",
"join": "join", "join": "join",
"login": "login",
"logout": "logout", "logout": "logout",
"new": { "new": {
"post": "new post", "post": "new post",
@ -28,7 +29,9 @@
"notify": "notify", "notify": "notify",
"post": "post", "post": "post",
"post_message": "post message", "post_message": "post message",
"publish": "publish" "publish": "publish",
"remove": "remove",
"save": "save"
}, },
"admin": "admin", "admin": "admin",
"core": { "core": {