From f5b937a293bc481e399f8de3294db96be31cd5ba Mon Sep 17 00:00:00 2001 From: Leon Georgi Date: Sun, 9 Jun 2019 14:48:56 +0200 Subject: [PATCH] Translate to German --- .../kotlin/de/kif/common/model/Permission.kt | 9 ++- .../frontend/views/WorkGroupConstraints.kt | 24 +++--- .../style/components/_table-layout.scss | 2 +- .../kotlin/de/kif/backend/route/Account.kt | 48 ++++++------ .../kotlin/de/kif/backend/route/Board.kt | 10 +-- .../kotlin/de/kif/backend/route/Calendar.kt | 10 +-- .../kotlin/de/kif/backend/route/Login.kt | 12 +-- .../kotlin/de/kif/backend/route/News.kt | 42 +++++----- .../kotlin/de/kif/backend/route/Room.kt | 42 +++++----- .../kotlin/de/kif/backend/route/Track.kt | 20 ++--- .../kotlin/de/kif/backend/route/User.kt | 38 +++++----- .../kotlin/de/kif/backend/route/WorkGroup.kt | 76 +++++++++---------- .../de/kif/backend/view/MainTemplate.kt | 18 ++--- .../de/kif/backend/view/MenuTemplate.kt | 12 +-- .../de/kif/backend/view/TableTemplate.kt | 2 +- 15 files changed, 185 insertions(+), 180 deletions(-) diff --git a/src/commonMain/kotlin/de/kif/common/model/Permission.kt b/src/commonMain/kotlin/de/kif/common/model/Permission.kt index 593bde2..0959344 100644 --- a/src/commonMain/kotlin/de/kif/common/model/Permission.kt +++ b/src/commonMain/kotlin/de/kif/common/model/Permission.kt @@ -1,5 +1,10 @@ package de.kif.common.model -enum class Permission { - USER, SCHEDULE, WORK_GROUP, ROOM, POST, ADMIN +enum class Permission(val germanInfo: String) { + USER("Nutzer"), + SCHEDULE("Scheduling"), + WORK_GROUP("Arbeitskreise"), + ROOM("Räume"), + POST("Beiträge"), + ADMIN("Admin") } diff --git a/src/jsMain/kotlin/de/kif/frontend/views/WorkGroupConstraints.kt b/src/jsMain/kotlin/de/kif/frontend/views/WorkGroupConstraints.kt index 23342cb..2661fba 100644 --- a/src/jsMain/kotlin/de/kif/frontend/views/WorkGroupConstraints.kt +++ b/src/jsMain/kotlin/de/kif/frontend/views/WorkGroupConstraints.kt @@ -34,11 +34,11 @@ fun initWorkGroupConstraints() { } } - addList.textView("Add only on day") { + addList.textView("Nur an Tag x") { onClick { constraints.appendChild(View.wrap(createHtmlView()) { classList += "input-group" - html.appendChild(TextView("On day").apply { + html.appendChild(TextView("An Tag").apply { classList += "form-btn" onClick { this@wrap.html.remove() } }.html) @@ -51,11 +51,11 @@ fun initWorkGroupConstraints() { }.html) } } - addList.textView("Add not on day") { + addList.textView("Nicht an Tag x") { onClick { constraints.appendChild(View.wrap(createHtmlView()) { classList += "input-group" - html.appendChild(TextView("Not day").apply { + html.appendChild(TextView("Nicht an Tag").apply { classList += "form-btn" onClick { this@wrap.html.remove() } }.html) @@ -68,11 +68,11 @@ fun initWorkGroupConstraints() { }.html) } } - addList.textView("Add only before time") { + addList.textView("Wenn an Tag x, dann vor Zeit t") { onClick { constraints.appendChild(View.wrap(createHtmlView()) { classList += "input-group" - html.appendChild(TextView("Before time").apply { + html.appendChild(TextView("Vor Zeit").apply { classList += "form-btn" onClick { this@wrap.html.remove() } }.html) @@ -89,11 +89,11 @@ fun initWorkGroupConstraints() { }.html) } } - addList.textView("Add only after time") { + addList.textView("Wenn an Tag x, dann ab Zeit t") { onClick { constraints.appendChild(View.wrap(createHtmlView()) { classList += "input-group" - html.appendChild(TextView("After time").apply { + html.appendChild(TextView("Nach Zeit").apply { classList += "form-btn" onClick { this@wrap.html.remove() } }.html) @@ -110,11 +110,11 @@ fun initWorkGroupConstraints() { }.html) } } - addList.textView("Add not at same time") { + addList.textView("Nicht zur selben Zeit wie AK x") { onClick { constraints.appendChild(View.wrap(createHtmlView()) { classList += "input-group" - html.appendChild(TextView("Not with").apply { + html.appendChild(TextView("Nicht parallel").apply { classList += "form-btn" onClick { this@wrap.html.remove() } }.html) @@ -138,11 +138,11 @@ fun initWorkGroupConstraints() { }.html) } } - addList.textView("Add only after work group") { + addList.textView("Nachdem AK x stattgefunden hat") { onClick { constraints.appendChild(View.wrap(createHtmlView()) { classList += "input-group" - html.appendChild(TextView("After AK").apply { + html.appendChild(TextView("Nach AK").apply { classList += "form-btn" onClick { this@wrap.html.remove() } }.html) diff --git a/src/jsMain/resources/style/components/_table-layout.scss b/src/jsMain/resources/style/components/_table-layout.scss index d6e6d52..1755184 100644 --- a/src/jsMain/resources/style/components/_table-layout.scss +++ b/src/jsMain/resources/style/components/_table-layout.scss @@ -98,7 +98,7 @@ overflow: hidden; &:hover::after { - content: 'DELETE'; + content: 'LÖSCHEN'; position: absolute; top: 0; left: 0; diff --git a/src/jvmMain/kotlin/de/kif/backend/route/Account.kt b/src/jvmMain/kotlin/de/kif/backend/route/Account.kt index d44c97a..585d116 100644 --- a/src/jvmMain/kotlin/de/kif/backend/route/Account.kt +++ b/src/jvmMain/kotlin/de/kif/backend/route/Account.kt @@ -34,26 +34,26 @@ fun Route.account() { authenticateOrRedirect { user -> respondMain { content { - h1 { +"Account" } + h1 { +"Konto" } div { - +"Welcome ${user.username}!" + +"Hallo ${user.username}!" br {} - +"You have the following rights: ${user.permissions}" + +"Du hast folgende Rechte: ${user.permissions.joinToString(", ") { it.germanInfo }}" br {} a("/logout") { button(classes = "form-btn") { - +"Logout" + +"Ausloggen" } } } a(href = "/account/backup", classes = "form-btn") { - +"Backup" + +"Sicherung" } if (user.checkPermission(Permission.ADMIN)) { a(href = "/account/import", classes = "form-btn") { - +"Import wiki" + +"Aus Wiki importieren" } } } @@ -65,31 +65,31 @@ fun Route.account() { authenticateOrRedirect { user -> respondMain { content { - h1 { +"Backup" } + h1 { +"Sicherung" } div("account-backup") { if (user.checkPermission(Permission.ROOM)) { a("/account/backup/rooms.json", classes = "form-btn") { attributes["download"] = "rooms-backup.json" - +"Create room backup" + +"Räume sichern" } } if (user.checkPermission(Permission.USER)) { a("/account/backup/users.json", classes = "form-btn") { attributes["download"] = "users-backup.json" - +"Create user backup" + +"Nutzer sichern" } } if (user.checkPermission(Permission.POST)) { a("/account/backup/posts.json", classes = "form-btn") { attributes["download"] = "posts-backup.json" - +"Create post backup" + +"Beiträge sichern" } } if (user.checkPermission(Permission.WORK_GROUP)) { a("/account/backup/work-groups.json", classes = "form-btn") { attributes["download"] = "work-groups-backup.json" - +"Create work group backup" + +"Arbeitskreise sichern" } } if ( @@ -99,20 +99,20 @@ fun Route.account() { ) { a("/account/backup/schedules.json", classes = "form-btn") { attributes["download"] = "schedules-backup.json" - +"Create schedule backup" + +"Zeitplan sichern" } } if (user.checkPermission(Permission.ADMIN)) { a("/account/backup.json", classes = "form-btn") { attributes["download"] = "backup.json" - +"Create backup" + +"Alles sichern" // TODO: richtiger Text? } } } if (user.checkPermission(Permission.ADMIN)) { - h1 { +"Restore" } + h1 { +"Wiederherstellen" } div("account-import") { form( @@ -123,7 +123,7 @@ fun Route.account() { div("form-group") { label { htmlFor = "backup" - +"Backup image" + +"Aus Datei (JSON)" } input( name = "backup", @@ -148,14 +148,14 @@ fun Route.account() { } label { htmlFor = "reset" - +"Reset" + +"Zurücksetzen" // TODO: unverständlich } } } div("form-group") { button(type = ButtonType.submit, classes = "form-btn btn-primary") { - +"Import" + +"Wiederherstellen" } } } @@ -173,11 +173,11 @@ fun Route.account() { respondMain { content { - h1 { +"Import wiki" } + h1 { +"Aus Wiki importieren" } if (user.checkPermission(Permission.ADMIN)) { 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) { for ((index, section) in wikiSections.withIndex()) { @@ -194,12 +194,12 @@ fun Route.account() { option { selected = false value = "-1" - +"Do not import" + +"Nicht importieren" } option { selected = true value = "null" - +"None" + +"Importieren" } for (track in tracks) { option { @@ -227,7 +227,7 @@ fun Route.account() { } label { htmlFor = "skip-existing" - +"Skip existing work groups" + +"Existierende Arbeitskreise überspringen" } } div("form-group form-switch") { @@ -241,13 +241,13 @@ fun Route.account() { } label { htmlFor = "delete-existing" - +"Delete existing work groups" + +"Existierende Arbeitskreise löschen" } } } button(type = ButtonType.submit, classes = "form-btn btn-primary") { - +"Import wiki" + +"Importieren" } } } diff --git a/src/jvmMain/kotlin/de/kif/backend/route/Board.kt b/src/jvmMain/kotlin/de/kif/backend/route/Board.kt index d43f59a..2323162 100644 --- a/src/jvmMain/kotlin/de/kif/backend/route/Board.kt +++ b/src/jvmMain/kotlin/de/kif/backend/route/Board.kt @@ -29,12 +29,12 @@ fun Route.board() { attributes["data-reference"] = referenceTime.toString() div("board-header") { - +"AKs" + +"Arbeitskreise" } div("board-card board-schedule-box") { div("board-card-header") { - +"Running" + +"Aktuell" } table { for ((schedule, time) in scheduleList) { @@ -45,7 +45,7 @@ fun Route.board() { div("board-card board-schedule-box") { div("board-card-header") { - +"Upcoming" + +"Später" } table { for ((schedule, time) in scheduleList) { @@ -57,7 +57,7 @@ fun Route.board() { div("board-posts") { div("board-header") { - +"News" + +"Neuigkeiten" } for (post in postList) { createPost(post, false, "board-card board-post") @@ -66,7 +66,7 @@ fun Route.board() { div("board-twitter") { div("board-header") { - +"Tweets" + +"Twitter" } div("board-card") { unsafe { diff --git a/src/jvmMain/kotlin/de/kif/backend/route/Calendar.kt b/src/jvmMain/kotlin/de/kif/backend/route/Calendar.kt index bb6c86a..0297479 100644 --- a/src/jvmMain/kotlin/de/kif/backend/route/Calendar.kt +++ b/src/jvmMain/kotlin/de/kif/backend/route/Calendar.kt @@ -76,7 +76,7 @@ private fun DIV.renderCalendar( div("calendar-header") { div("calendar-cell") { span { - +"Room" + +"Raum" } } @@ -241,19 +241,19 @@ fun Route.calendar() { } div("header-right") { a("/calendar/$day/rtt", classes = "form-btn") { - +"Room to time" + +"Vertikal" } a("/calendar/$day/ttr", classes = "form-btn") { - +"Time to room" + +"Horizontal" } if (editable) { button(classes = "form-btn") { id = "calendar-check-constraints" - +"Check constraints" + +"Constraints überprüfen" } button(classes = "form-btn") { id = "calendar-edit-button" - +"Edit" + +"Bearbeiten" } } } diff --git a/src/jvmMain/kotlin/de/kif/backend/route/Login.kt b/src/jvmMain/kotlin/de/kif/backend/route/Login.kt index 8915cd5..20ed0ac 100644 --- a/src/jvmMain/kotlin/de/kif/backend/route/Login.kt +++ b/src/jvmMain/kotlin/de/kif/backend/route/Login.kt @@ -40,20 +40,20 @@ fun Route.login() { div("form-group") { label { htmlFor = "username" - +"Username" + +"Name" } input( name = "username", classes = "form-control" ) { id = "username" - placeholder = "Username" + placeholder = "Name" } } div("form-group") { label { htmlFor = "password" - +"Password" + +"Passwort" } input( name = "password", @@ -61,7 +61,7 @@ fun Route.login() { type = InputType.password ) { id = "password" - placeholder = "Password" + placeholder = "Passwort" } } input( @@ -71,14 +71,14 @@ fun Route.login() { value = call.parameters["redirect"] ?: "/" } button(type = ButtonType.submit, classes = "form-btn btn-primary") { - +"Login" + +"Einloggen" } } if ("onFailure" in call.parameters) { br { } div("alert alert-danger") { - +"Username or password incorrect!" + +"Ungültige Kombination aus Name und Passwort" } } } diff --git a/src/jvmMain/kotlin/de/kif/backend/route/News.kt b/src/jvmMain/kotlin/de/kif/backend/route/News.kt index daf4367..3ca3308 100644 --- a/src/jvmMain/kotlin/de/kif/backend/route/News.kt +++ b/src/jvmMain/kotlin/de/kif/backend/route/News.kt @@ -89,7 +89,7 @@ fun Route.overview() { if (editable) { div("overview-new") { a("post/new", classes = "form-btn") { - +"New" + +"Neuer Eintrag" } } } @@ -142,7 +142,7 @@ fun Route.overview() { val editPost = PostRepository.get(postId) ?: return@get respondMain { content { - h1 { +"Edit post" } + h1 { +"Beitrag bearbeiten" } div("post-edit-container") { div("post-edit-left") { form(method = FormMethod.post, encType = FormEncType.multipartFormData) { @@ -164,7 +164,7 @@ fun Route.overview() { div("form-group") { label { htmlFor = "url" - +"Url" + +"URL" } input( name = "url", @@ -178,7 +178,7 @@ fun Route.overview() { label { htmlFor = "image" - +"Image" + +"Bild" } div("post-edit-image-box") { div { @@ -197,7 +197,7 @@ fun Route.overview() { type = InputType.file ) { id = "image" - value = "Upload image" + value = "Bild hochladen" accept = Configuration.General .allowedUploadExtensionSet @@ -218,7 +218,7 @@ fun Route.overview() { } label { htmlFor = "image-delete" - +"Delete image" + +"Bild löschen" } } } @@ -236,7 +236,7 @@ fun Route.overview() { } label { htmlFor = "pinned" - +"Pinned" + +"Anpinnen" } } div("form-group form-switch") { @@ -250,7 +250,7 @@ fun Route.overview() { } label { htmlFor = "hide-on-projector" - +"Hide on projector" + +"Auf Beamer verstecken" } } } @@ -258,7 +258,7 @@ fun Route.overview() { div("form-group") { label { htmlFor = "content" - +"Content" + +"Text" } textArea(rows = "10", classes = "form-control") { name = "content" @@ -271,17 +271,17 @@ fun Route.overview() { div("form-group") { a("/") { button(classes = "form-btn") { - +"Cancel" + +"Abbrechen" } } button(type = ButtonType.submit, classes = "form-btn btn-primary") { - +"Save" + +"Speichern" } } } a("/post/${editPost.id}/delete") { button(classes = "form-btn btn-danger") { - +"Delete" + +"Löschen" } } } @@ -368,7 +368,7 @@ fun Route.overview() { authenticateOrRedirect(Permission.POST) { user -> respondMain { content { - h1 { +"Create post" } + h1 { +"Beitrag erstellen" } div("post-edit-container") { div("post-edit-left") { form(method = FormMethod.post, encType = FormEncType.multipartFormData) { @@ -389,7 +389,7 @@ fun Route.overview() { div("form-group") { label { htmlFor = "url" - +"Url" + +"URL" } input( name = "url", @@ -403,7 +403,7 @@ fun Route.overview() { label { htmlFor = "image" - +"Image" + +"Bild" } div("post-edit-image-box") { div { @@ -417,7 +417,7 @@ fun Route.overview() { type = InputType.file ) { id = "image" - value = "Upload image" + value = "Bild hochladen" accept = Configuration.General .allowedUploadExtensionSet @@ -441,7 +441,7 @@ fun Route.overview() { } label { htmlFor = "pinned" - +"Pinned" + +"Anpinnen" } } div("form-group form-switch") { @@ -455,7 +455,7 @@ fun Route.overview() { } label { htmlFor = "hide-on-projector" - +"Hide on projector" + +"Auf Beamer verstecken" } } } @@ -463,7 +463,7 @@ fun Route.overview() { div("form-group") { label { htmlFor = "content" - +"Content" + +"Text" } textArea(rows = "10", classes = "form-control") { name = "content" @@ -476,11 +476,11 @@ fun Route.overview() { div("form-group") { a("/") { button(classes = "form-btn") { - +"Cancel" + +"Abbrechen" } } button(type = ButtonType.submit, classes = "form-btn btn-primary") { - +"Create" + +"Erstellen" } } } diff --git a/src/jvmMain/kotlin/de/kif/backend/route/Room.kt b/src/jvmMain/kotlin/de/kif/backend/route/Room.kt index aa193a7..24d7740 100644 --- a/src/jvmMain/kotlin/de/kif/backend/route/Room.kt +++ b/src/jvmMain/kotlin/de/kif/backend/route/Room.kt @@ -40,7 +40,7 @@ fun Route.room() { action { a("/room/new") { button(classes = "form-btn btn-primary") { - +"Add room" + +"Raum hinzufügen" } } } @@ -50,13 +50,13 @@ fun Route.room() { +"Name" } th { - +"Places" + +"Kapazität" } th { - +"Projector" + +"Beamer" } th(classes = "action") { - +"Action" + +"Aktion" } } @@ -110,7 +110,7 @@ fun Route.room() { val editRoom = RoomRepository.get(roomId) ?: return@get respondMain { content { - h1 { +"Edit room" } + h1 { +"Raum bearbeiten" } form(method = FormMethod.post) { div("form-group") { label { @@ -129,7 +129,7 @@ fun Route.room() { div("form-group") { label { htmlFor = "places" - +"Places" + +"Kapazität" } input( name = "places", @@ -137,7 +137,7 @@ fun Route.room() { type = InputType.number ) { id = "places" - placeholder = "Places" + placeholder = "Kapazität" value = editRoom.places.toString() min = "0" @@ -157,7 +157,7 @@ fun Route.room() { } label { htmlFor = "projector" - +"Projector" + +"Beamer" } } @@ -202,7 +202,7 @@ fun Route.room() { } label { htmlFor = "blackboard" - +"Blackboard" + +"Tafel" } } @@ -217,7 +217,7 @@ fun Route.room() { } label { htmlFor = "accessible" - +"Accessible" + +"Barrierefreier Zugang" } } } @@ -225,17 +225,17 @@ fun Route.room() { div("form-group") { a("/room") { button(classes = "form-btn") { - +"Cancel" + +"Abbrechen" } } button(type = ButtonType.submit, classes = "form-btn btn-primary") { - +"Save" + +"Speichern" } } } a("/room/${editRoom.id}/delete") { button(classes = "form-btn btn-danger") { - +"Delete" + +"Löschen" } } } @@ -269,7 +269,7 @@ fun Route.room() { authenticateOrRedirect(Permission.ROOM) { user -> respondMain { content { - h1 { +"Create room" } + h1 { +"Raum erstellen" } form(method = FormMethod.post) { div("form-group") { label { @@ -288,7 +288,7 @@ fun Route.room() { div("form-group") { label { htmlFor = "places" - +"Places" + +"Kapazität" } input( name = "places", @@ -296,7 +296,7 @@ fun Route.room() { type = InputType.number ) { id = "places" - placeholder = "Places" + placeholder = "Kapazität" value = "0" min = "0" @@ -316,7 +316,7 @@ fun Route.room() { } label { htmlFor = "projector" - +"Projector" + +"Beamer" } } @@ -361,7 +361,7 @@ fun Route.room() { } label { htmlFor = "blackboard" - +"Blackboard" + +"Tafel" } } @@ -376,7 +376,7 @@ fun Route.room() { } label { htmlFor = "accessible" - +"Accessible" + +"Barrierefreier Zugang" } } } @@ -384,11 +384,11 @@ fun Route.room() { div("form-group") { a("/room") { button(classes = "form-btn") { - +"Cancel" + +"Abbrechen" } } button(type = ButtonType.submit, classes = "form-btn btn-primary") { - +"Create" + +"Erstellen" } } } diff --git a/src/jvmMain/kotlin/de/kif/backend/route/Track.kt b/src/jvmMain/kotlin/de/kif/backend/route/Track.kt index 0f05edb..9d8bb2d 100644 --- a/src/jvmMain/kotlin/de/kif/backend/route/Track.kt +++ b/src/jvmMain/kotlin/de/kif/backend/route/Track.kt @@ -70,7 +70,7 @@ fun DIV.colorPicker(color: Color?) { } } label { - title = "Custom" + title = "Andere Farbe" htmlFor = "color-custom" input( @@ -97,7 +97,7 @@ fun Route.track() { action { a("/track/new") { button(classes = "form-btn btn-primary") { - +"Add track" + +"Track hinzufügen" } } } @@ -107,10 +107,10 @@ fun Route.track() { +"Name" } th { - +"Color" + +"Farbe" } th(classes = "action") { - +"Action" + +"Aktion" } } @@ -147,7 +147,7 @@ fun Route.track() { val editTrack = TrackRepository.get(trackId) ?: return@get respondMain { content { - h1 { +"Edit track" } + h1 { +"Track bearbeiten" } form(method = FormMethod.post) { div("form-group") { label { @@ -174,13 +174,13 @@ fun Route.track() { } } button(type = ButtonType.submit, classes = "form-btn btn-primary") { - +"Save" + +"Speichern" } } } a("/track/${editTrack.id}/delete") { button(classes = "form-btn btn-danger") { - +"Delete" + +"Löschen" } } } @@ -212,7 +212,7 @@ fun Route.track() { authenticateOrRedirect(Permission.WORK_GROUP) { user -> respondMain { content { - h1 { +"Create track" } + h1 { +"Track erstellen" } form(method = FormMethod.post) { div("form-group") { label { @@ -234,11 +234,11 @@ fun Route.track() { div("form-group") { a("/track") { button(classes = "form-btn") { - +"Cancel" + +"Abbrechen" } } button(type = ButtonType.submit, classes = "form-btn btn-primary") { - +"Create" + +"Erstellen" } } } diff --git a/src/jvmMain/kotlin/de/kif/backend/route/User.kt b/src/jvmMain/kotlin/de/kif/backend/route/User.kt index eac0d6d..6f4a021 100644 --- a/src/jvmMain/kotlin/de/kif/backend/route/User.kt +++ b/src/jvmMain/kotlin/de/kif/backend/route/User.kt @@ -40,20 +40,20 @@ fun Route.user() { action { a("/user/new") { button(classes = "form-btn btn-primary") { - +"Add user" + +"Nutzer hinzufügen" } } } header { th { - +"Username" + +"Name" } th { - +"Permissions" + +"Rechte" } th(classes = "action") { - +"Action" + +"Aktion" } } @@ -89,26 +89,26 @@ fun Route.user() { val editUser = UserRepository.get(userId) ?: return@get respondMain { content { - h1 { +"Edit user" } + h1 { +"Nutzer bearbeiten" } form(method = FormMethod.post) { div("form-group") { label { htmlFor = "username" - +"Username" + +"Name" } input( name = "username", classes = "form-control" ) { id = "username" - placeholder = "Username" + placeholder = "Name" value = editUser.username } } div("form-switch-group") { for (permission in Permission.values()) { - val name = permission.toString().toLowerCase() + val name = permission.germanInfo.toLowerCase() div("form-group form-switch") { input( name = "permission-$name", @@ -133,17 +133,17 @@ fun Route.user() { div("form-group") { a("/user") { button(classes = "form-btn") { - +"Cancel" + +"Abbrechen" } } button(type = ButtonType.submit, classes = "form-btn btn-primary") { - +"Save" + +"Speichern" } } } a("/user/${editUser.id}/delete") { button(classes = "form-btn btn-danger") { - +"Delete" + +"Löschen" } } } @@ -178,26 +178,26 @@ fun Route.user() { authenticateOrRedirect(Permission.USER) { user -> respondMain { content { - h1 { +"Create user" } + h1 { +"Nutzer erstellen" } form(method = FormMethod.post) { div("form-group") { label { htmlFor = "username" - +"Username" + +"Name" } input( name = "username", classes = "form-control" ) { id = "username" - placeholder = "Username" + placeholder = "Name" value = "" } } div("form-group") { label { htmlFor = "password" - +"Password" + +"Passwort" } input( name = "password", @@ -205,14 +205,14 @@ fun Route.user() { type = InputType.password ) { id = "password" - placeholder = "Password" + placeholder = "Passwort" value = "" } } div("form-switch-group") { for (permission in Permission.values()) { - val name = permission.toString().toLowerCase() + val name = permission.germanInfo.toLowerCase() div("form-group form-switch") { input( name = "permission-$name", @@ -237,11 +237,11 @@ fun Route.user() { div("form-group") { a("/user") { button(classes = "form-btn") { - +"Cancel" + +"Abbrechen" } } button(type = ButtonType.submit, classes = "form-btn btn-primary") { - +"Create" + +"Erstellen" } } } diff --git a/src/jvmMain/kotlin/de/kif/backend/route/WorkGroup.kt b/src/jvmMain/kotlin/de/kif/backend/route/WorkGroup.kt index 8af9788..44da058 100644 --- a/src/jvmMain/kotlin/de/kif/backend/route/WorkGroup.kt +++ b/src/jvmMain/kotlin/de/kif/backend/route/WorkGroup.kt @@ -35,12 +35,12 @@ fun Route.workGroup() { action { a("/tracks") { button(classes = "form-btn") { - +"Edit tracks" + +"Tracks bearbeiten" } } a("/workgroup/new") { button(classes = "form-btn btn-primary") { - +"Add work group" + +"Arbeitskreis hinzufügen" } } } @@ -50,25 +50,25 @@ fun Route.workGroup() { +"Name" } th { - +"Length" + +"Dauer" } th { - +"Interested" + +"Interessierte" } th { +"Track" } th { - +"Projector" + +"Beamer" } th { +"Resolution" } th { - +"Language" + +"Sprache" } th(classes = "action") { - +"Action" + +"Aktion" } } @@ -158,7 +158,7 @@ fun Route.workGroup() { respondMain { content { - h1 { +"Edit work group" } + h1 { +"Arbeitskreis bearbeiten" } form(method = FormMethod.post) { div("form-group") { label { @@ -177,7 +177,7 @@ fun Route.workGroup() { div("form-group") { label { htmlFor = "description" - +"Description" + +"Beschreibung" } textArea(rows = "10", classes = "form-control") { name = "description" @@ -189,7 +189,7 @@ fun Route.workGroup() { div("form-group") { label { htmlFor = "interested" - +"Interested" + +"Interessierte" } input( name = "interested", @@ -230,7 +230,7 @@ fun Route.workGroup() { div("form-group") { label { htmlFor = "length" - +"Length" + +"Dauer in Minuten" } input( name = "length", @@ -248,7 +248,7 @@ fun Route.workGroup() { div("form-group") { label { htmlFor = "language" - +"Language" + +"Sprache" } select( classes = "form-control" @@ -270,14 +270,14 @@ fun Route.workGroup() { label { htmlFor = "leader" - +"Leader" + +"Leiter" } input( name = "leader", classes = "form-control" ) { id = "leader" - placeholder = "Leader" + placeholder = "Leiter" value = editWorkGroup.leader.joinToString(" $separator ") } @@ -295,7 +295,7 @@ fun Route.workGroup() { } label { htmlFor = "projector" - +"Projector" + +"Beamer" } } div("form-group form-switch") { @@ -354,7 +354,7 @@ fun Route.workGroup() { } label { htmlFor = "blackboard" - +"Blackboard" + +"Tafel" } } @@ -369,7 +369,7 @@ fun Route.workGroup() { } label { htmlFor = "accessible" - +"Accessible" + +"Barrierefreier Zugang" } } } @@ -389,7 +389,7 @@ fun Route.workGroup() { when (constraint.type) { ConstraintType.OnlyOnDay -> { span("form-btn") { - +"On day" + +"An Tag" } input( name = "constraint-only-on-day-$index", @@ -404,7 +404,7 @@ fun Route.workGroup() { } ConstraintType.NotOnDay -> { span("form-btn") { - +"Not day" + +"Nicht an Tag" } input( name = "constraint-not-on-day-$index", @@ -419,7 +419,7 @@ fun Route.workGroup() { } ConstraintType.OnlyBeforeTime -> { span("form-btn") { - +"Before time" + +"Vor Zeit" } input( name = "constraint-only-before-time-day-$index", @@ -441,7 +441,7 @@ fun Route.workGroup() { } ConstraintType.OnlyAfterTime -> { span("form-btn") { - +"After time" + +"Nach Zeit" } input( name = "constraint-only-after-time-day-$index", @@ -463,7 +463,7 @@ fun Route.workGroup() { } ConstraintType.NotAtSameTime -> { span("form-btn") { - +"Not with" + +"Nicht parallel" } select( classes = "form-control" @@ -479,7 +479,7 @@ fun Route.workGroup() { } ConstraintType.OnlyAfterWorkGroup -> { span("form-btn") { - +"After AK" + +"Nach AK" } select( classes = "form-control" @@ -502,17 +502,17 @@ fun Route.workGroup() { div("form-group") { a("/workgroup") { button(classes = "form-btn") { - +"Cancel" + +"Abbrechen" } } button(type = ButtonType.submit, classes = "form-btn btn-primary") { - +"Save" + +"Speichern" } } } a("/workgroup/${editWorkGroup.id}/delete") { button(classes = "form-btn btn-danger") { - +"Delete" + +"Löschen" } } } @@ -567,7 +567,7 @@ fun Route.workGroup() { val tracks = TrackRepository.all() respondMain { content { - h1 { +"Create work group" } + h1 { +"Arbeitskreis erstellen" } form(method = FormMethod.post) { div("form-group") { label { @@ -586,7 +586,7 @@ fun Route.workGroup() { div("form-group") { label { htmlFor = "description" - +"Description" + +"Beschreibung" } textArea(rows = "10", classes = "form-control") { name = "description" @@ -598,7 +598,7 @@ fun Route.workGroup() { div("form-group") { label { htmlFor = "interested" - +"Interested" + +"Interessierte" } input( name = "interested", @@ -638,7 +638,7 @@ fun Route.workGroup() { div("form-group") { label { htmlFor = "length" - +"Length" + +"Dauer" } input( name = "length", @@ -656,7 +656,7 @@ fun Route.workGroup() { div("form-group") { label { htmlFor = "language" - +"Language" + +"Sprache" } select( classes = "form-control" @@ -678,14 +678,14 @@ fun Route.workGroup() { label { htmlFor = "leader" - +"Leader" + +"Leiter" } input( name = "leader", classes = "form-control" ) { id = "leader" - placeholder = "Leader" + placeholder = "Leiter" value = "" } @@ -704,7 +704,7 @@ fun Route.workGroup() { } label { htmlFor = "projector" - +"Projector" + +"Beamer" } } div("form-group form-switch") { @@ -763,7 +763,7 @@ fun Route.workGroup() { } label { htmlFor = "blackboard" - +"Blackboard" + +"Tafel" } } @@ -778,7 +778,7 @@ fun Route.workGroup() { } label { htmlFor = "accessible" - +"Accessible" + +"Barrierefreier Zugang" } } } @@ -798,11 +798,11 @@ fun Route.workGroup() { div("form-group") { a("/workgroup") { button(classes = "form-btn") { - +"Cancel" + +"Abbrechen" } } button(type = ButtonType.submit, classes = "form-btn btn-primary") { - +"Create" + +"Erstellen" } } } diff --git a/src/jvmMain/kotlin/de/kif/backend/view/MainTemplate.kt b/src/jvmMain/kotlin/de/kif/backend/view/MainTemplate.kt index a0ce39c..2cde4c1 100644 --- a/src/jvmMain/kotlin/de/kif/backend/view/MainTemplate.kt +++ b/src/jvmMain/kotlin/de/kif/backend/view/MainTemplate.kt @@ -81,10 +81,10 @@ class MainTemplate( div("footer-credit") { } 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 "") { - id = "theme-$name" - +name.capitalize() + id = "theme-${it.name.toLowerCase()}" + +text.capitalize() } } } @@ -95,16 +95,16 @@ class MainTemplate( } } -enum class Theme(val display: Boolean, val dark: Boolean, val primaryColor: String) { - LIGHT(true, false, "#B11D33"), - DARK(true, true, "#ef5350"), - PRINCESS(true, false, "#B11D33"), - BRETT(false, false, "#B11D33"); +enum class Theme(val text: String, val display: Boolean, val dark: Boolean, val primaryColor: String) { + LIGHT("Hell",true, false, "#B11D33"), + DARK("Dunkel",true, true, "#ef5350"), + PRINCESS("Barbie",true, false, "#B11D33"), + BRETT("Brett",false, false, "#B11D33"); companion object { 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 { return lookup[(name ?: return LIGHT).toUpperCase()] ?: LIGHT diff --git a/src/jvmMain/kotlin/de/kif/backend/view/MenuTemplate.kt b/src/jvmMain/kotlin/de/kif/backend/view/MenuTemplate.kt index f92e660..80a8941 100644 --- a/src/jvmMain/kotlin/de/kif/backend/view/MenuTemplate.kt +++ b/src/jvmMain/kotlin/de/kif/backend/view/MenuTemplate.kt @@ -17,10 +17,10 @@ class MenuTemplate( div("container") { div("menu-left") { a("/", classes = if (tab == null) "active" else null) { - +"News" + +"Neuigkeiten" } a("/calendar", classes = if (tab == Tab.CALENDAR) "active" else null) { - +"Calendar" + +"Zeitplan" } } div("menu-right") { @@ -31,22 +31,22 @@ class MenuTemplate( div("menu-content") { if (user == null) { a("/account", classes = if (tab == Tab.LOGIN) "active" else null) { - +"Login" + +"Einloggen" } } else { if (user.checkPermission(Permission.WORK_GROUP)) { a("/workgroups", classes = if (tab == Tab.WORK_GROUP) "active" else null) { - +"Work groups" + +"Arbeitskreise" } } if (user.checkPermission(Permission.ROOM)) { a("/rooms", classes = if (tab == Tab.ROOM) "active" else null) { - +"Rooms" + +"Räume" } } if (user.checkPermission(Permission.USER)) { a("/users", classes = if (tab == Tab.USER) "active" else null) { - +"Users" + +"Nutzer" } } a("/account", classes = if (tab == Tab.ACCOUNT) "active" else null) { diff --git a/src/jvmMain/kotlin/de/kif/backend/view/TableTemplate.kt b/src/jvmMain/kotlin/de/kif/backend/view/TableTemplate.kt index 61f1b59..a26f659 100644 --- a/src/jvmMain/kotlin/de/kif/backend/view/TableTemplate.kt +++ b/src/jvmMain/kotlin/de/kif/backend/view/TableTemplate.kt @@ -18,7 +18,7 @@ class TableTemplate(private val classes: String = "") : Template { form(classes = "form-group table-layout-search") { div("input-group") { input(InputType.search, name = "search", classes = "form-control") { - placeholder = "Search" + placeholder = "Suchen" value = searchValue } button(type = ButtonType.submit, classes = "form-btn btn-search") {