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">
<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">
{{ __('No {0}').format(type?.toLowerCase()) }}
{{ __('No {0}').format(props.type) }}
</div>
<div
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!'
).format(type?.toLowerCase())
__(
'There are no {0} currently. Keep an eye out, fresh learning experiences are on the way!'
).format(props.type)
}}
</div>
</div>
</template>
<script setup lang="ts">
import { computed } from 'vue'
import { BookOpen, GraduationCap } from 'lucide-vue-next'
const props = defineProps({
type: String,
})
</script>
</script>

View File

@@ -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
}
}

View File

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