fix(i18n): hint for settings on notifications page (#893)

Co-authored-by: Daniel Roe <daniel@roe.dev>
pull/907/head
Joaquín Sánchez 2023-01-09 10:31:00 +01:00 zatwierdzone przez GitHub
rodzic e336ac928b
commit 52f81a34c3
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
5 zmienionych plików z 26 dodań i 5 usunięć

Wyświetl plik

@ -1,4 +1,6 @@
<script setup lang="ts"> <script setup lang="ts">
import { useMediaQuery } from '@vueuse/core'
defineProps<{ defineProps<{
closeableHeader?: boolean closeableHeader?: boolean
busy?: boolean busy?: boolean
@ -11,6 +13,8 @@ defineSlots<{
error: {} error: {}
}>() }>()
const xl = useMediaQuery('(min-width: 1280px)')
const isLegacyAccount = computed(() => !currentUser.value?.vapidKey) const isLegacyAccount = computed(() => !currentUser.value?.vapidKey)
</script> </script>
@ -38,8 +42,19 @@ const isLegacyAccount = computed(() => !currentUser.value?.vapidKey)
<span aria-hidden="true" i-ri:close-line /> <span aria-hidden="true" i-ri:close-line />
</button> </button>
</header> </header>
<p> <template v-if="closeableHeader">
{{ $t(`settings.notifications.push_notifications.warning.enable_description${closeableHeader ? '' : '_settings'}`) }} <p xl:hidden>
{{ $t('settings.notifications.push_notifications.warning.enable_description') }}
</p>
<p xl:hidden>
{{ $t('settings.notifications.push_notifications.warning.enable_description_mobile') }}
</p>
<p :class="xl ? null : 'hidden'">
{{ $t('settings.notifications.push_notifications.warning.enable_description_desktop') }}
</p>
</template>
<p v-else>
{{ $t('settings.notifications.push_notifications.warning.enable_description_settings') }}
</p> </p>
<p v-if="isLegacyAccount"> <p v-if="isLegacyAccount">
{{ $t('settings.notifications.push_notifications.warning.re_auth') }} {{ $t('settings.notifications.push_notifications.warning.re_auth') }}
@ -52,7 +67,7 @@ const isLegacyAccount = computed(() => !currentUser.value?.vapidKey)
@click="$emit('subscribe')" @click="$emit('subscribe')"
> >
<span aria-hidden="true" :class="busy && animate ? 'i-ri:loader-2-fill animate-spin' : 'i-ri:check-line'" /> <span aria-hidden="true" :class="busy && animate ? 'i-ri:loader-2-fill animate-spin' : 'i-ri:check-line'" />
{{ $t('settings.notifications.push_notifications.warning.enable_desktop') }} <span>{{ $t('settings.notifications.push_notifications.warning.enable_desktop') }}</span>
</button> </button>
<slot name="error" /> <slot name="error" />
</div> </div>

Wyświetl plik

@ -245,6 +245,8 @@
"warning": { "warning": {
"enable_close": "Close", "enable_close": "Close",
"enable_description": "To receive notifications when Elk is not open, enable push notifications. You can control precisely what types of interactions generate push notifications via the \"@:settings.notifications.show_btn{'\"'} button above once enabled.", "enable_description": "To receive notifications when Elk is not open, enable push notifications. You can control precisely what types of interactions generate push notifications via the \"@:settings.notifications.show_btn{'\"'} button above once enabled.",
"enable_description_desktop": "To receive notifications when Elk is not open, enable push notifications. You can control precisely what types of interactions generate push notifications in the navigation menu under \"Settings > Notifications > Push notifications settings\" once enabled.",
"enable_description_mobile": "You can also access the settings using the navigation menu under \"Settings > Notifications > Push notification settings\".",
"enable_description_settings": "To receive notifications when Elk is not open, enable push notifications. You will be able to control precisely what types of interactions generate push notifications on this same screen once you enable them.", "enable_description_settings": "To receive notifications when Elk is not open, enable push notifications. You will be able to control precisely what types of interactions generate push notifications on this same screen once you enable them.",
"enable_desktop": "Enable push notifications", "enable_desktop": "Enable push notifications",
"enable_title": "Never miss anything", "enable_title": "Never miss anything",

Wyświetl plik

@ -304,6 +304,8 @@
"warning": { "warning": {
"enable_close": "Close", "enable_close": "Close",
"enable_description": "To receive notifications when Elk is not open, enable push notifications. You can control precisely what types of interactions generate push notifications via the \"@:settings.notifications.show_btn{'\"'} button above once enabled.", "enable_description": "To receive notifications when Elk is not open, enable push notifications. You can control precisely what types of interactions generate push notifications via the \"@:settings.notifications.show_btn{'\"'} button above once enabled.",
"enable_description_desktop": "To receive notifications when Elk is not open, enable push notifications. You can control precisely what types of interactions generate push notifications in \"Settings > Notifications > Push notifications settings\" once enabled.",
"enable_description_mobile": "You can also access the settings using the navigation menu \"Settings > Notifications > Push notification settings\".",
"enable_description_settings": "To receive notifications when Elk is not open, enable push notifications. You will be able to control precisely what types of interactions generate push notifications on this same screen once you enable them.", "enable_description_settings": "To receive notifications when Elk is not open, enable push notifications. You will be able to control precisely what types of interactions generate push notifications on this same screen once you enable them.",
"enable_desktop": "Enable push notifications", "enable_desktop": "Enable push notifications",
"enable_title": "Never miss anything", "enable_title": "Never miss anything",

Wyświetl plik

@ -304,6 +304,8 @@
"warning": { "warning": {
"enable_close": "Cerrar", "enable_close": "Cerrar",
"enable_description": "Para recibir notificaciones cuando Elk no esté abierto, habilita las notificaciones push. Puedes controlar con precisión qué tipos de interacciones generan notificaciones push a través del botón \"@:settings.notifications.show_btn{'\"'} de arriba una vez que estén habilitadas.", "enable_description": "Para recibir notificaciones cuando Elk no esté abierto, habilita las notificaciones push. Puedes controlar con precisión qué tipos de interacciones generan notificaciones push a través del botón \"@:settings.notifications.show_btn{'\"'} de arriba una vez que estén habilitadas.",
"enable_description_desktop": "Para recibir notificaciones cuando Elk no esté abierto, habilite las notificaciones push. Puedes controlar con precisión qué tipos de interacciones generan notificaciones push en el menú de navegación en \"Ajustes > Notificaciones > Ajustes de notificaciones push\" una vez que estén habilitadas.",
"enable_description_mobile": "También podrá acceder a la configuración utilizando el menú de navegación en \"Ajustes > Notificaciones > Ajutes de notificaciones push\".",
"enable_description_settings": "Para recibir notificaciones cuando Elk no esté abierto, habilita las notificaciones push. Podrás controlar con precisión qué tipos de interacciones generan notificaciones push en esta misma pantalla una vez las habilites.", "enable_description_settings": "Para recibir notificaciones cuando Elk no esté abierto, habilita las notificaciones push. Podrás controlar con precisión qué tipos de interacciones generan notificaciones push en esta misma pantalla una vez las habilites.",
"enable_desktop": "Habilitar notificaciones push", "enable_desktop": "Habilitar notificaciones push",
"enable_title": "Nunca te pierdas nada", "enable_title": "Nunca te pierdas nada",

Wyświetl plik

@ -7,7 +7,7 @@ const { t } = useI18n()
const pwaEnabled = useRuntimeConfig().public.pwaEnabled const pwaEnabled = useRuntimeConfig().public.pwaEnabled
useHeadFixed({ useHeadFixed({
title: () => `${t('settings.notifications.notifications.label')} | ${t('nav.settings')}`, title: () => `${t('settings.notifications.label')} | ${t('nav.settings')}`,
}) })
</script> </script>
@ -15,7 +15,7 @@ useHeadFixed({
<MainContent back-on-small-screen> <MainContent back-on-small-screen>
<template #title> <template #title>
<div text-lg font-bold flex items-center gap-2 @click="$scrollToTop"> <div text-lg font-bold flex items-center gap-2 @click="$scrollToTop">
<span>{{ $t('settings.notifications.notifications.label') }}</span> <span>{{ $t('settings.notifications.label') }}</span>
</div> </div>
</template> </template>