From a6f53fb573263bbea6660329d1e7f4d3c483f6d9 Mon Sep 17 00:00:00 2001 From: est31 Date: Wed, 13 May 2015 12:18:42 +0200 Subject: [PATCH] Make variant ending variants translateable --- app/views/round/jsI18n.scala.html | 3 +++ conf/messages | 3 +++ modules/i18n/src/main/I18nKeys.scala | 5 ++++- ui/round/src/view/status.js | 6 +++--- 4 files changed, 13 insertions(+), 4 deletions(-) diff --git a/app/views/round/jsI18n.scala.html b/app/views/round/jsI18n.scala.html index 011b70777f..d91570f8c0 100644 --- a/app/views/round/jsI18n.scala.html +++ b/app/views/round/jsI18n.scala.html @@ -36,6 +36,9 @@ trans.premoveEnabledClickAnywhereToCancel, trans.playingRightNow, trans.whiteIsVictorious, trans.blackIsVictorious, +trans.kingInTheCenter, +trans.threeChecks, +trans.variantEnding, trans.backToTournament, trans.withdraw, trans.joinTheGame, diff --git a/conf/messages b/conf/messages index 080fa8e194..7ee7c34cb4 100644 --- a/conf/messages +++ b/conf/messages @@ -19,6 +19,9 @@ randomColor=Random side createAGame=Create a game whiteIsVictorious=White is victorious blackIsVictorious=Black is victorious +kingInTheCenter=King in the center +threeChecks=Three checks +variantEnding=Variant ending playWithTheSameOpponentAgain=Play with the same opponent again newOpponent=New opponent playWithAnotherOpponent=Play with another opponent diff --git a/modules/i18n/src/main/I18nKeys.scala b/modules/i18n/src/main/I18nKeys.scala index 62b0a30912..5b39b6301f 100644 --- a/modules/i18n/src/main/I18nKeys.scala +++ b/modules/i18n/src/main/I18nKeys.scala @@ -43,6 +43,9 @@ final class I18nKeys(translator: Translator) { val `createAGame` = new Key("createAGame") val `whiteIsVictorious` = new Key("whiteIsVictorious") val `blackIsVictorious` = new Key("blackIsVictorious") + val `kingInTheCenter` = new Key("kingInTheCenter") + val `threeChecks` = new Key("threeChecks") + val `variantEnding` = new Key("variantEnding") val `playWithTheSameOpponentAgain` = new Key("playWithTheSameOpponentAgain") val `newOpponent` = new Key("newOpponent") val `playWithAnotherOpponent` = new Key("playWithAnotherOpponent") @@ -465,7 +468,7 @@ final class I18nKeys(translator: Translator) { val `allowAnalytics` = new Key("allowAnalytics") val `shareGameURL` = new Key("shareGameURL") - def keys = List(`playWithAFriend`, `playWithTheMachine`, `toInviteSomeoneToPlayGiveThisUrl`, `gameOver`, `waitingForOpponent`, `waiting`, `yourTurn`, `aiNameLevelAiLevel`, `level`, `toggleTheChat`, `toggleSound`, `chat`, `resign`, `checkmate`, `stalemate`, `white`, `black`, `randomColor`, `createAGame`, `whiteIsVictorious`, `blackIsVictorious`, `playWithTheSameOpponentAgain`, `newOpponent`, `playWithAnotherOpponent`, `yourOpponentWantsToPlayANewGameWithYou`, `joinTheGame`, `whitePlays`, `blackPlays`, `theOtherPlayerHasLeftTheGameYouCanForceResignationOrWaitForHim`, `makeYourOpponentResign`, `forceResignation`, `forceDraw`, `talkInChat`, `theFirstPersonToComeOnThisUrlWillPlayWithYou`, `whiteCreatesTheGame`, `blackCreatesTheGame`, `whiteJoinsTheGame`, `blackJoinsTheGame`, `whiteResigned`, `blackResigned`, `whiteLeftTheGame`, `blackLeftTheGame`, `shareThisUrlToLetSpectatorsSeeTheGame`, `replayAndAnalyse`, `computerAnalysisInProgress`, `theComputerAnalysisHasFailed`, `viewTheComputerAnalysis`, `requestAComputerAnalysis`, `computerAnalysis`, `analysis`, `blunders`, `mistakes`, `inaccuracies`, `moveTimes`, `flipBoard`, `threefoldRepetition`, `claimADraw`, `offerDraw`, `draw`, `nbConnectedPlayers`, `gamesBeingPlayedRightNow`, `viewAllNbGames`, `viewNbCheckmates`, `nbBookmarks`, `nbPopularGames`, `nbAnalysedGames`, `bookmarkedByNbPlayers`, `viewInFullSize`, `logOut`, `signIn`, `newToLichess`, `youNeedAnAccountToDoThat`, `signUp`, `computersAreNotAllowedToPlay`, `games`, `forum`, `xPostedInForumY`, `latestForumPosts`, `players`, `minutesPerSide`, `variant`, `timeControl`, `realTime`, `correspondence`, `daysPerTurn`, `oneDay`, `nbDays`, `nbHours`, `time`, `rating`, `username`, `password`, `haveAnAccount`, `allYouNeedIsAUsernameAndAPassword`, `changePassword`, `changeEmail`, `email`, `emailIsOptional`, `passwordReset`, `forgotPassword`, `learnMoreAboutLichess`, `rank`, `gamesPlayed`, `nbGamesWithYou`, `declineInvitation`, `cancel`, `timeOut`, `drawOfferSent`, `drawOfferDeclined`, `drawOfferAccepted`, `drawOfferCanceled`, `whiteOffersDraw`, `blackOffersDraw`, `whiteDeclinesDraw`, `blackDeclinesDraw`, `yourOpponentOffersADraw`, `accept`, `decline`, `playingRightNow`, `finished`, `abortGame`, `gameAborted`, `standard`, `unlimited`, `mode`, `casual`, `rated`, `thisGameIsRated`, `rematch`, `rematchOfferSent`, `rematchOfferAccepted`, `rematchOfferCanceled`, `rematchOfferDeclined`, `cancelRematchOffer`, `viewRematch`, `play`, `inbox`, `chatRoom`, `spectatorRoom`, `composeMessage`, `noNewMessages`, `subject`, `recipient`, `send`, `incrementInSeconds`, `freeOnlineChess`, `spectators`, `nbWins`, `nbLosses`, `nbDraws`, `exportGames`, `ratingRange`, `giveNbSeconds`, `premoveEnabledClickAnywhereToCancel`, `thisPlayerUsesChessComputerAssistance`, `thisPlayerArtificiallyIncreasesTheirRating`, `opening`, `takeback`, `proposeATakeback`, `takebackPropositionSent`, `takebackPropositionDeclined`, `takebackPropositionAccepted`, `takebackPropositionCanceled`, `yourOpponentProposesATakeback`, `bookmarkThisGame`, `search`, `advancedSearch`, `tournament`, `tournaments`, `tournamentPoints`, `viewTournament`, `backToTournament`, `backToGame`, `freeOnlineChessGamePlayChessNowInACleanInterfaceNoRegistrationNoAdsNoPluginRequiredPlayChessWithComputerFriendsOrRandomOpponents`, `teams`, `nbMembers`, `allTeams`, `newTeam`, `myTeams`, `noTeamFound`, `joinTeam`, `quitTeam`, `anyoneCanJoin`, `aConfirmationIsRequiredToJoin`, `joiningPolicy`, `teamLeader`, `teamBestPlayers`, `teamRecentMembers`, `xJoinedTeamY`, `xCreatedTeamY`, `averageElo`, `location`, `settings`, `filterGames`, `reset`, `apply`, `leaderboard`, `pasteTheFenStringHere`, `pasteThePgnStringHere`, `fromPosition`, `continueFromHere`, `importGame`, `nbImportedGames`, `thisIsAChessCaptcha`, `clickOnTheBoardToMakeYourMove`, `notACheckmate`, `colorPlaysCheckmateInOne`, `retry`, `reconnecting`, `onlineFriends`, `noFriendsOnline`, `findFriends`, `favoriteOpponents`, `follow`, `following`, `unfollow`, `block`, `blocked`, `unblock`, `followsYou`, `xStartedFollowingY`, `nbFollowers`, `nbFollowing`, `more`, `memberSince`, `lastLogin`, `challengeToPlay`, `player`, `list`, `graph`, `lessThanNbMinutes`, `xToYMinutes`, `textIsTooShort`, `textIsTooLong`, `required`, `openTournaments`, `duration`, `winner`, `standing`, `createANewTournament`, `join`, `withdraw`, `points`, `wins`, `losses`, `winStreak`, `createdBy`, `waitingForNbPlayers`, `tournamentIsStarting`, `membersOnly`, `boardEditor`, `startPosition`, `clearBoard`, `savePosition`, `loadPosition`, `isPrivate`, `reportXToModerators`, `profile`, `editProfile`, `firstName`, `lastName`, `biography`, `country`, `preferences`, `watchLichessTV`, `previouslyOnLichessTV`, `todaysLeaders`, `onlinePlayers`, `progressToday`, `progressThisWeek`, `progressThisMonth`, `leaderboardThisWeek`, `leaderboardThisMonth`, `activeToday`, `activeThisWeek`, `activePlayers`, `bewareTheGameIsRatedButHasNoClock`, `training`, `yourPuzzleRatingX`, `findTheBestMoveForWhite`, `findTheBestMoveForBlack`, `toTrackYourProgress`, `trainingSignupExplanation`, `recentlyPlayedPuzzles`, `puzzleId`, `puzzleOfTheDay`, `clickToSolve`, `goodMove`, `butYouCanDoBetter`, `bestMove`, `keepGoing`, `puzzleFailed`, `butYouCanKeepTrying`, `victory`, `giveUp`, `puzzleSolvedInXSeconds`, `wasThisPuzzleAnyGood`, `pleaseVotePuzzle`, `thankYou`, `ratingX`, `playedXTimes`, `fromGameLink`, `startTraining`, `continueTraining`, `retryThisPuzzle`, `thisPuzzleIsCorrect`, `thisPuzzleIsWrong`, `youHaveNbSecondsToMakeYourFirstMove`, `nbGamesInPlay`, `automaticallyProceedToNextGameAfterMoving`, `autoSwitch`, `openingId`, `yourOpeningRatingX`, `findNbStrongMoves`, `thisMoveGivesYourOpponentTheAdvantage`, `openingFailed`, `openingSolved`, `recentlyPlayedOpenings`, `puzzles`, `coordinates`, `openings`, `latestUpdates`, `tournamentWinners`, `name`, `description`, `no`, `yes`, `help`, `createANewTopic`, `topics`, `posts`, `lastPost`, `views`, `replies`, `replyToThisTopic`, `reply`, `message`, `createTheTopic`, `reportAUser`, `user`, `reason`, `whatIsIheMatter`, `cheat`, `insult`, `troll`, `other`, `reportDescriptionHelp`, `by`, `thisTopicIsNowClosed`, `theming`, `donate`, `blog`, `map`, `realTimeWorldMapOfChessMoves`, `questionsAndAnswers`, `notes`, `typePrivateNotesHere`, `gameDisplay`, `pieceAnimation`, `materialDifference`, `closeAccount`, `closeYourAccount`, `changedMindDoNotCloseAccount`, `closeAccountExplanation`, `thisAccountIsClosed`, `invalidUsernameOrPassword`, `emailMeALink`, `currentPassword`, `newPassword`, `newPasswordAgain`, `boardHighlights`, `pieceDestinations`, `boardCoordinates`, `moveListWhilePlaying`, `chessClock`, `tenthsOfSeconds`, `never`, `whenTimeRemainingLessThanTenSeconds`, `horizontalGreenProgressBars`, `soundWhenTimeGetsCritical`, `gameBehavior`, `premovesPlayingDuringOpponentTurn`, `takebacksWithOpponentApproval`, `promoteToQueenAutomatically`, `claimDrawOnThreefoldRepetitionAutomatically`, `privacy`, `letOtherPlayersFollowYou`, `letOtherPlayersChallengeYou`, `sound`, `soundControlInTheTopBarOfEveryPage`, `yourPreferencesHaveBeenSaved`, `none`, `fast`, `normal`, `slow`, `insideTheBoard`, `outsideTheBoard`, `onSlowGames`, `always`, `inCasualGamesOnly`, `whenPremoving`, `whenTimeRemainingLessThanThirtySeconds`, `difficultyEasy`, `difficultyNormal`, `difficultyHard`, `xLeftANoteOnY`, `xCompetesInY`, `xAskedY`, `xAnsweredY`, `xCommentedY`, `timeline`, `seeAllTournaments`, `starting`, `allInformationIsPublicAndOptional`, `yourCityRegionOrDepartment`, `biographyDescription`, `maximumNbCharacters`, `blocks`, `listBlockedPlayers`, `human`, `computer`, `side`, `clock`, `unauthorizedError`, `noInternetConnection`, `connectedToLichess`, `signedOut`, `loginSuccessful`, `playOnTheBoardOffline`, `playOfflineComputer`, `opponent`, `learn`, `community`, `tools`, `increment`, `board`, `pieces`, `sharePGN`, `playOnline`, `playOffline`, `allowAnalytics`, `shareGameURL`) + def keys = List(`playWithAFriend`, `playWithTheMachine`, `toInviteSomeoneToPlayGiveThisUrl`, `gameOver`, `waitingForOpponent`, `waiting`, `yourTurn`, `aiNameLevelAiLevel`, `level`, `toggleTheChat`, `toggleSound`, `chat`, `resign`, `checkmate`, `stalemate`, `white`, `black`, `randomColor`, `createAGame`, `whiteIsVictorious`, `blackIsVictorious`, `kingInTheCenter`, `threeChecks`, `variantEnding`, `playWithTheSameOpponentAgain`, `newOpponent`, `playWithAnotherOpponent`, `yourOpponentWantsToPlayANewGameWithYou`, `joinTheGame`, `whitePlays`, `blackPlays`, `theOtherPlayerHasLeftTheGameYouCanForceResignationOrWaitForHim`, `makeYourOpponentResign`, `forceResignation`, `forceDraw`, `talkInChat`, `theFirstPersonToComeOnThisUrlWillPlayWithYou`, `whiteCreatesTheGame`, `blackCreatesTheGame`, `whiteJoinsTheGame`, `blackJoinsTheGame`, `whiteResigned`, `blackResigned`, `whiteLeftTheGame`, `blackLeftTheGame`, `shareThisUrlToLetSpectatorsSeeTheGame`, `replayAndAnalyse`, `computerAnalysisInProgress`, `theComputerAnalysisHasFailed`, `viewTheComputerAnalysis`, `requestAComputerAnalysis`, `computerAnalysis`, `analysis`, `blunders`, `mistakes`, `inaccuracies`, `moveTimes`, `flipBoard`, `threefoldRepetition`, `claimADraw`, `offerDraw`, `draw`, `nbConnectedPlayers`, `gamesBeingPlayedRightNow`, `viewAllNbGames`, `viewNbCheckmates`, `nbBookmarks`, `nbPopularGames`, `nbAnalysedGames`, `bookmarkedByNbPlayers`, `viewInFullSize`, `logOut`, `signIn`, `newToLichess`, `youNeedAnAccountToDoThat`, `signUp`, `computersAreNotAllowedToPlay`, `games`, `forum`, `xPostedInForumY`, `latestForumPosts`, `players`, `minutesPerSide`, `variant`, `timeControl`, `realTime`, `correspondence`, `daysPerTurn`, `oneDay`, `nbDays`, `nbHours`, `time`, `rating`, `username`, `password`, `haveAnAccount`, `allYouNeedIsAUsernameAndAPassword`, `changePassword`, `changeEmail`, `email`, `emailIsOptional`, `passwordReset`, `forgotPassword`, `learnMoreAboutLichess`, `rank`, `gamesPlayed`, `nbGamesWithYou`, `declineInvitation`, `cancel`, `timeOut`, `drawOfferSent`, `drawOfferDeclined`, `drawOfferAccepted`, `drawOfferCanceled`, `whiteOffersDraw`, `blackOffersDraw`, `whiteDeclinesDraw`, `blackDeclinesDraw`, `yourOpponentOffersADraw`, `accept`, `decline`, `playingRightNow`, `finished`, `abortGame`, `gameAborted`, `standard`, `unlimited`, `mode`, `casual`, `rated`, `thisGameIsRated`, `rematch`, `rematchOfferSent`, `rematchOfferAccepted`, `rematchOfferCanceled`, `rematchOfferDeclined`, `cancelRematchOffer`, `viewRematch`, `play`, `inbox`, `chatRoom`, `spectatorRoom`, `composeMessage`, `noNewMessages`, `subject`, `recipient`, `send`, `incrementInSeconds`, `freeOnlineChess`, `spectators`, `nbWins`, `nbLosses`, `nbDraws`, `exportGames`, `ratingRange`, `giveNbSeconds`, `premoveEnabledClickAnywhereToCancel`, `thisPlayerUsesChessComputerAssistance`, `thisPlayerArtificiallyIncreasesTheirRating`, `opening`, `takeback`, `proposeATakeback`, `takebackPropositionSent`, `takebackPropositionDeclined`, `takebackPropositionAccepted`, `takebackPropositionCanceled`, `yourOpponentProposesATakeback`, `bookmarkThisGame`, `search`, `advancedSearch`, `tournament`, `tournaments`, `tournamentPoints`, `viewTournament`, `backToTournament`, `backToGame`, `freeOnlineChessGamePlayChessNowInACleanInterfaceNoRegistrationNoAdsNoPluginRequiredPlayChessWithComputerFriendsOrRandomOpponents`, `teams`, `nbMembers`, `allTeams`, `newTeam`, `myTeams`, `noTeamFound`, `joinTeam`, `quitTeam`, `anyoneCanJoin`, `aConfirmationIsRequiredToJoin`, `joiningPolicy`, `teamLeader`, `teamBestPlayers`, `teamRecentMembers`, `xJoinedTeamY`, `xCreatedTeamY`, `averageElo`, `location`, `settings`, `filterGames`, `reset`, `apply`, `leaderboard`, `pasteTheFenStringHere`, `pasteThePgnStringHere`, `fromPosition`, `continueFromHere`, `importGame`, `nbImportedGames`, `thisIsAChessCaptcha`, `clickOnTheBoardToMakeYourMove`, `notACheckmate`, `colorPlaysCheckmateInOne`, `retry`, `reconnecting`, `onlineFriends`, `noFriendsOnline`, `findFriends`, `favoriteOpponents`, `follow`, `following`, `unfollow`, `block`, `blocked`, `unblock`, `followsYou`, `xStartedFollowingY`, `nbFollowers`, `nbFollowing`, `more`, `memberSince`, `lastLogin`, `challengeToPlay`, `player`, `list`, `graph`, `lessThanNbMinutes`, `xToYMinutes`, `textIsTooShort`, `textIsTooLong`, `required`, `openTournaments`, `duration`, `winner`, `standing`, `createANewTournament`, `join`, `withdraw`, `points`, `wins`, `losses`, `winStreak`, `createdBy`, `waitingForNbPlayers`, `tournamentIsStarting`, `membersOnly`, `boardEditor`, `startPosition`, `clearBoard`, `savePosition`, `loadPosition`, `isPrivate`, `reportXToModerators`, `profile`, `editProfile`, `firstName`, `lastName`, `biography`, `country`, `preferences`, `watchLichessTV`, `previouslyOnLichessTV`, `todaysLeaders`, `onlinePlayers`, `progressToday`, `progressThisWeek`, `progressThisMonth`, `leaderboardThisWeek`, `leaderboardThisMonth`, `activeToday`, `activeThisWeek`, `activePlayers`, `bewareTheGameIsRatedButHasNoClock`, `training`, `yourPuzzleRatingX`, `findTheBestMoveForWhite`, `findTheBestMoveForBlack`, `toTrackYourProgress`, `trainingSignupExplanation`, `recentlyPlayedPuzzles`, `puzzleId`, `puzzleOfTheDay`, `clickToSolve`, `goodMove`, `butYouCanDoBetter`, `bestMove`, `keepGoing`, `puzzleFailed`, `butYouCanKeepTrying`, `victory`, `giveUp`, `puzzleSolvedInXSeconds`, `wasThisPuzzleAnyGood`, `pleaseVotePuzzle`, `thankYou`, `ratingX`, `playedXTimes`, `fromGameLink`, `startTraining`, `continueTraining`, `retryThisPuzzle`, `thisPuzzleIsCorrect`, `thisPuzzleIsWrong`, `youHaveNbSecondsToMakeYourFirstMove`, `nbGamesInPlay`, `automaticallyProceedToNextGameAfterMoving`, `autoSwitch`, `openingId`, `yourOpeningRatingX`, `findNbStrongMoves`, `thisMoveGivesYourOpponentTheAdvantage`, `openingFailed`, `openingSolved`, `recentlyPlayedOpenings`, `puzzles`, `coordinates`, `openings`, `latestUpdates`, `tournamentWinners`, `name`, `description`, `no`, `yes`, `help`, `createANewTopic`, `topics`, `posts`, `lastPost`, `views`, `replies`, `replyToThisTopic`, `reply`, `message`, `createTheTopic`, `reportAUser`, `user`, `reason`, `whatIsIheMatter`, `cheat`, `insult`, `troll`, `other`, `reportDescriptionHelp`, `by`, `thisTopicIsNowClosed`, `theming`, `donate`, `blog`, `map`, `realTimeWorldMapOfChessMoves`, `questionsAndAnswers`, `notes`, `typePrivateNotesHere`, `gameDisplay`, `pieceAnimation`, `materialDifference`, `closeAccount`, `closeYourAccount`, `changedMindDoNotCloseAccount`, `closeAccountExplanation`, `thisAccountIsClosed`, `invalidUsernameOrPassword`, `emailMeALink`, `currentPassword`, `newPassword`, `newPasswordAgain`, `boardHighlights`, `pieceDestinations`, `boardCoordinates`, `moveListWhilePlaying`, `chessClock`, `tenthsOfSeconds`, `never`, `whenTimeRemainingLessThanTenSeconds`, `horizontalGreenProgressBars`, `soundWhenTimeGetsCritical`, `gameBehavior`, `premovesPlayingDuringOpponentTurn`, `takebacksWithOpponentApproval`, `promoteToQueenAutomatically`, `claimDrawOnThreefoldRepetitionAutomatically`, `privacy`, `letOtherPlayersFollowYou`, `letOtherPlayersChallengeYou`, `sound`, `soundControlInTheTopBarOfEveryPage`, `yourPreferencesHaveBeenSaved`, `none`, `fast`, `normal`, `slow`, `insideTheBoard`, `outsideTheBoard`, `onSlowGames`, `always`, `inCasualGamesOnly`, `whenPremoving`, `whenTimeRemainingLessThanThirtySeconds`, `difficultyEasy`, `difficultyNormal`, `difficultyHard`, `xLeftANoteOnY`, `xCompetesInY`, `xAskedY`, `xAnsweredY`, `xCommentedY`, `timeline`, `seeAllTournaments`, `starting`, `allInformationIsPublicAndOptional`, `yourCityRegionOrDepartment`, `biographyDescription`, `maximumNbCharacters`, `blocks`, `listBlockedPlayers`, `human`, `computer`, `side`, `clock`, `unauthorizedError`, `noInternetConnection`, `connectedToLichess`, `signedOut`, `loginSuccessful`, `playOnTheBoardOffline`, `playOfflineComputer`, `opponent`, `learn`, `community`, `tools`, `increment`, `board`, `pieces`, `sharePGN`, `playOnline`, `playOffline`, `allowAnalytics`, `shareGameURL`) lazy val count = keys.size } diff --git a/ui/round/src/view/status.js b/ui/round/src/view/status.js index e508bb8947..7368508c71 100644 --- a/ui/round/src/view/status.js +++ b/ui/round/src/view/status.js @@ -31,11 +31,11 @@ module.exports = function(ctrl) { case 'variantEnd': switch (ctrl.data.game.variant.key) { case 'kingOfTheHill': - return 'King in the center'; + return ctrl.trans('kingInTheCenter'); case 'threeCheck': - return 'Three checks'; + return ctrl.trans('threeChecks'); default: - return 'Variant ending'; + return ctrl.trans('variantEnding'); } break; default: