mirror of
https://github.com/kmitresse/Cards-Rush.git
synced 2026-05-13 17:11:49 +00:00
feat: devweb - Make translations on game statistics page
This commit is contained in:
@@ -1,14 +1,16 @@
|
|||||||
|
<%@ page import="uppa.project.web.translation.Translator" %>
|
||||||
<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
|
<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
|
||||||
|
|
||||||
<%@taglib prefix="layout" tagdir="/WEB-INF/tags/layouts" %>
|
<%@taglib prefix="layout" tagdir="/WEB-INF/tags/layouts" %>
|
||||||
<%@taglib prefix="component" tagdir="/WEB-INF/tags/components" %>
|
<%@taglib prefix="component" tagdir="/WEB-INF/tags/components" %>
|
||||||
<%@taglib prefix="form" tagdir="/WEB-INF/tags/forms" %>
|
<%@taglib prefix="form" tagdir="/WEB-INF/tags/forms" %>
|
||||||
|
<% Translator translator = (Translator) request.getSession().getAttribute("translator"); %>
|
||||||
|
|
||||||
<layout:base title="Profil">
|
<layout:base title="${translator.translate('game_statistics_title')}">
|
||||||
<component:hero>
|
<component:hero>
|
||||||
<div class="columns is-centered">
|
<div class="columns is-centered">
|
||||||
<div class="column is-11-tablet is-11-desktop is-11-widescreen">
|
<div class="column is-11-tablet is-11-desktop is-11-widescreen">
|
||||||
<component:card title="Statistiques de la partie">
|
<component:card title="${translator.translate('game_statistics_title')}">
|
||||||
<component:game-statistics/>
|
<component:game-statistics/>
|
||||||
</component:card>
|
</component:card>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,18 +1,18 @@
|
|||||||
<%@ tag import="uppa.project.web.translation.Translator" %>
|
<%@ tag import="uppa.project.web.translation.Translator" %>
|
||||||
<% Translator translator = (Translator) request.getSession().getAttribute("translator"); %>
|
|
||||||
<%@ tag import="uppa.project.database.pojo.Player" %>
|
<%@ tag import="uppa.project.database.pojo.Player" %>
|
||||||
<%@ tag import="uppa.project.database.pojo.Game" %>
|
<%@ tag import="uppa.project.database.pojo.Game" %>
|
||||||
<%@ tag import="java.util.ArrayList" %>
|
<%@ tag import="java.util.ArrayList" %>
|
||||||
<%@ tag import="java.text.SimpleDateFormat" %>
|
<%@ tag import="java.text.SimpleDateFormat" %>
|
||||||
<%@ tag import="java.util.Date" %>
|
<%@ tag import="java.util.Date" %>
|
||||||
<%@tag description="component/statistics" pageEncoding="UTF-8" %>
|
<%@tag description="component/statistics" pageEncoding="UTF-8" %>
|
||||||
|
<% Translator translator = (Translator) request.getSession().getAttribute("translator"); %>
|
||||||
|
|
||||||
<%
|
<%
|
||||||
Game game = (Game) request.getAttribute("game");
|
Game game = (Game) request.getAttribute("game");
|
||||||
ArrayList<Player> players = (ArrayList<Player>) request.getAttribute("players");
|
ArrayList<Player> players = (ArrayList<Player>) request.getAttribute("players");
|
||||||
%>
|
%>
|
||||||
|
|
||||||
<h4 class="title is-6">Information sur la partie</h4>
|
<h4 class="title is-6">${translator.translate('game_information_title')}</h4>
|
||||||
<div class="level">
|
<div class="level">
|
||||||
<div class="level-item has-text-centered has-text-on-top">
|
<div class="level-item has-text-centered has-text-on-top">
|
||||||
<div>
|
<div>
|
||||||
@@ -24,56 +24,56 @@
|
|||||||
String day = sdfDay.format(date);
|
String day = sdfDay.format(date);
|
||||||
String hour = sdfHour.format(date);
|
String hour = sdfHour.format(date);
|
||||||
%>
|
%>
|
||||||
<p class="heading">Date de jeu</p>
|
<p class="heading">${translator.translate('game_statistics_date')}</p>
|
||||||
<p class="title"><%= day %></p>
|
<p class="title"><%= day %></p>
|
||||||
<p class="title"><%= hour %></p>
|
<p class="title"><%= hour %></p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="level-item has-text-centered">
|
<div class="level-item has-text-centered">
|
||||||
<div>
|
<div>
|
||||||
<p class="heading">Difficulté</p>
|
<p class="heading">${translator.translate('game_information_difficulty')}</p>
|
||||||
<% if (game.getDifficulty().equals(Game.Difficulty.EASY)){%>
|
<% if (game.getDifficulty().equals(Game.Difficulty.EASY)){%>
|
||||||
<p class="title">Facile</p>
|
<p class="title">${translator.translate('difficulty_easy')}</p>
|
||||||
<% } else {%>
|
<% } else {%>
|
||||||
<p class="title">Difficile</p>
|
<p class="title">${translator.translate('difficulty_hard')}</p>
|
||||||
<% } %>
|
<% } %>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="level-item has-text-centered">
|
<div class="level-item has-text-centered">
|
||||||
<div>
|
<div>
|
||||||
<p class="heading">Nombre de rounds</p>
|
<p class="heading">${translator.translate('game_information_rounds_number')}</p>
|
||||||
<p class="title"><%= game.getNbRounds() %></p>
|
<p class="title"><%= game.getNbRounds() %></p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="level-item has-text-centered">
|
<div class="level-item has-text-centered">
|
||||||
<div>
|
<div>
|
||||||
<p class="heading">Nombre de couleurs</p>
|
<p class="heading">${translator.translate('game_information_deck_color_number')}</p>
|
||||||
<p class="title"><%= game.getNbColors()%></p>
|
<p class="title"><%= game.getNbColors()%></p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="level-item has-text-centered">
|
<div class="level-item has-text-centered">
|
||||||
<div>
|
<div>
|
||||||
<p class="heading">Nombre de valeurs</p>
|
<p class="heading">${translator.translate('game_information_deck_value_number')}</p>
|
||||||
<p class="title"><%= game.getNbValuesPerColor()%></p>
|
<p class="title"><%= game.getNbValuesPerColor()%></p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="level-item has-text-centered">
|
<div class="level-item has-text-centered">
|
||||||
<div>
|
<div>
|
||||||
<p class="heading">Nombre de joueurs</p>
|
<p class="heading">${translator.translate('game_informations_player_number')}</p>
|
||||||
<p class="title"><%= game.getNbPlayers()%></p>
|
<p class="title"><%= game.getNbPlayers()%></p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<h4 class="title is-4">Joueurs </h4>
|
<h4 class="title is-4">${translator.translate('game_room_player')}</h4>
|
||||||
<table class="table is-fullwidth">
|
<table class="table is-fullwidth">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>Nom d'utilisateur</th>
|
<th>${translator.translate('user_username')}</th>
|
||||||
<th>Score</th>
|
<th>${translator.translate('game_statistics_score')}</th>
|
||||||
<th>Clics corrects</th>
|
<th>${translator.translate('game_statistics_correct_clicks')}</th>
|
||||||
<th>Clics rapides</th>
|
<th>${translator.translate('game_statistics_rapid_clicks')}</th>
|
||||||
<th>Victoire</th>
|
<th>${translator.translate('game_statistics_win')}</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody id="game-list">
|
<tbody id="game-list">
|
||||||
@@ -96,18 +96,18 @@
|
|||||||
|
|
||||||
<div class="navbar-item">
|
<div class="navbar-item">
|
||||||
<% if (request.getParameter("endGame") != null){ %>
|
<% if (request.getParameter("endGame") != null){ %>
|
||||||
<a href="${pageContext.request.contextPath}/lobby" class="button is-light is-right">
|
<a href="${pageContext.request.contextPath}/lobby" class="button is-light is-right">
|
||||||
<span class="icon">
|
<span class="icon">
|
||||||
<i class="fa-solid fa-arrow-left"></i>
|
<i class="fa-solid fa-arrow-left"></i>
|
||||||
</span>
|
</span>
|
||||||
<span>Retour</span>
|
<span>Retour</span>
|
||||||
</a>
|
</a>
|
||||||
<% } else {%>
|
<% } else {%>
|
||||||
<a href="${pageContext.request.contextPath}/profile" class="button is-light is-right">
|
<a href="${pageContext.request.contextPath}/profile" class="button is-light is-right">
|
||||||
<span class="icon">
|
<span class="icon">
|
||||||
<i class="fa-solid fa-arrow-left"></i>
|
<i class="fa-solid fa-arrow-left"></i>
|
||||||
</span>
|
</span>
|
||||||
<span>Retour</span>
|
<span>${translator.translate('back')}</span>
|
||||||
</a>
|
</a>
|
||||||
<%}%>
|
<%}%>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -541,7 +541,7 @@
|
|||||||
},
|
},
|
||||||
"game_information_title" : {
|
"game_information_title" : {
|
||||||
"EN": "Game information",
|
"EN": "Game information",
|
||||||
"FR": "Informations de la partie"
|
"FR": "Informations sur la partie"
|
||||||
},
|
},
|
||||||
"game_information_created_at" : {
|
"game_information_created_at" : {
|
||||||
"EN": "Created at",
|
"EN": "Created at",
|
||||||
@@ -567,6 +567,10 @@
|
|||||||
"EN": "Number of values per color",
|
"EN": "Number of values per color",
|
||||||
"FR": "Nombre de valeurs par couleur"
|
"FR": "Nombre de valeurs par couleur"
|
||||||
},
|
},
|
||||||
|
"game_informations_player_number" : {
|
||||||
|
"EN": "Number of players",
|
||||||
|
"FR": "Nombre de joueurs"
|
||||||
|
},
|
||||||
"timer_unit" : {
|
"timer_unit" : {
|
||||||
"EN": "seconds",
|
"EN": "seconds",
|
||||||
"FR": "secondes"
|
"FR": "secondes"
|
||||||
@@ -594,5 +598,29 @@
|
|||||||
"game_timer" : {
|
"game_timer" : {
|
||||||
"EN": "Remaining time:",
|
"EN": "Remaining time:",
|
||||||
"FR": "Temps restant :"
|
"FR": "Temps restant :"
|
||||||
|
},
|
||||||
|
"game_statistics_title": {
|
||||||
|
"EN": "Game statistics",
|
||||||
|
"FR": "Statistiques de la partie"
|
||||||
|
},
|
||||||
|
"game_statistics_date": {
|
||||||
|
"EN": "Date of the game",
|
||||||
|
"FR": "Date de jeu"
|
||||||
|
},
|
||||||
|
"game_statistics_score": {
|
||||||
|
"EN": "Score",
|
||||||
|
"FR": "Score"
|
||||||
|
},
|
||||||
|
"game_statistics_correct_clicks": {
|
||||||
|
"EN": "Correct clicks",
|
||||||
|
"FR": "Clics corrects"
|
||||||
|
},
|
||||||
|
"game_statistics_rapid_clicks": {
|
||||||
|
"EN": "Rapid clicks",
|
||||||
|
"FR": "Clics rapides"
|
||||||
|
},
|
||||||
|
"game_statistics_win": {
|
||||||
|
"EN": "Win",
|
||||||
|
"FR": "Victoire"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user