diff --git a/app/views/account/pref.scala b/app/views/account/pref.scala index 0beb69935b..d55a6b76d1 100644 --- a/app/views/account/pref.scala +++ b/app/views/account/pref.scala @@ -79,6 +79,10 @@ object pref { zenMode(), radios(form("display.zen"), booleanChoices) ), + setting( + showPlayerRatings(), + radios(form("display.ratings"), booleanChoices) + ), setting( displayBoardResizeHandle(), radios(form("display.resizeHandle"), translatedBoardResizeHandleChoices) diff --git a/modules/i18n/src/main/I18nKeys.scala b/modules/i18n/src/main/I18nKeys.scala index 36b3d1dfbd..cc3e0c4004 100644 --- a/modules/i18n/src/main/I18nKeys.scala +++ b/modules/i18n/src/main/I18nKeys.scala @@ -1573,6 +1573,7 @@ val `pgnPieceNotation` = new I18nKey("preferences:pgnPieceNotation") val `chessPieceSymbol` = new I18nKey("preferences:chessPieceSymbol") val `pgnLetter` = new I18nKey("preferences:pgnLetter") val `zenMode` = new I18nKey("preferences:zenMode") +val `showPlayerRatings` = new I18nKey("preferences:showPlayerRatings") val `displayBoardResizeHandle` = new I18nKey("preferences:displayBoardResizeHandle") val `onlyOnInitialPosition` = new I18nKey("preferences:onlyOnInitialPosition") val `blindfoldChess` = new I18nKey("preferences:blindfoldChess") diff --git a/modules/pref/src/main/Pref.scala b/modules/pref/src/main/Pref.scala index f48b02b1ba..2456636a6b 100644 --- a/modules/pref/src/main/Pref.scala +++ b/modules/pref/src/main/Pref.scala @@ -36,6 +36,7 @@ case class Pref( insightShare: Int, keyboardMove: Int, zen: Int, + ratings: Boolean, rookCastle: Int, moveEvent: Int, pieceNotation: Int, @@ -447,6 +448,7 @@ object Pref { insightShare = InsightShare.FRIENDS, keyboardMove = KeyboardMove.NO, zen = Zen.NO, + ratings = true, rookCastle = RookCastle.YES, moveEvent = MoveEvent.BOTH, pieceNotation = PieceNotation.SYMBOL, diff --git a/modules/pref/src/main/PrefForm.scala b/modules/pref/src/main/PrefForm.scala index 67e2463370..fec5fc4162 100644 --- a/modules/pref/src/main/PrefForm.scala +++ b/modules/pref/src/main/PrefForm.scala @@ -27,6 +27,7 @@ object PrefForm { "replay" -> checkedNumber(Pref.Replay.choices), "pieceNotation" -> optional(booleanNumber), "zen" -> optional(booleanNumber), + "ratings" -> optional(boolean), "resizeHandle" -> optional(checkedNumber(Pref.ResizeHandle.choices)), "blindfold" -> checkedNumber(Pref.Blindfold.choices) )(DisplayData.apply)(DisplayData.unapply), @@ -65,6 +66,7 @@ object PrefForm { replay: Int, pieceNotation: Option[Int], zen: Option[Int], + ratings: Option[Boolean], resizeHandle: Option[Int], blindfold: Int ) @@ -146,6 +148,7 @@ object PrefForm { captured = if (pref.captured) 1 else 0, blindfold = pref.blindfold, zen = pref.zen.some, + ratings = pref.ratings.some, resizeHandle = pref.resizeHandle.some, pieceNotation = pref.pieceNotation.some ), diff --git a/modules/pref/src/main/PrefHandlers.scala b/modules/pref/src/main/PrefHandlers.scala index 748dd37c3e..7f42f98ffe 100644 --- a/modules/pref/src/main/PrefHandlers.scala +++ b/modules/pref/src/main/PrefHandlers.scala @@ -46,6 +46,7 @@ private object PrefHandlers { insightShare = r.getD("insightShare", Pref.default.insightShare), keyboardMove = r.getD("keyboardMove", Pref.default.keyboardMove), zen = r.getD("zen", Pref.default.zen), + ratings = r.getD("ratings", Pref.default.ratings), rookCastle = r.getD("rookCastle", Pref.default.rookCastle), pieceNotation = r.getD("pieceNotation", Pref.default.pieceNotation), resizeHandle = r.getD("resizeHandle", Pref.default.resizeHandle), diff --git a/translation/source/preferences.xml b/translation/source/preferences.xml index c0a263929d..40ff2b9fff 100644 --- a/translation/source/preferences.xml +++ b/translation/source/preferences.xml @@ -12,6 +12,7 @@ Chess piece symbol Letter (K, Q, R, B, N) Zen mode + Show player ratings Show board resize handle Only on initial position Blindfold chess (invisible pieces)