Skip to content

Commit

Permalink
Tournament mode translation from form page, closes lichess-org#3958
Browse files Browse the repository at this point in the history
  • Loading branch information
greg-finley committed Apr 5, 2018
1 parent 922b3af commit 52b486a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions app/templating/SetupHelper.scala
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,11 @@ trait SetupHelper { self: I18nHelper =>
(Mode.Rated.id.toString, I18nKeys.rated.txt(), none)
)

def translatedModeChoicesTournament(implicit ctx: Context) = List(
(Mode.Casual.id.toString, I18nKeys.casualTournament.txt(), none),
(Mode.Rated.id.toString, I18nKeys.ratedTournament.txt(), none)
)

def translatedSystemChoices(implicit ctx: Context) = List(
System.Arena.id.toString -> "Arena"
)
Expand Down
2 changes: 1 addition & 1 deletion app/views/tournament/form.scala.html
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ <h1>@trans.createANewTournament()</h1>
<tr>
<th><label for="@form("mode").id">@trans.mode()</label></th>
<td>
@base.form.select(form("mode"), translatedModeChoices.map(x => x._1 -> x._2))
@base.form.select(form("mode"), translatedModeChoicesTournament.map(x => x._1 -> x._2))
</td>
</tr>
<tr class="time">
Expand Down

0 comments on commit 52b486a

Please sign in to comment.