Skip to content

Commit

Permalink
Añadida internacionalización
Browse files Browse the repository at this point in the history
  • Loading branch information
iyanfdezz committed Apr 29, 2024
1 parent c4ef7f8 commit a20ac58
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 14 deletions.
7 changes: 4 additions & 3 deletions webapp/src/locales/en.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"components": {
"custommodal": {
"play": "Jugar",
"close": "Cerrar"
"play": "Play",
"close": "Close"
},
"footer": {
"copyright": "Copyright 2024 ® Software Architecture Group 1A"
Expand Down Expand Up @@ -212,7 +212,8 @@
"list": "Friend List",
"profile": "View Profile",
"delete": "Delete Friend",
"noFriends": "You currently have no friends."
"noFriends": "You currently have no friends.",
"back":"Back"
},
"groupdetails": {
"details": "Group details",
Expand Down
3 changes: 2 additions & 1 deletion webapp/src/locales/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,8 @@
"list": "Lista de amigos",
"profile": "Ver perfil",
"delete": "Eliminar amigo",
"noFriends": "No tienes amigos actualmente."
"noFriends": "No tienes amigos actualmente.",
"back":"Volver"
},
"groupdetails": {
"details":"Detalles del grupo",
Expand Down
6 changes: 3 additions & 3 deletions webapp/src/pages/Ranking/Ranking.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,11 @@ const Ranking = () => {

const getModeName = () => {
if(gamemode === "clasico"){
return "Clásico";
return t('pages.ranking.classic');
} else if(gamemode === "bateria"){
return "Batería de sabios";
return t('pages.ranking.wisebattery');
} else if(gamemode === "calculadora"){
return "Calculadora humana";
return t('pages.ranking.humancalculator');
}
return gamemode;
};
Expand Down
2 changes: 1 addition & 1 deletion webapp/src/pages/Social/FriendsList.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ const FriendList = () => {
{friend ? (
<>
<Profile username={friend} />
<Button onClick={() => setFriend("")}>Volver</Button>
<Button onClick={() => setFriend("")}>{t('pages.friendlist.back')}</Button>
</>
) : (
<Container maxW="md">
Expand Down
12 changes: 6 additions & 6 deletions webapp/src/pages/Stats/Stats.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,12 @@ const Stats = () => {
};

const getModeName = () => {
if (gamemode === "clasico") {
return "Clásico";
} else if (gamemode === "bateria") {
return "Batería de sabios";
} else if (gamemode === "calculadora") {
return "Calculadora humana";
if(gamemode === "clasico"){
return t('pages.ranking.classic');
} else if(gamemode === "bateria"){
return t('pages.ranking.wisebattery');
} else if(gamemode === "calculadora"){
return t('pages.ranking.humancalculator');
}
return gamemode;
};
Expand Down

0 comments on commit a20ac58

Please sign in to comment.