From 4b88870963f41d5afcac4581c6446e9611e379d8 Mon Sep 17 00:00:00 2001 From: Arthi-chaud Date: Mon, 12 Sep 2022 10:30:05 +0200 Subject: [PATCH] Front: Add translations for page titles --- front/Navigation.tsx | 7 ++++--- front/i18n/Translations.ts | 6 ++++-- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/front/Navigation.tsx b/front/Navigation.tsx index ce99ff7..9755f88 100644 --- a/front/Navigation.tsx +++ b/front/Navigation.tsx @@ -5,16 +5,17 @@ import HomeView from './views/HomeView'; import { NavigationContainer } from '@react-navigation/native'; import { useSelector } from 'react-redux'; import SongLobbyView from './views/SongLobbyView'; +import { translate } from './i18n/i18n'; const Stack = createNativeStackNavigator(); export const protectedRoutes = <> - - + + ; export const publicRoutes = - + ; export const Router = () => { diff --git a/front/i18n/Translations.ts b/front/i18n/Translations.ts index 90ea51f..c0a6d94 100644 --- a/front/i18n/Translations.ts +++ b/front/i18n/Translations.ts @@ -1,5 +1,5 @@ export const en = { - welcome: 'Welcome to Chromacase', + welcome: 'Welcome', signoutBtn: 'Sign out', signinBtn: 'Sign in', playBtn: 'Play', @@ -7,10 +7,11 @@ export const en = { chapters: 'Chapters', bestScore: 'Best Score', lastScore: 'Last Score', + play: 'Play' }; export const fr: typeof en = { - welcome: 'Bienvenue sur Chromacase', + welcome: 'Bienvenue', signoutBtn: 'Se déconnecter', signinBtn: 'Se connecter', playBtn: 'Jouer', @@ -18,4 +19,5 @@ export const fr: typeof en = { chapters: 'Chapitres', bestScore: 'Meilleur Score', lastScore: 'Dernier Score', + play: 'Jouer' }; \ No newline at end of file