fix: missing translation for "Create a channel"
This commit is contained in:
parent
4f9d843733
commit
0d6aa0a78f
@ -84,7 +84,10 @@ export const UserSettings: React.FC = () => {
|
|||||||
return {
|
return {
|
||||||
...oldUser,
|
...oldUser,
|
||||||
...userCurrentData,
|
...userCurrentData,
|
||||||
settings: userCurrentSettings.settings
|
settings: {
|
||||||
|
...oldUser.settings,
|
||||||
|
...userCurrentSettings.settings
|
||||||
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
return {
|
return {
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
"website": "Website",
|
"website": "Website",
|
||||||
"create": "Create",
|
"create": "Create",
|
||||||
"status": "Status",
|
"status": "Status",
|
||||||
|
"create-a-channel": "Create a channel",
|
||||||
"create-a-guild": "Create a Guild",
|
"create-a-guild": "Create a Guild",
|
||||||
"create-a-guild-description": "Create your own guild and manage everything.",
|
"create-a-guild-description": "Create your own guild and manage everything.",
|
||||||
"join-a-guild": "Join a Guild",
|
"join-a-guild": "Join a Guild",
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
"website": "Site web",
|
"website": "Site web",
|
||||||
"create": "Créer",
|
"create": "Créer",
|
||||||
"status": "Statut",
|
"status": "Statut",
|
||||||
|
"create-a-channel": "Créer un channel",
|
||||||
"create-a-guild": "Créer une Guilde",
|
"create-a-guild": "Créer une Guilde",
|
||||||
"create-a-guild-description": "Créez votre propre guilde et gérez tout.",
|
"create-a-guild-description": "Créez votre propre guilde et gérez tout.",
|
||||||
"join-a-guild": "Rejoindre une Guilde",
|
"join-a-guild": "Rejoindre une Guilde",
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
import { NextPage } from 'next'
|
import { NextPage } from 'next'
|
||||||
|
import useTranslation from 'next-translate/useTranslation'
|
||||||
|
|
||||||
import { Head } from '../../../../components/Head'
|
import { Head } from '../../../../components/Head'
|
||||||
import { Application } from '../../../../components/Application'
|
import { Application } from '../../../../components/Application'
|
||||||
@ -21,6 +22,7 @@ export interface CreateChannelPageProps extends PagePropsWithAuthentication {
|
|||||||
|
|
||||||
const CreateChannelPage: NextPage<CreateChannelPageProps> = (props) => {
|
const CreateChannelPage: NextPage<CreateChannelPageProps> = (props) => {
|
||||||
const { guildId, authentication, guildMember } = props
|
const { guildId, authentication, guildMember } = props
|
||||||
|
const { t } = useTranslation()
|
||||||
|
|
||||||
const path = { guildId }
|
const path = { guildId }
|
||||||
|
|
||||||
@ -29,10 +31,10 @@ const CreateChannelPage: NextPage<CreateChannelPageProps> = (props) => {
|
|||||||
<GuildsProvider>
|
<GuildsProvider>
|
||||||
<GuildMemberProvider guildMember={guildMember} path={path}>
|
<GuildMemberProvider guildMember={guildMember} path={path}>
|
||||||
<Head
|
<Head
|
||||||
title={`Thream | Crée un channel`}
|
title={`Thream | ${t('application:create-a-channel')}`}
|
||||||
description={'Crée un nouveau channel'}
|
description={t('application:create-a-channel')}
|
||||||
/>
|
/>
|
||||||
<Application path={path} title={'Crée un channel'}>
|
<Application path={path} title={t('application:create-a-channel')}>
|
||||||
<CreateChannel />
|
<CreateChannel />
|
||||||
</Application>
|
</Application>
|
||||||
</GuildMemberProvider>
|
</GuildMemberProvider>
|
||||||
|
@ -5,7 +5,6 @@ import useTranslation from 'next-translate/useTranslation'
|
|||||||
|
|
||||||
import { Authentication, PagePropsWithAuthentication } from '.'
|
import { Authentication, PagePropsWithAuthentication } from '.'
|
||||||
import { UserCurrent } from '../../models/User'
|
import { UserCurrent } from '../../models/User'
|
||||||
import { Language, Theme } from '../../models/UserSettings'
|
|
||||||
|
|
||||||
export interface AuthenticationValue {
|
export interface AuthenticationValue {
|
||||||
authentication: Authentication
|
authentication: Authentication
|
||||||
@ -41,14 +40,13 @@ export const AuthenticationProvider: React.FC<PagePropsWithAuthentication> = (
|
|||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
authentication.api
|
authentication.api
|
||||||
.put('/users/current/settings', { theme, language: lang })
|
.put('/users/current/settings', { theme, language: lang })
|
||||||
.then(() => {
|
.then(({ data: userCurrentSettings }) => {
|
||||||
setUser((oldUser) => {
|
setUser((oldUser) => {
|
||||||
return {
|
return {
|
||||||
...oldUser,
|
...oldUser,
|
||||||
settings: {
|
settings: {
|
||||||
...oldUser.settings,
|
...oldUser.settings,
|
||||||
theme: theme as Theme,
|
...userCurrentSettings.settings
|
||||||
language: lang as Language
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
Reference in New Issue
Block a user