Front; Song Lobby: Translations

This commit is contained in:
Arthi-chaud
2022-09-04 16:10:51 +02:00
parent f6a0acb991
commit 21adec63c1
2 changed files with 9 additions and 5 deletions
+6 -2
View File
@@ -4,7 +4,9 @@ export const en = {
signinBtn: 'Sign in', signinBtn: 'Sign in',
playBtn: 'Play', playBtn: 'Play',
level: 'Level', level: 'Level',
chapters: 'Chapters' chapters: 'Chapters',
bestScore: 'Best Score',
lastScore: 'Last Score',
}; };
export const fr: typeof en = { export const fr: typeof en = {
@@ -13,5 +15,7 @@ export const fr: typeof en = {
signinBtn: 'Se connecter', signinBtn: 'Se connecter',
playBtn: 'Jouer', playBtn: 'Jouer',
level: 'Niveau', level: 'Niveau',
chapters: 'Chapitres' chapters: 'Chapitres',
bestScore: 'Meilleur Score',
lastScore: 'Dernier Score',
}; };
+3 -3
View File
@@ -51,11 +51,11 @@ const SongLobbyView = () => {
</View> </View>
<View style={{ flexDirection: 'row', justifyContent: 'space-between', padding: 30}}> <View style={{ flexDirection: 'row', justifyContent: 'space-between', padding: 30}}>
<View style={{ flexDirection: 'column', alignItems: 'center' }}> <View style={{ flexDirection: 'column', alignItems: 'center' }}>
<Text style={{ fontWeight: 'bold', fontSize: 15 }}>Best Score</Text> <Text style={{ fontWeight: 'bold', fontSize: 15 }}>{translate('bestScore') }</Text>
<Text>{scoresQuery.data!.sort()[0]?.score}</Text> <Text>{scoresQuery.data!.sort()[0]?.score}</Text>
</View> </View>
<View style={{ flexDirection: 'column', alignItems: 'center' }}> <View style={{ flexDirection: 'column', alignItems: 'center' }}>
<Text style={{ fontWeight: 'bold', fontSize: 15}}>Last Score</Text> <Text style={{ fontWeight: 'bold', fontSize: 15}}>{translate('lastScore') }</Text>
<Text>{scoresQuery.data!.slice(-1)[0]!.score}</Text> <Text>{scoresQuery.data!.slice(-1)[0]!.score}</Text>
</View> </View>
</View> </View>
@@ -70,7 +70,7 @@ const SongLobbyView = () => {
<List.Item <List.Item
key={chapter.id} key={chapter.id}
title={chapter.name} title={chapter.name}
description={`Level ${chapter.difficulty} - ${formatDuration((chapter.end - chapter.start) * 1000)}`} description={`${translate('level')} ${chapter.difficulty} - ${formatDuration((chapter.end - chapter.start) * 1000)}`}
/> />
<Divider /> <Divider />
</> </>