forked from vergnet/application-amicale
Updated translations
This commit is contained in:
parent
cded72137e
commit
fb1d2cf045
4 changed files with 56 additions and 15 deletions
|
@ -177,7 +177,7 @@ function TetrisStackComponent() {
|
||||||
options={({navigation}) => {
|
options={({navigation}) => {
|
||||||
const openDrawer = getDrawerButton.bind(this, navigation);
|
const openDrawer = getDrawerButton.bind(this, navigation);
|
||||||
return {
|
return {
|
||||||
title: 'Tetris',
|
title: i18n.t("game.title"),
|
||||||
headerLeft: openDrawer
|
headerLeft: openDrawer
|
||||||
};
|
};
|
||||||
}}
|
}}
|
||||||
|
|
|
@ -8,6 +8,7 @@ import GameLogic from "./GameLogic";
|
||||||
import Grid from "./components/Grid";
|
import Grid from "./components/Grid";
|
||||||
import HeaderButton from "../../components/HeaderButton";
|
import HeaderButton from "../../components/HeaderButton";
|
||||||
import Preview from "./components/Preview";
|
import Preview from "./components/Preview";
|
||||||
|
import i18n from "i18n-js";
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
navigation: Object,
|
navigation: Object,
|
||||||
|
@ -136,11 +137,11 @@ class TetrisScreen extends React.Component<Props, State> {
|
||||||
|
|
||||||
showPausePopup() {
|
showPausePopup() {
|
||||||
Alert.alert(
|
Alert.alert(
|
||||||
'PAUSE',
|
i18n.t("game.pause"),
|
||||||
'GAME PAUSED',
|
i18n.t("game.pauseMessage"),
|
||||||
[
|
[
|
||||||
{text: 'RESTART', onPress: () => this.showRestartConfirm()},
|
{text: i18n.t("game.restart.text"), onPress: () => this.showRestartConfirm()},
|
||||||
{text: 'RESUME', onPress: () => this.togglePause()},
|
{text: i18n.t("game.resume"), onPress: () => this.togglePause()},
|
||||||
],
|
],
|
||||||
{cancelable: false},
|
{cancelable: false},
|
||||||
);
|
);
|
||||||
|
@ -148,26 +149,26 @@ class TetrisScreen extends React.Component<Props, State> {
|
||||||
|
|
||||||
showRestartConfirm() {
|
showRestartConfirm() {
|
||||||
Alert.alert(
|
Alert.alert(
|
||||||
'RESTART?',
|
i18n.t("game.restart.confirm"),
|
||||||
'WHOA THERE',
|
i18n.t("game.restart.confirmMessage"),
|
||||||
[
|
[
|
||||||
{text: 'NO', onPress: () => this.showPausePopup()},
|
{text: i18n.t("game.restart.confirmNo"), onPress: () => this.showPausePopup()},
|
||||||
{text: 'YES', onPress: () => this.startGame()},
|
{text: i18n.t("game.restart.confirmYes"), onPress: () => this.startGame()},
|
||||||
],
|
],
|
||||||
{cancelable: false},
|
{cancelable: false},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
showGameOverConfirm() {
|
showGameOverConfirm() {
|
||||||
let message = 'SCORE: ' + this.state.gameScore + '\n';
|
let message = i18n.t("game.gameOver.score") + this.state.gameScore + '\n';
|
||||||
message += 'LEVEL: ' + this.state.gameLevel + '\n';
|
message += i18n.t("game.gameOver.level") + this.state.gameLevel + '\n';
|
||||||
message += 'TIME: ' + this.getFormattedTime(this.state.gameTime) + '\n';
|
message += i18n.t("game.gameOver.time") + this.getFormattedTime(this.state.gameTime) + '\n';
|
||||||
Alert.alert(
|
Alert.alert(
|
||||||
'GAME OVER',
|
i18n.t("game.gameOver.text"),
|
||||||
message,
|
message,
|
||||||
[
|
[
|
||||||
{text: 'LEAVE', onPress: () => this.props.navigation.goBack()},
|
{text: i18n.t("game.gameOver.exit"), onPress: () => this.props.navigation.goBack()},
|
||||||
{text: 'RESTART', onPress: () => this.startGame()},
|
{text: i18n.t("game.restart.text"), onPress: () => this.startGame()},
|
||||||
],
|
],
|
||||||
{cancelable: false},
|
{cancelable: false},
|
||||||
);
|
);
|
||||||
|
|
|
@ -235,5 +235,25 @@
|
||||||
"november": "November",
|
"november": "November",
|
||||||
"december": "December"
|
"december": "December"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"game": {
|
||||||
|
"title": "Game",
|
||||||
|
"pause": "Game Paused",
|
||||||
|
"pauseMessage": "The game is paused",
|
||||||
|
"resume": "Resume",
|
||||||
|
"restart": {
|
||||||
|
"text": "Restart",
|
||||||
|
"confirm": "Are you sure you want to restart?",
|
||||||
|
"confirmMessage": "You will lose you progress, continue?",
|
||||||
|
"confirmYes": "Yes",
|
||||||
|
"confirmNo": "No"
|
||||||
|
},
|
||||||
|
"gameOver": {
|
||||||
|
"text": "Game Over",
|
||||||
|
"score": "Score: ",
|
||||||
|
"level": "Level: ",
|
||||||
|
"time": "Time: ",
|
||||||
|
"exit": "leave Game"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -236,5 +236,25 @@
|
||||||
"november": "Novembre",
|
"november": "Novembre",
|
||||||
"december": "Décembre"
|
"december": "Décembre"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"game": {
|
||||||
|
"title": "Jeu",
|
||||||
|
"pause": "Pause",
|
||||||
|
"pauseMessage": "Le jeu est en pause",
|
||||||
|
"resume": "Continuer",
|
||||||
|
"restart": {
|
||||||
|
"text": "Redémarrer",
|
||||||
|
"confirm": "Êtes vous sûr de vouloir redémarrer ?",
|
||||||
|
"confirmMessage": "Tout votre progrès sera perdu, continuer ?",
|
||||||
|
"confirmYes": "Oui",
|
||||||
|
"confirmNo": "Non"
|
||||||
|
},
|
||||||
|
"gameOver": {
|
||||||
|
"text": "Game Over",
|
||||||
|
"score": "Score: ",
|
||||||
|
"level": "Niveau: ",
|
||||||
|
"time": "Temps: ",
|
||||||
|
"exit": "Quitter"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue