Skip to content
Snippets Groups Projects
Commit 431453e3 authored by Lukas Haase's avatar Lukas Haase
Browse files

i18n support

parent 1b85db95
No related merge requests found
......@@ -13,27 +13,27 @@
<ars-fill></ars-fill>
<ars-col ars-btn-wrp [xp]="16" [extra]="true">
<mat-menu #sortMenu>
<button mat-menu-item (click)="sortTime(true)">Newest</button>
<button mat-menu-item (click)="sortTime()">Oldest</button>
<button mat-menu-item (click)="sortScore(true)">Score</button>
<button mat-menu-item (click)="sortTime(true)">{{'question-wall.sort-new' | translate}}</button>
<button mat-menu-item (click)="sortTime()">{{'question-wall.sort-old' | translate}}</button>
<button mat-menu-item (click)="sortScore(true)">{{'question-wall.sort-score' | translate}}</button>
</mat-menu>
<mat-menu #filterMenu>
<button mat-menu-item (click)="filterFavorites()">
<mat-icon>star</mat-icon>
<span>Favorite</span>
<span>{{'question-wall.filter-favorite' | translate}}</span>
</button>
<button mat-menu-item (click)="filterFavorites()">
<button mat-menu-item (click)="filterApproved()">
<mat-icon>check_circle</mat-icon>
<span>approved</span>
<span>{{'question-wall.filter-approved' | translate}}</span>
</button>
<button mat-menu-item (click)="filterFavorites()">
<button mat-menu-item (click)="filterDisapproved()">
<mat-icon>block</mat-icon>
<span>disapproved</span>
<span>{{'question-wall.filter-disapproved' | translate}}</span>
</button>
</mat-menu>
<button ars-btn [mat-menu-trigger-for]="sortMenu" matRipple><i>sort</i><p>Sort</p></button>
<button ars-btn [mat-menu-trigger-for]="sortMenu" matRipple><i>sort</i><p>{{'question-wall.sort' | translate}}</p></button>
<button ars-btn [mat-menu-trigger-for]="filterMenu" matRipple><i>filter_list</i><p>Filter</p></button>
<button ars-btn (click)="openUserMap()" matRipple><i>person</i><p>user</p></button>
<button ars-btn (click)="openUserMap()" matRipple><i>person</i><p>{{'question-wall.filter-user'| translate}}</p></button>
</ars-col>
</ars-fill>
</ars-style-btn-material>
......@@ -73,7 +73,7 @@
</ars-col>
<ars-fill></ars-fill>
<ars-col ars-btn-wrp [xp]="48">
<button ars-btn (click)="deactivateFilter()" matRipple><i>remove_circle</i><p>remove filter</p></button>
<button ars-btn (click)="deactivateFilter()" matRipple><i>remove_circle</i><p>{{'question-wall.filter-remove' | translate}}</p></button>
</ars-col>
</ars-style-btn-material>
</ars-row>
......
......@@ -158,7 +158,7 @@ export class QuestionWallComponent implements OnInit, AfterViewInit, OnDestroy {
pushIncommingComment(comment: Comment): QuestionWallComment {
const qwComment = new QuestionWallComment(comment, false);
this.comments.push(qwComment);
this.comments = [qwComment, ...this.comments];
this.unreadComments++;
return qwComment;
}
......@@ -199,6 +199,7 @@ export class QuestionWallComponent implements OnInit, AfterViewInit, OnDestroy {
}
openUserMap() {
this.hasFilter = false;
this.createUserMap();
this.userSelection = true;
}
......@@ -268,7 +269,7 @@ export class QuestionWallComponent implements OnInit, AfterViewInit, OnDestroy {
}
filterApproved() {
this.filter('check_circle', 'question-wall.filter-disapproved', '',
this.filter('check_circle', 'question-wall.filter-approved', '',
x => x.comment.correct === CorrectWrong.CORRECT);
}
......
......@@ -128,9 +128,15 @@
"auto-renew-off-icon": "cancel",
"intro-title": "Fragen-Fokus",
"intro-desc": "Klick auf eine Frage oder navigiere mit der Leertaste vorwärts oder mit den Pfeiltasten vor und zurück.",
"sort": "Sortieren",
"sort-time": "Zeit",
"sort-score": "Bewertung",
"sort-new": "Neuste",
"sort-old": "Älteste",
"filter-user": "Benutzer",
"filter-favorite": "Favoriten"
"filter-favorite": "Favoriten",
"filter-approved": "Bejaht",
"filter-disapproved": "Verneint",
"filter-remove": "Filter entfernen"
}
}
......@@ -127,9 +127,15 @@
"auto-renew-off-icon": "cancel",
"intro-title": "Question Focus",
"intro-desc": "Click on a question or navigate forwards with the space bar or backwards and forwards with the arrow keys.",
"sort": "Sort",
"sort-time": "Time",
"sort-score": "Score",
"sort-new": "Newest",
"sort-old": "Oldest",
"filter-user": "User",
"filter-favorite": "Favorites"
"filter-favorite": "Favorites",
"filter-approved": "Affirmed",
"filter-disapproved": "Negated",
"filter-remove": "Remove Filter"
}
}
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment