2023-01-04 14:57:12 +01:00
|
|
|
<script setup lang="ts">
|
2023-02-11 21:42:55 +01: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 14:57:12 +01:00
|
|
|
|
2023-04-16 21:33:51 +02:00
|
|
|
useHydratedHead({
|
2023-01-04 14:57:12 +01:00
|
|
|
title: () => `${t('settings.language.label')} | ${t('nav.settings')}`,
|
|
|
|
})
|
2023-02-11 21:42:55 +01:00
|
|
|
const status = computed(() => {
|
|
|
|
const entry = translationStatus.locales[locale.value]
|
|
|
|
return t('settings.language.status', [entry.total, translationStatus.total, entry.percentage])
|
|
|
|
})
|
2023-01-04 14:57:12 +01:00
|
|
|
</script>
|
|
|
|
|
2022-12-27 00:04:24 +01:00
|
|
|
<template>
|
2022-12-28 02:12:56 +01:00
|
|
|
<MainContent back-on-small-screen>
|
2022-12-27 00:04:24 +01: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-28 00:03:50 +01:00
|
|
|
<div p6>
|
2023-07-29 14:01:17 +02:00
|
|
|
<div space-y-2>
|
|
|
|
<h2 py2 font-bold text-xl flex="~ gap-1" items-center>
|
|
|
|
{{ $t('settings.language.display_language') }}
|
|
|
|
</h2>
|
2024-04-01 07:27:47 +02:00
|
|
|
<div>
|
|
|
|
{{ status }}
|
|
|
|
</div>
|
2022-12-28 00:03:50 +01:00
|
|
|
<SettingsLanguage select-settings />
|
2024-04-01 07:27:47 +02:00
|
|
|
<NuxtLink
|
|
|
|
href="https://docs.elk.zone/guide/contributing"
|
|
|
|
target="_blank"
|
|
|
|
hover:underline text-primary inline-flex items-center gap-1
|
|
|
|
>
|
|
|
|
<span inline-block i-ri:information-line />
|
|
|
|
{{ $t('settings.language.how_to_contribute') }}
|
|
|
|
</NuxtLink>
|
2023-07-29 14:01:17 +02:00
|
|
|
</div>
|
|
|
|
<div mt4>
|
|
|
|
<h2 font-bold text-xl flex="~ gap-1" items-center>
|
|
|
|
{{ $t('settings.language.post_language') }}
|
|
|
|
</h2>
|
|
|
|
<SettingsItem
|
|
|
|
v-if="currentUser"
|
|
|
|
command large
|
|
|
|
icon="i-ri:quill-pen-line"
|
|
|
|
:text="$t('settings.language.post_language')"
|
|
|
|
:description="$t('settings.account_settings.description')"
|
|
|
|
:to="`https://${currentUser!.server}/settings/preferences/other`"
|
|
|
|
external target="_blank"
|
|
|
|
/>
|
|
|
|
</div>
|
2023-01-29 13:18:49 +01:00
|
|
|
<h2 py4 mt2 font-bold text-xl flex="~ gap-1" items-center>
|
|
|
|
{{ $t('settings.language.translations.heading') }}
|
|
|
|
</h2>
|
|
|
|
<SettingsTranslations />
|
2022-12-27 00:04:24 +01:00
|
|
|
</div>
|
|
|
|
</MainContent>
|
|
|
|
</template>
|