fix: add missing translation
This commit is contained in:
parent
c595d42313
commit
859efa4dad
@ -110,7 +110,7 @@ export const ChannelSettings: React.FC<ChannelSettingsProps> = (props) => {
|
|||||||
<div className='mt-12 flex flex-col items-center justify-center sm:w-fit'>
|
<div className='mt-12 flex flex-col items-center justify-center sm:w-fit'>
|
||||||
<div className='space-x-6'>
|
<div className='space-x-6'>
|
||||||
<Button type='submit' data-cy='button-save-channel-settings'>
|
<Button type='submit' data-cy='button-save-channel-settings'>
|
||||||
Sauvegarder
|
{t('application:save')}
|
||||||
</Button>
|
</Button>
|
||||||
<Button
|
<Button
|
||||||
type='button'
|
type='button'
|
||||||
@ -118,7 +118,7 @@ export const ChannelSettings: React.FC<ChannelSettingsProps> = (props) => {
|
|||||||
onClick={handleDelete}
|
onClick={handleDelete}
|
||||||
data-cy='button-delete-channel-settings'
|
data-cy='button-delete-channel-settings'
|
||||||
>
|
>
|
||||||
Supprimer
|
{t('application:delete')}
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
<FormState state={fetchState} message={message} />
|
<FormState state={fetchState} message={message} />
|
||||||
|
@ -172,7 +172,7 @@ export const GuildSettings: React.FC = () => {
|
|||||||
{member.isOwner ? (
|
{member.isOwner ? (
|
||||||
<>
|
<>
|
||||||
<Button type='submit' data-cy='button-save-guild-settings'>
|
<Button type='submit' data-cy='button-save-guild-settings'>
|
||||||
Sauvegarder
|
{t('application:save')}
|
||||||
</Button>
|
</Button>
|
||||||
<Button
|
<Button
|
||||||
type='button'
|
type='button'
|
||||||
@ -180,7 +180,7 @@ export const GuildSettings: React.FC = () => {
|
|||||||
onClick={handleDelete}
|
onClick={handleDelete}
|
||||||
data-cy='button-delete-guild-settings'
|
data-cy='button-delete-guild-settings'
|
||||||
>
|
>
|
||||||
Supprimer
|
{t('application:delete')}
|
||||||
</Button>
|
</Button>
|
||||||
</>
|
</>
|
||||||
) : (
|
) : (
|
||||||
@ -189,7 +189,7 @@ export const GuildSettings: React.FC = () => {
|
|||||||
onClick={handleLeave}
|
onClick={handleLeave}
|
||||||
data-cy='button-leave-guild-settings'
|
data-cy='button-leave-guild-settings'
|
||||||
>
|
>
|
||||||
Quitter {guild.name}
|
{t('application:leave')} {guild.name}
|
||||||
</Button>
|
</Button>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
import useTranslation from 'next-translate/useTranslation'
|
||||||
import InfiniteScroll from 'react-infinite-scroll-component'
|
import InfiniteScroll from 'react-infinite-scroll-component'
|
||||||
|
|
||||||
import { Loader } from '../../design/Loader'
|
import { Loader } from '../../design/Loader'
|
||||||
@ -6,6 +7,7 @@ import { useMessages } from '../../../contexts/Messages'
|
|||||||
import { Emoji } from '../../Emoji'
|
import { Emoji } from '../../Emoji'
|
||||||
|
|
||||||
export const Messages: React.FC = () => {
|
export const Messages: React.FC = () => {
|
||||||
|
const { t } = useTranslation()
|
||||||
const { messages, hasMore, nextPage } = useMessages()
|
const { messages, hasMore, nextPage } = useMessages()
|
||||||
|
|
||||||
if (messages.length === 0) {
|
if (messages.length === 0) {
|
||||||
@ -15,9 +17,9 @@ export const Messages: React.FC = () => {
|
|||||||
className='scrollbar-firefox-support mt-8 flex w-full flex-1 flex-col overflow-y-auto text-center text-lg transition-all'
|
className='scrollbar-firefox-support mt-8 flex w-full flex-1 flex-col overflow-y-auto text-center text-lg transition-all'
|
||||||
>
|
>
|
||||||
<p>
|
<p>
|
||||||
Nothing to show here! <Emoji value=':ghost:' size={20} />
|
{t('application:nothing-here')} <Emoji value=':ghost:' size={20} />
|
||||||
</p>
|
</p>
|
||||||
<p>Start chatting to kill this Ghost!</p>
|
<p>{t('application:start-chatting-kill-ghost')}</p>
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
@ -155,6 +155,16 @@ export const UserSettings: React.FC = () => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const handleSignout = async (): Promise<void> => {
|
||||||
|
try {
|
||||||
|
setFetchState('loading')
|
||||||
|
await authentication.signoutServerSide()
|
||||||
|
} catch (error) {
|
||||||
|
setFetchState('error')
|
||||||
|
setMessageTranslationKey('errors:server-error')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Form
|
<Form
|
||||||
onSubmit={handleSubmit(onSubmit)}
|
onSubmit={handleSubmit(onSubmit)}
|
||||||
@ -267,7 +277,12 @@ export const UserSettings: React.FC = () => {
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className='mt-12 flex flex-col items-center justify-center sm:w-fit'>
|
<div className='mt-12 flex flex-col items-center justify-center sm:w-fit'>
|
||||||
<Button type='submit'>Sauvegarder</Button>
|
<div className='space-x-6'>
|
||||||
|
<Button type='submit'>{t('application:save')}</Button>
|
||||||
|
<Button type='button' color='red' onClick={handleSignout}>
|
||||||
|
{t('application:signout')}
|
||||||
|
</Button>
|
||||||
|
</div>
|
||||||
<FormState state={fetchState} message={message} />
|
<FormState state={fetchState} message={message} />
|
||||||
</div>
|
</div>
|
||||||
</Form>
|
</Form>
|
||||||
|
@ -13,6 +13,10 @@
|
|||||||
"biography": "Biography",
|
"biography": "Biography",
|
||||||
"label-checkbox-email": "Show your email to everyone.",
|
"label-checkbox-email": "Show your email to everyone.",
|
||||||
"label-checkbox-guilds": "Show the list of guilds to everyone.",
|
"label-checkbox-guilds": "Show the list of guilds to everyone.",
|
||||||
"private-user-guilds-list": "List of private guilds",
|
"nothing-here": "Nothing's here...",
|
||||||
"nothing-here": "Nothing's here..."
|
"save": "Save",
|
||||||
|
"delete": "Delete",
|
||||||
|
"signout": "Sign out",
|
||||||
|
"leave": "Leave",
|
||||||
|
"start-chatting-kill-ghost": "Start chatting to kill this ghost!"
|
||||||
}
|
}
|
||||||
|
@ -13,6 +13,10 @@
|
|||||||
"biography": "Biographie",
|
"biography": "Biographie",
|
||||||
"label-checkbox-email": "Afficher votre email au public.",
|
"label-checkbox-email": "Afficher votre email au public.",
|
||||||
"label-checkbox-guilds": "Afficher la liste des guildes au public.",
|
"label-checkbox-guilds": "Afficher la liste des guildes au public.",
|
||||||
"private-user-guilds-list": "Liste des guildes privées",
|
"nothing-here": "Il n'y a rien ici...",
|
||||||
"nothing-here": "Il n'y a rien ici..."
|
"save": "Sauvegarder",
|
||||||
|
"delete": "Supprimer",
|
||||||
|
"signout": "Se déconnecter",
|
||||||
|
"leave": "Quitter",
|
||||||
|
"start-chatting-kill-ghost": "Commencez à discuter pour tuer ce fantôme !"
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user