Translate to German

This commit is contained in:
Leon Georgi 2019-06-09 14:48:56 +02:00
parent 3187f472fc
commit f5b937a293
Signed by: leon
GPG key ID: D97C549071D39393
15 changed files with 185 additions and 180 deletions

View file

@ -1,5 +1,10 @@
package de.kif.common.model package de.kif.common.model
enum class Permission { enum class Permission(val germanInfo: String) {
USER, SCHEDULE, WORK_GROUP, ROOM, POST, ADMIN USER("Nutzer"),
SCHEDULE("Scheduling"),
WORK_GROUP("Arbeitskreise"),
ROOM("Räume"),
POST("Beiträge"),
ADMIN("Admin")
} }

View file

@ -34,11 +34,11 @@ fun initWorkGroupConstraints() {
} }
} }
addList.textView("Add only on day") { addList.textView("Nur an Tag x") {
onClick { onClick {
constraints.appendChild(View.wrap(createHtmlView<HTMLDivElement>()) { constraints.appendChild(View.wrap(createHtmlView<HTMLDivElement>()) {
classList += "input-group" classList += "input-group"
html.appendChild(TextView("On day").apply { html.appendChild(TextView("An Tag").apply {
classList += "form-btn" classList += "form-btn"
onClick { this@wrap.html.remove() } onClick { this@wrap.html.remove() }
}.html) }.html)
@ -51,11 +51,11 @@ fun initWorkGroupConstraints() {
}.html) }.html)
} }
} }
addList.textView("Add not on day") { addList.textView("Nicht an Tag x") {
onClick { onClick {
constraints.appendChild(View.wrap(createHtmlView<HTMLDivElement>()) { constraints.appendChild(View.wrap(createHtmlView<HTMLDivElement>()) {
classList += "input-group" classList += "input-group"
html.appendChild(TextView("Not day").apply { html.appendChild(TextView("Nicht an Tag").apply {
classList += "form-btn" classList += "form-btn"
onClick { this@wrap.html.remove() } onClick { this@wrap.html.remove() }
}.html) }.html)
@ -68,11 +68,11 @@ fun initWorkGroupConstraints() {
}.html) }.html)
} }
} }
addList.textView("Add only before time") { addList.textView("Wenn an Tag x, dann vor Zeit t") {
onClick { onClick {
constraints.appendChild(View.wrap(createHtmlView<HTMLDivElement>()) { constraints.appendChild(View.wrap(createHtmlView<HTMLDivElement>()) {
classList += "input-group" classList += "input-group"
html.appendChild(TextView("Before time").apply { html.appendChild(TextView("Vor Zeit").apply {
classList += "form-btn" classList += "form-btn"
onClick { this@wrap.html.remove() } onClick { this@wrap.html.remove() }
}.html) }.html)
@ -89,11 +89,11 @@ fun initWorkGroupConstraints() {
}.html) }.html)
} }
} }
addList.textView("Add only after time") { addList.textView("Wenn an Tag x, dann ab Zeit t") {
onClick { onClick {
constraints.appendChild(View.wrap(createHtmlView<HTMLDivElement>()) { constraints.appendChild(View.wrap(createHtmlView<HTMLDivElement>()) {
classList += "input-group" classList += "input-group"
html.appendChild(TextView("After time").apply { html.appendChild(TextView("Nach Zeit").apply {
classList += "form-btn" classList += "form-btn"
onClick { this@wrap.html.remove() } onClick { this@wrap.html.remove() }
}.html) }.html)
@ -110,11 +110,11 @@ fun initWorkGroupConstraints() {
}.html) }.html)
} }
} }
addList.textView("Add not at same time") { addList.textView("Nicht zur selben Zeit wie AK x") {
onClick { onClick {
constraints.appendChild(View.wrap(createHtmlView<HTMLDivElement>()) { constraints.appendChild(View.wrap(createHtmlView<HTMLDivElement>()) {
classList += "input-group" classList += "input-group"
html.appendChild(TextView("Not with").apply { html.appendChild(TextView("Nicht parallel").apply {
classList += "form-btn" classList += "form-btn"
onClick { this@wrap.html.remove() } onClick { this@wrap.html.remove() }
}.html) }.html)
@ -138,11 +138,11 @@ fun initWorkGroupConstraints() {
}.html) }.html)
} }
} }
addList.textView("Add only after work group") { addList.textView("Nachdem AK x stattgefunden hat") {
onClick { onClick {
constraints.appendChild(View.wrap(createHtmlView<HTMLDivElement>()) { constraints.appendChild(View.wrap(createHtmlView<HTMLDivElement>()) {
classList += "input-group" classList += "input-group"
html.appendChild(TextView("After AK").apply { html.appendChild(TextView("Nach AK").apply {
classList += "form-btn" classList += "form-btn"
onClick { this@wrap.html.remove() } onClick { this@wrap.html.remove() }
}.html) }.html)

View file

@ -98,7 +98,7 @@
overflow: hidden; overflow: hidden;
&:hover::after { &:hover::after {
content: 'DELETE'; content: 'LÖSCHEN';
position: absolute; position: absolute;
top: 0; top: 0;
left: 0; left: 0;

View file

@ -34,26 +34,26 @@ fun Route.account() {
authenticateOrRedirect { user -> authenticateOrRedirect { user ->
respondMain { respondMain {
content { content {
h1 { +"Account" } h1 { +"Konto" }
div { div {
+"Welcome ${user.username}!" +"Hallo ${user.username}!"
br {} br {}
+"You have the following rights: ${user.permissions}" +"Du hast folgende Rechte: ${user.permissions.joinToString(", ") { it.germanInfo }}"
br {} br {}
a("/logout") { a("/logout") {
button(classes = "form-btn") { button(classes = "form-btn") {
+"Logout" +"Ausloggen"
} }
} }
} }
a(href = "/account/backup", classes = "form-btn") { a(href = "/account/backup", classes = "form-btn") {
+"Backup" +"Sicherung"
} }
if (user.checkPermission(Permission.ADMIN)) { if (user.checkPermission(Permission.ADMIN)) {
a(href = "/account/import", classes = "form-btn") { a(href = "/account/import", classes = "form-btn") {
+"Import wiki" +"Aus Wiki importieren"
} }
} }
} }
@ -65,31 +65,31 @@ fun Route.account() {
authenticateOrRedirect { user -> authenticateOrRedirect { user ->
respondMain { respondMain {
content { content {
h1 { +"Backup" } h1 { +"Sicherung" }
div("account-backup") { div("account-backup") {
if (user.checkPermission(Permission.ROOM)) { if (user.checkPermission(Permission.ROOM)) {
a("/account/backup/rooms.json", classes = "form-btn") { a("/account/backup/rooms.json", classes = "form-btn") {
attributes["download"] = "rooms-backup.json" attributes["download"] = "rooms-backup.json"
+"Create room backup" +"Räume sichern"
} }
} }
if (user.checkPermission(Permission.USER)) { if (user.checkPermission(Permission.USER)) {
a("/account/backup/users.json", classes = "form-btn") { a("/account/backup/users.json", classes = "form-btn") {
attributes["download"] = "users-backup.json" attributes["download"] = "users-backup.json"
+"Create user backup" +"Nutzer sichern"
} }
} }
if (user.checkPermission(Permission.POST)) { if (user.checkPermission(Permission.POST)) {
a("/account/backup/posts.json", classes = "form-btn") { a("/account/backup/posts.json", classes = "form-btn") {
attributes["download"] = "posts-backup.json" attributes["download"] = "posts-backup.json"
+"Create post backup" +"Beiträge sichern"
} }
} }
if (user.checkPermission(Permission.WORK_GROUP)) { if (user.checkPermission(Permission.WORK_GROUP)) {
a("/account/backup/work-groups.json", classes = "form-btn") { a("/account/backup/work-groups.json", classes = "form-btn") {
attributes["download"] = "work-groups-backup.json" attributes["download"] = "work-groups-backup.json"
+"Create work group backup" +"Arbeitskreise sichern"
} }
} }
if ( if (
@ -99,20 +99,20 @@ fun Route.account() {
) { ) {
a("/account/backup/schedules.json", classes = "form-btn") { a("/account/backup/schedules.json", classes = "form-btn") {
attributes["download"] = "schedules-backup.json" attributes["download"] = "schedules-backup.json"
+"Create schedule backup" +"Zeitplan sichern"
} }
} }
if (user.checkPermission(Permission.ADMIN)) { if (user.checkPermission(Permission.ADMIN)) {
a("/account/backup.json", classes = "form-btn") { a("/account/backup.json", classes = "form-btn") {
attributes["download"] = "backup.json" attributes["download"] = "backup.json"
+"Create backup" +"Alles sichern" // TODO: richtiger Text?
} }
} }
} }
if (user.checkPermission(Permission.ADMIN)) { if (user.checkPermission(Permission.ADMIN)) {
h1 { +"Restore" } h1 { +"Wiederherstellen" }
div("account-import") { div("account-import") {
form( form(
@ -123,7 +123,7 @@ fun Route.account() {
div("form-group") { div("form-group") {
label { label {
htmlFor = "backup" htmlFor = "backup"
+"Backup image" +"Aus Datei (JSON)"
} }
input( input(
name = "backup", name = "backup",
@ -148,14 +148,14 @@ fun Route.account() {
} }
label { label {
htmlFor = "reset" htmlFor = "reset"
+"Reset" +"Zurücksetzen" // TODO: unverständlich
} }
} }
} }
div("form-group") { div("form-group") {
button(type = ButtonType.submit, classes = "form-btn btn-primary") { button(type = ButtonType.submit, classes = "form-btn btn-primary") {
+"Import" +"Wiederherstellen"
} }
} }
} }
@ -173,11 +173,11 @@ fun Route.account() {
respondMain { respondMain {
content { content {
h1 { +"Import wiki" } h1 { +"Aus Wiki importieren" }
if (user.checkPermission(Permission.ADMIN)) { if (user.checkPermission(Permission.ADMIN)) {
div("account-import-wiki") { div("account-import-wiki") {
span { +"Import work group data from the kif wiki" } span { +"Arbeitskreise aus dem KIF-Wiki importieren" }
form(action = "/account/import", method = FormMethod.post) { form(action = "/account/import", method = FormMethod.post) {
for ((index, section) in wikiSections.withIndex()) { for ((index, section) in wikiSections.withIndex()) {
@ -194,12 +194,12 @@ fun Route.account() {
option { option {
selected = false selected = false
value = "-1" value = "-1"
+"Do not import" +"Nicht importieren"
} }
option { option {
selected = true selected = true
value = "null" value = "null"
+"None" +"Importieren"
} }
for (track in tracks) { for (track in tracks) {
option { option {
@ -227,7 +227,7 @@ fun Route.account() {
} }
label { label {
htmlFor = "skip-existing" htmlFor = "skip-existing"
+"Skip existing work groups" +"Existierende Arbeitskreise überspringen"
} }
} }
div("form-group form-switch") { div("form-group form-switch") {
@ -241,13 +241,13 @@ fun Route.account() {
} }
label { label {
htmlFor = "delete-existing" htmlFor = "delete-existing"
+"Delete existing work groups" +"Existierende Arbeitskreise löschen"
} }
} }
} }
button(type = ButtonType.submit, classes = "form-btn btn-primary") { button(type = ButtonType.submit, classes = "form-btn btn-primary") {
+"Import wiki" +"Importieren"
} }
} }
} }

View file

@ -29,12 +29,12 @@ fun Route.board() {
attributes["data-reference"] = referenceTime.toString() attributes["data-reference"] = referenceTime.toString()
div("board-header") { div("board-header") {
+"AKs" +"Arbeitskreise"
} }
div("board-card board-schedule-box") { div("board-card board-schedule-box") {
div("board-card-header") { div("board-card-header") {
+"Running" +"Aktuell"
} }
table { table {
for ((schedule, time) in scheduleList) { for ((schedule, time) in scheduleList) {
@ -45,7 +45,7 @@ fun Route.board() {
div("board-card board-schedule-box") { div("board-card board-schedule-box") {
div("board-card-header") { div("board-card-header") {
+"Upcoming" +"Später"
} }
table { table {
for ((schedule, time) in scheduleList) { for ((schedule, time) in scheduleList) {
@ -57,7 +57,7 @@ fun Route.board() {
div("board-posts") { div("board-posts") {
div("board-header") { div("board-header") {
+"News" +"Neuigkeiten"
} }
for (post in postList) { for (post in postList) {
createPost(post, false, "board-card board-post") createPost(post, false, "board-card board-post")
@ -66,7 +66,7 @@ fun Route.board() {
div("board-twitter") { div("board-twitter") {
div("board-header") { div("board-header") {
+"Tweets" +"Twitter"
} }
div("board-card") { div("board-card") {
unsafe { unsafe {

View file

@ -76,7 +76,7 @@ private fun DIV.renderCalendar(
div("calendar-header") { div("calendar-header") {
div("calendar-cell") { div("calendar-cell") {
span { span {
+"Room" +"Raum"
} }
} }
@ -241,19 +241,19 @@ fun Route.calendar() {
} }
div("header-right") { div("header-right") {
a("/calendar/$day/rtt", classes = "form-btn") { a("/calendar/$day/rtt", classes = "form-btn") {
+"Room to time" +"Vertikal"
} }
a("/calendar/$day/ttr", classes = "form-btn") { a("/calendar/$day/ttr", classes = "form-btn") {
+"Time to room" +"Horizontal"
} }
if (editable) { if (editable) {
button(classes = "form-btn") { button(classes = "form-btn") {
id = "calendar-check-constraints" id = "calendar-check-constraints"
+"Check constraints" +"Constraints überprüfen"
} }
button(classes = "form-btn") { button(classes = "form-btn") {
id = "calendar-edit-button" id = "calendar-edit-button"
+"Edit" +"Bearbeiten"
} }
} }
} }

View file

@ -40,20 +40,20 @@ fun Route.login() {
div("form-group") { div("form-group") {
label { label {
htmlFor = "username" htmlFor = "username"
+"Username" +"Name"
} }
input( input(
name = "username", name = "username",
classes = "form-control" classes = "form-control"
) { ) {
id = "username" id = "username"
placeholder = "Username" placeholder = "Name"
} }
} }
div("form-group") { div("form-group") {
label { label {
htmlFor = "password" htmlFor = "password"
+"Password" +"Passwort"
} }
input( input(
name = "password", name = "password",
@ -61,7 +61,7 @@ fun Route.login() {
type = InputType.password type = InputType.password
) { ) {
id = "password" id = "password"
placeholder = "Password" placeholder = "Passwort"
} }
} }
input( input(
@ -71,14 +71,14 @@ fun Route.login() {
value = call.parameters["redirect"] ?: "/" value = call.parameters["redirect"] ?: "/"
} }
button(type = ButtonType.submit, classes = "form-btn btn-primary") { button(type = ButtonType.submit, classes = "form-btn btn-primary") {
+"Login" +"Einloggen"
} }
} }
if ("onFailure" in call.parameters) { if ("onFailure" in call.parameters) {
br { } br { }
div("alert alert-danger") { div("alert alert-danger") {
+"Username or password incorrect!" +"Ungültige Kombination aus Name und Passwort"
} }
} }
} }

View file

@ -89,7 +89,7 @@ fun Route.overview() {
if (editable) { if (editable) {
div("overview-new") { div("overview-new") {
a("post/new", classes = "form-btn") { a("post/new", classes = "form-btn") {
+"New" +"Neuer Eintrag"
} }
} }
} }
@ -142,7 +142,7 @@ fun Route.overview() {
val editPost = PostRepository.get(postId) ?: return@get val editPost = PostRepository.get(postId) ?: return@get
respondMain { respondMain {
content { content {
h1 { +"Edit post" } h1 { +"Beitrag bearbeiten" }
div("post-edit-container") { div("post-edit-container") {
div("post-edit-left") { div("post-edit-left") {
form(method = FormMethod.post, encType = FormEncType.multipartFormData) { form(method = FormMethod.post, encType = FormEncType.multipartFormData) {
@ -164,7 +164,7 @@ fun Route.overview() {
div("form-group") { div("form-group") {
label { label {
htmlFor = "url" htmlFor = "url"
+"Url" +"URL"
} }
input( input(
name = "url", name = "url",
@ -178,7 +178,7 @@ fun Route.overview() {
label { label {
htmlFor = "image" htmlFor = "image"
+"Image" +"Bild"
} }
div("post-edit-image-box") { div("post-edit-image-box") {
div { div {
@ -197,7 +197,7 @@ fun Route.overview() {
type = InputType.file type = InputType.file
) { ) {
id = "image" id = "image"
value = "Upload image" value = "Bild hochladen"
accept = accept =
Configuration.General Configuration.General
.allowedUploadExtensionSet .allowedUploadExtensionSet
@ -218,7 +218,7 @@ fun Route.overview() {
} }
label { label {
htmlFor = "image-delete" htmlFor = "image-delete"
+"Delete image" +"Bild löschen"
} }
} }
} }
@ -236,7 +236,7 @@ fun Route.overview() {
} }
label { label {
htmlFor = "pinned" htmlFor = "pinned"
+"Pinned" +"Anpinnen"
} }
} }
div("form-group form-switch") { div("form-group form-switch") {
@ -250,7 +250,7 @@ fun Route.overview() {
} }
label { label {
htmlFor = "hide-on-projector" htmlFor = "hide-on-projector"
+"Hide on projector" +"Auf Beamer verstecken"
} }
} }
} }
@ -258,7 +258,7 @@ fun Route.overview() {
div("form-group") { div("form-group") {
label { label {
htmlFor = "content" htmlFor = "content"
+"Content" +"Text"
} }
textArea(rows = "10", classes = "form-control") { textArea(rows = "10", classes = "form-control") {
name = "content" name = "content"
@ -271,17 +271,17 @@ fun Route.overview() {
div("form-group") { div("form-group") {
a("/") { a("/") {
button(classes = "form-btn") { button(classes = "form-btn") {
+"Cancel" +"Abbrechen"
} }
} }
button(type = ButtonType.submit, classes = "form-btn btn-primary") { button(type = ButtonType.submit, classes = "form-btn btn-primary") {
+"Save" +"Speichern"
} }
} }
} }
a("/post/${editPost.id}/delete") { a("/post/${editPost.id}/delete") {
button(classes = "form-btn btn-danger") { button(classes = "form-btn btn-danger") {
+"Delete" +"Löschen"
} }
} }
} }
@ -368,7 +368,7 @@ fun Route.overview() {
authenticateOrRedirect(Permission.POST) { user -> authenticateOrRedirect(Permission.POST) { user ->
respondMain { respondMain {
content { content {
h1 { +"Create post" } h1 { +"Beitrag erstellen" }
div("post-edit-container") { div("post-edit-container") {
div("post-edit-left") { div("post-edit-left") {
form(method = FormMethod.post, encType = FormEncType.multipartFormData) { form(method = FormMethod.post, encType = FormEncType.multipartFormData) {
@ -389,7 +389,7 @@ fun Route.overview() {
div("form-group") { div("form-group") {
label { label {
htmlFor = "url" htmlFor = "url"
+"Url" +"URL"
} }
input( input(
name = "url", name = "url",
@ -403,7 +403,7 @@ fun Route.overview() {
label { label {
htmlFor = "image" htmlFor = "image"
+"Image" +"Bild"
} }
div("post-edit-image-box") { div("post-edit-image-box") {
div { div {
@ -417,7 +417,7 @@ fun Route.overview() {
type = InputType.file type = InputType.file
) { ) {
id = "image" id = "image"
value = "Upload image" value = "Bild hochladen"
accept = accept =
Configuration.General Configuration.General
.allowedUploadExtensionSet .allowedUploadExtensionSet
@ -441,7 +441,7 @@ fun Route.overview() {
} }
label { label {
htmlFor = "pinned" htmlFor = "pinned"
+"Pinned" +"Anpinnen"
} }
} }
div("form-group form-switch") { div("form-group form-switch") {
@ -455,7 +455,7 @@ fun Route.overview() {
} }
label { label {
htmlFor = "hide-on-projector" htmlFor = "hide-on-projector"
+"Hide on projector" +"Auf Beamer verstecken"
} }
} }
} }
@ -463,7 +463,7 @@ fun Route.overview() {
div("form-group") { div("form-group") {
label { label {
htmlFor = "content" htmlFor = "content"
+"Content" +"Text"
} }
textArea(rows = "10", classes = "form-control") { textArea(rows = "10", classes = "form-control") {
name = "content" name = "content"
@ -476,11 +476,11 @@ fun Route.overview() {
div("form-group") { div("form-group") {
a("/") { a("/") {
button(classes = "form-btn") { button(classes = "form-btn") {
+"Cancel" +"Abbrechen"
} }
} }
button(type = ButtonType.submit, classes = "form-btn btn-primary") { button(type = ButtonType.submit, classes = "form-btn btn-primary") {
+"Create" +"Erstellen"
} }
} }
} }

View file

@ -40,7 +40,7 @@ fun Route.room() {
action { action {
a("/room/new") { a("/room/new") {
button(classes = "form-btn btn-primary") { button(classes = "form-btn btn-primary") {
+"Add room" +"Raum hinzufügen"
} }
} }
} }
@ -50,13 +50,13 @@ fun Route.room() {
+"Name" +"Name"
} }
th { th {
+"Places" +"Kapazität"
} }
th { th {
+"Projector" +"Beamer"
} }
th(classes = "action") { th(classes = "action") {
+"Action" +"Aktion"
} }
} }
@ -110,7 +110,7 @@ fun Route.room() {
val editRoom = RoomRepository.get(roomId) ?: return@get val editRoom = RoomRepository.get(roomId) ?: return@get
respondMain { respondMain {
content { content {
h1 { +"Edit room" } h1 { +"Raum bearbeiten" }
form(method = FormMethod.post) { form(method = FormMethod.post) {
div("form-group") { div("form-group") {
label { label {
@ -129,7 +129,7 @@ fun Route.room() {
div("form-group") { div("form-group") {
label { label {
htmlFor = "places" htmlFor = "places"
+"Places" +"Kapazität"
} }
input( input(
name = "places", name = "places",
@ -137,7 +137,7 @@ fun Route.room() {
type = InputType.number type = InputType.number
) { ) {
id = "places" id = "places"
placeholder = "Places" placeholder = "Kapazität"
value = editRoom.places.toString() value = editRoom.places.toString()
min = "0" min = "0"
@ -157,7 +157,7 @@ fun Route.room() {
} }
label { label {
htmlFor = "projector" htmlFor = "projector"
+"Projector" +"Beamer"
} }
} }
@ -202,7 +202,7 @@ fun Route.room() {
} }
label { label {
htmlFor = "blackboard" htmlFor = "blackboard"
+"Blackboard" +"Tafel"
} }
} }
@ -217,7 +217,7 @@ fun Route.room() {
} }
label { label {
htmlFor = "accessible" htmlFor = "accessible"
+"Accessible" +"Barrierefreier Zugang"
} }
} }
} }
@ -225,17 +225,17 @@ fun Route.room() {
div("form-group") { div("form-group") {
a("/room") { a("/room") {
button(classes = "form-btn") { button(classes = "form-btn") {
+"Cancel" +"Abbrechen"
} }
} }
button(type = ButtonType.submit, classes = "form-btn btn-primary") { button(type = ButtonType.submit, classes = "form-btn btn-primary") {
+"Save" +"Speichern"
} }
} }
} }
a("/room/${editRoom.id}/delete") { a("/room/${editRoom.id}/delete") {
button(classes = "form-btn btn-danger") { button(classes = "form-btn btn-danger") {
+"Delete" +"Löschen"
} }
} }
} }
@ -269,7 +269,7 @@ fun Route.room() {
authenticateOrRedirect(Permission.ROOM) { user -> authenticateOrRedirect(Permission.ROOM) { user ->
respondMain { respondMain {
content { content {
h1 { +"Create room" } h1 { +"Raum erstellen" }
form(method = FormMethod.post) { form(method = FormMethod.post) {
div("form-group") { div("form-group") {
label { label {
@ -288,7 +288,7 @@ fun Route.room() {
div("form-group") { div("form-group") {
label { label {
htmlFor = "places" htmlFor = "places"
+"Places" +"Kapazität"
} }
input( input(
name = "places", name = "places",
@ -296,7 +296,7 @@ fun Route.room() {
type = InputType.number type = InputType.number
) { ) {
id = "places" id = "places"
placeholder = "Places" placeholder = "Kapazität"
value = "0" value = "0"
min = "0" min = "0"
@ -316,7 +316,7 @@ fun Route.room() {
} }
label { label {
htmlFor = "projector" htmlFor = "projector"
+"Projector" +"Beamer"
} }
} }
@ -361,7 +361,7 @@ fun Route.room() {
} }
label { label {
htmlFor = "blackboard" htmlFor = "blackboard"
+"Blackboard" +"Tafel"
} }
} }
@ -376,7 +376,7 @@ fun Route.room() {
} }
label { label {
htmlFor = "accessible" htmlFor = "accessible"
+"Accessible" +"Barrierefreier Zugang"
} }
} }
} }
@ -384,11 +384,11 @@ fun Route.room() {
div("form-group") { div("form-group") {
a("/room") { a("/room") {
button(classes = "form-btn") { button(classes = "form-btn") {
+"Cancel" +"Abbrechen"
} }
} }
button(type = ButtonType.submit, classes = "form-btn btn-primary") { button(type = ButtonType.submit, classes = "form-btn btn-primary") {
+"Create" +"Erstellen"
} }
} }
} }

View file

@ -70,7 +70,7 @@ fun DIV.colorPicker(color: Color?) {
} }
} }
label { label {
title = "Custom" title = "Andere Farbe"
htmlFor = "color-custom" htmlFor = "color-custom"
input( input(
@ -97,7 +97,7 @@ fun Route.track() {
action { action {
a("/track/new") { a("/track/new") {
button(classes = "form-btn btn-primary") { button(classes = "form-btn btn-primary") {
+"Add track" +"Track hinzufügen"
} }
} }
} }
@ -107,10 +107,10 @@ fun Route.track() {
+"Name" +"Name"
} }
th { th {
+"Color" +"Farbe"
} }
th(classes = "action") { th(classes = "action") {
+"Action" +"Aktion"
} }
} }
@ -147,7 +147,7 @@ fun Route.track() {
val editTrack = TrackRepository.get(trackId) ?: return@get val editTrack = TrackRepository.get(trackId) ?: return@get
respondMain { respondMain {
content { content {
h1 { +"Edit track" } h1 { +"Track bearbeiten" }
form(method = FormMethod.post) { form(method = FormMethod.post) {
div("form-group") { div("form-group") {
label { label {
@ -174,13 +174,13 @@ fun Route.track() {
} }
} }
button(type = ButtonType.submit, classes = "form-btn btn-primary") { button(type = ButtonType.submit, classes = "form-btn btn-primary") {
+"Save" +"Speichern"
} }
} }
} }
a("/track/${editTrack.id}/delete") { a("/track/${editTrack.id}/delete") {
button(classes = "form-btn btn-danger") { button(classes = "form-btn btn-danger") {
+"Delete" +"Löschen"
} }
} }
} }
@ -212,7 +212,7 @@ fun Route.track() {
authenticateOrRedirect(Permission.WORK_GROUP) { user -> authenticateOrRedirect(Permission.WORK_GROUP) { user ->
respondMain { respondMain {
content { content {
h1 { +"Create track" } h1 { +"Track erstellen" }
form(method = FormMethod.post) { form(method = FormMethod.post) {
div("form-group") { div("form-group") {
label { label {
@ -234,11 +234,11 @@ fun Route.track() {
div("form-group") { div("form-group") {
a("/track") { a("/track") {
button(classes = "form-btn") { button(classes = "form-btn") {
+"Cancel" +"Abbrechen"
} }
} }
button(type = ButtonType.submit, classes = "form-btn btn-primary") { button(type = ButtonType.submit, classes = "form-btn btn-primary") {
+"Create" +"Erstellen"
} }
} }
} }

View file

@ -40,20 +40,20 @@ fun Route.user() {
action { action {
a("/user/new") { a("/user/new") {
button(classes = "form-btn btn-primary") { button(classes = "form-btn btn-primary") {
+"Add user" +"Nutzer hinzufügen"
} }
} }
} }
header { header {
th { th {
+"Username" +"Name"
} }
th { th {
+"Permissions" +"Rechte"
} }
th(classes = "action") { th(classes = "action") {
+"Action" +"Aktion"
} }
} }
@ -89,26 +89,26 @@ fun Route.user() {
val editUser = UserRepository.get(userId) ?: return@get val editUser = UserRepository.get(userId) ?: return@get
respondMain { respondMain {
content { content {
h1 { +"Edit user" } h1 { +"Nutzer bearbeiten" }
form(method = FormMethod.post) { form(method = FormMethod.post) {
div("form-group") { div("form-group") {
label { label {
htmlFor = "username" htmlFor = "username"
+"Username" +"Name"
} }
input( input(
name = "username", name = "username",
classes = "form-control" classes = "form-control"
) { ) {
id = "username" id = "username"
placeholder = "Username" placeholder = "Name"
value = editUser.username value = editUser.username
} }
} }
div("form-switch-group") { div("form-switch-group") {
for (permission in Permission.values()) { for (permission in Permission.values()) {
val name = permission.toString().toLowerCase() val name = permission.germanInfo.toLowerCase()
div("form-group form-switch") { div("form-group form-switch") {
input( input(
name = "permission-$name", name = "permission-$name",
@ -133,17 +133,17 @@ fun Route.user() {
div("form-group") { div("form-group") {
a("/user") { a("/user") {
button(classes = "form-btn") { button(classes = "form-btn") {
+"Cancel" +"Abbrechen"
} }
} }
button(type = ButtonType.submit, classes = "form-btn btn-primary") { button(type = ButtonType.submit, classes = "form-btn btn-primary") {
+"Save" +"Speichern"
} }
} }
} }
a("/user/${editUser.id}/delete") { a("/user/${editUser.id}/delete") {
button(classes = "form-btn btn-danger") { button(classes = "form-btn btn-danger") {
+"Delete" +"Löschen"
} }
} }
} }
@ -178,26 +178,26 @@ fun Route.user() {
authenticateOrRedirect(Permission.USER) { user -> authenticateOrRedirect(Permission.USER) { user ->
respondMain { respondMain {
content { content {
h1 { +"Create user" } h1 { +"Nutzer erstellen" }
form(method = FormMethod.post) { form(method = FormMethod.post) {
div("form-group") { div("form-group") {
label { label {
htmlFor = "username" htmlFor = "username"
+"Username" +"Name"
} }
input( input(
name = "username", name = "username",
classes = "form-control" classes = "form-control"
) { ) {
id = "username" id = "username"
placeholder = "Username" placeholder = "Name"
value = "" value = ""
} }
} }
div("form-group") { div("form-group") {
label { label {
htmlFor = "password" htmlFor = "password"
+"Password" +"Passwort"
} }
input( input(
name = "password", name = "password",
@ -205,14 +205,14 @@ fun Route.user() {
type = InputType.password type = InputType.password
) { ) {
id = "password" id = "password"
placeholder = "Password" placeholder = "Passwort"
value = "" value = ""
} }
} }
div("form-switch-group") { div("form-switch-group") {
for (permission in Permission.values()) { for (permission in Permission.values()) {
val name = permission.toString().toLowerCase() val name = permission.germanInfo.toLowerCase()
div("form-group form-switch") { div("form-group form-switch") {
input( input(
name = "permission-$name", name = "permission-$name",
@ -237,11 +237,11 @@ fun Route.user() {
div("form-group") { div("form-group") {
a("/user") { a("/user") {
button(classes = "form-btn") { button(classes = "form-btn") {
+"Cancel" +"Abbrechen"
} }
} }
button(type = ButtonType.submit, classes = "form-btn btn-primary") { button(type = ButtonType.submit, classes = "form-btn btn-primary") {
+"Create" +"Erstellen"
} }
} }
} }

View file

@ -35,12 +35,12 @@ fun Route.workGroup() {
action { action {
a("/tracks") { a("/tracks") {
button(classes = "form-btn") { button(classes = "form-btn") {
+"Edit tracks" +"Tracks bearbeiten"
} }
} }
a("/workgroup/new") { a("/workgroup/new") {
button(classes = "form-btn btn-primary") { button(classes = "form-btn btn-primary") {
+"Add work group" +"Arbeitskreis hinzufügen"
} }
} }
} }
@ -50,25 +50,25 @@ fun Route.workGroup() {
+"Name" +"Name"
} }
th { th {
+"Length" +"Dauer"
} }
th { th {
+"Interested" +"Interessierte"
} }
th { th {
+"Track" +"Track"
} }
th { th {
+"Projector" +"Beamer"
} }
th { th {
+"Resolution" +"Resolution"
} }
th { th {
+"Language" +"Sprache"
} }
th(classes = "action") { th(classes = "action") {
+"Action" +"Aktion"
} }
} }
@ -158,7 +158,7 @@ fun Route.workGroup() {
respondMain { respondMain {
content { content {
h1 { +"Edit work group" } h1 { +"Arbeitskreis bearbeiten" }
form(method = FormMethod.post) { form(method = FormMethod.post) {
div("form-group") { div("form-group") {
label { label {
@ -177,7 +177,7 @@ fun Route.workGroup() {
div("form-group") { div("form-group") {
label { label {
htmlFor = "description" htmlFor = "description"
+"Description" +"Beschreibung"
} }
textArea(rows = "10", classes = "form-control") { textArea(rows = "10", classes = "form-control") {
name = "description" name = "description"
@ -189,7 +189,7 @@ fun Route.workGroup() {
div("form-group") { div("form-group") {
label { label {
htmlFor = "interested" htmlFor = "interested"
+"Interested" +"Interessierte"
} }
input( input(
name = "interested", name = "interested",
@ -230,7 +230,7 @@ fun Route.workGroup() {
div("form-group") { div("form-group") {
label { label {
htmlFor = "length" htmlFor = "length"
+"Length" +"Dauer in Minuten"
} }
input( input(
name = "length", name = "length",
@ -248,7 +248,7 @@ fun Route.workGroup() {
div("form-group") { div("form-group") {
label { label {
htmlFor = "language" htmlFor = "language"
+"Language" +"Sprache"
} }
select( select(
classes = "form-control" classes = "form-control"
@ -270,14 +270,14 @@ fun Route.workGroup() {
label { label {
htmlFor = "leader" htmlFor = "leader"
+"Leader" +"Leiter"
} }
input( input(
name = "leader", name = "leader",
classes = "form-control" classes = "form-control"
) { ) {
id = "leader" id = "leader"
placeholder = "Leader" placeholder = "Leiter"
value = editWorkGroup.leader.joinToString(" $separator ") value = editWorkGroup.leader.joinToString(" $separator ")
} }
@ -295,7 +295,7 @@ fun Route.workGroup() {
} }
label { label {
htmlFor = "projector" htmlFor = "projector"
+"Projector" +"Beamer"
} }
} }
div("form-group form-switch") { div("form-group form-switch") {
@ -354,7 +354,7 @@ fun Route.workGroup() {
} }
label { label {
htmlFor = "blackboard" htmlFor = "blackboard"
+"Blackboard" +"Tafel"
} }
} }
@ -369,7 +369,7 @@ fun Route.workGroup() {
} }
label { label {
htmlFor = "accessible" htmlFor = "accessible"
+"Accessible" +"Barrierefreier Zugang"
} }
} }
} }
@ -389,7 +389,7 @@ fun Route.workGroup() {
when (constraint.type) { when (constraint.type) {
ConstraintType.OnlyOnDay -> { ConstraintType.OnlyOnDay -> {
span("form-btn") { span("form-btn") {
+"On day" +"An Tag"
} }
input( input(
name = "constraint-only-on-day-$index", name = "constraint-only-on-day-$index",
@ -404,7 +404,7 @@ fun Route.workGroup() {
} }
ConstraintType.NotOnDay -> { ConstraintType.NotOnDay -> {
span("form-btn") { span("form-btn") {
+"Not day" +"Nicht an Tag"
} }
input( input(
name = "constraint-not-on-day-$index", name = "constraint-not-on-day-$index",
@ -419,7 +419,7 @@ fun Route.workGroup() {
} }
ConstraintType.OnlyBeforeTime -> { ConstraintType.OnlyBeforeTime -> {
span("form-btn") { span("form-btn") {
+"Before time" +"Vor Zeit"
} }
input( input(
name = "constraint-only-before-time-day-$index", name = "constraint-only-before-time-day-$index",
@ -441,7 +441,7 @@ fun Route.workGroup() {
} }
ConstraintType.OnlyAfterTime -> { ConstraintType.OnlyAfterTime -> {
span("form-btn") { span("form-btn") {
+"After time" +"Nach Zeit"
} }
input( input(
name = "constraint-only-after-time-day-$index", name = "constraint-only-after-time-day-$index",
@ -463,7 +463,7 @@ fun Route.workGroup() {
} }
ConstraintType.NotAtSameTime -> { ConstraintType.NotAtSameTime -> {
span("form-btn") { span("form-btn") {
+"Not with" +"Nicht parallel"
} }
select( select(
classes = "form-control" classes = "form-control"
@ -479,7 +479,7 @@ fun Route.workGroup() {
} }
ConstraintType.OnlyAfterWorkGroup -> { ConstraintType.OnlyAfterWorkGroup -> {
span("form-btn") { span("form-btn") {
+"After AK" +"Nach AK"
} }
select( select(
classes = "form-control" classes = "form-control"
@ -502,17 +502,17 @@ fun Route.workGroup() {
div("form-group") { div("form-group") {
a("/workgroup") { a("/workgroup") {
button(classes = "form-btn") { button(classes = "form-btn") {
+"Cancel" +"Abbrechen"
} }
} }
button(type = ButtonType.submit, classes = "form-btn btn-primary") { button(type = ButtonType.submit, classes = "form-btn btn-primary") {
+"Save" +"Speichern"
} }
} }
} }
a("/workgroup/${editWorkGroup.id}/delete") { a("/workgroup/${editWorkGroup.id}/delete") {
button(classes = "form-btn btn-danger") { button(classes = "form-btn btn-danger") {
+"Delete" +"Löschen"
} }
} }
} }
@ -567,7 +567,7 @@ fun Route.workGroup() {
val tracks = TrackRepository.all() val tracks = TrackRepository.all()
respondMain { respondMain {
content { content {
h1 { +"Create work group" } h1 { +"Arbeitskreis erstellen" }
form(method = FormMethod.post) { form(method = FormMethod.post) {
div("form-group") { div("form-group") {
label { label {
@ -586,7 +586,7 @@ fun Route.workGroup() {
div("form-group") { div("form-group") {
label { label {
htmlFor = "description" htmlFor = "description"
+"Description" +"Beschreibung"
} }
textArea(rows = "10", classes = "form-control") { textArea(rows = "10", classes = "form-control") {
name = "description" name = "description"
@ -598,7 +598,7 @@ fun Route.workGroup() {
div("form-group") { div("form-group") {
label { label {
htmlFor = "interested" htmlFor = "interested"
+"Interested" +"Interessierte"
} }
input( input(
name = "interested", name = "interested",
@ -638,7 +638,7 @@ fun Route.workGroup() {
div("form-group") { div("form-group") {
label { label {
htmlFor = "length" htmlFor = "length"
+"Length" +"Dauer"
} }
input( input(
name = "length", name = "length",
@ -656,7 +656,7 @@ fun Route.workGroup() {
div("form-group") { div("form-group") {
label { label {
htmlFor = "language" htmlFor = "language"
+"Language" +"Sprache"
} }
select( select(
classes = "form-control" classes = "form-control"
@ -678,14 +678,14 @@ fun Route.workGroup() {
label { label {
htmlFor = "leader" htmlFor = "leader"
+"Leader" +"Leiter"
} }
input( input(
name = "leader", name = "leader",
classes = "form-control" classes = "form-control"
) { ) {
id = "leader" id = "leader"
placeholder = "Leader" placeholder = "Leiter"
value = "" value = ""
} }
@ -704,7 +704,7 @@ fun Route.workGroup() {
} }
label { label {
htmlFor = "projector" htmlFor = "projector"
+"Projector" +"Beamer"
} }
} }
div("form-group form-switch") { div("form-group form-switch") {
@ -763,7 +763,7 @@ fun Route.workGroup() {
} }
label { label {
htmlFor = "blackboard" htmlFor = "blackboard"
+"Blackboard" +"Tafel"
} }
} }
@ -778,7 +778,7 @@ fun Route.workGroup() {
} }
label { label {
htmlFor = "accessible" htmlFor = "accessible"
+"Accessible" +"Barrierefreier Zugang"
} }
} }
} }
@ -798,11 +798,11 @@ fun Route.workGroup() {
div("form-group") { div("form-group") {
a("/workgroup") { a("/workgroup") {
button(classes = "form-btn") { button(classes = "form-btn") {
+"Cancel" +"Abbrechen"
} }
} }
button(type = ButtonType.submit, classes = "form-btn btn-primary") { button(type = ButtonType.submit, classes = "form-btn btn-primary") {
+"Create" +"Erstellen"
} }
} }
} }

View file

@ -81,10 +81,10 @@ class MainTemplate(
div("footer-credit") { div("footer-credit") {
} }
div("footer-theme") { div("footer-theme") {
for ((it, name) in Theme.displayThemes) { for ((it, text) in Theme.displayThemes) {
a("?theme=${it.name}", classes = if (theme == it) "selected" else "") { a("?theme=${it.name}", classes = if (theme == it) "selected" else "") {
id = "theme-$name" id = "theme-${it.name.toLowerCase()}"
+name.capitalize() +text.capitalize()
} }
} }
} }
@ -95,16 +95,16 @@ class MainTemplate(
} }
} }
enum class Theme(val display: Boolean, val dark: Boolean, val primaryColor: String) { enum class Theme(val text: String, val display: Boolean, val dark: Boolean, val primaryColor: String) {
LIGHT(true, false, "#B11D33"), LIGHT("Hell",true, false, "#B11D33"),
DARK(true, true, "#ef5350"), DARK("Dunkel",true, true, "#ef5350"),
PRINCESS(true, false, "#B11D33"), PRINCESS("Barbie",true, false, "#B11D33"),
BRETT(false, false, "#B11D33"); BRETT("Brett",false, false, "#B11D33");
companion object { companion object {
private val lookup = values().toList().associateBy { it.name } private val lookup = values().toList().associateBy { it.name }
val displayThemes = values().filter { it.display }.map { it to it.name.toLowerCase() } val displayThemes = values().filter { it.display }.map { it to it.text.toLowerCase() }
fun lookup(name: String?): Theme { fun lookup(name: String?): Theme {
return lookup[(name ?: return LIGHT).toUpperCase()] ?: LIGHT return lookup[(name ?: return LIGHT).toUpperCase()] ?: LIGHT

View file

@ -17,10 +17,10 @@ class MenuTemplate(
div("container") { div("container") {
div("menu-left") { div("menu-left") {
a("/", classes = if (tab == null) "active" else null) { a("/", classes = if (tab == null) "active" else null) {
+"News" +"Neuigkeiten"
} }
a("/calendar", classes = if (tab == Tab.CALENDAR) "active" else null) { a("/calendar", classes = if (tab == Tab.CALENDAR) "active" else null) {
+"Calendar" +"Zeitplan"
} }
} }
div("menu-right") { div("menu-right") {
@ -31,22 +31,22 @@ class MenuTemplate(
div("menu-content") { div("menu-content") {
if (user == null) { if (user == null) {
a("/account", classes = if (tab == Tab.LOGIN) "active" else null) { a("/account", classes = if (tab == Tab.LOGIN) "active" else null) {
+"Login" +"Einloggen"
} }
} else { } else {
if (user.checkPermission(Permission.WORK_GROUP)) { if (user.checkPermission(Permission.WORK_GROUP)) {
a("/workgroups", classes = if (tab == Tab.WORK_GROUP) "active" else null) { a("/workgroups", classes = if (tab == Tab.WORK_GROUP) "active" else null) {
+"Work groups" +"Arbeitskreise"
} }
} }
if (user.checkPermission(Permission.ROOM)) { if (user.checkPermission(Permission.ROOM)) {
a("/rooms", classes = if (tab == Tab.ROOM) "active" else null) { a("/rooms", classes = if (tab == Tab.ROOM) "active" else null) {
+"Rooms" +"Räume"
} }
} }
if (user.checkPermission(Permission.USER)) { if (user.checkPermission(Permission.USER)) {
a("/users", classes = if (tab == Tab.USER) "active" else null) { a("/users", classes = if (tab == Tab.USER) "active" else null) {
+"Users" +"Nutzer"
} }
} }
a("/account", classes = if (tab == Tab.ACCOUNT) "active" else null) { a("/account", classes = if (tab == Tab.ACCOUNT) "active" else null) {

View file

@ -18,7 +18,7 @@ class TableTemplate(private val classes: String = "") : Template<FlowContent> {
form(classes = "form-group table-layout-search") { form(classes = "form-group table-layout-search") {
div("input-group") { div("input-group") {
input(InputType.search, name = "search", classes = "form-control") { input(InputType.search, name = "search", classes = "form-control") {
placeholder = "Search" placeholder = "Suchen"
value = searchValue value = searchValue
} }
button(type = ButtonType.submit, classes = "form-btn btn-search") { button(type = ButtonType.submit, classes = "form-btn btn-search") {