i18n: progress on french translations

This commit is contained in:
Youssef
2025-08-13 11:02:58 -04:00
parent 57df376207
commit 80f093958a
3 changed files with 11 additions and 8 deletions

View File

@@ -2,23 +2,25 @@
<div class="flex flex-col items-center justify-center mt-60"> <div class="flex flex-col items-center justify-center mt-60">
<GraduationCap class="size-10 mx-auto stroke-1 text-ink-gray-5" /> <GraduationCap class="size-10 mx-auto stroke-1 text-ink-gray-5" />
<div class="text-lg font-semibold text-ink-gray-7 mb-2.5"> <div class="text-lg font-semibold text-ink-gray-7 mb-2.5">
{{ __('No {0}').format(type?.toLowerCase()) }} {{ __('No {0}').format(props.type) }}
</div> </div>
<div <div
class="leading-5 text-base w-2/5 text-base text-center text-ink-gray-7" class="leading-5 text-base w-2/5 text-base text-center text-ink-gray-7"
> >
{{ {{
__( __(
'There are no {0} currently. Keep an eye out, fresh learning experiences are on the way!' 'There are no {0} currently. Keep an eye out, fresh learning experiences are on the way!'
).format(type?.toLowerCase()) ).format(props.type)
}} }}
</div> </div>
</div> </div>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { computed } from 'vue'
import { BookOpen, GraduationCap } from 'lucide-vue-next' import { BookOpen, GraduationCap } from 'lucide-vue-next'
const props = defineProps({ const props = defineProps({
type: String, type: String,
}) })
</script>
</script>

View File

@@ -1,11 +1,12 @@
export {} export {}
declare global { declare global {
function __(text: string): string // May return string or an object with `.format(...)` when placeholders exist
function __(text: string): any
} }
declare module 'vue' { declare module 'vue' {
interface ComponentCustomProperties { interface ComponentCustomProperties {
__: (text: string) => string __: (text: string) => any
} }
} }

View File

@@ -66,7 +66,7 @@
<CourseCard :course="course" /> <CourseCard :course="course" />
</router-link> </router-link>
</div> </div>
<EmptyState v-else-if="!courses.list.loading" type="Courses" /> <EmptyState v-else-if="!courses.list.loading" :type="__('Courses').toLowerCase()" />
<div <div
v-if="!courses.list.loading && courses.hasNextPage" v-if="!courses.list.loading && courses.hasNextPage"
class="flex justify-center mt-5" class="flex justify-center mt-5"