Skip to content

Commit

Permalink
Merge pull request #8 from ubilabs/translations_#7
Browse files Browse the repository at this point in the history
Frontend Translations #7
  • Loading branch information
TheAmazingPT committed Oct 17, 2023
2 parents 602f6e8 + 3984144 commit 91ba93b
Show file tree
Hide file tree
Showing 10 changed files with 49 additions and 27 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ export default {
id="sm1headline"
class="summaryheadline sm1"
>
Beitragstitel
{{ $t('CreateContributionModal.StepContents.title') }}
</p>
<p
class="greyBox editIcon contributionHeadline"
Expand All @@ -178,7 +178,7 @@ export default {
id="sm2headline"
class="summaryheadline sm2"
>
Beschreibung
{{ $t('CreateContributionModal.StepContents.text') }}
</p>
<div
class="greyBox editIcon contributionText"
Expand All @@ -195,7 +195,7 @@ export default {
id="sm3headline"
class="summaryheadline sm3"
>
Kategorie
{{ $t('CreateContributionModal.StepIndicator.category') }}
</p>
<p
class="greyBox editIcon inline contributionCategory"
Expand All @@ -215,7 +215,7 @@ export default {
id="sm4headline"
class="summaryheadline sm4"
>
Beitragstyp
{{ $t('CreateContributionModal.StepIndicator.type') }}
</p>
<p
v-if="useRubrics"
Expand Down
2 changes: 1 addition & 1 deletion src/basicComponents/FirstModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ export default {
if (cookie !== null && cookie.hasOwnProperty("splashModalLastShown") && cookie.splashModalLastShown !== undefined) {
const modalTime = moment(cookie.splashModalLastShown);
modalTime.add(this.timeBetweenSplashModals, "Minute");
modalTime.add(this.timeBetweenSplashModals, this.$t("FirstModal.minute"));
if (modalTime > moment()) {
cookieForbidsModal = true;
}
Expand Down
2 changes: 1 addition & 1 deletion src/basicComponents/FooterElement.vue
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ export default {
v-if="$route.meta.hasCreateButton && projectRunning && takesNewContributions"
class="red angular"
icon="add"
text="Beitrag erstellen"
:text="$t('ContributionList.addNew')"
@click="$root.$emit('createContribution')"
/>
<!--
Expand Down
22 changes: 17 additions & 5 deletions src/lang/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
"projectFinished": "Das Verfahren lief bis zum {{projectEnd}}.",
"infoButton": "Jetzt informieren",
"startButton": "Beitrag erstellen",
"conceptionsButton": "Entwürfe ansehen"
"conceptionsButton": "Entwürfe ansehen",
"minute": "Minute"
},
"Cookiebar": {
"title": "Wir verwenden Cookies!",
Expand Down Expand Up @@ -43,6 +44,8 @@
"itemCount": "Anzahl Beiträge",
"filtered": "gefiltert",
"ContributionListFilter": {
"cancel": "Abbrechen",
"ok": "Auswahl übernehmen",
"filterOptions": "Filteroptionen",
"termSelectHeadlineCat": "Kategorie wählen",
"termSelectTitleCat": "Kategorie",
Expand Down Expand Up @@ -70,7 +73,9 @@
"loading": "Lade ...",
"routeToEntry": "zum Beitrag",
"comments": "{{teaserComments}} Kommentare",
"comment": "{{teaserComments}} Kommentar"
"comment": "{{teaserComments}} Kommentar",
"datetimeFormat": "DD.MM.YYYY | HH:mm",
"oClock": "Uhr"
}
},
"Contact": {
Expand Down Expand Up @@ -137,7 +142,8 @@
"htmlTitlePrefix": "Beitrag",
"backToList": "Zurück zur Beitragsliste",
"comment": "Kommentieren",
"oClock": "Uhr"
"oClock": "Uhr",
"datetimeFormat": "DD.MM.YYYY | HH:mm:ss"
},
"ParagraphDivisionInPlanningSubareas": {
"Filter": {
Expand Down Expand Up @@ -198,7 +204,9 @@
"cancel": "Abbrechen",
"reply": "Antworten",
"replyNoPlural": "Antworten an Nr. ",
"replyNo": "Antwort an Nr. "
"replyNo": "Antwort an Nr. ",
"datetimeFormat": "DD.MM.YYYY | HH:mm:ss",
"oClock": "Uhr"
}
},
"RelatedContributions": {
Expand Down Expand Up @@ -240,7 +248,11 @@
"Item": {
"topic": "Thema:",
"details": "Details",
"date": "Datum:"
"date": "Datum:",
"oClock": "Uhr",
"until": "bis",
"datetimeFormat": "DD.MM.YYYY - HH:mm",
"timeFormat": "HH:mm"
}
},
"MaintenanceMessage": {
Expand Down
20 changes: 15 additions & 5 deletions src/lang/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
"projectFinished": "The procedure is finished an ran until {{projectEnd}}.",
"infoButton": "Get information",
"startButton": "Start entry",
"conceptionsButton": "View conceptions"
"conceptionsButton": "View conceptions",
"minute": "Minute"
},
"Cookiebar": {
"title": "We use cookies!",
Expand Down Expand Up @@ -71,7 +72,9 @@
"loading": "Loading ...",
"routeToEntry": "To Entry",
"comments": "{{teaserComments}} Comments",
"comment": "{{teaserComments}} Comment"
"comment": "{{teaserComments}} Comment",
"datetimeFormat": "DD/MM/YYYY | HH:mm",
"oClock": "o'clock"
}
},
"Contact": {
Expand Down Expand Up @@ -138,7 +141,8 @@
"htmlTitlePrefix": "Contribution",
"backToList": "Back to contribution list",
"comment": "Comment",
"oClock": "o'clock"
"oClock": "o'clock",
"datetimeFormat": "DD/MM/YYYY | HH:mm:ss"
},
"ParagraphDivisionInPlanningSubareas": {
"Filter": {
Expand Down Expand Up @@ -199,7 +203,9 @@
"cancel": "Cancel",
"reply": "Reply",
"replyNoPlural": "Reply for No. ",
"replyNo": "Reply for No. "
"replyNo": "Reply for No. ",
"datetimeFormat": "DD/MM/YYYY | HH:mm:ss",
"oClock": "o'clock"
}
},
"RelatedContributions": {
Expand Down Expand Up @@ -241,7 +247,11 @@
"Item": {
"topic": "Topic:",
"details": "Details",
"date": "Date:"
"date": "Date:",
"oClock": "o'clock",
"until": "until",
"datetimeFormat": "DD/MM/YYYY - HH:mm",
"timeFormat": "HH:mm"
}
},
"MaintenanceMessage": {
Expand Down
2 changes: 1 addition & 1 deletion src/pages/ContributionDetails/ContributionDetails.vue
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export default {
* @returns {String} date of the contribution creation
*/
created () {
return moment(this.contribution.created).format("DD.MM.YYYY | HH:mm:ss") + "&nbsp;" + this.$t("ContributionDetails.oClock");
return moment(this.contribution.created).format(this.$t("ContributionDetails.datetimeFormat")) + " " + this.$t("ContributionDetails.oClock");
},
/**
* serves the contribution category
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ export default {
* @returns {String}
*/
created () {
return moment(this.comment.created).format("DD.MM.YYYY | HH:mm:ss") + " Uhr";
return moment(this.comment.created).format(this.$t("CommentsList.Comment.datetimeFormat")) + " " + this.$t("CommentsList.Comment.oClock");
},
/**
* serves the comments state is open as boolean
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ export default {
@event click cancel
-->
<DipasButton
text="Abbrechen"
:text="$t('ContributionList.ContributionListFilter.cancel')"
class="grey angular"
@click="cancel"
/>
Expand All @@ -208,7 +208,7 @@ export default {
@event click ok
-->
<DipasButton
text="Auswahl übernehmen"
:text="$t('ContributionList.ContributionListFilter.ok')"
class="blue angular"
@click="ok"
/>
Expand All @@ -222,7 +222,7 @@ export default {
@event click ok
-->
<DipasButton
text="Auswahl übernehmen"
:text="$t('ContributionList.ContributionListFilter.ok')"
class="blue angular mobileButton"
@click="ok"
/>
Expand All @@ -231,7 +231,7 @@ export default {
@event click cancel
-->
<DipasButton
text="Abbrechen"
:text="$t('ContributionList.ContributionListFilter.cancel')"
class="grey angular mobileButton"
@click="cancel"
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ export default {
* @returns {String} date and time when the teaser was created
*/
created () {
return moment(this.teaser.created).format("DD.MM.YYYY | HH:mm") + " Uhr";
return moment(this.teaser.created).format(this.$t("ContributionList.ContributionListTeaser.datetimeFormat")) + " " + this.$t("ContributionList.ContributionListTeaser.oClock");
},
/**
* serves the boolean wether rating is allowed or not
Expand Down
8 changes: 4 additions & 4 deletions src/pages/Schedule/components/ScheduleItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -39,18 +39,18 @@ export default {
* @returns {String} appointment date
*/
appointmentDate () {
let appointmentDate = moment(this.appointment.start).format("DD.MM.YYYY - HH:mm");
let appointmentDate = moment(this.appointment.start).format(this.$t("Schedule.Item.datetimeFormat"));
if (this.appointment.end) {
if (moment(this.appointment.start).get("day") === moment(this.appointment.end).get("day")) {
appointmentDate += " bis " + moment(this.appointment.end).format("HH:mm") + " Uhr";
appointmentDate += " " + this.$t("Schedule.Item.until") + " " + moment(this.appointment.end).format(this.$t("Schedule.Item.timeFormat")) + " " + this.$t("Schedule.Item.oClock");
}
else {
appointmentDate += " Uhr bis " + moment(this.appointment.end).format("DD.MM.YYYY - HH:mm") + " Uhr";
appointmentDate += " " + this.$t("Schedule.Item.oClock") + " " + this.$t("Schedule.Item.until") + " " + moment(this.appointment.end).format(this.$t("Schedule.Item.datetimeFormat")) + " " + this.$t("Schedule.Item.oClock");
}
}
else {
appointmentDate += " Uhr";
appointmentDate += " " + this.$t("Schedule.Item.oClock");
}
return appointmentDate;
},
Expand Down

0 comments on commit 91ba93b

Please sign in to comment.