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) {
res.redirect('/login')
} else {
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')
} else {
let projectName = req.body.name.toLowerCase().replace(/\s/g, '-')
......@@ -501,7 +501,7 @@ module.exports = function (app, config, passport, i18n) {
let newInformation = new projectInformation(loggedInUser.getGitlabUserId(), null, projectName, projectDesc, null, null, null, false)
if (!req.files) {
res.flash('error', 'Please choose a project logo')
res.flash('error', 'Bitte geben Sie ein Projektlogo an.')
res.redirect('/account/newInformation')
} else {
let newLogoFile = req.files.logo
......@@ -517,9 +517,9 @@ module.exports = function (app, config, passport, i18n) {
let result = data.data
if (data.error) {
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 {
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')
} else {
......@@ -527,9 +527,9 @@ module.exports = function (app, config, passport, i18n) {
newInformation.setLogo(result.avatar_url)
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')
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.redirect('/account/updateInformation?id='+newInformation.getId())
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()+'&s=n')
}
callback(null)
})
......@@ -595,12 +595,16 @@ module.exports = function (app, config, passport, i18n) {
res.redirect('/login')
} else {
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')
} else {
let projectName = req.body.name.toLowerCase().replace(/\s/g, '-')
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
async.waterfall([
......@@ -620,9 +624,9 @@ module.exports = function (app, config, passport, i18n) {
let result = data.data
if (data.error) {
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 {
res.flash("error", "Something went wrong. Please try again.")
res.flash("error", "Ein Fehler ist aufgetreten. Bitte versuchen Sie es erneut. ")
}
} else {
updatedInformation.setLogo(result.avatar_url)
......@@ -658,7 +662,7 @@ module.exports = function (app, config, passport, i18n) {
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"
+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([
function(done) {
mailer.options.to = supportAddress
......
......@@ -41,45 +41,47 @@ html(lang="de")
if flash.error
div.alert.alert-danger.alert-dismissible.fade.show #{flash.error}
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")
h4(class="pb-1") Step 1: Setup
p Please fill-in all fields
h4(class="pb-1") Schritt 1: Setup
p Bitte füllen Sie alle Felder aus
form(method="POST", encType="multipart/form-data")
div(class='form-group row')
label(for="name", class="col-sm-2") Name
div(class="col-sm-8")
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")
label(for="description", class="col-sm-2") Description
label(for="description", class="col-sm-2") Beschreibung
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")
label(for="logo", class="col-sm-2") Logo
label(for="logo", class="col-sm-2") Projektlogo
div(class="col-sm-8")
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
div(class="mx-4", style="color: gray;")
h4(class="pb-1") Step 2: Complete
p Please make sure you have completed the following before you publish your website.
h4(class="pb-1") Schritt 2: Dateneingabe
p Bitte stellen Sie sicher, dass sie Folgendes abgeschlossen haben, bevor Sie Ihre Webseite veröffentlichen:
ol
li Anpassen der Standardwerte in <i>settings.js</i>
li Anpassen der Kontaktperson in <i>kontakt.html</i>
hr
div(class="mx-4", style="color: gray;")
h4(class="pb-1") Step 3: Publish
p The following request email will be sent to the Transferportal Admin to publish your new website/information:
h4(class="pb-1") Schritt 3: Veröffentlichen
p Folgende Anfrage wird an die Administration des Transferportal gesandt, um ihre Webseite/ Informationsseite zu veröffentlichen:
table(class="table-secondary")
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}
br
input(type="submit", class="btn btn-primary", value="Send Request" disabled)
input(type="submit", class="btn btn-primary", value="Nachricht versenden" disabled)
// jQuery
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")
// jquery-loading-overlay
script(src="https://cdn.jsdelivr.net/npm/gasparesganga-jquery-loading-overlay@2.1.7/dist/loadingoverlay.min.js")
// Bootstrap
script(src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous")
// M4_LAB
......@@ -98,4 +100,8 @@ html(lang="de")
$('#name').on('input',function(e){
showWebsiteURL();
})
showWebsiteURL();
\ No newline at end of file
showWebsiteURL();
$("form").submit(function(){
$.LoadingOverlay("show")
});
\ No newline at end of file
......@@ -49,7 +49,7 @@ html(lang="de")
div(class="row pb-1")
div(class="col font-weight-bold") Projektinformationen
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")
for item in gitlabPages
- let img = item.logo
......@@ -60,16 +60,16 @@ html(lang="de")
if item.isPublished
td
a(href=editNewPageLink+"&s=y" class="link-dark") #{item.name}
td published
td veröffentlicht
else
td
a(href=editNewPageLink+"&s=n" class="link-dark") #{item.name}
td not published yet
td noch nicht veröffentlicht
div(class="container")
div(class="row pb-1")
div(class="col font-weight-bold") Projektcode und -daten
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")
for item in gitlabRepos
- let img = item.logo
......@@ -79,7 +79,7 @@ html(lang="de")
td #{item.name}
else
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
script(src="https://code.jquery.com/jquery-3.3.1.min.js")
......
......@@ -41,36 +41,40 @@ html(lang="de")
if flash.error
div.alert.alert-danger.alert-dismissible.fade.show #{flash.error}
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")
if !information.isPublished
h4(class="pb-1") Step 1: Setup
p Please fill-in all fields
h4(class="pb-1") Schritt 1: Setup
p Bitte füllen Sie alle Felder aus
form(method="POST", encType="multipart/form-data")
div(class='form-group row')
label(for="name", class="col-sm-2") Name
div(class="col-sm-8")
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")
label(for="description", class="col-sm-2") Description
label(for="description", class="col-sm-2") Beschreibung
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")
label(for="logo", class="col-sm-2") Logo
label(for="logo", class="col-sm-2") Projektlogo
div(class="col-sm-8")
div(class="form-group row")
img(src=information.logo, width="100" height="100")
div(class="form-group row")
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
div(class="mx-4")
if !information.isPublished
h4(class="pb-1") Step 2: Complete
p Please make sure you have completed the following before you publish your website.
h4(class="pb-1") Schritt 2: Dateneingabe
p Bitte stellen Sie sicher, dass sie Folgendes abgeschlossen haben, bevor Sie Ihre Webseite veröffentlichen:
else
p <b><i>NOTE:</b></i>
p <b><i>ANMERKUNG:</b></i>
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-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")
hr
div(class="mx-4")
if !information.isPublished
h4(class="pb-1") Step 3: Publish
p The following request email will be sent to the Transferportal Admin to publish your new website/information:
h4(class="pb-1") Schritt 3: Veröffentlichen
p Folgende Anfrage wird an die Administration des Transferportal gesandt, um ihre Webseite/ Informationsseite zu veröffentlichen:
table(class="table-secondary")
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}
br
button(type="button", class="btn btn-primary", onclick="sendPublishRequest()") Send Request
button(type="button", class="btn btn-primary", onclick="sendPublishRequest()") Nachricht versenden
// jQuery
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")
// jquery-loading-overlay
script(src="https://cdn.jsdelivr.net/npm/gasparesganga-jquery-loading-overlay@2.1.7/dist/loadingoverlay.min.js")
// Bootstrap
script(src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous")
// M4_LAB
......@@ -119,4 +125,8 @@ html(lang="de")
$.post("/sendPublishRequest", {projectName: $("#name").val()}, function(resp){
alert(resp)
})
}
\ No newline at end of file
}
$("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