mirror of
https://github.com/johannesjo/super-productivity.git
synced 2026-07-17 16:37:43 +00:00
feat(weekPlanner): add translations
This commit is contained in:
parent
9f8f627baf
commit
82b89b52e4
12 changed files with 70 additions and 37 deletions
|
|
@ -47,9 +47,7 @@
|
|||
routerLinkActive="isActiveRoute"
|
||||
>
|
||||
<mat-icon>edit_calendar</mat-icon>
|
||||
<!-- <span class="text">{{T.MH.SCHEDULED|translate}}</span>-->
|
||||
<!-- TODO translate -->
|
||||
<span class="text">Plan</span>
|
||||
<span class="text">{{ T.MH.PLANNER|translate }}</span>
|
||||
</button>
|
||||
|
||||
<!-- class title missleading, but works ;) -->
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
>
|
||||
<button mat-button>
|
||||
<mat-icon>add</mat-icon>
|
||||
Add new
|
||||
{{ T.G.ADD|translate }}
|
||||
</button>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ import { ChangeDetectionStrategy, Component, Input } from '@angular/core';
|
|||
import { TasksModule } from '../../tasks/tasks.module';
|
||||
import { UiModule } from '../../../ui/ui.module';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { T } from 'src/app/t.const';
|
||||
|
||||
@Component({
|
||||
selector: 'add-task-inline',
|
||||
|
|
@ -12,6 +13,8 @@ import { CommonModule } from '@angular/common';
|
|||
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||
})
|
||||
export class AddTaskInlineComponent {
|
||||
T: typeof T = T;
|
||||
|
||||
@Input() planForDay?: string;
|
||||
|
||||
isShowAddTask = false;
|
||||
|
|
|
|||
|
|
@ -34,6 +34,6 @@
|
|||
[task]="task"
|
||||
></planner-task>
|
||||
} @if (allTasks.length === 0) {
|
||||
<div class="empty">No tasks</div>
|
||||
<div class="empty">{{ T.F.PLANNER.NO_TASKS|translate }}</div>
|
||||
}
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -15,6 +15,7 @@ import { Tag } from '../../tag/tag.model';
|
|||
import { selectPlannerState } from '../store/planner.selectors';
|
||||
import { TaskService } from '../../tasks/task.service';
|
||||
import { PlannerPlanViewService } from '../planner-plan-view/planner-plan-view.service';
|
||||
import { T } from 'src/app/t.const';
|
||||
|
||||
@Component({
|
||||
selector: 'add-task-panel',
|
||||
|
|
@ -23,6 +24,7 @@ import { PlannerPlanViewService } from '../planner-plan-view/planner-plan-view.s
|
|||
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||
})
|
||||
export class AddTaskPanelComponent {
|
||||
T: typeof T = T;
|
||||
@Output() closePanel = new EventEmitter<void>();
|
||||
|
||||
ADD_TASK_PANEL = ADD_TASK_PANEL_ID;
|
||||
|
|
|
|||
|
|
@ -1,12 +1,6 @@
|
|||
<h1 mat-dialog-title>
|
||||
<!-- <mat-icon-->
|
||||
<!-- class="dialog-header-icon"-->
|
||||
<!-- svgIcon="caldav"-->
|
||||
<!-- ></mat-icon>-->
|
||||
<!-- <span>{{T.F.CALDAV.DIALOG_INITIAL.TITLE|translate}}</span>-->
|
||||
|
||||
<mat-icon class="dialog-header-icon">edit_calendar</mat-icon>
|
||||
<span>Add planned tasks to Today</span>
|
||||
<span>{{ T.F.PLANNER.D.ADD_PLANNED.TITLE|translate }}</span>
|
||||
</h1>
|
||||
|
||||
<mat-dialog-content>
|
||||
|
|
@ -22,8 +16,7 @@
|
|||
mat-button
|
||||
type="button"
|
||||
>
|
||||
<!-- {{ T.G.CANCEL|translate }}-->
|
||||
Dismiss
|
||||
{{ T.G.DISMISS|translate }}
|
||||
</button>
|
||||
|
||||
<button
|
||||
|
|
@ -32,7 +25,6 @@
|
|||
(click)="addTasksToToday()"
|
||||
>
|
||||
<mat-icon>wb_sunny</mat-icon>
|
||||
<!-- {{ T.G.SAVE|translate }}-->
|
||||
Add to today
|
||||
{{ T.F.PLANNER.D.ADD_PLANNED.ADD_TO_TODAY|translate }}
|
||||
</button>
|
||||
</mat-dialog-actions>
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
<h4>Plan Task for Day</h4>
|
||||
<h4>{{ T.F.PLANNER.D.PLAN_FOR_DAY.TITLE|translate }}</h4>
|
||||
<mat-calendar
|
||||
[(selected)]="selectedDate"
|
||||
[minDate]="minDate"
|
||||
|
|
@ -10,8 +10,7 @@
|
|||
class="msg"
|
||||
*ngIf="data.task.reminderId"
|
||||
>
|
||||
This will remove the reminder from the task.<br />
|
||||
Press Escape to cancel.
|
||||
{{ T.F.PLANNER.D.PLAN_FOR_DAY.REMINDER_WARNING|translate }}
|
||||
</div>
|
||||
|
||||
<!--<mat-dialog-actions align="end">-->
|
||||
|
|
|
|||
|
|
@ -70,12 +70,20 @@ export class DialogPlanForDayComponent implements AfterViewInit {
|
|||
oldTagIds: this.data.task.tagIds,
|
||||
}),
|
||||
);
|
||||
this._snackService.open({ type: 'SUCCESS', msg: `Task planned for ${newDay}` });
|
||||
this._snackService.open({
|
||||
type: 'SUCCESS',
|
||||
msg: T.F.PLANNER.S.TASK_PLANNED_FOR,
|
||||
translateParams: { date: newDay },
|
||||
});
|
||||
} else {
|
||||
this._store.dispatch(
|
||||
PlannerActions.planTaskForDay({ task: this.data.task, day: newDay }),
|
||||
);
|
||||
this._snackService.open({ type: 'SUCCESS', msg: `Task planned for ${newDay}` });
|
||||
this._snackService.open({
|
||||
type: 'SUCCESS',
|
||||
msg: T.F.PLANNER.S.TASK_PLANNED_FOR,
|
||||
translateParams: { date: newDay },
|
||||
});
|
||||
}
|
||||
this.close();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,18 +7,9 @@
|
|||
} {{ day.dayDate|date:'EEE' }}
|
||||
<span class="date">{{ day.dayDate|date:'d.M.' }}</span>
|
||||
</div>
|
||||
<div class="day-estimate">
|
||||
{{ day.timeEstimate |roundDuration|msToString }}
|
||||
<!-- <mat-icon svgIcon="estimate_remaining"></mat-icon>-->
|
||||
<!-- / {{ day.timeLimit }}h-->
|
||||
</div>
|
||||
<div class="day-estimate">{{ day.timeEstimate |roundDuration|msToString }}</div>
|
||||
|
||||
<div class="normal-tasks">
|
||||
<!-- <div class="section-title">-->
|
||||
<!-- <div>regular</div>-->
|
||||
<!-- <!– <div class="estimate">3h</div>–>-->
|
||||
<!-- </div>-->
|
||||
|
||||
<div
|
||||
class="normal-tasks-items"
|
||||
cdkDropList
|
||||
|
|
@ -44,7 +35,7 @@
|
|||
|
||||
<!-- -->
|
||||
@if (day.tasks.length === 0 && day.noStartTimeRepeatProjections.length === 0) {
|
||||
<div class="empty">No tasks</div>
|
||||
<div class="empty">{{ T.F.PLANNER.NO_TASKS|translate }}</div>
|
||||
}
|
||||
</div>
|
||||
|
||||
|
|
@ -102,7 +93,7 @@
|
|||
|
||||
<!-- -->
|
||||
@if (day.scheduledIItems.length === 0) {
|
||||
<div class="empty">No scheduled items</div>
|
||||
<div class="empty">{{ T.F.PLANNER.PLAN_VIEW.NO_SCHEDULED_ITEMS|translate }}</div>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -139,8 +139,7 @@
|
|||
mat-menu-item
|
||||
>
|
||||
<mat-icon>check</mat-icon>
|
||||
Mark as done
|
||||
<!-- {{ T.F.TASK.CMP.OPEN_ATTACH|translate }}-->
|
||||
{{ T.F.TASK.CMP.MARK_DONE|translate }}
|
||||
</button>
|
||||
|
||||
<button
|
||||
|
|
@ -149,8 +148,7 @@
|
|||
mat-menu-item
|
||||
>
|
||||
<mat-icon>undo</mat-icon>
|
||||
Mark as undone
|
||||
<!-- {{ T.F.TASK.CMP.OPEN_ATTACH|translate }}-->
|
||||
{{ T.F.TASK.CMP.MARK_UNDONE|translate }}
|
||||
</button>
|
||||
|
||||
<button
|
||||
|
|
|
|||
|
|
@ -656,6 +656,25 @@ const T = {
|
|||
TRANSITIONS_LOADED: 'F.OPEN_PROJECT.S.TRANSITIONS_LOADED',
|
||||
},
|
||||
},
|
||||
PLANNER: {
|
||||
NO_TASKS: 'F.PLANNER.NO_TASKS',
|
||||
D: {
|
||||
ADD_PLANNED: {
|
||||
ADD_TO_TODAY: 'F.PLANNER.D.ADD_PLANNED.ADD_TO_TODAY',
|
||||
TITLE: 'F.PLANNER.D.ADD_PLANNED.TITLE',
|
||||
},
|
||||
PLAN_FOR_DAY: {
|
||||
REMINDER_WARNING: 'F.PLANNER.D.PLAN_FOR_DAY.REMINDER_WARNING',
|
||||
TITLE: 'F.PLANNER.D.PLAN_FOR_DAY.TITLE',
|
||||
},
|
||||
},
|
||||
PLAN_VIEW: {
|
||||
NO_SCHEDULED_ITEMS: 'F.PLANNER.PLAN_VIEW.NO_SCHEDULED_ITEMS',
|
||||
},
|
||||
S: {
|
||||
TASK_PLANNED_FOR: 'F.PLANNER.S.TASK_PLANNED_FOR',
|
||||
},
|
||||
},
|
||||
POMODORO: {
|
||||
BACK_TO_WORK: 'F.POMODORO.BACK_TO_WORK',
|
||||
BREAK_IS_DONE: 'F.POMODORO.BREAK_IS_DONE',
|
||||
|
|
@ -1280,6 +1299,7 @@ const T = {
|
|||
S_ERR_INVALID_DATA: 'FILE_IMEX.S_ERR_INVALID_DATA',
|
||||
},
|
||||
G: {
|
||||
ADD: 'G.ADD',
|
||||
CANCEL: 'G.CANCEL',
|
||||
CLOSE: 'G.CLOSE',
|
||||
DELETE: 'G.DELETE',
|
||||
|
|
@ -1560,6 +1580,7 @@ const T = {
|
|||
METRICS: 'MH.METRICS',
|
||||
NOTES: 'MH.NOTES',
|
||||
NOTES_PANEL_INFO: 'MH.NOTES_PANEL_INFO',
|
||||
PLANNER: 'MH.PLANNER',
|
||||
PROCRASTINATE: 'MH.PROCRASTINATE',
|
||||
PROJECTS: 'MH.PROJECTS',
|
||||
PROJECT_MENU: 'MH.PROJECT_MENU',
|
||||
|
|
|
|||
|
|
@ -646,6 +646,25 @@
|
|||
"TRANSITIONS_LOADED": "Transitions loaded. Use the selects below to assign them"
|
||||
}
|
||||
},
|
||||
"PLANNER": {
|
||||
"NO_TASKS": "No tasks",
|
||||
"D": {
|
||||
"ADD_PLANNED": {
|
||||
"ADD_TO_TODAY": "Add to Today",
|
||||
"TITLE": "Add planned tasks to Today"
|
||||
},
|
||||
"PLAN_FOR_DAY": {
|
||||
"REMINDER_WARNING": "This will remove the reminder from the task! Press Escape to cancel.",
|
||||
"TITLE": "Plan Task for Day"
|
||||
}
|
||||
},
|
||||
"PLAN_VIEW": {
|
||||
"NO_SCHEDULED_ITEMS": "No scheduled items"
|
||||
},
|
||||
"S": {
|
||||
"TASK_PLANNED_FOR": "Task planned for {{date}}"
|
||||
}
|
||||
},
|
||||
"POMODORO": {
|
||||
"BACK_TO_WORK": "Back to work!",
|
||||
"BREAK_IS_DONE": "Your break is done!",
|
||||
|
|
@ -1257,6 +1276,7 @@
|
|||
"S_ERR_INVALID_DATA": "Import failed: Invalid JSON"
|
||||
},
|
||||
"G": {
|
||||
"ADD": "Add",
|
||||
"CANCEL": "Cancel",
|
||||
"CLOSE": "Close",
|
||||
"DELETE": "Delete",
|
||||
|
|
@ -1534,6 +1554,7 @@
|
|||
"METRICS": "Metrics",
|
||||
"NOTES": "Notes",
|
||||
"NOTES_PANEL_INFO": "Notes can only be shown from the timeline and the regular task list views.",
|
||||
"PLANNER": "Plan",
|
||||
"PROCRASTINATE": "Procrastinate",
|
||||
"PROJECTS": "Projects",
|
||||
"PROJECT_MENU": "Project Menu",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue