Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make playban warning translatable #5459

Merged
merged 2 commits into from
Aug 25, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
28 changes: 14 additions & 14 deletions app/views/lobby/bits.scala
Original file line number Diff line number Diff line change
Expand Up @@ -95,25 +95,25 @@ object bits {
)

def playbanInfo(ban: lila.playban.TempBan)(implicit ctx: Context) = nopeInfo(
h1("Sorry :("),
p("We had to time you out for a ", (ban.remainingSeconds < 3600) ?? "little ", "while."),
p("The timeout expires ", strong(secondsFromNow(ban.remainingSeconds)), "."),
h2("Why?"),
h1(trans.sorry()),
p(trans.weHadToTimeYouOutForAWhile()),
p(trans.timeoutExpires(strong(secondsFromNow(ban.remainingSeconds)))),
h2(trans.why()),
p(
"We aim to provide a pleasant chess experience for everyone.", br,
"To that effect, we must ensure that all players follow good practice.", br,
"When a potential problem is detected, we display this message."
trans.pleasantChessExperience(), br,
trans.goodPractice(), br,
trans.potentialProblem()
),
h2("How to avoid this?"),
h2(trans.howToAvoidThis()),
ul(
li("Play every game you start"),
li("Try to win (or at least draw) every game you play"),
li("Resign lost games (don't let the clock run down)")
li(trans.playEveryGame()),
li(trans.tryToWin()),
li(trans.resignLostGames())
),
p(
"We apologize for the temporary inconvenience,", br,
"and wish you great games on lichess.org.", br,
"Thank you for reading!"
trans.temporaryInconvenience(), br,
trans.wishYouGreatGames(), br,
trans.thankYouForReading()
)
)

Expand Down
14 changes: 14 additions & 0 deletions modules/i18n/src/main/I18nKeys.scala
Original file line number Diff line number Diff line change
Expand Up @@ -718,6 +718,20 @@ val `addCurrentVariation` = new Translated("addCurrentVariation", Site)
val `playVariationToCreateConditionalPremoves` = new Translated("playVariationToCreateConditionalPremoves", Site)
val `noConditionalPremoves` = new Translated("noConditionalPremoves", Site)
val `playX` = new Translated("playX", Site)
val `sorry` = new Translated("sorry", Site)
val `weHadToTimeYouOutForAWhile` = new Translated("weHadToTimeYouOutForAWhile", Site)
val `timeoutExpires` = new Translated("timeoutExpires", Site)
val `why` = new Translated("why", Site)
val `pleasantChessExperience` = new Translated("pleasantChessExperience", Site)
val `goodPractice` = new Translated("goodPractice", Site)
val `potentialProblem` = new Translated("potentialProblem", Site)
val `howToAvoidThis` = new Translated("howToAvoidThis", Site)
val `playEveryGame` = new Translated("playEveryGame", Site)
val `tryToWin` = new Translated("tryToWin", Site)
val `resignLostGames` = new Translated("resignLostGames", Site)
val `temporaryInconvenience` = new Translated("temporaryInconvenience", Site)
val `wishYouGreatGames` = new Translated("wishYouGreatGames", Site)
val `thankYouForReading` = new Translated("thankYouForReading", Site)
val `mateInXHalfMoves` = new Translated("mateInXHalfMoves", Site)
val `nextCaptureOrPawnMoveInXHalfMoves` = new Translated("nextCaptureOrPawnMoveInXHalfMoves", Site)
val `nbPlayers` = new Translated("nbPlayers", Site)
Expand Down
14 changes: 14 additions & 0 deletions translation/source/site.xml
Original file line number Diff line number Diff line change
Expand Up @@ -855,4 +855,18 @@ computer analysis, game chat and shareable URL.</string>
<item quantity="one">and save %s premove line</item>
<item quantity="other">and save %s premove lines</item>
</plurals>
<string name="sorry">Sorry :(</string>
<string name="weHadToTimeYouOutForAWhile">We had to time you out for a while.</string>
<string name="timeoutExpires">The timeout expires %s.</string>
<string name="why">Why?</string>
<string name="pleasantChessExperience">We aim to provide a pleasant chess experience for everyone.</string>
<string name="goodPractice">To that effect, we must ensure that all players follow good practice.</string>
<string name="potentialProblem">When a potential problem is detected, we display this message.</string>
<string name="howToAvoidThis">How to avoid this?</string>
<string name="playEveryGame">Play every game you start.</string>
<string name="tryToWin">Try to win (or at least draw) every game you play.</string>
<string name="resignLostGames">Resign lost games (don't let the clock run down).</string>
<string name="temporaryInconvenience">We apologize for the temporary inconvenience,</string>
<string name="wishYouGreatGames">and wish you great games on lichess.org.</string>
<string name="thankYouForReading">Thank you for reading!</string>
</resources>