diff --git a/frontend/src/views/social/VocabLessonView.vue b/frontend/src/views/social/VocabLessonView.vue index 9f59759..83701f7 100644 --- a/frontend/src/views/social/VocabLessonView.vue +++ b/frontend/src/views/social/VocabLessonView.vue @@ -3730,13 +3730,26 @@ export default { } this.vocabTrainerDirection = Math.random() < 0.5 ? 'L2R' : 'R2L'; const allTrainerVocabs = [...this.trainableLessonVocab, ...this.vocabTrainerMixedPool]; - const prompt = this.vocabTrainerDirection === 'L2R' ? vocab.learning : vocab.reference; - // Akzeptiere mehrere Übersetzungen für denselben Prompt (z. B. "Bitte wiederholen" UND "Kannst du das wiederholen?"). - const acceptableAnswers = this.vocabTrainerDirection === 'L2R' + const direction = this.vocabTrainerDirection; + const prompt = direction === 'L2R' ? vocab.learning : vocab.reference; + // Akzeptiere mehrere Übersetzungen für denselben Prompt (z. B. Synonyme / Varianten auf der Lernsprache). + // Zusätzlich alle im gesamten Trainer-Pool gleichwertigen Ziele (wie früher via getEquivalentVocabAnswers), + // damit gemischte Pools aus mehreren Lektionen nicht plötzlich gültige Alternativen ablehnen. + const baseAnswers = direction === 'L2R' ? [vocab.reference] : (Array.isArray(vocab.learningVariants) && vocab.learningVariants.length > 0 - ? vocab.learningVariants + ? [...vocab.learningVariants] : [vocab.learning]); + const equivalentAnswers = this.getEquivalentVocabAnswers(prompt, direction, allTrainerVocabs); + const mergedRaw = [...baseAnswers, ...equivalentAnswers].filter(Boolean); + const seenNorm = new Set(); + const acceptableAnswers = []; + for (const a of mergedRaw) { + const n = this.normalizeVocab(a); + if (!n || seenNorm.has(n)) continue; + seenNorm.add(n); + acceptableAnswers.push(a); + } this.currentVocabQuestion = { vocab: vocab, prompt,