From e94e20db08edab4d613947bf36c9cabefcc94fa4 Mon Sep 17 00:00:00 2001 From: padreug Date: Wed, 12 Feb 2025 00:08:33 +0100 Subject: [PATCH] add translations --- src/components/ui/logout-dialog/LogoutDialog.vue | 15 ++++++++------- src/i18n/locales/en.ts | 10 ++++++++++ src/i18n/locales/es.ts | 15 ++++++++++++++- 3 files changed, 32 insertions(+), 8 deletions(-) diff --git a/src/components/ui/logout-dialog/LogoutDialog.vue b/src/components/ui/logout-dialog/LogoutDialog.vue index d91b30c..2451f0c 100644 --- a/src/components/ui/logout-dialog/LogoutDialog.vue +++ b/src/components/ui/logout-dialog/LogoutDialog.vue @@ -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 = () => { @@ -50,11 +52,10 @@ const handleLogout = () => {
- Backup Required + {{ t('auth.logout.title') }} - 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') }}
@@ -63,16 +64,16 @@ const handleLogout = () => { @click="copyPrivateKey"> - {{ hasCopied ? 'Copied!' : 'Copy Private Key' }} + {{ hasCopied ? t('auth.logout.copied') : t('auth.logout.copyKey') }}
diff --git a/src/i18n/locales/en.ts b/src/i18n/locales/en.ts index ff44251..e69bd1f 100644 --- a/src/i18n/locales/en.ts +++ b/src/i18n/locales/en.ts @@ -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.', diff --git a/src/i18n/locales/es.ts b/src/i18n/locales/es.ts index d7ebf5c..7dad9ae 100644 --- a/src/i18n/locales/es.ts +++ b/src/i18n/locales/es.ts @@ -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' + } } }