Merge pull request #9637 from rglbr/translate_lobby

add translational strings in lobby page
pull/9560/head^2
Thibault Duplessis 2021-08-24 19:19:55 +02:00 committed by GitHub
commit 572020a2e3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 16 additions and 7 deletions

View File

@ -132,14 +132,14 @@ object bits {
) )
) )
def currentGameInfo(current: lila.app.mashup.Preload.CurrentGame) = def currentGameInfo(current: lila.app.mashup.Preload.CurrentGame)(implicit ctx: Context) =
nopeInfo( nopeInfo(
h1("Hang on!"), h1(trans.hangOn()),
p("You have a game in progress with ", strong(current.opponent), "."), p(trans.gameInProgress(strong(current.opponent))),
br, br,
br, br,
a(cls := "text button button-fat", dataIcon := "", href := routes.Round.player(current.pov.fullId))( a(cls := "text button button-fat", dataIcon := "", href := routes.Round.player(current.pov.fullId))(
"Join the game" trans.joinTheGame()
), ),
br, br,
br, br,
@ -148,12 +148,11 @@ object bits {
br, br,
postForm(action := routes.Round.resign(current.pov.fullId))( postForm(action := routes.Round.resign(current.pov.fullId))(
button(cls := "text button button-red", dataIcon := "")( button(cls := "text button button-red", dataIcon := "")(
if (current.pov.game.abortable) "Abort" else "Resign", if (current.pov.game.abortable) trans.abortTheGame() else trans.resignTheGame()
" the game"
) )
), ),
br, br,
p("You can't start a new game until this one is finished.") p(trans.youCantStartNewGame())
) )
def nopeInfo(content: Modifier*) = def nopeInfo(content: Modifier*) =

View File

@ -758,6 +758,11 @@ val `cantDoThisTwice` = new I18nKey("cantDoThisTwice")
val `emailAssociatedToaccount` = new I18nKey("emailAssociatedToaccount") val `emailAssociatedToaccount` = new I18nKey("emailAssociatedToaccount")
val `sentEmailWithLink` = new I18nKey("sentEmailWithLink") val `sentEmailWithLink` = new I18nKey("sentEmailWithLink")
val `tournamentEntryCode` = new I18nKey("tournamentEntryCode") val `tournamentEntryCode` = new I18nKey("tournamentEntryCode")
val `hangOn` = new I18nKey("hangOn")
val `gameInProgress` = new I18nKey("gameInProgress")
val `abortTheGame` = new I18nKey("abortTheGame")
val `resignTheGame` = new I18nKey("resignTheGame")
val `youCantStartNewGame` = new I18nKey("youCantStartNewGame")
val `opponentLeftCounter` = new I18nKey("opponentLeftCounter") val `opponentLeftCounter` = new I18nKey("opponentLeftCounter")
val `mateInXHalfMoves` = new I18nKey("mateInXHalfMoves") val `mateInXHalfMoves` = new I18nKey("mateInXHalfMoves")
val `nextCaptureOrPawnMoveInXHalfMoves` = new I18nKey("nextCaptureOrPawnMoveInXHalfMoves") val `nextCaptureOrPawnMoveInXHalfMoves` = new I18nKey("nextCaptureOrPawnMoveInXHalfMoves")

View File

@ -920,4 +920,9 @@ Leave empty to start games from the normal initial position.</string>
<string name="emailAssociatedToaccount">Email address associated to the account</string> <string name="emailAssociatedToaccount">Email address associated to the account</string>
<string name="sentEmailWithLink">We've sent you an email with a link.</string> <string name="sentEmailWithLink">We've sent you an email with a link.</string>
<string name="tournamentEntryCode">Tournament entry code</string> <string name="tournamentEntryCode">Tournament entry code</string>
<string name="hangOn">Hang on!</string>
<string name="gameInProgress">You have a game in progress with %s.</string>
<string name="abortTheGame">Abort the game</string>
<string name="resignTheGame">Resign the game</string>
<string name="youCantStartNewGame">You can't start a new game until this one is finished.</string>
</resources> </resources>