Refactor to remove duplicated code and add translations to the root directory

This commit is contained in:
Julian Calvento
2019-05-16 14:35:42 -03:00
parent c1198070bd
commit 7582b76ee1
6 changed files with 40 additions and 51 deletions

17
locales/en.json Normal file
View File

@ -0,0 +1,17 @@
{
"snake": {
"score": "Score",
"gameOver": "Game Over!",
"anyKey": "Press any key to play again"
},
"tanks": {
"playerWon": "Player %{num} won!",
"player": "Player %{number}",
"health": "Health %{value}",
"angle": "Angle %{value}"
},
"spacecraft": {
"score": "Score"
}
}

16
locales/es.json Normal file
View File

@ -0,0 +1,16 @@
{
"snake": {
"score": "Puntaje",
"gameOver": "¡Se acabó el juego!",
"anyKey": "Presioná cualquier tecla para jugar nuevamente"
},
"tanks": {
"playerWon": "¡Ha ganado el jugador %{name}!",
"player": "Jugador %{number}",
"health": "Salud %{value}",
"angle": "Ángulo %{value}"
},
"spacecraft": {
"score": "Puntaje"
}
}