Add translations

This commit is contained in:
Nicola Benaglia
2025-04-26 16:05:06 +02:00
parent 53facb9f2c
commit 9ec1762481
7 changed files with 37 additions and 30 deletions

View File

@@ -129,7 +129,7 @@ export const BlockedUsersModal = () => {
executeEvent('updateChatMessagesWithBlocks', true);
}
} catch (error) {
setOpenSnackGlobal(true); // TODO translate
setOpenSnackGlobal(true);
setInfoSnackCustom({
type: 'error',
message: error?.message || 'Unable to block user',

View File

@@ -724,7 +724,7 @@ export const Thread = ({
disabled={!hasNextPage}
variant="contained"
>
{t('core:next', { postProcess: 'capitalize' })}
{t('core:page.next', { postProcess: 'capitalize' })}
</Button>
<Button
sx={{
@@ -962,7 +962,9 @@ export const Thread = ({
color: 'white',
}}
>
{t('core:action.refetch_page', { postProcess: 'capitalize' })}
{t('group:action.refetch_page', {
postProcess: 'capitalize',
})}
</Button>
</Box>
</>
@@ -1036,7 +1038,7 @@ export const Thread = ({
disabled={!hasNextPage}
variant="contained"
>
{t('core:next', { postProcess: 'capitalize' })}
{t('core:page.next', { postProcess: 'capitalize' })}
</Button>
<Button
sx={{

View File

@@ -1,46 +1,52 @@
import { Box, ButtonBase, Typography } from '@mui/material';
import { Spacer } from '../../common/Spacer';
import { useTranslation } from 'react-i18next';
export const NewUsersCTA = ({ balance }) => {
const { t } = useTranslation(['core']);
if (balance === undefined || +balance > 0) return null;
return (
<Box
sx={{
width: '100%',
alignItems: 'center',
display: 'flex',
flexDirection: 'column',
alignItems: 'center',
width: '100%',
}}
>
<Spacer height="40px" />
<Box
sx={{
width: '320px',
justifyContent: 'center',
flexDirection: 'column',
alignItems: 'center',
padding: '15px',
outline: '1px solid gray',
borderRadius: '4px',
flexDirection: 'column',
justifyContent: 'center',
outline: '1px solid gray',
padding: '15px',
width: '320px',
}}
>
<Typography
sx={{
textAlign: 'center',
fontSize: '1.2rem',
fontWeight: 'bold',
textAlign: 'center',
}}
>
Are you a new user?
</Typography>{' '}
// TODO translate
<Spacer height="20px" />
<Typography>
Please message us on Telegram or Discord if you need 4 QORT to start
chatting without any limitations
{t('core:new_user', { postProcess: 'capitalize' })}
</Typography>
<Spacer height="20px" />
<Typography>
{t('core:message_us', { postProcess: 'capitalize' })}
</Typography>
<Spacer height="20px" />
<Box
sx={{
width: '100%',
@@ -68,6 +74,7 @@ export const NewUsersCTA = ({ balance }) => {
>
Telegram
</ButtonBase>
<ButtonBase
sx={{
textDecoration: 'underline',

View File

@@ -265,7 +265,7 @@ export const Minting = ({
rej({ message: response.error });
})
.catch((error) => {
rej({ message: error.message || 'An error occurred' }); //TODO translate
rej({ message: error.message || 'An error occurred' });
});
});
} catch (error) {
@@ -280,7 +280,7 @@ export const Minting = ({
}, []);
const createRewardShare = useCallback(async (publicKey, recipient) => {
const fee = await getFee('REWARD_SHARE');
const fee = await getFee('REWARD_SHARE'); // TODO translate
await show({
message: 'Would you like to perform an REWARD_SHARE transaction?',
publishFee: fee.fee + ' QORT',