From ef70921df0bdf69cff0aa8d82f7037b256d351fa Mon Sep 17 00:00:00 2001 From: Yonatan Dankner Date: Fri, 7 Aug 2026 11:20:13 +0200 Subject: [PATCH 1/2] Fix "1 reviews" plural in the review count The review count used a single template string, so a course with one review read "1 reviews". Adds a singular key in both en and de and picks it at count === 1. --- frontend/src/features/i18n/translations.ts | 2 ++ .../src/features/reviews/components/CourseReviewsSection.tsx | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/frontend/src/features/i18n/translations.ts b/frontend/src/features/i18n/translations.ts index f994729..767e56f 100644 --- a/frontend/src/features/i18n/translations.ts +++ b/frontend/src/features/i18n/translations.ts @@ -196,6 +196,7 @@ export const TRANSLATIONS = { 'reviews.loading': 'Loading reviews...', 'reviews.empty': 'No reviews yet. Be the first to share your experience.', 'reviews.count': '{count} reviews', + 'reviews.countOne': '1 review', 'reviews.overallLabel': 'Overall', 'reviews.optionalRatings': 'Optional ratings', 'reviews.examLabel': 'Exam and assessment', @@ -516,6 +517,7 @@ export const TRANSLATIONS = { 'reviews.loading': 'Bewertungen werden geladen...', 'reviews.empty': 'Noch keine Bewertungen. Teile als Erste oder Erster deine Erfahrung.', 'reviews.count': '{count} Bewertungen', + 'reviews.countOne': '1 Bewertung', 'reviews.overallLabel': 'Gesamt', 'reviews.optionalRatings': 'Optionale Bewertungen', 'reviews.examLabel': 'Prüfung und Bewertung', diff --git a/frontend/src/features/reviews/components/CourseReviewsSection.tsx b/frontend/src/features/reviews/components/CourseReviewsSection.tsx index 73f3c28..38fd185 100644 --- a/frontend/src/features/reviews/components/CourseReviewsSection.tsx +++ b/frontend/src/features/reviews/components/CourseReviewsSection.tsx @@ -46,7 +46,9 @@ function SummaryHeadline({ summary }: { summary: CourseReviewSummary }) { size="sm" /> - {t('reviews.count', { count: String(summary.count) })} + {summary.count === 1 + ? t('reviews.countOne') + : t('reviews.count', { count: String(summary.count) })} From d337991deb67a8d0f02f1c74f9280d0d8ee7483a Mon Sep 17 00:00:00 2001 From: Yonatan Dankner Date: Fri, 7 Aug 2026 11:26:38 +0200 Subject: [PATCH 2/2] Remove the "Has reviews" catalog filter The filter returned no results in production even for courses that do show a rating chip. Rather than debug a nice-to-have, drop it; the card chip is the feature that matters and it works. Reverts only the filter wiring in the catalog overview. shouldShowRatingChip stays, since the card chip still uses it. --- .../features/courses/components/Overview.tsx | 22 ------------------- 1 file changed, 22 deletions(-) diff --git a/frontend/src/features/courses/components/Overview.tsx b/frontend/src/features/courses/components/Overview.tsx index 4c28f24..b413467 100644 --- a/frontend/src/features/courses/components/Overview.tsx +++ b/frontend/src/features/courses/components/Overview.tsx @@ -13,7 +13,6 @@ import { useProgressSnapshot } from '../../dashboard/hooks/useProgressSnapshot' import { useAuth } from '../../auth' import { useFavorites } from '../../favorites' import { useOnboarding } from '../../onboarding' -import { shouldShowRatingChip } from '../../reviews' import { TOUR_SAMPLE_COURSES, getCatalogTourSampleVariant, @@ -221,7 +220,6 @@ export function CoursesOverview() { const [selectedTerms, setSelectedTerms] = useState>([]) const [selectedCourseTypes, setSelectedCourseTypes] = useState([]) const [showOnlyOpenMandatory, setShowOnlyOpenMandatory] = useState(false) - const [showOnlyReviewed, setShowOnlyReviewed] = useState(false) const [showUnconfirmedOfferings, setShowUnconfirmedOfferings] = useState(false) const [areFiltersOpen, setAreFiltersOpen] = useState(false) const [sortOption, setSortOption] = useState('title') @@ -235,7 +233,6 @@ export function CoursesOverview() { selectedStudyAreaCodes.join('|'), selectedTerms.join('|'), showOnlyOpenMandatory, - showOnlyReviewed, showUnconfirmedOfferings, sortOption, timeFromDigits, @@ -249,7 +246,6 @@ export function CoursesOverview() { selectedStudyAreaCodes, selectedTerms, showOnlyOpenMandatory, - showOnlyReviewed, showUnconfirmedOfferings, sortOption, timeFromDigits, @@ -458,11 +454,6 @@ export function CoursesOverview() { ) { return false } - // Same "has a displayable rating" test the card chip uses, so the - // filter can never disagree with what the cards show. - if (showOnlyReviewed && !shouldShowRatingChip(course.rating)) { - return false - } if ( !shouldShowUnconfirmedOfferings && !isDefaultVisibleOfferingStatus(offeringStatusByCourseId.get(course.id)) @@ -490,7 +481,6 @@ export function CoursesOverview() { selectedTerms, shouldShowUnconfirmedOfferings, showOnlyOpenMandatory, - showOnlyReviewed, sortOption, studyProgramCode, timeWindow, @@ -508,7 +498,6 @@ export function CoursesOverview() { + selectedTerms.length + selectedCourseTypes.length + (showOnlyOpenMandatory ? 1 : 0) - + (showOnlyReviewed ? 1 : 0) + (showUnconfirmedOfferings ? 1 : 0) const hasActiveFilters = activeFilterCount > 0 @@ -546,7 +535,6 @@ export function CoursesOverview() { setSelectedTerms([]) setSelectedCourseTypes([]) setShowOnlyOpenMandatory(false) - setShowOnlyReviewed(false) setShowUnconfirmedOfferings(false) } @@ -757,16 +745,6 @@ export function CoursesOverview() { ))} - - -
- setShowOnlyReviewed((current) => !current)} - /> -
-