Bisaya kurs korrekturen
All checks were successful
Deploy to production / deploy (push) Successful in 2m41s

This commit is contained in:
Torsten Schulz (local)
2026-06-06 13:16:04 +02:00
parent bfec885a1f
commit 973fcaaf9e
5 changed files with 443 additions and 19 deletions

View File

@@ -75,6 +75,7 @@
<script>
import apiClient from '@/utils/axios.js';
import { normalizeComparableWithNumberWords } from '@/utils/numberAnswerVariants.js';
export default {
name: 'VocabLessonReviewView',
@@ -119,9 +120,12 @@ export default {
},
methods: {
normalize(s) {
const base = String(s || '').trim().toLowerCase();
// Satzzeichen am Ende ignorieren (Punkt, Fragezeichen, Ausrufezeichen, Komma, Strichpunkt, Doppelpunkt)
return base.replace(/[.,!?;:]+$/g, '').replace(/\s+/g, ' ');
const baseNormalize = (value) => {
const base = String(value || '').trim().toLowerCase();
// Satzzeichen am Ende ignorieren (Punkt, Fragezeichen, Ausrufezeichen, Komma, Strichpunkt, Doppelpunkt)
return base.replace(/[.,!?;:]+$/g, '').replace(/\s+/g, ' ');
};
return normalizeComparableWithNumberWords(s, baseNormalize);
},
getItemKey(item) {
return `${String(item?.gloss || '').trim()}|${String(item?.target || '').trim()}`;

View File

@@ -1087,6 +1087,7 @@
<script>
import { mapGetters } from 'vuex';
import apiClient from '@/utils/axios.js';
import { normalizeComparableWithNumberWords } from '@/utils/numberAnswerVariants.js';
const debugLog = () => {};
const LESSON_STATE_VERSION = 1;
@@ -4271,14 +4272,17 @@ export default {
}
},
normalizeComparableText(value) {
const normalized = String(value || '')
.trim()
.toLowerCase()
.normalize('NFKC')
.replace(/[\p{P}\p{S}]+/gu, ' ')
.replace(/\s+/g, ' ')
.trim();
return normalized.replace(/\s+/g, '');
const baseNormalize = (source) => {
const normalized = String(source || '')
.trim()
.toLowerCase()
.normalize('NFKC')
.replace(/[\p{P}\p{S}]+/gu, ' ')
.replace(/\s+/g, ' ')
.trim();
return normalized.replace(/\s+/g, '');
};
return normalizeComparableWithNumberWords(value, baseNormalize);
},
stripTrailingParentheticalNotes(value) {
let text = String(value || '').trim();