Skip to content

Commit

Permalink
#8 Add EN suffix to frontend property to display the defult language
Browse files Browse the repository at this point in the history
Signed-off-by: Sven Strittmatter <[email protected]>
  • Loading branch information
Weltraumschaf committed May 17, 2022
1 parent 21561a7 commit b32de49
Show file tree
Hide file tree
Showing 14 changed files with 25 additions and 25 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<h2>
<span
jhiTranslate="teamDojoApp.customTeamSkill.completed"
[translateValues]="{ team: teamSkill?.team?.title, skill: teamSkill?.skill?.title }"
[translateValues]="{ team: teamSkill?.team?.title, skill: teamSkill?.skill?.titleEN }"
>completed the skill</span
>
</h2>
Expand All @@ -27,7 +27,7 @@ <h4>
<dt><span jhiTranslate="teamDojoApp.teamSkill.skill">Skill</span></dt>
<dd>
<div *ngIf="teamSkill?.skill?.id">
<a [routerLink]="['/skill', teamSkill?.skill?.id, 'view']">{{ teamSkill?.skill?.title }}</a>
<a [routerLink]="['/skill', teamSkill?.skill?.id, 'view']">{{ teamSkill?.skill?.titleEN }}</a>
</div>
</dd>
<dt><span jhiTranslate="teamDojoApp.teamSkill.completedAt">Completed At</span></dt>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,20 +62,20 @@ export class BreadcrumbService {
}
if (this.dimension !== null && typeof this.dimension !== 'undefined') {
const url = this.router.createUrlTree(path, { queryParams: this.params }).toString();
breadcrumbs.push(new Breadcrumb(this.dimension.title, url, false));
breadcrumbs.push(new Breadcrumb(this.dimension.titleEN, url, false));
}
if (this.level !== null && typeof this.level !== 'undefined') {
const url = this.router.createUrlTree(path, { queryParams: { level: this.level.id } }).toString();
breadcrumbs.push(new Breadcrumb(this.level.title, url, false));
breadcrumbs.push(new Breadcrumb(this.level.titleEN, url, false));
}
if (this.badge !== null && typeof this.badge !== 'undefined') {
const url = this.router.createUrlTree(path, { queryParams: { badge: this.badge.id } }).toString();
breadcrumbs.push(new Breadcrumb(this.badge.title, url, false));
breadcrumbs.push(new Breadcrumb(this.badge.titleEN, url, false));
}
if (this.skill !== null && typeof this.skill !== 'undefined') {
path.push('skills', this.skill.id);
const url = this.router.createUrlTree(path, { queryParams: this.params }).toString();
breadcrumbs.push(new Breadcrumb(this.skill.title, url, false));
breadcrumbs.push(new Breadcrumb(this.skill.titleEN, url, false));
}
if (breadcrumbs.length > 0) {
breadcrumbs[breadcrumbs.length - 1].active = true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ <h4>{{ 'teamDojoApp.overview.achievements.title' | translate }}</h4>
</ng-template>
</div>
<div class="dimension-name" (click)="selectItem('dimension', dimension.id); $event.stopPropagation()">
{{ dimension.title }}
{{ dimension.titleEN }}
<fa-icon
class="filter-icon"
[ngClass]="{ 'visible-filter-icon': activeItemIds.dimension === dimension.id }"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ <h4>{{ 'teamDojoApp.overview.skills.title' | translate }}</h4>
[routerLink]="['/overview', 'skills', skill.id]"
[queryParams]="{ level: activeLevel?.id, badge: activeBadge?.id }"
>
<a class="#" class="text-dark mb-1 skill-title">{{ skill.title }}</a>
<a class="#" class="text-dark mb-1 skill-title">{{ skill.titleEN }}</a>
<div class="d-flex align-items-end ms-auto count-teams">
<span class="mb-auto">{{ getRelevantTeams(skill) }}</span>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export class OverviewSkillsComponent implements OnInit, OnChanges {
generalSkillsIds: number[] = [];
search$: Subject<string> = new Subject();
search = '';
orderBy: keyof Skill = 'title';
orderBy: keyof Skill = 'titleEN';
hasAuthority = false;

constructor(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ import { ISkill } from 'app/entities/skill/skill.model';
@Pipe({ name: 'skillFilter' })
export class SkillFilterPipe implements PipeTransform {
transform(skills: ISkill[], searchString: string): ISkill[] {
return skills.filter(skill => (skill.title ?? '').toLowerCase().includes(searchString.toLowerCase()));
return skills.filter(skill => (skill.titleEN ?? '').toLowerCase().includes(searchString.toLowerCase()));
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<span>
<span class="skill-title">{{ skill?.title }}</span>
<span class="skill-title">{{ skill?.titleEN }}</span>
<span class="explanation">{{ 'teamDojoApp.customSkill.titleExplanationQuestion' | translate }}</span>
</span>

Expand Down Expand Up @@ -39,21 +39,21 @@
<span class="headline"> {{ 'teamDojoApp.teams.skills.details.desc' | translate }}</span>
<span class="explanation"> {{ 'teamDojoApp.customSkill.descriptionExplanationQuestion' | translate }}</span>
</div>
<markdown *ngIf="!!skill && !!skill.description" [data]="skill.description"></markdown>
<markdown *ngIf="!!skill && !!skill.descriptionEN" [data]="skill.descriptionEN"></markdown>
</div>
<div class="skill-impl desc-block">
<div class="skill-desc-block-headline">
<span class="headline"> {{ 'teamDojoApp.teams.skills.details.implementation' | translate }}</span>
<span class="explanation"> {{ 'teamDojoApp.customSkill.implementationExplanationQuestion' | translate }}</span>
</div>
<markdown *ngIf="!!skill && !!skill.implementation" [data]="skill.implementation"></markdown>
<markdown *ngIf="!!skill && !!skill.implementationEN" [data]="skill.implementationEN"></markdown>
</div>
<div class="skill-validation desc-block">
<div class="skill-desc-block-headline">
<span class="headline"> {{ 'teamDojoApp.teams.skills.details.validation' | translate }}</span>
<span class="explanation"> {{ 'teamDojoApp.customSkill.validationExplanationQuestion' | translate }}</span>
</div>
<markdown *ngIf="!!skill && !!skill.validation" [data]="skill.validation"></markdown>
<markdown *ngIf="!!skill && !!skill.validationEN" [data]="skill.validationEN"></markdown>
</div>

<div class="row skill-metadata">
Expand Down Expand Up @@ -107,14 +107,14 @@ <h6>
'fa training-is-official': true
}"
></span>
<a *ngIf="training.link" [href]="training.link" target="_blank">{{ training.title }}</a>
<span *ngIf="!training.link">{{ training.title }}</span> <small>({{ training.contact }})</small>
<a *ngIf="training.link" [href]="training.link" target="_blank">{{ training.titleEN }}</a>
<span *ngIf="!training.link">{{ training.titleEN }}</span> <small>({{ training.contact }})</small>
<div *ngIf="training.suggestedBy">
<small jhiTranslate="teamDojoApp.teams.skills.details.trainings.add.suggestedBy"></small
><small>: {{ training.suggestedBy }}</small>
</div>
</h6>
<p>{{ training.description }}</p>
<p>{{ training.descriptionEN }}</p>
</div>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ <h4 class="modal-title" jhiTranslate="teamDojoApp.teams.skills.details.trainings
<label class="form-control-label" jhiTranslate="teamDojoApp.teams.skills.details.trainings.add.title" for="field_title"
>Title</label
>
<input type="text" class="form-control" name="title" id="field_title" [(ngModel)]="training.title" required maxlength="80" />
<input type="text" class="form-control" name="title" id="field_title" [(ngModel)]="training.titleEN" required maxlength="80" />
<div [hidden]="!(addForm.controls.title?.dirty && addForm.controls.title?.invalid)">
<small
class="form-text text-danger"
Expand Down Expand Up @@ -45,7 +45,7 @@ <h4 class="modal-title" jhiTranslate="teamDojoApp.teams.skills.details.trainings
class="form-control"
name="description"
id="field_description"
[(ngModel)]="training.description"
[(ngModel)]="training.descriptionEN"
maxlength="100"
/>
<div [hidden]="!(addForm.controls.description?.dirty && addForm.controls.description?.invalid)">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ <h4>{{ 'teamDojoApp.teams.achievements.title' | translate }}</h4>
</ng-template>
</div>
<div class="dimension-name" (click)="selectItem('dimension', dimension.id); $event.stopPropagation()">
{{ dimension.title }}
{{ dimension.titleEN }}
<fa-icon
class="filter-icon"
[ngClass]="{ 'visible-filter-icon': activeItemIds.dimension === dimension.id }"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ <h4 class="modal-title">{{ 'teamDojoApp.teams.status.' + (editMode ? 'edit' : 'c
[ngValue]="getSelected(team.participations, dimensionOption)"
*ngFor="let dimensionOption of dimensions; trackBy: trackDimensionById"
>
{{ dimensionOption.title }}
{{ dimensionOption.titleEN }}
</option>
</select>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ <h6 class="team-slogan mb-0">{{ team?.slogan }}</h6>
<div class="mx-2 mb-2" *ngFor="let highestLevel of highestAchievedLevels">
<div>
<div class="d-flex justify-content-center">
<h6 class="mb-0">{{ highestLevel.dimension?.title }}</h6>
<h6 class="mb-0">{{ highestLevel.dimension?.titleEN }}</h6>
</div>
<div class="d-flex">
<jhi-achievement-item
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ <h2 data-cy="commentDetailsHeading"><span jhiTranslate="teamDojoApp.comment.deta
<dt><span jhiTranslate="teamDojoApp.comment.skill">Skill</span></dt>
<dd>
<div *ngIf="comment.skill">
<a [routerLink]="['/skill', comment.skill?.id, 'view']">{{ comment.skill?.title }}</a>
<a [routerLink]="['/skill', comment.skill?.id, 'view']">{{ comment.skill?.titleEN }}</a>
</div>
</dd>
</dl>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ <h2 id="page-heading" data-cy="CommentHeading">
</td>
<td>
<div *ngIf="comment.skill">
<a [routerLink]="['/skill', comment.skill?.id, 'view']">{{ comment.skill?.title }}</a>
<a [routerLink]="['/skill', comment.skill?.id, 'view']">{{ comment.skill?.titleEN }}</a>
</div>
</td>
<td class="text-end">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ <h2 id="jhi-comment-heading" data-cy="CommentCreateUpdateHeading" jhiTranslate="
[ngValue]="skillOption.id === editForm.get('skill')!.value?.id ? editForm.get('skill')!.value : skillOption"
*ngFor="let skillOption of skillsSharedCollection; trackBy: trackSkillById"
>
{{ skillOption.title }}
{{ skillOption.titleEN }}
</option>
</select>
</div>
Expand Down

0 comments on commit b32de49

Please sign in to comment.