Commit 0bd70889 authored by Rosanny Sihombing's avatar Rosanny Sihombing
Browse files

add German wordings

parent e4ba2b55
...@@ -493,7 +493,7 @@ module.exports = function (app, config, passport, i18n) { ...@@ -493,7 +493,7 @@ module.exports = function (app, config, passport, i18n) {
res.redirect('/login') res.redirect('/login')
} else { } else {
if (!req.body.name && !req.body.description) { if (!req.body.name && !req.body.description) {
res.flash('error', 'Please provide the required data') res.flash('error', 'Bitte geben Sie die benötigten Daten ein')
res.redirect('/account/newInformation') res.redirect('/account/newInformation')
} else { } else {
let projectName = req.body.name.toLowerCase().replace(/\s/g, '-') let projectName = req.body.name.toLowerCase().replace(/\s/g, '-')
...@@ -501,7 +501,7 @@ module.exports = function (app, config, passport, i18n) { ...@@ -501,7 +501,7 @@ module.exports = function (app, config, passport, i18n) {
let newInformation = new projectInformation(loggedInUser.getGitlabUserId(), null, projectName, projectDesc, null, null, null, false) let newInformation = new projectInformation(loggedInUser.getGitlabUserId(), null, projectName, projectDesc, null, null, null, false)
if (!req.files) { if (!req.files) {
res.flash('error', 'Please choose a project logo') res.flash('error', 'Bitte geben Sie ein Projektlogo an.')
res.redirect('/account/newInformation') res.redirect('/account/newInformation')
} else { } else {
let newLogoFile = req.files.logo let newLogoFile = req.files.logo
...@@ -517,9 +517,9 @@ module.exports = function (app, config, passport, i18n) { ...@@ -517,9 +517,9 @@ module.exports = function (app, config, passport, i18n) {
let result = data.data let result = data.data
if (data.error) { if (data.error) {
if(result.message.name == "has already been taken") { if(result.message.name == "has already been taken") {
res.flash("error", "Project name '"+newInformation.getName()+"' has already been taken, please choose another name.") res.flash("error", "Der Projektname '"+newInformation.getName()+"' ist bereits vergeben, bitte wählen Sie einen anderen Namen.")
} else { } else {
res.flash("error", "Something went wrong. Please try again.") res.flash("error", "Ein Fehler ist aufgetreten. Bitte versuchen Sie es erneut. ")
} }
res.redirect('/account/newInformation') res.redirect('/account/newInformation')
} else { } else {
...@@ -528,8 +528,8 @@ module.exports = function (app, config, passport, i18n) { ...@@ -528,8 +528,8 @@ module.exports = function (app, config, passport, i18n) {
newInformation.setSettingUrl(tpGitlabURL+result.namespace.path+'/'+result.name+'/-/edit/master/public/settings.js') newInformation.setSettingUrl(tpGitlabURL+result.namespace.path+'/'+result.name+'/-/edit/master/public/settings.js')
newInformation.setKontaktUrl(tpGitlabURL+result.namespace.path+'/'+result.name+'/-/edit/master/public/kontakt.html') newInformation.setKontaktUrl(tpGitlabURL+result.namespace.path+'/'+result.name+'/-/edit/master/public/kontakt.html')
res.flash("success", "Your website has been created, but not published yet. Please continue to Step 2 and Step 3 to have your new website published.") res.flash("success", "Ihre Webseite wurde erstellt, aber noch nicht veröffentlicht. Bitte fahren Sie mit Schritten 2 und 3 fort, um Ihre Webseite zu veröffentlichen.")
res.redirect('/account/updateInformation?id='+newInformation.getId()) res.redirect('/account/updateInformation?id='+newInformation.getId()+'&s=n')
} }
callback(null) callback(null)
}) })
...@@ -595,12 +595,16 @@ module.exports = function (app, config, passport, i18n) { ...@@ -595,12 +595,16 @@ module.exports = function (app, config, passport, i18n) {
res.redirect('/login') res.redirect('/login')
} else { } else {
if (!req.body.name && !req.body.description) { if (!req.body.name && !req.body.description) {
res.flash('error', 'Please provide the required data') res.flash('error', 'Bitte geben Sie die benötigten Daten ein')
res.redirect('/account/updateInformation') res.redirect('/account/updateInformation')
} else { } else {
let projectName = req.body.name.toLowerCase().replace(/\s/g, '-') let projectName = req.body.name.toLowerCase().replace(/\s/g, '-')
let projectDesc = req.body.description let projectDesc = req.body.description
let updatedInformation = new projectInformation(loggedInUser.getGitlabUserId(), req.query.id, projectName, projectDesc, null, null, null, req.body.isPublished) let isProjectPublished = true
if (req.body.isPublished == "false") {
isProjectPublished = false
}
let updatedInformation = new projectInformation(loggedInUser.getGitlabUserId(), req.query.id, projectName, projectDesc, null, null, null, isProjectPublished)
let newLogoFile let newLogoFile
async.waterfall([ async.waterfall([
...@@ -620,9 +624,9 @@ module.exports = function (app, config, passport, i18n) { ...@@ -620,9 +624,9 @@ module.exports = function (app, config, passport, i18n) {
let result = data.data let result = data.data
if (data.error) { if (data.error) {
if(result.message.name == "has already been taken") { if(result.message.name == "has already been taken") {
res.flash("error", "Project name has already been taken, please choose another name.") res.flash("error", "Der Projektname ist bereits vergeben, bitte wählen Sie einen anderen Namen.")
} else { } else {
res.flash("error", "Something went wrong. Please try again.") res.flash("error", "Ein Fehler ist aufgetreten. Bitte versuchen Sie es erneut. ")
} }
} else { } else {
updatedInformation.setLogo(result.avatar_url) updatedInformation.setLogo(result.avatar_url)
...@@ -658,7 +662,7 @@ module.exports = function (app, config, passport, i18n) { ...@@ -658,7 +662,7 @@ module.exports = function (app, config, passport, i18n) {
let projectName = req.body.projectName let projectName = req.body.projectName
let emailContent = "Guten Tag, \n\nhiermit beantrage Ich die Freischaltung einer Webseite auf dem Transferportal für folgendes Projekt: \n" let emailContent = "Guten Tag, \n\nhiermit beantrage Ich die Freischaltung einer Webseite auf dem Transferportal für folgendes Projekt: \n"
+projectName+"\n\nVielen Dank,\n"+loggedInUser.getFullName() +projectName+"\n\nVielen Dank,\n"+loggedInUser.getFullName()
let emailSubject = "M4_LAB New Website Publish Request" let emailSubject = "M4_LAB Anfrage zur Veröffentlichung einer neuen Webseite"
async.waterfall([ async.waterfall([
function(done) { function(done) {
mailer.options.to = supportAddress mailer.options.to = supportAddress
......
...@@ -41,45 +41,47 @@ html(lang="de") ...@@ -41,45 +41,47 @@ html(lang="de")
if flash.error if flash.error
div.alert.alert-danger.alert-dismissible.fade.show #{flash.error} div.alert.alert-danger.alert-dismissible.fade.show #{flash.error}
a(class="close", href="#", data-dismiss="alert", aria-label="close") × a(class="close", href="#", data-dismiss="alert", aria-label="close") ×
h3(class="pb-2") New Information h3(class="pb-2") Neue Projektinformation
div(class="mx-4") div(class="mx-4")
h4(class="pb-1") Step 1: Setup h4(class="pb-1") Schritt 1: Setup
p Please fill-in all fields p Bitte füllen Sie alle Felder aus
form(method="POST", encType="multipart/form-data") form(method="POST", encType="multipart/form-data")
div(class='form-group row') div(class='form-group row')
label(for="name", class="col-sm-2") Name label(for="name", class="col-sm-2") Name
div(class="col-sm-8") div(class="col-sm-8")
input#name(name="name", type="text", class="form-control", placeholder="Name", maxlength="75" required) input#name(name="name", type="text", class="form-control", placeholder="Name", maxlength="75" required)
| <p id="nameInfo" class="font-italic font-weight-light"><small>your website will be published on this URL: <strong>https://transfer.hft-stuttgart.de/pages/<span id="websiteName"></span></strong></small></p> | <p id="nameInfo" class="font-italic font-weight-light"><small>Ihre Webseite wird unter folgender URL veröffentlicht: <strong>https://transfer.hft-stuttgart.de/pages/<span id="websiteName"></span></strong></small></p>
div(class="form-group row") div(class="form-group row")
label(for="description", class="col-sm-2") Description label(for="description", class="col-sm-2") Beschreibung
div(class="col-sm-8") div(class="col-sm-8")
textarea#description(name="description", type="text", class="form-control", placeholder="Description", maxlength="500" required) textarea#description(name="description", type="text", class="form-control", placeholder="Beschreibung", maxlength="500" required)
div(class="form-group row") div(class="form-group row")
label(for="logo", class="col-sm-2") Logo label(for="logo", class="col-sm-2") Projektlogo
div(class="col-sm-8") div(class="col-sm-8")
input#logo(name="logo", class="form-control-file", type="file" required) input#logo(name="logo", class="form-control-file", type="file" required)
input(type="submit", class="btn btn-primary", value="Submit") input(type="submit", class="btn btn-primary", value="Senden")
hr hr
div(class="mx-4", style="color: gray;") div(class="mx-4", style="color: gray;")
h4(class="pb-1") Step 2: Complete h4(class="pb-1") Schritt 2: Dateneingabe
p Please make sure you have completed the following before you publish your website. p Bitte stellen Sie sicher, dass sie Folgendes abgeschlossen haben, bevor Sie Ihre Webseite veröffentlichen:
ol ol
li Anpassen der Standardwerte in <i>settings.js</i> li Anpassen der Standardwerte in <i>settings.js</i>
li Anpassen der Kontaktperson in <i>kontakt.html</i> li Anpassen der Kontaktperson in <i>kontakt.html</i>
hr hr
div(class="mx-4", style="color: gray;") div(class="mx-4", style="color: gray;")
h4(class="pb-1") Step 3: Publish h4(class="pb-1") Schritt 3: Veröffentlichen
p The following request email will be sent to the Transferportal Admin to publish your new website/information: p Folgende Anfrage wird an die Administration des Transferportal gesandt, um ihre Webseite/ Informationsseite zu veröffentlichen:
table(class="table-secondary") table(class="table-secondary")
tr tr
td Guten Tag, <br><br> hiermit beantrage Ich die Freischaltung einer Webseite auf dem Transferportal für folgendes Projekt:<br>project-name.<br><br>Vielen Dank,<br> #{user.fullName} td Guten Tag, <br><br> hiermit beantrage Ich die Freischaltung einer Webseite auf dem Transferportal für folgendes Projekt:<br>project-name.<br><br>Vielen Dank,<br> #{user.fullName}
br br
input(type="submit", class="btn btn-primary", value="Send Request" disabled) input(type="submit", class="btn btn-primary", value="Nachricht versenden" disabled)
// jQuery // jQuery
script(src="https://code.jquery.com/jquery-3.3.1.min.js") script(src="https://code.jquery.com/jquery-3.3.1.min.js")
script(src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js", integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1", crossorigin="anonymous") script(src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js", integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1", crossorigin="anonymous")
// jquery-loading-overlay
script(src="https://cdn.jsdelivr.net/npm/gasparesganga-jquery-loading-overlay@2.1.7/dist/loadingoverlay.min.js")
// Bootstrap // Bootstrap
script(src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous") script(src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous")
// M4_LAB // M4_LAB
...@@ -99,3 +101,7 @@ html(lang="de") ...@@ -99,3 +101,7 @@ html(lang="de")
showWebsiteURL(); showWebsiteURL();
}) })
showWebsiteURL(); showWebsiteURL();
$("form").submit(function(){
$.LoadingOverlay("show")
});
\ No newline at end of file
...@@ -49,7 +49,7 @@ html(lang="de") ...@@ -49,7 +49,7 @@ html(lang="de")
div(class="row pb-1") div(class="row pb-1")
div(class="col font-weight-bold") Projektinformationen div(class="col font-weight-bold") Projektinformationen
div(class="col text-right") div(class="col text-right")
a(href="/account/newInformation" class="btn btn-sm btn-success" role="button") New Information a(href="/account/newInformation" class="btn btn-sm btn-success" role="button") Neue Projektinformation
table(class="table") table(class="table")
for item in gitlabPages for item in gitlabPages
- let img = item.logo - let img = item.logo
...@@ -60,16 +60,16 @@ html(lang="de") ...@@ -60,16 +60,16 @@ html(lang="de")
if item.isPublished if item.isPublished
td td
a(href=editNewPageLink+"&s=y" class="link-dark") #{item.name} a(href=editNewPageLink+"&s=y" class="link-dark") #{item.name}
td published td veröffentlicht
else else
td td
a(href=editNewPageLink+"&s=n" class="link-dark") #{item.name} a(href=editNewPageLink+"&s=n" class="link-dark") #{item.name}
td not published yet td noch nicht veröffentlicht
div(class="container") div(class="container")
div(class="row pb-1") div(class="row pb-1")
div(class="col font-weight-bold") Projektcode und -daten div(class="col font-weight-bold") Projektcode und -daten
div(class="col text-right") div(class="col text-right")
button(type="button", class="btn btn-sm btn-success" disabled) New Code and Data button(type="button", class="btn btn-sm btn-success" disabled) Neuer Projektdatensatz
table(class="table") table(class="table")
for item in gitlabRepos for item in gitlabRepos
- let img = item.logo - let img = item.logo
...@@ -79,7 +79,7 @@ html(lang="de") ...@@ -79,7 +79,7 @@ html(lang="de")
td #{item.name} td #{item.name}
else else
p p
| Please <a href="https://transfer.hft-stuttgart.de/gitlab" target="_blank">login to gitlab</a> to activate your access, and then refresh this page. | Bitte <a href="https://transfer.hft-stuttgart.de/gitlab" target="_blank">melden Sie sich an der Gitlab-Instanz an</a>, um Ihren Zugang zu aktivieren, und aktualisieren Sie diese Seite.
// jQuery // jQuery
script(src="https://code.jquery.com/jquery-3.3.1.min.js") script(src="https://code.jquery.com/jquery-3.3.1.min.js")
......
...@@ -41,36 +41,40 @@ html(lang="de") ...@@ -41,36 +41,40 @@ html(lang="de")
if flash.error if flash.error
div.alert.alert-danger.alert-dismissible.fade.show #{flash.error} div.alert.alert-danger.alert-dismissible.fade.show #{flash.error}
a(class="close", href="#", data-dismiss="alert", aria-label="close") &times; a(class="close", href="#", data-dismiss="alert", aria-label="close") &times;
h3(class="pb-2") Update Information h3(class="pb-2") Information aktualisieren
div(class="mx-4") div(class="mx-4")
if !information.isPublished if !information.isPublished
h4(class="pb-1") Step 1: Setup h4(class="pb-1") Schritt 1: Setup
p Please fill-in all fields p Bitte füllen Sie alle Felder aus
form(method="POST", encType="multipart/form-data") form(method="POST", encType="multipart/form-data")
div(class='form-group row') div(class='form-group row')
label(for="name", class="col-sm-2") Name label(for="name", class="col-sm-2") Name
div(class="col-sm-8") div(class="col-sm-8")
input#name(name="name", type="text", class="form-control", value=information.name, placeholder="Name", maxlength="75" required) input#name(name="name", type="text", class="form-control", value=information.name, placeholder="Name", maxlength="75" required)
| <p id="nameInfo" class="font-italic font-weight-light"><small>your website will be published on this URL: <strong>https://transfer.hft-stuttgart.de/pages/<span id="websiteName"></span></strong></small></p> | <p id="nameInfo" class="font-italic font-weight-light"><small>Ihre Webseite wird unter folgender URL veröffentlicht: <strong>https://transfer.hft-stuttgart.de/pages/<span id="websiteName"></span></strong></small></p>
div(class="form-group row") div(class="form-group row")
label(for="description", class="col-sm-2") Description label(for="description", class="col-sm-2") Beschreibung
div(class="col-sm-8") div(class="col-sm-8")
textarea#description(name="description", type="text", class="form-control", placeholder="Description", maxlength="500" required) #{information.desc} textarea#description(name="description", type="text", class="form-control", placeholder="Beschreibung", maxlength="500" required) #{information.desc}
div(class="form-group row") div(class="form-group row")
label(for="logo", class="col-sm-2") Logo label(for="logo", class="col-sm-2") Projektlogo
div(class="col-sm-8") div(class="col-sm-8")
div(class="form-group row") div(class="form-group row")
img(src=information.logo, width="100" height="100") img(src=information.logo, width="100" height="100")
div(class="form-group row") div(class="form-group row")
input#logo(name="logo", class="form-control-file", type="file") input#logo(name="logo", class="form-control-file", type="file")
input(type="submit", class="btn btn-primary", value="Update") if !information.isPublished
input(name="isPublished", type="hidden", value="false")
else
input(name="isPublished", type="hidden", value="true")
input(type="submit", class="btn btn-primary", value="Speichern")
hr hr
div(class="mx-4") div(class="mx-4")
if !information.isPublished if !information.isPublished
h4(class="pb-1") Step 2: Complete h4(class="pb-1") Schritt 2: Dateneingabe
p Please make sure you have completed the following before you publish your website. p Bitte stellen Sie sicher, dass sie Folgendes abgeschlossen haben, bevor Sie Ihre Webseite veröffentlichen:
else else
p <b><i>NOTE:</b></i> p <b><i>ANMERKUNG:</b></i>
div(class="card") div(class="card")
div(class="card-header") 1. Anpassen der Standardwerte in <a href=#{information.settingUrl} target="_blank"><i>settings.js</i></a> div(class="card-header") 1. Anpassen der Standardwerte in <a href=#{information.settingUrl} target="_blank"><i>settings.js</i></a>
div(class="card-body") Passen Sie die Werte für projektname und projektseitenlink an, indem Sie die entsprechenden Werte in die Anführungszeichen schreiben. div(class="card-body") Passen Sie die Werte für projektname und projektseitenlink an, indem Sie die entsprechenden Werte in die Anführungszeichen schreiben.
...@@ -84,17 +88,19 @@ html(lang="de") ...@@ -84,17 +88,19 @@ html(lang="de")
hr hr
div(class="mx-4") div(class="mx-4")
if !information.isPublished if !information.isPublished
h4(class="pb-1") Step 3: Publish h4(class="pb-1") Schritt 3: Veröffentlichen
p The following request email will be sent to the Transferportal Admin to publish your new website/information: p Folgende Anfrage wird an die Administration des Transferportal gesandt, um ihre Webseite/ Informationsseite zu veröffentlichen:
table(class="table-secondary") table(class="table-secondary")
tr tr
td Guten Tag, <br><br> hiermit beantrage Ich die Freischaltung einer Webseite auf dem Transferportal für folgendes Projekt:<br>#{information.name}<br><br>Vielen Dank,<br> #{user.fullName} td Guten Tag, <br><br> hiermit beantrage Ich die Freischaltung einer Webseite auf dem Transferportal für folgendes Projekt:<br>#{information.name}<br><br>Vielen Dank,<br> #{user.fullName}
br br
button(type="button", class="btn btn-primary", onclick="sendPublishRequest()") Send Request button(type="button", class="btn btn-primary", onclick="sendPublishRequest()") Nachricht versenden
// jQuery // jQuery
script(src="https://code.jquery.com/jquery-3.3.1.min.js") script(src="https://code.jquery.com/jquery-3.3.1.min.js")
script(src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js", integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1", crossorigin="anonymous") script(src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js", integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1", crossorigin="anonymous")
// jquery-loading-overlay
script(src="https://cdn.jsdelivr.net/npm/gasparesganga-jquery-loading-overlay@2.1.7/dist/loadingoverlay.min.js")
// Bootstrap // Bootstrap
script(src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous") script(src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous")
// M4_LAB // M4_LAB
...@@ -120,3 +126,7 @@ html(lang="de") ...@@ -120,3 +126,7 @@ html(lang="de")
alert(resp) alert(resp)
}) })
} }
$("form").submit(function(){
$.LoadingOverlay("show")
});
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment