Add translations

This commit is contained in:
Nicola Benaglia 2025-05-10 09:15:52 +02:00
parent 69b811b520
commit 815a8f7ae3
12 changed files with 107 additions and 55 deletions

View File

@ -35,28 +35,17 @@
"one": "one" "one": "one"
}, },
"description": "description", "description": "description",
"downloading_qdn": "downloading from QDN",
"fee": { "fee": {
"payment": "payment fee", "payment": "payment fee",
"publish": "publish fee" "publish": "publish fee"
}, },
"general_settings": "general settings", "general_settings": "general settings",
"page": {
"last": "last",
"first": "first",
"next": "next",
"previous": "previous"
},
"downloading_qdn": "downloading from QDN",
"invite_list": "invite list", "invite_list": "invite list",
"last_height": "last height", "last_height": "last height",
"loading": "loading...", "loading": "loading...",
"loading_posts": "loading posts... please wait.", "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", "message_us": "please message us on Telegram or Discord if you need 4 QORT to start chatting without any limitations",
"minting_status": "minting status",
"new_user": "are you a new user?",
"payment_notification": "payment notification",
"price": "price",
"q_mail": "q-mail",
"message": { "message": {
"error": { "error": {
"generic": "an error occurred", "generic": "an error occurred",
@ -76,6 +65,17 @@
"transfer": "the transfer was succesful!" "transfer": "the transfer was succesful!"
} }
}, },
"minting_status": "minting status",
"new_user": "are you a new user?",
"page": {
"last": "last",
"first": "first",
"next": "next",
"previous": "previous"
},
"payment_notification": "payment notification",
"price": "price",
"q_mail": "q-mail",
"save_options": { "save_options": {
"no_pinned_changes": "you currently do not have any changes to your pinned apps", "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_changes": "the app was unable to download your existing QDN-saved pinned apps. Would you like to overwrite those changes?",

View File

@ -25,7 +25,8 @@
"description": "description of group", "description": "description of group",
"invites": "group invites", "invites": "group invites",
"management": "group management", "management": "group management",
"name": "name of group", "member_number": "number of members",
"name": "group name",
"open": "open (public)", "open": "open (public)",
"type": "group type" "type": "group type"
}, },
@ -37,6 +38,8 @@
}, },
"message": { "message": {
"generic": { "generic": {
"already_in_group": "you are already in this group!",
"closed_group": "this is a closed/private group, so you will need to wait until an admin accepts your request",
"descrypt_wallet": "decrypting wallet...", "descrypt_wallet": "decrypting wallet...",
"encryption_key": "the group's first common encryption key is in the process of creation. Please wait a few minutes for it to be retrieved by the network. Checking every 2 minutes...", "encryption_key": "the group's first common encryption key is in the process of creation. Please wait a few minutes for it to be retrieved by the network. Checking every 2 minutes...",
"group_invited_you": "{{group}} has invited you", "group_invited_you": "{{group}} has invited you",
@ -64,6 +67,8 @@
"group_join": "successfully requested to join group. It may take a couple of minutes for the changes to propagate", "group_join": "successfully requested to join group. It may take a couple of minutes for the changes to propagate",
"group_join_name": "joined group {{group_name}}: awaiting confirmation", "group_join_name": "joined group {{group_name}}: awaiting confirmation",
"group_join_label": "joined group {{name}}: success!", "group_join_label": "joined group {{name}}: success!",
"group_join_request": "requested to join Group {{group_name}}: awaiting confirmation",
"group_join_outcome": "requested to join Group {{group_name}}: success!",
"loading_threads": "loading threads... please wait.", "loading_threads": "loading threads... please wait.",
"unbanned_user": "successfully unbanned user. It may take a couple of minutes for the changes to propagate" "unbanned_user": "successfully unbanned user. It may take a couple of minutes for the changes to propagate"
} }

View File

@ -63,6 +63,7 @@ export const DownloadWallet = ({
wallet, wallet,
qortAddress: rawWallet.address0, qortAddress: rawWallet.address0,
}); });
return { return {
wallet, wallet,
qortAddress: rawWallet.address0, qortAddress: rawWallet.address0,

View File

@ -3,10 +3,8 @@ import Box from '@mui/material/Box';
import { HubsIcon } from '../../assets/Icons/HubsIcon'; import { HubsIcon } from '../../assets/Icons/HubsIcon';
import { MessagingIcon } from '../../assets/Icons/MessagingIcon'; import { MessagingIcon } from '../../assets/Icons/MessagingIcon';
import AppIcon from '../../assets/svgs/AppIcon.svg'; import AppIcon from '../../assets/svgs/AppIcon.svg';
import { HomeIcon } from '../../assets/Icons/HomeIcon'; import { HomeIcon } from '../../assets/Icons/HomeIcon';
import { Save } from '../Save/Save'; import { Save } from '../Save/Save';
import { enabledDevModeAtom } from '../../atoms/global'; import { enabledDevModeAtom } from '../../atoms/global';
import { useAtom } from 'jotai'; import { useAtom } from 'jotai';

View File

@ -1,4 +1,4 @@
import * as React from 'react'; import { useState } from 'react';
import { ButtonBase, Typography, useTheme } from '@mui/material'; import { ButtonBase, Typography, useTheme } from '@mui/material';
import Box from '@mui/material/Box'; import Box from '@mui/material/Box';
import { NotificationIcon2 } from '../../assets/Icons/NotificationIcon2'; import { NotificationIcon2 } from '../../assets/Icons/NotificationIcon2';
@ -81,18 +81,18 @@ export const DesktopHeader = ({
setGroupSection, setGroupSection,
isPrivate, isPrivate,
}) => { }) => {
const [value, setValue] = React.useState(0); const [value, setValue] = useState(0);
const theme = useTheme(); const theme = useTheme();
return ( return (
<Box <Box
sx={{ sx={{
width: '100%',
display: 'flex',
alignItems: 'center', alignItems: 'center',
display: 'flex',
height: '70px', // Footer height height: '70px', // Footer height
zIndex: 1,
justifyContent: 'space-between', justifyContent: 'space-between',
padding: '10px', padding: '10px',
width: '100%',
zIndex: 1,
}} }}
> >
<Box <Box
@ -126,11 +126,12 @@ export const DesktopHeader = ({
: selectedGroup?.groupName} : selectedGroup?.groupName}
</Typography> </Typography>
</Box> </Box>
<Box <Box
sx={{ sx={{
alignItems: 'center',
display: 'flex', display: 'flex',
gap: '20px', gap: '20px',
alignItems: 'center',
visibility: selectedGroup?.groupId === '0' ? 'hidden' : 'visibile', visibility: selectedGroup?.groupId === '0' ? 'hidden' : 'visibile',
}} }}
> >
@ -219,6 +220,7 @@ export const DesktopHeader = ({
/> />
</IconWrapper> </IconWrapper>
</ButtonBase> </ButtonBase>
<ButtonBase <ButtonBase
onClick={() => { onClick={() => {
setOpenManageMembers(true); setOpenManageMembers(true);
@ -226,17 +228,18 @@ export const DesktopHeader = ({
> >
<IconWrapper <IconWrapper
color={theme.palette.text.secondary} color={theme.palette.text.secondary}
customHeight="55px"
label="Members" label="Members"
selected={false} selected={false}
customHeight="55px"
> >
<MembersIcon <MembersIcon
color={theme.palette.text.secondary}
height={25} height={25}
width={20} width={20}
color={theme.palette.text.secondary}
/> />
</IconWrapper> </IconWrapper>
</ButtonBase> </ButtonBase>
<ButtonBase <ButtonBase
onClick={() => { onClick={() => {
setGroupSection('adminSpace'); setGroupSection('adminSpace');

View File

@ -1,5 +1,6 @@
import Box from '@mui/material/Box'; import Box from '@mui/material/Box';
import Drawer from '@mui/material/Drawer'; import Drawer from '@mui/material/Drawer';
export const DrawerComponent = ({ open, setOpen, children }) => { export const DrawerComponent = ({ open, setOpen, children }) => {
const toggleDrawer = (newOpen: boolean) => () => { const toggleDrawer = (newOpen: boolean) => () => {
setOpen(newOpen); setOpen(newOpen);

View File

@ -40,6 +40,7 @@ export const Explore = ({ setDesktopViewMode }) => {
}} }}
src={qTradeLogo} src={qTradeLogo}
/> />
<Typography <Typography
sx={{ sx={{
fontSize: '1rem', fontSize: '1rem',
@ -66,6 +67,7 @@ export const Explore = ({ setDesktopViewMode }) => {
color: theme.palette.text.primary, color: theme.palette.text.primary,
}} }}
/> />
<Typography <Typography
sx={{ sx={{
fontSize: '1rem', fontSize: '1rem',
@ -94,6 +96,7 @@ export const Explore = ({ setDesktopViewMode }) => {
color: theme.palette.text.primary, color: theme.palette.text.primary,
}} }}
/> />
<Typography <Typography
sx={{ sx={{
fontSize: '1rem', fontSize: '1rem',
@ -102,6 +105,7 @@ export const Explore = ({ setDesktopViewMode }) => {
{t('tutorial:initial.general_chat', { postProcess: 'capitalize' })} {t('tutorial:initial.general_chat', { postProcess: 'capitalize' })}
</Typography> </Typography>
</ButtonBase> </ButtonBase>
<ButtonBase <ButtonBase
sx={{ sx={{
'&:hover': { backgroundColor: theme.palette.background.paper }, '&:hover': { backgroundColor: theme.palette.background.paper },
@ -119,6 +123,7 @@ export const Explore = ({ setDesktopViewMode }) => {
color: theme.palette.text.primary, color: theme.palette.text.primary,
}} }}
/> />
<Typography <Typography
sx={{ sx={{
fontSize: '1rem', fontSize: '1rem',

View File

@ -1,4 +1,3 @@
import React from 'react';
import { JoinGroup } from './JoinGroup'; import { JoinGroup } from './JoinGroup';
export const GlobalActions = () => { export const GlobalActions = () => {

View File

@ -68,6 +68,7 @@ export const JoinGroup = () => {
try { try {
const groupId = group.groupId; const groupId = group.groupId;
const fee = await getFee('JOIN_GROUP'); const fee = await getFee('JOIN_GROUP');
await show({ await show({
message: t('group:question.perform_transaction', { message: t('group:question.perform_transaction', {
action: 'JOIN_GROUP', action: 'JOIN_GROUP',
@ -75,7 +76,9 @@ export const JoinGroup = () => {
}), }),
publishFee: fee.fee + ' QORT', publishFee: fee.fee + ' QORT',
}); });
setIsLoadingJoinGroup(true); setIsLoadingJoinGroup(true);
await new Promise((res, rej) => { await new Promise((res, rej) => {
window window
.sendMessage('joinGroup', { .sendMessage('joinGroup', {
@ -85,8 +88,9 @@ export const JoinGroup = () => {
if (!response?.error) { if (!response?.error) {
setInfoSnack({ setInfoSnack({
type: 'success', type: 'success',
message: message: t('group:message.success.group_join', {
'Successfully requested to join group. It may take a couple of minutes for the changes to propagate', postProcess: 'capitalize',
}),
}); });
if (isOpen) { if (isOpen) {
@ -94,8 +98,14 @@ export const JoinGroup = () => {
{ {
...response, ...response,
type: 'joined-group', type: 'joined-group',
label: `Joined Group ${group?.groupName}: awaiting confirmation`, label: t('group:message.success.group_join_label', {
labelDone: `Joined Group ${group?.groupName}: success!`, group_name: group?.groupName,
postProcess: 'capitalize',
}),
labelDone: t('group:message.success.group_join_label', {
group_name: group?.groupName,
postProcess: 'capitalize',
}),
done: false, done: false,
groupId, groupId,
}, },
@ -106,15 +116,20 @@ export const JoinGroup = () => {
{ {
...response, ...response,
type: 'joined-group-request', type: 'joined-group-request',
label: `Requested to join Group ${group?.groupName}: awaiting confirmation`, label: t('group:message.success.group_join_request', {
labelDone: `Requested to join Group ${group?.groupName}: success!`, group_name: group?.groupName,
postProcess: 'capitalize',
}),
labelDone: t('group:message.success.group_join_outcome', {
group_name: group?.groupName,
postProcess: 'capitalize',
}),
done: false, done: false,
groupId, groupId,
}, },
...prev, ...prev,
]); ]);
} }
setOpenSnack(true); setOpenSnack(true);
res(response); res(response);
return; return;
@ -130,7 +145,9 @@ export const JoinGroup = () => {
.catch((error) => { .catch((error) => {
setInfoSnack({ setInfoSnack({
type: 'error', type: 'error',
message: error.message || 'An error occurred', message:
error.message ||
t('core:message.error.generic', { postProcess: 'capitalize' }),
}); });
setOpenSnack(true); setOpenSnack(true);
rej(error); rej(error);
@ -138,10 +155,12 @@ export const JoinGroup = () => {
}); });
setIsLoadingJoinGroup(false); setIsLoadingJoinGroup(false);
} catch (error) { } catch (error) {
console.log(error);
} finally { } finally {
setIsLoadingJoinGroup(false); setIsLoadingJoinGroup(false);
} }
}; };
return ( return (
<> <>
<Dialog <Dialog
@ -153,32 +172,31 @@ export const JoinGroup = () => {
{!groupInfo && ( {!groupInfo && (
<Box <Box
sx={{ sx={{
width: '325px',
height: '150px',
display: 'flex',
alignItems: 'center', alignItems: 'center',
display: 'flex',
height: '150px',
justifyContent: 'center', justifyContent: 'center',
width: '325px',
}} }}
> >
{' '}
<CircularProgress <CircularProgress
size={25} size={25}
sx={{ sx={{
color: theme.palette.text.primary, color: theme.palette.text.primary,
}} }}
/>{' '} />
</Box> </Box>
)} )}
<Box <Box
sx={{ sx={{
width: '325px', alignItems: 'center',
height: 'auto',
maxHeight: '400px',
display: !groupInfo ? 'none' : 'flex', display: !groupInfo ? 'none' : 'flex',
flexDirection: 'column', flexDirection: 'column',
alignItems: 'center',
gap: '10px', gap: '10px',
height: 'auto',
maxHeight: '400px',
padding: '10px', padding: '10px',
width: '325px',
}} }}
> >
<Typography <Typography
@ -187,16 +205,20 @@ export const JoinGroup = () => {
fontWeight: 600, fontWeight: 600,
}} }}
> >
Group name: {` ${groupInfo?.groupName}`} {t('group:group.name', { postProcess: 'capitalize' })}:{' '}
{` ${groupInfo?.groupName}`}
</Typography> </Typography>
<Typography <Typography
sx={{ sx={{
fontSize: '15px', fontSize: '15px',
fontWeight: 600, fontWeight: 600,
}} }}
> >
Number of members: {` ${groupInfo?.memberCount}`} {t('group:group.member_number', { postProcess: 'capitalize' })}:{' '}
{` ${groupInfo?.memberCount}`}
</Typography> </Typography>
{groupInfo?.description && ( {groupInfo?.description && (
<Typography <Typography
sx={{ sx={{
@ -214,7 +236,9 @@ export const JoinGroup = () => {
fontWeight: 600, fontWeight: 600,
}} }}
> >
*You are already in this group! {t('group:message.generic.already_in_group', {
postProcess: 'capitalize',
})}
</Typography> </Typography>
)} )}
{!isInGroup && groupInfo?.isOpen === false && ( {!isInGroup && groupInfo?.isOpen === false && (
@ -224,12 +248,14 @@ export const JoinGroup = () => {
fontWeight: 600, fontWeight: 600,
}} }}
> >
*This is a closed/private group, so you will need to wait until {t('group:message.generic.closed_group', {
an admin accepts your request postProcess: 'capitalize',
})}
</Typography> </Typography>
)} )}
</Box> </Box>
</DialogContent> </DialogContent>
<DialogActions> <DialogActions>
<ButtonBase <ButtonBase
onClick={() => { onClick={() => {
@ -249,7 +275,9 @@ export const JoinGroup = () => {
opacity: isInGroup ? 0.1 : 1, opacity: isInGroup ? 0.1 : 1,
}} }}
> >
Join {t('core:action.join', {
postProcess: 'capitalize',
})}
</CustomButtonAccept> </CustomButtonAccept>
</ButtonBase> </ButtonBase>
@ -262,7 +290,9 @@ export const JoinGroup = () => {
}} }}
onClick={() => setIsOpen(false)} onClick={() => setIsOpen(false)}
> >
Close {t('core:action.close', {
postProcess: 'capitalize',
})}
</CustomButtonAccept> </CustomButtonAccept>
</DialogActions> </DialogActions>
</Dialog> </Dialog>
@ -276,14 +306,14 @@ export const JoinGroup = () => {
{isLoadingJoinGroup && ( {isLoadingJoinGroup && (
<Box <Box
sx={{ sx={{
position: 'absolute', alignItems: 'center',
top: 0,
left: 0,
right: 0,
bottom: 0, bottom: 0,
display: 'flex', display: 'flex',
justifyContent: 'center', justifyContent: 'center',
alignItems: 'center', left: 0,
position: 'absolute',
right: 0,
top: 0,
}} }}
> >
<FidgetSpinner <FidgetSpinner

View File

@ -331,6 +331,7 @@ export const AddGroup = ({ address, open, setOpen }) => {
postProcess: 'capitalize', postProcess: 'capitalize',
})} })}
</Label> </Label>
<Input <Input
placeholder={t('group:group.name', { placeholder={t('group:group.name', {
postProcess: 'capitalize', postProcess: 'capitalize',
@ -339,6 +340,7 @@ export const AddGroup = ({ address, open, setOpen }) => {
onChange={(e) => setName(e.target.value)} onChange={(e) => setName(e.target.value)}
/> />
</Box> </Box>
<Box <Box
sx={{ sx={{
display: 'flex', display: 'flex',

View File

@ -158,8 +158,14 @@ export const AddGroupList = ({ setInfoSnack, setOpenSnack }) => {
{ {
...response, ...response,
type: 'joined-group-request', type: 'joined-group-request',
label: `Requested to join Group ${group?.groupName}: awaiting confirmation`, label: t('group:message.success.group_join_request', {
labelDone: `Requested to join Group ${group?.groupName}: success!`, group_name: group?.groupName,
postProcess: 'capitalize',
}),
labelDone: t('group:message.success.group_join_outcome', {
group_name: group?.groupName,
postProcess: 'capitalize',
}),
done: false, done: false,
groupId, groupId,
}, },

View File

@ -168,6 +168,7 @@ export const QortPrice = () => {
)} )}
</Box> </Box>
</Tooltip> </Tooltip>
<Box <Box
sx={{ sx={{
display: 'flex', display: 'flex',
@ -198,6 +199,7 @@ export const QortPrice = () => {
</Typography> </Typography>
)} )}
</Box> </Box>
<Tooltip <Tooltip
title={ title={
<span style={{ fontSize: '14px', fontWeight: 700 }}> <span style={{ fontSize: '14px', fontWeight: 700 }}>