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',
})}
inputProps={{
'aria-label': 'Search for apps',
'aria-label': t('core:action.search_apps', {
postProcess: 'capitalizeFirstChar',
}),
fontSize: '16px',
fontWeight: 400,
}}

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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