2023-01-04 13:57:12 +00:00
|
|
|
<script setup lang="ts">
|
2023-02-11 20:42:55 +00:00
|
|
|
import type { ElkTranslationStatus } from '~/types/translation-status'
|
|
|
|
|
|
|
|
const { t, locale } = useI18n()
|
|
|
|
|
|
|
|
const translationStatus: ElkTranslationStatus = await import('~/elk-translation-status.json').then(m => m.default)
|
2023-01-04 13:57:12 +00:00
|
|
|
|
2023-02-18 00:26:28 +00:00
|
|
|
useHydratedHead({
|
2023-01-04 13:57:12 +00:00
|
|
|
title: () => `${t('settings.language.label')} | ${t('nav.settings')}`,
|
|
|
|
})
|
2023-02-11 20:42:55 +00:00
|
|
|
const status = computed(() => {
|
|
|
|
const entry = translationStatus.locales[locale.value]
|
|
|
|
return t('settings.language.status', [entry.total, translationStatus.total, entry.percentage])
|
|
|
|
})
|
2023-01-04 13:57:12 +00:00
|
|
|
</script>
|
|
|
|
|
2022-12-26 23:04:24 +00:00
|
|
|
<template>
|
2022-12-28 01:12:56 +00:00
|
|
|
<MainContent back-on-small-screen>
|
2022-12-26 23:04:24 +00:00
|
|
|
<template #title>
|
|
|
|
<div text-lg font-bold flex items-center gap-2 @click="$scrollToTop">
|
|
|
|
<span>{{ $t('settings.language.label') }}</span>
|
|
|
|
</div>
|
|
|
|
</template>
|
2022-12-27 23:03:50 +00:00
|
|
|
<div p6>
|
|
|
|
<label space-y-2>
|
2023-02-11 20:42:55 +00:00
|
|
|
<span block font-medium>{{ $t('settings.language.display_language') }}</span>
|
|
|
|
<span block>
|
|
|
|
{{ status }}
|
|
|
|
</span>
|
2022-12-27 23:03:50 +00:00
|
|
|
<SettingsLanguage select-settings />
|
|
|
|
</label>
|
2023-01-29 12:18:49 +00:00
|
|
|
<h2 py4 mt2 font-bold text-xl flex="~ gap-1" items-center>
|
|
|
|
{{ $t('settings.language.translations.heading') }}
|
|
|
|
</h2>
|
|
|
|
<SettingsTranslations />
|
2022-12-26 23:04:24 +00:00
|
|
|
</div>
|
|
|
|
</MainContent>
|
|
|
|
</template>
|