From 80f093958a7bc12409cb9cd40011c205af380c12 Mon Sep 17 00:00:00 2001 From: Youssef Date: Wed, 13 Aug 2025 11:02:58 -0400 Subject: [PATCH] i18n: progress on french translations --- frontend/src/components/EmptyState.vue | 12 +++++++----- frontend/src/global.d.ts | 5 +++-- frontend/src/pages/Courses.vue | 2 +- 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/frontend/src/components/EmptyState.vue b/frontend/src/components/EmptyState.vue index 8ca99cbd..626ce846 100644 --- a/frontend/src/components/EmptyState.vue +++ b/frontend/src/components/EmptyState.vue @@ -2,23 +2,25 @@
- {{ __('No {0}').format(type?.toLowerCase()) }} + {{ __('No {0}').format(props.type) }}
{{ - __( - 'There are no {0} currently. Keep an eye out, fresh learning experiences are on the way!' - ).format(type?.toLowerCase()) + __( + 'There are no {0} currently. Keep an eye out, fresh learning experiences are on the way!' + ).format(props.type) }}
+ + \ No newline at end of file diff --git a/frontend/src/global.d.ts b/frontend/src/global.d.ts index 6af9dfe4..1c36740d 100644 --- a/frontend/src/global.d.ts +++ b/frontend/src/global.d.ts @@ -1,11 +1,12 @@ export {} declare global { - function __(text: string): string + // May return string or an object with `.format(...)` when placeholders exist + function __(text: string): any } declare module 'vue' { interface ComponentCustomProperties { - __: (text: string) => string + __: (text: string) => any } } \ No newline at end of file diff --git a/frontend/src/pages/Courses.vue b/frontend/src/pages/Courses.vue index 26c4227e..d66acd25 100644 --- a/frontend/src/pages/Courses.vue +++ b/frontend/src/pages/Courses.vue @@ -66,7 +66,7 @@ - +