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='space-x-6'>
|
||||
<Button type='submit' data-cy='button-save-channel-settings'>
|
||||
Sauvegarder
|
||||
{t('application:save')}
|
||||
</Button>
|
||||
<Button
|
||||
type='button'
|
||||
@ -118,7 +118,7 @@ export const ChannelSettings: React.FC<ChannelSettingsProps> = (props) => {
|
||||
onClick={handleDelete}
|
||||
data-cy='button-delete-channel-settings'
|
||||
>
|
||||
Supprimer
|
||||
{t('application:delete')}
|
||||
</Button>
|
||||
</div>
|
||||
<FormState state={fetchState} message={message} />
|
||||
|
@ -172,7 +172,7 @@ export const GuildSettings: React.FC = () => {
|
||||
{member.isOwner ? (
|
||||
<>
|
||||
<Button type='submit' data-cy='button-save-guild-settings'>
|
||||
Sauvegarder
|
||||
{t('application:save')}
|
||||
</Button>
|
||||
<Button
|
||||
type='button'
|
||||
@ -180,7 +180,7 @@ export const GuildSettings: React.FC = () => {
|
||||
onClick={handleDelete}
|
||||
data-cy='button-delete-guild-settings'
|
||||
>
|
||||
Supprimer
|
||||
{t('application:delete')}
|
||||
</Button>
|
||||
</>
|
||||
) : (
|
||||
@ -189,7 +189,7 @@ export const GuildSettings: React.FC = () => {
|
||||
onClick={handleLeave}
|
||||
data-cy='button-leave-guild-settings'
|
||||
>
|
||||
Quitter {guild.name}
|
||||
{t('application:leave')} {guild.name}
|
||||
</Button>
|
||||
)}
|
||||
</div>
|
||||
|
@ -1,3 +1,4 @@
|
||||
import useTranslation from 'next-translate/useTranslation'
|
||||
import InfiniteScroll from 'react-infinite-scroll-component'
|
||||
|
||||
import { Loader } from '../../design/Loader'
|
||||
@ -6,6 +7,7 @@ import { useMessages } from '../../../contexts/Messages'
|
||||
import { Emoji } from '../../Emoji'
|
||||
|
||||
export const Messages: React.FC = () => {
|
||||
const { t } = useTranslation()
|
||||
const { messages, hasMore, nextPage } = useMessages()
|
||||
|
||||
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'
|
||||
>
|
||||
<p>
|
||||
Nothing to show here! <Emoji value=':ghost:' size={20} />
|
||||
{t('application:nothing-here')} <Emoji value=':ghost:' size={20} />
|
||||
</p>
|
||||
<p>Start chatting to kill this Ghost!</p>
|
||||
<p>{t('application:start-chatting-kill-ghost')}</p>
|
||||
</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 (
|
||||
<Form
|
||||
onSubmit={handleSubmit(onSubmit)}
|
||||
@ -267,7 +277,12 @@ export const UserSettings: React.FC = () => {
|
||||
</div>
|
||||
|
||||
<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} />
|
||||
</div>
|
||||
</Form>
|
||||
|
@ -13,6 +13,10 @@
|
||||
"biography": "Biography",
|
||||
"label-checkbox-email": "Show your email 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",
|
||||
"label-checkbox-email": "Afficher votre email 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