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 { Dialog, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger } from '@/components/ui/dialog'
|
||||||
import { Button } from '@/components/ui/button'
|
import { Button } from '@/components/ui/button'
|
||||||
import { LogOut, Copy, Check, ShieldAlert } from 'lucide-vue-next'
|
import { LogOut, Copy, Check, ShieldAlert } from 'lucide-vue-next'
|
||||||
|
import { useI18n } from 'vue-i18n'
|
||||||
|
|
||||||
|
const { t } = useI18n()
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
onLogout: () => void
|
onLogout: () => void
|
||||||
}>()
|
}>()
|
||||||
|
|
@ -38,7 +40,7 @@ const handleLogout = () => {
|
||||||
<DialogTrigger as-child>
|
<DialogTrigger as-child>
|
||||||
<Button variant="ghost" size="icon" class="text-muted-foreground hover:text-foreground">
|
<Button variant="ghost" size="icon" class="text-muted-foreground hover:text-foreground">
|
||||||
<LogOut class="h-5 w-5" />
|
<LogOut class="h-5 w-5" />
|
||||||
<span class="sr-only">Logout</span>
|
<span class="sr-only">{{ t('nav.logout') }}</span>
|
||||||
</Button>
|
</Button>
|
||||||
</DialogTrigger>
|
</DialogTrigger>
|
||||||
<DialogContent class="sm:max-w-md">
|
<DialogContent class="sm:max-w-md">
|
||||||
|
|
@ -50,11 +52,10 @@ const handleLogout = () => {
|
||||||
</div>
|
</div>
|
||||||
<div class="text-center space-y-2">
|
<div class="text-center space-y-2">
|
||||||
<DialogTitle class="text-xl font-semibold text-foreground">
|
<DialogTitle class="text-xl font-semibold text-foreground">
|
||||||
Backup Required
|
{{ t('auth.logout.title') }}
|
||||||
</DialogTitle>
|
</DialogTitle>
|
||||||
<DialogDescription class="text-muted-foreground">
|
<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
|
{{ t('auth.logout.description') }}
|
||||||
copy and securely store your private key before logging out.
|
|
||||||
</DialogDescription>
|
</DialogDescription>
|
||||||
</div>
|
</div>
|
||||||
</DialogHeader>
|
</DialogHeader>
|
||||||
|
|
@ -63,16 +64,16 @@ const handleLogout = () => {
|
||||||
@click="copyPrivateKey">
|
@click="copyPrivateKey">
|
||||||
<Copy v-if="!hasCopied" class="h-4 w-4 mr-2" />
|
<Copy v-if="!hasCopied" class="h-4 w-4 mr-2" />
|
||||||
<Check v-else 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>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
<DialogFooter class="flex flex-col sm:flex-row gap-2 sm:gap-3">
|
<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">
|
<Button variant="ghost" @click="() => isOpen = false" class="flex-1 sm:flex-none hover:bg-muted">
|
||||||
Cancel
|
{{ t('auth.logout.cancel') }}
|
||||||
</Button>
|
</Button>
|
||||||
<Button variant="destructive" @click="handleLogout" class="flex-1 sm:flex-none">
|
<Button variant="destructive" @click="handleLogout" class="flex-1 sm:flex-none">
|
||||||
<LogOut class="h-4 w-4 mr-2" />
|
<LogOut class="h-4 w-4 mr-2" />
|
||||||
Logout
|
{{ t('auth.logout.confirm') }}
|
||||||
</Button>
|
</Button>
|
||||||
</DialogFooter>
|
</DialogFooter>
|
||||||
</DialogContent>
|
</DialogContent>
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,16 @@ export default {
|
||||||
login: 'Login',
|
login: 'Login',
|
||||||
logout: 'Logout'
|
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: {
|
home: {
|
||||||
title: 'Find Bitcoin Lightning Acceptors',
|
title: 'Find Bitcoin Lightning Acceptors',
|
||||||
subtitle: 'Discover local businesses, services, and venues that accept Bitcoin Lightning payments.',
|
subtitle: 'Discover local businesses, services, and venues that accept Bitcoin Lightning payments.',
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,10 @@ export default {
|
||||||
home: 'Inicio',
|
home: 'Inicio',
|
||||||
directory: 'Directorio',
|
directory: 'Directorio',
|
||||||
faq: 'Preguntas',
|
faq: 'Preguntas',
|
||||||
title: 'Directorio Atitlán'
|
title: 'Directorio Atitlán',
|
||||||
|
support: 'Soporte',
|
||||||
|
login: 'Iniciar Sesión',
|
||||||
|
logout: 'Cerrar Sesión'
|
||||||
},
|
},
|
||||||
home: {
|
home: {
|
||||||
title: 'Encuentra Aceptadores de Bitcoin Lightning',
|
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]."
|
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