From 3d27c11b22d92cf20b524198bacc9dc1c631dd20 Mon Sep 17 00:00:00 2001
From: Konstantin Schulz <schulzkx@hu-berlin.de>
Date: Tue, 17 Oct 2023 15:37:42 +0200
Subject: [PATCH] add additional info on intelligent choice of text passages

---
 mc_frontend/package.json                            |  2 +-
 mc_frontend/src/app/app-routing.module.ts           |  5 ++++-
 mc_frontend/src/app/app.component.spec.ts           |  5 +++--
 .../app/vocabulary-check/vocabulary-check.page.html | 13 +++++++++++--
 .../app/vocabulary-check/vocabulary-check.page.ts   |  1 +
 mc_frontend/src/assets/i18n/de.json                 |  2 +-
 mc_frontend/src/assets/i18n/en.json                 |  2 +-
 7 files changed, 22 insertions(+), 8 deletions(-)

diff --git a/mc_frontend/package.json b/mc_frontend/package.json
index 79eafcd..91c9b85 100644
--- a/mc_frontend/package.json
+++ b/mc_frontend/package.json
@@ -1,6 +1,6 @@
 {
   "name": "mc_frontend",
-  "version": "2.7.9",
+  "version": "2.8.0",
   "author": "Ionic Framework",
   "homepage": "https://ionicframework.com/",
   "scripts": {
diff --git a/mc_frontend/src/app/app-routing.module.ts b/mc_frontend/src/app/app-routing.module.ts
index 07c25eb..0616762 100644
--- a/mc_frontend/src/app/app-routing.module.ts
+++ b/mc_frontend/src/app/app-routing.module.ts
@@ -8,7 +8,10 @@ export const routes: Routes = [
         loadChildren: () => import('./confirm-cancel/confirm-cancel.module').then(m => m.ConfirmCancelPageModule)
     },
     {path: 'author', loadChildren: () => import('./author/author.module').then(m => m.AuthorPageModule)},
-    {path: 'author-detail', loadChildren: './author-detail/author-detail.module#AuthorDetailPageModule'},
+    {
+        path: 'author-detail',
+        loadChildren: () => import('./author-detail/author-detail.module').then(m => m.AuthorDetailPageModule)
+    },
     {
         path: 'exercise-parameters',
         loadChildren: () => import('./exercise-parameters/exercise-parameters.module').then(m => m.ExerciseParametersPageModule)
diff --git a/mc_frontend/src/app/app.component.spec.ts b/mc_frontend/src/app/app.component.spec.ts
index 4557990..25e22d9 100644
--- a/mc_frontend/src/app/app.component.spec.ts
+++ b/mc_frontend/src/app/app.component.spec.ts
@@ -46,6 +46,7 @@ import {DocExercisesPageModule} from "./doc-exercises/doc-exercises.module";
 import {DocSoftwarePageModule} from "./doc-software/doc-software.module";
 import {AuthorPageModule} from "./author/author.module";
 import {ConfirmCancelPageModule} from "./confirm-cancel/confirm-cancel.module";
+import {AuthorDetailPageModule} from "./author-detail/author-detail.module";
 
 describe('AppComponent', () => {
     let statusBarSpy, splashScreenSpy, platformReadySpy, fixture: ComponentFixture<AppComponent>,
@@ -134,14 +135,14 @@ describe('AppComponent', () => {
             configMC.pageUrlShowText, configMC.pageUrlSources, configMC.pageUrlTest, configMC.pageUrlTextRange,
             configMC.pageUrlVocabularyCheck, configMC.pageUrlExercise, configMC.pageUrlExerciseList,
             configMC.pageUrlDocVocUnit, configMC.pageUrlDocExercises, configMC.pageUrlDocSoftware,
-            configMC.pageUrlAuthor, configMC.pageUrlConfirmCancel];
+            configMC.pageUrlAuthor, configMC.pageUrlConfirmCancel, configMC.pageUrlAuthorDetail];
         urls = urls.map(url => url.slice(1));
         const modules: any[] = [EmbedPageModule, SemanticsPageModule, SequencesPageModule, TutorialPageModule,
             ExerciseParametersPageModule, HomePageModule, ImprintPageModule, InfoPageModule, KwicPageModule,
             PreviewPageModule, RankingPageModule, ShowTextPageModule, SourcesPageModule, TestPageModule,
             TextRangePageModule, VocabularyCheckPageModule, ExercisePageModule, ExerciseListPageModule,
             DocVocUnitPageModule, DocExercisesPageModule, DocSoftwarePageModule, AuthorPageModule,
-            ConfirmCancelPageModule];
+            ConfirmCancelPageModule, AuthorDetailPageModule];
         let doneCount = 0;
         new Promise<void>(resolve => {
             urls.forEach((url, index) => {
diff --git a/mc_frontend/src/app/vocabulary-check/vocabulary-check.page.html b/mc_frontend/src/app/vocabulary-check/vocabulary-check.page.html
index 9c0e802..51d9467 100644
--- a/mc_frontend/src/app/vocabulary-check/vocabulary-check.page.html
+++ b/mc_frontend/src/app/vocabulary-check/vocabulary-check.page.html
@@ -87,11 +87,20 @@
             <ion-col>
                 <label>
                     <input type="checkbox" [(ngModel)]="vocService.adaptPassages"/>
-                    <span class="checkbox">{{ "VOCABULARY_CHECK_ADAPT_PASSAGES" | translate}}</span><br>
-                    {{'VOCABULARY_CHECK_ADAPT_PASSAGES_OPTION' | translate}}
+                    <span class="checkbox">{{ "VOCABULARY_CHECK_ADAPT_PASSAGES" | translate}}</span>
                 </label>
             </ion-col>
         </ion-row>
+        <ion-row>
+            <ion-col>
+                <button (click)="showVocCheckAdaptPassagesHelp = !showVocCheckAdaptPassagesHelp" style="padding:0.2em;">
+                    <ion-icon name="help-circle"></ion-icon>
+                </button>
+                <div *ngIf="showVocCheckAdaptPassagesHelp">
+                    <span>{{'VOCABULARY_CHECK_ADAPT_PASSAGES_INFO' | translate}}</span>
+                </div>
+            </ion-col>
+        </ion-row>
         <ion-row>
             <ion-col>
                 <ion-button (click)="vocService.checkVocabulary(true, navCtrl)">
diff --git a/mc_frontend/src/app/vocabulary-check/vocabulary-check.page.ts b/mc_frontend/src/app/vocabulary-check/vocabulary-check.page.ts
index af47ceb..6c56ad3 100644
--- a/mc_frontend/src/app/vocabulary-check/vocabulary-check.page.ts
+++ b/mc_frontend/src/app/vocabulary-check/vocabulary-check.page.ts
@@ -16,6 +16,7 @@ import {CorpusService} from 'src/app/corpus.service';
 export class VocabularyCheckPage {
     ObjectKeys = Object.keys;
     VocabularyCorpusTranslation = VocabularyCorpusTranslation;
+    showVocCheckAdaptPassagesHelp: boolean = false;
 
     constructor(public navCtrl: NavController,
                 public vocService: VocabularyService,
diff --git a/mc_frontend/src/assets/i18n/de.json b/mc_frontend/src/assets/i18n/de.json
index 774b8a0..d9ed357 100644
--- a/mc_frontend/src/assets/i18n/de.json
+++ b/mc_frontend/src/assets/i18n/de.json
@@ -408,7 +408,7 @@
   "VERSION": "Version",
   "VOCABULARY_CHECK": "Vokabular vergleichen",
   "VOCABULARY_CHECK_ADAPT_PASSAGES": "Intelligente Textpassagenauswahl",
-  "VOCABULARY_CHECK_ADAPT_PASSAGES_OPTION": "(Haken entfernen für alle Optionen)",
+  "VOCABULARY_CHECK_ADAPT_PASSAGES_INFO": "Der gewünschte Auszug aus der Textpassage wird so gewählt, dass die Textabdeckung des Vokabulars maximiert wird. Dieser Haken kann entfernt werden, um alle Optionen zu sehen.",
   "VOCABULARY_CHOOSE_CORPUS": "Korpus auswählen...",
   "VOCABULARY_ITEMS": "Vokabeln",
   "VOCABULARY_MATCHING_DEGREE": "Ãœbereinstimmung",
diff --git a/mc_frontend/src/assets/i18n/en.json b/mc_frontend/src/assets/i18n/en.json
index 6622652..8677621 100644
--- a/mc_frontend/src/assets/i18n/en.json
+++ b/mc_frontend/src/assets/i18n/en.json
@@ -408,7 +408,7 @@
   "VERSION": "Version",
   "VOCABULARY_CHECK": "Compare vocabulary",
   "VOCABULARY_CHECK_ADAPT_PASSAGES": "Intelligent choice of text passages",
-  "VOCABULARY_CHECK_ADAPT_PASSAGES_OPTION": "(uncheck for all possibilities)",
+  "VOCABULARY_CHECK_ADAPT_PASSAGES_INFO": "The desired excerpt from the text passage is chosen to maximize the text coverage of the vocabulary. Uncheck this option for all possibilities.",
   "VOCABULARY_CHOOSE_CORPUS": "Choose corpus...",
   "VOCABULARY_ITEMS": "Items",
   "VOCABULARY_MATCHING_DEGREE": "Matching Percentage",
-- 
GitLab