mirror of
https://github.com/Qortal/Qortal-Hub.git
synced 2025-06-06 16:36:58 +00:00
Merge pull request #47 from nbenaglia/feature/i18n-apps-pages
i18n: Add translations for apps
This commit is contained in:
commit
af65881784
@ -7,4 +7,4 @@ In JSON file:
|
||||
|
||||
In GUI:
|
||||
|
||||
- If the first letter of the translation must be uppercase, use the postProcess, for example: `{t_auth('advanced_users', { postProcess: 'capitalize' })}`
|
||||
- If the first letter of the translation must be uppercase, use the postProcess, for example: `{t_auth('advanced_users', { postProcess: 'capitalizeFirst' })}`
|
||||
|
56
src/App.tsx
56
src/App.tsx
@ -2514,7 +2514,9 @@ function App() {
|
||||
setExtstate('create-wallet');
|
||||
}}
|
||||
>
|
||||
{t('auth:action.create_account', { postProcess: 'capitalize' })}
|
||||
{t('auth:action.create_account', {
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
</CustomButton>
|
||||
</>
|
||||
)}
|
||||
@ -2611,7 +2613,9 @@ function App() {
|
||||
fontWeight: 600,
|
||||
}}
|
||||
>
|
||||
{t('auth:action.authenticate', { postProcess: 'capitalize' })}
|
||||
{t('auth:action.authenticate', {
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
</TextP>
|
||||
</Box>
|
||||
|
||||
@ -2619,7 +2623,7 @@ function App() {
|
||||
|
||||
<>
|
||||
<CustomLabel htmlFor="standard-adornment-password">
|
||||
{t('auth:wallet.password', { postProcess: 'capitalize' })}
|
||||
{t('auth:wallet.password', { postProcess: 'capitalizeFirst' })}
|
||||
</CustomLabel>
|
||||
|
||||
<Spacer height="5px" />
|
||||
@ -2643,7 +2647,7 @@ function App() {
|
||||
fontSize: '12px',
|
||||
}}
|
||||
>
|
||||
{t('auth:node.using', { postProcess: 'capitalize' })}:{' '}
|
||||
{t('auth:node.using', { postProcess: 'capitalizeFirst' })}:{' '}
|
||||
{currentNode?.url}
|
||||
</Typography>
|
||||
</>
|
||||
@ -2655,7 +2659,9 @@ function App() {
|
||||
fontSize: '12px',
|
||||
}}
|
||||
>
|
||||
{t('auth:node.using_public', { postProcess: 'capitalize' })}
|
||||
{t('auth:node.using_public', {
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
</Typography>
|
||||
</>
|
||||
)}
|
||||
@ -2663,7 +2669,9 @@ function App() {
|
||||
<Spacer height="20px" />
|
||||
|
||||
<CustomButton onClick={authenticateWallet}>
|
||||
{t('auth:action.authenticate', { postProcess: 'capitalize' })}
|
||||
{t('auth:action.authenticate', {
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
</CustomButton>
|
||||
|
||||
<ErrorText>{walletToBeDecryptedError}</ErrorText>
|
||||
@ -2932,7 +2940,7 @@ function App() {
|
||||
|
||||
<CustomButton onClick={createAccountFunc}>
|
||||
{t('auth:action.create_account', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
</CustomButton>
|
||||
</Box>
|
||||
@ -2978,7 +2986,7 @@ function App() {
|
||||
}}
|
||||
>
|
||||
{t('core:action.backup_account', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
</CustomButton>
|
||||
</>
|
||||
@ -3008,7 +3016,7 @@ function App() {
|
||||
}}
|
||||
>
|
||||
{t('core:message.success.transfer', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
</TextP>
|
||||
<Spacer height="100px" />
|
||||
@ -3019,7 +3027,7 @@ function App() {
|
||||
}}
|
||||
>
|
||||
<CustomButton>
|
||||
{t('core:action.continue', { postProcess: 'capitalize' })}
|
||||
{t('core:action.continue', { postProcess: 'capitalizeFirst' })}
|
||||
</CustomButton>
|
||||
</ButtonBase>
|
||||
</Box>
|
||||
@ -3036,7 +3044,7 @@ function App() {
|
||||
}}
|
||||
>
|
||||
{t('core:message.success.transfer', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
</TextP>
|
||||
<Spacer height="100px" />
|
||||
@ -3045,7 +3053,7 @@ function App() {
|
||||
window.close();
|
||||
}}
|
||||
>
|
||||
{t('core:action.continue', { postProcess: 'capitalize' })}
|
||||
{t('core:action.continue', { postProcess: 'capitalizeFirst' })}
|
||||
</CustomButton>
|
||||
</>
|
||||
)}
|
||||
@ -3061,7 +3069,7 @@ function App() {
|
||||
}}
|
||||
>
|
||||
{t('core:message.success.order_submitted', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
</TextP>
|
||||
<Spacer height="100px" />
|
||||
@ -3070,7 +3078,7 @@ function App() {
|
||||
window.close();
|
||||
}}
|
||||
>
|
||||
{t('core:action.close', { postProcess: 'capitalize' })}
|
||||
{t('core:action.close', { postProcess: 'capitalizeFirst' })}
|
||||
</CustomButton>
|
||||
</>
|
||||
)}
|
||||
@ -3119,7 +3127,7 @@ function App() {
|
||||
{message?.paymentFee && (
|
||||
<DialogContentText id="alert-dialog-description2">
|
||||
{t('core:fee.payment', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
: {message.paymentFee}
|
||||
</DialogContentText>
|
||||
@ -3127,7 +3135,7 @@ function App() {
|
||||
{message?.publishFee && (
|
||||
<DialogContentText id="alert-dialog-description2">
|
||||
{t('core:fee.publish', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
: {message.publishFee}
|
||||
</DialogContentText>
|
||||
@ -3151,7 +3159,7 @@ function App() {
|
||||
autoFocus
|
||||
>
|
||||
{t('core:action.accept', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
</Button>
|
||||
<Button
|
||||
@ -3170,7 +3178,7 @@ function App() {
|
||||
onClick={onCancel}
|
||||
>
|
||||
{t('core:action.decline', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
</Button>
|
||||
</DialogActions>
|
||||
@ -3193,7 +3201,7 @@ function App() {
|
||||
<DialogActions>
|
||||
<Button variant="contained" onClick={onOkInfo} autoFocus>
|
||||
{t('core:action.close', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
</Button>
|
||||
</DialogActions>
|
||||
@ -3214,7 +3222,7 @@ function App() {
|
||||
<DialogActions>
|
||||
<Button variant="contained" onClick={onCancelUnsavedChanges}>
|
||||
{t('core:action.cancel', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
</Button>
|
||||
<Button
|
||||
@ -3223,7 +3231,7 @@ function App() {
|
||||
autoFocus
|
||||
>
|
||||
{t('core:action.continue_logout', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
</Button>
|
||||
</DialogActions>
|
||||
@ -3502,7 +3510,7 @@ function App() {
|
||||
<Box sx={{ display: 'flex', alignItems: 'center' }}>
|
||||
<Typography sx={{ fontSize: '14px' }}>
|
||||
{t('core:message.success.request_read', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
</Typography>
|
||||
<PriorityHighIcon color="warning" />
|
||||
@ -3552,7 +3560,7 @@ function App() {
|
||||
}}
|
||||
>
|
||||
{t('core:action.accept', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
</CustomButtonAccept>
|
||||
<CustomButtonAccept
|
||||
@ -3564,7 +3572,7 @@ function App() {
|
||||
onClick={() => onCancelQortalRequestExtension()}
|
||||
>
|
||||
{t('core:action.decline', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
</CustomButtonAccept>
|
||||
</Box>
|
||||
|
@ -351,7 +351,8 @@ export const NotAuthenticated = ({
|
||||
.catch((error) => {
|
||||
console.error(
|
||||
'Failed to set API key:',
|
||||
error.message || t('core:error', { postProcess: 'capitalize' })
|
||||
error.message ||
|
||||
t('core:error', { postProcess: 'capitalizeFirst' })
|
||||
);
|
||||
});
|
||||
} else {
|
||||
@ -361,7 +362,7 @@ export const NotAuthenticated = ({
|
||||
setInfoSnack({
|
||||
type: 'error',
|
||||
message: t('auth:apikey.select_valid', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
}),
|
||||
});
|
||||
setOpenSnack(true);
|
||||
@ -387,7 +388,7 @@ export const NotAuthenticated = ({
|
||||
'Failed to set API key:',
|
||||
error.message ||
|
||||
t('core:error', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
})
|
||||
);
|
||||
});
|
||||
@ -399,7 +400,7 @@ export const NotAuthenticated = ({
|
||||
message:
|
||||
error?.message ||
|
||||
t('auth:apikey.select_valid', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
}),
|
||||
});
|
||||
setOpenSnack(true);
|
||||
@ -481,7 +482,7 @@ export const NotAuthenticated = ({
|
||||
fontSize: '18px',
|
||||
}}
|
||||
>
|
||||
{t('auth:welcome', { postProcess: 'capitalize' })}
|
||||
{t('auth:welcome', { postProcess: 'capitalizeFirst' })}
|
||||
<TextSpan
|
||||
sx={{
|
||||
fontSize: '18px',
|
||||
@ -511,13 +512,13 @@ export const NotAuthenticated = ({
|
||||
fontSize: '16px',
|
||||
}}
|
||||
>
|
||||
{t('auth:tips.digital_id', { postProcess: 'capitalize' })}
|
||||
{t('auth:tips.digital_id', { postProcess: 'capitalizeFirst' })}
|
||||
</Typography>
|
||||
</React.Fragment>
|
||||
}
|
||||
>
|
||||
<CustomButton onClick={() => setExtstate('wallets')}>
|
||||
{t('auth:account.account_many', { postProcess: 'capitalize' })}
|
||||
{t('auth:account.account_many', { postProcess: 'capitalizeFirst' })}
|
||||
</CustomButton>
|
||||
</HtmlTooltip>
|
||||
</Box>
|
||||
@ -542,7 +543,7 @@ export const NotAuthenticated = ({
|
||||
fontSize: '18px',
|
||||
}}
|
||||
>
|
||||
{t('auth:tips.new_users', { postProcess: 'capitalize' })}
|
||||
{t('auth:tips.new_users', { postProcess: 'capitalizeFirst' })}
|
||||
</Typography>
|
||||
<Spacer height="10px" />
|
||||
<Typography
|
||||
@ -551,7 +552,7 @@ export const NotAuthenticated = ({
|
||||
fontSize: '16px',
|
||||
}}
|
||||
>
|
||||
{t('auth:tips.new_account', { postProcess: 'capitalize' })}
|
||||
{t('auth:tips.new_account', { postProcess: 'capitalizeFirst' })}
|
||||
</Typography>
|
||||
</React.Fragment>
|
||||
}
|
||||
@ -572,7 +573,9 @@ export const NotAuthenticated = ({
|
||||
},
|
||||
}}
|
||||
>
|
||||
{t('auth:action.create_account', { postProcess: 'capitalize' })}
|
||||
{t('auth:action.create_account', {
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
</CustomButton>
|
||||
</HtmlTooltip>
|
||||
</Box>
|
||||
@ -585,7 +588,7 @@ export const NotAuthenticated = ({
|
||||
visibility: !useLocalNode && 'hidden',
|
||||
}}
|
||||
>
|
||||
{t('auth:node.using', { postProcess: 'capitalize' })}:{' '}
|
||||
{t('auth:node.using', { postProcess: 'capitalizeFirst' })}:{' '}
|
||||
{currentNode?.url}
|
||||
</Typography>
|
||||
|
||||
@ -613,7 +616,7 @@ export const NotAuthenticated = ({
|
||||
textDecoration: 'underline',
|
||||
}}
|
||||
>
|
||||
{t('auth:advanced_users', { postProcess: 'capitalize' })}
|
||||
{t('auth:advanced_users', { postProcess: 'capitalizeFirst' })}
|
||||
</Typography>
|
||||
<Box
|
||||
sx={{
|
||||
@ -662,8 +665,12 @@ export const NotAuthenticated = ({
|
||||
}
|
||||
label={
|
||||
isLocal
|
||||
? t('auth:node.use_local', { postProcess: 'capitalize' })
|
||||
: t('auth:node.use_custom', { postProcess: 'capitalize' })
|
||||
? t('auth:node.use_local', {
|
||||
postProcess: 'capitalizeFirst',
|
||||
})
|
||||
: t('auth:node.use_custom', {
|
||||
postProcess: 'capitalizeFirst',
|
||||
})
|
||||
}
|
||||
/>
|
||||
</Box>
|
||||
@ -676,8 +683,12 @@ export const NotAuthenticated = ({
|
||||
component="label"
|
||||
>
|
||||
{apiKey
|
||||
? t('auth:node.use_local', { postProcess: 'capitalize' })
|
||||
: t('auth:apikey.import', { postProcess: 'capitalize' })}
|
||||
? t('auth:node.use_local', {
|
||||
postProcess: 'capitalizeFirst',
|
||||
})
|
||||
: t('auth:apikey.import', {
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
</Button>
|
||||
<Typography
|
||||
sx={{
|
||||
@ -685,7 +696,7 @@ export const NotAuthenticated = ({
|
||||
visibility: importedApiKey ? 'visible' : 'hidden',
|
||||
}}
|
||||
>
|
||||
{t('auth:apikey.key', { postProcess: 'capitalize' })}:{' '}
|
||||
{t('auth:apikey.key', { postProcess: 'capitalizeFirst' })}:{' '}
|
||||
{importedApiKey}
|
||||
</Typography>
|
||||
</>
|
||||
@ -698,7 +709,7 @@ export const NotAuthenticated = ({
|
||||
variant="contained"
|
||||
component="label"
|
||||
>
|
||||
{t('auth:node.choose', { postProcess: 'capitalize' })}
|
||||
{t('auth:node.choose', { postProcess: 'capitalizeFirst' })}
|
||||
</Button>
|
||||
</>
|
||||
<Typography
|
||||
@ -707,7 +718,7 @@ export const NotAuthenticated = ({
|
||||
fontSize: '12px',
|
||||
}}
|
||||
>
|
||||
{t('auth:build_version', { postProcess: 'capitalize' })}:
|
||||
{t('auth:build_version', { postProcess: 'capitalizeFirst' })}:
|
||||
{manifestData?.version}
|
||||
</Typography>
|
||||
</Box>
|
||||
@ -728,7 +739,7 @@ export const NotAuthenticated = ({
|
||||
>
|
||||
<DialogTitle id="alert-dialog-title">
|
||||
{' '}
|
||||
{t('auth:node.custom_many', { postProcess: 'capitalize' })}:
|
||||
{t('auth:node.custom_many', { postProcess: 'capitalizeFirst' })}:
|
||||
</DialogTitle>
|
||||
<DialogContent>
|
||||
<Box
|
||||
@ -798,7 +809,9 @@ export const NotAuthenticated = ({
|
||||
}}
|
||||
variant="contained"
|
||||
>
|
||||
{t('core:action.choose', { postProcess: 'capitalize' })}
|
||||
{t('core:action.choose', {
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
</Button>
|
||||
</Box>
|
||||
</Box>
|
||||
@ -858,7 +871,7 @@ export const NotAuthenticated = ({
|
||||
variant="contained"
|
||||
>
|
||||
{t('core:action.choose', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
</Button>
|
||||
|
||||
@ -873,7 +886,7 @@ export const NotAuthenticated = ({
|
||||
variant="contained"
|
||||
>
|
||||
{t('core:action.edit', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
</Button>
|
||||
|
||||
@ -887,7 +900,9 @@ export const NotAuthenticated = ({
|
||||
}}
|
||||
variant="contained"
|
||||
>
|
||||
{t('core:remove', { postProcess: 'capitalize' })}
|
||||
{t('core:remove', {
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
</Button>
|
||||
</Box>
|
||||
</Box>
|
||||
@ -926,7 +941,7 @@ export const NotAuthenticated = ({
|
||||
<DialogActions>
|
||||
{mode === 'list' && (
|
||||
<Button variant="contained" onClick={addCustomNode}>
|
||||
{t('core:action.add', { postProcess: 'capitalize' })}
|
||||
{t('core:action.add', { postProcess: 'capitalizeFirst' })}
|
||||
</Button>
|
||||
)}
|
||||
|
||||
@ -939,7 +954,7 @@ export const NotAuthenticated = ({
|
||||
}}
|
||||
autoFocus
|
||||
>
|
||||
{t('core:action.close', { postProcess: 'capitalize' })}
|
||||
{t('core:action.close', { postProcess: 'capitalizeFirst' })}
|
||||
</Button>
|
||||
</>
|
||||
)}
|
||||
@ -954,7 +969,7 @@ export const NotAuthenticated = ({
|
||||
}}
|
||||
>
|
||||
{t('auth:action.return_to_list', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
</Button>
|
||||
|
||||
@ -964,7 +979,7 @@ export const NotAuthenticated = ({
|
||||
onClick={() => saveCustomNodes(customNodes)}
|
||||
autoFocus
|
||||
>
|
||||
{t('core:save', { postProcess: 'capitalize' })}
|
||||
{t('core:save', { postProcess: 'capitalizeFirst' })}
|
||||
</Button>
|
||||
</>
|
||||
)}
|
||||
@ -979,7 +994,7 @@ export const NotAuthenticated = ({
|
||||
aria-describedby="alert-dialog-description"
|
||||
>
|
||||
<DialogTitle id="alert-dialog-title">
|
||||
{t('auth:apikey.enter', { postProcess: 'capitalize' })}
|
||||
{t('auth:apikey.enter', { postProcess: 'capitalizeFirst' })}
|
||||
</DialogTitle>
|
||||
<DialogContent>
|
||||
<Box
|
||||
@ -998,7 +1013,9 @@ export const NotAuthenticated = ({
|
||||
variant="contained"
|
||||
component="label"
|
||||
>
|
||||
{t('auth:apikey.alternative', { postProcess: 'capitalize' })}
|
||||
{t('auth:apikey.alternative', {
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
<input
|
||||
type="file"
|
||||
accept=".txt"
|
||||
@ -1053,7 +1070,7 @@ export const NotAuthenticated = ({
|
||||
}}
|
||||
autoFocus
|
||||
>
|
||||
{t('core:save', { postProcess: 'capitalize' })}
|
||||
{t('core:save', { postProcess: 'capitalizeFirst' })}
|
||||
</Button>
|
||||
|
||||
<Button
|
||||
@ -1063,7 +1080,7 @@ export const NotAuthenticated = ({
|
||||
setShowSelectApiKey(false);
|
||||
}}
|
||||
>
|
||||
{t('core:action.close', { postProcess: 'capitalize' })}
|
||||
{t('core:action.close', { postProcess: 'capitalizeFirst' })}
|
||||
</Button>
|
||||
</DialogActions>
|
||||
</Dialog>
|
||||
|
@ -152,7 +152,7 @@ export const Wallets = ({ setExtState, setRawWallet, rawWallet }) => {
|
||||
} else {
|
||||
setSeedError(
|
||||
t('auth:message.error.account_creation', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
})
|
||||
);
|
||||
}
|
||||
@ -160,7 +160,7 @@ export const Wallets = ({ setExtState, setRawWallet, rawWallet }) => {
|
||||
setSeedError(
|
||||
error?.message ||
|
||||
t('auth:message.error.account_creation', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
})
|
||||
);
|
||||
} finally {
|
||||
@ -202,7 +202,7 @@ export const Wallets = ({ setExtState, setRawWallet, rawWallet }) => {
|
||||
<>
|
||||
<Typography>
|
||||
{t('auth:message.generic.no_account', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
</Typography>
|
||||
|
||||
@ -212,7 +212,7 @@ export const Wallets = ({ setExtState, setRawWallet, rawWallet }) => {
|
||||
<>
|
||||
<Typography>
|
||||
{t('auth:message.generic.your_accounts', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
</Typography>
|
||||
|
||||
@ -224,7 +224,7 @@ export const Wallets = ({ setExtState, setRawWallet, rawWallet }) => {
|
||||
<Box>
|
||||
<Typography>
|
||||
{t('auth:account.selected', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
:
|
||||
</Typography>
|
||||
@ -282,7 +282,9 @@ export const Wallets = ({ setExtState, setRawWallet, rawWallet }) => {
|
||||
fontSize: '16px',
|
||||
}}
|
||||
>
|
||||
{t('auth:tips.existing_account', { postProcess: 'capitalize' })}
|
||||
{t('auth:tips.existing_account', {
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
</Typography>
|
||||
</Fragment>
|
||||
}
|
||||
@ -294,7 +296,9 @@ export const Wallets = ({ setExtState, setRawWallet, rawWallet }) => {
|
||||
display: 'inline',
|
||||
}}
|
||||
>
|
||||
{t('auth:action.add.seed_phrase', { postProcess: 'capitalize' })}
|
||||
{t('auth:action.add.seed_phrase', {
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
</CustomButton>
|
||||
</HtmlTooltip>
|
||||
|
||||
@ -309,7 +313,7 @@ export const Wallets = ({ setExtState, setRawWallet, rawWallet }) => {
|
||||
}}
|
||||
>
|
||||
{t('auth:tips.additional_wallet', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
</Typography>
|
||||
</Fragment>
|
||||
@ -323,7 +327,7 @@ export const Wallets = ({ setExtState, setRawWallet, rawWallet }) => {
|
||||
>
|
||||
<input {...getInputProps()} />
|
||||
{t('auth:action.add.account', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
</CustomButton>
|
||||
</HtmlTooltip>
|
||||
@ -341,7 +345,7 @@ export const Wallets = ({ setExtState, setRawWallet, rawWallet }) => {
|
||||
>
|
||||
<DialogTitle id="alert-dialog-title">
|
||||
{t('auth:message.generic.type_seed', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
</DialogTitle>
|
||||
|
||||
@ -353,8 +357,8 @@ export const Wallets = ({ setExtState, setRawWallet, rawWallet }) => {
|
||||
}}
|
||||
>
|
||||
<Label>
|
||||
{t('auth:name', {
|
||||
postProcess: 'capitalize',
|
||||
{t('core:name', {
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
</Label>
|
||||
<Input
|
||||
@ -367,7 +371,7 @@ export const Wallets = ({ setExtState, setRawWallet, rawWallet }) => {
|
||||
|
||||
<Label>
|
||||
{t('auth:seed', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
</Label>
|
||||
<PasswordField
|
||||
@ -385,7 +389,7 @@ export const Wallets = ({ setExtState, setRawWallet, rawWallet }) => {
|
||||
|
||||
<Label>
|
||||
{t('auth:action.choose_password', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
</Label>
|
||||
<PasswordField
|
||||
@ -413,7 +417,7 @@ export const Wallets = ({ setExtState, setRawWallet, rawWallet }) => {
|
||||
}}
|
||||
>
|
||||
{t('core:action.close', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
</Button>
|
||||
<LoadingButton
|
||||
@ -427,7 +431,7 @@ export const Wallets = ({ setExtState, setRawWallet, rawWallet }) => {
|
||||
autoFocus
|
||||
>
|
||||
{t('core:action.add', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
</LoadingButton>
|
||||
<Typography
|
||||
@ -516,7 +520,7 @@ const WalletItem = ({ wallet, updateWalletItem, idx, setSelectedWallet }) => {
|
||||
}}
|
||||
>
|
||||
{t('core:action.login', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
</Typography>
|
||||
</Box>
|
||||
@ -545,8 +549,8 @@ const WalletItem = ({ wallet, updateWalletItem, idx, setSelectedWallet }) => {
|
||||
}}
|
||||
>
|
||||
<Label>
|
||||
{t('auth:name', {
|
||||
postProcess: 'capitalize',
|
||||
{t('core:name', {
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
</Label>
|
||||
<Input
|
||||
@ -562,7 +566,7 @@ const WalletItem = ({ wallet, updateWalletItem, idx, setSelectedWallet }) => {
|
||||
|
||||
<Label>
|
||||
{t('auth:note', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
</Label>
|
||||
<Input
|
||||
@ -593,7 +597,7 @@ const WalletItem = ({ wallet, updateWalletItem, idx, setSelectedWallet }) => {
|
||||
onClick={() => setIsEdit(false)}
|
||||
>
|
||||
{t('core:action.close', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
</Button>
|
||||
<Button
|
||||
@ -611,7 +615,7 @@ const WalletItem = ({ wallet, updateWalletItem, idx, setSelectedWallet }) => {
|
||||
onClick={() => updateWalletItem(idx, null)}
|
||||
>
|
||||
{t('core:action.remove', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
</Button>
|
||||
<Button
|
||||
@ -636,7 +640,7 @@ const WalletItem = ({ wallet, updateWalletItem, idx, setSelectedWallet }) => {
|
||||
}}
|
||||
>
|
||||
{t('core:action.save', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
</Button>
|
||||
</Box>
|
||||
|
@ -27,8 +27,8 @@ import {
|
||||
sortablePinnedAppsAtom,
|
||||
} from '../../atoms/global';
|
||||
import { saveToLocalStorage } from './AppsNavBarDesktop';
|
||||
|
||||
import { useAtom, useSetAtom } from 'jotai';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
|
||||
export const AppInfo = ({ app, myName }) => {
|
||||
const isInstalled = app?.status?.status === 'READY';
|
||||
@ -37,6 +37,7 @@ export const AppInfo = ({ app, myName }) => {
|
||||
);
|
||||
|
||||
const theme = useTheme();
|
||||
const { t } = useTranslation(['core', 'auth', 'group']);
|
||||
|
||||
const isSelectedAppPinned = !!sortablePinnedApps?.find(
|
||||
(item) => item?.name === app?.name && item?.service === app?.service
|
||||
@ -171,9 +172,13 @@ export const AppInfo = ({ app, myName }) => {
|
||||
}}
|
||||
>
|
||||
<AppDownloadButtonText>
|
||||
{isSelectedAppPinned // TODO translate
|
||||
? 'Unpin from dashboard'
|
||||
: 'Pin to dashboard'}
|
||||
{isSelectedAppPinned
|
||||
? t('core:action.unpin_from_dashboard', {
|
||||
postProcess: 'capitalizeFirst',
|
||||
})
|
||||
: t('core:action.pin_from_dashboard', {
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
</AppDownloadButtonText>
|
||||
</AppDownloadButton>
|
||||
|
||||
@ -193,7 +198,13 @@ export const AppInfo = ({ app, myName }) => {
|
||||
}}
|
||||
>
|
||||
<AppDownloadButtonText>
|
||||
{isInstalled ? 'Open' : 'Download'}
|
||||
{isInstalled
|
||||
? t('core:action.open', {
|
||||
postProcess: 'capitalizeFirst',
|
||||
})
|
||||
: t('core:action.download', {
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
</AppDownloadButtonText>
|
||||
</AppDownloadButton>
|
||||
</Box>
|
||||
@ -216,25 +227,40 @@ export const AppInfo = ({ app, myName }) => {
|
||||
<Spacer width="16px" />
|
||||
|
||||
<AppsCategoryInfoSub>
|
||||
<AppsCategoryInfoLabel>Category:</AppsCategoryInfoLabel>
|
||||
<AppsCategoryInfoLabel>
|
||||
{t('core:category', {
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
:
|
||||
</AppsCategoryInfoLabel>
|
||||
|
||||
<Spacer height="4px" />
|
||||
|
||||
<AppsCategoryInfoValue>
|
||||
{app?.metadata?.categoryName || 'none'}
|
||||
{app?.metadata?.categoryName ||
|
||||
t('core:none', {
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
</AppsCategoryInfoValue>
|
||||
</AppsCategoryInfoSub>
|
||||
</AppsCategoryInfo>
|
||||
|
||||
<Spacer height="30px" />
|
||||
|
||||
<AppInfoAppName>About this Q-App</AppInfoAppName>
|
||||
<AppInfoAppName>
|
||||
{t('core:q_apps.about', {
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
</AppInfoAppName>
|
||||
</AppsWidthLimiter>
|
||||
|
||||
<Spacer height="20px" />
|
||||
|
||||
<AppsInfoDescription>
|
||||
{app?.metadata?.description || 'No description'}
|
||||
{app?.metadata?.description ||
|
||||
t('core:message.generic.no_description', {
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
</AppsInfoDescription>
|
||||
</Box>
|
||||
</AppsLibraryContainer>
|
||||
|
@ -23,6 +23,7 @@ import {
|
||||
} from '../../atoms/global';
|
||||
import { saveToLocalStorage } from './AppsNavBarDesktop';
|
||||
import { useAtom, useSetAtom } from 'jotai';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
|
||||
export const AppInfoSnippet = ({
|
||||
app,
|
||||
@ -41,6 +42,7 @@ export const AppInfoSnippet = ({
|
||||
);
|
||||
|
||||
const theme = useTheme();
|
||||
const { t } = useTranslation(['core', 'auth', 'group']);
|
||||
|
||||
return (
|
||||
<AppInfoSnippetContainer
|
||||
@ -166,11 +168,16 @@ export const AppInfoSnippet = ({
|
||||
sx={{
|
||||
backgroundColor: theme.palette.background.paper,
|
||||
opacity: isSelectedAppPinned ? 0.6 : 1,
|
||||
}} // TODO translate
|
||||
}}
|
||||
>
|
||||
<AppDownloadButtonText>
|
||||
{' '}
|
||||
{isSelectedAppPinned ? 'Unpin' : 'Pin'}
|
||||
{isSelectedAppPinned
|
||||
? t('core:action.unpin', {
|
||||
postProcess: 'capitalizeFirst',
|
||||
})
|
||||
: t('core:action.pin', {
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
</AppDownloadButtonText>
|
||||
</AppDownloadButton>
|
||||
|
||||
@ -187,7 +194,13 @@ export const AppInfoSnippet = ({
|
||||
}}
|
||||
>
|
||||
<AppDownloadButtonText>
|
||||
{isInstalled ? 'Open' : 'Download'}
|
||||
{isInstalled
|
||||
? t('core:action.open', {
|
||||
postProcess: 'capitalizeFirst',
|
||||
})
|
||||
: t('core:action.download', {
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
</AppDownloadButtonText>
|
||||
</AppDownloadButton>
|
||||
</AppInfoSnippetRight>
|
||||
|
@ -1,20 +1,8 @@
|
||||
import React, { useContext, useEffect, useState } from 'react';
|
||||
import {
|
||||
AppCircle,
|
||||
AppCircleContainer,
|
||||
AppCircleLabel,
|
||||
AppDownloadButton,
|
||||
AppDownloadButtonText,
|
||||
AppInfoAppName,
|
||||
AppInfoSnippetContainer,
|
||||
AppInfoSnippetLeft,
|
||||
AppInfoSnippetMiddle,
|
||||
AppInfoSnippetRight,
|
||||
AppInfoUserName,
|
||||
AppLibrarySubTitle,
|
||||
AppPublishTagsContainer,
|
||||
AppsLibraryContainer,
|
||||
AppsParent,
|
||||
AppsWidthLimiter,
|
||||
PublishQAppCTAButton,
|
||||
PublishQAppChoseFile,
|
||||
@ -28,10 +16,7 @@ import {
|
||||
useTheme,
|
||||
} from '@mui/material';
|
||||
import { styled } from '@mui/system';
|
||||
import UnfoldMoreRoundedIcon from '@mui/icons-material/UnfoldMoreRounded';
|
||||
import { Add } from '@mui/icons-material';
|
||||
import { MyContext, getBaseApiReact } from '../../App';
|
||||
import LogoSelected from '../../assets/svgs/LogoSelected.svg';
|
||||
import { Spacer } from '../../common/Spacer';
|
||||
import { executeEvent } from '../../utils/events';
|
||||
import { useDropzone } from 'react-dropzone';
|
||||
@ -39,6 +24,7 @@ import { LoadingSnackbar } from '../Snackbar/LoadingSnackbar';
|
||||
import { CustomizedSnackbars } from '../Snackbar/Snackbar';
|
||||
import { getFee } from '../../background';
|
||||
import { fileToBase64 } from '../../utils/fileReading';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
|
||||
const CustomSelect = styled(Select)({
|
||||
border: '0.5px solid var(--50-white, #FFFFFF80)',
|
||||
@ -81,6 +67,7 @@ export const AppPublish = ({ names, categories }) => {
|
||||
const [file, setFile] = useState(null);
|
||||
const { show } = useContext(MyContext);
|
||||
const theme = useTheme();
|
||||
const { t } = useTranslation(['core', 'auth', 'group']);
|
||||
const [tag1, setTag1] = useState('');
|
||||
const [tag2, setTag2] = useState('');
|
||||
const [tag3, setTag3] = useState('');
|
||||
@ -106,9 +93,11 @@ export const AppPublish = ({ names, categories }) => {
|
||||
errors.forEach((error) => {
|
||||
if (error.code === 'file-too-large') {
|
||||
console.error(
|
||||
`File ${file.name} is too large. Max size allowed is ${
|
||||
maxFileSize / (1024 * 1024)
|
||||
} MB.`
|
||||
t('core:message.error.file_too_large', {
|
||||
filename: file.name,
|
||||
size: maxFileSize / (1024 * 1024),
|
||||
postProcess: 'capitalizeFirst',
|
||||
})
|
||||
);
|
||||
}
|
||||
});
|
||||
@ -142,6 +131,7 @@ export const AppPublish = ({ names, categories }) => {
|
||||
setTag5(myApp?.metadata?.tags[4] || '');
|
||||
}
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
} finally {
|
||||
setIsLoading('');
|
||||
}
|
||||
@ -179,17 +169,25 @@ export const AppPublish = ({ names, categories }) => {
|
||||
});
|
||||
if (missingFields.length > 0) {
|
||||
const missingFieldsString = missingFields.join(', ');
|
||||
const errorMsg = `Missing fields: ${missingFieldsString}`;
|
||||
const errorMsg = t('core:message.error.missing_fields', {
|
||||
fields: missingFieldsString,
|
||||
postProcess: 'capitalizeFirst',
|
||||
});
|
||||
throw new Error(errorMsg);
|
||||
}
|
||||
const fee = await getFee('ARBITRARY');
|
||||
|
||||
await show({
|
||||
// TODO translate
|
||||
message: 'Would you like to publish this app?',
|
||||
message: t('core:question.publish_app', {
|
||||
postProcess: 'capitalizeFirst',
|
||||
}),
|
||||
publishFee: fee.fee + ' QORT',
|
||||
});
|
||||
setIsLoading('Publishing... Please wait.');
|
||||
setIsLoading(
|
||||
t('core:message.generic.publishing', {
|
||||
postProcess: 'capitalizeFirst',
|
||||
})
|
||||
);
|
||||
const fileBase64 = await fileToBase64(file);
|
||||
await new Promise((res, rej) => {
|
||||
window
|
||||
@ -214,13 +212,19 @@ export const AppPublish = ({ names, categories }) => {
|
||||
rej(response.error);
|
||||
})
|
||||
.catch((error) => {
|
||||
rej(error.message || 'An error occurred');
|
||||
rej(
|
||||
error.message ||
|
||||
t('core:message.error.generic', {
|
||||
postProcess: 'capitalizeFirst',
|
||||
})
|
||||
);
|
||||
});
|
||||
});
|
||||
setInfoSnack({
|
||||
type: 'success',
|
||||
message:
|
||||
'Successfully published. Please wait a couple minutes for the network to propogate the changes.',
|
||||
message: t('core:message.success.published', {
|
||||
postProcess: 'capitalizeFirst',
|
||||
}),
|
||||
});
|
||||
setOpenSnack(true);
|
||||
const dataObj = {
|
||||
@ -239,7 +243,11 @@ export const AppPublish = ({ names, categories }) => {
|
||||
} catch (error) {
|
||||
setInfoSnack({
|
||||
type: 'error',
|
||||
message: error?.message || 'Unable to publish app',
|
||||
message:
|
||||
error?.message ||
|
||||
t('core:message.error.publish_app', {
|
||||
postProcess: 'capitalizeFirst',
|
||||
}),
|
||||
});
|
||||
setOpenSnack(true);
|
||||
} finally {
|
||||
@ -260,18 +268,27 @@ export const AppPublish = ({ names, categories }) => {
|
||||
width: 'auto',
|
||||
}}
|
||||
>
|
||||
<AppLibrarySubTitle>Create Apps!</AppLibrarySubTitle>
|
||||
<AppLibrarySubTitle>
|
||||
{t('core:action.create_apps', {
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
!
|
||||
</AppLibrarySubTitle>
|
||||
|
||||
<Spacer height="18px" />
|
||||
|
||||
<PublishQAppInfo>
|
||||
Note: Currently, only one App and Website is allowed per Name.
|
||||
{t('core:message.generic.one_app_per_name', {
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
</PublishQAppInfo>
|
||||
|
||||
<Spacer height="18px" />
|
||||
|
||||
<InputLabel sx={{ fontSize: '14px', marginBottom: '2px' }}>
|
||||
Name/App
|
||||
{t('core:name_app', {
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
</InputLabel>
|
||||
|
||||
<CustomSelect
|
||||
@ -286,7 +303,9 @@ export const AppPublish = ({ names, categories }) => {
|
||||
color: theme.palette.text.secondary,
|
||||
}}
|
||||
>
|
||||
Select Name/App
|
||||
{t('core:action.select_name_app', {
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
</em>
|
||||
{/* This is the placeholder item */}
|
||||
</CustomMenuItem>
|
||||
@ -298,7 +317,9 @@ export const AppPublish = ({ names, categories }) => {
|
||||
<Spacer height="15px" />
|
||||
|
||||
<InputLabel sx={{ fontSize: '14px', marginBottom: '2px' }}>
|
||||
App service type
|
||||
{t('core:app_service_type', {
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
</InputLabel>
|
||||
|
||||
<CustomSelect
|
||||
@ -313,17 +334,29 @@ export const AppPublish = ({ names, categories }) => {
|
||||
color: theme.palette.text.secondary,
|
||||
}}
|
||||
>
|
||||
Select App Type
|
||||
{t('core:action.select_app_type', {
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
</em>
|
||||
</CustomMenuItem>
|
||||
<CustomMenuItem value={'APP'}>App</CustomMenuItem>
|
||||
<CustomMenuItem value={'WEBSITE'}>Website</CustomMenuItem>
|
||||
<CustomMenuItem value={'APP'}>
|
||||
{t('core:app', {
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
</CustomMenuItem>
|
||||
<CustomMenuItem value={'WEBSITE'}>
|
||||
{t('core:website', {
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
</CustomMenuItem>
|
||||
</CustomSelect>
|
||||
|
||||
<Spacer height="15px" />
|
||||
|
||||
<InputLabel sx={{ fontSize: '14px', marginBottom: '2px' }}>
|
||||
Title
|
||||
{t('core:title', {
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
</InputLabel>
|
||||
|
||||
<InputBase
|
||||
@ -348,7 +381,9 @@ export const AppPublish = ({ names, categories }) => {
|
||||
<Spacer height="15px" />
|
||||
|
||||
<InputLabel sx={{ fontSize: '14px', marginBottom: '2px' }}>
|
||||
Description
|
||||
{t('core:description', {
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
</InputLabel>
|
||||
|
||||
<InputBase
|
||||
@ -373,7 +408,9 @@ export const AppPublish = ({ names, categories }) => {
|
||||
<Spacer height="15px" />
|
||||
|
||||
<InputLabel sx={{ fontSize: '14px', marginBottom: '2px' }}>
|
||||
Category
|
||||
{t('core:category', {
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
</InputLabel>
|
||||
|
||||
<CustomSelect
|
||||
@ -388,7 +425,9 @@ export const AppPublish = ({ names, categories }) => {
|
||||
color: theme.palette.text.secondary,
|
||||
}}
|
||||
>
|
||||
Select Category
|
||||
{t('core:action.select_category', {
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
</em>
|
||||
</CustomMenuItem>
|
||||
{categories?.map((category) => {
|
||||
@ -403,7 +442,9 @@ export const AppPublish = ({ names, categories }) => {
|
||||
<Spacer height="15px" />
|
||||
|
||||
<InputLabel sx={{ fontSize: '14px', marginBottom: '2px' }}>
|
||||
Tags
|
||||
{t('core:tags', {
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
</InputLabel>
|
||||
|
||||
<AppPublishTagsContainer>
|
||||
@ -497,7 +538,9 @@ export const AppPublish = ({ names, categories }) => {
|
||||
<Spacer height="30px" />
|
||||
|
||||
<PublishQAppInfo>
|
||||
Select .zip file containing static content:{' '}
|
||||
{t('core:message.generic.select_zip', {
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
</PublishQAppInfo>
|
||||
|
||||
<Spacer height="10px" />
|
||||
@ -517,7 +560,7 @@ export const AppPublish = ({ names, categories }) => {
|
||||
<PublishQAppChoseFile {...getRootProps()}>
|
||||
{' '}
|
||||
<input {...getInputProps()} />
|
||||
Choose File
|
||||
{t('core:action.choose_file', { postProcess: 'capitalizeFirst' })}
|
||||
</PublishQAppChoseFile>
|
||||
|
||||
<Spacer height="35px" />
|
||||
@ -528,7 +571,7 @@ export const AppPublish = ({ names, categories }) => {
|
||||
}}
|
||||
onClick={publishApp}
|
||||
>
|
||||
Publish
|
||||
{t('core:action.publish', { postProcess: 'capitalizeFirst' })}
|
||||
</PublishQAppCTAButton>
|
||||
</AppsWidthLimiter>
|
||||
|
||||
|
@ -7,6 +7,7 @@ import { StarFilledIcon } from '../../assets/Icons/StarFilled';
|
||||
import { StarEmptyIcon } from '../../assets/Icons/StarEmpty';
|
||||
import { AppInfoUserName } from './Apps-styles';
|
||||
import { Spacer } from '../../common/Spacer';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
|
||||
export const AppRating = ({ app, myName, ratingCountPosition = 'right' }) => {
|
||||
const [value, setValue] = useState(0);
|
||||
@ -19,6 +20,7 @@ export const AppRating = ({ app, myName, ratingCountPosition = 'right' }) => {
|
||||
const [openSnack, setOpenSnack] = useState(false);
|
||||
const [infoSnack, setInfoSnack] = useState(null);
|
||||
const hasCalledRef = useRef(false);
|
||||
const { t } = useTranslation(['core', 'group']);
|
||||
|
||||
const getRating = useCallback(async (name, service) => {
|
||||
try {
|
||||
@ -101,26 +103,39 @@ export const AppRating = ({ app, myName, ratingCountPosition = 'right' }) => {
|
||||
const rateFunc = async (event, chosenValue, currentValue) => {
|
||||
try {
|
||||
const newValue = chosenValue || currentValue;
|
||||
if (!myName) throw new Error('You need a name to rate.');
|
||||
if (!myName)
|
||||
throw new Error(
|
||||
t('core:message.generic.name_rate', {
|
||||
postProcess: 'capitalizeFirst',
|
||||
})
|
||||
);
|
||||
if (!app?.name) return;
|
||||
const fee = await getFee('CREATE_POLL');
|
||||
|
||||
await show({
|
||||
// TODO translate
|
||||
message: `Would you like to rate this app a rating of ${newValue}?. It will create a POLL tx.`,
|
||||
message: t('core:question.rate_app', {
|
||||
rate: newValue,
|
||||
postProcess: 'capitalizeFirst',
|
||||
}),
|
||||
publishFee: fee.fee + ' QORT',
|
||||
});
|
||||
|
||||
if (hasPublishedRating === false) {
|
||||
const pollName = `app-library-${app.service}-rating-${app.name}`;
|
||||
const pollOptions = [`1, 2, 3, 4, 5, initialValue-${newValue}`];
|
||||
const pollDescription = t('core:message.error.generic', {
|
||||
name: app.name,
|
||||
service: app.service,
|
||||
postProcess: 'capitalizeFirst',
|
||||
});
|
||||
|
||||
await new Promise((res, rej) => {
|
||||
window
|
||||
.sendMessage(
|
||||
'createPoll',
|
||||
{
|
||||
pollName: pollName,
|
||||
pollDescription: `Rating for ${app.service} ${app.name}`,
|
||||
pollDescription: pollDescription,
|
||||
pollOptions: pollOptions,
|
||||
pollOwnerAddress: myName,
|
||||
},
|
||||
@ -134,8 +149,9 @@ export const AppRating = ({ app, myName, ratingCountPosition = 'right' }) => {
|
||||
res(response);
|
||||
setInfoSnack({
|
||||
type: 'success',
|
||||
message:
|
||||
'Successfully rated. Please wait a couple minutes for the network to propogate the changes.',
|
||||
message: t('core:message.success.rated_app', {
|
||||
postProcess: 'capitalizeFirst',
|
||||
}),
|
||||
});
|
||||
setOpenSnack(true);
|
||||
}
|
||||
@ -151,7 +167,11 @@ export const AppRating = ({ app, myName, ratingCountPosition = 'right' }) => {
|
||||
(option) => +option.optionName === +newValue
|
||||
);
|
||||
if (isNaN(optionIndex) || optionIndex === -1)
|
||||
throw new Error('Cannot find rating option');
|
||||
throw new Error(
|
||||
t('core:message.error.rating_option', {
|
||||
postProcess: 'capitalizeFirst',
|
||||
})
|
||||
);
|
||||
await new Promise((res, rej) => {
|
||||
window
|
||||
.sendMessage(
|
||||
@ -170,8 +190,9 @@ export const AppRating = ({ app, myName, ratingCountPosition = 'right' }) => {
|
||||
res(response);
|
||||
setInfoSnack({
|
||||
type: 'success',
|
||||
message:
|
||||
'Successfully rated. Please wait a couple minutes for the network to propogate the changes.',
|
||||
message: t('core:message.success.rated_app', {
|
||||
postProcess: 'capitalizeFirst',
|
||||
}),
|
||||
});
|
||||
setOpenSnack(true);
|
||||
}
|
||||
@ -185,7 +206,11 @@ export const AppRating = ({ app, myName, ratingCountPosition = 'right' }) => {
|
||||
console.log('error', error);
|
||||
setInfoSnack({
|
||||
type: 'error',
|
||||
message: error?.message || 'Unable to rate',
|
||||
message:
|
||||
error?.message ||
|
||||
t('core:message.error.unable_rate', {
|
||||
postProcess: 'capitalizeFirst',
|
||||
}),
|
||||
});
|
||||
setOpenSnack(true);
|
||||
}
|
||||
@ -195,8 +220,8 @@ export const AppRating = ({ app, myName, ratingCountPosition = 'right' }) => {
|
||||
<div>
|
||||
<Box
|
||||
sx={{
|
||||
display: 'flex',
|
||||
alignItems: 'center',
|
||||
display: 'flex',
|
||||
flexDirection: ratingCountPosition === 'top' ? 'column' : 'row',
|
||||
}}
|
||||
>
|
||||
@ -207,8 +232,11 @@ export const AppRating = ({ app, myName, ratingCountPosition = 'right' }) => {
|
||||
(votesInfo?.voteCounts?.length === 6 ? 1 : 0)}{' '}
|
||||
{' RATINGS'}
|
||||
</AppInfoUserName>
|
||||
|
||||
<Spacer height="6px" />
|
||||
|
||||
<AppInfoUserName>{value?.toFixed(1)}</AppInfoUserName>
|
||||
|
||||
<Spacer height="6px" />
|
||||
</>
|
||||
)}
|
||||
|
@ -1,4 +1,4 @@
|
||||
import React, { useEffect, useMemo, useState } from 'react';
|
||||
import { forwardRef, useEffect, useMemo, useState } from 'react';
|
||||
import { Box } from '@mui/material';
|
||||
import { getBaseApiReact } from '../../App';
|
||||
import { subscribeToEvent, unsubscribeFromEvent } from '../../utils/events';
|
||||
@ -7,7 +7,7 @@ import { useQortalMessageListener } from './useQortalMessageListener';
|
||||
import { useThemeContext } from '../Theme/ThemeContext';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
|
||||
export const AppViewer = React.forwardRef(
|
||||
export const AppViewer = forwardRef(
|
||||
({ app, hide, isDevMode, skipAuth }, iframeRef) => {
|
||||
// const iframeRef = useRef(null);
|
||||
const { window: frameWindow } = useFrame();
|
||||
@ -23,7 +23,7 @@ export const AppViewer = React.forwardRef(
|
||||
);
|
||||
const [url, setUrl] = useState('');
|
||||
const { themeMode } = useThemeContext();
|
||||
const { i18n } = useTranslation(['core']);
|
||||
const { i18n, t } = useTranslation(['core']);
|
||||
const currentLang = i18n.language;
|
||||
|
||||
useEffect(() => {
|
||||
@ -184,7 +184,13 @@ export const AppViewer = React.forwardRef(
|
||||
// Timeout after 200ms if no response
|
||||
setTimeout(() => {
|
||||
window.removeEventListener('message', handleNavigationSuccess);
|
||||
reject(new Error('Navigation timeout'));
|
||||
reject(
|
||||
new Error(
|
||||
t('core:message.error.navigation_timeout', {
|
||||
postProcess: 'capitalizeFirst',
|
||||
})
|
||||
)
|
||||
);
|
||||
}, 200);
|
||||
const targetOrigin = iframeRef.current
|
||||
? new URL(iframeRef.current.src).origin
|
||||
|
@ -1,9 +1,8 @@
|
||||
import React, { useContext } from 'react';
|
||||
import { forwardRef } from 'react';
|
||||
import { AppViewer } from './AppViewer';
|
||||
import Frame from 'react-frame-component';
|
||||
import { MyContext } from '../../App';
|
||||
|
||||
const AppViewerContainer = React.forwardRef(
|
||||
const AppViewerContainer = forwardRef(
|
||||
({ app, isSelected, hide, isDevMode, customHeight, skipAuth }, ref) => {
|
||||
return (
|
||||
<Frame
|
||||
|
@ -24,6 +24,7 @@ import { AppsIcon } from '../../assets/Icons/AppsIcon';
|
||||
import { CoreSyncStatus } from '../CoreSyncStatus';
|
||||
import { MessagingIconFilled } from '../../assets/Icons/MessagingIconFilled';
|
||||
import { useAtom } from 'jotai';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
|
||||
const uid = new ShortUniqueId({ length: 8 });
|
||||
|
||||
@ -47,19 +48,29 @@ export const AppsDesktop = ({
|
||||
const [categories, setCategories] = useState([]);
|
||||
const iframeRefs = useRef({});
|
||||
const [isEnabledDevMode, setIsEnabledDevMode] = useAtom(enabledDevModeAtom);
|
||||
|
||||
const { showTutorial } = useContext(MyContext);
|
||||
const theme = useTheme();
|
||||
const { t } = useTranslation(['core', 'group']);
|
||||
|
||||
const myApp = useMemo(() => {
|
||||
return availableQapps.find(
|
||||
(app) => app.name === myName && app.service === 'APP'
|
||||
(app) =>
|
||||
app.name === myName &&
|
||||
app.service ===
|
||||
t('core:app', {
|
||||
postProcess: 'capitalizeAll',
|
||||
})
|
||||
);
|
||||
}, [myName, availableQapps]);
|
||||
|
||||
const myWebsite = useMemo(() => {
|
||||
return availableQapps.find(
|
||||
(app) => app.name === myName && app.service === 'WEBSITE'
|
||||
(app) =>
|
||||
app.name === myName &&
|
||||
app.service ===
|
||||
t('core:website', {
|
||||
postProcess: 'capitalizeAll',
|
||||
})
|
||||
);
|
||||
}, [myName, availableQapps]);
|
||||
|
||||
@ -104,7 +115,6 @@ export const AppsDesktop = ({
|
||||
try {
|
||||
let apps = [];
|
||||
let websites = [];
|
||||
// dispatch(setIsLoadingGlobal(true))
|
||||
const url = `${getBaseApiReact()}/arbitrary/resources/search?service=APP&mode=ALL&limit=0&includestatus=true&includemetadata=true`;
|
||||
|
||||
const response = await fetch(url, {
|
||||
@ -113,6 +123,7 @@ export const AppsDesktop = ({
|
||||
'Content-Type': 'application/json',
|
||||
},
|
||||
});
|
||||
|
||||
if (!response?.ok) return;
|
||||
const responseData = await response.json();
|
||||
const urlWebsites = `${getBaseApiReact()}/arbitrary/resources/search?service=WEBSITE&mode=ALL&limit=0&includestatus=true&includemetadata=true`;
|
||||
@ -123,6 +134,7 @@ export const AppsDesktop = ({
|
||||
'Content-Type': 'application/json',
|
||||
},
|
||||
});
|
||||
|
||||
if (!responseWebsites?.ok) return;
|
||||
const responseDataWebsites = await responseWebsites.json();
|
||||
|
||||
@ -245,7 +257,6 @@ export const AppsDesktop = ({
|
||||
setTabs((prev) => [...prev, newTab]);
|
||||
setSelectedTab(newTab);
|
||||
setMode('viewer');
|
||||
|
||||
setIsNewTabWindow(false);
|
||||
};
|
||||
|
||||
@ -256,6 +267,7 @@ export const AppsDesktop = ({
|
||||
unsubscribeFromEvent('addTab', addTabFunc);
|
||||
};
|
||||
}, [tabs]);
|
||||
|
||||
const setSelectedTabFunc = (e) => {
|
||||
const data = e.detail?.data;
|
||||
if (e.detail?.isDevMode) return;
|
||||
@ -325,9 +337,9 @@ export const AppsDesktop = ({
|
||||
return (
|
||||
<AppsParent
|
||||
sx={{
|
||||
position: !show && 'fixed',
|
||||
left: !show && '-200vw',
|
||||
flexDirection: 'row',
|
||||
left: !show && '-200vw',
|
||||
position: !show && 'fixed',
|
||||
}}
|
||||
>
|
||||
<Box
|
||||
@ -448,6 +460,7 @@ export const AppsDesktop = ({
|
||||
}}
|
||||
>
|
||||
<Spacer height="30px" />
|
||||
|
||||
<AppsHomeDesktop
|
||||
myName={myName}
|
||||
availableQapps={availableQapps}
|
||||
@ -474,15 +487,18 @@ export const AppsDesktop = ({
|
||||
{mode === 'appInfo-from-category' && !selectedTab && (
|
||||
<AppInfo app={selectedAppInfo} myName={myName} />
|
||||
)}
|
||||
|
||||
<AppsCategoryDesktop
|
||||
availableQapps={availableQapps}
|
||||
isShow={mode === 'category' && !selectedTab}
|
||||
category={selectedCategory}
|
||||
myName={myName}
|
||||
/>
|
||||
|
||||
{mode === 'publish' && !selectedTab && (
|
||||
<AppPublish names={myName ? [myName] : []} categories={categories} />
|
||||
)}
|
||||
|
||||
{tabs.map((tab) => {
|
||||
if (!iframeRefs.current[tab.tabId]) {
|
||||
iframeRefs.current[tab.tabId] = React.createRef();
|
||||
|
@ -1,7 +1,6 @@
|
||||
import React, { useEffect, useRef, useState } from 'react';
|
||||
import { AppsDevModeHome } from './AppsDevModeHome';
|
||||
import { Spacer } from '../../common/Spacer';
|
||||
|
||||
import {
|
||||
executeEvent,
|
||||
subscribeToEvent,
|
||||
@ -10,7 +9,6 @@ import {
|
||||
import { AppsParent } from './Apps-styles';
|
||||
import AppViewerContainer from './AppViewerContainer';
|
||||
import ShortUniqueId from 'short-unique-id';
|
||||
|
||||
import { Box, ButtonBase, useTheme } from '@mui/material';
|
||||
import { HomeIcon } from '../../assets/Icons/HomeIcon';
|
||||
import { Save } from '../Save/Save';
|
||||
@ -137,7 +135,6 @@ export const AppsDevMode = ({
|
||||
setTabs(copyTabs);
|
||||
setSelectedTab(newTab);
|
||||
setMode('viewer');
|
||||
|
||||
setIsNewTabWindow(false);
|
||||
};
|
||||
|
||||
@ -260,6 +257,7 @@ export const AppsDevMode = ({
|
||||
}
|
||||
/>
|
||||
</ButtonBase>
|
||||
|
||||
<ButtonBase
|
||||
onClick={() => {
|
||||
setDesktopViewMode('apps');
|
||||
@ -282,6 +280,7 @@ export const AppsDevMode = ({
|
||||
/>
|
||||
</IconWrapper>
|
||||
</ButtonBase>
|
||||
|
||||
<ButtonBase
|
||||
onClick={() => {
|
||||
setDesktopViewMode('chat');
|
||||
@ -351,6 +350,7 @@ export const AppsDevMode = ({
|
||||
}}
|
||||
>
|
||||
<Spacer height="30px" />
|
||||
|
||||
<AppsDevModeHome
|
||||
myName={myName}
|
||||
availableQapps={availableQapps}
|
||||
|
@ -1,14 +1,12 @@
|
||||
import React, { useContext, useMemo, useState } from 'react';
|
||||
import { useContext, useState } from 'react';
|
||||
import {
|
||||
AppCircle,
|
||||
AppCircleContainer,
|
||||
AppCircleLabel,
|
||||
AppLibrarySubTitle,
|
||||
AppsContainer,
|
||||
AppsParent,
|
||||
} from './Apps-styles';
|
||||
import { Buffer } from 'buffer';
|
||||
|
||||
import {
|
||||
Avatar,
|
||||
Box,
|
||||
@ -17,13 +15,11 @@ import {
|
||||
Dialog,
|
||||
DialogActions,
|
||||
DialogContent,
|
||||
DialogContentText,
|
||||
DialogTitle,
|
||||
Input,
|
||||
} from '@mui/material';
|
||||
import { Add } from '@mui/icons-material';
|
||||
import { MyContext, getBaseApiReact } from '../../App';
|
||||
import LogoSelected from '../../assets/svgs/LogoSelected.svg';
|
||||
import { executeEvent } from '../../utils/events';
|
||||
import { Spacer } from '../../common/Spacer';
|
||||
import { useModal } from '../../common/useModal';
|
||||
@ -31,6 +27,8 @@ import { createEndpoint, isUsingLocal } from '../../background';
|
||||
import { Label } from '../Group/AddGroup';
|
||||
import ShortUniqueId from 'short-unique-id';
|
||||
import swaggerSVG from '../../assets/svgs/swagger.svg';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
|
||||
const uid = new ShortUniqueId({ length: 8 });
|
||||
|
||||
export const AppsDevModeHome = ({
|
||||
@ -43,7 +41,7 @@ export const AppsDevModeHome = ({
|
||||
const [domain, setDomain] = useState('127.0.0.1');
|
||||
const [port, setPort] = useState('');
|
||||
const [selectedPreviewFile, setSelectedPreviewFile] = useState(null);
|
||||
|
||||
const { t } = useTranslation(['core', 'group']);
|
||||
const { isShow, onCancel, onOk, show, message } = useModal();
|
||||
const {
|
||||
openSnackGlobal,
|
||||
@ -61,6 +59,7 @@ export const AppsDevModeHome = ({
|
||||
console.log('No file selected.');
|
||||
}
|
||||
};
|
||||
|
||||
const handleSelectDirectry = async (existingDirectoryPath) => {
|
||||
const { buffer, directoryPath } =
|
||||
await window.electron.selectAndZipDirectory(existingDirectoryPath);
|
||||
@ -79,8 +78,7 @@ export const AppsDevModeHome = ({
|
||||
|
||||
setInfoSnackCustom({
|
||||
type: 'error',
|
||||
message:
|
||||
'Please use your local node for dev mode! Logout and use Local node.',
|
||||
message: '',
|
||||
});
|
||||
return;
|
||||
}
|
||||
@ -115,20 +113,21 @@ export const AppsDevModeHome = ({
|
||||
const usingLocal = await isUsingLocal();
|
||||
if (!usingLocal) {
|
||||
setOpenSnackGlobal(true);
|
||||
|
||||
setInfoSnackCustom({
|
||||
type: 'error',
|
||||
message:
|
||||
'Please use your local node for dev mode! Logout and use Local node.',
|
||||
message: t('core:message.generic.devmode_local_node', {
|
||||
postProcess: 'capitalizeFirst',
|
||||
}),
|
||||
});
|
||||
return;
|
||||
}
|
||||
if (!myName) {
|
||||
setOpenSnackGlobal(true);
|
||||
|
||||
setInfoSnackCustom({
|
||||
type: 'error',
|
||||
message: 'You need a name to use preview',
|
||||
message: t('core:message.generic.name_preview', {
|
||||
postProcess: 'capitalizeFirst',
|
||||
}),
|
||||
});
|
||||
return;
|
||||
}
|
||||
@ -137,15 +136,16 @@ export const AppsDevModeHome = ({
|
||||
|
||||
if (!buffer) {
|
||||
setOpenSnackGlobal(true);
|
||||
|
||||
setInfoSnackCustom({
|
||||
type: 'error',
|
||||
message: 'Please select a file',
|
||||
message: t('core:message.generic.select_file', {
|
||||
postProcess: 'capitalizeFirst',
|
||||
}),
|
||||
});
|
||||
return;
|
||||
}
|
||||
const postBody = Buffer.from(buffer).toString('base64');
|
||||
|
||||
const postBody = Buffer.from(buffer).toString('base64');
|
||||
const endpoint = await createEndpoint(
|
||||
`/arbitrary/APP/${myName}/zip?preview=true`
|
||||
);
|
||||
@ -156,6 +156,7 @@ export const AppsDevModeHome = ({
|
||||
},
|
||||
body: postBody,
|
||||
});
|
||||
|
||||
if (!response?.ok) throw new Error('Invalid zip');
|
||||
const previewPath = await response.text();
|
||||
if (tabId) {
|
||||
@ -192,20 +193,21 @@ export const AppsDevModeHome = ({
|
||||
const usingLocal = await isUsingLocal();
|
||||
if (!usingLocal) {
|
||||
setOpenSnackGlobal(true);
|
||||
|
||||
setInfoSnackCustom({
|
||||
type: 'error',
|
||||
message:
|
||||
'Please use your local node for dev mode! Logout and use Local node.',
|
||||
message: t('core:message.generic.devmode_local_node', {
|
||||
postProcess: 'capitalizeFirst',
|
||||
}),
|
||||
});
|
||||
return;
|
||||
}
|
||||
if (!myName) {
|
||||
setOpenSnackGlobal(true);
|
||||
|
||||
setInfoSnackCustom({
|
||||
type: 'error',
|
||||
message: 'You need a name to use preview',
|
||||
message: t('core:message.generic.name_preview', {
|
||||
postProcess: 'capitalizeFirst',
|
||||
}),
|
||||
});
|
||||
return;
|
||||
}
|
||||
@ -214,15 +216,16 @@ export const AppsDevModeHome = ({
|
||||
|
||||
if (!buffer) {
|
||||
setOpenSnackGlobal(true);
|
||||
|
||||
setInfoSnackCustom({
|
||||
type: 'error',
|
||||
message: 'Please select a file',
|
||||
message: t('core:message.generic.select_file', {
|
||||
postProcess: 'capitalizeFirst',
|
||||
}),
|
||||
});
|
||||
return;
|
||||
}
|
||||
const postBody = Buffer.from(buffer).toString('base64');
|
||||
|
||||
const postBody = Buffer.from(buffer).toString('base64');
|
||||
const endpoint = await createEndpoint(
|
||||
`/arbitrary/APP/${myName}/zip?preview=true`
|
||||
);
|
||||
@ -233,8 +236,15 @@ export const AppsDevModeHome = ({
|
||||
},
|
||||
body: postBody,
|
||||
});
|
||||
if (!response?.ok) throw new Error('Invalid zip');
|
||||
|
||||
if (!response?.ok)
|
||||
throw new Error(
|
||||
t('core:message.error.invalid_zip', {
|
||||
postProcess: 'capitalizeFirst',
|
||||
})
|
||||
);
|
||||
const previewPath = await response.text();
|
||||
|
||||
if (tabId) {
|
||||
executeEvent('appsDevModeUpdateTab', {
|
||||
data: {
|
||||
@ -276,7 +286,7 @@ export const AppsDevModeHome = ({
|
||||
fontSize: '30px',
|
||||
}}
|
||||
>
|
||||
Dev Mode Apps
|
||||
{t('core:devmode_apps', { postProcess: 'capitalizeFirst' })}
|
||||
</AppLibrarySubTitle>
|
||||
</AppsContainer>
|
||||
|
||||
@ -301,7 +311,9 @@ export const AppsDevModeHome = ({
|
||||
<AppCircle>
|
||||
<Add>+</Add>
|
||||
</AppCircle>
|
||||
<AppCircleLabel>Server</AppCircleLabel>
|
||||
<AppCircleLabel>
|
||||
{t('core:server', { postProcess: 'capitalizeFirst' })}
|
||||
</AppCircleLabel>
|
||||
</AppCircleContainer>
|
||||
</ButtonBase>
|
||||
|
||||
@ -319,7 +331,9 @@ export const AppsDevModeHome = ({
|
||||
<Add>+</Add>
|
||||
</AppCircle>
|
||||
|
||||
<AppCircleLabel>Zip</AppCircleLabel>
|
||||
<AppCircleLabel>
|
||||
{t('core:zip', { postProcess: 'capitalizeFirst' })}
|
||||
</AppCircleLabel>
|
||||
</AppCircleContainer>
|
||||
</ButtonBase>
|
||||
|
||||
@ -336,7 +350,9 @@ export const AppsDevModeHome = ({
|
||||
<AppCircle>
|
||||
<Add>+</Add>
|
||||
</AppCircle>
|
||||
<AppCircleLabel>Directory</AppCircleLabel>
|
||||
<AppCircleLabel>
|
||||
{t('core:directory', { postProcess: 'capitalizeFirst' })}
|
||||
</AppCircleLabel>
|
||||
</AppCircleContainer>
|
||||
</ButtonBase>
|
||||
|
||||
@ -365,7 +381,9 @@ export const AppsDevModeHome = ({
|
||||
objectFit: 'fill',
|
||||
},
|
||||
}}
|
||||
alt="Q-Sandbox"
|
||||
alt={t('core:q_apps.q_sandbox', {
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
src={`${getBaseApiReact()}/arbitrary/THUMBNAIL/Q-Sandbox/qortal_avatar?async=true`}
|
||||
>
|
||||
<img
|
||||
@ -378,7 +396,11 @@ export const AppsDevModeHome = ({
|
||||
</Avatar>
|
||||
</AppCircle>
|
||||
|
||||
<AppCircleLabel>Q-Sandbox</AppCircleLabel>
|
||||
<AppCircleLabel>
|
||||
{t('core:q_apps.q_sandbox', {
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
</AppCircleLabel>
|
||||
</AppCircleContainer>
|
||||
</ButtonBase>
|
||||
|
||||
@ -407,7 +429,9 @@ export const AppsDevModeHome = ({
|
||||
objectFit: 'fill',
|
||||
},
|
||||
}}
|
||||
alt="API"
|
||||
alt={t('core:api', {
|
||||
postProcess: 'capitalizeAll',
|
||||
})}
|
||||
src={swaggerSVG}
|
||||
>
|
||||
<img
|
||||
@ -420,7 +444,11 @@ export const AppsDevModeHome = ({
|
||||
</Avatar>
|
||||
</AppCircle>
|
||||
|
||||
<AppCircleLabel>API</AppCircleLabel>
|
||||
<AppCircleLabel>
|
||||
{t('core:api', {
|
||||
postProcess: 'capitalizeAll',
|
||||
})}
|
||||
</AppCircleLabel>
|
||||
</AppCircleContainer>
|
||||
</ButtonBase>
|
||||
</AppsContainer>
|
||||
@ -437,7 +465,9 @@ export const AppsDevModeHome = ({
|
||||
}}
|
||||
>
|
||||
<DialogTitle id="alert-dialog-title">
|
||||
{'Add custom framework'}
|
||||
{t('core:action.add_custom_framework', {
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
</DialogTitle>
|
||||
|
||||
<DialogContent>
|
||||
@ -446,15 +476,22 @@ export const AppsDevModeHome = ({
|
||||
display: 'flex',
|
||||
flexDirection: 'column',
|
||||
gap: '5px',
|
||||
}} // TODO translate
|
||||
}}
|
||||
>
|
||||
<Label>Domain</Label>
|
||||
<Label>
|
||||
{t('core:domain', {
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
</Label>
|
||||
<Input
|
||||
placeholder="Domain"
|
||||
placeholder={t('core:domain', {
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
value={domain}
|
||||
onChange={(e) => setDomain(e.target.value)}
|
||||
/>
|
||||
</Box>
|
||||
|
||||
<Box
|
||||
sx={{
|
||||
display: 'flex',
|
||||
@ -463,9 +500,15 @@ export const AppsDevModeHome = ({
|
||||
marginTop: '15px',
|
||||
}}
|
||||
>
|
||||
<Label>Port</Label>
|
||||
<Label>
|
||||
{t('core:port', {
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
</Label>
|
||||
<Input
|
||||
placeholder="Port"
|
||||
placeholder={t('core:port', {
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
value={port}
|
||||
onChange={(e) => setPort(e.target.value)}
|
||||
/>
|
||||
@ -474,15 +517,20 @@ export const AppsDevModeHome = ({
|
||||
|
||||
<DialogActions>
|
||||
<Button variant="contained" onClick={onCancel}>
|
||||
Close
|
||||
{t('core:action.close', {
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
</Button>
|
||||
|
||||
<Button
|
||||
disabled={!domain || !port}
|
||||
variant="contained"
|
||||
onClick={() => onOk({ portVal: port, domainVal: domain })}
|
||||
autoFocus
|
||||
>
|
||||
Add
|
||||
{t('core:action.add', {
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
</Button>
|
||||
</DialogActions>
|
||||
</Dialog>
|
||||
|
@ -23,7 +23,6 @@ export const AppsDevModeNavBar = () => {
|
||||
const [navigationController, setNavigationController] = useAtom(
|
||||
navigationControllerAtom
|
||||
);
|
||||
|
||||
const theme = useTheme();
|
||||
const [isNewTabWindow, setIsNewTabWindow] = useState(false);
|
||||
const tabsRef = useRef(null);
|
||||
|
@ -16,6 +16,7 @@ import ArrowOutwardIcon from '@mui/icons-material/ArrowOutward';
|
||||
import { AppsPrivate } from './AppsPrivate';
|
||||
import ThemeSelector from '../Theme/ThemeSelector';
|
||||
import LanguageSelector from '../Language/LanguageSelector';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
|
||||
export const AppsHomeDesktop = ({
|
||||
setMode,
|
||||
@ -26,6 +27,7 @@ export const AppsHomeDesktop = ({
|
||||
}) => {
|
||||
const [qortalUrl, setQortalUrl] = useState('');
|
||||
const theme = useTheme();
|
||||
const { t } = useTranslation(['core', 'group']);
|
||||
|
||||
const openQortalUrl = () => {
|
||||
try {
|
||||
@ -41,6 +43,7 @@ export const AppsHomeDesktop = ({
|
||||
console.log(error);
|
||||
}
|
||||
};
|
||||
|
||||
return (
|
||||
<>
|
||||
<AppsContainer
|
||||
@ -51,9 +54,9 @@ export const AppsHomeDesktop = ({
|
||||
<AppLibrarySubTitle
|
||||
sx={{
|
||||
fontSize: '30px',
|
||||
}} // TODO translate
|
||||
}}
|
||||
>
|
||||
Apps Dashboard
|
||||
{t('core:apps_dashboard', { postProcess: 'capitalizeFirst' })}
|
||||
</AppLibrarySubTitle>
|
||||
</AppsContainer>
|
||||
|
||||
@ -66,14 +69,14 @@ export const AppsHomeDesktop = ({
|
||||
>
|
||||
<Box
|
||||
sx={{
|
||||
display: 'flex',
|
||||
gap: '20px',
|
||||
alignItems: 'center',
|
||||
backgroundColor: theme.palette.background.paper,
|
||||
padding: '7px',
|
||||
borderRadius: '20px',
|
||||
width: '100%',
|
||||
display: 'flex',
|
||||
gap: '20px',
|
||||
maxWidth: '500px',
|
||||
padding: '7px',
|
||||
width: '100%',
|
||||
}}
|
||||
>
|
||||
<Input
|
||||
@ -143,7 +146,9 @@ export const AppsHomeDesktop = ({
|
||||
<AddIcon />
|
||||
</AppCircle>
|
||||
|
||||
<AppCircleLabel>Library</AppCircleLabel>
|
||||
<AppCircleLabel>
|
||||
{t('core:library', { postProcess: 'capitalizeFirst' })}
|
||||
</AppCircleLabel>
|
||||
</AppCircleContainer>
|
||||
</ButtonBase>
|
||||
|
||||
|
@ -41,6 +41,7 @@ import { Virtuoso } from 'react-virtuoso';
|
||||
import { executeEvent } from '../../utils/events';
|
||||
import { ComposeP, ShowMessageReturnButton } from '../Group/Forum/Mail-styles';
|
||||
import { ReturnIcon } from '../../assets/Icons/ReturnIcon.tsx';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
|
||||
const officialAppList = [
|
||||
'q-tube',
|
||||
@ -104,6 +105,7 @@ export const AppsLibraryDesktop = ({
|
||||
const [searchValue, setSearchValue] = useState('');
|
||||
const virtuosoRef = useRef(null);
|
||||
const theme = useTheme();
|
||||
const { t } = useTranslation(['core', 'group']);
|
||||
|
||||
const officialApps = useMemo(() => {
|
||||
return availableQapps.filter(
|
||||
@ -210,9 +212,13 @@ export const AppsLibraryDesktop = ({
|
||||
ml: 1,
|
||||
paddingLeft: '12px',
|
||||
}}
|
||||
placeholder="Search for apps"
|
||||
placeholder={t('core:action.search_apps', {
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
inputProps={{
|
||||
'aria-label': 'Search for apps',
|
||||
'aria-label': t('core:action.search_apps', {
|
||||
postProcess: 'capitalizeFirst',
|
||||
}),
|
||||
fontSize: '16px',
|
||||
fontWeight: 400,
|
||||
}}
|
||||
@ -273,10 +279,14 @@ export const AppsLibraryDesktop = ({
|
||||
}}
|
||||
onClick={() => {
|
||||
executeEvent('navigateBack', {});
|
||||
}} // TODO translate
|
||||
}}
|
||||
>
|
||||
<ReturnIcon />
|
||||
<ComposeP>Return to Apps Dashboard</ComposeP>
|
||||
<ComposeP>
|
||||
{t('core:action.return_apps_dashboard', {
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
</ComposeP>
|
||||
</ShowMessageReturnButton>
|
||||
|
||||
<Spacer height="20px" />
|
||||
@ -302,7 +312,11 @@ export const AppsLibraryDesktop = ({
|
||||
</AppsWidthLimiter>
|
||||
) : searchedList?.length === 0 && debouncedValue ? (
|
||||
<AppsWidthLimiter>
|
||||
<Typography>No results</Typography>
|
||||
<Typography>
|
||||
{t('core:message.generic.no_results', {
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
</Typography>
|
||||
</AppsWidthLimiter>
|
||||
) : (
|
||||
<>
|
||||
@ -311,7 +325,7 @@ export const AppsLibraryDesktop = ({
|
||||
fontSize: '30px',
|
||||
}}
|
||||
>
|
||||
Official Apps
|
||||
{t('core:apps_official', { postProcess: 'capitalizeFirst' })}
|
||||
</AppLibrarySubTitle>
|
||||
|
||||
<Spacer height="45px" />
|
||||
@ -396,7 +410,13 @@ export const AppsLibraryDesktop = ({
|
||||
textAlign: 'start',
|
||||
}}
|
||||
>
|
||||
{hasPublishApp ? 'Update your app' : 'Publish your app'}
|
||||
{hasPublishApp
|
||||
? t('core:action.update_app', {
|
||||
postProcess: 'capitalizeFirst',
|
||||
})
|
||||
: t('core:action.publish_app', {
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
</AppLibrarySubTitle>
|
||||
|
||||
<Spacer height="18px" />
|
||||
@ -422,7 +442,13 @@ export const AppsLibraryDesktop = ({
|
||||
}}
|
||||
>
|
||||
<PublishQAppCTAButton>
|
||||
{hasPublishApp ? 'Update' : 'Publish'}
|
||||
{hasPublishApp
|
||||
? t('core:action.update', {
|
||||
postProcess: 'capitalizeFirst',
|
||||
})
|
||||
: t('core:action.publish', {
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
</PublishQAppCTAButton>
|
||||
|
||||
<Spacer width="20px" />
|
||||
@ -441,7 +467,9 @@ export const AppsLibraryDesktop = ({
|
||||
fontSize: '30px',
|
||||
}}
|
||||
>
|
||||
Categories
|
||||
{t('core:category_other', {
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
</AppLibrarySubTitle>
|
||||
|
||||
<Spacer height="18px" />
|
||||
@ -480,7 +508,7 @@ export const AppsLibraryDesktop = ({
|
||||
},
|
||||
}}
|
||||
>
|
||||
All
|
||||
{t('core:all', { postProcess: 'capitalizeFirst' })}
|
||||
</Box>
|
||||
</ButtonBase>
|
||||
|
||||
|
@ -32,6 +32,7 @@ import {
|
||||
sortablePinnedAppsAtom,
|
||||
} from '../../atoms/global';
|
||||
import { useAtom, useSetAtom } from 'jotai';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
|
||||
export function saveToLocalStorage(key, subKey, newValue) {
|
||||
try {
|
||||
@ -75,7 +76,7 @@ export const AppsNavBarDesktop = ({ disableBack }) => {
|
||||
);
|
||||
|
||||
const theme = useTheme();
|
||||
|
||||
const { t } = useTranslation(['core', 'group']);
|
||||
const [isNewTabWindow, setIsNewTabWindow] = useState(false);
|
||||
const tabsRef = useRef(null);
|
||||
const [anchorEl, setAnchorEl] = useState(null);
|
||||
@ -238,6 +239,7 @@ export const AppsNavBarDesktop = ({ disableBack }) => {
|
||||
}}
|
||||
/>
|
||||
</ButtonBase>
|
||||
|
||||
<ButtonBase
|
||||
onClick={(e) => {
|
||||
if (!selectedTab) return;
|
||||
@ -274,9 +276,9 @@ export const AppsNavBarDesktop = ({ disableBack }) => {
|
||||
paper: {
|
||||
sx: {
|
||||
backgroundColor: theme.palette.background.default,
|
||||
borderRadius: '5px',
|
||||
color: theme.palette.text.primary,
|
||||
width: '148px',
|
||||
borderRadius: '5px',
|
||||
},
|
||||
},
|
||||
}}
|
||||
@ -375,9 +377,18 @@ export const AppsNavBarDesktop = ({ disableBack }) => {
|
||||
: theme.palette.text.primary,
|
||||
},
|
||||
}}
|
||||
primary={`${isSelectedAppPinned ? 'Unpin app' : 'Pin app'}`}
|
||||
primary={`${
|
||||
isSelectedAppPinned
|
||||
? t('core:action.unpin_app', {
|
||||
postProcess: 'capitalizeFirst',
|
||||
})
|
||||
: t('core:action.pin_app', {
|
||||
postProcess: 'capitalizeFirst',
|
||||
})
|
||||
}}`}
|
||||
/>
|
||||
</MenuItem>
|
||||
|
||||
<MenuItem
|
||||
onClick={() => {
|
||||
if (selectedTab?.refreshFunc) {
|
||||
@ -404,6 +415,7 @@ export const AppsNavBarDesktop = ({ disableBack }) => {
|
||||
}}
|
||||
/>
|
||||
</ListItemIcon>
|
||||
|
||||
<ListItemText
|
||||
sx={{
|
||||
'& .MuiTypography-root': {
|
||||
@ -447,7 +459,9 @@ export const AppsNavBarDesktop = ({ disableBack }) => {
|
||||
color: theme.palette.text.primary,
|
||||
},
|
||||
}}
|
||||
primary="Copy link"
|
||||
primary={t('core:action.copy_link', {
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
/>
|
||||
</MenuItem>
|
||||
)}
|
||||
|
@ -36,6 +36,7 @@ import { fileToBase64 } from '../../utils/fileReading';
|
||||
import { objectToBase64 } from '../../qdn/encryption/group-encryption';
|
||||
import { getFee } from '../../background';
|
||||
import { useAtom } from 'jotai';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
|
||||
const maxFileSize = 50 * 1024 * 1024; // 50MB
|
||||
|
||||
@ -62,6 +63,7 @@ export const AppsPrivate = ({ myName }) => {
|
||||
const [memberGroups] = useAtom(memberGroupsAtom);
|
||||
|
||||
const theme = useTheme();
|
||||
const { t } = useTranslation(['core', 'group']);
|
||||
|
||||
const myGroupsPrivate = useMemo(() => {
|
||||
return memberGroups?.filter(
|
||||
@ -98,9 +100,11 @@ export const AppsPrivate = ({ myName }) => {
|
||||
errors.forEach((error) => {
|
||||
if (error.code === 'file-too-large') {
|
||||
console.error(
|
||||
`File ${file.name} is too large. Max size allowed is ${
|
||||
maxFileSize / (1024 * 1024)
|
||||
} MB.`
|
||||
t('core:message.error.file_too_large', {
|
||||
filename: file.name,
|
||||
size: maxFileSize / (1024 * 1024),
|
||||
postProcess: 'capitalizeFirst',
|
||||
})
|
||||
);
|
||||
}
|
||||
});
|
||||
@ -111,7 +115,6 @@ export const AppsPrivate = ({ myName }) => {
|
||||
const addPrivateApp = async () => {
|
||||
try {
|
||||
if (privateAppValues?.groupId === 0) return;
|
||||
|
||||
await openApp(privateAppValues, true);
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
@ -139,9 +142,28 @@ export const AppsPrivate = ({ myName }) => {
|
||||
const publishPrivateApp = async () => {
|
||||
try {
|
||||
if (selectedGroup === 0) return;
|
||||
if (!logo) throw new Error('Please select an image for a logo');
|
||||
if (!myName) throw new Error('You need a Qortal name to publish');
|
||||
if (!newPrivateAppValues?.name) throw new Error('Your app needs a name');
|
||||
|
||||
if (!logo)
|
||||
throw new Error(
|
||||
t('core:message.generic.select_image', {
|
||||
postProcess: 'capitalizeFirst',
|
||||
})
|
||||
);
|
||||
|
||||
if (!myName)
|
||||
throw new Error(
|
||||
t('core:message.generic.name_publish', {
|
||||
postProcess: 'capitalizeFirst',
|
||||
})
|
||||
);
|
||||
|
||||
if (!newPrivateAppValues?.name)
|
||||
throw new Error(
|
||||
t('core:message.error.app_need_name', {
|
||||
postProcess: 'capitalizeFirst',
|
||||
})
|
||||
);
|
||||
|
||||
const base64Logo = await fileToBase64(logo);
|
||||
const base64App = await fileToBase64(file);
|
||||
const objectToSave = {
|
||||
@ -160,16 +182,22 @@ export const AppsPrivate = ({ myName }) => {
|
||||
|
||||
if (decryptedData?.error) {
|
||||
throw new Error(
|
||||
decryptedData?.error || 'Unable to encrypt app. App not published'
|
||||
decryptedData?.error ||
|
||||
t('core:message.error.unable_encrypt_app', {
|
||||
postProcess: 'capitalizeFirst',
|
||||
})
|
||||
);
|
||||
}
|
||||
|
||||
const fee = await getFee('ARBITRARY');
|
||||
|
||||
await show({
|
||||
message: 'Would you like to publish this app?',
|
||||
message: t('core:question.publish_app', {
|
||||
postProcess: 'capitalizeFirst',
|
||||
}),
|
||||
publishFee: fee.fee + ' QORT',
|
||||
});
|
||||
|
||||
await new Promise((res, rej) => {
|
||||
window
|
||||
.sendMessage('publishOnQDN', {
|
||||
@ -185,7 +213,12 @@ export const AppsPrivate = ({ myName }) => {
|
||||
rej(response.error);
|
||||
})
|
||||
.catch((error) => {
|
||||
rej(error.message || 'An error occurred');
|
||||
rej(
|
||||
error.message ||
|
||||
t('core:message.error.generic', {
|
||||
postProcess: 'capitalizeFirst',
|
||||
})
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
@ -203,7 +236,11 @@ export const AppsPrivate = ({ myName }) => {
|
||||
setOpenSnackGlobal(true);
|
||||
setInfoSnackCustom({
|
||||
type: 'error',
|
||||
message: error?.message || 'Unable to publish app',
|
||||
message:
|
||||
error?.message ||
|
||||
t('core:message.error.unable_publish_app', {
|
||||
postProcess: 'capitalizeFirst',
|
||||
}),
|
||||
});
|
||||
}
|
||||
};
|
||||
@ -241,6 +278,7 @@ export const AppsPrivate = ({ myName }) => {
|
||||
<AppCircleLabel>Private</AppCircleLabel>
|
||||
</AppCircleContainer>
|
||||
</ButtonBase>
|
||||
|
||||
{isOpenPrivateModal && (
|
||||
<Dialog
|
||||
open={isOpenPrivateModal}
|
||||
@ -312,10 +350,19 @@ export const AppsPrivate = ({ myName }) => {
|
||||
display: 'flex',
|
||||
flexDirection: 'column',
|
||||
gap: '5px',
|
||||
}} // TODO translate
|
||||
}}
|
||||
>
|
||||
<Label>Select a group</Label>
|
||||
<Label>Only private groups will be shown</Label>
|
||||
<Label>
|
||||
{t('group:action.select_group', {
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
</Label>
|
||||
<Label>
|
||||
{t('group:message.generic.only_private_groups', {
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
</Label>
|
||||
|
||||
<Select
|
||||
labelId="demo-simple-select-label"
|
||||
id="demo-simple-select"
|
||||
@ -330,7 +377,11 @@ export const AppsPrivate = ({ myName }) => {
|
||||
});
|
||||
}}
|
||||
>
|
||||
<MenuItem value={0}>No group selected</MenuItem>
|
||||
<MenuItem value={0}>
|
||||
{t('group:message.generic.no_selection', {
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
</MenuItem>
|
||||
|
||||
{myGroupsPrivate
|
||||
?.filter((item) => !item?.isOpen)
|
||||
@ -343,7 +394,9 @@ export const AppsPrivate = ({ myName }) => {
|
||||
})}
|
||||
</Select>
|
||||
</Box>
|
||||
|
||||
<Spacer height="10px" />
|
||||
|
||||
<Box
|
||||
sx={{
|
||||
display: 'flex',
|
||||
@ -352,7 +405,9 @@ export const AppsPrivate = ({ myName }) => {
|
||||
marginTop: '15px',
|
||||
}}
|
||||
>
|
||||
<Label>name</Label>
|
||||
<Label>
|
||||
{t('core:name', { postProcess: 'capitalizeFirst' })}
|
||||
</Label>
|
||||
<Input
|
||||
placeholder="name"
|
||||
value={privateAppValues?.name}
|
||||
@ -366,6 +421,7 @@ export const AppsPrivate = ({ myName }) => {
|
||||
}
|
||||
/>
|
||||
</Box>
|
||||
|
||||
<Box
|
||||
sx={{
|
||||
display: 'flex',
|
||||
@ -374,9 +430,14 @@ export const AppsPrivate = ({ myName }) => {
|
||||
marginTop: '15px',
|
||||
}}
|
||||
>
|
||||
<Label>identifier</Label>
|
||||
<Label>
|
||||
{t('core:identifier', { postProcess: 'capitalizeFirst' })}
|
||||
</Label>
|
||||
|
||||
<Input
|
||||
placeholder="identifier"
|
||||
placeholder={t('core:identifier', {
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
value={privateAppValues?.identifier}
|
||||
onChange={(e) =>
|
||||
setPrivateAppValues((prev) => {
|
||||
@ -397,7 +458,7 @@ export const AppsPrivate = ({ myName }) => {
|
||||
setIsOpenPrivateModal(false);
|
||||
}}
|
||||
>
|
||||
Close
|
||||
{t('core:action.close', { postProcess: 'capitalizeFirst' })}
|
||||
</Button>
|
||||
<Button
|
||||
disabled={
|
||||
@ -410,7 +471,7 @@ export const AppsPrivate = ({ myName }) => {
|
||||
onClick={() => addPrivateApp()}
|
||||
autoFocus
|
||||
>
|
||||
Access
|
||||
{t('core:action.access', { postProcess: 'capitalizeFirst' })}
|
||||
</Button>
|
||||
</DialogActions>
|
||||
</>
|
||||
@ -424,7 +485,9 @@ export const AppsPrivate = ({ myName }) => {
|
||||
fontSize: '14px',
|
||||
}}
|
||||
>
|
||||
Select .zip file containing static content:{' '}
|
||||
{t('core:message.generic.select_zip', {
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
</PublishQAppInfo>
|
||||
|
||||
<Spacer height="10px" />
|
||||
@ -435,10 +498,11 @@ export const AppsPrivate = ({ myName }) => {
|
||||
fontSize: '14px',
|
||||
}}
|
||||
>{`
|
||||
50mb MB maximum`}</PublishQAppInfo>
|
||||
50mb MB max`}</PublishQAppInfo>
|
||||
{file && (
|
||||
<>
|
||||
<Spacer height="5px" />
|
||||
|
||||
<PublishQAppInfo>{`Selected: (${file?.name})`}</PublishQAppInfo>
|
||||
</>
|
||||
)}
|
||||
@ -454,7 +518,13 @@ export const AppsPrivate = ({ myName }) => {
|
||||
>
|
||||
{' '}
|
||||
<input {...getInputProps()} />
|
||||
{file ? 'Change' : 'Choose'} File
|
||||
{file
|
||||
? t('core:action.change_file', {
|
||||
postProcess: 'capitalizeFirst',
|
||||
})
|
||||
: t('core:action.choose_file', {
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
</PublishQAppChoseFile>
|
||||
|
||||
<Spacer height="20px" />
|
||||
@ -466,10 +536,18 @@ export const AppsPrivate = ({ myName }) => {
|
||||
gap: '5px',
|
||||
}}
|
||||
>
|
||||
<Label>Select a group</Label>
|
||||
<Label>
|
||||
Only groups where you are an admin will be shown
|
||||
{t('group:action.select_group', {
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
</Label>
|
||||
|
||||
<Label>
|
||||
{t('group:amessage.generic.admin_only', {
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
</Label>
|
||||
|
||||
<Select
|
||||
labelId="demo-simple-select-label"
|
||||
id="demo-simple-select"
|
||||
@ -477,7 +555,11 @@ export const AppsPrivate = ({ myName }) => {
|
||||
label="Groups where you are an admin"
|
||||
onChange={(e) => setSelectedGroup(e.target.value)}
|
||||
>
|
||||
<MenuItem value={0}>No group selected</MenuItem>
|
||||
<MenuItem value={0}>
|
||||
{t('group:message.generic.no_selection', {
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
</MenuItem>
|
||||
{myGroupsWhereIAmAdmin
|
||||
?.filter((item) => !item?.isOpen)
|
||||
.map((group) => {
|
||||
@ -500,9 +582,13 @@ export const AppsPrivate = ({ myName }) => {
|
||||
marginTop: '15px',
|
||||
}}
|
||||
>
|
||||
<Label>identifier</Label>
|
||||
<Label>
|
||||
{t('core:identifier', { postProcess: 'capitalizeFirst' })}
|
||||
</Label>
|
||||
<Input
|
||||
placeholder="identifier"
|
||||
placeholder={t('core:identifier', {
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
value={newPrivateAppValues?.identifier}
|
||||
onChange={(e) =>
|
||||
setNewPrivateAppValues((prev) => {
|
||||
@ -525,9 +611,14 @@ export const AppsPrivate = ({ myName }) => {
|
||||
marginTop: '15px',
|
||||
}}
|
||||
>
|
||||
<Label>App name</Label>
|
||||
<Label>
|
||||
{t('core:app_name', { postProcess: 'capitalizeFirst' })}
|
||||
</Label>
|
||||
|
||||
<Input
|
||||
placeholder="App name"
|
||||
placeholder={t('core:app_name', {
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
value={newPrivateAppValues?.name}
|
||||
onChange={(e) =>
|
||||
setNewPrivateAppValues((prev) => {
|
||||
@ -543,10 +634,15 @@ export const AppsPrivate = ({ myName }) => {
|
||||
<Spacer height="10px" />
|
||||
|
||||
<ImageUploader onPick={(file) => setLogo(file)}>
|
||||
<Button variant="contained">Choose logo</Button>
|
||||
<Button variant="contained">
|
||||
{t('core:action.choose_logo', {
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
</Button>
|
||||
</ImageUploader>
|
||||
|
||||
{logo?.name}
|
||||
|
||||
<Spacer height="25px" />
|
||||
</DialogContent>
|
||||
|
||||
@ -558,7 +654,7 @@ export const AppsPrivate = ({ myName }) => {
|
||||
clearFields();
|
||||
}}
|
||||
>
|
||||
Close
|
||||
{t('core:action.close', { postProcess: 'capitalizeFirst' })}
|
||||
</Button>
|
||||
|
||||
<Button
|
||||
@ -572,7 +668,7 @@ export const AppsPrivate = ({ myName }) => {
|
||||
onClick={() => publishPrivateApp()}
|
||||
autoFocus
|
||||
>
|
||||
Publish
|
||||
{t('core:action.publish', { postProcess: 'capitalizeFirst' })}
|
||||
</Button>
|
||||
</DialogActions>
|
||||
</>
|
||||
|
@ -1,4 +1,4 @@
|
||||
import React, { useContext, useState } from 'react';
|
||||
import { useContext, useState } from 'react';
|
||||
import { executeEvent } from '../../utils/events';
|
||||
import { getBaseApiReact, MyContext } from '../../App';
|
||||
import { createEndpoint } from '../../background';
|
||||
@ -7,10 +7,9 @@ import {
|
||||
sortablePinnedAppsAtom,
|
||||
} from '../../atoms/global';
|
||||
import { saveToLocalStorage } from './AppsNavBarDesktop';
|
||||
import { base64ToBlobUrl } from '../../utils/fileReading';
|
||||
import { base64ToUint8Array } from '../../qdn/encryption/group-encryption';
|
||||
import { uint8ArrayToObject } from '../../backgroundFunctions/encryption';
|
||||
import { useAtom, useSetAtom } from 'jotai';
|
||||
import { useSetAtom } from 'jotai';
|
||||
|
||||
export const useHandlePrivateApps = () => {
|
||||
const [status, setStatus] = useState('');
|
||||
|
@ -1,7 +1,7 @@
|
||||
import { useCallback, useContext, useEffect, useMemo, useState } from 'react';
|
||||
import { useCallback, useContext, useEffect, useState } from 'react';
|
||||
import { executeEvent } from '../../utils/events';
|
||||
import { navigationControllerAtom } from '../../atoms/global';
|
||||
import { Filesystem, Directory, Encoding } from '@capacitor/filesystem';
|
||||
import { Filesystem, Directory } from '@capacitor/filesystem';
|
||||
import { saveFile } from '../../qortalRequests/get';
|
||||
import { mimeToExtensionMap } from '../../utils/memeTypes';
|
||||
import { MyContext } from '../../App';
|
||||
|
@ -76,14 +76,16 @@ export const DownloadWallet = ({
|
||||
if (!keepCurrentPassword && !newPassword) {
|
||||
setWalletToBeDownloadedError(
|
||||
t('auth:wallet.error.missing_new_password', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
})
|
||||
);
|
||||
return;
|
||||
}
|
||||
if (!walletToBeDownloadedPassword) {
|
||||
setWalletToBeDownloadedError(
|
||||
t('auth:wallet.error.missing_password', { postProcess: 'capitalize' })
|
||||
t('auth:wallet.error.missing_password', {
|
||||
postProcess: 'capitalizeFirst',
|
||||
})
|
||||
);
|
||||
return;
|
||||
}
|
||||
@ -157,7 +159,9 @@ export const DownloadWallet = ({
|
||||
fontWeight: 600,
|
||||
}}
|
||||
>
|
||||
{t('auth:action.download_account', { postProcess: 'capitalize' })}
|
||||
{t('auth:action.download_account', {
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
</TextP>
|
||||
</Box>
|
||||
|
||||
@ -167,7 +171,7 @@ export const DownloadWallet = ({
|
||||
<>
|
||||
<CustomLabel htmlFor="standard-adornment-password">
|
||||
{t('auth:wallet.password_confirmation', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
</CustomLabel>
|
||||
|
||||
@ -206,7 +210,7 @@ export const DownloadWallet = ({
|
||||
<Box sx={{ display: 'flex', alignItems: 'center' }}>
|
||||
<Typography sx={{ fontSize: '14px' }}>
|
||||
{t('auth:wallet.keep_password', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
</Typography>
|
||||
</Box>
|
||||
@ -217,7 +221,7 @@ export const DownloadWallet = ({
|
||||
<>
|
||||
<CustomLabel htmlFor="standard-adornment-password">
|
||||
{t('auth:wallet.new_password', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
</CustomLabel>
|
||||
|
||||
@ -233,7 +237,7 @@ export const DownloadWallet = ({
|
||||
|
||||
<CustomButton onClick={confirmPasswordToDownload}>
|
||||
{t('auth:password_confirmation', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
</CustomButton>
|
||||
|
||||
@ -248,13 +252,13 @@ export const DownloadWallet = ({
|
||||
await saveFileToDiskFunc();
|
||||
await showInfo({
|
||||
message: t('auth:message.generic.keep_secure', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
}),
|
||||
});
|
||||
}}
|
||||
>
|
||||
{t('auth:action.download_account', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
</CustomButton>
|
||||
</>
|
||||
|
@ -289,9 +289,9 @@ export const GroupAnnouncements = ({
|
||||
const fee = await getFee('ARBITRARY');
|
||||
|
||||
await show({
|
||||
message: t('group:question.perform_transaction', {
|
||||
message: t('core:question.perform_transaction', {
|
||||
action: 'ARBITRARY',
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
}),
|
||||
publishFee: fee.fee + ' QORT',
|
||||
});
|
||||
|
@ -77,26 +77,26 @@ export const CoreSyncStatus = () => {
|
||||
|
||||
let imagePath = syncingImg;
|
||||
let message = t('core:message.status.synchronizing', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
});
|
||||
|
||||
if (isMintingPossible && !isUsingGateway) {
|
||||
imagePath = syncedMintingImg;
|
||||
message = `${t(`core:message.status.${isSynchronizing ? 'synchronizing' : 'synchronized'}`, { postProcess: 'capitalize' })} ${t('core:message.status.minting')}`;
|
||||
message = `${t(`core:message.status.${isSynchronizing ? 'synchronizing' : 'synchronized'}`, { postProcess: 'capitalizeFirst' })} ${t('core:message.status.minting')}`;
|
||||
} else if (isSynchronizing === true && syncPercent === 99) {
|
||||
imagePath = syncingImg;
|
||||
} else if (isSynchronizing && !isMintingPossible && syncPercent === 100) {
|
||||
imagePath = syncingImg;
|
||||
message = `${t('core:message.status.synchronizing', { postProcess: 'capitalize' })} ${!isUsingGateway ? t('core:message.status.not_minting') : ''}`;
|
||||
message = `${t('core:message.status.synchronizing', { postProcess: 'capitalizeFirst' })} ${!isUsingGateway ? t('core:message.status.not_minting') : ''}`;
|
||||
} else if (!isSynchronizing && !isMintingPossible && syncPercent === 100) {
|
||||
imagePath = syncedImg;
|
||||
message = `${t('core:message.status.synchronized', { postProcess: 'capitalize' })} ${!isUsingGateway ? t('core:message.status.not_minting') : ''}`;
|
||||
message = `${t('core:message.status.synchronized', { postProcess: 'capitalizeFirst' })} ${!isUsingGateway ? t('core:message.status.not_minting') : ''}`;
|
||||
} else if (isSynchronizing && isMintingPossible && syncPercent === 100) {
|
||||
imagePath = syncingImg;
|
||||
message = `${t('core:message.status.synchronizing', { postProcess: 'capitalize' })} ${!isUsingGateway ? t('core:message.status.minting') : ''}`;
|
||||
message = `${t('core:message.status.synchronizing', { postProcess: 'capitalizeFirst' })} ${!isUsingGateway ? t('core:message.status.minting') : ''}`;
|
||||
} else if (!isSynchronizing && isMintingPossible && syncPercent === 100) {
|
||||
imagePath = syncedMintingImg;
|
||||
message = `${t('core:message.status.synchronized', { postProcess: 'capitalize' })} ${!isUsingGateway ? t('core:message.status.minting') : ''}`;
|
||||
message = `${t('core:message.status.synchronized', { postProcess: 'capitalizeFirst' })} ${!isUsingGateway ? t('core:message.status.minting') : ''}`;
|
||||
}
|
||||
|
||||
return (
|
||||
@ -121,36 +121,38 @@ export const CoreSyncStatus = () => {
|
||||
top: '10px',
|
||||
}}
|
||||
>
|
||||
<h3>{t('core:core.information', { postProcess: 'capitalize' })}</h3>
|
||||
<h3>
|
||||
{t('core:core.information', { postProcess: 'capitalizeFirst' })}
|
||||
</h3>
|
||||
|
||||
<h4 className="lineHeight">
|
||||
{t('core:core.version', { postProcess: 'capitalize' })}:{' '}
|
||||
{t('core:core.version', { postProcess: 'capitalizeFirst' })}:{' '}
|
||||
<span style={{ color: '#03a9f4' }}>{buildVersion}</span>
|
||||
</h4>
|
||||
|
||||
<h4 className="lineHeight">{message}</h4>
|
||||
|
||||
<h4 className="lineHeight">
|
||||
{t('core:core.block_height', { postProcess: 'capitalize' })}:{' '}
|
||||
{t('core:core.block_height', { postProcess: 'capitalizeFirst' })}:{' '}
|
||||
<span style={{ color: '#03a9f4' }}>{height || ''}</span>
|
||||
</h4>
|
||||
|
||||
<h4 className="lineHeight">
|
||||
{t('core:core.peers', { postProcess: 'capitalize' })}:{' '}
|
||||
{t('core:core.peers', { postProcess: 'capitalizeFirst' })}:{' '}
|
||||
<span style={{ color: '#03a9f4' }}>
|
||||
{numberOfConnections || ''}
|
||||
</span>
|
||||
</h4>
|
||||
|
||||
<h4 className="lineHeight">
|
||||
{t('auth:node.using_public', { postProcess: 'capitalize' })}:{' '}
|
||||
{t('auth:node.using_public', { postProcess: 'capitalizeFirst' })}:{' '}
|
||||
<span style={{ color: '#03a9f4' }}>
|
||||
{isUsingGateway?.toString()}
|
||||
</span>
|
||||
</h4>
|
||||
|
||||
<h4 className="lineHeight">
|
||||
{t('core:ui.version', { postProcess: 'capitalize' })}:{' '}
|
||||
{t('core:ui.version', { postProcess: 'capitalizeFirst' })}:{' '}
|
||||
<span style={{ color: '#03a9f4' }}>{manifestData.version}</span>
|
||||
</h4>
|
||||
</div>
|
||||
|
@ -46,7 +46,7 @@ export const Explore = ({ setDesktopViewMode }) => {
|
||||
fontSize: '1rem',
|
||||
}}
|
||||
>
|
||||
{t('tutorial:initial.trade_qort', { postProcess: 'capitalize' })}
|
||||
{t('tutorial:initial.trade_qort', { postProcess: 'capitalizeFirst' })}
|
||||
</Typography>
|
||||
</ButtonBase>
|
||||
|
||||
@ -73,7 +73,7 @@ export const Explore = ({ setDesktopViewMode }) => {
|
||||
fontSize: '1rem',
|
||||
}}
|
||||
>
|
||||
{t('tutorial:initial.see_apps', { postProcess: 'capitalize' })}
|
||||
{t('tutorial:initial.see_apps', { postProcess: 'capitalizeFirst' })}
|
||||
</Typography>
|
||||
</ButtonBase>
|
||||
|
||||
@ -102,7 +102,9 @@ export const Explore = ({ setDesktopViewMode }) => {
|
||||
fontSize: '1rem',
|
||||
}}
|
||||
>
|
||||
{t('tutorial:initial.general_chat', { postProcess: 'capitalize' })}
|
||||
{t('tutorial:initial.general_chat', {
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
</Typography>
|
||||
</ButtonBase>
|
||||
|
||||
@ -129,7 +131,7 @@ export const Explore = ({ setDesktopViewMode }) => {
|
||||
fontSize: '1rem',
|
||||
}}
|
||||
>
|
||||
{t('core:wallet.wallet_other', { postProcess: 'capitalize' })}
|
||||
{t('core:wallet.wallet_other', { postProcess: 'capitalizeFirst' })}
|
||||
</Typography>
|
||||
</ButtonBase>
|
||||
</Box>
|
||||
|
@ -111,7 +111,7 @@ export const GeneralNotifications = ({ address }) => {
|
||||
userSelect: 'none',
|
||||
}}
|
||||
>
|
||||
No new notifications
|
||||
{t('core:message.generic.no_notifications')}
|
||||
</Typography>
|
||||
)}
|
||||
{hasNewPayment && (
|
||||
|
@ -70,9 +70,9 @@ export const JoinGroup = () => {
|
||||
const fee = await getFee('JOIN_GROUP');
|
||||
|
||||
await show({
|
||||
message: t('group:question.perform_transaction', {
|
||||
message: t('core:question.perform_transaction', {
|
||||
action: 'JOIN_GROUP',
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
}),
|
||||
publishFee: fee.fee + ' QORT',
|
||||
});
|
||||
@ -89,7 +89,7 @@ export const JoinGroup = () => {
|
||||
setInfoSnack({
|
||||
type: 'success',
|
||||
message: t('group:message.success.group_join', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
}),
|
||||
});
|
||||
|
||||
@ -100,11 +100,11 @@ export const JoinGroup = () => {
|
||||
type: 'joined-group',
|
||||
label: t('group:message.success.group_join_label', {
|
||||
group_name: group?.groupName,
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
}),
|
||||
labelDone: t('group:message.success.group_join_label', {
|
||||
group_name: group?.groupName,
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
}),
|
||||
done: false,
|
||||
groupId,
|
||||
@ -118,11 +118,11 @@ export const JoinGroup = () => {
|
||||
type: 'joined-group-request',
|
||||
label: t('group:message.success.group_join_request', {
|
||||
group_name: group?.groupName,
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
}),
|
||||
labelDone: t('group:message.success.group_join_outcome', {
|
||||
group_name: group?.groupName,
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
}),
|
||||
done: false,
|
||||
groupId,
|
||||
@ -147,7 +147,9 @@ export const JoinGroup = () => {
|
||||
type: 'error',
|
||||
message:
|
||||
error.message ||
|
||||
t('core:message.error.generic', { postProcess: 'capitalize' }),
|
||||
t('core:message.error.generic', {
|
||||
postProcess: 'capitalizeFirst',
|
||||
}),
|
||||
});
|
||||
setOpenSnack(true);
|
||||
rej(error);
|
||||
@ -205,7 +207,7 @@ export const JoinGroup = () => {
|
||||
fontWeight: 600,
|
||||
}}
|
||||
>
|
||||
{t('group:group.name', { postProcess: 'capitalize' })}:{' '}
|
||||
{t('group:group.name', { postProcess: 'capitalizeFirst' })}:{' '}
|
||||
{` ${groupInfo?.groupName}`}
|
||||
</Typography>
|
||||
|
||||
@ -215,8 +217,10 @@ export const JoinGroup = () => {
|
||||
fontWeight: 600,
|
||||
}}
|
||||
>
|
||||
{t('group:group.member_number', { postProcess: 'capitalize' })}:{' '}
|
||||
{` ${groupInfo?.memberCount}`}
|
||||
{t('group:group.member_number', {
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
: {` ${groupInfo?.memberCount}`}
|
||||
</Typography>
|
||||
|
||||
{groupInfo?.description && (
|
||||
@ -237,7 +241,7 @@ export const JoinGroup = () => {
|
||||
}}
|
||||
>
|
||||
{t('group:message.generic.already_in_group', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
</Typography>
|
||||
)}
|
||||
@ -249,7 +253,7 @@ export const JoinGroup = () => {
|
||||
}}
|
||||
>
|
||||
{t('group:message.generic.closed_group', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
</Typography>
|
||||
)}
|
||||
@ -276,7 +280,7 @@ export const JoinGroup = () => {
|
||||
}}
|
||||
>
|
||||
{t('core:action.join', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
</CustomButtonAccept>
|
||||
</ButtonBase>
|
||||
@ -291,7 +295,7 @@ export const JoinGroup = () => {
|
||||
onClick={() => setIsOpen(false)}
|
||||
>
|
||||
{t('core:action.close', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
</CustomButtonAccept>
|
||||
</DialogActions>
|
||||
|
@ -105,22 +105,22 @@ export const AddGroup = ({ address, open, setOpen }) => {
|
||||
if (!name)
|
||||
throw new Error(
|
||||
t('group:message.error.name_required', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
})
|
||||
);
|
||||
if (!description)
|
||||
throw new Error(
|
||||
t('group:message.error.description_required', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
})
|
||||
);
|
||||
|
||||
const fee = await getFee('CREATE_GROUP');
|
||||
|
||||
await show({
|
||||
message: t('group:question.perform_transaction', {
|
||||
message: t('core:question.perform_transaction', {
|
||||
action: 'CREATE_GROUP',
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
}),
|
||||
publishFee: fee.fee + ' QORT',
|
||||
});
|
||||
@ -140,7 +140,7 @@ export const AddGroup = ({ address, open, setOpen }) => {
|
||||
setInfoSnack({
|
||||
type: 'success',
|
||||
message: t('group:message.success.group_creation', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
}),
|
||||
});
|
||||
setOpenSnack(true);
|
||||
@ -150,11 +150,11 @@ export const AddGroup = ({ address, open, setOpen }) => {
|
||||
type: 'created-group',
|
||||
label: t('group:message.success.group_creation_name', {
|
||||
group_name: name,
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
}),
|
||||
labelDone: t('group:message.success.group_creation_label', {
|
||||
group_name: name,
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
}),
|
||||
done: false,
|
||||
},
|
||||
@ -172,7 +172,9 @@ export const AddGroup = ({ address, open, setOpen }) => {
|
||||
rej({
|
||||
message:
|
||||
error.message ||
|
||||
t('core:message.error.generic', { postProcess: 'capitalize' }),
|
||||
t('core:message.error.generic', {
|
||||
postProcess: 'capitalizeFirst',
|
||||
}),
|
||||
});
|
||||
});
|
||||
});
|
||||
@ -225,7 +227,7 @@ export const AddGroup = ({ address, open, setOpen }) => {
|
||||
>
|
||||
<Toolbar>
|
||||
<Typography sx={{ ml: 2, flex: 1 }} variant="h4" component="div">
|
||||
{t('group:group.management', { postProcess: 'capitalize' })}
|
||||
{t('group:group.management', { postProcess: 'capitalizeFirst' })}
|
||||
</Typography>
|
||||
|
||||
<IconButton
|
||||
@ -267,7 +269,7 @@ export const AddGroup = ({ address, open, setOpen }) => {
|
||||
>
|
||||
<Tab
|
||||
label={t('group:action.create_group', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
{...a11yProps(0)}
|
||||
sx={{
|
||||
@ -279,7 +281,7 @@ export const AddGroup = ({ address, open, setOpen }) => {
|
||||
/>
|
||||
<Tab
|
||||
label={t('group:action.find_group', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
{...a11yProps(1)}
|
||||
sx={{
|
||||
@ -291,7 +293,7 @@ export const AddGroup = ({ address, open, setOpen }) => {
|
||||
/>
|
||||
<Tab
|
||||
label={t('group:group.invites', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
{...a11yProps(2)}
|
||||
sx={{
|
||||
@ -328,13 +330,13 @@ export const AddGroup = ({ address, open, setOpen }) => {
|
||||
>
|
||||
<Label>
|
||||
{t('group:group.name', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
</Label>
|
||||
|
||||
<Input
|
||||
placeholder={t('group:group.name', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
value={name}
|
||||
onChange={(e) => setName(e.target.value)}
|
||||
@ -350,13 +352,13 @@ export const AddGroup = ({ address, open, setOpen }) => {
|
||||
>
|
||||
<Label>
|
||||
{t('group:group.description', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
</Label>
|
||||
|
||||
<Input
|
||||
placeholder={t('group:group.description', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
value={description}
|
||||
onChange={(e) => setDescription(e.target.value)}
|
||||
@ -372,7 +374,7 @@ export const AddGroup = ({ address, open, setOpen }) => {
|
||||
>
|
||||
<Label>
|
||||
{t('group:group.type', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
</Label>
|
||||
|
||||
@ -385,12 +387,12 @@ export const AddGroup = ({ address, open, setOpen }) => {
|
||||
>
|
||||
<MenuItem value={1}>
|
||||
{t('group:group.open', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
</MenuItem>
|
||||
<MenuItem value={0}>
|
||||
{t('group:group.closed', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
</MenuItem>
|
||||
</Select>
|
||||
@ -407,7 +409,7 @@ export const AddGroup = ({ address, open, setOpen }) => {
|
||||
>
|
||||
<Typography>
|
||||
{t('group:advanced_options', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
</Typography>
|
||||
|
||||
@ -424,7 +426,7 @@ export const AddGroup = ({ address, open, setOpen }) => {
|
||||
>
|
||||
<Label>
|
||||
{t('group:approval_threshold', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
</Label>
|
||||
|
||||
@ -437,12 +439,12 @@ export const AddGroup = ({ address, open, setOpen }) => {
|
||||
>
|
||||
<MenuItem value={0}>
|
||||
{t('core:count.none', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
</MenuItem>
|
||||
<MenuItem value={1}>
|
||||
{t('core:count.one', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
</MenuItem>
|
||||
<MenuItem value={20}>20%</MenuItem>
|
||||
@ -462,7 +464,7 @@ export const AddGroup = ({ address, open, setOpen }) => {
|
||||
>
|
||||
<Label>
|
||||
{t('group:block_delay.minimum', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
</Label>
|
||||
|
||||
@ -521,7 +523,7 @@ export const AddGroup = ({ address, open, setOpen }) => {
|
||||
>
|
||||
<Label>
|
||||
{t('group:block_delay.maximum', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
</Label>
|
||||
|
||||
@ -582,7 +584,7 @@ export const AddGroup = ({ address, open, setOpen }) => {
|
||||
onClick={handleCreateGroup}
|
||||
>
|
||||
{t('group:action.create_group', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
</Button>
|
||||
</Box>
|
||||
|
@ -113,9 +113,9 @@ export const AddGroupList = ({ setInfoSnack, setOpenSnack }) => {
|
||||
const fee = await getFee('JOIN_GROUP');
|
||||
|
||||
await show({
|
||||
message: t('group:question.perform_transaction', {
|
||||
message: t('core:question.perform_transaction', {
|
||||
action: 'JOIN_GROUP',
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
}),
|
||||
publishFee: fee.fee + ' QORT',
|
||||
});
|
||||
@ -131,7 +131,7 @@ export const AddGroupList = ({ setInfoSnack, setOpenSnack }) => {
|
||||
setInfoSnack({
|
||||
type: 'success',
|
||||
message: t('group:message.success.join_group', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
}),
|
||||
});
|
||||
|
||||
@ -142,11 +142,11 @@ export const AddGroupList = ({ setInfoSnack, setOpenSnack }) => {
|
||||
type: 'joined-group',
|
||||
label: t('group:message.success.group_join_label', {
|
||||
group_name: group?.groupName,
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
}),
|
||||
labelDone: t('group:message.success.group_join_label', {
|
||||
group_name: group?.groupName,
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
}),
|
||||
done: false,
|
||||
groupId,
|
||||
@ -160,11 +160,11 @@ export const AddGroupList = ({ setInfoSnack, setOpenSnack }) => {
|
||||
type: 'joined-group-request',
|
||||
label: t('group:message.success.group_join_request', {
|
||||
group_name: group?.groupName,
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
}),
|
||||
labelDone: t('group:message.success.group_join_outcome', {
|
||||
group_name: group?.groupName,
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
}),
|
||||
done: false,
|
||||
groupId,
|
||||
@ -243,7 +243,7 @@ export const AddGroupList = ({ setInfoSnack, setOpenSnack }) => {
|
||||
}}
|
||||
>
|
||||
<Typography>
|
||||
{t('core:action.join', { postProcess: 'capitalize' })}{' '}
|
||||
{t('core:action.join', { postProcess: 'capitalizeFirst' })}{' '}
|
||||
{group?.groupName}
|
||||
</Typography>
|
||||
<Typography>
|
||||
@ -257,7 +257,7 @@ export const AddGroupList = ({ setInfoSnack, setOpenSnack }) => {
|
||||
onClick={() => handleJoinGroup(group, group?.isOpen)}
|
||||
>
|
||||
{t('group:action.join_group', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
</LoadingButton>
|
||||
</Box>
|
||||
|
@ -170,7 +170,9 @@ export const GroupMail = ({
|
||||
.catch((error) => {
|
||||
rej(
|
||||
error.message ||
|
||||
t('core:message.error.generic', { postProcess: 'capitalize' })
|
||||
t('core:message.error.generic', {
|
||||
postProcess: 'capitalizeFirst',
|
||||
})
|
||||
);
|
||||
});
|
||||
});
|
||||
@ -754,7 +756,7 @@ export const GroupMail = ({
|
||||
<ThreadSingleLastMessageP>
|
||||
<ThreadSingleLastMessageSpanP>
|
||||
{t('group:last_message', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
:{' '}
|
||||
</ThreadSingleLastMessageSpanP>
|
||||
@ -791,7 +793,7 @@ export const GroupMail = ({
|
||||
}}
|
||||
>
|
||||
{t('core:page.last', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
</Typography>
|
||||
<ArrowForwardIosIcon
|
||||
@ -825,7 +827,7 @@ export const GroupMail = ({
|
||||
open={isLoading}
|
||||
info={{
|
||||
message: t('group:message.success.loading_threads', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
}),
|
||||
}}
|
||||
/>
|
||||
|
@ -182,29 +182,29 @@ export const NewThread = ({
|
||||
const missingFields: string[] = [];
|
||||
|
||||
if (!isMessage && !threadTitle) {
|
||||
errorMsg = t('group:question.provide_thread', {
|
||||
postProcess: 'capitalize',
|
||||
errorMsg = t('core:question.provide_thread', {
|
||||
postProcess: 'capitalizeFirst',
|
||||
});
|
||||
}
|
||||
|
||||
if (!name) {
|
||||
errorMsg = t('group:message.error.access_name', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
});
|
||||
}
|
||||
|
||||
if (!groupInfo) {
|
||||
errorMsg = t('group:message.error.group_info', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
});
|
||||
}
|
||||
|
||||
// if (!description) missingFields.push('subject')
|
||||
if (missingFields.length > 0) {
|
||||
const missingFieldsString = missingFields.join(', ');
|
||||
const errMsg = t('group:message.error.missing_field', {
|
||||
const errMsg = t('core:message.error.missing_fields', {
|
||||
field: missingFieldsString,
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
});
|
||||
errorMsg = errMsg;
|
||||
}
|
||||
@ -217,7 +217,7 @@ export const NewThread = ({
|
||||
|
||||
if (!htmlContent?.trim() || htmlContent?.trim() === '<p></p>') {
|
||||
const errMsg = t('group:message.generic.provide_message', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
});
|
||||
throw new Error(errMsg);
|
||||
}
|
||||
@ -229,9 +229,9 @@ export const NewThread = ({
|
||||
feeToShow = +feeToShow * 2;
|
||||
}
|
||||
await show({
|
||||
message: t('group:question.perform_transaction', {
|
||||
message: t('core:question.perform_transaction', {
|
||||
action: 'ARBITRARY',
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
}),
|
||||
publishFee: feeToShow + ' QORT',
|
||||
});
|
||||
@ -257,7 +257,7 @@ export const NewThread = ({
|
||||
isPrivate === false ? null : await getSecretKey(false, true);
|
||||
if (!secretKey && isPrivate) {
|
||||
const errMsg = t('group:message.error.group_secret_key', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
});
|
||||
throw new Error(errMsg);
|
||||
}
|
||||
@ -320,7 +320,7 @@ export const NewThread = ({
|
||||
setInfoSnack({
|
||||
type: 'success',
|
||||
message: t('group:message.success.thread_creation', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
}),
|
||||
});
|
||||
setOpenSnack(true);
|
||||
@ -332,7 +332,7 @@ export const NewThread = ({
|
||||
} else {
|
||||
if (!currentThread) {
|
||||
const errMsg = t('group:message.error.thread_id', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
});
|
||||
throw new Error(errMsg);
|
||||
}
|
||||
@ -360,7 +360,7 @@ export const NewThread = ({
|
||||
setInfoSnack({
|
||||
type: 'success',
|
||||
message: t('group:message.success.post_creation', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
}),
|
||||
});
|
||||
setOpenSnack(true);
|
||||
@ -404,10 +404,10 @@ export const NewThread = ({
|
||||
<ComposeP>
|
||||
{currentThread
|
||||
? t('core:action.new.post', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
})
|
||||
: t('core:action.new.thread', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
</ComposeP>
|
||||
</ComposeContainer>
|
||||
@ -437,10 +437,10 @@ export const NewThread = ({
|
||||
<NewMessageHeaderP>
|
||||
{isMessage
|
||||
? t('core:action.post_message', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
})
|
||||
: t('core:action.new.thread', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
</NewMessageHeaderP>
|
||||
|
||||
@ -562,10 +562,10 @@ export const NewThread = ({
|
||||
<NewMessageSendP>
|
||||
{isMessage
|
||||
? t('core:action.post', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
})
|
||||
: t('core:action.create_thread', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
</NewMessageSendP>
|
||||
|
||||
|
@ -609,7 +609,7 @@ export const Thread = ({
|
||||
<ReturnIcon />
|
||||
<ComposeP>
|
||||
{t('group:action.return_to_thread', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
</ComposeP>
|
||||
</ShowMessageReturnButton>
|
||||
@ -688,7 +688,7 @@ export const Thread = ({
|
||||
disabled={!hasFirstPage}
|
||||
variant="contained"
|
||||
>
|
||||
{t('core:page.first', { postProcess: 'capitalize' })}
|
||||
{t('core:page.first', { postProcess: 'capitalizeFirst' })}
|
||||
</Button>
|
||||
|
||||
<Button
|
||||
@ -707,7 +707,7 @@ export const Thread = ({
|
||||
disabled={!hasPreviousPage}
|
||||
variant="contained"
|
||||
>
|
||||
{t('core:page.previous', { postProcess: 'capitalize' })}
|
||||
{t('core:page.previous', { postProcess: 'capitalizeFirst' })}
|
||||
</Button>
|
||||
|
||||
<Button
|
||||
@ -726,7 +726,7 @@ export const Thread = ({
|
||||
disabled={!hasNextPage}
|
||||
variant="contained"
|
||||
>
|
||||
{t('core:page.next', { postProcess: 'capitalize' })}
|
||||
{t('core:page.next', { postProcess: 'capitalizeFirst' })}
|
||||
</Button>
|
||||
|
||||
<Button
|
||||
@ -745,7 +745,7 @@ export const Thread = ({
|
||||
disabled={!hasLastPage}
|
||||
variant="contained"
|
||||
>
|
||||
{t('core:page.last', { postProcess: 'capitalize' })}
|
||||
{t('core:page.last', { postProcess: 'capitalizeFirst' })}
|
||||
</Button>
|
||||
</Box>
|
||||
|
||||
@ -929,7 +929,9 @@ export const Thread = ({
|
||||
fontSize: '18px',
|
||||
}}
|
||||
>
|
||||
{t('core:downloading_qdn', { postProcess: 'capitalize' })}
|
||||
{t('core:downloading_qdn', {
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
</Typography>
|
||||
</Box>
|
||||
</Box>
|
||||
@ -961,7 +963,7 @@ export const Thread = ({
|
||||
}}
|
||||
>
|
||||
{t('group:action.refetch_page', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
</Button>
|
||||
</Box>
|
||||
@ -1000,7 +1002,7 @@ export const Thread = ({
|
||||
disabled={!hasFirstPage}
|
||||
variant="contained"
|
||||
>
|
||||
{t('core:page.first', { postProcess: 'capitalize' })}
|
||||
{t('core:page.first', { postProcess: 'capitalizeFirst' })}
|
||||
</Button>
|
||||
|
||||
<Button
|
||||
@ -1019,7 +1021,7 @@ export const Thread = ({
|
||||
disabled={!hasPreviousPage}
|
||||
variant="contained"
|
||||
>
|
||||
{t('core:page.previous', { postProcess: 'capitalize' })}
|
||||
{t('core:page.previous', { postProcess: 'capitalizeFirst' })}
|
||||
</Button>
|
||||
|
||||
<Button
|
||||
@ -1038,7 +1040,7 @@ export const Thread = ({
|
||||
disabled={!hasNextPage}
|
||||
variant="contained"
|
||||
>
|
||||
{t('core:page.next', { postProcess: 'capitalize' })}
|
||||
{t('core:page.next', { postProcess: 'capitalizeFirst' })}
|
||||
</Button>
|
||||
|
||||
<Button
|
||||
@ -1057,7 +1059,7 @@ export const Thread = ({
|
||||
disabled={!hasLastPage}
|
||||
variant="contained"
|
||||
>
|
||||
{t('core:page.last', { postProcess: 'capitalize' })}
|
||||
{t('core:page.last', { postProcess: 'capitalizeFirst' })}
|
||||
</Button>
|
||||
</Box>
|
||||
|
||||
@ -1071,7 +1073,7 @@ export const Thread = ({
|
||||
<LoadingSnackbar
|
||||
open={isLoading}
|
||||
info={{
|
||||
message: t('core:loading_posts', { postProcess: 'capitalize' }),
|
||||
message: t('core:loading_posts', { postProcess: 'capitalizeFirst' }),
|
||||
}}
|
||||
/>
|
||||
</GroupContainer>
|
||||
|
@ -514,7 +514,9 @@ export const Group = ({
|
||||
.catch((error) => {
|
||||
rej(
|
||||
error.message ||
|
||||
t('core:message.error.generic', { postProcess: 'capitalize' })
|
||||
t('core:message.error.generic', {
|
||||
postProcess: 'capitalizeFirst',
|
||||
})
|
||||
);
|
||||
});
|
||||
});
|
||||
@ -543,7 +545,9 @@ export const Group = ({
|
||||
.catch((error) => {
|
||||
rej(
|
||||
error.message ||
|
||||
t('core:message.error.generic', { postProcess: 'capitalize' })
|
||||
t('core:message.error.generic', {
|
||||
postProcess: 'capitalizeFirst',
|
||||
})
|
||||
);
|
||||
});
|
||||
});
|
||||
@ -575,7 +579,9 @@ export const Group = ({
|
||||
.catch((error) => {
|
||||
rej(
|
||||
error.message ||
|
||||
t('core:message.error.generic', { postProcess: 'capitalize' })
|
||||
t('core:message.error.generic', {
|
||||
postProcess: 'capitalizeFirst',
|
||||
})
|
||||
);
|
||||
});
|
||||
});
|
||||
@ -1098,7 +1104,9 @@ export const Group = ({
|
||||
.catch((error) => {
|
||||
rej(
|
||||
error.message ||
|
||||
t('core:message.error.generic', { postProcess: 'capitalize' })
|
||||
t('core:message.error.generic', {
|
||||
postProcess: 'capitalizeFirst',
|
||||
})
|
||||
);
|
||||
});
|
||||
});
|
||||
@ -1995,7 +2003,7 @@ export const Group = ({
|
||||
}}
|
||||
>
|
||||
{t('group:message.generic.no_selection', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
</Typography>
|
||||
</Box>
|
||||
@ -2094,7 +2102,7 @@ export const Group = ({
|
||||
{' '}
|
||||
<Typography>
|
||||
{t('group:message.generic.encryption_key', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
</Typography>
|
||||
</div>
|
||||
@ -2120,21 +2128,21 @@ export const Group = ({
|
||||
{' '}
|
||||
<Typography>
|
||||
{t('group:message.generic.not_part_group', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
</Typography>
|
||||
<Spacer height="25px" />
|
||||
<Typography>
|
||||
<strong>
|
||||
{t('group:message.generic.only_encrypted', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
</strong>
|
||||
</Typography>
|
||||
<Spacer height="25px" />
|
||||
<Typography>
|
||||
{t('group:message.generic.notify_admins', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
</Typography>
|
||||
<Spacer height="25px" />
|
||||
@ -2156,7 +2164,7 @@ export const Group = ({
|
||||
onClick={() => notifyAdmin(admin)}
|
||||
>
|
||||
{t('core:action.notify', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
</LoadingButton>
|
||||
</Box>
|
||||
@ -2381,7 +2389,7 @@ export const Group = ({
|
||||
message:
|
||||
isLoadingGroupMessage ||
|
||||
t('group:message.generic.setting_group', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
}),
|
||||
}}
|
||||
/>
|
||||
@ -2390,7 +2398,7 @@ export const Group = ({
|
||||
open={isLoadingGroups}
|
||||
info={{
|
||||
message: t('group:message.generic.setting_group', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
}),
|
||||
}}
|
||||
/>
|
||||
|
@ -71,7 +71,7 @@ export const GroupInvites = ({ myAddress, setOpenAddGroup }) => {
|
||||
fontSize: '1rem',
|
||||
}}
|
||||
>
|
||||
{t('group:group.invites', { postProcess: 'capitalize' })}{' '}
|
||||
{t('group:group.invites', { postProcess: 'capitalizeFirst' })}{' '}
|
||||
{groupsWithJoinRequests?.length > 0 &&
|
||||
` (${groupsWithJoinRequests?.length})`}
|
||||
</Typography>
|
||||
@ -131,7 +131,7 @@ export const GroupInvites = ({ myAddress, setOpenAddGroup }) => {
|
||||
}}
|
||||
>
|
||||
{t('group:message.generic.no_display', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
</Typography>
|
||||
</Box>
|
||||
@ -181,7 +181,7 @@ export const GroupInvites = ({ myAddress, setOpenAddGroup }) => {
|
||||
}}
|
||||
primary={t('group:message.generic.group_invited_you', {
|
||||
group: group?.groupName,
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
/>
|
||||
</ListItemButton>
|
||||
|
@ -144,7 +144,7 @@ export const GroupJoinRequests = ({
|
||||
fontSize: '1rem',
|
||||
}}
|
||||
>
|
||||
{t('group:join_requests', { postProcess: 'capitalize' })}{' '}
|
||||
{t('group:join_requests', { postProcess: 'capitalizeFirst' })}{' '}
|
||||
{filteredJoinRequests?.filter((group) => group?.data?.length > 0)
|
||||
?.length > 0 &&
|
||||
` (${filteredJoinRequests?.filter((group) => group?.data?.length > 0)?.length})`}
|
||||
@ -207,7 +207,7 @@ export const GroupJoinRequests = ({
|
||||
}}
|
||||
>
|
||||
{t('group:message.generic.no_display', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
</Typography>
|
||||
</Box>
|
||||
|
@ -85,7 +85,7 @@ export const HomeDesktop = ({
|
||||
padding: '10px',
|
||||
}}
|
||||
>
|
||||
{t('core:welcome', { postProcess: 'capitalize' })}
|
||||
{t('core:welcome', { postProcess: 'capitalizeFirst' })}
|
||||
{userInfo?.name ? (
|
||||
<span
|
||||
style={{
|
||||
@ -217,7 +217,9 @@ export const HomeDesktop = ({
|
||||
fontSize: '1rem',
|
||||
}}
|
||||
>
|
||||
{t('tutorial:initial.explore', { postProcess: 'capitalize' })}
|
||||
{t('tutorial:initial.explore', {
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
</Typography>{' '}
|
||||
</Box>
|
||||
</Divider>
|
||||
|
@ -17,9 +17,9 @@ export const InviteMember = ({ groupId, setInfoSnack, setOpenSnack, show }) => {
|
||||
const fee = await getFee('GROUP_INVITE');
|
||||
|
||||
await show({
|
||||
message: t('group:question.perform_transaction', {
|
||||
message: t('core:question.perform_transaction', {
|
||||
action: 'GROUP_INVITE',
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
}),
|
||||
publishFee: fee.fee + ' QORT',
|
||||
});
|
||||
@ -40,7 +40,7 @@ export const InviteMember = ({ groupId, setInfoSnack, setOpenSnack, show }) => {
|
||||
type: 'success',
|
||||
message: t('group:message.success.group_invite', {
|
||||
value: value,
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
}),
|
||||
});
|
||||
setOpenSnack(true);
|
||||
@ -61,7 +61,7 @@ export const InviteMember = ({ groupId, setInfoSnack, setOpenSnack, show }) => {
|
||||
message:
|
||||
error?.message ||
|
||||
t('core:message.error.generic', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
}),
|
||||
});
|
||||
setOpenSnack(true);
|
||||
@ -86,7 +86,7 @@ export const InviteMember = ({ groupId, setInfoSnack, setOpenSnack, show }) => {
|
||||
flexDirection: 'column',
|
||||
}}
|
||||
>
|
||||
{t('group:action.invite_member', { postProcess: 'capitalize' })}
|
||||
{t('group:action.invite_member', { postProcess: 'capitalizeFirst' })}
|
||||
|
||||
<Spacer height="20px" />
|
||||
|
||||
@ -99,14 +99,14 @@ export const InviteMember = ({ groupId, setInfoSnack, setOpenSnack, show }) => {
|
||||
<Spacer height="20px" />
|
||||
|
||||
<Label>
|
||||
{t('group:invitation_expiry', { postProcess: 'capitalize' })}
|
||||
{t('group:invitation_expiry', { postProcess: 'capitalizeFirst' })}
|
||||
</Label>
|
||||
|
||||
<Select
|
||||
labelId="demo-simple-select-label"
|
||||
id="demo-simple-select"
|
||||
value={expiryTime}
|
||||
label={t('group:invitation_expiry', { postProcess: 'capitalize' })}
|
||||
label={t('group:invitation_expiry', { postProcess: 'capitalizeFirst' })}
|
||||
onChange={handleChange}
|
||||
>
|
||||
<MenuItem value={10800}>{t('core:time.hour', { count: 3 })}</MenuItem>
|
||||
@ -129,7 +129,7 @@ export const InviteMember = ({ groupId, setInfoSnack, setOpenSnack, show }) => {
|
||||
loading={isLoadingInvite}
|
||||
onClick={inviteMember}
|
||||
>
|
||||
{t('core:action.invite', { postProcess: 'capitalize' })}
|
||||
{t('core:action.invite', { postProcess: 'capitalizeFirst' })}
|
||||
</LoadingButton>
|
||||
</Box>
|
||||
);
|
||||
|
@ -88,9 +88,9 @@ export const ListOfBans = ({ groupId, setInfoSnack, setOpenSnack, show }) => {
|
||||
try {
|
||||
const fee = await getFee('CANCEL_GROUP_BAN');
|
||||
await show({
|
||||
message: t('group:question.perform_transaction', {
|
||||
message: t('core:question.perform_transaction', {
|
||||
action: 'CANCEL_GROUP_BAN',
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
}),
|
||||
publishFee: fee.fee + ' QORT',
|
||||
});
|
||||
@ -108,7 +108,7 @@ export const ListOfBans = ({ groupId, setInfoSnack, setOpenSnack, show }) => {
|
||||
setInfoSnack({
|
||||
type: 'success',
|
||||
message: t('group:message.success.unbanned_user', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
}),
|
||||
});
|
||||
handlePopoverClose();
|
||||
@ -184,7 +184,7 @@ export const ListOfBans = ({ groupId, setInfoSnack, setOpenSnack, show }) => {
|
||||
onClick={() => handleCancelBan(member?.offender)}
|
||||
>
|
||||
{t('group:action.cancel_ban', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
</LoadingButton>
|
||||
</Box>
|
||||
@ -214,7 +214,7 @@ export const ListOfBans = ({ groupId, setInfoSnack, setOpenSnack, show }) => {
|
||||
|
||||
return (
|
||||
<div>
|
||||
<p>{t('group:ban_list', { postProcess: 'capitalize' })}</p>
|
||||
<p>{t('group:ban_list', { postProcess: 'capitalizeFirst' })}</p>
|
||||
<div
|
||||
style={{
|
||||
display: 'flex',
|
||||
|
@ -240,14 +240,16 @@ export const ListOfGroupPromotions = () => {
|
||||
.catch((error) => {
|
||||
rej(
|
||||
error.message ||
|
||||
t('core:message.error.generic', { postProcess: 'capitalize' })
|
||||
t('core:message.error.generic', {
|
||||
postProcess: 'capitalizeFirst',
|
||||
})
|
||||
);
|
||||
});
|
||||
});
|
||||
setInfoSnack({
|
||||
type: 'success',
|
||||
message: t('group:message.success.group_promotion', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
}),
|
||||
});
|
||||
setOpenSnack(true);
|
||||
@ -260,7 +262,7 @@ export const ListOfGroupPromotions = () => {
|
||||
message:
|
||||
error?.message ||
|
||||
t('group:message.error.group_promotion', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
}),
|
||||
});
|
||||
setOpenSnack(true);
|
||||
@ -274,9 +276,9 @@ export const ListOfGroupPromotions = () => {
|
||||
const groupId = group.groupId;
|
||||
const fee = await getFee('JOIN_GROUP');
|
||||
await show({
|
||||
message: t('group:question.perform_transaction', {
|
||||
message: t('core:question.perform_transaction', {
|
||||
action: 'JOIN_GROUP',
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
}),
|
||||
publishFee: fee.fee + ' QORT',
|
||||
});
|
||||
@ -291,7 +293,7 @@ export const ListOfGroupPromotions = () => {
|
||||
setInfoSnack({
|
||||
type: 'success',
|
||||
message: t('group:message.success.group_join', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
}),
|
||||
});
|
||||
|
||||
@ -302,11 +304,11 @@ export const ListOfGroupPromotions = () => {
|
||||
type: 'joined-group',
|
||||
label: t('group:message.success.group_join_label', {
|
||||
group_name: group?.groupName,
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
}),
|
||||
labelDone: t('group:message.success.group_join_label', {
|
||||
group_name: group?.groupName,
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
}),
|
||||
done: false,
|
||||
groupId,
|
||||
@ -320,11 +322,11 @@ export const ListOfGroupPromotions = () => {
|
||||
type: 'joined-group-request',
|
||||
label: t('group:message.success.group_join_request', {
|
||||
group_name: group?.groupName,
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
}),
|
||||
labelDone: t('group:message.success.group_join_outcome', {
|
||||
group_name: group?.groupName,
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
}),
|
||||
done: false,
|
||||
groupId,
|
||||
@ -350,7 +352,9 @@ export const ListOfGroupPromotions = () => {
|
||||
type: 'error',
|
||||
message:
|
||||
error.message ||
|
||||
t('core:message.error.generic', { postProcess: 'capitalize' }),
|
||||
t('core:message.error.generic', {
|
||||
postProcess: 'capitalizeFirst',
|
||||
}),
|
||||
});
|
||||
setOpenSnack(true);
|
||||
rej(error);
|
||||
@ -399,7 +403,7 @@ export const ListOfGroupPromotions = () => {
|
||||
fontSize: '1rem',
|
||||
}}
|
||||
>
|
||||
{t('group:group.promotions', { postProcess: 'capitalize' })}{' '}
|
||||
{t('group:group.promotions', { postProcess: 'capitalizeFirst' })}{' '}
|
||||
{promotions.length > 0 && ` (${promotions.length})`}
|
||||
</Typography>
|
||||
|
||||
@ -458,7 +462,9 @@ export const ListOfGroupPromotions = () => {
|
||||
fontSize: '12px',
|
||||
}}
|
||||
>
|
||||
{t('group.action.add_promotion', { postProcess: 'capitalize' })}
|
||||
{t('group.action.add_promotion', {
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
</Button>
|
||||
</Box>
|
||||
|
||||
@ -505,7 +511,7 @@ export const ListOfGroupPromotions = () => {
|
||||
}}
|
||||
>
|
||||
{t('group.message.generic.no_display', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
</Typography>
|
||||
</Box>
|
||||
@ -570,7 +576,7 @@ export const ListOfGroupPromotions = () => {
|
||||
fallback={
|
||||
<Typography>
|
||||
{t('group.message.generic.invalid_data', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
</Typography>
|
||||
}
|
||||
@ -622,7 +628,7 @@ export const ListOfGroupPromotions = () => {
|
||||
}}
|
||||
>
|
||||
{t('group:group.name', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
: {` ${promotion?.groupName}`}
|
||||
</Typography>
|
||||
@ -634,7 +640,7 @@ export const ListOfGroupPromotions = () => {
|
||||
}}
|
||||
>
|
||||
{t('group:group.member_number', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
: {` ${promotion?.memberCount}`}
|
||||
</Typography>
|
||||
@ -658,7 +664,7 @@ export const ListOfGroupPromotions = () => {
|
||||
}}
|
||||
>
|
||||
{t('group:message.generic.closed_group', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
</Typography>
|
||||
)}
|
||||
@ -681,7 +687,7 @@ export const ListOfGroupPromotions = () => {
|
||||
onClick={handlePopoverClose}
|
||||
>
|
||||
{t('core:action.close', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
</LoadingButton>
|
||||
|
||||
@ -697,7 +703,7 @@ export const ListOfGroupPromotions = () => {
|
||||
}
|
||||
>
|
||||
{t('core:action.join', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
</LoadingButton>
|
||||
</Box>
|
||||
@ -783,10 +789,10 @@ export const ListOfGroupPromotions = () => {
|
||||
>
|
||||
{promotion?.isOpen
|
||||
? t('group:group.public', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
})
|
||||
: t('group:group.private', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
</Typography>
|
||||
</Box>
|
||||
@ -822,7 +828,7 @@ export const ListOfGroupPromotions = () => {
|
||||
}}
|
||||
>
|
||||
{t('group:action.join_group', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
: {` ${promotion?.groupName}`}
|
||||
</Button>
|
||||
@ -850,19 +856,19 @@ export const ListOfGroupPromotions = () => {
|
||||
aria-describedby="alert-dialog-description"
|
||||
>
|
||||
<DialogTitle id="alert-dialog-title">
|
||||
{t('group:action.promote_group', { postProcess: 'capitalize' })}
|
||||
{t('group:action.promote_group', { postProcess: 'capitalizeFirst' })}
|
||||
</DialogTitle>
|
||||
|
||||
<DialogContent>
|
||||
<DialogContentText id="alert-dialog-description">
|
||||
{t('group:message.generic.latest_promotion', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
</DialogContentText>
|
||||
|
||||
<DialogContentText id="alert-dialog-description2">
|
||||
{t('group:message.generic.max_chars', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
: {fee && fee} {' QORT'}
|
||||
</DialogContentText>
|
||||
@ -878,13 +884,13 @@ export const ListOfGroupPromotions = () => {
|
||||
>
|
||||
<Label>
|
||||
{t('group:action.select_group', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
</Label>
|
||||
|
||||
<Label>
|
||||
{t('group:message.generic.admin_only', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
</Label>
|
||||
|
||||
@ -936,7 +942,7 @@ export const ListOfGroupPromotions = () => {
|
||||
onClick={() => setIsShowModal(false)}
|
||||
>
|
||||
{t('core:action.close', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
</Button>
|
||||
<Button
|
||||
@ -946,7 +952,7 @@ export const ListOfGroupPromotions = () => {
|
||||
autoFocus
|
||||
>
|
||||
{t('core:action.publish', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
</Button>
|
||||
</DialogActions>
|
||||
|
@ -94,9 +94,9 @@ export const ListOfInvites = ({
|
||||
const fee = await getFee('CANCEL_GROUP_INVITE');
|
||||
|
||||
await show({
|
||||
message: t('group:question.perform_transaction', {
|
||||
message: t('core:question.perform_transaction', {
|
||||
action: 'CANCEL_GROUP_INVITE',
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
}),
|
||||
publishFee: fee.fee + ' QORT',
|
||||
});
|
||||
@ -114,7 +114,7 @@ export const ListOfInvites = ({
|
||||
setInfoSnack({
|
||||
type: 'success',
|
||||
message: t('group:message.success.invitation_cancellation', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
}),
|
||||
});
|
||||
setOpenSnack(true);
|
||||
@ -136,7 +136,7 @@ export const ListOfInvites = ({
|
||||
message:
|
||||
error.message ||
|
||||
t('core:message.error.generic', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
}),
|
||||
});
|
||||
setOpenSnack(true);
|
||||
@ -196,7 +196,7 @@ export const ListOfInvites = ({
|
||||
onClick={() => handleCancelInvitation(member?.invitee)}
|
||||
>
|
||||
{t('core:action.cancel_invitation', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
</LoadingButton>
|
||||
</Box>
|
||||
@ -229,7 +229,7 @@ export const ListOfInvites = ({
|
||||
<div>
|
||||
<p>
|
||||
{t('group:invitees_list', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
</p>
|
||||
<div
|
||||
|
@ -97,9 +97,9 @@ export const ListOfJoinRequests = ({
|
||||
const fee = await getFee('GROUP_INVITE');
|
||||
|
||||
await show({
|
||||
message: t('group:question.perform_transaction', {
|
||||
message: t('core:question.perform_transaction', {
|
||||
action: 'GROUP_INVITE',
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
}),
|
||||
publishFee: fee.fee + ' QORT',
|
||||
});
|
||||
@ -119,7 +119,7 @@ export const ListOfJoinRequests = ({
|
||||
setInfoSnack({
|
||||
type: 'success',
|
||||
message: t('group:message.success,group_join', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
}),
|
||||
});
|
||||
setOpenSnack(true);
|
||||
@ -130,10 +130,10 @@ export const ListOfJoinRequests = ({
|
||||
...response,
|
||||
type: 'join-request-accept',
|
||||
label: t('group:message.success,invitation_request', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
}),
|
||||
labelDone: t('group:message.success,user_joined', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
}),
|
||||
done: false,
|
||||
groupId,
|
||||
@ -157,7 +157,9 @@ export const ListOfJoinRequests = ({
|
||||
type: 'error',
|
||||
message:
|
||||
error?.message ||
|
||||
t('core:message.error.generic', { postProcess: 'capitalize' }),
|
||||
t('core:message.error.generic', {
|
||||
postProcess: 'capitalizeFirst',
|
||||
}),
|
||||
});
|
||||
setOpenSnack(true);
|
||||
rej(error);
|
||||
@ -223,7 +225,9 @@ export const ListOfJoinRequests = ({
|
||||
variant="contained"
|
||||
onClick={() => handleAcceptJoinRequest(member?.joiner)}
|
||||
>
|
||||
{t('core:action.accept', { postProcess: 'capitalize' })}
|
||||
{t('core:action.accept', {
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
</LoadingButton>
|
||||
</Box>
|
||||
</Popover>
|
||||
@ -252,7 +256,7 @@ export const ListOfJoinRequests = ({
|
||||
|
||||
return (
|
||||
<div>
|
||||
<p>{t('core:list.join_request', { postProcess: 'capitalize' })}</p>
|
||||
<p>{t('core:list.join_request', { postProcess: 'capitalizeFirst' })}</p>
|
||||
<div
|
||||
style={{
|
||||
position: 'relative',
|
||||
|
@ -59,9 +59,9 @@ const ListOfMembers = ({
|
||||
try {
|
||||
const fee = await getFee('GROUP_KICK');
|
||||
await show({
|
||||
message: t('group:question.perform_transaction', {
|
||||
message: t('core:question.perform_transaction', {
|
||||
action: 'GROUP_KICK',
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
}),
|
||||
publishFee: fee.fee + ' QORT',
|
||||
});
|
||||
@ -78,7 +78,7 @@ const ListOfMembers = ({
|
||||
setInfoSnack({
|
||||
type: 'success',
|
||||
message: t('group:message.success.group_kick', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
}),
|
||||
});
|
||||
setOpenSnack(true);
|
||||
@ -98,7 +98,9 @@ const ListOfMembers = ({
|
||||
type: 'error',
|
||||
message:
|
||||
error.message ||
|
||||
t('core:message.error.generic', { postProcess: 'capitalize' }),
|
||||
t('core:message.error.generic', {
|
||||
postProcess: 'capitalizeFirst',
|
||||
}),
|
||||
});
|
||||
setOpenSnack(true);
|
||||
rej(error);
|
||||
@ -115,9 +117,9 @@ const ListOfMembers = ({
|
||||
const fee = await getFee('GROUP_BAN');
|
||||
|
||||
await show({
|
||||
message: t('group:question.perform_transaction', {
|
||||
message: t('core:question.perform_transaction', {
|
||||
action: 'GROUP_BAN',
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
}),
|
||||
publishFee: fee.fee + ' QORT',
|
||||
});
|
||||
@ -136,7 +138,7 @@ const ListOfMembers = ({
|
||||
setInfoSnack({
|
||||
type: 'success',
|
||||
message: t('group:message.success.group_ban', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
}),
|
||||
});
|
||||
setOpenSnack(true);
|
||||
@ -156,7 +158,9 @@ const ListOfMembers = ({
|
||||
type: 'error',
|
||||
message:
|
||||
error.message ||
|
||||
t('core:message.error.generic', { postProcess: 'capitalize' }),
|
||||
t('core:message.error.generic', {
|
||||
postProcess: 'capitalizeFirst',
|
||||
}),
|
||||
});
|
||||
setOpenSnack(true);
|
||||
rej(error);
|
||||
@ -173,9 +177,9 @@ const ListOfMembers = ({
|
||||
try {
|
||||
const fee = await getFee('ADD_GROUP_ADMIN');
|
||||
await show({
|
||||
message: t('group:question.perform_transaction', {
|
||||
message: t('core:question.perform_transaction', {
|
||||
action: 'ADD_GROUP_ADMIN',
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
}),
|
||||
publishFee: fee.fee + ' QORT',
|
||||
});
|
||||
@ -191,7 +195,7 @@ const ListOfMembers = ({
|
||||
setInfoSnack({
|
||||
type: 'success',
|
||||
message: t('group:message.success.group_member_admin', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
}),
|
||||
});
|
||||
setOpenSnack(true);
|
||||
@ -211,7 +215,9 @@ const ListOfMembers = ({
|
||||
type: 'error',
|
||||
message:
|
||||
error.message ||
|
||||
t('core:message.error.generic', { postProcess: 'capitalize' }),
|
||||
t('core:message.error.generic', {
|
||||
postProcess: 'capitalizeFirst',
|
||||
}),
|
||||
});
|
||||
setOpenSnack(true);
|
||||
rej(error);
|
||||
@ -228,9 +234,9 @@ const ListOfMembers = ({
|
||||
try {
|
||||
const fee = await getFee('REMOVE_GROUP_ADMIN');
|
||||
await show({
|
||||
message: t('group:question.perform_transaction', {
|
||||
message: t('core:question.perform_transaction', {
|
||||
action: 'REMOVE_GROUP_ADMIN',
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
}),
|
||||
publishFee: fee.fee + ' QORT',
|
||||
});
|
||||
@ -246,7 +252,7 @@ const ListOfMembers = ({
|
||||
setInfoSnack({
|
||||
type: 'success',
|
||||
message: t('group:message.success.group_remove_member', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
}),
|
||||
});
|
||||
setOpenSnack(true);
|
||||
@ -266,7 +272,9 @@ const ListOfMembers = ({
|
||||
type: 'error',
|
||||
message:
|
||||
error.message ||
|
||||
t('core:message.error.generic', { postProcess: 'capitalize' }),
|
||||
t('core:message.error.generic', {
|
||||
postProcess: 'capitalizeFirst',
|
||||
}),
|
||||
});
|
||||
setOpenSnack(true);
|
||||
rej(error);
|
||||
@ -326,7 +334,7 @@ const ListOfMembers = ({
|
||||
onClick={() => handleKick(member?.member)}
|
||||
>
|
||||
{t('group:action.kick_member', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
</LoadingButton>
|
||||
|
||||
@ -337,7 +345,7 @@ const ListOfMembers = ({
|
||||
onClick={() => handleBan(member?.member)}
|
||||
>
|
||||
{t('group:action.ban', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
</LoadingButton>
|
||||
|
||||
@ -348,7 +356,7 @@ const ListOfMembers = ({
|
||||
onClick={() => makeAdmin(member?.member)}
|
||||
>
|
||||
{t('group:action.make_admin', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
</LoadingButton>
|
||||
|
||||
@ -359,7 +367,7 @@ const ListOfMembers = ({
|
||||
onClick={() => removeAdmin(member?.member)}
|
||||
>
|
||||
{t('group:action.remove_admin', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
</LoadingButton>
|
||||
</>
|
||||
@ -394,7 +402,7 @@ const ListOfMembers = ({
|
||||
}}
|
||||
>
|
||||
{t('core:admin', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
</Typography>
|
||||
)}
|
||||
@ -410,7 +418,7 @@ const ListOfMembers = ({
|
||||
<div>
|
||||
<p>
|
||||
{t('core:list.member', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
</p>
|
||||
<div
|
||||
|
@ -46,7 +46,9 @@ export const ListOfThreadPostsWatched = () => {
|
||||
.catch((error) => {
|
||||
rej(
|
||||
error.message ||
|
||||
t('core:message.error.generic', { postProcess: 'capitalize' })
|
||||
t('core:message.error.generic', {
|
||||
postProcess: 'capitalizeFirst',
|
||||
})
|
||||
);
|
||||
});
|
||||
});
|
||||
@ -85,7 +87,7 @@ export const ListOfThreadPostsWatched = () => {
|
||||
}}
|
||||
>
|
||||
{t('group:thread_posts', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
:
|
||||
</Typography>
|
||||
@ -133,7 +135,7 @@ export const ListOfThreadPostsWatched = () => {
|
||||
}}
|
||||
>
|
||||
{t('group:message.generic.no_display', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
</Typography>
|
||||
</Box>
|
||||
|
@ -84,9 +84,9 @@ export const ManageMembers = ({
|
||||
setIsLoadingLeave(true);
|
||||
const fee = await getFee('LEAVE_GROUP');
|
||||
await show({
|
||||
message: t('group:question.perform_transaction', {
|
||||
message: t('core:question.perform_transaction', {
|
||||
action: 'LEAVE_GROUP',
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
}),
|
||||
publishFee: fee.fee + ' QORT',
|
||||
});
|
||||
@ -104,11 +104,11 @@ export const ManageMembers = ({
|
||||
type: 'leave-group',
|
||||
label: t('group:message.success.group_leave_name', {
|
||||
group_name: selectedGroup?.groupName,
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
}),
|
||||
labelDone: t('group:message.success.group_leave_label', {
|
||||
group_name: selectedGroup?.groupName,
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
}),
|
||||
done: false,
|
||||
groupId: selectedGroup?.groupId,
|
||||
@ -119,7 +119,7 @@ export const ManageMembers = ({
|
||||
setInfoSnack({
|
||||
type: 'success',
|
||||
message: t('group:message.success.group_leave', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
}),
|
||||
});
|
||||
setOpenSnack(true);
|
||||
@ -130,7 +130,9 @@ export const ManageMembers = ({
|
||||
.catch((error) => {
|
||||
rej(
|
||||
error.message ||
|
||||
t('core:message.error.generic', { postProcess: 'capitalize' })
|
||||
t('core:message.error.generic', {
|
||||
postProcess: 'capitalizeFirst',
|
||||
})
|
||||
);
|
||||
});
|
||||
});
|
||||
@ -207,7 +209,9 @@ export const ManageMembers = ({
|
||||
>
|
||||
<Toolbar>
|
||||
<Typography sx={{ ml: 2, flex: 1 }} variant="h4" component="div">
|
||||
{t('group:action.manage_members', { postProcess: 'capitalize' })}
|
||||
{t('group:action.manage_members', {
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
</Typography>
|
||||
|
||||
<IconButton
|
||||
@ -310,18 +314,20 @@ export const ManageMembers = ({
|
||||
>
|
||||
<Box>
|
||||
<Typography>
|
||||
{t('group:group.id', { postProcess: 'capitalize' })}:{' '}
|
||||
{t('group:group.id', { postProcess: 'capitalizeFirst' })}:{' '}
|
||||
{groupInfo?.groupId}
|
||||
</Typography>
|
||||
|
||||
<Typography>
|
||||
{t('group:group.name', { postProcess: 'capitalize' })}:{' '}
|
||||
{t('group:group.name', { postProcess: 'capitalizeFirst' })}:{' '}
|
||||
{groupInfo?.groupName}
|
||||
</Typography>
|
||||
|
||||
<Typography>
|
||||
{t('group:group.member_number', { postProcess: 'capitalize' })}:{' '}
|
||||
{groupInfo?.memberCount}
|
||||
{t('group:group.member_number', {
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
: {groupInfo?.memberCount}
|
||||
</Typography>
|
||||
|
||||
<ButtonBase
|
||||
@ -336,7 +342,7 @@ export const ManageMembers = ({
|
||||
<InsertLinkIcon />
|
||||
|
||||
<Typography>
|
||||
{t('group:join_link', { postProcess: 'capitalize' })}
|
||||
{t('group:join_link', { postProcess: 'capitalizeFirst' })}
|
||||
</Typography>
|
||||
</ButtonBase>
|
||||
</Box>
|
||||
@ -351,7 +357,9 @@ export const ManageMembers = ({
|
||||
variant="contained"
|
||||
onClick={handleLeaveGroup}
|
||||
>
|
||||
{t('group:action.leave_group', { postProcess: 'capitalize' })}
|
||||
{t('group:action.leave_group', {
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
</LoadingButton>
|
||||
)}
|
||||
</Card>
|
||||
@ -368,7 +376,9 @@ export const ManageMembers = ({
|
||||
variant="contained"
|
||||
onClick={() => getMembersWithNames(selectedGroup?.groupId)}
|
||||
>
|
||||
{t('group:action.load_members', { postProcess: 'capitalize' })}
|
||||
{t('group:action.load_members', {
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
</Button>
|
||||
|
||||
<Spacer height="10px" />
|
||||
@ -465,7 +475,7 @@ export const ManageMembers = ({
|
||||
open={isLoadingMembers}
|
||||
info={{
|
||||
message: t('group:message.generic.loading_members', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
}),
|
||||
}}
|
||||
/>
|
||||
|
@ -92,7 +92,9 @@ export const QMailMessages = ({ userName, userAddress }) => {
|
||||
.catch((error) => {
|
||||
rej(
|
||||
error.message ||
|
||||
t('core:message.error.generic', { postProcess: 'capitalize' })
|
||||
t('core:message.error.generic', {
|
||||
postProcess: 'capitalizeFirst',
|
||||
})
|
||||
);
|
||||
});
|
||||
});
|
||||
@ -155,7 +157,7 @@ export const QMailMessages = ({ userName, userAddress }) => {
|
||||
fontSize: '1rem',
|
||||
}}
|
||||
>
|
||||
{t('group:latest_mails', { postProcess: 'capitalize' })}
|
||||
{t('group:latest_mails', { postProcess: 'capitalizeFirst' })}
|
||||
</Typography>
|
||||
|
||||
<MarkEmailUnreadIcon
|
||||
@ -226,7 +228,7 @@ export const QMailMessages = ({ userName, userAddress }) => {
|
||||
}}
|
||||
>
|
||||
{t('group:message.generic.no_display', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
</Typography>
|
||||
</Box>
|
||||
|
@ -135,7 +135,9 @@ export const Settings = ({ open, setOpen, rawWallet }) => {
|
||||
.catch((error) => {
|
||||
rej(
|
||||
error.message ||
|
||||
t('core:message.error.generic', { postProcess: 'capitalize' })
|
||||
t('core:message.error.generic', {
|
||||
postProcess: 'capitalizeFirst',
|
||||
})
|
||||
);
|
||||
});
|
||||
});
|
||||
@ -160,7 +162,7 @@ export const Settings = ({ open, setOpen, rawWallet }) => {
|
||||
<Toolbar>
|
||||
<Typography sx={{ ml: 2, flex: 1 }} variant="h4" component="div">
|
||||
{t('core:general_settings', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
</Typography>
|
||||
|
||||
@ -194,7 +196,7 @@ export const Settings = ({ open, setOpen, rawWallet }) => {
|
||||
<LocalNodeSwitch checked={checked} onChange={handleChange} />
|
||||
}
|
||||
label={t('group:action.disable_push_notifications', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
/>
|
||||
{window?.electronAPI && (
|
||||
@ -212,7 +214,7 @@ export const Settings = ({ open, setOpen, rawWallet }) => {
|
||||
/>
|
||||
}
|
||||
label={t('group:action.enable_dev_mode', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
/>
|
||||
)}
|
||||
@ -236,7 +238,7 @@ const ExportPrivateKey = ({ rawWallet }) => {
|
||||
setInfoSnackCustom({
|
||||
type: 'info',
|
||||
message: t('group:message.generic.descrypt_wallet', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
}),
|
||||
});
|
||||
|
||||
@ -260,10 +262,10 @@ const ExportPrivateKey = ({ rawWallet }) => {
|
||||
message: error?.message
|
||||
? t('group:message.error.decrypt_wallet', {
|
||||
errorMessage: error?.message,
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
})
|
||||
: t('group:message.error.descrypt_wallet', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
}),
|
||||
});
|
||||
|
||||
@ -281,7 +283,7 @@ const ExportPrivateKey = ({ rawWallet }) => {
|
||||
onClick={() => setIsOpen(true)}
|
||||
>
|
||||
{t('group:action.export_private_key', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
</Button>
|
||||
|
||||
@ -292,7 +294,7 @@ const ExportPrivateKey = ({ rawWallet }) => {
|
||||
>
|
||||
<DialogTitle id="alert-dialog-title">
|
||||
{t('group:action.export_password', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
</DialogTitle>
|
||||
|
||||
@ -305,7 +307,7 @@ const ExportPrivateKey = ({ rawWallet }) => {
|
||||
>
|
||||
<DialogContentText id="alert-dialog-description">
|
||||
{t('group:message.generic.secure_place', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
</DialogContentText>
|
||||
|
||||
@ -326,7 +328,7 @@ const ExportPrivateKey = ({ rawWallet }) => {
|
||||
setInfoSnackCustom({
|
||||
type: 'success',
|
||||
message: t('group:message.generic.private_key_copied', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
}),
|
||||
});
|
||||
|
||||
@ -334,7 +336,7 @@ const ExportPrivateKey = ({ rawWallet }) => {
|
||||
}}
|
||||
>
|
||||
{t('group:action.copy_private_key', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}{' '}
|
||||
<ContentCopyIcon color="primary" />
|
||||
</Button>
|
||||
@ -351,13 +353,13 @@ const ExportPrivateKey = ({ rawWallet }) => {
|
||||
}}
|
||||
>
|
||||
{t('group:action.cancel', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
</Button>
|
||||
|
||||
<Button variant="contained" onClick={exportPrivateKeyFunc}>
|
||||
{t('group:action.decrypt', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
</Button>
|
||||
</DialogActions>
|
||||
|
@ -76,9 +76,9 @@ export const ThingsToDoInitial = ({
|
||||
}}
|
||||
>
|
||||
{!isLoaded
|
||||
? t('core:loading', { postProcess: 'capitalize' })
|
||||
? t('core:loading', { postProcess: 'capitalizeFirst' })
|
||||
: t('tutorial:initial.getting_started', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
</Typography>
|
||||
|
||||
@ -122,7 +122,7 @@ export const ThingsToDoInitial = ({
|
||||
},
|
||||
}}
|
||||
primary={t('tutorial:initial.6_qort', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
/>
|
||||
|
||||
@ -171,7 +171,7 @@ export const ThingsToDoInitial = ({
|
||||
},
|
||||
}}
|
||||
primary={t('tutorial:initial.register_name', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
/>
|
||||
<ListItemIcon
|
||||
|
@ -99,9 +99,9 @@ export const UserListOfInvites = ({
|
||||
const fee = await getFee('JOIN_GROUP');
|
||||
|
||||
await show({
|
||||
message: t('group:question.perform_transaction', {
|
||||
message: t('core:question.perform_transaction', {
|
||||
action: 'JOIN_GROUP',
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
}),
|
||||
publishFee: fee.fee + ' QORT',
|
||||
});
|
||||
@ -130,7 +130,7 @@ export const UserListOfInvites = ({
|
||||
setInfoSnack({
|
||||
type: 'success',
|
||||
message: t('group:message.success.group_join', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
}),
|
||||
});
|
||||
setOpenSnack(true);
|
||||
@ -149,7 +149,9 @@ export const UserListOfInvites = ({
|
||||
type: 'error',
|
||||
message:
|
||||
error.message ||
|
||||
t('core:message.error.generic', { postProcess: 'capitalize' }),
|
||||
t('core:message.error.generic', {
|
||||
postProcess: 'capitalizeFirst',
|
||||
}),
|
||||
});
|
||||
setOpenSnack(true);
|
||||
rej(error);
|
||||
@ -203,7 +205,7 @@ export const UserListOfInvites = ({
|
||||
>
|
||||
<Typography>
|
||||
{t('core:action.join', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}{' '}
|
||||
{invite?.groupName}
|
||||
</Typography>
|
||||
@ -217,7 +219,7 @@ export const UserListOfInvites = ({
|
||||
}
|
||||
>
|
||||
{t('group:action.join_group', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
</LoadingButton>
|
||||
</Box>
|
||||
@ -265,7 +267,7 @@ export const UserListOfInvites = ({
|
||||
>
|
||||
<p>
|
||||
{t('core:list.invite', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
</p>
|
||||
|
||||
|
@ -36,13 +36,15 @@ export const NewUsersCTA = ({ balance }) => {
|
||||
textAlign: 'center',
|
||||
}}
|
||||
>
|
||||
{t('core:message.question.new_user', { postProcess: 'capitalize' })}
|
||||
{t('core:message.question.new_user', {
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
</Typography>
|
||||
|
||||
<Spacer height="20px" />
|
||||
|
||||
<Typography>
|
||||
{t('core:message_us', { postProcess: 'capitalize' })}
|
||||
{t('core:message_us', { postProcess: 'capitalizeFirst' })}
|
||||
</Typography>
|
||||
|
||||
<Spacer height="20px" />
|
||||
|
@ -152,7 +152,7 @@ export const QortPrice = () => {
|
||||
fontWeight: 'bold',
|
||||
}}
|
||||
>
|
||||
{t('core:price', { postProcess: 'capitalize' })}
|
||||
{t('core:price', { postProcess: 'capitalizeFirst' })}
|
||||
</Typography>
|
||||
|
||||
{!ltcPerQort ? (
|
||||
@ -184,7 +184,7 @@ export const QortPrice = () => {
|
||||
fontWeight: 'bold',
|
||||
}}
|
||||
>
|
||||
{t('core:supply', { postProcess: 'capitalize' })}
|
||||
{t('core:supply', { postProcess: 'capitalizeFirst' })}
|
||||
</Typography>
|
||||
|
||||
{!supply ? (
|
||||
@ -238,7 +238,7 @@ export const QortPrice = () => {
|
||||
fontWeight: 'bold',
|
||||
}}
|
||||
>
|
||||
{t('core:last_height', { postProcess: 'capitalize' })}
|
||||
{t('core:last_height', { postProcess: 'capitalizeFirst' })}
|
||||
</Typography>
|
||||
|
||||
{!lastBlock?.height ? (
|
||||
|
@ -40,7 +40,7 @@ const LanguageSelector = () => {
|
||||
<Tooltip
|
||||
key={currentLang}
|
||||
title={t('core:action.change_language', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
>
|
||||
<button
|
||||
|
@ -65,6 +65,7 @@ export const MainAvatar = ({ myName, balance, setOpenSnack, setInfoSnack }) => {
|
||||
|
||||
const publishAvatar = async () => {
|
||||
try {
|
||||
// TODO translate
|
||||
const fee = await getFee('ARBITRARY');
|
||||
if (+balance < +fee.fee)
|
||||
throw new Error(`Publishing an Avatar requires ${fee.fee}`);
|
||||
|
@ -227,7 +227,9 @@ export const Minting = ({ setIsOpenMinting, myAddress, show }) => {
|
||||
rej({
|
||||
message:
|
||||
error.message ||
|
||||
t('core:message.error.generic', { postProcess: 'capitalize' }),
|
||||
t('core:message.error.generic', {
|
||||
postProcess: 'capitalizeFirst',
|
||||
}),
|
||||
});
|
||||
});
|
||||
});
|
||||
@ -237,7 +239,7 @@ export const Minting = ({ setIsOpenMinting, myAddress, show }) => {
|
||||
message:
|
||||
error?.message ||
|
||||
t('core:message.error.minting_account_add', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
}),
|
||||
});
|
||||
setOpenSnack(true);
|
||||
@ -275,7 +277,9 @@ export const Minting = ({ setIsOpenMinting, myAddress, show }) => {
|
||||
rej({
|
||||
message:
|
||||
error.message ||
|
||||
t('core:message.error.generic', { postProcess: 'capitalize' }),
|
||||
t('core:message.error.generic', {
|
||||
postProcess: 'capitalizeFirst',
|
||||
}),
|
||||
});
|
||||
});
|
||||
});
|
||||
@ -285,7 +289,7 @@ export const Minting = ({ setIsOpenMinting, myAddress, show }) => {
|
||||
message:
|
||||
error?.message ||
|
||||
t('core:message.error.minting_account_remove', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
}),
|
||||
});
|
||||
setOpenSnack(true);
|
||||
@ -297,10 +301,10 @@ export const Minting = ({ setIsOpenMinting, myAddress, show }) => {
|
||||
const createRewardShare = useCallback(async (publicKey, recipient) => {
|
||||
const fee = await getFee('REWARD_SHARE');
|
||||
await show({
|
||||
message: t('group:question.perform_transaction', {
|
||||
message: t('core:question.perform_transaction', {
|
||||
// TODO move from group into core namespace
|
||||
action: 'REWARD_SHARE',
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
}),
|
||||
publishFee: fee.fee + ' QORT',
|
||||
});
|
||||
@ -317,10 +321,10 @@ export const Minting = ({ setIsOpenMinting, myAddress, show }) => {
|
||||
...response,
|
||||
type: 'add-rewardShare',
|
||||
label: t('group:message.success.rewardshare_add', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
}),
|
||||
labelDone: t('group:message.success.rewardshare_add_label', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
}),
|
||||
done: false,
|
||||
},
|
||||
@ -335,7 +339,9 @@ export const Minting = ({ setIsOpenMinting, myAddress, show }) => {
|
||||
rej({
|
||||
message:
|
||||
error.message ||
|
||||
t('core:message.error.generic', { postProcess: 'capitalize' }),
|
||||
t('core:message.error.generic', {
|
||||
postProcess: 'capitalizeFirst',
|
||||
}),
|
||||
});
|
||||
});
|
||||
});
|
||||
@ -358,7 +364,9 @@ export const Minting = ({ setIsOpenMinting, myAddress, show }) => {
|
||||
rej({
|
||||
message:
|
||||
error.message ||
|
||||
t('core:message.error.generic', { postProcess: 'capitalize' }),
|
||||
t('core:message.error.generic', {
|
||||
postProcess: 'capitalizeFirst',
|
||||
}),
|
||||
});
|
||||
});
|
||||
});
|
||||
@ -384,7 +392,9 @@ export const Minting = ({ setIsOpenMinting, myAddress, show }) => {
|
||||
}
|
||||
|
||||
throw new Error(
|
||||
t('group:message.error.timeout_reward', { postProcess: 'capitalize' })
|
||||
t('group:message.error.timeout_reward', {
|
||||
postProcess: 'capitalizeFirst',
|
||||
})
|
||||
);
|
||||
};
|
||||
|
||||
@ -420,7 +430,7 @@ export const Minting = ({ setIsOpenMinting, myAddress, show }) => {
|
||||
message:
|
||||
error?.message ||
|
||||
t('group:message.error.unable_minting', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
}),
|
||||
});
|
||||
setOpenSnack(true);
|
||||
@ -460,10 +470,10 @@ export const Minting = ({ setIsOpenMinting, myAddress, show }) => {
|
||||
...response,
|
||||
type: 'remove-rewardShare',
|
||||
label: t('group:message.success.rewardshare_remove', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
}),
|
||||
labelDone: t('group:message.success.rewardshare_remove_label', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
}),
|
||||
done: false,
|
||||
},
|
||||
@ -477,7 +487,9 @@ export const Minting = ({ setIsOpenMinting, myAddress, show }) => {
|
||||
rej({
|
||||
message:
|
||||
error.message ||
|
||||
t('core:message.error.generic', { postProcess: 'capitalize' }),
|
||||
t('core:message.error.generic', {
|
||||
postProcess: 'capitalizeFirst',
|
||||
}),
|
||||
});
|
||||
});
|
||||
});
|
||||
@ -609,7 +621,7 @@ export const Minting = ({ setIsOpenMinting, myAddress, show }) => {
|
||||
>
|
||||
<DialogTitle id="alert-dialog-title">
|
||||
{t('group:message.generic.manage_minting', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
</DialogTitle>
|
||||
|
||||
@ -662,28 +674,28 @@ export const Minting = ({ setIsOpenMinting, myAddress, show }) => {
|
||||
>
|
||||
<Typography>
|
||||
{t('auth:account.account_one', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
: {handleNames(accountInfo?.address)}
|
||||
</Typography>
|
||||
|
||||
<Typography>
|
||||
{t('core:level', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
: {accountInfo?.level}
|
||||
</Typography>
|
||||
|
||||
<Typography>
|
||||
{t('group:message.generic.next_level', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}{' '}
|
||||
{_levelUpBlocks()}
|
||||
</Typography>
|
||||
|
||||
<Typography>
|
||||
{t('group:message.generic.node_minting', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}{' '}
|
||||
{nodeInfos?.isMintingPossible?.toString()}
|
||||
</Typography>
|
||||
@ -723,14 +735,14 @@ export const Minting = ({ setIsOpenMinting, myAddress, show }) => {
|
||||
variant="contained"
|
||||
>
|
||||
{t('core:action.start_minting', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
</Button>
|
||||
|
||||
{mintingAccounts?.length > 1 && (
|
||||
<Typography>
|
||||
{t('group:message.generic.minting_keys_per_node', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
</Typography>
|
||||
)}
|
||||
@ -742,7 +754,7 @@ export const Minting = ({ setIsOpenMinting, myAddress, show }) => {
|
||||
{mintingAccounts?.length > 0 && (
|
||||
<Typography>
|
||||
{t('group:message.generic.node_minting_account', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
</Typography>
|
||||
)}
|
||||
@ -762,7 +774,7 @@ export const Minting = ({ setIsOpenMinting, myAddress, show }) => {
|
||||
>
|
||||
<Typography>
|
||||
{t('group:message.generic.node_minting_key', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
</Typography>
|
||||
</Box>
|
||||
@ -781,7 +793,7 @@ export const Minting = ({ setIsOpenMinting, myAddress, show }) => {
|
||||
>
|
||||
<Typography>
|
||||
{t('group:message.generic.minting_account', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}{' '}
|
||||
{handleNames(acct?.mintingAccount)}
|
||||
</Typography>
|
||||
@ -807,7 +819,7 @@ export const Minting = ({ setIsOpenMinting, myAddress, show }) => {
|
||||
variant="contained"
|
||||
>
|
||||
{t('group:action.remove_minting_account', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
</Button>
|
||||
|
||||
@ -820,7 +832,7 @@ export const Minting = ({ setIsOpenMinting, myAddress, show }) => {
|
||||
{mintingAccounts?.length > 1 && (
|
||||
<Typography>
|
||||
{t('group:message.generic.minting_keys_per_node_different', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
</Typography>
|
||||
)}
|
||||
@ -846,13 +858,13 @@ export const Minting = ({ setIsOpenMinting, myAddress, show }) => {
|
||||
>
|
||||
<Typography>
|
||||
{t('group:message.generic.minter_group', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
</Typography>
|
||||
|
||||
<Typography>
|
||||
{t('group:message.generic.mintership_app', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
</Typography>
|
||||
|
||||
@ -882,7 +894,7 @@ export const Minting = ({ setIsOpenMinting, myAddress, show }) => {
|
||||
variant="contained"
|
||||
>
|
||||
{t('group:action.visit_q_mintership', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
</Button>
|
||||
</Box>
|
||||
@ -903,14 +915,14 @@ export const Minting = ({ setIsOpenMinting, myAddress, show }) => {
|
||||
{!isShowNext && (
|
||||
<Typography>
|
||||
{t('group:message.success.rewardshare_creation', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
</Typography>
|
||||
)}
|
||||
{isShowNext && (
|
||||
<Typography>
|
||||
{t('group:message.success.rewardshare_confirmed', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
</Typography>
|
||||
)}
|
||||
@ -923,7 +935,7 @@ export const Minting = ({ setIsOpenMinting, myAddress, show }) => {
|
||||
onClick={onOk}
|
||||
autoFocus
|
||||
>
|
||||
{t('core:page.next', { postProcess: 'capitalize' })}
|
||||
{t('core:page.next', { postProcess: 'capitalizeFirst' })}
|
||||
</Button>
|
||||
</DialogActions>
|
||||
</Dialog>
|
||||
@ -936,7 +948,7 @@ export const Minting = ({ setIsOpenMinting, myAddress, show }) => {
|
||||
variant="contained"
|
||||
onClick={() => setIsOpenMinting(false)}
|
||||
>
|
||||
{t('core:action.close', { postProcess: 'capitalize' })}
|
||||
{t('core:action.close', { postProcess: 'capitalizeFirst' })}
|
||||
</Button>
|
||||
</DialogActions>
|
||||
|
||||
|
@ -65,8 +65,8 @@ export const QMailStatus = () => {
|
||||
textTransform: 'uppercase',
|
||||
}}
|
||||
>
|
||||
{t('core:q_mail', {
|
||||
postProcess: 'capitalize',
|
||||
{t('core:q_apps.q_mail', {
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
</span>
|
||||
}
|
||||
|
@ -115,20 +115,20 @@ export const RegisterName = ({
|
||||
if (!userInfo?.address)
|
||||
throw new Error(
|
||||
t('core:message.error.address_not_found', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
})
|
||||
);
|
||||
if (!registerNameValue)
|
||||
throw new Error(
|
||||
t('core:action.enter_name', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
})
|
||||
);
|
||||
|
||||
const fee = await getFee('REGISTER_NAME');
|
||||
await show({
|
||||
message: t('group:question.register_name', {
|
||||
postProcess: 'capitalize',
|
||||
message: t('core:question.register_name', {
|
||||
postProcess: 'capitalizeFirst',
|
||||
}),
|
||||
publishFee: fee.fee + ' QORT',
|
||||
});
|
||||
@ -145,7 +145,7 @@ export const RegisterName = ({
|
||||
setInfoSnack({
|
||||
type: 'success',
|
||||
message: t('group:message.success.registered_name', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
}),
|
||||
});
|
||||
setIsOpen(false);
|
||||
@ -156,12 +156,12 @@ export const RegisterName = ({
|
||||
...response,
|
||||
type: 'register-name',
|
||||
label: t('group:message.success.registered_name_label', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
}),
|
||||
labelDone: t(
|
||||
'group:message.success.registered_name_success',
|
||||
{
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
}
|
||||
),
|
||||
done: false,
|
||||
@ -182,7 +182,9 @@ export const RegisterName = ({
|
||||
type: 'error',
|
||||
message:
|
||||
error.message ||
|
||||
t('core:message.error.generic', { postProcess: 'capitalize' }),
|
||||
t('core:message.error.generic', {
|
||||
postProcess: 'capitalizeFirst',
|
||||
}),
|
||||
});
|
||||
setOpenSnack(true);
|
||||
rej(error);
|
||||
@ -224,7 +226,7 @@ export const RegisterName = ({
|
||||
}}
|
||||
>
|
||||
<Label>
|
||||
{t('core:action.choose_name', { postProcess: 'capitalize' })}
|
||||
{t('core:action.choose_name', { postProcess: 'capitalizeFirst' })}
|
||||
</Label>
|
||||
<TextField
|
||||
autoComplete="off"
|
||||
@ -253,7 +255,7 @@ export const RegisterName = ({
|
||||
{t('core:message.generic.name_registration', {
|
||||
balance: balance ?? 0,
|
||||
fee: { nameFee },
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
</Typography>
|
||||
</Box>
|
||||
@ -280,7 +282,7 @@ export const RegisterName = ({
|
||||
<Typography>
|
||||
{t('core:message.generic.name_available', {
|
||||
name: registerNameValue,
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
</Typography>
|
||||
</Box>
|
||||
@ -302,7 +304,7 @@ export const RegisterName = ({
|
||||
<Typography>
|
||||
{t('core:message.generic.name_unavailable', {
|
||||
name: registerNameValue,
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
</Typography>
|
||||
</Box>
|
||||
@ -320,7 +322,7 @@ export const RegisterName = ({
|
||||
|
||||
<Typography>
|
||||
{t('core:message.generic.name_checking', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
</Typography>
|
||||
</Box>
|
||||
@ -334,7 +336,7 @@ export const RegisterName = ({
|
||||
}}
|
||||
>
|
||||
{t('core:message.generic.name_benefits', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
</Typography>
|
||||
|
||||
@ -352,7 +354,7 @@ export const RegisterName = ({
|
||||
</ListItemIcon>
|
||||
<ListItemText
|
||||
primary={t('core:message.generic.publish_data', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
/>
|
||||
</ListItem>
|
||||
@ -367,7 +369,7 @@ export const RegisterName = ({
|
||||
</ListItemIcon>
|
||||
<ListItemText
|
||||
primary={t('core:message.generic.secure_ownership', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
/>
|
||||
</ListItem>
|
||||
@ -384,7 +386,7 @@ export const RegisterName = ({
|
||||
setRegisterNameValue('');
|
||||
}}
|
||||
>
|
||||
{t('core:action.close', { postProcess: 'capitalize' })}
|
||||
{t('core:action.close', { postProcess: 'capitalizeFirst' })}
|
||||
</Button>
|
||||
|
||||
<Button
|
||||
@ -399,7 +401,7 @@ export const RegisterName = ({
|
||||
onClick={registerName}
|
||||
autoFocus
|
||||
>
|
||||
{t('core:action.register_name', { postProcess: 'capitalize' })}
|
||||
{t('core:action.register_name', { postProcess: 'capitalizeFirst' })}
|
||||
</Button>
|
||||
</DialogActions>
|
||||
</Dialog>
|
||||
|
@ -155,7 +155,9 @@ export const Save = ({ isDesktop, disableWidth, myName }) => {
|
||||
const fee = await getFee('ARBITRARY');
|
||||
|
||||
await show({
|
||||
message: t('core:save.publish_qnd', { postProcess: 'capitalize' }),
|
||||
message: t('core:save_options.publish_qnd', {
|
||||
postProcess: 'capitalizeFirst',
|
||||
}),
|
||||
publishFee: fee.fee + ' QORT',
|
||||
});
|
||||
const response = await new Promise((res, rej) => {
|
||||
@ -175,7 +177,9 @@ export const Save = ({ isDesktop, disableWidth, myName }) => {
|
||||
.catch((error) => {
|
||||
rej(
|
||||
error.message ||
|
||||
t('core:message.error.generic', { postProcess: 'capitalize' })
|
||||
t('core:message.error.generic', {
|
||||
postProcess: 'capitalizeFirst',
|
||||
})
|
||||
);
|
||||
});
|
||||
});
|
||||
@ -184,8 +188,8 @@ export const Save = ({ isDesktop, disableWidth, myName }) => {
|
||||
setSettingsQdnLastUpdated(Date.now());
|
||||
setInfoSnack({
|
||||
type: 'success',
|
||||
message: t('core:message.success.publish_qdn', {
|
||||
postProcess: 'capitalize',
|
||||
message: t('core:message.success.published_qdn', {
|
||||
postProcess: 'capitalizeFirst',
|
||||
}),
|
||||
});
|
||||
setOpenSnack(true);
|
||||
@ -198,7 +202,7 @@ export const Save = ({ isDesktop, disableWidth, myName }) => {
|
||||
message:
|
||||
error?.message ||
|
||||
t('core:message.error.save_qdn', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
}),
|
||||
});
|
||||
setOpenSnack(true);
|
||||
@ -231,8 +235,8 @@ export const Save = ({ isDesktop, disableWidth, myName }) => {
|
||||
{isDesktop ? (
|
||||
<IconWrapper
|
||||
disableWidth={disableWidth}
|
||||
label={t('core:save_options.save', {
|
||||
postProcess: 'capitalize',
|
||||
label={t('core:action.save', {
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
selected={false}
|
||||
color={
|
||||
@ -303,7 +307,7 @@ export const Save = ({ isDesktop, disableWidth, myName }) => {
|
||||
}}
|
||||
>
|
||||
{t('core:save_options.settings', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
</Typography>{' '}
|
||||
<Spacer height="40px" />
|
||||
@ -332,7 +336,7 @@ export const Save = ({ isDesktop, disableWidth, myName }) => {
|
||||
}}
|
||||
>
|
||||
{t('core:save_options.qdn', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
</Button>
|
||||
</Box>
|
||||
@ -363,7 +367,7 @@ export const Save = ({ isDesktop, disableWidth, myName }) => {
|
||||
}}
|
||||
>
|
||||
{t('core:save_options.register_name', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
</Typography>
|
||||
</Box>
|
||||
@ -384,7 +388,7 @@ export const Save = ({ isDesktop, disableWidth, myName }) => {
|
||||
}}
|
||||
>
|
||||
{t('core:save_options.unsaved_changes', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
</Typography>
|
||||
|
||||
@ -407,8 +411,8 @@ export const Save = ({ isDesktop, disableWidth, myName }) => {
|
||||
onClick={saveToQdn}
|
||||
variant="contained"
|
||||
>
|
||||
{t('core:save_options.save_qdn', {
|
||||
postProcess: 'capitalize',
|
||||
{t('core:action.save_qdn', {
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
</LoadingButton>
|
||||
<Spacer height="20px" />
|
||||
@ -420,8 +424,8 @@ export const Save = ({ isDesktop, disableWidth, myName }) => {
|
||||
fontSize: '14px',
|
||||
}}
|
||||
>
|
||||
{t('core:save_options.reset_qdn', {
|
||||
postProcess: 'capitalize',
|
||||
{t('core:question.reset_qdn', {
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
</Typography>
|
||||
<Spacer height="10px" />
|
||||
@ -443,7 +447,7 @@ export const Save = ({ isDesktop, disableWidth, myName }) => {
|
||||
}}
|
||||
>
|
||||
{t('core:save_options.revert_qdn', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
</LoadingButton>
|
||||
</>
|
||||
@ -457,8 +461,8 @@ export const Save = ({ isDesktop, disableWidth, myName }) => {
|
||||
}}
|
||||
>
|
||||
{' '}
|
||||
{t('core:save_options.reset_pinned', {
|
||||
postProcess: 'capitalize',
|
||||
{t('core:question.reset_pinned', {
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
</Typography>
|
||||
<Spacer height="10px" />
|
||||
@ -468,7 +472,7 @@ export const Save = ({ isDesktop, disableWidth, myName }) => {
|
||||
variant="contained"
|
||||
>
|
||||
{t('core:save_options.revert_default', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
</LoadingButton>
|
||||
</>
|
||||
@ -491,8 +495,8 @@ export const Save = ({ isDesktop, disableWidth, myName }) => {
|
||||
fontSize: '14px',
|
||||
}}
|
||||
>
|
||||
{t('core:save_options.overwrite_changes', {
|
||||
postProcess: 'capitalize',
|
||||
{t('core:question.overwrite_changes', {
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
</Typography>
|
||||
<Spacer height="10px" />
|
||||
@ -514,7 +518,7 @@ export const Save = ({ isDesktop, disableWidth, myName }) => {
|
||||
}}
|
||||
>
|
||||
{t('core:save_options.overwrite_qdn', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
</LoadingButton>
|
||||
</Box>
|
||||
@ -534,7 +538,7 @@ export const Save = ({ isDesktop, disableWidth, myName }) => {
|
||||
}}
|
||||
>
|
||||
{t('core:save_options.no_pinned_changes', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
</Typography>
|
||||
</Box>
|
||||
@ -591,7 +595,7 @@ export const Save = ({ isDesktop, disableWidth, myName }) => {
|
||||
}}
|
||||
>
|
||||
{t('core:action.import', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
</ButtonBase>
|
||||
|
||||
@ -616,7 +620,7 @@ export const Save = ({ isDesktop, disableWidth, myName }) => {
|
||||
}}
|
||||
>
|
||||
{t('core:action.export', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
})}
|
||||
</ButtonBase>
|
||||
</Box>
|
||||
|
@ -23,10 +23,10 @@ const ThemeSelector = () => {
|
||||
title={
|
||||
themeMode === 'dark'
|
||||
? t('core:theme.light', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
})
|
||||
: t('core:theme.light', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
})
|
||||
}
|
||||
>
|
||||
|
@ -91,7 +91,7 @@ export const Tutorials = () => {
|
||||
</DialogContent>
|
||||
<DialogActions>
|
||||
<Button variant="contained" onClick={handleClose}>
|
||||
{t('core:action.close', { postProcess: 'capitalize' })}
|
||||
{t('core:action.close', { postProcess: 'capitalizeFirst' })}
|
||||
</Button>
|
||||
</DialogActions>
|
||||
</Dialog>
|
||||
@ -138,7 +138,7 @@ export const Tutorials = () => {
|
||||
|
||||
<DialogActions>
|
||||
<Button variant="contained" onClick={handleClose}>
|
||||
{t('core:action.close', { postProcess: 'capitalize' })}
|
||||
{t('core:action.close', { postProcess: 'capitalizeFirst' })}
|
||||
</Button>
|
||||
</DialogActions>
|
||||
</Dialog>
|
||||
|
@ -108,7 +108,7 @@ export const useHandleTutorials = () => {
|
||||
multi: [
|
||||
{
|
||||
title: t('tutorial:1_getting_started', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
}),
|
||||
resource: {
|
||||
name: 'a-test',
|
||||
@ -119,7 +119,7 @@ export const useHandleTutorials = () => {
|
||||
},
|
||||
{
|
||||
title: t('tutorial:2_overview', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
}),
|
||||
resource: {
|
||||
name: 'a-test',
|
||||
@ -130,7 +130,7 @@ export const useHandleTutorials = () => {
|
||||
},
|
||||
{
|
||||
title: t('tutorial:3_groups', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
}),
|
||||
resource: {
|
||||
name: 'a-test',
|
||||
@ -141,7 +141,7 @@ export const useHandleTutorials = () => {
|
||||
},
|
||||
{
|
||||
title: t('tutorial:4_obtain_qort', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
}),
|
||||
resource: {
|
||||
name: 'a-test',
|
||||
@ -163,7 +163,7 @@ export const useHandleTutorials = () => {
|
||||
multi: [
|
||||
{
|
||||
title: t('tutorial:apps.dashboard', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
}),
|
||||
resource: {
|
||||
name: 'a-test',
|
||||
@ -174,7 +174,7 @@ export const useHandleTutorials = () => {
|
||||
},
|
||||
{
|
||||
title: t('tutorial:apps.navigation', {
|
||||
postProcess: 'capitalize',
|
||||
postProcess: 'capitalizeFirst',
|
||||
}),
|
||||
resource: {
|
||||
name: 'a-test',
|
||||
|
@ -2,9 +2,15 @@ import i18n from 'i18next';
|
||||
import { initReactI18next } from 'react-i18next';
|
||||
import LanguageDetector from 'i18next-browser-languagedetector';
|
||||
|
||||
const capitalize = {
|
||||
const capitalizeAll = {
|
||||
type: 'postProcessor',
|
||||
name: 'capitalize',
|
||||
name: 'capitalizeAll',
|
||||
process: (value: string) => value.toUpperCase(),
|
||||
};
|
||||
|
||||
const capitalizeFirst = {
|
||||
type: 'postProcessor',
|
||||
name: 'capitalizeFirst',
|
||||
process: (value: string) => value.charAt(0).toUpperCase() + value.slice(1),
|
||||
};
|
||||
|
||||
@ -38,7 +44,8 @@ for (const path in modules) {
|
||||
i18n
|
||||
.use(initReactI18next)
|
||||
.use(LanguageDetector)
|
||||
.use(capitalize as any)
|
||||
.use(capitalizeAll as any)
|
||||
.use(capitalizeFirst as any)
|
||||
.init({
|
||||
resources,
|
||||
fallbackLng: 'en',
|
||||
|
@ -37,7 +37,6 @@
|
||||
"your_accounts": "your saved accounts"
|
||||
}
|
||||
},
|
||||
"name": "name",
|
||||
"node": {
|
||||
"choose": "choose custom node",
|
||||
"custom_many": "custom nodes",
|
||||
|
@ -1,21 +1,30 @@
|
||||
{
|
||||
"action": {
|
||||
"add": "add",
|
||||
"add_custom_framework": "add custom framework",
|
||||
"accept": "accept",
|
||||
"access": "access",
|
||||
"backup_account": "backup account",
|
||||
"backup_wallet": "backup wallet",
|
||||
"cancel": "cancel",
|
||||
"cancel_invitation": "cancel invitation",
|
||||
"change": "change",
|
||||
"change_file": "change file",
|
||||
"change_language": "change language",
|
||||
"choose": "choose",
|
||||
"choose_file": "choose file",
|
||||
"close": "close",
|
||||
"continue": "continue",
|
||||
"continue_logout": "continue to logout",
|
||||
"copy_link": "copy link",
|
||||
"create_apps": "create apps",
|
||||
"create_file": "create file",
|
||||
"create_thread": "create thread",
|
||||
"choose_logo": "choose a logo",
|
||||
"choose_name": "choose a name",
|
||||
"decline": "decline",
|
||||
"decrypt": "decrypt",
|
||||
"download": "download",
|
||||
"edit": "edit",
|
||||
"enter_name": "enter a name",
|
||||
"export": "export",
|
||||
@ -29,21 +38,46 @@
|
||||
"thread": "new thread"
|
||||
},
|
||||
"notify": "notify",
|
||||
"open": "open",
|
||||
"pin": "pin",
|
||||
"pin_app": "pin app",
|
||||
"pin_from_dashboard": "pin from dashboard",
|
||||
"post": "post",
|
||||
"post_message": "post message",
|
||||
"publish": "publish",
|
||||
"publish_app": "publish your app",
|
||||
"register_name": "register name",
|
||||
"remove": "remove",
|
||||
"return_apps_dashboard": "return to Apps Dashboard",
|
||||
"save": "save",
|
||||
"start_minting": "start minting"
|
||||
"search_apps": "search for apps",
|
||||
"select_app_type": "select App Type",
|
||||
"select_category": "select Category",
|
||||
"select_name_app": "select Name/App",
|
||||
"start_minting": "start minting",
|
||||
"unpin": "unpin",
|
||||
"unpin_app": "unpin app",
|
||||
"unpin_from_dashboard": "unpin from dashboard",
|
||||
"update": "update",
|
||||
"update_app": "update your app"
|
||||
},
|
||||
"admin": "admin",
|
||||
"all": "all",
|
||||
"api": "API",
|
||||
"app": "app",
|
||||
"app_name": "app name",
|
||||
"app_service_type": "app service type",
|
||||
"apps_dashboard": "apps Dashboard",
|
||||
"apps_official": "official Apps",
|
||||
"category": "category",
|
||||
"category_other": "categories",
|
||||
"core": {
|
||||
"block_height": "block height",
|
||||
"information": "core information",
|
||||
"peers": "connected peers",
|
||||
"version": "core version"
|
||||
},
|
||||
"domain": "domain",
|
||||
"ui": {
|
||||
"version": "UI version"
|
||||
},
|
||||
@ -52,14 +86,18 @@
|
||||
"one": "one"
|
||||
},
|
||||
"description": "description",
|
||||
"devmode_apps": "dev Mode Apps",
|
||||
"directory": "directory",
|
||||
"downloading_qdn": "downloading from QDN",
|
||||
"fee": {
|
||||
"payment": "payment fee",
|
||||
"publish": "publish fee"
|
||||
},
|
||||
"general_settings": "general settings",
|
||||
"identifier": "identifier",
|
||||
"last_height": "last height",
|
||||
"level": "level",
|
||||
"library": "library",
|
||||
"list": {
|
||||
"invite": "invite list",
|
||||
"join_request": "join request list",
|
||||
@ -71,21 +109,43 @@
|
||||
"message": {
|
||||
"error": {
|
||||
"address_not_found": "your address was not found",
|
||||
"app_need_name": "your app needs a name",
|
||||
"file_too_large": "file {{ filename }} is too large. Max size allowed is {{ size }} MB.",
|
||||
"generic": "an error occurred",
|
||||
"incorrect_password": "incorrect password",
|
||||
"invalid_zip": "invalid zip",
|
||||
"minting_account_add": "unable to add minting account",
|
||||
"minting_account_remove": "unable to remove minting account",
|
||||
"missing_field": "missing: {{ field }}",
|
||||
"save_qdn": "unable to save to QDN"
|
||||
"missing_fields": "missing: {{ fields }}",
|
||||
"navigation_timeout": "navigation timeout",
|
||||
"publish_app": "unable to publish app",
|
||||
"rating_option": "cannot find rating option",
|
||||
"save_qdn": "unable to save to QDN",
|
||||
"unable_encrypt_app": "unable to encrypt app. App not published'",
|
||||
"unable_publish_app": "unable to publish app",
|
||||
"unable_rate": "unable to rate"
|
||||
},
|
||||
"generic": {
|
||||
"devmode_local_node": "please use your local node for dev mode! Logout and use Local node.",
|
||||
"name_available": "{{ name }} is available",
|
||||
"name_benefits": "benefits of a name",
|
||||
"name_checking": "checking if name already exists",
|
||||
"name_preview": "you need a name to use preview",
|
||||
"name_publish": "you need a Qortal name to publish",
|
||||
"name_rate": "you need a name to rate.",
|
||||
"name_registration": "your balance is {{ balance }} QORT. A name registration requires a {{ fee }} QORT fee",
|
||||
"name_unavailable": "{{ name }} is unavailable",
|
||||
"no_description": "no description",
|
||||
"no_notifications": "no new notifications",
|
||||
"no_results": "no results",
|
||||
"one_app_per_name": "note: Currently, only one App and Website is allowed per Name.",
|
||||
"publish_data": "publish data to Qortal: anything from apps to videos. Fully decentralized!",
|
||||
"secure_ownership": "secure ownership of data published by your name. You can even sell your name, along with your data to a third party."
|
||||
"publishing": "publishing... Please wait.",
|
||||
"rating": "rating for {{ service }} {{ name }}",
|
||||
"secure_ownership": "secure ownership of data published by your name. You can even sell your name, along with your data to a third party.",
|
||||
"select_file": "please select a file",
|
||||
"select_image": "please select an image for a logo",
|
||||
"select_zip": "select .zip file containing static content:"
|
||||
},
|
||||
"question": {
|
||||
"new_user": "are you a new user?"
|
||||
@ -98,12 +158,17 @@
|
||||
},
|
||||
"success": {
|
||||
"order_submitted": "your buy order was submitted",
|
||||
"publish_qdn": "successfully published to QDN",
|
||||
"published": "successfully published. Please wait a couple minutes for the network to propogate the changes.",
|
||||
"published_qdn": "successfully published to QDN",
|
||||
"rated_app": "successfully rated. Please wait a couple minutes for the network to propogate the changes.",
|
||||
"request_read": "I have read this request",
|
||||
"transfer": "the transfer was succesful!"
|
||||
}
|
||||
},
|
||||
"minting_status": "minting status",
|
||||
"name": "name",
|
||||
"name_app": "name/App",
|
||||
"none": "none",
|
||||
"page": {
|
||||
"last": "last",
|
||||
"first": "first",
|
||||
@ -111,26 +176,39 @@
|
||||
"previous": "previous"
|
||||
},
|
||||
"payment_notification": "payment notification",
|
||||
"port": "port",
|
||||
"price": "price",
|
||||
"q_mail": "q-mail",
|
||||
"q_apps": {
|
||||
"about": "about this Q-App",
|
||||
"q_mail": "q-mail",
|
||||
"q_sandbox": "q-Sandbox"
|
||||
},
|
||||
"question": {
|
||||
"perform_transaction": "would you like to perform a {{action}} transaction?",
|
||||
"provide_thread": "please provide a thread title",
|
||||
"publish_app": "would you like to publish this app?",
|
||||
"publish_qdn": "would you like to publish your settings to QDN (encrypted)?",
|
||||
"overwrite_changes": "the app was unable to download your existing QDN-saved pinned apps. Would you like to overwrite those changes?",
|
||||
"rate_app": "would you like to rate this app a rating of {{ rate }}?. It will create a POLL tx.",
|
||||
"register_name": "would you like to register this name?",
|
||||
"reset_pinned": "don't like your current local changes? Would you like to reset to the default pinned apps?",
|
||||
"reset_qdn": "don't like your current local changes? Would you like to reset to your saved QDN pinned apps?"
|
||||
},
|
||||
"save_options": {
|
||||
"no_pinned_changes": "you currently do not have any changes to your pinned apps",
|
||||
"overwrite_changes": "the app was unable to download your existing QDN-saved pinned apps. Would you like to overwrite those changes?",
|
||||
"overwrite_qdn": "overwrite to QDN",
|
||||
"publish_qdn": "would you like to publish your settings to QDN (encrypted)?",
|
||||
"qdn": "use QDN saving",
|
||||
"register_name": "you need a registered Qortal name to save your pinned apps to QDN.",
|
||||
"reset_pinned": "don't like your current local changes? Would you like to reset to the default pinned apps?",
|
||||
"reset_qdn": "don't like your current local changes? Would you like to reset to your saved QDN pinned apps?",
|
||||
"revert_default": "revert to default",
|
||||
"revert_qdn": "revert to QDN",
|
||||
"save_qdn": "save to QDN",
|
||||
"save": "save",
|
||||
"settings": "you are using the export/import way of saving settings.",
|
||||
"unsaved_changes": " you have unsaved changes to your pinned apps. Save them to QDN."
|
||||
"unsaved_changes": "you have unsaved changes to your pinned apps. Save them to QDN."
|
||||
},
|
||||
"server": "server",
|
||||
"settings": "settings",
|
||||
"supply": "supply",
|
||||
"tags": "tags",
|
||||
"theme": {
|
||||
"dark": "dark mode",
|
||||
"light": "light mode"
|
||||
@ -146,9 +224,11 @@
|
||||
"title": "title",
|
||||
"tutorial": "tutorial",
|
||||
"user_lookup": "user lookup",
|
||||
"zip": "zip",
|
||||
"wallet": {
|
||||
"wallet": "wallet",
|
||||
"wallet_other": "wallets"
|
||||
},
|
||||
"website": "website",
|
||||
"welcome": "welcome"
|
||||
}
|
||||
|
@ -78,6 +78,7 @@
|
||||
"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.",
|
||||
"only_encrypted": "only unencrypted messages will be displayed.",
|
||||
"only_private_groups": "only private groups will be shown",
|
||||
"private_key_copied": "private key copied",
|
||||
"provide_message": "please provide a first message to the thread",
|
||||
"secure_place": "keep your private key in a secure place. Do not share!",
|
||||
@ -132,10 +133,5 @@
|
||||
"user_joined": "user successfully joined!"
|
||||
}
|
||||
},
|
||||
"question": {
|
||||
"perform_transaction": "would you like to perform a {{action}} transaction?",
|
||||
"provide_thread": "please provide a thread title",
|
||||
"register_name": "would you like to register this name?"
|
||||
},
|
||||
"thread_posts": "new thread posts"
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user