Add label translations

This commit is contained in:
Nicola Benaglia 2025-05-21 20:44:41 +02:00
parent 95f35d4e30
commit 4240cec2e1
10 changed files with 65 additions and 21 deletions

View File

@ -145,7 +145,9 @@ export const AppsCategoryDesktop = ({
postProcess: 'capitalizeFirstChar', postProcess: 'capitalizeFirstChar',
})} })}
inputProps={{ inputProps={{
'aria-label': 'Search for apps', 'aria-label': t('core:action.search_apps', {
postProcess: 'capitalizeFirstChar',
}),
fontSize: '16px', fontSize: '16px',
fontWeight: 400, fontWeight: 400,
}} }}

View File

@ -426,7 +426,9 @@ export const ChatOptions = ({
postProcess: 'capitalizeFirstChar', postProcess: 'capitalizeFirstChar',
})} })}
inputProps={{ inputProps={{
'aria-label': 'Search for apps', 'aria-label': t('core:action.search_apps', {
postProcess: 'capitalizeFirstChar',
}),
fontSize: '16px', fontSize: '16px',
fontWeight: 400, fontWeight: 400,
}} }}

View File

@ -433,7 +433,7 @@ export const AddGroup = ({ address, open, setOpen }) => {
}} }}
> >
<Label> <Label>
{t('group:approval_threshold', { {t('group:message.generic.group_approval_threshold', {
postProcess: 'capitalizeFirstChar', postProcess: 'capitalizeFirstChar',
})} })}
</Label> </Label>
@ -442,7 +442,9 @@ export const AddGroup = ({ address, open, setOpen }) => {
labelId="demo-simple-select-label" labelId="demo-simple-select-label"
id="demo-simple-select" id="demo-simple-select"
value={approvalThreshold} value={approvalThreshold}
label="Group Approval Threshold" label={t('group:group.approval_threshold', {
postProcess: 'capitalizeFirstChar',
})}
onChange={handleChangeApprovalThreshold} onChange={handleChangeApprovalThreshold}
> >
<MenuItem value={0}> <MenuItem value={0}>

View File

@ -312,9 +312,15 @@ export const AddGroupList = ({ setInfoSnack, setOpenSnack }) => {
flexGrow: 1, flexGrow: 1,
}} }}
> >
<p>Groups list</p> <p>
{t('core:list.groups', {
postProcess: 'capitalizeFirstChar',
})}
</p>
<TextField <TextField
label="Search for Groups" label={t('core:action.search_groups', {
postProcess: 'capitalizeFirstChar',
})}
variant="outlined" variant="outlined"
fullWidth fullWidth
value={inputValue} value={inputValue}

View File

