From 9a41306abd69b5b782afa4b7ab59754dd9895be9 Mon Sep 17 00:00:00 2001 From: TheYoBots Date: Fri, 30 Apr 2021 18:03:56 +0000 Subject: [PATCH] Translate 'Cheat Detected' --- app/templating/GameHelper.scala | 2 +- app/views/analyse/jsI18n.scala | 1 + app/views/board/userAnalysisI18n.scala | 1 + modules/i18n/src/main/I18nKeys.scala | 1 + translation/source/site.xml | 1 + ui/game/src/view/status.ts | 2 +- 6 files changed, 6 insertions(+), 2 deletions(-) diff --git a/app/templating/GameHelper.scala b/app/templating/GameHelper.scala index f4925d0a82..f80e0190c7 100644 --- a/app/templating/GameHelper.scala +++ b/app/templating/GameHelper.scala @@ -199,7 +199,7 @@ trait GameHelper { self: I18nHelper with UserHelper with AiHelper with StringHel case S.NoStart => val color = game.loser.fold(Color.white)(_.color).name.capitalize s"$color didn't move" - case S.Cheat => "Cheat detected" + case S.Cheat => trans.cheatDetected.txt() case S.VariantEnd => game.variant match { case chess.variant.KingOfTheHill => trans.kingInTheCenter.txt() diff --git a/app/views/analyse/jsI18n.scala b/app/views/analyse/jsI18n.scala index 9c965183e3..a8aa77ad43 100644 --- a/app/views/analyse/jsI18n.scala +++ b/app/views/analyse/jsI18n.scala @@ -24,6 +24,7 @@ private object jsI18n { trans.playingRightNow, trans.whiteIsVictorious, trans.blackIsVictorious, + trans.cheatDetected, trans.kingInTheCenter, trans.threeChecks, trans.variantEnding, diff --git a/app/views/board/userAnalysisI18n.scala b/app/views/board/userAnalysisI18n.scala index b1f42c88c3..ba9329a291 100644 --- a/app/views/board/userAnalysisI18n.scala +++ b/app/views/board/userAnalysisI18n.scala @@ -42,6 +42,7 @@ object userAnalysisI18n { trans.playingRightNow, trans.whiteIsVictorious, trans.blackIsVictorious, + trans.cheatDetected, trans.kingInTheCenter, trans.threeChecks, trans.variantEnding, diff --git a/modules/i18n/src/main/I18nKeys.scala b/modules/i18n/src/main/I18nKeys.scala index 14214a1adc..eb7a21629b 100644 --- a/modules/i18n/src/main/I18nKeys.scala +++ b/modules/i18n/src/main/I18nKeys.scala @@ -29,6 +29,7 @@ val `blackIsVictorious` = new I18nKey("blackIsVictorious") val `youPlayTheWhitePieces` = new I18nKey("youPlayTheWhitePieces") val `youPlayTheBlackPieces` = new I18nKey("youPlayTheBlackPieces") val `itsYourTurn` = new I18nKey("itsYourTurn") +val `cheatDetected` = new I18nKey("cheatDetected") val `kingInTheCenter` = new I18nKey("kingInTheCenter") val `threeChecks` = new I18nKey("threeChecks") val `raceFinished` = new I18nKey("raceFinished") diff --git a/translation/source/site.xml b/translation/source/site.xml index 56051a1daf..658c063be8 100644 --- a/translation/source/site.xml +++ b/translation/source/site.xml @@ -25,6 +25,7 @@ You play the white pieces You play the black pieces It's your turn! + Cheat Detected King in the centre Three checks Race finished diff --git a/ui/game/src/view/status.ts b/ui/game/src/view/status.ts index 4d05858231..180b845319 100644 --- a/ui/game/src/view/status.ts +++ b/ui/game/src/view/status.ts @@ -31,7 +31,7 @@ export default function status(ctrl: Ctrl): string { case 'noStart': return (d.game.winner == 'white' ? 'Black' : 'White') + " didn't move"; case 'cheat': - return 'Cheat detected'; + return noarg('Cheat detected'); case 'variantEnd': switch (d.game.variant.key) { case 'kingOfTheHill':