add translations
This commit is contained in:
parent
f3eb1622eb
commit
e94e20db08
3 changed files with 32 additions and 8 deletions
|
|
@ -4,7 +4,9 @@ import { useNostrStore } from '@/stores/nostr'
|
|||
import { Dialog, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger } from '@/components/ui/dialog'
|
||||
import { Button } from '@/components/ui/button'
|
||||
import { LogOut, Copy, Check, ShieldAlert } from 'lucide-vue-next'
|
||||
import { useI18n } from 'vue-i18n'
|
||||
|
||||
const { t } = useI18n()
|
||||
const props = defineProps<{
|
||||
onLogout: () => void
|
||||
}>()
|
||||
|
|
@ -38,7 +40,7 @@ const handleLogout = () => {
|
|||
<DialogTrigger as-child>
|
||||
<Button variant="ghost" size="icon" class="text-muted-foreground hover:text-foreground">
|
||||
<LogOut class="h-5 w-5" />
|
||||
<span class="sr-only">Logout</span>
|
||||
<span class="sr-only">{{ t('nav.logout') }}</span>
|
||||
</Button>
|
||||
</DialogTrigger>
|
||||
<DialogContent class="sm:max-w-md">
|
||||
|
|
@ -50,11 +52,10 @@ const handleLogout = () => {
|
|||
</div>
|
||||
<div class="text-center space-y-2">
|
||||
<DialogTitle class="text-xl font-semibold text-foreground">
|
||||
Backup Required
|
||||
{{ t('auth.logout.title') }}
|
||||
</DialogTitle>
|
||||
<DialogDescription class="text-muted-foreground">
|
||||
If you haven't saved your private key, you will permanently lose access to this chat history. Make sure to
|
||||
copy and securely store your private key before logging out.
|
||||
{{ t('auth.logout.description') }}
|
||||
</DialogDescription>
|
||||
</div>
|
||||
</DialogHeader>
|
||||
|
|
@ -63,16 +64,16 @@ const handleLogout = () => {
|
|||
@click="copyPrivateKey">
|
||||
<Copy v-if="!hasCopied" class="h-4 w-4 mr-2" />
|
||||
<Check v-else class="h-4 w-4 mr-2" />
|
||||
{{ hasCopied ? 'Copied!' : 'Copy Private Key' }}
|
||||
{{ hasCopied ? t('auth.logout.copied') : t('auth.logout.copyKey') }}
|
||||
</Button>
|
||||
</div>
|
||||
<DialogFooter class="flex flex-col sm:flex-row gap-2 sm:gap-3">
|
||||
<Button variant="ghost" @click="() => isOpen = false" class="flex-1 sm:flex-none hover:bg-muted">
|
||||
Cancel
|
||||
{{ t('auth.logout.cancel') }}
|
||||
</Button>
|
||||
<Button variant="destructive" @click="handleLogout" class="flex-1 sm:flex-none">
|
||||
<LogOut class="h-4 w-4 mr-2" />
|
||||
Logout
|
||||
{{ t('auth.logout.confirm') }}
|
||||
</Button>
|
||||
</DialogFooter>
|
||||
</DialogContent>
|
||||
|
|
|
|||
|
|
@ -8,6 +8,16 @@ export default {
|
|||
login: 'Login',
|
||||
logout: 'Logout'
|
||||
},
|
||||
auth: {
|
||||
logout: {
|
||||
title: 'Backup Required',
|
||||
description: 'If you haven\'t saved your private key, you will permanently lose access to this chat history. Make sure to copy and securely store your private key before logging out.',
|
||||
copyKey: 'Copy Private Key',
|
||||
copied: 'Copied!',
|
||||
cancel: 'Cancel',
|
||||
confirm: 'Logout'
|
||||
}
|
||||
},
|
||||
home: {
|
||||
title: 'Find Bitcoin Lightning Acceptors',
|
||||
subtitle: 'Discover local businesses, services, and venues that accept Bitcoin Lightning payments.',
|
||||
|
|
|
|||
|
|
@ -3,7 +3,10 @@ export default {
|
|||
home: 'Inicio',
|
||||
directory: 'Directorio',
|
||||
faq: 'Preguntas',
|
||||
title: 'Directorio Atitlán'
|
||||
title: 'Directorio Atitlán',
|
||||
support: 'Soporte',
|
||||
login: 'Iniciar Sesión',
|
||||
logout: 'Cerrar Sesión'
|
||||
},
|
||||
home: {
|
||||
title: 'Encuentra Aceptadores de Bitcoin Lightning',
|
||||
|
|
@ -68,5 +71,15 @@ export default {
|
|||
answer: "Si eres un negocio que acepta pagos Lightning y te gustaría aparecer en nuestro directorio, contáctanos a través de nuestro formulario de envío [próximamente]."
|
||||
}
|
||||
]
|
||||
},
|
||||
auth: {
|
||||
logout: {
|
||||
title: 'Respaldo Requerido',
|
||||
description: 'Si no has guardado tu llave privada, perderás permanentemente el acceso a este historial de chat. Asegúrate de copiar y almacenar de forma segura tu llave privada antes de cerrar sesión.',
|
||||
copyKey: 'Copiar Llave Privada',
|
||||
copied: '¡Copiado!',
|
||||
cancel: 'Cancelar',
|
||||
confirm: 'Cerrar Sesión'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue