Translate "x didn't move"
parent
0f77e19106
commit
51b72ae481
|
@ -193,8 +193,10 @@ trait GameHelper { self: I18nHelper with UserHelper with AiHelper with StringHel
|
|||
case (Black, None) => trans.blackTimeOut.txt() + " • " + trans.draw.txt()
|
||||
}
|
||||
case S.NoStart =>
|
||||
val color = game.loser.fold(Color.white)(_.color).name.capitalize
|
||||
s"$color didn't move"
|
||||
game.loser match {
|
||||
case Some(p) if p.color.white => trans.whiteDidntMove.txt()
|
||||
case _ => trans.blackDidntMove.txt()
|
||||
}
|
||||
case S.Cheat => trans.cheatDetected.txt()
|
||||
case S.VariantEnd =>
|
||||
game.variant match {
|
||||
|
|
|
@ -21,6 +21,8 @@ object jsI18n {
|
|||
trans.checkmate,
|
||||
trans.whiteResigned,
|
||||
trans.blackResigned,
|
||||
trans.whiteDidntMove,
|
||||
trans.blackDidntMove,
|
||||
trans.stalemate,
|
||||
trans.whiteLeftTheGame,
|
||||
trans.blackLeftTheGame,
|
||||
|
|
|
@ -73,6 +73,8 @@ object jsI18n {
|
|||
trans.checkmate,
|
||||
trans.whiteResigned,
|
||||
trans.blackResigned,
|
||||
trans.whiteDidntMove,
|
||||
trans.blackDidntMove,
|
||||
trans.stalemate,
|
||||
trans.whiteLeftTheGame,
|
||||
trans.blackLeftTheGame,
|
||||
|
|
|
@ -49,6 +49,8 @@ val `whiteResigned` = new I18nKey("whiteResigned")
|
|||
val `blackResigned` = new I18nKey("blackResigned")
|
||||
val `whiteLeftTheGame` = new I18nKey("whiteLeftTheGame")
|
||||
val `blackLeftTheGame` = new I18nKey("blackLeftTheGame")
|
||||
val `whiteDidntMove` = new I18nKey("whiteDidntMove")
|
||||
val `blackDidntMove` = new I18nKey("blackDidntMove")
|
||||
val `shareThisUrlToLetSpectatorsSeeTheGame` = new I18nKey("shareThisUrlToLetSpectatorsSeeTheGame")
|
||||
val `theComputerAnalysisHasFailed` = new I18nKey("theComputerAnalysisHasFailed")
|
||||
val `viewTheComputerAnalysis` = new I18nKey("viewTheComputerAnalysis")
|
||||
|
|
|
@ -49,6 +49,8 @@
|
|||
<string name="blackResigned">Black resigned</string>
|
||||
<string name="whiteLeftTheGame">White left the game</string>
|
||||
<string name="blackLeftTheGame">Black left the game</string>
|
||||
<string name="whiteDidntMove">White didn't move</string>
|
||||
<string name="blackDidntMove">Black didn't move</string>
|
||||
<string name="shareThisUrlToLetSpectatorsSeeTheGame">Share this URL to let spectators see the game</string>
|
||||
<string name="theComputerAnalysisHasFailed">The computer analysis has failed</string>
|
||||
<string name="viewTheComputerAnalysis">View the computer analysis</string>
|
||||
|
|
|
@ -69,7 +69,7 @@ export default function status(ctrl: Ctrl): string {
|
|||
d.game.winner ? '' : ` • ${noarg('draw')}`
|
||||
}`;
|
||||
case 'noStart':
|
||||
return (d.game.winner == 'white' ? 'Black' : 'White') + " didn't move";
|
||||
return d.game.winner == 'white' ? noarg('blackDidntMove') : noarg('whiteDidntMove');
|
||||
case 'cheat':
|
||||
return noarg('cheatDetected');
|
||||
case 'variantEnd':
|
||||
|
|
Loading…
Reference in New Issue