diff --git a/src/app/features/metric/evaluation-sheet/evaluation-sheet.component.html b/src/app/features/metric/evaluation-sheet/evaluation-sheet.component.html index 0b75b4755e7..2e9408897eb 100644 --- a/src/app/features/metric/evaluation-sheet/evaluation-sheet.component.html +++ b/src/app/features/metric/evaluation-sheet/evaluation-sheet.component.html @@ -1,14 +1,10 @@
-

Time for a little self evaluation! Your answers here are saved and provide you with a little bit of statistics on - how you work in the metrics section. Furthermore the suggestions for tomorrow will - appear above your task list the next day.

+

{{T.F.METRIC.EVAL_FORM.HELP_P1|translate}}

+

{{T.F.METRIC.EVAL_FORM.HELP_LINK_TXT|translate}}

-

Why should I care?

-

This is intended to be less about calculating exact metrics or becoming machine like efficient in all you do than - it is about improving how you feel about your work. It can be helpful to evaluate pain points in your daily - routine, as well as it is to find factors that help you out. Being just a little bit systematic about it hopefully - helps to get a better grip on these and to improve what you can.

+

{{T.F.METRIC.EVAL_FORM.HELP_H1|translate}}

+

{{T.F.METRIC.EVAL_FORM.HELP_P2|translate}}

Why should I care? maxLength="2" min="1" name="mood" - placeholder="How do you feel?" + [placeholder]="T.F.METRIC.EVAL_FORM.MOOD|translate" required type="number"> - 1: Awful – 10: Splendid + {{T.F.METRIC.EVAL_FORM.MOOD_HINT|translate}} - Please enter a value between 1 and 10 + {{T.V.E_1TO10|translate}} @@ -40,12 +36,12 @@

Why should I care?

maxLength="2" min="1" name="productivity" - placeholder="How efficient did you work?" + [placeholder]="T.F.METRIC.EVAL_FORM.PRODUCTIVITY|translate" required type="number"> - 1: Haven't even started – 10: Enormously efficient + {{T.F.METRIC.EVAL_FORM.PRODUCTIVITY_HINT|translate}} - Please enter a value between 1 and 10 + {{T.V.E_1TO10|translate}} @@ -54,14 +50,14 @@

Why should I care?

(removeItem)="removeObstruction($event)" [model]="metricForDay.obstructions" [suggestions]="(obstructionService.obstructions$|async)" - label="What hindered your productivity?"> + [label]="T.F.METRIC.EVAL_FORM.OBSTRUCTIONS|translate"> + [label]="T.F.METRIC.EVAL_FORM.IMPROVEMENTS|translate"> Why should I care? (removeItem)="removeImprovementTomorrow($event)" [model]="metricForDay.improvementsTomorrow" [suggestions]="(improvementService.improvements$|async)" - label="What could you do to improve tomorrow?"> + [label]="T.F.METRIC.EVAL_FORM.IMPROVEMENTS_TOMORROW|translate"> - + [placeholder]="T.F.METRIC.EVAL_FORM.NOTES|translate">
@@ -84,7 +79,7 @@

Why should I care?

