Skip to content
Snippets Groups Projects
Commit 937e6e31 authored by Ruben Bimberg's avatar Ruben Bimberg :computer:
Browse files

Merge branch 'staging' into tag-cloud

parents 2b3fbcb9 b3c7402b
No related merge requests found
......@@ -22,8 +22,6 @@
</mat-label>
</ars-row>
</span>
<span *ngIf="keywords.length > 0"></span>
<ars-row class="list-container">
<div fxLayout="row" fxLayoutAlign="center center" fxFill>
<mat-progress-spinner *ngIf="isLoading" mode="indeterminate"></mat-progress-spinner>
......@@ -61,10 +59,7 @@
</mat-list>
</ars-row>
<ars-row>
<span *ngIf="keywords.length <= 0 && !this.isLoading">
<p>{{ 'spacy-dialog.empty-nouns' | translate }}</p>
</span>
<span *ngIf="!langSupported">
<span *ngIf="!isLoading && (!langSupported || !hasKeywordsFromSpacy)">
<p class="manual-input-title">{{ 'spacy-dialog.add-manually' | translate }}</p>
<textarea class="manual-input" [(ngModel)]="manualKeywords" (input)="manualKeywordsToKeywords()"></textarea>
</span>
......
......@@ -29,10 +29,11 @@ export class SpacyDialogComponent implements OnInit, AfterContentInit {
commentBodyChecked: string;
keywords: Keyword[] = [];
keywordsOriginal: Keyword[] = [];
hasKeywordsFromSpacy = false;
isLoading = false;
langSupported: boolean;
manualKeywords = '';
_concurrentEdits = 0
_concurrentEdits = 0;
constructor(
protected langService: LanguagetoolService,
......@@ -84,6 +85,9 @@ export class SpacyDialogComponent implements OnInit, AfterContentInit {
)
.subscribe(words => {
this.keywords = words;
this.keywords.sort((a, b) => a.word.localeCompare(b.word));
this.hasKeywordsFromSpacy = this.keywords.length > 0;
//deep copy
this.keywordsOriginal = [...words];
for (let i = 0; i < this.keywordsOriginal.length; i++) {
......@@ -92,6 +96,7 @@ export class SpacyDialogComponent implements OnInit, AfterContentInit {
}, () => {
this.keywords = [];
this.keywordsOriginal = [];
this.hasKeywordsFromSpacy = false;
}, () => {
this.isLoading = false;
});
......@@ -150,6 +155,6 @@ export class SpacyDialogComponent implements OnInit, AfterContentInit {
onEditChange(change: number) {
this._concurrentEdits += change;
this.appDialogActionButtons.confirmButtonDisabled = (this._concurrentEdits > 0)
this.appDialogActionButtons.confirmButtonDisabled = (this._concurrentEdits > 0);
}
}
......@@ -372,6 +372,7 @@ export class CommentListComponent implements OnInit, OnDestroy {
this.currentFilter = '';
this.selectedTag = '';
this.selectedKeyword = '';
this.userNumberSelection = 0;
this.sortComments(this.currentSort);
return;
}
......
......@@ -87,7 +87,6 @@
"de": "Deutsch",
"en": "Englisch",
"fr": "Französisch",
"empty-nouns": "Keine Nomen enthalten",
"select-all": "Alles auswählen",
"lang-button-hint": "Ausgewählte Sprache für die Rechtschreibprüfung",
"select-all-hint": "Alle Stichwörter auswählen",
......@@ -95,7 +94,8 @@
"edit-keyword-hint": "Stichwort editieren",
"editing-done-hint": "Editierung abschliessen",
"force-language-selection": "Automatische Spracherkennung unpräzise, bitte gewählte Sprache prüfen!",
"add-manually": "Geben Sie bitte die Stichwörter unten mit separatem Komma ein"
"add-manually": "Geben Sie bitte die Stichwörter unten mit separatem Komma ein",
"select-keywords": "Wählen Sie die Stichwörter für Ihre Frage aus"
},
"comment-page": {
"a11y-comment_delete": "Löscht diese Frage",
......
......@@ -88,7 +88,6 @@
"de": "German",
"en": "English",
"fr": "French",
"empty-nouns": "No nouns included",
"select-all": "Select all",
"lang-button-hint": "Selected language for spell check",
"select-all-hint": "Select all keywords",
......@@ -96,7 +95,8 @@
"edit-keyword-hint": "Edit keyword",
"editing-done-hint": "Finish editing",
"force-language-selection": "Language detection inaccurate, please check language settings!",
"add-manually": "You can manually enter the keywords separated with a comma "
"add-manually": "You can manually enter the keywords separated with a comma",
"select-keywords": "Choose the keywords for your question"
},
"comment-page": {
"a11y-comment_delete": "Deletes this question",
......
......@@ -92,7 +92,6 @@
"de": "Deutsch",
"en": "Englisch",
"fr": "Französisch",
"empty-nouns": "Keine Nomen enthalten",
"select-all": "Alles auswählen",
"lang-button-hint": "Ausgewählte Sprache für die Rechtschreibprüfung",
"select-all-hint": "Alle Stichwörter auswählen",
......
......@@ -102,7 +102,6 @@
"de": "German",
"en": "English",
"fr": "French",
"empty-nouns": "No nouns included",
"select-all": "Select all",
"lang-button-hint": "Selected language for spell check",
"select-all-hint": "Select all keywords",
......
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