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

@ -16,8 +16,7 @@
"export": "export",
"import": "import",
"join": "join",
"logout": "logout",
"refetch_page": "refetch page"
"logout": "logout"
},
"core": {
"block_height": "block height",
@ -37,14 +36,16 @@
"page": {
"last": "last",
"first": "first",
"next": "next",
"previous": "previous"
},
"downloading_qdn": "downloading from QDN",
"last_height": "last height",
"loading": "loading...",
"loading_posts": "loading posts... please wait.",
"message_us": "please message us on Telegram or Discord if you need 4 QORT to start chatting without any limitations",
"minting_status": "minting status",
"next": "next",
"new_user": "are you a new user?",
"payment_notification": "payment notification",
"price": "price",
"q_mail": "q-mail",

View File

@ -3,6 +3,7 @@
"create_group": "create group",
"find_group": "find group",
"join_group": "join group",
"refetch_page": "refetch page",
"return_to_thread": "return to threads"
},
"advanced_options": "advanced options",

View File

@ -510,7 +510,7 @@ function App() {
console.error(
'Failed to get API key:',
error?.message || 'An error occurred'
); // TODO translate
);
})
.finally(() => {
window
@ -1887,10 +1887,6 @@ function App() {
<AppContainer
sx={{
height: '100vh',
// backgroundImage: desktopViewMode === "apps" && 'url("appsBg.svg")',
// backgroundSize: desktopViewMode === "apps" && "cover",
// backgroundPosition: desktopViewMode === "apps" && "center",
// backgroundRepeat: desktopViewMode === "apps" && "no-repeat",
}}
>
<PdfViewer />
@ -3027,7 +3023,7 @@ function App() {
>
{t('core:action.close', { postProcess: 'capitalize' })}
</CustomButton>
</> // TODO translate
</>
)}
{countdown && (

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',