mat-stroked-button type="submit"> save - Save + {{T.G.SAVE|translate}}
diff --git a/src/app/features/metric/evaluation-sheet/evaluation-sheet.component.ts b/src/app/features/metric/evaluation-sheet/evaluation-sheet.component.ts index 303d6e83e3b..06c1c0e8a33 100644 --- a/src/app/features/metric/evaluation-sheet/evaluation-sheet.component.ts +++ b/src/app/features/metric/evaluation-sheet/evaluation-sheet.component.ts @@ -18,6 +18,7 @@ import {NoteService} from '../../note/note.service'; import {getWorklogStr} from '../../../util/get-work-log-str'; import {filter, map, switchMap, withLatestFrom} from 'rxjs/operators'; import {ProjectService} from '../../project/project.service'; +import {T} from '../../../t.const'; @Component({ selector: 'evaluation-sheet', @@ -32,6 +33,7 @@ export class EvaluationSheetComponent implements OnDestroy, OnInit { @Output() save = new EventEmitter(); + T = T; tomorrowsNote: string; metricForDay: MetricCopy; diff --git a/src/app/features/metric/improvement-banner/improvement-banner.component.ts b/src/app/features/metric/improvement-banner/improvement-banner.component.ts index c4dfb445e8a..fc92191f958 100644 --- a/src/app/features/metric/improvement-banner/improvement-banner.component.ts +++ b/src/app/features/metric/improvement-banner/improvement-banner.component.ts @@ -9,8 +9,6 @@ import {ImprovementService} from '../improvement/improvement.service'; changeDetection: ChangeDetectionStrategy.OnPush }) export class ImprovementBannerComponent { - - constructor( public improvementService: ImprovementService, ) { diff --git a/src/app/features/metric/metric.component.ts b/src/app/features/metric/metric.component.ts index 64f96edb622..5459711ef7a 100644 --- a/src/app/features/metric/metric.component.ts +++ b/src/app/features/metric/metric.component.ts @@ -5,6 +5,7 @@ import {Color} from 'ng2-charts'; import {Observable} from 'rxjs'; import {LineChartData} from './metric.model'; import {fadeAnimation} from '../../ui/animations/fade.ani'; +import {T} from '../../t.const'; @Component({ selector: 'metric', @@ -14,24 +15,26 @@ import {fadeAnimation} from '../../ui/animations/fade.ani'; animations: [fadeAnimation], }) export class MetricComponent { - public productivityHappiness$: Observable = this.metricService.getProductivityHappinessChartData$(); + T = T; - public pieChartOptions: ChartOptions = { + productivityHappiness$: Observable = this.metricService.getProductivityHappinessChartData$(); + + pieChartOptions: ChartOptions = { responsive: true, legend: { position: 'top', }, }; - public pieChartType: ChartType = 'pie'; - public pieChartPlugins = []; + pieChartType: ChartType = 'pie'; + pieChartPlugins = []; - public lineChartOptions: ChartOptions = { + lineChartOptions: ChartOptions = { responsive: true, }; - public lineChartColors: Color[] = []; - public lineChartLegend = true; - public lineChartType: ChartType = 'line'; - public lineChartPlugins = []; + lineChartColors: Color[] = []; + lineChartLegend = true; + lineChartType: ChartType = 'line'; + lineChartPlugins = []; constructor( public metricService: MetricService, diff --git a/src/app/features/metric/store/metric.effects.ts b/src/app/features/metric/store/metric.effects.ts index 59104292e1e..e800aed54da 100644 --- a/src/app/features/metric/store/metric.effects.ts +++ b/src/app/features/metric/store/metric.effects.ts @@ -7,6 +7,7 @@ import {selectCurrentProjectId} from '../../project/store/project.reducer'; import {PersistenceService} from '../../../core/persistence/persistence.service'; import {selectMetricFeatureState} from './metric.selectors'; import {SnackOpen} from '../../../core/snack/store/snack.actions'; +import {T} from '../../../t.const'; @Injectable() export class MetricEffects { @@ -35,7 +36,7 @@ export class MetricEffects { ), mapTo(new SnackOpen({ type: 'SUCCESS', - msg: 'Metric successfully saved' + msg: T.F.METRIC.SNACK.SAVE_METRIC })), ); diff --git a/src/app/t.const.ts b/src/app/t.const.ts index cfb7f973ccd..ccab00e6c67 100644 --- a/src/app/t.const.ts +++ b/src/app/t.const.ts @@ -7,6 +7,25 @@ export const T = { 'TITLE': 'BL.TITLE' }, 'F': { + 'METRIC': { + 'EVAL_FORM': { + 'HELP_P1': 'F.METRIC.EVAL_FORM.HELP_P1', + 'HELP_LINK_TXT': 'F.METRIC.EVAL_FORM.HELP_LINK_TXT', + 'HELP_H1': 'F.METRIC.EVAL_FORM.HELP_H1', + 'HELP_P2': 'F.METRIC.EVAL_FORM.HELP_P2', + 'MOOD': 'F.METRIC.EVAL_FORM.MOOD', + 'MOOD_HINT': 'F.METRIC.EVAL_FORM.MOOD_HINT', + 'PRODUCTIVITY': 'F.METRIC.EVAL_FORM.PRODUCTIVITY', + 'PRODUCTIVITY_HINT': 'F.METRIC.EVAL_FORM.PRODUCTIVITY_HINT', + 'OBSTRUCTIONS': 'F.METRIC.EVAL_FORM.OBSTRUCTIONS', + 'IMPROVEMENTS': 'F.METRIC.EVAL_FORM.IMPROVEMENTS', + 'IMPROVEMENTS_TOMORROW': 'F.METRIC.EVAL_FORM.IMPROVEMENTS_TOMORROW', + 'NOTES': 'F.METRIC.EVAL_FORM.NOTES' + }, + 'SNACK': { + 'SAVE_METRIC': 'F.METRIC.SNACK.SAVE_METRIC' + } + }, 'ATTACHMENT': { 'DIALOG_EDIT': { 'ADD_ATTACHMENT': 'F.ATTACHMENT.DIALOG_EDIT.ADD_ATTACHMENT', @@ -479,6 +498,9 @@ export const T = { 'SUCCESS': 'S.SYNC.SUCCESS' } }, + 'V': { + 'E_1TO10': 'V.E_1TO10' + }, 'WW': { 'ADD_MORE': 'WW.ADD_MORE', 'ADD_SOME_TASKS': 'WW.ADD_SOME_TASKS', diff --git a/src/assets/i18n/en.json b/src/assets/i18n/en.json index b093bd826ae..35f24fcf3d1 100644 --- a/src/assets/i18n/en.json +++ b/src/assets/i18n/en.json @@ -7,6 +7,25 @@ "TITLE": "Backlog" }, "F": { + "METRIC": { + "EVAL_FORM": { + "HELP_P1": "Time for a little self evaluation! Your answers here are saved and provide you with a little bit of statistics on how you work in the metrics section. Furthermore the suggestions for tomorrow will appear above your task list the next day.", + "HELP_LINK_TXT": "Go to metrics section", + "HELP_H1": "Why should I care?", + "HELP_P2": "This is intended to be less about calculating exact metrics or becoming machine like efficient in all you do than it is about improving how you feel about your work. It can be helpful to evaluate pain points in your daily routine, as well as it is to find factors that help you out. Being just a little bit systematic about it hopefully helps to get a better grip on these and to improve what you can.", + "MOOD": "How do you feel?", + "MOOD_HINT": "1: Awful – 10: Splendid", + "PRODUCTIVITY": "How efficient did you work?", + "PRODUCTIVITY_HINT": "1: Haven't even started – 10: Enormously efficient", + "OBSTRUCTIONS": "What hindered your productivity?", + "IMPROVEMENTS": "What improved your productivity?", + "IMPROVEMENTS_TOMORROW": "What could you do to improve tomorrow?", + "NOTES": "Notes for tomorrow" + }, + "SNACK": { + "SAVE_METRIC": "Metric successfully saved" + } + }, "ATTACHMENT": { "DIALOG_EDIT": { "ADD_ATTACHMENT": "Add Attachment", @@ -480,6 +499,9 @@ "SUCCESS": "Data imported" } }, + "V": { + "E_1TO10": "Please enter a value between 1 and 10" + }, "WW": { "ADD_MORE": "Add more", "ADD_SOME_TASKS": "Add some tasks to plan your day!",