@ -921,7 +921,9 @@ export const ListOfGroupPromotions = () => {
<Spacer height="20px" /> <Spacer height="20px" />
<TextField <TextField
label="Promotion text" label={t('core:promotion_text', {
postProcess: 'capitalizeFirstChar',
})}
variant="filled" variant="filled"
fullWidth fullWidth
value={text} value={text}

View File

@ -254,7 +254,9 @@ export const ManageMembers = ({
}} }}
> >
<Tab <Tab
label="List of members" label={t('core:list.members', {
postProcess: 'capitalizeFirstChar',
})}
{...a11yProps(0)} {...a11yProps(0)}
sx={{ sx={{
'&.Mui-selected': { '&.Mui-selected': {
@ -265,7 +267,9 @@ export const ManageMembers = ({
/> />
<Tab <Tab
label="Invite new member" label={t('core:action.invite_member', {
postProcess: 'capitalizeFirstChar',
})}
{...a11yProps(1)} {...a11yProps(1)}
sx={{ sx={{
'&.Mui-selected': { '&.Mui-selected': {
@ -276,7 +280,9 @@ export const ManageMembers = ({
/> />
<Tab <Tab
label="List of invites" label={t('core:list.invites', {
postProcess: 'capitalizeFirstChar',
})}
{...a11yProps(2)} {...a11yProps(2)}
sx={{ sx={{
'&.Mui-selected': { '&.Mui-selected': {
@ -287,7 +293,9 @@ export const ManageMembers = ({
/> />
<Tab <Tab
label="List of bans" label={t('core:list.bans', {
postProcess: 'capitalizeFirstChar',
})}
{...a11yProps(3)} {...a11yProps(3)}
sx={{ sx={{
'&.Mui-selected': { '&.Mui-selected': {
@ -298,7 +306,9 @@ export const ManageMembers = ({
/> />
<Tab <Tab
label="Join requests" label={t('group:join_requests', {
postProcess: 'capitalizeFirstChar',
})}
{...a11yProps(4)} {...a11yProps(4)}
sx={{ sx={{
'&.Mui-selected': { '&.Mui-selected': {

View File

@ -316,8 +316,18 @@ export default function ThemeManager() {
onChange={(e, newValue) => setCurrentTab(newValue)} onChange={(e, newValue) => setCurrentTab(newValue)}
sx={{ mt: 2, mb: 2 }} sx={{ mt: 2, mb: 2 }}
> >
<Tab label="Light" value="light" /> <Tab
<Tab label="Dark" value="dark" /> label={t('core:theme.light', {
postProcess: 'capitalizeFirstChar',
})}
value="light"
/>
<Tab
label={t('core:theme.dark', {
postProcess: 'capitalizeFirstChar',
})}
value="dark"
/>
</Tabs> </Tabs>
<Box> <Box>
@ -412,6 +422,7 @@ export default function ThemeManager() {
<Button onClick={() => setOpenEditor(false)}> <Button onClick={() => setOpenEditor(false)}>
{t('core:action.cancel', { postProcess: 'capitalizeFirstChar' })} {t('core:action.cancel', { postProcess: 'capitalizeFirstChar' })}
</Button> </Button>
<Button <Button
disabled={!themeDraft.name} disabled={!themeDraft.name}
onClick={handleSaveTheme} onClick={handleSaveTheme}

View File

@ -6,7 +6,6 @@ import { useTranslation } from 'react-i18next';
const ThemeSelector = () => { const ThemeSelector = () => {
const { t } = useTranslation(['auth', 'core', 'group']); const { t } = useTranslation(['auth', 'core', 'group']);
const { themeMode, toggleTheme } = useThemeContext(); const { themeMode, toggleTheme } = useThemeContext();
return ( return (
@ -22,10 +21,10 @@ const ThemeSelector = () => {
<Tooltip <Tooltip
title={ title={
themeMode === 'dark' themeMode === 'dark'
? t('core:theme.light', { ? t('core:theme.light_mode', {
postProcess: 'capitalizeFirstChar', postProcess: 'capitalizeFirstChar',
}) })
: t('core:theme.light', { : t('core:theme.dark_mode', {
postProcess: 'capitalizeFirstChar', postProcess: 'capitalizeFirstChar',
}) })
} }

View File

@ -43,6 +43,7 @@
"import": "import", "import": "import",
"import_theme": "import theme", "import_theme": "import theme",
"invite": "invite", "invite": "invite",
"invite_member": "invite new member",
"join": "join", "join": "join",
"leave_comment": "leave comment", "leave_comment": "leave comment",
"load_announcements": "load older announcements", "load_announcements": "load older announcements",
@ -72,6 +73,7 @@
"save_disk": "save to disk", "save_disk": "save to disk",
"search": "search", "search": "search",
"search_apps": "search for apps", "search_apps": "search for apps",
"search_groups": "search for groups",
"search_chat_text": "search chat text", "search_chat_text": "search chat text",
"select_app_type": "select App Type", "select_app_type": "select App Type",
"select_category": "select Category", "select_category": "select Category",
@ -147,9 +149,13 @@
"level": "level", "level": "level",
"library": "library", "library": "library",
"list": { "list": {
"bans": "list of bans",
"groups": "list of groups",
"invite": "invite list", "invite": "invite list",
"invites": "list of invites",
"join_request": "join request list", "join_request": "join request list",
"member": "member list" "member": "member list",
"members": "list of members"
}, },
"loading": { "loading": {
"announcements": "loading announcements", "announcements": "loading announcements",
@ -264,6 +270,7 @@
"updating": "updating" "updating": "updating"
}, },
"message": "message", "message": "message",
"promotion_text": "Promotion text",
"question": { "question": {
"accept_vote_on_poll": "do you accept this VOTE_ON_POLL transaction? POLLS are public!", "accept_vote_on_poll": "do you accept this VOTE_ON_POLL transaction? POLLS are public!",
"logout": "are you sure you would like to logout?", "logout": "are you sure you would like to logout?",
@ -333,8 +340,10 @@
"supply": "supply", "supply": "supply",
"tags": "tags", "tags": "tags",
"theme": { "theme": {
"dark": "dark mode", "dark": "dark",
"light": "light mode", "dark_mode": "dark mode",
"light": "light",
"light_mode": "light mode",
"manager": "theme Manager", "manager": "theme Manager",
"name": "theme name" "name": "theme name"
}, },

View File

@ -29,13 +29,13 @@
"visit_q_mintership": "visit Q-Mintership" "visit_q_mintership": "visit Q-Mintership"
}, },
"advanced_options": "advanced options", "advanced_options": "advanced options",
"approval_threshold": "group Approval Threshold (number / percentage of Admins that must approve a transaction)",
"ban_list": "ban list", "ban_list": "ban list",
"block_delay": { "block_delay": {
"minimum": "Minimum Block delay", "minimum": "Minimum Block delay",
"maximum": "Maximum Block delay" "maximum": "Maximum Block delay"
}, },
"group": { "group": {
"approval_threshold": "group Approval Threshold",
"avatar": "group avatar", "avatar": "group avatar",
"closed": "closed (private) - users need permission to join", "closed": "closed (private) - users need permission to join",
"description": "description of group", "description": "description of group",
@ -73,6 +73,7 @@
"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_announcement": "group Announcements", "group_announcement": "group Announcements",
"group_approval_threshold": "group Approval Threshold (number / percentage of Admins that must approve a transaction)",
"group_encrypted": "group encrypted", "group_encrypted": "group encrypted",
"group_invited_you": "{{group}} has invited you", "group_invited_you": "{{group}} has invited you",
"group_key_created": "first group key created.", "group_key_created": "first group key created.",