2
2
mirror of https://github.com/Thream/website.git synced 2024-07-12 13:20:11 +02:00

fix: missing translation for "Create a channel"

This commit is contained in:
Divlo 2022-04-09 01:03:15 +02:00
parent 4f9d843733
commit 0d6aa0a78f
No known key found for this signature in database
GPG Key ID: 8F9478F220CE65E9
5 changed files with 13 additions and 8 deletions

View File

@ -84,7 +84,10 @@ export const UserSettings: React.FC = () => {
return {
...oldUser,
...userCurrentData,
settings: userCurrentSettings.settings
settings: {
...oldUser.settings,
...userCurrentSettings.settings
}
}
})
return {

View File

@ -2,6 +2,7 @@
"website": "Website",
"create": "Create",
"status": "Status",
"create-a-channel": "Create a channel",
"create-a-guild": "Create a Guild",
"create-a-guild-description": "Create your own guild and manage everything.",
"join-a-guild": "Join a Guild",

View File

@ -2,6 +2,7 @@
"website": "Site web",
"create": "Créer",
"status": "Statut",
"create-a-channel": "Créer un channel",
"create-a-guild": "Créer une Guilde",
"create-a-guild-description": "Créez votre propre guilde et gérez tout.",
"join-a-guild": "Rejoindre une Guilde",

View File

@ -1,4 +1,5 @@
import { NextPage } from 'next'
import useTranslation from 'next-translate/useTranslation'
import { Head } from '../../../../components/Head'
import { Application } from '../../../../components/Application'
@ -21,6 +22,7 @@ export interface CreateChannelPageProps extends PagePropsWithAuthentication {
const CreateChannelPage: NextPage<CreateChannelPageProps> = (props) => {
const { guildId, authentication, guildMember } = props
const { t } = useTranslation()
const path = { guildId }
@ -29,10 +31,10 @@ const CreateChannelPage: NextPage<CreateChannelPageProps> = (props) => {
<GuildsProvider>
<GuildMemberProvider guildMember={guildMember} path={path}>
<Head
title={`Thream | Crée un channel`}
description={'Crée un nouveau channel'}
title={`Thream | ${t('application:create-a-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 />
</Application>
</GuildMemberProvider>

View File

@ -5,7 +5,6 @@ import useTranslation from 'next-translate/useTranslation'
import { Authentication, PagePropsWithAuthentication } from '.'
import { UserCurrent } from '../../models/User'
import { Language, Theme } from '../../models/UserSettings'
export interface AuthenticationValue {
authentication: Authentication
@ -41,14 +40,13 @@ export const AuthenticationProvider: React.FC<PagePropsWithAuthentication> = (
useEffect(() => {
authentication.api
.put('/users/current/settings', { theme, language: lang })
.then(() => {
.then(({ data: userCurrentSettings }) => {
setUser((oldUser) => {
return {
...oldUser,
settings: {
...oldUser.settings,
theme: theme as Theme,
language: lang as Language
...userCurrentSettings.settings
}
}
})