Front: Add translations for page titles
This commit is contained in:
@@ -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 = <>
|
||||
<Stack.Screen name="Home" component={HomeView} options={{ title: 'Welcome' }} />
|
||||
<Stack.Screen name="Song" component={SongLobbyView} options={{ title: 'Play' }} />
|
||||
<Stack.Screen name="Home" component={HomeView} options={{ title: translate('welcome') }} />
|
||||
<Stack.Screen name="Song" component={SongLobbyView} options={{ title: translate('play') }} />
|
||||
</>;
|
||||
|
||||
export const publicRoutes = <React.Fragment>
|
||||
<Stack.Screen name="Login" component={AuthenticationView} options={{}} />
|
||||
<Stack.Screen name="Login" component={AuthenticationView} options={{ title: translate('signinBtn')}} />
|
||||
</React.Fragment>;
|
||||
|
||||
export const Router = () => {
|
||||
|
||||
@@ -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'
|
||||
};
|
||||
Reference in New Issue
Block a user