/class translation WIP
This commit is contained in:
parent
d6419b4b8e
commit
f67b8cc2ce
|
@ -8,8 +8,7 @@ import views._
|
||||||
|
|
||||||
final class Clas(
|
final class Clas(
|
||||||
env: Env,
|
env: Env,
|
||||||
authC: Auth,
|
authC: Auth
|
||||||
prismicC: Prismic
|
|
||||||
) extends LilaController(env) {
|
) extends LilaController(env) {
|
||||||
|
|
||||||
def index = Open { implicit ctx =>
|
def index = Open { implicit ctx =>
|
||||||
|
@ -36,13 +35,9 @@ final class Clas(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private def renderHome(implicit ctx: Context) = {
|
private def renderHome(implicit ctx: Context) = fuccess {
|
||||||
pageHit
|
pageHit
|
||||||
prismicC getBookmark "class" map {
|
Ok(views.html.clas.clas.home)
|
||||||
_ ?? {
|
|
||||||
case (doc, resolver) => Ok(views.html.clas.clas.home(doc, resolver))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
def form = Secure(_.Teacher) { implicit ctx => _ =>
|
def form = Secure(_.Teacher) { implicit ctx => _ =>
|
||||||
|
|
|
@ -11,7 +11,7 @@ import controllers.routes
|
||||||
|
|
||||||
object clas {
|
object clas {
|
||||||
|
|
||||||
def home(doc: io.prismic.Document, resolver: io.prismic.DocumentLinkResolver)(implicit ctx: Context) =
|
def home(implicit ctx: Context) =
|
||||||
views.html.base.layout(
|
views.html.base.layout(
|
||||||
moreCss = frag(
|
moreCss = frag(
|
||||||
cssTag("page"),
|
cssTag("page"),
|
||||||
|
@ -22,11 +22,18 @@ object clas {
|
||||||
main(cls := "page-small box box-pad page clas-home")(
|
main(cls := "page-small box box-pad page clas-home")(
|
||||||
h1(trans.clas.lichessClasses()),
|
h1(trans.clas.lichessClasses()),
|
||||||
div(cls := "clas-home__doc body")(
|
div(cls := "clas-home__doc body")(
|
||||||
raw(~doc.getHtml("doc.content", resolver))
|
p(trans.clas.teachClassesOfChessStudents()),
|
||||||
|
h2(trans.clas.features()),
|
||||||
|
ul(
|
||||||
|
li(trans.clas.quicklyGenerateSafeUsernames()),
|
||||||
|
li(trans.clas.trackStudentProgress()),
|
||||||
|
li(trans.clas.messageAllStudents()),
|
||||||
|
li(trans.clas.freeForAllForever())
|
||||||
|
)
|
||||||
),
|
),
|
||||||
div(cls := "clas-home__onboard")(
|
div(cls := "clas-home__onboard")(
|
||||||
a(cls := "button button-fat", href := routes.Clas.verifyTeacher)(
|
a(cls := "button button-fat", href := routes.Clas.verifyTeacher)(
|
||||||
"Apply for Lichess Teacher"
|
trans.clas.applyToBeLichessTeacher()
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
@ -36,7 +43,7 @@ object clas {
|
||||||
bits.layout("Lichess Classes", Right("classes"))(
|
bits.layout("Lichess Classes", Right("classes"))(
|
||||||
cls := "clas-index",
|
cls := "clas-index",
|
||||||
div(cls := "box__top")(
|
div(cls := "box__top")(
|
||||||
h1("Lichess Classes"),
|
h1(trans.clas.lichessClasses()),
|
||||||
a(
|
a(
|
||||||
href := routes.Clas.form,
|
href := routes.Clas.form,
|
||||||
cls := "new button button-empty",
|
cls := "new button button-empty",
|
||||||
|
|
|
@ -1160,7 +1160,13 @@ val `pasteYourPgnTextHereUpToNbGames` = new Translated("pasteYourPgnTextHereUpTo
|
||||||
|
|
||||||
object clas {
|
object clas {
|
||||||
val `lichessClasses` = new Translated("lichessClasses", Clas)
|
val `lichessClasses` = new Translated("lichessClasses", Clas)
|
||||||
val `class` = new Translated("class", Clas)
|
val `teachClassesOfChessStudents` = new Translated("teachClassesOfChessStudents", Clas)
|
||||||
|
val `features` = new Translated("features", Clas)
|
||||||
|
val `quicklyGenerateSafeUsernames` = new Translated("quicklyGenerateSafeUsernames", Clas)
|
||||||
|
val `trackStudentProgress` = new Translated("trackStudentProgress", Clas)
|
||||||
|
val `messageAllStudents` = new Translated("messageAllStudents", Clas)
|
||||||
|
val `freeForAllForever` = new Translated("freeForAllForever", Clas)
|
||||||
|
val `applyToBeLichessTeacher` = new Translated("applyToBeLichessTeacher", Clas)
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,8 +1,11 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<resources>
|
<resources>
|
||||||
<string name="lichessClasses">Lichess Classes</string>
|
<string name="lichessClasses">Lichess Classes</string>
|
||||||
<plurals name="class">
|
<string name="teachClassesOfChessStudents">Teach classes of chess students with the Lichess Classes tool suite.</string>
|
||||||
<item quantity="one">Class</item>
|
<string name="features">Features</string>
|
||||||
<item quantity="other">Classes</item>
|
<string name="quicklyGenerateSafeUsernames">Quicly generate safe usernames and passwords for students</string>
|
||||||
</plurals>
|
<string name="trackStudentProgress">Track student progress in games and puzzles</string>
|
||||||
|
<string name="messageAllStudents">Message all students about new class material</string>
|
||||||
|
<string name="freeForAllForever">100% free for all, forever, with no ads or trackers</string>
|
||||||
|
<string name="applyToBeLichessTeacher">Apply to be a Lichess Teacher</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
|
Loading…
Reference in a new issue