Merge pull request #4414 from MaximilianKrambach/smallFixes

marking and repairing translations
This commit is contained in:
Emanuel Schütze 2019-02-27 12:04:01 +01:00 committed by GitHub
commit f9ea181a93
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 74 additions and 19 deletions

View File

@ -8,7 +8,7 @@
<mat-divider></mat-divider> <mat-divider></mat-divider>
</div> </div>
<mat-option *ngFor="let selectedItem of filteredItems | async" [value]="selectedItem.id"> <mat-option *ngFor="let selectedItem of filteredItems | async" [value]="selectedItem.id">
{{ selectedItem.getTitle(translate) }} {{ selectedItem.getTitle() | translate }}
</mat-option> </mat-option>
</mat-select> </mat-select>
</mat-form-field> </mat-form-field>

View File

@ -12,7 +12,7 @@ export class AssignmentSortListService extends BaseSortListService<ViewAssignmen
sortAscending: true, sortAscending: true,
options: [ options: [
{ property: 'assignment', label: 'Name' }, { property: 'assignment', label: 'Name' },
{ property: 'phase' }, { property: 'phase', label: 'Phase' },
{ property: 'candidateAmount', label: 'Number of candidates' } { property: 'candidateAmount', label: 'Number of candidates' }
] ]
}; };

View File

@ -10,7 +10,17 @@ export class MediafilesSortListService extends BaseSortListService<ViewMediafile
public sortOptions: OsSortingDefinition<ViewMediafile> = { public sortOptions: OsSortingDefinition<ViewMediafile> = {
sortProperty: 'title', sortProperty: 'title',
sortAscending: true, sortAscending: true,
options: [{ property: 'title' }, { property: 'type' }, { property: 'size' }] options: [
{ property: 'title' },
{
property: 'type',
label: this.translate.instant('Type')
},
{
property: 'size',
label: this.translate.instant('Size')
}
]
}; };
protected name = 'Mediafile'; protected name = 'Mediafile';
} }

View File

@ -2,7 +2,7 @@
<!-- Title --> <!-- Title -->
<div class="title-slot"> <div class="title-slot">
<h2 *ngIf="workflow"> <h2 *ngIf="workflow">
{{ workflow }} {{ workflow.name | translate }}
</h2> </h2>
</div> </div>
@ -19,7 +19,7 @@
<div class="title-line"> <div class="title-line">
<strong> <strong>
<span translate>First state</span>: <span translate>First state</span>:
<span>{{ workflow.firstState }}</span> <span>{{ workflow.firstState.name | translate }}</span>
</strong> </strong>
</div> </div>
@ -66,7 +66,7 @@
[disableRipple]="true" [disableRipple]="true"
[ngClass]="getStateCssColor(state[perm.selector])" [ngClass]="getStateCssColor(state[perm.selector])"
> >
{{ state[perm.selector] }} {{ state[perm.selector] | translate }}
</mat-basic-chip> </mat-basic-chip>
</div> </div>
<div <div
@ -76,7 +76,19 @@
[matMenuTriggerData]="{ state: state }" [matMenuTriggerData]="{ state: state }"
> >
<div class="inner-table"> <div class="inner-table">
{{ state.next_states_id.length > 0 ? state.getNextStates(workflow.workflow) : '' }} <div *ngIf="!state.next_states_id.length">
-
</div>
<div *ngIf="state.next_states_id.length">
<span
*ngFor="
let nextstate of state.getNextStates(workflow.workflow);
let last = last
"
>
{{ nextstate.name | translate }}<span *ngIf="!last">,&nbsp;</span>
</span>
</div>
</div> </div>
</div> </div>
<div <div

View File

@ -11,7 +11,7 @@
<span translate>Name</span> <span translate>Name</span>
</mat-header-cell> </mat-header-cell>
<mat-cell *matCellDef="let workflow" (click)="onClickWorkflow(workflow)"> <mat-cell *matCellDef="let workflow" (click)="onClickWorkflow(workflow)">
{{ workflow }} {{ workflow.name | translate }}
</mat-cell> </mat-cell>
</ng-container> </ng-container>

View File

