From f8271d850f8841fbc9d9b8f9ecf0c793c12d749e Mon Sep 17 00:00:00 2001 From: Adeyemi Adetunji Date: Wed, 29 Oct 2025 09:34:30 +0100 Subject: [PATCH] fix: dashboard i18n build/console warnings (#587) * fix: build warnings * feat: remove other instances of invalid_type_error and the unused translation key --- .../Document/AddDocumentToLesson.svelte | 2 +- .../components/Editor/ReviewsForm.svelte | 19 +----- .../src/lib/components/Page/Body.svelte | 2 + .../src/lib/utils/functions/validator.ts | 65 +++++++++---------- .../src/lib/utils/translations/da.json | 4 +- .../src/lib/utils/translations/de.json | 4 +- .../src/lib/utils/translations/en.json | 4 +- .../src/lib/utils/translations/es.json | 4 +- .../src/lib/utils/translations/fr.json | 4 +- .../src/lib/utils/translations/hi.json | 4 +- .../src/lib/utils/translations/pl.json | 4 +- .../src/lib/utils/translations/pt.json | 4 +- .../src/lib/utils/translations/ru.json | 4 +- .../src/lib/utils/translations/vi.json | 4 +- 14 files changed, 44 insertions(+), 84 deletions(-) diff --git a/apps/dashboard/src/lib/components/Course/components/Lesson/Materials/Document/AddDocumentToLesson.svelte b/apps/dashboard/src/lib/components/Course/components/Lesson/Materials/Document/AddDocumentToLesson.svelte index a0bd9d7d..f452b446 100644 --- a/apps/dashboard/src/lib/components/Course/components/Lesson/Materials/Document/AddDocumentToLesson.svelte +++ b/apps/dashboard/src/lib/components/Course/components/Lesson/Materials/Document/AddDocumentToLesson.svelte @@ -13,7 +13,7 @@ import { isFreePlan } from '$lib/utils/store/org'; import { lesson } from '../../store/lessons'; - export let lessonId = ''; + export const lessonId = ''; let fileInput: HTMLInputElement; let selectedFile: File | null = null; diff --git a/apps/dashboard/src/lib/components/CourseLandingPage/components/Editor/ReviewsForm.svelte b/apps/dashboard/src/lib/components/CourseLandingPage/components/Editor/ReviewsForm.svelte index e02c7ca4..489a07a3 100644 --- a/apps/dashboard/src/lib/components/CourseLandingPage/components/Editor/ReviewsForm.svelte +++ b/apps/dashboard/src/lib/components/CourseLandingPage/components/Editor/ReviewsForm.svelte @@ -47,17 +47,11 @@ name: z.string().min(5, { message: `${$t( 'course.navItem.landing_page.editor.reviews_form.validations.name.min_char' - )}`, - invalid_type_error: `${$t( - 'course.navItem.landing_page.editor.reviews_form.validations.invalid_type_error' )}` }), avatar_url: z.string().min(6, { message: `${$t( 'course.navItem.landing_page.editor.reviews_form.validations.avatar_url.message' - )}`, - invalid_type_error: `${$t( - 'course.navItem.landing_page.editor.reviews_form.validations.invalid_type_error' )}` }), rating: z @@ -65,25 +59,16 @@ .min(1, { message: `${$t( 'course.navItem.landing_page.editor.reviews_form.validations.rating.message' - )}`, - invalid_type_error: `${$t( - 'course.navItem.landing_page.editor.reviews_form.validations.invalid_type_error' )}` }) .max(5, { message: `${$t( 'course.navItem.landing_page.editor.reviews_form.validations.rating.message' - )}`, - invalid_type_error: `${$t( - 'course.navItem.landing_page.editor.reviews_form.validations.invalid_type_error' )}` }), description: z.string().min(10, { message: `${$t( 'course.navItem.landing_page.editor.reviews_form.validations.description.min_char' - )}`, - invalid_type_error: `${$t( - 'course.navItem.landing_page.editor.reviews_form.validations.invalid_type_error' )}` }) }); @@ -120,11 +105,11 @@ {#each reviews || [] as review}
{#if review.id !== reviewToExpand} -
+

{review.name}

diff --git a/apps/dashboard/src/lib/components/Page/Body.svelte b/apps/dashboard/src/lib/components/Page/Body.svelte index 8008aae0..b12f362c 100644 --- a/apps/dashboard/src/lib/components/Page/Body.svelte +++ b/apps/dashboard/src/lib/components/Page/Body.svelte @@ -15,6 +15,8 @@ } + +