Skip to content

Commit

Permalink
update translations and fix release dialog
Browse files Browse the repository at this point in the history
  • Loading branch information
kcinay055679 committed Oct 25, 2024
1 parent 0bf52b6 commit a5bf9ef
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 12 deletions.
5 changes: 4 additions & 1 deletion frontend/cypress/e2e/objective.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,9 @@ describe('OKR Objective e2e tests', () => {
.get('.objective-menu-option')
.contains('Objective veröffentlichen')
.click();
cy.contains('Objective veröffentlichen');
cy.contains('Soll dieses Objective veröffentlicht werden?');
cy.getByTestId('confirmYes').click();

cy.getByTestId('objective')
.filter(':contains(A objective in state draft)')
.last()
Expand Down Expand Up @@ -151,6 +152,8 @@ describe('OKR Objective e2e tests', () => {
.click()
.wait(500)
.tabForward();
cy.contains('Objective als Draft speichern');
cy.contains('Soll dieses Objective als Draft gespeichert werden?');
cy.focused().click().wait(500);

cy.getByTestId('objective')
Expand Down
16 changes: 7 additions & 9 deletions frontend/src/app/components/objective/objective.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,8 @@ export class ObjectiveComponent implements OnInit {
dialog: {
dialog: ConfirmDialogComponent,
data: {
title: 'Check-in im Draft-Status',
text: 'Dein Objective befindet sich noch im DRAFT Status. Möchtest du das Check-in trotzdem erfassen?',
title: 'Objective als Draft speichern',
text: 'Soll dieses Objective als Draft gespeichert werden?',
},
},
},
Expand All @@ -107,18 +107,16 @@ export class ObjectiveComponent implements OnInit {
}

getDraftMenuActions() {
const releaseText = this.translate.instant('CONFIRMATION.RELEASE.TEXT');
const releaseBacklogText = 'releaseBacklog';
const dialogText = this.isBacklogQuarter ? releaseText : releaseBacklogText;
const action = this.isBacklogQuarter ? 'releaseBacklog' : 'release';
let menuEntries = {
displayName: 'Objective veröffentlichen',
action: this.isBacklogQuarter ? 'releaseBacklog' : 'release',
action: action,
dialog: {
dialog: this.isBacklogQuarter ? ObjectiveFormComponent : ConfirmDialogComponent,
data: {
title: this.translate.instant('CONFIRMATION.RELEASE.TITLE'),
text: dialogText,
action: dialogText,
text: this.translate.instant('CONFIRMATION.RELEASE.TEXT'),
action: action,
objectiveId: this.isBacklogQuarter ? this.objective$.value.id : undefined,
},
},
Expand Down Expand Up @@ -158,7 +156,7 @@ export class ObjectiveComponent implements OnInit {
data: {
title: menuEntry.dialog.data.title,
action: menuEntry.action,
text: menuEntry.action,
text: menuEntry.dialog.data.text,
objective: menuEntry.dialog.data,
objectiveTitle: menuEntry.dialog.data.objectiveTitle,
},
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/assets/i18n/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
},
"TO_DRAFT": {
"TITLE": "Objective als Draft speichern",
"TEXT": "Soll dieses ' + this.data.title + ' als Draft gespeichert werden?"
"TEXT": "Soll dieses Objective als Draft gespeichert werden?"
},
"DELETE": {
"ACTION":{
Expand All @@ -55,7 +55,7 @@
"TEXT": "Möchtest du dieses Objective wirklich löschen? Zugehörige Key Results werden dadurch ebenfalls gelöscht!"
},
"KEYRESULT":{
"TITLE": "Key Result löschen\n",
"TITLE": "Key Result löschen",
"TEXT": "Möchtest du dieses Key Result wirklich löschen? Zugehörige Check-ins werden dadurch ebenfalls gelöscht!"
}
}
Expand Down

0 comments on commit a5bf9ef

Please sign in to comment.