@ -122,12 +122,19 @@ export class MotionImportService extends BaseImportService<ViewMotion> {
} }
} }
const updateModels = this.repo.getMotionDuplicates(newEntry); const updateModels = this.repo.getMotionDuplicates(newEntry);
return { const entry: NewEntry<ViewMotion> = {
newEntry: newEntry, newEntry: newEntry,
duplicates: updateModels, duplicates: updateModels,
status: updateModels.length ? 'error' : 'new', status: updateModels.length ? 'error' : 'new',
errors: updateModels.length ? ['Duplicates'] : [] errors: updateModels.length ? ['Duplicates'] : []
}; };
if (!entry.newEntry.title) {
this.setError(entry, 'Title');
}
if (!entry.newEntry.text) {
this.setError(entry, 'Title');
}
return entry;
} }
/** /**

View File

@ -53,7 +53,9 @@
<div class="groupsCell"> <div class="groupsCell">
<span *ngIf="user.groups && user.groups.length"> <span *ngIf="user.groups && user.groups.length">
<mat-icon>people</mat-icon> <mat-icon>people</mat-icon>
{{ user.groups }} <span *ngFor="let group of user.groups; let last = last"
>{{ group.getTitle() | translate }}<span *ngIf="!last">,&nbsp;</span>
</span>
</span> </span>
<br *ngIf="user.groups && user.structureLevel" /> <br *ngIf="user.groups && user.structureLevel" />
<span *ngIf="user.structureLevel"> <span *ngIf="user.structureLevel">

View File

@ -6,6 +6,7 @@ import { User } from 'app/shared/models/users/user';
import { ViewUser } from '../models/view-user'; import { ViewUser } from '../models/view-user';
import { GroupRepositoryService } from 'app/core/repositories/users/group-repository.service'; import { GroupRepositoryService } from 'app/core/repositories/users/group-repository.service';
import { UserRepositoryService } from 'app/core/repositories/users/user-repository.service'; import { UserRepositoryService } from 'app/core/repositories/users/user-repository.service';
import { TranslateService } from '@ngx-translate/core';
@Injectable({ @Injectable({
providedIn: 'root' providedIn: 'root'
@ -16,7 +17,7 @@ export class UserFilterListService extends BaseFilterListService<User, ViewUser>
private userGroupFilterOptions = { private userGroupFilterOptions = {
isActive: false, isActive: false,
property: 'groups_id', property: 'groups_id',
label: 'User Group', label: 'Groups',
options: [] options: []
}; };
@ -29,21 +30,30 @@ export class UserFilterListService extends BaseFilterListService<User, ViewUser>
}, },
{ {
property: 'is_active', property: 'is_active',
label: 'Active', label: this.translate.instant('Active'),
isActive: false, isActive: false,
options: [{ condition: true, label: 'Is active' }, { condition: false, label: 'Is not active' }] options: [
{ condition: true, label: 'Is active' },
{ condition: false, label: this.translate.instant('Is not active') }
]
}, },
{ {
property: 'is_committee', property: 'is_committee',
label: 'Committee', label: this.translate.instant('Committee'),
isActive: false, isActive: false,
options: [{ condition: true, label: 'Is a committee' }, { condition: false, label: 'Is not a committee' }] options: [
{ condition: true, label: 'Is a committee' },
{ condition: false, label: this.translate.instant('Is not a committee') }
]
}, },
{ {
property: 'is_last_email_send', property: 'is_last_email_send',
label: 'Last email send', label: 'Last email send',
isActive: false, isActive: false,
options: [{ condition: true, label: 'Got an email' }, { condition: false, label: "Didn't get an email" }] options: [
{ condition: true, label: this.translate.instant('Got an email') },
{ condition: false, label: this.translate.instant("Didn't get an email") }
]
} }
]; ];
@ -55,7 +65,21 @@ export class UserFilterListService extends BaseFilterListService<User, ViewUser>
return [this.userGroupFilterOptions].concat(this.staticFilterOptions); return [this.userGroupFilterOptions].concat(this.staticFilterOptions);
} }
public constructor(store: StorageService, private groupRepo: GroupRepositoryService, repo: UserRepositoryService) { /**
* Contructor. Subscribes to incoming group definitions.
*
* @param store
* @param groupRepo
* @param repo
* @param translate marking some translations that are unique here
*
*/
public constructor(
store: StorageService,
private groupRepo: GroupRepositoryService,
repo: UserRepositoryService,
private translate: TranslateService
) {
super(store, repo); super(store, repo);
this.subscribeGroups(); this.subscribeGroups();
} }

View File

@ -18,8 +18,8 @@ export class UserSortListService extends BaseSortListService<ViewUser> {
{ property: 'last_name', label: 'Surname' }, { property: 'last_name', label: 'Surname' },
{ property: 'is_present', label: 'Presence' }, { property: 'is_present', label: 'Presence' },
{ property: 'is_active', label: 'Is active' }, { property: 'is_active', label: 'Is active' },
{ property: 'is_committee', label: 'Is Committee' }, { property: 'is_committee', label: 'Is committee' },
{ property: 'number', label: 'Number' }, { property: 'number', label: 'Participant number' },
{ property: 'structure_level', label: 'Structure level' }, { property: 'structure_level', label: 'Structure level' },
{ property: 'comment' } { property: 'comment' }
// TODO email send? // TODO email send?