mirror of
https://github.com/VueTorrent/VueTorrent.git
synced 2025-03-14 03:59:53 +03:00
perf(localization): Add missing keys to Tolgee (#1349)
This commit is contained in:
parent
6e6437700c
commit
3adeea456f
7 changed files with 27 additions and 22 deletions
|
@ -6,7 +6,7 @@ const maindataStore = useMaindataStore()
|
|||
</script>
|
||||
|
||||
<template>
|
||||
<DataCard title="Free Space" :value="maindataStore.serverState?.free_space_on_disk ?? 0" color="upload" />
|
||||
<DataCard :title="$t('navbar.side.stats.free_space')" :value="maindataStore.serverState?.free_space_on_disk ?? 0" color="upload" />
|
||||
</template>
|
||||
|
||||
<style scoped></style>
|
||||
|
|
|
@ -59,11 +59,11 @@ const chartOptions: ApexOptions = {
|
|||
|
||||
const series = computed(() => [
|
||||
{
|
||||
name: 'upload',
|
||||
name: t('navbar.side.speed_graph.upload_label'),
|
||||
data: navbarStore.uploadData
|
||||
},
|
||||
{
|
||||
name: 'download',
|
||||
name: t('navbar.side.speed_graph.download_label'),
|
||||
data: navbarStore.downloadData
|
||||
}
|
||||
])
|
||||
|
|
|
@ -3,11 +3,14 @@ import DataCard from '@/components/Core/DataCard.vue'
|
|||
import StringCard from '@/components/Core/StringCard.vue'
|
||||
import { useMaindataStore } from '@/stores'
|
||||
import { computed } from 'vue'
|
||||
import { useI18n } from 'vue-i18n'
|
||||
|
||||
const props = defineProps<{ session: boolean }>()
|
||||
|
||||
const { t } = useI18n()
|
||||
const maindataStore = useMaindataStore()
|
||||
|
||||
const title = computed(() => (props.session ? 'Session Stats' : 'Alltime Stats'))
|
||||
const title = computed(() => (props.session ? t('navbar.side.stats.session.title') : t('navbar.side.stats.alltime.title')))
|
||||
const download = computed(() => (props.session ? maindataStore.serverState?.dl_info_data : maindataStore.serverState?.alltime_dl) ?? 0)
|
||||
const upload = computed(() => (props.session ? maindataStore.serverState?.up_info_data : maindataStore.serverState?.alltime_ul) ?? 0)
|
||||
const ratio = computed(() => (props.session ? undefined : maindataStore.serverState?.global_ratio) ?? 0)
|
||||
|
@ -21,9 +24,9 @@ const ratio = computed(() => (props.session ? undefined : maindataStore.serverSt
|
|||
</v-card-title>
|
||||
<v-card-text class="px-0 pb-0">
|
||||
<div class="d-flex flex-column gap">
|
||||
<DataCard title="Downloaded" :value="download" color="download" icon="mdi-arrow-down" />
|
||||
<DataCard title="Uploaded" :value="upload" color="upload" icon="mdi-arrow-up" />
|
||||
<StringCard v-if="!session" :value="ratio" title="Ratio" color="ratio" />
|
||||
<DataCard :title="$t('navbar.side.stats.downloaded')" :value="download" color="download" icon="mdi-arrow-down" />
|
||||
<DataCard :title="$t('navbar.side.stats.uploaded')" :value="upload" color="upload" icon="mdi-arrow-up" />
|
||||
<StringCard v-if="!session" :title="$t('navbar.side.stats.ratio')" :value="ratio" color="ratio" />
|
||||
</div>
|
||||
</v-card-text>
|
||||
</v-card>
|
||||
|
|
|
@ -1,13 +1,15 @@
|
|||
<script setup lang="ts">
|
||||
import { FileLogAgeType } from '@/constants/qbit/AppPreferences'
|
||||
import { usePreferenceStore } from '@/stores'
|
||||
import { useI18n } from 'vue-i18n'
|
||||
|
||||
const { t } = useI18n()
|
||||
const preferenceStore = usePreferenceStore()
|
||||
|
||||
const fileLogAgeTypeOptions = [
|
||||
{ title: 'days', value: FileLogAgeType.DAYS },
|
||||
{ title: 'months', value: FileLogAgeType.MONTHS },
|
||||
{ title: 'years', value: FileLogAgeType.YEARS }
|
||||
{ title: t('constants.file_log_age_type.days'), value: FileLogAgeType.DAYS },
|
||||
{ title: t('constants.file_log_age_type.months'), value: FileLogAgeType.MONTHS },
|
||||
{ title: t('constants.file_log_age_type.years'), value: FileLogAgeType.YEARS }
|
||||
]
|
||||
</script>
|
||||
|
||||
|
|
|
@ -10,9 +10,9 @@ const preferenceStore = usePreferenceStore()
|
|||
|
||||
const proxyTypes = ref([
|
||||
{ title: t('common.none'), value: ProxyType.NONE },
|
||||
{ title: 'SOCKS4', value: ProxyType.SOCKS4 },
|
||||
{ title: 'SOCKS5', value: ProxyType.SOCKS5 },
|
||||
{ title: 'HTTP', value: ProxyType.HTTP }
|
||||
{ title: t('constants.proxy_type.socks4'), value: ProxyType.SOCKS4 },
|
||||
{ title: t('constants.proxy_type.socks5'), value: ProxyType.SOCKS5 },
|
||||
{ title: t('constants.proxy_type.http'), value: ProxyType.HTTP }
|
||||
])
|
||||
const isProxyDisabled = computed(() => preferenceStore.preferences!.proxy_type === ProxyType.NONE)
|
||||
const isProxySocks4 = computed(() => preferenceStore.preferences!.proxy_type === ProxyType.SOCKS4)
|
||||
|
|
|
@ -64,13 +64,13 @@ const resetSettings = () => {
|
|||
|
||||
const registerMagnetHandler = () => {
|
||||
if (typeof navigator.registerProtocolHandler !== 'function') {
|
||||
toast.error(t('toast.magnetHandlerNotSupported'))
|
||||
toast.error(t('toast.magnet_handler.not_supported'))
|
||||
return
|
||||
}
|
||||
|
||||
const templateUrl = location.href.replace('/settings', '/magnet/%s')
|
||||
navigator.registerProtocolHandler('magnet', templateUrl)
|
||||
toast.success('Magnet handler registered')
|
||||
toast.success(t('toast.magnet_handler.registered'))
|
||||
}
|
||||
|
||||
onBeforeMount(() => {
|
||||
|
|
|
@ -83,13 +83,13 @@ onBeforeUnmount(() => {
|
|||
|
||||
<v-row class="ma-0 pa-0">
|
||||
<v-tabs v-model="tab" bg-color="primary" grow show-arrows>
|
||||
<v-tab value="vuetorrent">{{ t('settings.tabs.vuetorrent') }}</v-tab>
|
||||
<v-tab value="vuetorrent">{{ t('settings.tabs.vuetorrent.title') }}</v-tab>
|
||||
<v-tab value="behavior">{{ t('settings.tabs.behavior') }}</v-tab>
|
||||
<v-tab value="downloads">{{ t('settings.tabs.downloads') }}</v-tab>
|
||||
<v-tab value="connection">{{ t('settings.tabs.connection') }}</v-tab>
|
||||
<v-tab value="speed">{{ t('settings.tabs.speed') }}</v-tab>
|
||||
<v-tab value="bittorrent">{{ t('settings.tabs.bittorrent') }}</v-tab>
|
||||
<v-tab value="rss">{{ t('settings.tabs.rss') }}</v-tab>
|
||||
<v-tab value="rss">{{ t('settings.tabs.rss.title') }}</v-tab>
|
||||
<v-tab value="webui">{{ t('settings.tabs.webui') }}</v-tab>
|
||||
<v-tab value="tagsAndCategories">{{ t('settings.tabs.tagsAndCategories') }}</v-tab>
|
||||
<v-tab value="advanced">{{ t('settings.tabs.advanced') }}</v-tab>
|
||||
|
@ -100,10 +100,10 @@ onBeforeUnmount(() => {
|
|||
<v-window-item value="vuetorrent">
|
||||
<v-tabs v-model="innerTabV" grow color="accent" bg-color="transparent" show-arrows>
|
||||
<v-tab value="general">
|
||||
{{ t('settings.tabs.vuetorrentGeneral') }}
|
||||
{{ t('settings.tabs.vuetorrent.general') }}
|
||||
</v-tab>
|
||||
<v-tab value="torrentCard">
|
||||
{{ t('settings.tabs.vuetorrentTorrentCard') }}
|
||||
{{ t('settings.tabs.vuetorrent.torrent_card') }}
|
||||
</v-tab>
|
||||
</v-tabs>
|
||||
<v-window v-model="innerTabV">
|
||||
|
@ -139,13 +139,13 @@ onBeforeUnmount(() => {
|
|||
<v-window-item value="rss">
|
||||
<v-tabs v-model="innerTabR" grow color="accent" bg-color="transparent">
|
||||
<v-tab value="general">
|
||||
{{ t('settings.tabs.rssGeneral') }}
|
||||
{{ t('settings.tabs.rss.general') }}
|
||||
</v-tab>
|
||||
<v-tab value="feeds">
|
||||
{{ t('settings.tabs.rssFeeds') }}
|
||||
{{ t('settings.tabs.rss.feeds') }}
|
||||
</v-tab>
|
||||
<v-tab value="rules">
|
||||
{{ t('settings.tabs.rssRules') }}
|
||||
{{ t('settings.tabs.rss.rules') }}
|
||||
</v-tab>
|
||||
</v-tabs>
|
||||
<v-window v-model="innerTabR">
|
||||
|
|
Loading…
Add table
Reference in a new issue