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',
playBtn: 'Play',
level: 'Level',
chapters: 'Chapters'
chapters: 'Chapters',
bestScore: 'Best Score',
lastScore: 'Last Score',
};
export const fr: typeof en = {
@@ -13,5 +15,7 @@ export const fr: typeof en = {
signinBtn: 'Se connecter',
playBtn: 'Jouer',
level: 'Niveau',
chapters: 'Chapitres'
chapters: 'Chapitres',
bestScore: 'Meilleur Score',
lastScore: 'Dernier Score',
};
+3 -3
View File
@@ -51,11 +51,11 @@ const SongLobbyView = () => {
</View>
<View style={{ flexDirection: 'row', justifyContent: 'space-between', padding: 30}}>
<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>
</View>
<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>
</View>
</View>
@@ -70,7 +70,7 @@ const SongLobbyView = () => {
<List.Item
key={chapter.id}
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 />
</>