fix: improve title translation

This commit is contained in:
Divlo 2022-04-09 11:33:28 +02:00
parent 5ef8f18060
commit 4141f1eeab
No known key found for this signature in database
GPG Key ID: 8F9478F220CE65E9
6 changed files with 18 additions and 6 deletions

View File

@ -6,6 +6,8 @@
"delete-channel-only-one": "The guild should have at least one channel. You can't delete the only channel of the guild.", "delete-channel-only-one": "The guild should have at least one channel. You can't delete the only channel of the guild.",
"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.",
"user-settings": "User settings",
"guild-settings": "Guild settings",
"join-a-guild": "Join a Guild", "join-a-guild": "Join a Guild",
"join-the-guild": "Join the guild", "join-the-guild": "Join the guild",
"join-a-guild-description": "Talk, collaborate, share and have fun with your friends by joining an already existing guild!", "join-a-guild-description": "Talk, collaborate, share and have fun with your friends by joining an already existing guild!",

View File

@ -6,6 +6,8 @@
"delete-channel-only-one": "La guilde doit avoir au moins un channel. Vous ne pouvez pas supprimer le seul channel de la guilde.", "delete-channel-only-one": "La guilde doit avoir au moins un channel. Vous ne pouvez pas supprimer le seul channel de la guilde.",
"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.",
"user-settings": "Paramètres utilisateur",
"guild-settings": "Paramètres de la guilde",
"join-a-guild": "Rejoindre une Guilde", "join-a-guild": "Rejoindre une Guilde",
"join-the-guild": "Rejoindre la guilde", "join-the-guild": "Rejoindre la guilde",
"join-a-guild-description": "Discutez, collaborez, partagez et amusez-vous avec vos amis en rejoignant une guilde déjà existante!", "join-a-guild-description": "Discutez, collaborez, partagez et amusez-vous avec vos amis en rejoignant une guilde déjà existante!",

View File

@ -43,7 +43,7 @@ const ChannelPage: NextPage<ChannelPageProps> = (props) => {
<MembersProviders path={path}> <MembersProviders path={path}>
<ChannelsProvider path={path}> <ChannelsProvider path={path}>
<MessagesProvider path={path}> <MessagesProvider path={path}>
<Head title='Thream | Application' /> <Head title={`Thream | ${selectedChannel.name}`} />
<Application <Application
path={path} path={path}
guildLeftSidebar={<GuildLeftSidebar path={path} />} guildLeftSidebar={<GuildLeftSidebar path={path} />}

View File

@ -40,7 +40,7 @@ const ChannelSettingsPage: NextPage<ChannelSettingsPageProps> = (props) => {
<GuildMemberProvider guildMember={guildMember} path={path}> <GuildMemberProvider guildMember={guildMember} path={path}>
<MembersProviders path={path}> <MembersProviders path={path}>
<ChannelsProvider path={path}> <ChannelsProvider path={path}>
<Head title='Thream | Application' /> <Head title={`Thream | ${selectedChannel.name}`} />
<Application <Application
path={path} path={path}
guildLeftSidebar={<GuildLeftSidebar path={path} />} guildLeftSidebar={<GuildLeftSidebar path={path} />}

View File

@ -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'
@ -18,6 +19,7 @@ export interface GuildSettingsPageProps extends PagePropsWithAuthentication {
const GuildSettingsPage: NextPage<GuildSettingsPageProps> = (props) => { const GuildSettingsPage: NextPage<GuildSettingsPageProps> = (props) => {
const { guildId, authentication, guildMember } = props const { guildId, authentication, guildMember } = props
const { t } = useTranslation()
const path = { guildId } const path = { guildId }
@ -25,8 +27,8 @@ const GuildSettingsPage: NextPage<GuildSettingsPageProps> = (props) => {
<AuthenticationProvider authentication={authentication}> <AuthenticationProvider authentication={authentication}>
<GuildsProvider> <GuildsProvider>
<GuildMemberProvider guildMember={guildMember} path={path}> <GuildMemberProvider guildMember={guildMember} path={path}>
<Head title='Thream | Guild settings' /> <Head title={`Thream | ${t('application:guild-settings')}`} />
<Application path={path} title='Guild settings'> <Application path={path} title={t('application:guild-settings')}>
<GuildSettings /> <GuildSettings />
</Application> </Application>
</GuildMemberProvider> </GuildMemberProvider>

View File

@ -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'
@ -11,11 +12,16 @@ import { UserSettings } from '../../../components/Application/UserSettings'
import { GuildsProvider } from '../../../contexts/Guilds' import { GuildsProvider } from '../../../contexts/Guilds'
const UserSettingsPage: NextPage<PagePropsWithAuthentication> = (props) => { const UserSettingsPage: NextPage<PagePropsWithAuthentication> = (props) => {
const { t } = useTranslation()
return ( return (
<AuthenticationProvider authentication={props.authentication}> <AuthenticationProvider authentication={props.authentication}>
<GuildsProvider> <GuildsProvider>
<Head title='Thream | Settings' /> <Head title={`Thream | ${t('application:user-settings')}`} />
<Application path={`/application/users/settings`} title='Settings'> <Application
path='/application/users/settings'
title={t('application:user-settings')}
>
<UserSettings /> <UserSettings />
</Application> </Application>
</GuildsProvider> </GuildsProvider>